@accounter/client 0.0.8-alpha-20251023071148-6bed0891f04559f888e1e0d8bb275809dc36bf3b → 0.0.8-alpha-20251023071611-4357687c6963ad74c80f62140eb0de9252d7bca7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/CHANGELOG.md +16 -1
  2. package/dist/assets/{Checkbox-lfqFDKZM.js → Checkbox-iZ--iyJF.js} +2 -2
  3. package/dist/assets/{Progress-DvGsu87E.js → Progress-CSjfE5bV.js} +1 -1
  4. package/dist/assets/{Typography-BX4mj53o.js → Typography-D14P1nN1.js} +1 -1
  5. package/dist/assets/{accordion-lOk81yKP.js → accordion-CcwG2M8I.js} +1 -1
  6. package/dist/assets/accountant-approvals-3mWk2IJb.js +1 -0
  7. package/dist/assets/{all-charges-DhPxcK73.js → all-charges-kAC8rw9C.js} +1 -1
  8. package/dist/assets/{arrow-up-down-CFrneqND.js → arrow-up-down-BS_znu7y.js} +1 -1
  9. package/dist/assets/business-Cv0e_Q3p.js +42 -0
  10. package/dist/assets/{business-transactions-single-CJ5pLN-D.js → business-transactions-single-B23INPyA.js} +1 -1
  11. package/dist/assets/{business-trip-Jlc0bfXC.js → business-trip-c4pY18e_.js} +1 -1
  12. package/dist/assets/charges-filters-DaVBQ_jS.js +1 -0
  13. package/dist/assets/{charges-ledger-validation-Bln73m_U.js → charges-ledger-validation-DZtDlOTx.js} +1 -1
  14. package/dist/assets/{chart-Wut6cPCx.js → chart-BgPuhGqj.js} +1 -1
  15. package/dist/assets/{data-table-pagination-BnQGVnmE.js → data-table-pagination-P75qqcV4.js} +1 -1
  16. package/dist/assets/{editable-business-trip-CjJg13b0.js → editable-business-trip-80Bf0nf4.js} +2 -2
  17. package/dist/assets/{index-y8Z-aJKc.js → index-1yUzw9-e.js} +2 -2
  18. package/dist/assets/index-ASrM5c3z.js +1 -0
  19. package/dist/assets/{index-C2INIVq3.js → index-BIiK-vW-.js} +1 -1
  20. package/dist/assets/index-BUJZ6CG6.js +1 -0
  21. package/dist/assets/{index-BagyRbeI.js → index-BopVOgtm.js} +2 -2
  22. package/dist/assets/index-Bt1Iynf-.js +1 -0
  23. package/dist/assets/index-BtF8NkXw.js +1 -0
  24. package/dist/assets/index-Buu6jU2e.js +1 -0
  25. package/dist/assets/{index-BoSqeUi7.js → index-BwJkbwi9.js} +6 -6
  26. package/dist/assets/index-CNBPVFd1.js +1 -0
  27. package/dist/assets/index-Cca4zCek.js +1 -0
  28. package/dist/assets/index-CgVLV78R.js +1 -0
  29. package/dist/assets/index-CmRugx3-.js +1 -0
  30. package/dist/assets/index-CzzfC-dD.css +1 -0
  31. package/dist/assets/index-D-K_l8g8.js +9 -0
  32. package/dist/assets/{index-BX3VSsge.js → index-D0eVaZI5.js} +1 -1
  33. package/dist/assets/{index-CVz9TqoS.js → index-D3y74IdY.js} +2 -2
  34. package/dist/assets/{index-DquDHLbE.js → index-D7rFUnXc.js} +1 -1
  35. package/dist/assets/{index-DjSJrgv5.js → index-DUDlwA28.js} +2 -2
  36. package/dist/assets/index-DWdQvLZN.js +1 -0
  37. package/dist/assets/{index-Csqyxwgx.js → index-DfYVR_1G.js} +2 -2
  38. package/dist/assets/index-DmBjrSud.js +1 -0
  39. package/dist/assets/index-Ucx6U5YY.js +1 -0
  40. package/dist/assets/{index-CN7VPpiB.js → index-iLt1WIM9.js} +65 -65
  41. package/dist/assets/{index.es-D8leRAY2.js → index.es-VMf2fRct.js} +1 -1
  42. package/dist/assets/{issue-document-DKE0dzdE.js → issue-document-BustWthK.js} +1 -1
  43. package/dist/assets/login-page-DbBOFdaj.js +1 -0
  44. package/dist/assets/{missing-info-charges-CgMJ4Bu3.js → missing-info-charges-sf4ZGQoC.js} +1 -1
  45. package/dist/assets/page-not-found-CzE13z4R.js +1 -0
  46. package/dist/assets/{pencil-CUSCcyVn.js → pencil-1-tPx_Bq.js} +1 -1
  47. package/dist/assets/report-commentary-row-BqTwvfOv.js +1 -0
  48. package/dist/assets/save-CMGkGXCM.js +11 -0
  49. package/dist/assets/similar-charges-by-business-modal-Dj7iCQhJ.js +1 -0
  50. package/dist/assets/sub-3l-gAINS.js +1 -0
  51. package/dist/assets/subMonths-LVothVpu.js +1 -0
  52. package/dist/index.html +2 -2
  53. package/package.json +1 -1
  54. package/src/components/business/business-header.tsx +2 -21
  55. package/src/components/businesses/all-businesses-row.tsx +87 -0
  56. package/src/components/businesses/cells/hebrew-name.tsx +31 -0
  57. package/src/components/businesses/cells/index.ts +2 -0
  58. package/src/components/businesses/cells/name.tsx +31 -0
  59. package/src/components/businesses/index.tsx +36 -45
  60. package/src/components/common/forms/business-card.tsx +234 -0
  61. package/src/components/common/forms/index.ts +1 -0
  62. package/src/gql/gql.ts +30 -6
  63. package/src/gql/graphql.ts +30 -7
  64. package/src/providers/urql-client.ts +26 -0
  65. package/src/providers/urql.tsx +32 -0
  66. package/src/router/loaders/business-loader.ts +2 -4
  67. package/src/router/loaders/charge-loader.ts +2 -4
  68. package/dist/assets/accountant-approvals-DWLEu1Um.js +0 -1
  69. package/dist/assets/building-2-Bqvbwz7Q.js +0 -6
  70. package/dist/assets/business--eNnF4xF.js +0 -42
  71. package/dist/assets/business-header-DjutqTRC.js +0 -1
  72. package/dist/assets/charges-filters-C-H07qp1.js +0 -1
  73. package/dist/assets/index-BE5nnZYY.js +0 -9
  74. package/dist/assets/index-BQrSA2Kk.js +0 -1
  75. package/dist/assets/index-BkeJsHyM.js +0 -1
  76. package/dist/assets/index-BtAgm6J8.js +0 -1
  77. package/dist/assets/index-BwIQ8ifH.js +0 -1
  78. package/dist/assets/index-Bxlzprxi.js +0 -1
  79. package/dist/assets/index-C--YkrHw.js +0 -1
  80. package/dist/assets/index-CQXFj3Uj.css +0 -1
  81. package/dist/assets/index-CalcGztb.js +0 -1
  82. package/dist/assets/index-Dr2UkUOm.js +0 -1
  83. package/dist/assets/index-E2rO9Bsf.js +0 -1
  84. package/dist/assets/index-Ggixi4PP.js +0 -1
  85. package/dist/assets/index-WCosiqtQ.js +0 -1
  86. package/dist/assets/index-vsZbkVMv.js +0 -1
  87. package/dist/assets/login-page-BYwtRBMd.js +0 -1
  88. package/dist/assets/page-not-found-Cfte6bjZ.js +0 -1
  89. package/dist/assets/report-commentary-row-B-uxVnyO.js +0 -1
  90. package/dist/assets/save-qyt28nOG.js +0 -6
  91. package/dist/assets/sub-LLu8afpC.js +0 -1
  92. package/dist/assets/subMonths-C1UIPrOU.js +0 -1
