File tree Expand file tree Collapse file tree
packages/app/src/pages/admin Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -158,9 +158,8 @@ const lang = useLang()
158158
159159const route = useRoute ()
160160
161- const uuids = ref <string []>((route .params .uuids as string []) || undefined )
162161onBeforeRouteUpdate ((to ) => {
163- if (to .params .uuids && Array .isArray (to .params .ids )) {
162+ if (to .params .uuids && Array .isArray (to .params .uuids )) {
164163 uuids .value = to .params .uuids as string []
165164 } else {
166165 uuids .value = undefined
@@ -172,11 +171,17 @@ const {
172171 companyId,
173172 clientId,
174173 clientDetails,
174+ uuids,
175175 page,
176176 rowsPerPage,
177177 paid,
178178 refetch : execute
179179} = useAdminGetBillsQuery ()
180+
181+ if (route .params .uuids && Array .isArray (route .params .uuids )) {
182+ uuids .value = route .params .uuids as string []
183+ }
184+
180185const total = computed (() => invoices .value ?.at (0 )?.total || 0 )
181186
182187const { numberPrefixes, refetch : refetchNumberPrefixes } =
Original file line number Diff line number Diff line change @@ -160,9 +160,8 @@ const lang = useLang()
160160
161161const route = useRoute ()
162162
163- const uuids = ref <string []>((route .params .uuids as string []) || undefined )
164163onBeforeRouteUpdate ((to ) => {
165- if (to .params .uuids && Array .isArray (to .params .ids )) {
164+ if (to .params .uuids && Array .isArray (to .params .uuids )) {
166165 uuids .value = to .params .uuids as string []
167166 } else {
168167 uuids .value = undefined
@@ -177,8 +176,14 @@ const {
177176 invoiceStatus : status,
178177 page,
179178 rowsPerPage,
179+ uuids,
180180 refetch : execute
181181} = useAdminGetInvoicesQuery ()
182+
183+ if (route .params .uuids && Array .isArray (route .params .uuids )) {
184+ uuids .value = route .params .uuids as string []
185+ }
186+
182187const total = computed (() => invoices .value ?.at (0 )?.total || 0 )
183188
184189// const { data: invoices, execute } = useQuery('admin.getInvoices', {
Original file line number Diff line number Diff line change @@ -94,9 +94,8 @@ import {
9494
9595const route = useRoute ()
9696
97- const uuids = ref <string []>((route .params .uuids as string []) || undefined )
9897onBeforeRouteUpdate ((to ) => {
99- if (to .params .uuids && Array .isArray (to .params .ids )) {
98+ if (to .params .uuids && Array .isArray (to .params .uuids )) {
10099 uuids .value = to .params .uuids as string []
101100 } else {
102101 uuids .value = undefined
@@ -110,9 +109,14 @@ const {
110109 clientDetails,
111110 page,
112111 rowsPerPage,
112+ uuids,
113113 refetch : execute
114114} = useAdminGetReceiptsQuery ()
115115
116+ if (route .params .uuids && Array .isArray (route .params .uuids )) {
117+ uuids .value = route .params .uuids as string []
118+ }
119+
116120const total = computed (() => receipts .value ?.at (0 )?.total || 0 )
117121
118122const {
You can’t perform that action at this time.
0 commit comments