This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<v-text-field | |
class="v-date-field" | |
:class="{ 'v-date-field--rounded': rounded }" | |
:value="dateFormated" | |
prepend-inner-icon="mdi-calendar-blank" | |
readonly | |
@click="open" | |
:disabled="disabled" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<v-dialog | |
v-model="isOpen" | |
persistent | |
max-width="500px" | |
transition="dialog-transition" | |
> | |
<v-card> | |
<v-card-text class="text-center pt-5" v-if="params.icon"> | |
<v-icon ref="icon" :color="params.iconColor" size="91"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { format, parseISO, formatDistanceToNow } from "date-fns"; | |
import { fr, arDZ } from "date-fns/locale"; | |
const locales = { fr, ar: arDZ }; | |
function formatDate(str) { | |
if (typeof str === "string") str = parseISO(str); | |
return format(str, "dd/MM/yyyy"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import currency from "currency.js"; | |
function formatCurrency(value, formatWithSymbol = true) { | |
return currency(value, { | |
symbol: "DA", | |
pattern: "# !", | |
formatWithSymbol, | |
separator: " ", | |
decimal: ",", | |
precision: 0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<v-snackbar | |
:timeout="4000" | |
left | |
bottom | |
:value="!empty" | |
@input="pop" | |
:color="current.type" | |
light | |
> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import MarkdownIt from "markdown-it"; | |
const markdown = new MarkdownIt({ | |
breaks: true, | |
xhtmlOut: true | |
}); | |
export default { | |
install(Vue) { | |
Vue.filter("markdown", function(text) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function propertyAccess(object, key) { | |
if (isFunction(object[key])) return object[key](); | |
if (object[key] instanceof Date) return object[key].toISOString(); | |
if (key in object) return object[key]; | |
const conn = getConnection(); | |
if (conn.hasMetadata(object.constructor.name)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<!-- Slider main container --> | |
<div | |
class="ok-swiper" | |
:class="{ | |
'--fill-height': fillHeight, | |
'--pagination': pagination, | |
'--navigation': navigation, | |
'--navigation-ex': navigationEx | |
}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default function sleep(ms: number): Promise<void> { | |
return new Promise(resolve => { | |
setTimeout(resolve, ms); | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "winston-daily-rotate-file"; | |
import { join } from "path"; | |
import { createLogger, format, transports } from "winston"; | |
const serverFormat = format.printf(info => { | |
return `${info.timestamp} [${info.label}] ${info.level}: ${info.message}`; | |
}); | |
function createCustomLogger(label: string, level: string) { |
OlderNewer