@@ -1,18 +1,18 @@
1
1
  import { useCallback, useContext, useEffect, useState, type ReactElement } from 'react';
2
2
  import { Loader2, PanelTopClose, PanelTopOpen } from 'lucide-react';
3
- import { useNavigate } from 'react-router-dom';
4
3
  import { useQuery } from 'urql';
5
- import { Tooltip } from '@mantine/core';
6
- import { AllBusinessesForScreenDocument } from '../../gql/graphql.js';
4
+ import { Table, Tooltip } from '@mantine/core';
5
+ import {
6
+ AllBusinessesForScreenDocument,
7
+ type AllBusinessesForScreenQuery,
8
+ } from '../../gql/graphql.js';
7
9
  import { useUrlQuery } from '../../hooks/use-url-query.js';
8
10
  import { cn } from '../../lib/utils.js';
9
11
  import { FiltersContext } from '../../providers/filters-context.js';
10
- import { ROUTES } from '../../router/routes.js';
11
- import { BusinessHeader } from '../business/business-header.js';
12
12
  import { MergeBusinessesButton } from '../common/index.js';
13
13
  import { PageLayout } from '../layout/page-layout.js';
14
14
  import { Button } from '../ui/button.js';
15
- import { Checkbox } from '../ui/checkbox.js';
15
+ import { AllBusinessesRow } from './all-businesses-row.js';
16
16
  import { BusinessesFilters } from './businesses-filters.js';
17
17
 
18
18
  // eslint-disable-next-line @typescript-eslint/no-unused-expressions -- used by codegen
@@ -24,7 +24,7 @@ import { BusinessesFilters } from './businesses-filters.js';
24
24
  id
25
25
  name
26
26
  ... on LtdFinancialEntity {
27
- ...BusinessHeader
27
+ ...AllBusinessesRowFields
28
28
  }
29
29
  }
30
30
  pageInfo {
@@ -52,7 +52,6 @@ export const Businesses = (): ReactElement => {
52
52
  },
53
53
  });
54
54
 
55
- const navigate = useNavigate();
56
55
  const [mergeSelectedBusinesses, setMergeSelectedBusinesses] = useState<
57
56
  Array<{ id: string; onChange: () => void }>
58
57
  >([]);
@@ -128,43 +127,35 @@ export const Businesses = (): ReactElement => {
128
127
  <Loader2 className={cn('h-10 w-10 animate-spin mr-2')} />
129
128
  </div>
130
129
  ) : (
131
- <div className="space-y-2">
132
- {businesses.map(business => (
133
- <div
134
- key={business.id}
135
- className="group relative border rounded-lg hover:shadow-md transition-shadow"
136
- >
137
- <div className="flex items-center gap-3">
138
- <div className="pl-4 flex items-center">
139
- <Checkbox
140
- checked={selectedIds.has(business.id)}
141
- onCheckedChange={() => {
142
- toggleMergeBusiness(business.id, () => {});
143
- }}
144
- className="h-4 w-4 rounded border-gray-300 cursor-pointer"
145
- onClick={(e): void => e.stopPropagation()}
146
- />
147
- </div>
148
- <div
149
- role="button"
150
- tabIndex={0}
151
- className="flex-1 cursor-pointer"
152
- onClick={(): void => {
153
- navigate(ROUTES.BUSINESSES.DETAIL(business.id));
154
- }}
155
- onKeyDown={(e): void => {
156
- if (e.key === 'Enter' || e.key === ' ') {
157
- e.preventDefault();
158
- navigate(ROUTES.BUSINESSES.DETAIL(business.id));
159
- }
160
- }}
161
- >
162
- <BusinessHeader data={business} />
163
- </div>
164
- </div>
165
- </div>
166
- ))}
167
- </div>
130
+ <Table striped highlightOnHover>
131
+ <thead className="sticky top-0 z-20">
132
+ <tr className="px-10 py-10 title-font tracking-wider font-medium text-gray-900 text-sm bg-gray-100 rounded-tl rounded-bl">
133
+ <th>Name</th>
134
+ <th>Hebrew Name</th>
135
+ <th>More Info</th>
136
+ </tr>
137
+ </thead>
138
+ <tbody>
139
+ {businesses.map(business => (
140
+ <AllBusinessesRow
141
+ key={business.id}
142
+ data={
143
+ business as Extract<
144
+ NonNullable<AllBusinessesForScreenQuery['allBusinesses']>['nodes'][number],
145
+ { __typename: 'LtdFinancialEntity' }
146
+ >
147
+ }
148
+ isAllOpened={isAllOpened}
149
+ toggleMergeBusiness={
150
+ toggleMergeBusiness
151
+ ? (onChange: () => void): void => toggleMergeBusiness(business.id, onChange)
152
+ : undefined
153
+ }
154
+ isSelectedForMerge={selectedIds.has(business.id) ?? false}
155
+ />
156
+ ))}
157
+ </tbody>
158
+ </Table>
168
159
  )}
