From 29904adf02d7965137c4af82e7cb1fee5a643a50 Mon Sep 17 00:00:00 2001 From: safavimohadeseh78 Date: Mon, 2 Nov 2026 13:24:02 +0330 Subject: [PATCH] fix(shayegan): save customer accounting codes and align the document table Shayegan was rejected as inactive when editing moshtari_code. The document list now uses the shared table format. Co-authored-by: Cursor --- src/api/shayegan.ts | 10 +- .../accounting/components/shayeganTable.vue | 250 ++++++++++++------ .../CustomerAccountingCodeModal.vue | 6 +- 3 files changed, 170 insertions(+), 96 deletions(-) diff --git a/src/api/shayegan.ts b/src/api/shayegan.ts index e37c316..71e369a 100644 --- a/src/api/shayegan.ts +++ b/src/api/shayegan.ts @@ -1,4 +1,5 @@ import useAxios from '@core/utils/useAxios' +import type { TableInput, TableOutput } from '@core/type/baseTable' export interface ShayeganRecord { id?: number | null @@ -25,13 +26,8 @@ export const shayeganHealth = async () => body?: unknown }>('/admin/shayegan/health') -export const shayeganTable = async (params: Record) => - await useAxios.post<{ - data: ShayeganRecord[] - total: number - current_page?: number - per_page?: number - }>('/admin/shayegan/table', params) +export const shayeganTable = async (params: TableInput) => + await useAxios.post>('/admin/shayegan/table', params) export const shayeganShow = async (id: number | string) => await useAxios.get(`/admin/shayegan/${id}`) diff --git a/src/pages/menuPages/accounting/components/shayeganTable.vue b/src/pages/menuPages/accounting/components/shayeganTable.vue index ae5bd3e..e1e298f 100644 --- a/src/pages/menuPages/accounting/components/shayeganTable.vue +++ b/src/pages/menuPages/accounting/components/shayeganTable.vue @@ -1,110 +1,182 @@