+
@if (pageTitle || showAdd || filter || showRefresh || moreActions) {
diff --git a/src/app/shared/constants/list-configs/account-list.const.ts b/src/app/shared/constants/list-configs/account-list.const.ts
new file mode 100644
index 0000000..3cf2277
--- /dev/null
+++ b/src/app/shared/constants/list-configs/account-list.const.ts
@@ -0,0 +1,28 @@
+import { IListConfig } from './list-config.model';
+
+export const accountListConfig: IListConfig = {
+ pageTitle: 'مدیریت حسابهای کاربری',
+ addNewCtaLabel: 'افزودن حساب',
+ emptyPlaceholderTitle: 'حسابی یافت نشد',
+ emptyPlaceholderDescription: 'برای افزودن حساب کاربری، روی دکمهٔ بالا کلیک کنید.',
+ columns: [
+ {
+ field: 'username',
+ header: 'نام کاربری',
+ type: 'nested',
+ nestedOption: { path: 'account.username' },
+ },
+ {
+ field: 'pos',
+ header: 'پایانه',
+ customDataModel(item: any) {
+ return `${item.pos.name} - ${item.pos.complex.name} - ${item.pos.complex.business_activity.name}`;
+ },
+ },
+ {
+ field: 'created_at',
+ header: 'تاریخ ایجاد',
+ type: 'date',
+ },
+ ],
+};
diff --git a/src/app/shared/constants/list-configs/business-activity-list.const.ts b/src/app/shared/constants/list-configs/business-activity-list.const.ts
new file mode 100644
index 0000000..2dff64f
--- /dev/null
+++ b/src/app/shared/constants/list-configs/business-activity-list.const.ts
@@ -0,0 +1,35 @@
+import { IListConfig } from './list-config.model';
+
+export const businessActivityListConfig: IListConfig = {
+ pageTitle: 'مدیریت کسب و کار',
+ addNewCtaLabel: 'افزودن کسب و کار',
+ emptyPlaceholderTitle: 'کسب و کاری یافت نشد',
+ emptyPlaceholderDescription: 'برای افزودن کسب و کار، روی دکمهٔ بالا کلیک کنید.',
+ columns: [
+ { field: 'name', header: 'عنوان' },
+ { field: 'guild', header: 'صنف', type: 'nested', nestedOption: { path: 'guild.name' } },
+ { field: 'economic_code', header: 'کد اقتصادی' },
+ {
+ field: 'license_info',
+ header: 'محدودیت کاربر',
+ customDataModel(item: any) {
+ const licenseInfo = item.license_info;
+ if (!licenseInfo) {
+ return 'بدون مجوز';
+ }
+ return `${licenseInfo.accounts_limit} کاربر`;
+ },
+ },
+ {
+ field: 'license_info',
+ header: 'انقضا مجوز',
+ type: 'nested',
+ nestedOption: { path: 'license_info.expires_at', type: 'date' },
+ },
+ {
+ field: 'created_at',
+ header: 'تاریخ ایجاد',
+ type: 'date',
+ },
+ ],
+};
diff --git a/src/app/shared/constants/list-configs/category-list.const.ts b/src/app/shared/constants/list-configs/category-list.const.ts
new file mode 100644
index 0000000..dbe0739
--- /dev/null
+++ b/src/app/shared/constants/list-configs/category-list.const.ts
@@ -0,0 +1,12 @@
+import { IListConfig } from './list-config.model';
+
+export const categoryListConfig: IListConfig = {
+ pageTitle: 'مدیریت دستهبندیهای کالا',
+ addNewCtaLabel: 'افزودن دستهبندی',
+ emptyPlaceholderTitle: 'دستهبندی یافت نشد',
+ emptyPlaceholderDescription: 'برای افزودن دستهبندی، روی دکمهٔ بالا کلیک کنید.',
+ columns: [
+ { field: 'image_url', header: 'تصویر', type: 'thumbnail' },
+ { field: 'name', header: 'عنوان' },
+ ],
+};
diff --git a/src/app/shared/constants/list-configs/complex-list.const.ts b/src/app/shared/constants/list-configs/complex-list.const.ts
new file mode 100644
index 0000000..398af0f
--- /dev/null
+++ b/src/app/shared/constants/list-configs/complex-list.const.ts
@@ -0,0 +1,17 @@
+import { IListConfig } from './list-config.model';
+
+export const complexListConfig: IListConfig = {
+ pageTitle: 'مدیریت شعب',
+ addNewCtaLabel: 'افزودن شعبه',
+ emptyPlaceholderTitle: 'شعبهای یافت نشد',
+ emptyPlaceholderDescription: 'برای افزودن شعبه، روی دکمهٔ بالا کلیک کنید.',
+ columns: [
+ { field: 'name', header: 'عنوان' },
+ { field: 'branch_code', header: 'کد شعبه' },
+ {
+ field: 'created_at',
+ header: 'تاریخ ایجاد',
+ type: 'date',
+ },
+ ],
+};
diff --git a/src/app/shared/constants/list-configs/consumer-list.const.ts b/src/app/shared/constants/list-configs/consumer-list.const.ts
new file mode 100644
index 0000000..5189102
--- /dev/null
+++ b/src/app/shared/constants/list-configs/consumer-list.const.ts
@@ -0,0 +1,35 @@
+import { IListConfig } from './list-config.model';
+
+export const consumerListConfig: IListConfig = {
+ pageTitle: 'مدیریت مشتریها',
+ addNewCtaLabel: 'افزودن مشتری',
+ emptyPlaceholderTitle: 'مشتریای یافت نشد',
+ emptyPlaceholderDescription: 'برای افزودن مشتری، روی دکمهٔ بالا کلیک کنید.',
+ columns: [
+ { field: 'name', header: 'عنوان' },
+ {
+ field: 'business_counts',
+ header: 'تعداد کسبوکارها',
+ customDataModel(item: any) {
+ return item.business_counts || 0;
+ },
+ },
+ {
+ field: 'partner',
+ header: 'ارایهدهنده',
+ type: 'nested',
+ nestedOption: { path: 'partner.name' },
+ },
+ {
+ field: 'status',
+ header: 'وضعیت',
+ type: 'nested',
+ nestedOption: { path: 'status.translate' },
+ },
+ {
+ field: 'created_at',
+ header: 'تاریخ ایجاد',
+ type: 'date',
+ },
+ ],
+};
diff --git a/src/app/shared/constants/list-configs/customer-list.const.ts b/src/app/shared/constants/list-configs/customer-list.const.ts
new file mode 100644
index 0000000..9af6ebb
--- /dev/null
+++ b/src/app/shared/constants/list-configs/customer-list.const.ts
@@ -0,0 +1,42 @@
+import { IListConfig } from './list-config.model';
+
+export const customerListConfig: IListConfig = {
+ pageTitle: 'مدیریت مشتریها',
+ addNewCtaLabel: 'افزودن مشتری',
+ emptyPlaceholderTitle: 'مشتریای یافت نشد',
+ emptyPlaceholderDescription: 'برای افزودن مشتری، روی دکمهٔ بالا کلیک کنید.',
+ columns: [
+ {
+ field: 'type',
+ header: 'نوع مشتری',
+ customDataModel(item: any) {
+ return item.type === 'LEGAL' ? 'حقوقی' : 'حقیقی';
+ },
+ },
+ {
+ field: 'name',
+ header: 'عنوان',
+ customDataModel(item: any) {
+ if (item.type === 'LEGAL') {
+ return item.legal?.company_name;
+ }
+ return `${item.individual?.first_name} ${item.individual?.last_name}`;
+ },
+ },
+ {
+ field: 'economic_code',
+ header: 'کد اقتصادی',
+ customDataModel(item: any) {
+ if (item.type === 'LEGAL') {
+ return item.legal?.economic_code;
+ }
+ return item.individual?.economic_code;
+ },
+ },
+ {
+ field: 'created_at',
+ header: 'تاریخ ایجاد',
+ type: 'date',
+ },
+ ],
+};
diff --git a/src/app/shared/constants/list-configs/device-brand-list.const.ts b/src/app/shared/constants/list-configs/device-brand-list.const.ts
new file mode 100644
index 0000000..79f8815
--- /dev/null
+++ b/src/app/shared/constants/list-configs/device-brand-list.const.ts
@@ -0,0 +1,16 @@
+import { IListConfig } from './list-config.model';
+
+export const deviceBrandListConfig: IListConfig = {
+ pageTitle: 'مدیریت برندهای دستگاه',
+ addNewCtaLabel: 'افزودن برند',
+ emptyPlaceholderTitle: 'برندی یافت نشد',
+ emptyPlaceholderDescription: 'برای افزودن برند دستگاه، روی دکمهٔ بالا کلیک کنید.',
+ columns: [
+ { field: 'name', header: 'عنوان' },
+ {
+ field: 'created_at',
+ header: 'تاریخ ایجاد',
+ type: 'date',
+ },
+ ],
+};
diff --git a/src/app/shared/constants/list-configs/device-list.const.ts b/src/app/shared/constants/list-configs/device-list.const.ts
new file mode 100644
index 0000000..6d2b1d0
--- /dev/null
+++ b/src/app/shared/constants/list-configs/device-list.const.ts
@@ -0,0 +1,17 @@
+import { IListConfig } from './list-config.model';
+
+export const deviceListConfig: IListConfig = {
+ pageTitle: 'مدیریت دستگاهها',
+ addNewCtaLabel: 'افزودن دستگاه',
+ emptyPlaceholderTitle: 'دستگاهای یافت نشد',
+ emptyPlaceholderDescription: 'برای افزودن دستگاه، روی دکمهٔ بالا کلیک کنید.',
+ columns: [
+ { field: 'name', header: 'عنوان' },
+ { field: 'brand', header: 'برند', type: 'nested', nestedOption: { path: 'brand.name' } },
+ {
+ field: 'created_at',
+ header: 'تاریخ ایجاد',
+ type: 'date',
+ },
+ ],
+};
diff --git a/src/app/shared/constants/list-configs/good-list.const.ts b/src/app/shared/constants/list-configs/good-list.const.ts
new file mode 100644
index 0000000..9c9d6e0
--- /dev/null
+++ b/src/app/shared/constants/list-configs/good-list.const.ts
@@ -0,0 +1,25 @@
+import { IListConfig } from './list-config.model';
+
+export const goodListConfig: IListConfig = {
+ pageTitle: 'مدیریت کالاها',
+ addNewCtaLabel: 'افزودن کالا',
+ emptyPlaceholderTitle: 'کالایی یافت نشد',
+ emptyPlaceholderDescription: 'برای افزودن کالای، روی دکمهٔ بالا کلیک کنید.',
+ columns: [
+ { field: 'image_url', header: 'تصویر', type: 'thumbnail' },
+ { field: 'name', header: 'عنوان' },
+ { field: 'sku', header: 'شناسه کالا', type: 'nested', nestedOption: { path: 'sku.code' } },
+ {
+ field: 'measure_unit',
+ header: 'واحد اندازهگیری',
+ type: 'nested',
+ nestedOption: { path: 'measure_unit.name' },
+ },
+ {
+ field: 'category',
+ header: 'دستهبندی',
+ type: 'nested',
+ nestedOption: { path: 'category.name' },
+ },
+ ],
+};
diff --git a/src/app/shared/constants/list-configs/index.ts b/src/app/shared/constants/list-configs/index.ts
new file mode 100644
index 0000000..544735c
--- /dev/null
+++ b/src/app/shared/constants/list-configs/index.ts
@@ -0,0 +1,20 @@
+export * from './account-list.const';
+export * from './business-activity-list.const';
+export * from './category-list.const';
+export * from './complex-list.const';
+export * from './consumer-list.const';
+export * from './device-brand-list.const';
+export * from './device-list.const';
+export * from './good-list.const';
+export * from './license-list.const';
+export * from './list-config.model';
+export * from './partner-account-list.const';
+export * from './partner-consumer-account-list.const';
+export * from './partner-customer-list.const';
+export * from './partner-list.const';
+export * from './pos-list.const';
+export * from './provider-list.const';
+export * from './sale-invoice-list.const';
+export * from './sku-list.const';
+export * from './superAdmin-consumer-account-list.const';
+export * from './user-list.const';
diff --git a/src/app/shared/constants/list-configs/license-list.const.ts b/src/app/shared/constants/list-configs/license-list.const.ts
new file mode 100644
index 0000000..9079a90
--- /dev/null
+++ b/src/app/shared/constants/list-configs/license-list.const.ts
@@ -0,0 +1,26 @@
+import { IListConfig } from './list-config.model';
+
+export const licenseListConfig: IListConfig = {
+ pageTitle: 'مدیریت لایسنسها',
+ addNewCtaLabel: 'افزودن لایسنس',
+ emptyPlaceholderTitle: 'لایسنسی یافت نشد',
+ emptyPlaceholderDescription: 'برای افزودن لایسنس، روی دکمهٔ بالا کلیک کنید.',
+ columns: [
+ {
+ field: 'consumer',
+ header: 'مشتری',
+ customDataModel(item: any) {
+ return `${item.consumer.first_name} ${item.consumer.last_name}`;
+ },
+ },
+ {
+ field: 'partner',
+ header: 'ارایه شده توسط',
+ customDataModel(item: any) {
+ return item.license?.charged_license_transaction?.partner?.name || 'برند نرمافزار';
+ },
+ },
+ { field: 'expires_at', header: 'تاریخ انقضا', type: 'date' },
+ { field: 'created_at', header: 'تاریخ ایجاد', type: 'date' },
+ ],
+};
diff --git a/src/app/shared/constants/list-configs/list-config.model.ts b/src/app/shared/constants/list-configs/list-config.model.ts
new file mode 100644
index 0000000..710d1f5
--- /dev/null
+++ b/src/app/shared/constants/list-configs/list-config.model.ts
@@ -0,0 +1,9 @@
+import { IColumn } from '@/shared/components/pageDataList/page-data-list.component';
+
+export interface IListConfig {
+ pageTitle: string;
+ addNewCtaLabel: string;
+ emptyPlaceholderTitle: string;
+ emptyPlaceholderDescription: string;
+ columns: IColumn[];
+}
diff --git a/src/app/shared/constants/list-configs/partner-account-list.const.ts b/src/app/shared/constants/list-configs/partner-account-list.const.ts
new file mode 100644
index 0000000..139ca34
--- /dev/null
+++ b/src/app/shared/constants/list-configs/partner-account-list.const.ts
@@ -0,0 +1,28 @@
+import { IListConfig } from './list-config.model';
+
+export const partnerAccountListConfig: IListConfig = {
+ pageTitle: 'مدیریت حسابهای کاربری',
+ addNewCtaLabel: 'افزودن حساب',
+ emptyPlaceholderTitle: 'حسابی یافت نشد',
+ emptyPlaceholderDescription: 'برای افزودن حساب کاربری، روی دکمهٔ بالا کلیک کنید.',
+ columns: [
+ {
+ field: 'username',
+ header: 'نام کاربری',
+ type: 'nested',
+ nestedOption: { path: 'account.username' },
+ },
+ { field: 'role', header: 'نقش' },
+ {
+ field: 'status',
+ header: 'وضعیت',
+ type: 'nested',
+ nestedOption: { path: 'account.status' },
+ },
+ {
+ field: 'created_at',
+ header: 'تاریخ ایجاد',
+ type: 'date',
+ },
+ ],
+};
diff --git a/src/app/shared/constants/list-configs/partner-consumer-account-list.const.ts b/src/app/shared/constants/list-configs/partner-consumer-account-list.const.ts
new file mode 100644
index 0000000..d453090
--- /dev/null
+++ b/src/app/shared/constants/list-configs/partner-consumer-account-list.const.ts
@@ -0,0 +1,34 @@
+import { IListConfig } from './list-config.model';
+
+export const partnerConsumerAccountListConfig: IListConfig = {
+ pageTitle: 'مدیریت حسابهای مشتری',
+ addNewCtaLabel: 'افزودن حساب',
+ emptyPlaceholderTitle: 'حسابی یافت نشد',
+ emptyPlaceholderDescription: 'برای افزودن حساب، روی دکمهٔ بالا کلیک کنید.',
+ columns: [
+ {
+ field: 'account',
+ header: 'نام کاربری',
+ type: 'nested',
+ nestedOption: { path: 'account.username' },
+ },
+ { field: 'role', header: 'نوع حساب', type: 'nested', nestedOption: { path: 'role.translate' } },
+ {
+ field: 'pos',
+ header: 'پایانه',
+ customDataModel(item: any) {
+ if (item.pos) {
+ return `${item.pos.name} (${item.pos.complex.name} - ${item.pos.complex.business_activity.name})`;
+ }
+ return '-';
+ },
+ },
+ {
+ field: 'status',
+ header: 'وضعیت',
+ type: 'nested',
+ nestedOption: { path: 'account.status.translate' },
+ variant: 'tag',
+ },
+ ],
+};
diff --git a/src/app/shared/constants/list-configs/partner-customer-list.const.ts b/src/app/shared/constants/list-configs/partner-customer-list.const.ts
new file mode 100644
index 0000000..dc86c5b
--- /dev/null
+++ b/src/app/shared/constants/list-configs/partner-customer-list.const.ts
@@ -0,0 +1,16 @@
+import { IListConfig } from './list-config.model';
+
+export const partnerCustomerListConfig: IListConfig = {
+ pageTitle: 'مدیریت مشتریان',
+ addNewCtaLabel: 'افزودن مشتری',
+ emptyPlaceholderTitle: 'مشتریای یافت نشد',
+ emptyPlaceholderDescription: 'برای افزودن مشتری، روی دکمهٔ بالا کلیک کنید.',
+ columns: [
+ { field: 'first_name', header: 'نام' },
+ {
+ field: 'created_at',
+ header: 'تاریخ ایجاد',
+ type: 'date',
+ },
+ ],
+};
diff --git a/src/app/shared/constants/list-configs/partner-list.const.ts b/src/app/shared/constants/list-configs/partner-list.const.ts
new file mode 100644
index 0000000..e22e6bb
--- /dev/null
+++ b/src/app/shared/constants/list-configs/partner-list.const.ts
@@ -0,0 +1,42 @@
+import { IListConfig } from './list-config.model';
+
+export const partnerListConfig: IListConfig = {
+ pageTitle: 'مدیریت ارایهدهندگان',
+ addNewCtaLabel: 'افزودن ارایهدهنده',
+ emptyPlaceholderTitle: 'ارایهدهندگانای یافت نشد',
+ emptyPlaceholderDescription: 'برای افزودن ارایهدهنده، روی دکمهٔ بالا کلیک کنید.',
+ columns: [
+ { field: 'name', header: 'عنوان' },
+ { field: 'code', header: 'کد' },
+ {
+ field: 'licenses',
+ header: 'تعداد لایسنسها',
+ customDataModel(item: any) {
+ return item.licenses || 0;
+ },
+ },
+ {
+ field: 'account_quota',
+ header: 'تعداد کاربرهای خریداری شده',
+ customDataModel(item: any) {
+ return item.account_quota || 0;
+ },
+ },
+ {
+ field: 'license_renew',
+ header: 'تعداد لایسنس تمدیدی',
+ customDataModel(item: any) {
+ return item.license_renew || 0;
+ },
+ },
+ {
+ field: 'status',
+ header: 'وضعیت',
+ type: 'nested',
+ variant: 'tag',
+ nestedOption: {
+ path: 'status.translate',
+ },
+ },
+ ],
+};
diff --git a/src/app/shared/constants/list-configs/pos-list.const.ts b/src/app/shared/constants/list-configs/pos-list.const.ts
new file mode 100644
index 0000000..0263c5d
--- /dev/null
+++ b/src/app/shared/constants/list-configs/pos-list.const.ts
@@ -0,0 +1,31 @@
+import { IListConfig } from './list-config.model';
+
+export const posListConfig: IListConfig = {
+ pageTitle: 'مدیریت پایانههای فروش',
+ addNewCtaLabel: 'افزودن پایانه',
+ emptyPlaceholderTitle: 'پایانهای یافت نشد',
+ emptyPlaceholderDescription: 'برای افزودن پایانه، روی دکمهٔ بالا کلیک کنید.',
+ columns: [
+ { field: 'name', header: 'عنوان' },
+ { field: 'serial_number', header: 'شماره سریال' },
+ { field: 'pos_type', header: 'نوع دستگاه' },
+ { field: 'device', header: 'دستگاه', type: 'nested', nestedOption: { path: 'device.name' } },
+ {
+ field: 'provider',
+ header: 'ارایهدهنده',
+ type: 'nested',
+ nestedOption: { path: 'provider.name' },
+ },
+ {
+ field: 'account',
+ header: 'کاربر',
+ type: 'nested',
+ nestedOption: { path: 'account.username' },
+ },
+ {
+ field: 'created_at',
+ header: 'تاریخ ایجاد',
+ type: 'date',
+ },
+ ],
+};
diff --git a/src/app/shared/constants/list-configs/provider-list.const.ts b/src/app/shared/constants/list-configs/provider-list.const.ts
new file mode 100644
index 0000000..bb5cdce
--- /dev/null
+++ b/src/app/shared/constants/list-configs/provider-list.const.ts
@@ -0,0 +1,16 @@
+import { IListConfig } from './list-config.model';
+
+export const providerListConfig: IListConfig = {
+ pageTitle: 'مدیریت تامینکنندگان',
+ addNewCtaLabel: 'افزودن تامینکننده',
+ emptyPlaceholderTitle: 'تامینکنندهای یافت نشد',
+ emptyPlaceholderDescription: 'برای افزودن تامینکننده، روی دکمهٔ بالا کلیک کنید.',
+ columns: [
+ { field: 'name', header: 'عنوان' },
+ {
+ field: 'created_at',
+ header: 'تاریخ ایجاد',
+ type: 'date',
+ },
+ ],
+};
diff --git a/src/app/shared/constants/list-configs/sale-invoice-list.const.ts b/src/app/shared/constants/list-configs/sale-invoice-list.const.ts
new file mode 100644
index 0000000..7a73eaa
--- /dev/null
+++ b/src/app/shared/constants/list-configs/sale-invoice-list.const.ts
@@ -0,0 +1,39 @@
+import { IListConfig } from './list-config.model';
+
+export const saleInvoiceListConfig: IListConfig = {
+ pageTitle: 'مدیریت فاکتورهای فروش',
+ addNewCtaLabel: 'افزودن فاکتور',
+ emptyPlaceholderTitle: 'فاکتوری یافت نشد',
+ emptyPlaceholderDescription: 'برای افزودن فاکتور، روی دکمهٔ بالا کلیک کنید.',
+ columns: [
+ { field: 'code', header: 'کد رهگیری' },
+ {
+ field: 'total_amount',
+ header: 'قیمت نهایی',
+ type: 'price',
+ },
+ {
+ field: 'pos',
+ header: 'پایانه',
+ customDataModel(item: any) {
+ return `${item.pos.name} (${item.pos.complex.name} - ${item.pos.complex.business_activity.name})`;
+ },
+ },
+ {
+ field: 'consumer_account',
+ header: 'ایجاد شده توسط',
+ type: 'nested',
+ nestedOption: { path: 'consumer_account.account.username' },
+ },
+ {
+ field: 'invoice_date',
+ header: 'تاریخ فاکتور',
+ type: 'date',
+ },
+ {
+ field: 'created_at',
+ header: 'تاریخ ایجاد',
+ type: 'date',
+ },
+ ],
+};
diff --git a/src/app/shared/constants/list-configs/sku-list.const.ts b/src/app/shared/constants/list-configs/sku-list.const.ts
new file mode 100644
index 0000000..e8b0c04
--- /dev/null
+++ b/src/app/shared/constants/list-configs/sku-list.const.ts
@@ -0,0 +1,13 @@
+import { IListConfig } from './list-config.model';
+
+export const skuListConfig: IListConfig = {
+ pageTitle: 'مدیریت شناسه کالاها',
+ addNewCtaLabel: 'افزودن شناسه کالا',
+ emptyPlaceholderTitle: 'شناسه کالایی یافت نشد',
+ emptyPlaceholderDescription: 'برای افزودن شناسه کالا، روی دکمهٔ بالا کلیک کنید.',
+ columns: [
+ { field: 'code', header: 'کد' },
+ { field: 'name', header: 'عنوان' },
+ { field: 'VAT', header: 'مالیات ارزش افزوده' },
+ ],
+};
diff --git a/src/app/shared/constants/list-configs/superAdmin-consumer-account-list.const.ts b/src/app/shared/constants/list-configs/superAdmin-consumer-account-list.const.ts
new file mode 100644
index 0000000..802b4ba
--- /dev/null
+++ b/src/app/shared/constants/list-configs/superAdmin-consumer-account-list.const.ts
@@ -0,0 +1,35 @@
+import { IListConfig } from './list-config.model';
+
+export const superAdminConsumerAccountListConfig: IListConfig = {
+ pageTitle: 'مدیریت حسابهای مشتری',
+ addNewCtaLabel: 'افزودن حساب',
+ emptyPlaceholderTitle: 'حسابی یافت نشد',
+ emptyPlaceholderDescription: 'برای افزودن حساب، روی دکمهٔ بالا کلیک کنید.',
+ columns: [
+ {
+ field: 'account',
+ header: 'نام کاربری',
+ type: 'nested',
+ nestedOption: { path: 'account.username' },
+ },
+ { field: 'role', header: 'نوع حساب', type: 'nested', nestedOption: { path: 'role.translate' } },
+ {
+ field: 'pos',
+ header: 'پایانه',
+ customDataModel(item: any) {
+ return `${item.pos.name} (${item.pos.complex.name} - ${item.pos.complex.business_activity.name})`;
+ },
+ },
+ {
+ field: 'status',
+ header: 'وضعیت',
+ type: 'nested',
+ nestedOption: { path: 'account.status.translate' },
+ },
+ {
+ field: 'created_at',
+ header: 'تاریخ ایجاد',
+ type: 'date',
+ },
+ ],
+};
diff --git a/src/app/shared/constants/list-configs/user-list.const.ts b/src/app/shared/constants/list-configs/user-list.const.ts
new file mode 100644
index 0000000..34b8329
--- /dev/null
+++ b/src/app/shared/constants/list-configs/user-list.const.ts
@@ -0,0 +1,18 @@
+import { IListConfig } from './list-config.model';
+
+export const userListConfig: IListConfig = {
+ pageTitle: 'مدیریت کاربران',
+ addNewCtaLabel: 'افزودن کاربر',
+ emptyPlaceholderTitle: 'کاربری یافت نشد',
+ emptyPlaceholderDescription: 'برای افزودن کاربر، روی دکمهٔ بالا کلیک کنید.',
+ columns: [
+ { field: 'fullname', header: 'نام' },
+ { field: 'mobile_number', header: 'شماره موبایل' },
+ { field: 'national_code', header: 'کد ملی' },
+ {
+ field: 'created_at',
+ header: 'تاریخ ایجاد',
+ type: 'date',
+ },
+ ],
+};
diff --git a/src/assets/constants/localStorageKeys.const.ts b/src/assets/constants/localStorageKeys.const.ts
index fd65074..68b2dcc 100644
--- a/src/assets/constants/localStorageKeys.const.ts
+++ b/src/assets/constants/localStorageKeys.const.ts
@@ -4,4 +4,5 @@ export enum LOCAL_STORAGE_KEYS {
USER_DATA = 'userData',
LAST_LOGIN_TIME = 'lastLoginTime',
LOGIN_ATTEMPTS = 'loginAttempts',
+ POS_CONFIG_PRINT = 'posConfigPrint',
}