169
160
  </PageLayout>
170
161
  );
@@ -0,0 +1,234 @@
1
+ import { useContext, useEffect, useState, type ReactElement } from 'react';
2
+ import { useForm, type SubmitHandler } from 'react-hook-form';
3
+ import { useQuery, type UseQueryExecute } from 'urql';
4
+ import { Loader } from '@mantine/core';
5
+ import {
6
+ FetchBusinessDocument,
7
+ type AllBusinessesRowFieldsFragment,
8
+ type FetchBusinessQuery,
9
+ type UpdateBusinessInput,
10
+ } from '../../../gql/graphql.js';
11
+ import { relevantDataPicker, type MakeBoolean } from '../../../helpers/index.js';
12
+ import { useUpdateBusiness } from '../../../hooks/use-update-business.js';
13
+ import { UserContext } from '../../../providers/user-provider.js';
14
+ import { Form } from '../../ui/form.js';
15
+ import { CopyToClipboardButton, SimilarChargesByBusinessModal } from '../index.js';
16
+ import { ModifyBusinessFields } from './modify-business-fields.js';
17
+
18
+ // eslint-disable-next-line @typescript-eslint/no-unused-expressions -- used by codegen
19
+ /* GraphQL */ `
20
+ query FetchBusiness($id: UUID!) {
21
+ business(id: $id) {
22
+ __typename
23
+ id
24
+ ... on LtdFinancialEntity {
25
+ country
26
+ address
27
+ email
28
+ exemptDealer
29
+ governmentId
30
+ hebrewName
31
+ name
32
+ phoneNumber
33
+ sortCode {
34
+ id
35
+ key
36
+ name
37
+ }
38
+ taxCategory {
39
+ id
40
+ name
41
+ }
42
+ website
43
+ suggestions {
44
+ phrases
45
+ tags {
46
+ id
47
+ name
48
+ }
49
+ description
50
+ emails
51
+ emailListener {
52
+ internalEmailLinks
53
+ emailBody
54
+ attachments
55
+ }
56
+ }
57
+ optionalVAT
58
+ irsCode
59
+ pcn874RecordType
60
+ }
61
+ }
62
+ }
63
+ `;
64
+
65
+ interface Props {
66
+ businessID: string;
67
+ updateBusiness: React.Dispatch<React.SetStateAction<AllBusinessesRowFieldsFragment>>;
68
+ }
69
+
70
+ export function BusinessCard({ businessID, updateBusiness }: Props): ReactElement {
71
+ const [business, setBusiness] = useState<
72
+ Extract<FetchBusinessQuery['business'], { __typename: 'LtdFinancialEntity' }> | undefined
73
+ >(undefined);
74
+
75
+ // Form business data handle
76
+ const [{ data, fetching: businessFetching }, refetchBusiness] = useQuery({
77
+ query: FetchBusinessDocument,
78
+ variables: {
79
+ id: businessID,
80
+ },
81
+ });
82
+
83
+ useEffect(() => {
84
+ if (businessFetching) {
85
+ setBusiness(undefined);
86
+ } else if (data && data.business.__typename === 'LtdFinancialEntity') {
87
+ setBusiness(data.business);
88
+ }
89
+ }, [data, businessFetching]);
90
+
91
+ // on every business successful fetch, update the business in the parent component
92
+ useEffect(() => {
93
+ if (business) {
94
+ updateBusiness(business);
95
+ }
96
+ }, [business, updateBusiness]);
97
+
98
+ return (
99
+ <div className="flex flex-col gap-5">
100
+ {business ? (
101
+ <BusinessCardContent business={business} refetchBusiness={refetchBusiness} />
102
+ ) : businessFetching ? (
103
+ <Loader className="flex self-center my-5" color="dark" size="xl" variant="dots" />
104
+ ) : (
105
+ <p>Error fetching extended information for this business</p>
106
+ )}
107
+ </div>
108
+ );
109
+ }
110
+
111
+ interface ContentProps {
112
+ business: Extract<FetchBusinessQuery['business'], { __typename: 'LtdFinancialEntity' }>;
113
+ refetchBusiness: UseQueryExecute;
114
+ }
115
+
116
+ function BusinessCardContent({ business, refetchBusiness }: ContentProps): ReactElement {
117
+ const [fetching, setFetching] = useState<boolean>(false);
118
+ const [similarChargesOpen, setSimilarChargesOpen] = useState(false);
119
+ const [similarChargesData, setSimilarChargesData] = useState<
120
+ | {
121
+ tagIds?: { id: string }[];
122
+ description?: string;
123
+ }
124
+ | undefined
125
+ >(undefined);
126
+ const { userContext } = useContext(UserContext);
127
+
128
+ const { updateBusiness: updateDbBusiness, fetching: isBusinessLoading } = useUpdateBusiness();
129
+
130
+ // form management
131
+ const formManager = useForm<UpdateBusinessInput>({
132
+ defaultValues: {
133
+ ...business,
134
+ taxCategory: business.taxCategory?.id,
135
+ sortCode: business?.sortCode?.key,
136
+ irsCode: business?.irsCode,
137
+ },
138
+ });
139
+
140
+ const {
141
+ handleSubmit: handleBusinessSubmit,
142
+ formState: { dirtyFields: dirtyBusinessFields },
143
+ } = formManager;
144
+
145
+ const onBusinessSubmit: SubmitHandler<UpdateBusinessInput> = async data => {
146
+ if (!business || !userContext?.context.adminBusinessId) {
147
+ return;
148
+ }
149
+
150
+ const dataToUpdate = relevantDataPicker(data, dirtyBusinessFields as MakeBoolean<typeof data>);
151
+ if (dataToUpdate && Object.keys(dataToUpdate).length > 0) {
152
+ dataToUpdate.sortCode &&= parseInt(dataToUpdate.sortCode.toString());
153
+
154
+ if (dataToUpdate.suggestions?.tags) {
155
+ dataToUpdate.suggestions.tags = dataToUpdate.suggestions.tags.map(tag => ({ id: tag.id }));
156
+ }
157
+ if (dataToUpdate.suggestions?.phrases) {
158
+ dataToUpdate.suggestions.phrases = data.suggestions!.phrases!.map(phrase => phrase);
159
+ }
160
+ if (dataToUpdate.suggestions?.emails) {
161
+ dataToUpdate.suggestions.emails = data.suggestions!.emails!.map(email => email);
162
+ }
163
+ if (dataToUpdate.suggestions?.emailListener) {
164
+ dataToUpdate.suggestions.emailListener.attachments &&=
165
+ data.suggestions!.emailListener!.attachments!.map(type => type);
166
+ dataToUpdate.suggestions.emailListener.internalEmailLinks &&=
167
+ data.suggestions!.emailListener!.internalEmailLinks!.map(link => link);
168
+ }
169
+
170
+ await updateDbBusiness({
171
+ businessId: business.id,
172
+ ownerId: userContext.context.adminBusinessId,
173
+ fields: dataToUpdate,
174
+ });
175
+
176
+ if (dataToUpdate.suggestions?.tags?.length || dataToUpdate.suggestions?.description) {
177
+ setSimilarChargesData({
178
+ tagIds: dataToUpdate.suggestions?.tags?.map(t => ({ id: t.id })),
179
+ description: dataToUpdate.suggestions?.description ?? undefined,
180
+ });
181
+ setSimilarChargesOpen(true);
182
+ } else {
183
+ refetchBusiness();
184
+ }
185
+ }
186
+ };
187
+
188
+ return (
189
+ <>
190
+ {fetching && (
191
+ <Loader className="flex self-center my-5" color="dark" size="xl" variant="dots" />
192
+ )}
193
+ <div className="flex flex-row gap-5">
194
+ <Form {...formManager}>
195
+ <form onSubmit={handleBusinessSubmit(onBusinessSubmit)}>
196
+ <div className="flex flex-row mx-3 pt-3 sm:text-1xl gap-10">
197
+ <h1 className="sm:text-2xl font-small text-gray-900">Edit Business:</h1>
198
+ <div className="flex flex-row gap-2">
199
+ ID: {business.id}
200
+ <CopyToClipboardButton content={business.id} />
201
+ </div>
202
+ </div>
203
+ <div className="flex-row px-10 h-max justify-start block">
204
+ <ModifyBusinessFields
205
+ isInsert={false}
206
+ formManager={formManager}
207
+ setFetching={setFetching}
208
+ />
209
+ </div>
210
+ <div className="mt-10 mb-5 flex justify-center gap-5">
211
+ <button
212
+ type="submit"
213
+ onClick={(): (() => Promise<void>) => handleBusinessSubmit(onBusinessSubmit)}
214
+ className="mt-8 text-white bg-indigo-500 border-0 py-2 px-8 focus:outline-hidden hover:bg-indigo-600 rounded-sm text-lg"
215
+ disabled={isBusinessLoading || Object.keys(dirtyBusinessFields).length === 0}
216
+ >
217
+ Update
218
+ </button>
219
+ </div>
220
+ </form>
221
+ </Form>
222
+ </div>
223
+
224
+ <SimilarChargesByBusinessModal
225
+ businessId={business.id}
226
+ tagIds={similarChargesData?.tagIds}
227
+ description={similarChargesData?.description}
228
+ open={similarChargesOpen}
229
+ onOpenChange={setSimilarChargesOpen}
230
+ onClose={refetchBusiness}
231
+ />
232
+ </>
233
+ );
234
+ }
@@ -1,3 +1,4 @@
1
+ export * from './business-card.js';
1
2
  export * from './edit-charge.js';
