This commit is contained in:
mohadese namavar
2024-06-16 00:22:14 +04:30
commit ec84dfd222
322 changed files with 77942 additions and 0 deletions
+63
View File
@@ -0,0 +1,63 @@
import AppCalendar from '../components/app/Calendar.vue'
export default () => {
const { t } = useI18n()
return reactive({
fields: {
firstName: {
is: "InputText",
props: { placeholder: "", style: 'direction:rtl' },
},
lastName: {
is: "InputText",
props: { placeholder: "", style: 'direction:rtl' },
},
gender: {
is: "Dropdown",
props: {
placeholder: "",
optionLabel: "label",
optionValue: 'value',
dataKey: 'value',
options: [
{ label: t('male'), value: 0 },
{ label: t('female'), value: 1 },
]
},
},
dateOfBirth: {
is: AppCalendar,
props: { inputId: "dateOfBirth", placeholder: "", class: "isax isax-note5" },
},
phoneNumber: {
is: "InputText",
props: { placeholder: "", inputmode: "numeric", disabled: true },
},
email: {
is: "InputText",
props: { placeholder: "", type: "email" },
},
postCode: {
is: "InputText",
props: { placeholder: "" },
},
state: {
is: "Dropdown",
props: { placeholder: "", options: [], optionValue: 'name', optionLabel: 'name' },
},
city: {
is: "Dropdown",
props: { placeholder: '', options: []},
},
address: {
is: "Textarea",
props: { placeholder: "" },
},
},
btn: {
props: {
label: t("next"),
},
}
})
}
+56
View File
@@ -0,0 +1,56 @@
export default () => {
const { t } = useI18n();
return reactive({
backBtn: {
props: {
label: t("backToHome"),
icon: "isax isax-arrow-left",
severity: "secondary",
rounded: "md",
text: true,
}
},
asides: {
LoginForm: {
image: 'logo.svg',
title: 'welcome',
subtitle: 'Welcome',
desc: 'asanMarketDesc',
hint: ''
},
EnterPhoneNumber: {
step: 1,
image: 'enter-phone-number.svg',
title: 'enterPhoneNumber',
subtitle: 'Enter your number',
desc: 'enterPhoneNumberDesc',
hint: ''
},
EnterOTPCode: {
step: 2,
image: 'otp-code-sms.svg',
title: 'receiveActivtionCode',
subtitle: 'Receive activation code',
desc: 'receiveActivtionCodeDesc',
hint: ''
},
ChoosePassword: {
step: 3,
image: 'choose-password.svg',
title: 'choosePassword',
subtitle: 'Choose a Password',
desc: 'choosePasswordDesc',
hint: 'choosePasswordHint'
},
CompleteInformation: {
step: 4,
image: 'complete-information.svg',
title: 'completeInformation',
subtitle: 'Completion of information',
desc: 'completeInformationDesc',
hint: ''
}
}
})
}
+40
View File
@@ -0,0 +1,40 @@
export default () => {
const { t } = useI18n()
return reactive({
fields: {
username: {
is: "InputText",
props: { type: "text", placeholder: "", id: "username" },
},
password: {
is: "Password",
props: {
toggleMask: true,
feedback: false,
placeholder: "",
inputId: "password",
},
},
},
checkbox: {
props: {
binary: true,
inputId: "remember",
},
},
btns: {
login: {
props: {
label: t("login"),
},
},
register: {
props: {
label: t("register"),
outlined: true
},
},
},
})
}
+18
View File
@@ -0,0 +1,18 @@
export default () => {
const { t } = inject('service')
return reactive({
btns: {
next: {
props: {
label: t("next"),
},
},
try: {
props: {
label: t("tryAgain"),
link: true,
},
},
},
})
}
+29
View File
@@ -0,0 +1,29 @@
export default () => {
const { t } = useI18n()
return reactive({
fields: {
password: {
props: {
feedback: false,
toggleMask: true,
autofocus: true,
placeholder: "",
},
},
repassword: {
props: {
feedback: false,
toggleMask: true,
placeholder: "",
},
},
},
btn: {
props: {
label: t("next"),
// loading: computed(() => $p?.value?.includes('password')),
},
}
})
}
+19
View File
@@ -0,0 +1,19 @@
export default () => {
const { t } = useI18n()
return reactive({
field: {
props: {
placeholder: "",
type: "phone",
id: "phone",
inputmode: "numeric",
},
rules: ['required', 'phone']
},
btn: {
props: {
label: t("receiveCode"),
},
},
})
}
+66
View File
@@ -0,0 +1,66 @@
import UploadNationalCard from '../components/panel/seller/UploadNationalCard.vue'
export default () => {
const { t } = useI18n()
return reactive({
btns: {
save: {
props: {
label: t('save')
}
},
cancel: {
props: {
label: t('cancel'), outlined: true
}
},
},
fields: {
shopName: {
is: "InputText",
props: { placeholder: "" },
},
companyName: {
is: "InputText",
props: { placeholder: "" },
},
accountType: {
is: "Dropdown",
props: {
placeholder: "",
optionLabel: "label",
optionValue: 'value',
options: [
{ label: t('retailer'), value: 'RETAILER' },
{ label: t('wholesaler'), value: 'WHOLESALER' },
]
},
},
companyID: {
is: "InputNumber",
props: { placeholder: "", type: "phone", useGrouping: false },
},
nationalCode: {
is: "InputNumber",
props: { placeholder: "", type: "phone", useGrouping: false },
},
postCodeWork: {
is: "InputNumber",
props: { placeholder: "", type: "phone", useGrouping: false },
},
nationalCard: {
is: UploadNationalCard,
},
companyAddress: {
is: "Textarea",
props: { placeholder: "", rows: 5 },
},
desc: {
is: "Textarea",
props: { placeholder: "", rows: 5 },
},
}
})
}
+17
View File
@@ -0,0 +1,17 @@
export default {
navigation: [
{ icon: "isax isax-arrow-circle-right", text: true, rounded: true, swiper: true },
{ icon: "isax isax-arrow-circle-left", text: true, rounded: true, swiper: true },
],
swiper: {
pagination: { clickable: true },
slidesPerView: 1,
modules: [SwiperNavigation, SwiperPagination],
spaceBetween: 0,
navigation: {
prevEl: "div>button[swiper]:first-of-type",
nextEl: "div>button[swiper]:last-of-type",
},
}
}
+22
View File
@@ -0,0 +1,22 @@
export default (data) => {
const items = {
productsCount: 0,
productsPrice: 0,
discount: 0,
totalFactor: 0
}
items.productsCount = data.length
items.productsPrice =
data.reduce((sum, item) => sum + item.product.price * item.quantity, 0)
items.totalFactor =
data.reduce(
(sum, item) => sum + (item.product.specialPrice || item.product.price) * item.quantity,
0
)
items.discount = items.productsPrice - items.totalFactor
return items;
}
+22
View File
@@ -0,0 +1,22 @@
import ProductDialogShare from '../components/product/dialog/Share.vue'
export default () => {
const { dialog } = inject('service')
return reactive({
options: {
search: {
props: {
icon: "isax isax-search-normal-1", severity: "secondary", text: true, rounded: true,
},
click: () => dialog.show(ProductDialogShare)
},
share: {
props: {
icon: 'isax isax-share', severity: "secondary", text: true, rounded: true,
},
click: () => { }
},
}
})
}
+47
View File
@@ -0,0 +1,47 @@
export default () => {
const { t } = useI18n()
return reactive({
fields: {
fullName: {
is: "InputText",
label: t("nameAndFamily"),
props: {
placeholder: ""
},
},
call: {
is: "InputText",
label: t("emailOrPhone"),
props: {
placeholder: "", style: 'direction: ltr'
},
},
content: {
is: "Textarea",
label: t("yourTextMessage"),
props: {
placeholder: ""
},
},
},
ways: [
{ icon: "isax-call", label: "phone", value: "67341" },
{ icon: "isax-message", label: "postalCode", value: "1136834843" },
{
icon: "isax-location",
label: "centeralOffice",
value: "تهران، میدان امام خمینی، خیابان فردوسی، خیابان سرهنگ سخائی نبش کوچه بهنیا، پلاک40، طبقه چهارم، واحد12 ",
},
],
map: {
props: { zoom: 17, center: [35.6995282, 51.3383703] },
layer: { url: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', name: 'OpenStreetMap' }
},
socials: [
{ icon: "linkedin", url: "/" },
{ icon: "telegram", url: "/" },
{ icon: "whatsapp", url: "/" },
{ icon: "twitter", url: "/" },
]
})
}
+39
View File
@@ -0,0 +1,39 @@
import MiniMenu from '../components/app/desktop/header/MiniMenu.vue'
import CartList from '../components/app/desktop/header/cart/List.vue'
export default () => {
const { t } = useI18n()
return reactive({
btns: {
login: {
props: {
label: t("registerOrLogin"),
icon: "isax isax-login",
iconPos: "right",
}
},
logged: {
account: {
props: {
label: t("userAccount"),
icon: "isax isax-user",
iconPos: "right",
severity: "secondary",
outlined: true,
},
component: MiniMenu
},
cart: {
props: {
icon: "isax isax-shopping-cart",
severity: "secondary",
badge: computed(() => useCartStore().count),
disabled: computed(() => useCartStore().count < 1),
outlined: true,
},
component: CartList
},
},
}
})
}
+35
View File
@@ -0,0 +1,35 @@
export default {
btns: {
arrows: [
{ icon: "isax isax-arrow-right-3", rounded: true, swiper: true },
{ icon: "isax isax-arrow-left-2", rounded: true, swiper: true },
],
},
swipers: {
topSlider: {
slidesPerView: 1,
modules: [SwiperNavigation],
spaceBetween: 0,
navigation: {
prevEl: "button[swiper]:first-of-type",
nextEl: "button[swiper]:last-of-type",
},
},
newProduct: {
slidesPerView: "auto",
modules: [SwiperNavigation],
navigation: {
prevEl: "div:has(>.newProduct)>button[swiper]:first-of-type",
nextEl: "div:has(>.newProduct)>button[swiper]:last-of-type",
},
},
topProduct: {
slidesPerView: "auto",
modules: [SwiperNavigation],
navigation: {
prevEl: "div:has(>.topProduct)>button[swiper]:first-of-type",
nextEl: "div:has(>.topProduct)>button[swiper]:last-of-type",
},
}
},
}
+386
View File
@@ -0,0 +1,386 @@
// province cities
const eastazarbaijan1 = [
'آذرشهر',
'اسکو',
'اهر',
'بستان‌آباد',
'بناب',
'تبریز',
'جلفا',
'چاراویماق',
'سراب',
'شبستر',
'مراغه'
]
const westazarbaijan2 = [
'ارومیه',
'اشنویه',
'بوکان',
'پیرانشهر',
'تکاب',
'چالدران',
'خوی',
'سردشت',
'سلماس',
'شاهین‌دژ',
'ماکو',
'مهاباد',
'میاندوآب',
'نقده'
]
const ardabil3 = ['اردبیل', 'بیله‌سوار', 'پارس‌آباد', 'خلخال', 'کوثر', 'گِرمی', 'مِشگین‌شهر', 'نَمین', 'نیر']
const esfahan4 = [
'آران و بیدگل',
'اردستان',
'اصفهان',
'برخوار و میمه',
'تیران و کرون',
'چادگان',
'خمینی‌شهر',
'خوانسار',
'سمیرم',
'شهرضا',
'سمیرم سفلی',
'فریدن',
'فریدون‌شهر',
'فلاورجان',
'کاشان',
'گلپایگان',
'لنجان',
'مبارکه',
'نائین',
'نجف‌آباد',
'نطنز'
]
const ilam5 = ['آبدانان', 'ایلام', 'ایوان', 'دره‌شهر', 'دهلران', 'شیروان و چرداول', 'مهران']
const booshehr6 = ['بوشهر', 'تنگستان', 'جم', 'دشتستان', 'دشتی', 'دیر', 'دیلم', 'کنگان', 'گناوه']
const tehran7 = [
'اسلام‌شهر',
'پاکدشت',
'تهران',
'دماوند',
'رباط‌کریم',
'ری',
'ساوجبلاغ',
'شمیرانات',
'شهریار',
'فیروزکوه',
'ورامین'
]
const chaharmahalobakhtiari8 = ['اردل', 'بروجن', 'شهرکرد', 'فارسان', 'کوهرنگ', 'لردگان']
const khorasanjonoobi9 = ['بیرجند', 'درمیان', 'سرایان', 'سربیشه', 'فردوس', 'قائنات', 'نهبندان']
const khorasanrazavi10 = [
'بردسکن',
'تایباد',
'تربت جام',
'تربت حیدریه',
'چناران',
'خلیل‌آباد',
'خواف',
'درگز',
'رشتخوار',
'سبزوار',
'سرخس',
'فریمان',
'قوچان',
'کاشمر',
'کلات',
'گناباد',
'مشهد',
'مه ولات',
'نیشابور'
]
const khorasanshomali11 = ['اسفراین', 'بجنورد', 'جاجرم', 'شیروان', 'فاروج', 'مانه و سملقان']
const khoozestan12 = [
'آبادان',
'امیدیه',
'اندیمشک',
'اهواز',
'ایذه',
'باغ‌ملک',
'بندر ماهشهر',
'بهبهان',
'خرمشهر',
'دزفول',
'دشت آزادگان',
'رامشیر',
'رامهرمز',
'شادگان',
'شوش',
'شوشتر'
]
const zanjan13 = ['ابهر', 'ایجرود', 'خدابنده', 'خرمدره', 'زنجان', 'طارم', 'ماه‌نشان']
const semnan14 = ['دامغان', 'سمنان', 'شاهرود', 'گرمسار', 'مهدی‌شهر']
const sistanobaloochestan15 = [
'ایرانشهر',
'چابهار',
'خاش',
'دلگان',
'زابل',
'زاهدان',
'زهک',
'سراوان',
'سرباز',
'کنارک',
'نیک‌شهر'
]
const fars16 = [
'آباده',
'ارسنجان',
'استهبان',
'اقلید',
'بوانات',
'پاسارگاد',
'جهرم',
'خرم‌بید',
'خنج',
'داراب',
'زرین‌دشت',
'سپیدان',
'شیراز',
'فراشبند',
'فسا',
'فیروزآباد',
'قیر و کارزین',
'کازرون',
'لارستان',
'لامِرد',
'مرودشت',
'ممسنی',
'مهر',
'نی‌ریز'
]
const qazvin17 = ['آبیک', 'البرز', 'بوئین‌زهرا', 'تاکستان', 'قزوین']
const qom18 = ['قم']
const kordestan19 = ['بانه', 'بیجار', 'دیواندره', 'سروآباد', 'سقز', 'سنندج', 'قروه', 'کامیاران', 'مریوان']
const kerman20 = [
'بافت',
'بردسیر',
'بم',
'جیرفت',
'راور',
'رفسنجان',
'رودبار جنوب',
'زرند',
'سیرجان',
'شهر بابک',
'عنبرآباد',
'قلعه گنج',
'کرمان',
'کوهبنان',
'کهنوج',
'منوجان'
]
const kermanshah21 = [
'اسلام‌آباد غرب',
'پاوه',
'ثلاث باباجانی',
'جوانرود',
'دالاهو',
'روانسر',
'سرپل ذهاب',
'سنقر',
'صحنه',
'قصر شیرین',
'کرمانشاه',
'کنگاور',
'گیلان غرب',
'هرسین'
]
const kohkilooyevaboyrahmad22 = ['بویراحمد', 'بهمئی', 'دنا', 'کهگیلویه', 'گچساران']
const golestan23 = [
'آزادشهر',
'آق‌قلا',
'بندر گز',
'ترکمن',
'رامیان',
'علی‌آباد',
'کردکوی',
'کلاله',
'گرگان',
'گنبد کاووس',
'مراوه‌تپه',
'مینودشت'
]
const gilan24 = [
'آستارا',
'آستانه اشرفیه',
'اَملَش',
'بندر انزلی',
'رشت',
'رضوانشهر',
'رودبار',
'رودسر',
'سیاهکل',
'شَفت',
'صومعه‌سرا',
'طوالش',
'فومَن',
'لاهیجان',
'لنگرود',
'ماسال'
]
const lorestan25 = ['ازنا', 'الیگودرز', 'بروجرد', 'پل‌دختر', 'خرم‌آباد', 'دورود', 'دلفان', 'سلسله ,کوهدشت']
const mazandaran26 = [
'آمل',
'بابل',
'بابلسر',
'بهشهر',
'تنکابن',
'جویبار',
'چالوس',
'رامسر',
'ساری',
'سوادکوه',
'قائم‌شهر',
'گلوگاه',
'محمودآباد',
'نکا',
'نور',
'نوشهر'
]
const markazi27 = ['آشتیان', 'اراک', 'مهاجران', 'تفرش', 'خمین', 'دلیجان', 'زرندیه', 'ساوه', 'شازند', 'کمیجان', 'محلات']
const hormozgan28 = [
'ابوموسی',
'بستک',
'بندر عباس',
'بندر لنگه',
'جاسک',
'حاجی‌آباد',
'شهرستان خمیر',
'رودان',
'قشم',
'گاوبندی',
'میناب'
]
const hamedan29 = ['اسدآباد', 'بهار', 'تویسرکان', 'رزن', 'کبودرآهنگ', 'ملایر', 'نهاوند', 'همدان']
const yazd30 = ['ابرکوه', 'اردکان', 'بافق', 'تفت', 'خاتم', 'صدوق', 'طبس', 'مهریز', 'مِیبُد', 'یزد']
const alborz31 = ['کرج', 'نظرآباد', 'فردیس', 'اشتهارد', 'هشتگرد', 'طالقان']
// provinces list
export default [
{
name: 'آذربایجان شرقی',
cities: eastazarbaijan1
},
{
name: 'آذربایجان غربی',
cities: westazarbaijan2
},
{
name: 'اردبیل',
cities: ardabil3
},
{
name: 'اصفهان',
cities: esfahan4
},
{
name: 'ایلام',
cities: ilam5
},
{
name: 'بوشهر',
cities: booshehr6
},
{
name: 'تهران',
cities: tehran7
},
{
name: 'چهارمحال بختیاری',
cities: chaharmahalobakhtiari8
},
{
name: 'خراسان جنوبی',
cities: khorasanjonoobi9
},
{
name: 'خراسان رضوی',
cities: khorasanrazavi10
},
{
name: 'خراسان شمالی',
cities: khorasanshomali11
},
{
name: 'خوزستان',
cities: khoozestan12
},
{
name: 'زنجان',
cities: zanjan13
},
{
name: 'سمنان',
cities: semnan14
},
{
name: 'سیستان بلوچستان',
cities: sistanobaloochestan15
},
{
name: 'فارس',
cities: fars16
},
{
name: 'قزوین',
cities: qazvin17
},
{
name: 'قم',
cities: qom18
},
{
name: 'کردستان',
cities: kordestan19
},
{
name: 'کرمان',
cities: kerman20
},
{
name: 'کرمانشاه',
cities: kermanshah21
},
{
name: 'کهکیلویه و بویراحمد',
cities: kohkilooyevaboyrahmad22
},
{
name: 'گلستان',
cities: golestan23
},
{
name: 'گیلان',
cities: gilan24
},
{
name: 'لرستان',
cities: lorestan25
},
{
name: 'مازندران',
cities: mazandaran26
},
{
name: 'مرکزی',
cities: markazi27
},
{
name: 'هرمزگان',
cities: hormozgan28
},
{
name: 'همدان',
cities: hamedan29
},
{
name: 'یزد',
cities: yazd30
},
{
name: 'البرز',
cities: alborz31
}
]
+21
View File
@@ -0,0 +1,21 @@
export default () => {
const { t } = inject('service')
return reactive({
btns: {
logout: {
props: {
label: t("iGoOut"),
severity: "danger",
},
},
cancel: {
props: {
label: t("backToMenu"),
severity: "danger",
outlined: true,
},
},
},
})
}
+51
View File
@@ -0,0 +1,51 @@
export default () => {
const store = useUserStore()
return reactive({
btns: {
back: {
props: {
icon: "isax isax-arrow-right-1",
severity: "secondary",
rounded: true,
link: true,
class: 'mr-2'
},
},
menu: {
props: {
icon: 'isax isax-menu-1',
severity: 'secondary',
rounded: true,
text: true,
}
}
},
navigation: {
home: {
to: "/",
props: {
icon: "isax isax-home-2", rounded: true, severity: "secondary", text: true,
},
},
categories: {
to: "/categories",
props: {
icon: "isax isax-category-2", rounded: true, severity: "secondary", text: true,
},
},
cart: {
to: "/checkout/cart",
props: {
icon: "isax isax-shopping-cart", rounded: true, severity: "secondary", text: true,
},
},
profile: {
to: computed(() => store.token ? '/panel/profile' : '/auth/login'),
props: {
icon: "isax isax-user", rounded: true, severity: "secondary", text: true,
},
},
},
})
}
+112
View File
@@ -0,0 +1,112 @@
export default () => {
const { t } = inject('service')
const categories = useCategoriesStore()
const config = reactive({
btns: {
next: {
props: {
label: t('nextLevel')
}
},
prev: {
props: {
label: t('prevLevel'), outlined: true
}
},
submit: {
props: {
label: t('submit')
}
},
},
fields: {
first: {
title: {
is: "InputText",
label: t("productName"),
props: { placeholder: "" },
},
titleEN: {
is: "InputText",
label: "Product Name",
props: { placeholder: "", class: '!ltr' },
},
category: {
is: "Dropdown",
label: t("category"),
props: {
placeholder: "", filter: true,
options: categories.items, optionLabel: "name", optionGroupLabel: "name", optionGroupChildren: "sub",
optionValue: "_id"
},
},
subCategory: {
is: "Dropdown",
label: t("subCategory"),
props: {
placeholder: "", optionLabel: "name", optionValue: "_id", options: [],
disabled: true
},
},
brandID: {
is: "Dropdown",
label: t("brand"),
props: { placeholder: "" , optionLabel: "title", optionValue: "_id"},
},
warranty: {
is: "InputText",
label: t("warranty"),
props: { placeholder: "" },
},
price: {
is: "InputNumber",
label: t("price"),
props: { placeholder: "" , prefix: t('priceUnit') },
},
localSend: {
is: "Checkbox",
label: t("sendFromAsanMarket"),
props: { binary: true, inputId: 'localSend' },
},
stockQuantity: {
is: "InputNumber",
label: t("number"),
props: { placeholder: "" },
},
boxSeller: {
is: "Checkbox",
label: t("wholesale"),
props: { binary: true, inputId: 'boxSeller' },
},
description: {
is: "Editor",
label: t("description"),
props: { placeholder: t("description"), editorStyle: "min-height: 156px" },
},
minBuy: {
is: "InputNumber",
label: t("minBuyNumber"),
props: { placeholder: "", disabled: true },
},
maxBuy: {
is: "InputNumber",
label: t("maxBuyNumber"),
props: { placeholder: "", disabled: true },
},
itemInBox: {
is: "InputNumber",
label: t("itemInBox"),
props: { placeholder: "", disabled: true },
},
},
}
})
config.fields.first.subCategory.props.disabled = computed(() => {
return config.fields.first.subCategory.props.options?.length < 1
})
return config;
}
+109
View File
@@ -0,0 +1,109 @@
export default () => {
const { t } = inject('service')
return reactive({
btns: {
options: {
props: {
icon: 'isax isax-more rotate-90', severity: 'secondary', text: true, rounded: true
}
},
filter: {
props: {
icon: "isax isax-setting-4", severity: "secondary", text: true, rounded: true,
}
},
close: {
props: { icon: 'isax isax-close-circle', severity: 'secondary', rounded: true, text: true }
},
show: {
props: {
icon: "isax isax-eye", severity: "secondary", rounded: true, text: true,
}
},
save: {
props: {
label: t('save'),
}
},
recovery: {
props: {
label: t('passwordRecovery'), link: true,
}
},
},
statuses: {
comment: {
true: t('confirmed'), false: t('rejected')
}
},
options: {
comment: [
{
label: t('editComment'), icon: 'isax isax-edit', is: 'ProductCommentForm'
},
{
label: t('removeComment'), icon: 'isax isax-trash', is: 'ProducReminder'
}
]
},
headers: [
"row", "productCode", "productName", "count", "unit", "price", "discount", "finalPrice", "consumerPrice",
],
words: ["description", "marketer", "salesManager"],
radios: ["newest", "oldest", "highestPrice", "lowestPrice"],
switches: ["date", "factorNumber"],
menu: {
profile: [
{
url: "information", label: t('userInfo'), icon: "isax isax-edit-2",
},
{
key: 'password', label: t('securityAndPassword'), icon: "isax isax-shield-security2",
},
{
url: 'seller/store', label: t('sellerPanel'), icon: "isax isax-element-2"
},
{
url: "favorites", label: t('favorites'), icon: "isax isax-heart"
},
{
url: "comments", label: t('myComments'), icon: "isax isax-message-text4"
},
{
url: "factors", label: t('factors'), icon: "isax isax-receipt-2-1"
},
{
url: "moeen", label: t('moeenFactors'), icon: "isax isax-archive-book4"
},
{
url: "notification", label: t('notifications'), icon: "isax isax-notification"
},
{
url: "orders", label: t('orders'), icon: "isax isax-shopping-cart"
},
{
key: "logout", label: t('logout'), icon: "isax isax-logout-1"
},
]
},
fields: {
changePassword: {
currentPassword: {
props: {
feedback: false, toggleMask: true, placeholder: "",
},
},
newPassword: {
props: {
feedback: false, toggleMask: true, placeholder: "",
},
},
repeatPassword: {
props: {
feedback: false, toggleMask: true, placeholder: "",
},
}
}
}
})
}
+32
View File
@@ -0,0 +1,32 @@
export default () => {
const { t } = useI18n()
return reactive({
closeBtn: {
props: {
icon: "pi",
severity: "secondary",
text: true,
rounded: true,
}
},
recoveryBtn: {
props: {
label: t('passwordRecovery'),
// loading: computed(() => $p?.value?.includes('number'))
}
},
ways: ["number", "email"],
labels: {
number: "enterYourMobileNumber",
email: "enterYourEmail",
},
fields: {
email: {
rules: ['required', 'email']
},
phoneNumber: {
rules: ['required', 'phone']
},
}
})
}
+63
View File
@@ -0,0 +1,63 @@
export default () => {
const { t } = inject('service')
const props = reactive({ iconPos: "right", severity: "secondary", text: true });
return reactive({
getBind: (item) => Object.assign(item.props, props),
menu: [
{
url: "/panel/profile",
props: {
label: "پروفایل کاربری", icon: "isax isax-user-square -mt-1.5",
},
},
{
url: "/panel/favorites",
props: { label: "علاقه مندی ها", icon: "isax isax-heart" },
},
{
url: "/panel/comments",
props: { label: "نظرات من", icon: "isax isax-message-text4" },
},
{
url: "/panel/factors",
props: { label: "فاکتورها", icon: "isax isax-receipt-2-1" },
},
{
url: "/panel/moeen",
props: { label: "فاکتور معین", icon: "isax isax-archive-book4" },
},
{
url: "/panel/notification",
props: { label: "اعلان ها", icon: "isax isax-notification" },
},
{
url: "/panel/orders",
props: { label: "سفارشات", icon: "isax isax-shopping-cart" },
},
{
url: "/panel/seller/store",
props: { label: "پنل فروشنده", icon: "isax isax-element-2" },
},
],
logoutBtn: {
props: {
label: t('logout'),
icon: "isax isax-logout-1",
iconPos: "right",
severity: "secondary",
text: true,
}
},
floating: (menu, selector, index) => {
const list = selector.value.previousSibling;
const li = list.children[index];
selector.value.style.width = li.offsetWidth + "px";
const right =
list.parentElement.offsetWidth - li.offsetLeft - li.offsetWidth;
selector.value.style.right = right + "px";
menu.forEach((item) => delete item.props.active);
menu[index].props.active = true;
}
})
}
+14
View File
@@ -0,0 +1,14 @@
export default () => {
const { t } = useI18n()
return reactive({
btn: {
props: {
label: t('readMore'),
icon: 'isax isax-arrow-left',
severity: 'primary',
text: true,
rounded: true
}
},
})
}
+42
View File
@@ -0,0 +1,42 @@
export default () => {
const { t } = useI18n()
return reactive({
btns: {
send: {
props: {
label: t("submitAndSend")
},
events: {
click: () => {}
}
},
cancel: {
props: {
label: t("cancel"), outlined: true
},
events: {
click: () => {}
}
},
print: {
props: {
label: "Save PDF",
icon: "isax isax-paperclip",
iconPos: "right",
severity: "secondary",
outlined: true,
},
},
save: {
props: {
label: "Save PDF",
icon: "isax isax-direct-inbox",
severity: "secondary",
outlined: true,
},
},
},
})
}
+206
View File
@@ -0,0 +1,206 @@
import ProductDialogReminder from '../components/product/dialog/Reminder.vue'
import ProductDialogMenu from '../components/product/dialog/Menu.vue'
import ProductDialogShare from '../components/product/dialog/Share.vue'
import ProductDialogLineChart from '../components/product/dialog/LineChart.vue'
export default (data) => {
const { dialog, t } = inject('service')
const fevorites = useFavoritesStore()
const cart = useCartStore()
const router = useRouter()
const confg = reactive({
btns: {
report: {
props: {
label: t("reportIncorrectSpecs"),
icon: "isax isax-info-circle",
severity: "secondary",
iconPos: "right",
rounded: true,
text: true,
}
},
arrows: [
{ icon: "isax isax-arrow-right-3", rounded: true, swiper: true },
{ icon: "isax isax-arrow-left-2", rounded: true, swiper: true },
],
close: {
props: { icon: 'isax isax-close-circle', severity: 'secondary', rounded: true, text: true }
},
shares: {
copyLink: {
props: {
label: t("copyLink"), icon: "isax isax-document-copy", severity: "secondary", iconPos: "right", outlined: true,
}
},
telegram: {
props: {
label: t("telegram"), icon: "isax isax-send-2", severity: "primary", iconPos: "right",
}
},
whatsapp: {
props: {
label: t("whatsapp"), icon: "isax isax-call4", severity: "success", iconPos: "right",
}
}
},
submit: {
props: {
label: t('submitComment'), outlined: true
}
},
sort: {
createdAt: {
props: {
label: t("newest"), severity: "secondary", text: true,
}
},
point: {
props: {
label: t("mostUseful"), severity: "secondary", text: true,
}
},
}
},
swiper: {
gallery: { pagination: { dynamicBullets: true }, modules: [SwiperPagination] },
similars: {
slidesPerView: 'auto',
modules: [SwiperNavigation],
navigation: {
prevEl: "div>button[swiper]:first-of-type",
nextEl: "div>button[swiper]:last-of-type",
},
}
},
chart: {
setChartData: (prices, dates) => {
var ctx = document.getElementsByTagName('canvas')[0].getContext('2d')
var gradient = ctx.createLinearGradient(0, 0, 0, 400)
gradient.addColorStop(0, 'rgba(1, 86, 153, 0.62')
gradient.addColorStop(1, 'rgba(1, 86, 153, 0)')
const labels = []
const data = []
prices
.filter((item) => {
return (
new Date(item.date) >= new Date(dates.from) &&
new Date(item.date) <= new Date(dates.to)
)
})
.forEach(({ date, price }) => {
labels.push(
new Date(date).toLocaleDateString('fa', { month: 'long', year: 'numeric' })
)
data.push(price + ' T')
})
return {
labels,
datasets: [
{
label: '', data, fill: true, tension: 0.4, borderColor: '#379956', backgroundColor: gradient
}
]
}
},
setChartOptions: () => {
return {
maintainAspectRatio: false,
aspectRatio: 0.6,
plugins: { legend: { display: false } },
scales: { x: { grid: { display: false } } }
}
}
},
menu: {
share: {
label: t('shareProduct'), icon: "isax isax-share",
click: () => dialog.show(ProductDialogShare, data)
},
reminder: {
label: t('amazingInformation'), icon: "isax isax-notification4",
click: () => dialog.show(ProductDialogReminder, data)
},
chart: {
label: t('priceChart'), icon: "isax isax-chart-2",
click: () => dialog.show(ProductDialogLineChart, data)
},
compare: {
label: t('compareProduct'), icon: "isax isax-row-horizontal4",
click: () => router.push('/compare/' + data.id)
}
},
options: {
favorite: {
props: {
severity: "secondary", text: true, rounded: true,
icon: computed(() =>
`isax isax-heart${fevorites.find(data.id) ? '5' : ''}`
)
},
click: () => fevorites.update(data.id)
},
cart: {
props: {
icon: "isax isax-shopping-cart", severity: "secondary", text: true, rounded: true,
badges: computed(() => cart.items.length)
},
click: () => router.push('/checkout/cart')
},
menu: {
props: {
icon: "isax isax-more rotate-90", severity: "secondary", text: true, rounded: true,
},
click: () => dialog.show(ProductDialogMenu, confg.menu, { dismissableMask: true })
},
},
actions: {
favorite: {
props: {
severity: "secondary", text: true, rounded: true, icon: computed(() => {
const like = fevorites.find(data.id)
return `isax isax-heart${like ? '5' : ''}`
})
},
click: () => fevorites.update(data.id),
},
share: {
props: {
icon: "isax isax-share", severity: "secondary", text: true, rounded: true,
},
click: () => dialog.show(ProductDialogShare, data)
},
reminder: {
props: {
icon: "isax isax-notification4", severity: "secondary", text: true, rounded: true,
},
click: () => dialog.show(ProductDialogReminder, data)
},
chart: {
props: {
icon: "isax isax-chart-2", severity: "secondary", text: true, rounded: true,
},
click: () => dialog.show(ProductDialogLineChart, data)
},
compare: {
props: {
icon: "isax isax-row-horizontal4", severity: "secondary", text: true, rounded: true,
},
click: () => router.push('/compare/' + data.id)
},
},
checkboxes: {
reminder: ["sms", "notif", "email"],
report: [
"incorrectName", "inappropriatePhoto", "incorrectSpecs", "incorrectDesc", "notOriginal", "duplicate",
]
},
sorts: [
"mostRelevant", "mostVisited", "newest", "bestselling", "cheapest", "mostExpensive", "buyersSuggestion",
]
})
return confg;
}
+40
View File
@@ -0,0 +1,40 @@
export default () => {
const { t } = inject('service')
return reactive({
closeBtn: {
props: {
icon: 'isax isax-close-circle',
severity: 'secondary',
rounded: true,
text: true
}
},
fields: {
title: {
props: {
placeholder: ''
},
is: 'InputText',
label: t('commentTitle'),
},
positive: {
props: {
// separator: ',',
placeholder: '',
max: 10
},
is: 'Chips',
label: t('positivePoints'),
},
negative: {
props: {
// separator: ',',
placeholder: '',
max: 10
},
is: 'Chips',
label: t('negativePoints'),
}
}
})
}
+35
View File
@@ -0,0 +1,35 @@
import SearchDialogFilters from '../components/search/dialog/Filters.vue'
import SearchDialogSort from '../components/search/dialog/Sort.vue'
export default () => {
const { dialog, t } = inject('service')
return reactive({
btns: {
toolbar: {
filter: {
props: {
label: t('filter'),
icon: "isax isax-setting-5",
iconPos: "right",
link: true
},
click: () => dialog.show(SearchDialogFilters)
},
sort: {
props: {
label: t('ordering'),
icon: "isax isax-sort",
iconPos: "right",
link: true
},
click: () => dialog.show(SearchDialogSort)
},
},
close: {
props: { icon: 'isax isax-close-circle', severity: 'secondary', rounded: true, text: true }
},
},
sorts: ['mostRelevant', 'mostVisited', 'newest', 'bestselling', 'cheapest', 'mostExpensive', 'buyersSuggestion']
})
}
+23
View File
@@ -0,0 +1,23 @@
export default () => {
const { t } = inject('service')
return reactive({
btns: {
edit: {
props: {
label: t('editInformation'),
icon: "isax isax-edit-2",
iconPos: "right"
}
},
security: {
props: {
label: t('securityAndPassword'),
icon: "isax isax-shield-security2",
iconPos: "right"
}
}
},
items: ["userID", "accountType", "confirmToSales"]
})
}
+73
View File
@@ -0,0 +1,73 @@
import AppCalendar from '../components/app/Calendar.vue'
export default () => {
const { t } = useI18n()
return reactive({
btns: {
upload: {
props: {
outlined: true,
label: t("changeProfileImage"),
icon: "isax isax-camera",
iconPos: "right",
}
},
form: {
save: {
props: {
label: t("save"),
}
},
cancel: {
props: {
label: t("cancel"),
outlined: true,
}
},
}
},
fields: {
firstName: {
is: "InputText",
props: { placeholder: "" },
},
lastName: {
is: "InputText",
props: { placeholder: "" },
},
dateOfBirth: {
is: AppCalendar,
props: {
inputId: "dateOfBirth",placeholder: "",class: "isax isax-note5",
},
},
email: {
is: "InputText",
props: { placeholder: "", type: "email" },
},
nationalCode: {
is: "InputText",
props: { placeholder: "", type: "phone" },
},
phoneNumber: {
is: "InputText",
props: { placeholder: "", type: "phone" },
},
state: {
is: "Dropdown",
props: { placeholder: "", options: [], optionValue: 'name', optionLabel: 'name' },
},
city: {
is: "Dropdown",
props: { placeholder: '', options: []},
},
postCode: {
is: "InputNumber",
props: { placeholder: "", type: "phone", useGrouping: false },
},
address: {
is: "Textarea",
props: { placeholder: "" },
},
}
})
}
+6
View File
@@ -0,0 +1,6 @@
export default () => {
return reactive({
items: ["email", "confirmEmail", "city", "state", "address", "postCode", "phoneNumber", "confirmNumber", "dateOfBirth", "gender"]
})
}