2
3
  export * from './edit-document.js';
3
4
  export * from './edit-misc-expense.js';
package/src/gql/gql.ts CHANGED
@@ -22,7 +22,7 @@ type Documents = {
22
22
  "\n query EditableBusinessTrip($businessTripId: UUID!) {\n businessTrip(id: $businessTripId) {\n id\n ...BusinessTripReportHeaderFields\n ...BusinessTripReportAttendeesFields\n ...BusinessTripUncategorizedTransactionsFields\n ...BusinessTripReportFlightsFields\n ...BusinessTripReportAccommodationsFields\n ...BusinessTripReportTravelAndSubsistenceFields\n ...BusinessTripReportCarRentalFields\n ...BusinessTripReportOtherFields\n ...BusinessTripReportSummaryFields\n ... on BusinessTrip {\n uncategorizedTransactions {\n transaction {\n id\n }\n }\n }\n }\n }\n": typeof types.EditableBusinessTripDocument,
23
23
  "\n query BusinessTripsScreen {\n allBusinessTrips {\n id\n name\n dates {\n start\n }\n ...BusinessTripsRowFields\n }\n }\n": typeof types.BusinessTripsScreenDocument,
24
24
  "\n fragment BusinessAdminSection on Business {\n id\n ... on LtdFinancialEntity {\n adminInfo {\n id\n employerWithholdingTaxAccountNumber\n taxPrepaymentId\n nationalInsuranceEmployerId\n advanceTaxRate\n registrationDate\n }\n }\n }\n": typeof types.BusinessAdminSectionFragmentDoc,
25
- "\n fragment BusinessHeader on Business {\n __typename\n id\n name\n createdAt\n isActive\n ... on LtdFinancialEntity {\n governmentId\n adminInfo {\n id\n }\n clientInfo {\n id\n }\n }\n }\n": typeof types.BusinessHeaderFragmentDoc,
25
+ "\n fragment BusinessHeader on Business {\n __typename\n id\n name\n createdAt\n ... on LtdFinancialEntity {\n governmentId\n }\n }\n": typeof types.BusinessHeaderFragmentDoc,
26
26
  "\n query BusinessChargesSection($page: Int, $limit: Int, $filters: ChargeFilter) {\n allCharges(page: $page, limit: $limit, filters: $filters) {\n nodes {\n id\n ...ChargesTableFields\n }\n pageInfo {\n totalPages\n }\n }\n }\n": typeof types.BusinessChargesSectionDocument,
27
27
  "\n fragment BusinessConfigurationSection on Business {\n __typename\n id\n pcn874RecordType\n irsCode\n isActive\n ... on LtdFinancialEntity {\n optionalVAT\n exemptDealer\n isReceiptEnough\n isDocumentsOptional\n sortCode {\n id\n key\n defaultIrsCode\n }\n taxCategory {\n id\n }\n suggestions {\n phrases\n emails\n tags {\n id\n }\n description\n emailListener {\n internalEmailLinks\n emailBody\n attachments\n }\n }\n clientInfo {\n id\n }\n }\n }\n": typeof types.BusinessConfigurationSectionFragmentDoc,
28
28
  "\n fragment BusinessContactSection on Business {\n __typename\n id\n ... on LtdFinancialEntity {\n name\n hebrewName\n country\n governmentId\n address\n email\n # localAddress\n phoneNumber\n website\n clientInfo {\n id\n emails\n }\n }\n }\n": typeof types.BusinessContactSectionFragmentDoc,
@@ -30,7 +30,10 @@ type Documents = {
30
30
  "\n fragment BusinessPage on Business {\n id\n ... on LtdFinancialEntity {\n clientInfo {\n id\n }\n adminInfo {\n id\n }\n }\n ...ClientIntegrationsSection\n ...BusinessHeader\n ...BusinessContactSection\n ...BusinessConfigurationSection\n ...BusinessAdminSection\n }\n": typeof types.BusinessPageFragmentDoc,
31
31
  "\n fragment ClientIntegrationsSection on LtdFinancialEntity {\n id\n clientInfo {\n id\n greenInvoiceId\n hiveId\n }\n }\n": typeof types.ClientIntegrationsSectionFragmentDoc,
32
32
  "\n query ClientIntegrationsSectionGreenInvoice($clientId: UUID!) {\n greenInvoiceClient(clientId: $clientId) {\n id\n country\n emails\n name\n phone\n taxId\n address\n city\n zip\n fax\n mobile\n }\n }\n": typeof types.ClientIntegrationsSectionGreenInvoiceDocument,
33
- "\n query AllBusinessesForScreen($page: Int, $limit: Int, $name: String) {\n allBusinesses(page: $page, limit: $limit, name: $name) {\n nodes {\n __typename\n id\n name\n ... on LtdFinancialEntity {\n ...BusinessHeader\n }\n }\n pageInfo {\n totalPages\n }\n }\n }\n": typeof types.AllBusinessesForScreenDocument,
33
+ "\n fragment AllBusinessesRowFields on LtdFinancialEntity {\n id\n ...AllBusinessesNameFields\n ...AllBusinessesHebrewNameFields\n }\n": typeof types.AllBusinessesRowFieldsFragmentDoc,
34
+ "\n fragment AllBusinessesHebrewNameFields on LtdFinancialEntity {\n id\n hebrewName\n }\n": typeof types.AllBusinessesHebrewNameFieldsFragmentDoc,
35
+ "\n fragment AllBusinessesNameFields on LtdFinancialEntity {\n id\n name\n }\n": typeof types.AllBusinessesNameFieldsFragmentDoc,
36
+ "\n query AllBusinessesForScreen($page: Int, $limit: Int, $name: String) {\n allBusinesses(page: $page, limit: $limit, name: $name) {\n nodes {\n __typename\n id\n name\n ... on LtdFinancialEntity {\n ...AllBusinessesRowFields\n }\n }\n pageInfo {\n totalPages\n }\n }\n }\n": typeof types.AllBusinessesForScreenDocument,
34
37
  "\n query ChargesLedgerValidation($limit: Int, $filters: ChargeFilter) {\n chargesWithLedgerChanges(limit: $limit, filters: $filters) @stream {\n progress\n charge {\n id\n ...ChargesTableFields\n }\n }\n }\n": typeof types.ChargesLedgerValidationDocument,
35
38
  "\n fragment ChargesTableAccountantApprovalFields on Charge {\n id\n accountantApproval\n }\n": typeof types.ChargesTableAccountantApprovalFieldsFragmentDoc,
36
39
  "\n fragment ChargesTableAmountFields on Charge {\n __typename\n id\n totalAmount {\n raw\n formatted\n }\n ... on CreditcardBankCharge @defer {\n validCreditCardAmount\n }\n }\n": typeof types.ChargesTableAmountFieldsFragmentDoc,
@@ -88,6 +91,7 @@ type Documents = {
88
91
  "\n fragment DocumentsToMatchFields on Document {\n id\n __typename\n charge {\n id\n }\n image\n file\n documentType\n ... on FinancialDocument {\n creditor {\n id\n name\n }\n serialNumber\n date\n amount {\n raw\n formatted\n currency\n }\n }\n }\n": typeof types.DocumentsToMatchFieldsFragmentDoc,
89
92
  "\n query RecentBusinessIssuedDocuments($businessId: UUID!, $limit: Int) {\n recentDocumentsByBusiness(businessId: $businessId, limit: $limit) {\n id\n ... on FinancialDocument {\n issuedDocumentInfo {\n id\n status\n externalId\n }\n }\n ...TableDocumentsRowFields\n }\n }\n": typeof types.RecentBusinessIssuedDocumentsDocument,
90
93
  "\n query RecentIssuedDocumentsOfSameType($documentType: DocumentType!) {\n recentIssuedDocumentsByType(documentType: $documentType) {\n id\n ...TableDocumentsRowFields\n }\n }\n": typeof types.RecentIssuedDocumentsOfSameTypeDocument,
94
+ "\n query FetchBusiness($id: UUID!) {\n business(id: $id) {\n __typename\n id\n ... on LtdFinancialEntity {\n country\n address\n email\n exemptDealer\n governmentId\n hebrewName\n name\n phoneNumber\n sortCode {\n id\n key\n name\n }\n taxCategory {\n id\n name\n }\n website\n suggestions {\n phrases\n tags {\n id\n name\n }\n description\n emails\n emailListener {\n internalEmailLinks\n emailBody\n attachments\n }\n }\n optionalVAT\n irsCode\n pcn874RecordType\n }\n }\n }\n": typeof types.FetchBusinessDocument,
91
95
  "\n query EditDocument($documentId: UUID!) {\n documentById(documentId: $documentId) {\n id\n image\n file\n documentType\n __typename\n ... on FinancialDocument {\n vat {\n raw\n currency\n }\n serialNumber\n date\n amount {\n raw\n currency\n }\n debtor {\n id\n name\n }\n creditor {\n id\n name\n }\n vatReportDateOverride\n noVatAmount\n allocationNumber\n exchangeRateOverride\n }\n }\n }\n": typeof types.EditDocumentDocument,
92
96
  "\n fragment EditMiscExpenseFields on MiscExpense {\n id\n amount {\n raw\n currency\n }\n description\n invoiceDate\n valueDate\n creditor {\n id\n }\n debtor {\n id\n }\n }\n": typeof types.EditMiscExpenseFieldsFragmentDoc,
93
97
  "\n fragment EditTagFields on Tag {\n id\n name\n parent {\n id\n name\n }\n }\n": typeof types.EditTagFieldsFragmentDoc,
@@ -274,7 +278,7 @@ const documents: Documents = {
274
278
  "\n query EditableBusinessTrip($businessTripId: UUID!) {\n businessTrip(id: $businessTripId) {\n id\n ...BusinessTripReportHeaderFields\n ...BusinessTripReportAttendeesFields\n ...BusinessTripUncategorizedTransactionsFields\n ...BusinessTripReportFlightsFields\n ...BusinessTripReportAccommodationsFields\n ...BusinessTripReportTravelAndSubsistenceFields\n ...BusinessTripReportCarRentalFields\n ...BusinessTripReportOtherFields\n ...BusinessTripReportSummaryFields\n ... on BusinessTrip {\n uncategorizedTransactions {\n transaction {\n id\n }\n }\n }\n }\n }\n": types.EditableBusinessTripDocument,
275
279
  "\n query BusinessTripsScreen {\n allBusinessTrips {\n id\n name\n dates {\n start\n }\n ...BusinessTripsRowFields\n }\n }\n": types.BusinessTripsScreenDocument,
276
280
  "\n fragment BusinessAdminSection on Business {\n id\n ... on LtdFinancialEntity {\n adminInfo {\n id\n employerWithholdingTaxAccountNumber\n taxPrepaymentId\n nationalInsuranceEmployerId\n advanceTaxRate\n registrationDate\n }\n }\n }\n": types.BusinessAdminSectionFragmentDoc,
277
- "\n fragment BusinessHeader on Business {\n __typename\n id\n name\n createdAt\n isActive\n ... on LtdFinancialEntity {\n governmentId\n adminInfo {\n id\n }\n clientInfo {\n id\n }\n }\n }\n": types.BusinessHeaderFragmentDoc,
281
+ "\n fragment BusinessHeader on Business {\n __typename\n id\n name\n createdAt\n ... on LtdFinancialEntity {\n governmentId\n }\n }\n": types.BusinessHeaderFragmentDoc,
278
282
  "\n query BusinessChargesSection($page: Int, $limit: Int, $filters: ChargeFilter) {\n allCharges(page: $page, limit: $limit, filters: $filters) {\n nodes {\n id\n ...ChargesTableFields\n }\n pageInfo {\n totalPages\n }\n }\n }\n": types.BusinessChargesSectionDocument,
279
283
  "\n fragment BusinessConfigurationSection on Business {\n __typename\n id\n pcn874RecordType\n irsCode\n isActive\n ... on LtdFinancialEntity {\n optionalVAT\n exemptDealer\n isReceiptEnough\n isDocumentsOptional\n sortCode {\n id\n key\n defaultIrsCode\n }\n taxCategory {\n id\n }\n suggestions {\n phrases\n emails\n tags {\n id\n }\n description\n emailListener {\n internalEmailLinks\n emailBody\n attachments\n }\n }\n clientInfo {\n id\n }\n }\n }\n": types.BusinessConfigurationSectionFragmentDoc,
280
284
  "\n fragment BusinessContactSection on Business {\n __typename\n id\n ... on LtdFinancialEntity {\n name\n hebrewName\n country\n governmentId\n address\n email\n # localAddress\n phoneNumber\n website\n clientInfo {\n id\n emails\n }\n }\n }\n": types.BusinessContactSectionFragmentDoc,
@@ -282,7 +286,10 @@ const documents: Documents = {
282
286
  "\n fragment BusinessPage on Business {\n id\n ... on LtdFinancialEntity {\n clientInfo {\n id\n }\n adminInfo {\n id\n }\n }\n ...ClientIntegrationsSection\n ...BusinessHeader\n ...BusinessContactSection\n ...BusinessConfigurationSection\n ...BusinessAdminSection\n }\n": types.BusinessPageFragmentDoc,
283
287
  "\n fragment ClientIntegrationsSection on LtdFinancialEntity {\n id\n clientInfo {\n id\n greenInvoiceId\n hiveId\n }\n }\n": types.ClientIntegrationsSectionFragmentDoc,
284
288
  "\n query ClientIntegrationsSectionGreenInvoice($clientId: UUID!) {\n greenInvoiceClient(clientId: $clientId) {\n id\n country\n emails\n name\n phone\n taxId\n address\n city\n zip\n fax\n mobile\n }\n }\n": types.ClientIntegrationsSectionGreenInvoiceDocument,
285
- "\n query AllBusinessesForScreen($page: Int, $limit: Int, $name: String) {\n allBusinesses(page: $page, limit: $limit, name: $name) {\n nodes {\n __typename\n id\n name\n ... on LtdFinancialEntity {\n ...BusinessHeader\n }\n }\n pageInfo {\n totalPages\n }\n }\n }\n": types.AllBusinessesForScreenDocument,
289
+ "\n fragment AllBusinessesRowFields on LtdFinancialEntity {\n id\n ...AllBusinessesNameFields\n ...AllBusinessesHebrewNameFields\n }\n": types.AllBusinessesRowFieldsFragmentDoc,
290
+ "\n fragment AllBusinessesHebrewNameFields on LtdFinancialEntity {\n id\n hebrewName\n }\n": types.AllBusinessesHebrewNameFieldsFragmentDoc,
291
+ "\n fragment AllBusinessesNameFields on LtdFinancialEntity {\n id\n name\n }\n": types.AllBusinessesNameFieldsFragmentDoc,
292
+ "\n query AllBusinessesForScreen($page: Int, $limit: Int, $name: String) {\n allBusinesses(page: $page, limit: $limit, name: $name) {\n nodes {\n __typename\n id\n name\n ... on LtdFinancialEntity {\n ...AllBusinessesRowFields\n }\n }\n pageInfo {\n totalPages\n }\n }\n }\n": types.AllBusinessesForScreenDocument,
286
293
  "\n query ChargesLedgerValidation($limit: Int, $filters: ChargeFilter) {\n chargesWithLedgerChanges(limit: $limit, filters: $filters) @stream {\n progress\n charge {\n id\n ...ChargesTableFields\n }\n }\n }\n": types.ChargesLedgerValidationDocument,
287
294
  "\n fragment ChargesTableAccountantApprovalFields on Charge {\n id\n accountantApproval\n }\n": types.ChargesTableAccountantApprovalFieldsFragmentDoc,
288
295
  "\n fragment ChargesTableAmountFields on Charge {\n __typename\n id\n totalAmount {\n raw\n formatted\n }\n ... on CreditcardBankCharge @defer {\n validCreditCardAmount\n }\n }\n": types.ChargesTableAmountFieldsFragmentDoc,
@@ -340,6 +347,7 @@ const documents: Documents = {
340
347
  "\n fragment DocumentsToMatchFields on Document {\n id\n __typename\n charge {\n id\n }\n image\n file\n documentType\n ... on FinancialDocument {\n creditor {\n id\n name\n }\n serialNumber\n date\n amount {\n raw\n formatted\n currency\n }\n }\n }\n": types.DocumentsToMatchFieldsFragmentDoc,
341
348
  "\n query RecentBusinessIssuedDocuments($businessId: UUID!, $limit: Int) {\n recentDocumentsByBusiness(businessId: $businessId, limit: $limit) {\n id\n ... on FinancialDocument {\n issuedDocumentInfo {\n id\n status\n externalId\n }\n }\n ...TableDocumentsRowFields\n }\n }\n": types.RecentBusinessIssuedDocumentsDocument,
342
349
  "\n query RecentIssuedDocumentsOfSameType($documentType: DocumentType!) {\n recentIssuedDocumentsByType(documentType: $documentType) {\n id\n ...TableDocumentsRowFields\n }\n }\n": types.RecentIssuedDocumentsOfSameTypeDocument,
350
+ "\n query FetchBusiness($id: UUID!) {\n business(id: $id) {\n __typename\n id\n ... on LtdFinancialEntity {\n country\n address\n email\n exemptDealer\n governmentId\n hebrewName\n name\n phoneNumber\n sortCode {\n id\n key\n name\n }\n taxCategory {\n id\n name\n }\n website\n suggestions {\n phrases\n tags {\n id\n name\n }\n description\n emails\n emailListener {\n internalEmailLinks\n emailBody\n attachments\n }\n }\n optionalVAT\n irsCode\n pcn874RecordType\n }\n }\n }\n": types.FetchBusinessDocument,
343
351
  "\n query EditDocument($documentId: UUID!) {\n documentById(documentId: $documentId) {\n id\n image\n file\n documentType\n __typename\n ... on FinancialDocument {\n vat {\n raw\n currency\n }\n serialNumber\n date\n amount {\n raw\n currency\n }\n debtor {\n id\n name\n }\n creditor {\n id\n name\n }\n vatReportDateOverride\n noVatAmount\n allocationNumber\n exchangeRateOverride\n }\n }\n }\n": types.EditDocumentDocument,
344
352
  "\n fragment EditMiscExpenseFields on MiscExpense {\n id\n amount {\n raw\n currency\n }\n description\n invoiceDate\n valueDate\n creditor {\n id\n }\n debtor {\n id\n }\n }\n": types.EditMiscExpenseFieldsFragmentDoc,
345
353
  "\n fragment EditTagFields on Tag {\n id\n name\n parent {\n id\n name\n }\n }\n": types.EditTagFieldsFragmentDoc,
@@ -567,7 +575,7 @@ export function graphql(source: "\n fragment BusinessAdminSection on Business {
567
575
  /**
568
576
  * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
569
577
  */
570
- export function graphql(source: "\n fragment BusinessHeader on Business {\n __typename\n id\n name\n createdAt\n isActive\n ... on LtdFinancialEntity {\n governmentId\n adminInfo {\n id\n }\n clientInfo {\n id\n }\n }\n }\n"): (typeof documents)["\n fragment BusinessHeader on Business {\n __typename\n id\n name\n createdAt\n isActive\n ... on LtdFinancialEntity {\n governmentId\n adminInfo {\n id\n }\n clientInfo {\n id\n }\n }\n }\n"];
578
+ export function graphql(source: "\n fragment BusinessHeader on Business {\n __typename\n id\n name\n createdAt\n ... on LtdFinancialEntity {\n governmentId\n }\n }\n"): (typeof documents)["\n fragment BusinessHeader on Business {\n __typename\n id\n name\n createdAt\n ... on LtdFinancialEntity {\n governmentId\n }\n }\n"];
571
579
  /**
572
580
  * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
573
581
  */
@@ -599,7 +607,19 @@ export function graphql(source: "\n query ClientIntegrationsSectionGreenInvoice
599
607
  /**
600
608
  * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
601
609
  */
602
- export function graphql(source: "\n query AllBusinessesForScreen($page: Int, $limit: Int, $name: String) {\n allBusinesses(page: $page, limit: $limit, name: $name) {\n nodes {\n __typename\n id\n name\n ... on LtdFinancialEntity {\n ...BusinessHeader\n }\n }\n pageInfo {\n totalPages\n }\n }\n }\n"): (typeof documents)["\n query AllBusinessesForScreen($page: Int, $limit: Int, $name: String) {\n allBusinesses(page: $page, limit: $limit, name: $name) {\n nodes {\n __typename\n id\n name\n ... on LtdFinancialEntity {\n ...BusinessHeader\n }\n }\n pageInfo {\n totalPages\n }\n }\n }\n"];
610
+ export function graphql(source: "\n fragment AllBusinessesRowFields on LtdFinancialEntity {\n id\n ...AllBusinessesNameFields\n ...AllBusinessesHebrewNameFields\n }\n"): (typeof documents)["\n fragment AllBusinessesRowFields on LtdFinancialEntity {\n id\n ...AllBusinessesNameFields\n ...AllBusinessesHebrewNameFields\n }\n"];
611
+ /**
612
+ * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
613
+ */
614
+ export function graphql(source: "\n fragment AllBusinessesHebrewNameFields on LtdFinancialEntity {\n id\n hebrewName\n }\n"): (typeof documents)["\n fragment AllBusinessesHebrewNameFields on LtdFinancialEntity {\n id\n hebrewName\n }\n"];
615
+ /**
616
+ * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
617
+ */
618
+ export function graphql(source: "\n fragment AllBusinessesNameFields on LtdFinancialEntity {\n id\n name\n }\n"): (typeof documents)["\n fragment AllBusinessesNameFields on LtdFinancialEntity {\n id\n name\n }\n"];
619
+ /**
620
+ * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
621
+ */
622
+ export function graphql(source: "\n query AllBusinessesForScreen($page: Int, $limit: Int, $name: String) {\n allBusinesses(page: $page, limit: $limit, name: $name) {\n nodes {\n __typename\n id\n name\n ... on LtdFinancialEntity {\n ...AllBusinessesRowFields\n }\n }\n pageInfo {\n totalPages\n }\n }\n }\n"): (typeof documents)["\n query AllBusinessesForScreen($page: Int, $limit: Int, $name: String) {\n allBusinesses(page: $page, limit: $limit, name: $name) {\n nodes {\n __typename\n id\n name\n ... on LtdFinancialEntity {\n ...AllBusinessesRowFields\n }\n }\n pageInfo {\n totalPages\n }\n }\n }\n"];
603
623
  /**
604
624
  * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
605
625
  */
@@ -828,6 +848,10 @@ export function graphql(source: "\n query RecentBusinessIssuedDocuments($busine
828
848
  * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
829
849
  */
830
850
  export function graphql(source: "\n query RecentIssuedDocumentsOfSameType($documentType: DocumentType!) {\n recentIssuedDocumentsByType(documentType: $documentType) {\n id\n ...TableDocumentsRowFields\n }\n }\n"): (typeof documents)["\n query RecentIssuedDocumentsOfSameType($documentType: DocumentType!) {\n recentIssuedDocumentsByType(documentType: $documentType) {\n id\n ...TableDocumentsRowFields\n }\n }\n"];
851
+ /**
852
+ * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
853
+ */
854
+ export function graphql(source: "\n query FetchBusiness($id: UUID!) {\n business(id: $id) {\n __typename\n id\n ... on LtdFinancialEntity {\n country\n address\n email\n exemptDealer\n governmentId\n hebrewName\n name\n phoneNumber\n sortCode {\n id\n key\n name\n }\n taxCategory {\n id\n name\n }\n website\n suggestions {\n phrases\n tags {\n id\n name\n }\n description\n emails\n emailListener {\n internalEmailLinks\n emailBody\n attachments\n }\n }\n optionalVAT\n irsCode\n pcn874RecordType\n }\n }\n }\n"): (typeof documents)["\n query FetchBusiness($id: UUID!) {\n business(id: $id) {\n __typename\n id\n ... on LtdFinancialEntity {\n country\n address\n email\n exemptDealer\n governmentId\n hebrewName\n name\n phoneNumber\n sortCode {\n id\n key\n name\n }\n taxCategory {\n id\n name\n }\n website\n suggestions {\n phrases\n tags {\n id\n name\n }\n description\n emails\n emailListener {\n internalEmailLinks\n emailBody\n attachments\n }\n }\n optionalVAT\n irsCode\n pcn874RecordType\n }\n }\n }\n"];
831
855
  /**
832
856
  * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
833
857
  */