@accounter/server 0.0.8-alpha-20251022144027-c9c7a4b309de8a72dfd0ec4f11e63713ad12878f → 0.0.8-alpha-20251023065832-9a9f37786b0e29dc8e6ea58ec9856bc043cc0e8a
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.
- package/CHANGELOG.md +33 -4
- package/dist/green-invoice-graphql/src/mesh-artifacts/index.d.ts +1 -1
- package/dist/server/src/__generated__/types.d.ts +6 -6
- package/dist/server/src/modules/financial-entities/resolvers/admin-businesses.resolver.js +7 -2
- package/dist/server/src/modules/financial-entities/resolvers/admin-businesses.resolver.js.map +1 -1
- package/dist/server/src/modules/financial-entities/typeDefs/admin-businesses.graphql.js +5 -5
- package/package.json +2 -2
- package/src/__generated__/types.ts +6 -6
- package/src/modules/financial-entities/resolvers/admin-businesses.resolver.ts +7 -2
- package/src/modules/financial-entities/typeDefs/admin-businesses.graphql.ts +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @accounter/server
|
|
2
2
|
|
|
3
|
-
## 0.0.8-alpha-
|
|
3
|
+
## 0.0.8-alpha-20251023065832-9a9f37786b0e29dc8e6ea58ec9856bc043cc0e8a
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
@@ -133,6 +133,12 @@
|
|
|
133
133
|
[`googleapis@164.1.0` ↗︎](https://www.npmjs.com/package/googleapis/v/164.1.0) (from `164.0.0`,
|
|
134
134
|
in `dependencies`)
|
|
135
135
|
|
|
136
|
+
- [#2595](https://github.com/Urigo/accounter-fullstack/pull/2595)
|
|
137
|
+
[`738c3d7`](https://github.com/Urigo/accounter-fullstack/commit/738c3d75046cbd3b6a091b3ede84f292ebf7e12c)
|
|
138
|
+
Thanks [@renovate](https://github.com/apps/renovate)! - dependencies updates:
|
|
139
|
+
- Updated dependency [`puppeteer@24.26.0` ↗︎](https://www.npmjs.com/package/puppeteer/v/24.26.0)
|
|
140
|
+
(from `24.25.0`, in `dependencies`)
|
|
141
|
+
|
|
136
142
|
- [#2597](https://github.com/Urigo/accounter-fullstack/pull/2597)
|
|
137
143
|
[`8750702`](https://github.com/Urigo/accounter-fullstack/commit/8750702fd33bbf1458cc5facd4508b562fe0a560)
|
|
138
144
|
Thanks [@renovate](https://github.com/apps/renovate)! - dependencies updates:
|
|
@@ -140,6 +146,12 @@
|
|
|
140
146
|
[`@ai-sdk/anthropic@2.0.35` ↗︎](https://www.npmjs.com/package/@ai-sdk/anthropic/v/2.0.35) (from
|
|
141
147
|
`2.0.34`, in `dependencies`)
|
|
142
148
|
|
|
149
|
+
- [#2605](https://github.com/Urigo/accounter-fullstack/pull/2605)
|
|
150
|
+
[`863a592`](https://github.com/Urigo/accounter-fullstack/commit/863a592f83b480a82156c829914b7e7a270a3f96)
|
|
151
|
+
Thanks [@gilgardosh](https://github.com/gilgardosh)! - dependencies updates:
|
|
152
|
+
- Updated dependency [`puppeteer@24.26.0` ↗︎](https://www.npmjs.com/package/puppeteer/v/24.26.0)
|
|
153
|
+
(from `24.25.0`, in `dependencies`)
|
|
154
|
+
|
|
143
155
|
- [#2551](https://github.com/Urigo/accounter-fullstack/pull/2551)
|
|
144
156
|
[`14900d1`](https://github.com/Urigo/accounter-fullstack/commit/14900d10209272429118ff4bd2e52893c813170b)
|
|
145
157
|
Thanks [@gilgardosh](https://github.com/gilgardosh)! - - **Error Handling Standardization**: The
|
|
@@ -282,6 +294,23 @@
|
|
|
282
294
|
`documents.resolver.ts` and `green-invoice.helper.ts`, new document insertions explicitly set
|
|
283
295
|
`fileHash` to `null` where the hash is not generated at that specific point in the workflow.
|
|
284
296
|
|
|
297
|
+
- [#2605](https://github.com/Urigo/accounter-fullstack/pull/2605)
|
|
298
|
+
[`863a592`](https://github.com/Urigo/accounter-fullstack/commit/863a592f83b480a82156c829914b7e7a270a3f96)
|
|
299
|
+
Thanks [@gilgardosh](https://github.com/gilgardosh)! - - **New Admin Business Configuration Tab**:
|
|
300
|
+
Introduced a dedicated "Admin" tab within the business details page to manage administrative
|
|
301
|
+
financial information.
|
|
302
|
+
- **Frontend Component Development**: A new `AdminBusinessSection` React component was created,
|
|
303
|
+
featuring a form for various tax and registration details, with client-side validation using
|
|
304
|
+
`zod` and `react-hook-form`.
|
|
305
|
+
- **GraphQL API Extension**: New GraphQL types (`CreateAdminBusinessInput`,
|
|
306
|
+
`UpdateAdminBusinessInput`) and mutations (`createAdminBusiness`, `updateAdminBusiness`,
|
|
307
|
+
`deleteAdminBusiness`) were added to the backend to support the management of admin business
|
|
308
|
+
data.
|
|
309
|
+
- **Data Fetching and Update Logic**: A new `useUpdateAdminBusiness` hook was implemented on the
|
|
310
|
+
frontend to interact with the new GraphQL mutations, handling data submission and user feedback.
|
|
311
|
+
- **Backend Resolver Implementation**: Server-side resolvers were updated to expose administrative
|
|
312
|
+
business fields and handle the logic for fetching and updating this data.
|
|
313
|
+
|
|
285
314
|
- [#2561](https://github.com/Urigo/accounter-fullstack/pull/2561)
|
|
286
315
|
[`e853097`](https://github.com/Urigo/accounter-fullstack/commit/e853097bbe987be8292981c527ba49562bf2f28b)
|
|
287
316
|
Thanks [@gilgardosh](https://github.com/gilgardosh)! - - **Refactored Ledger Storage Helper**: The
|
|
@@ -317,9 +346,9 @@
|
|
|
317
346
|
[[`65e3c7f`](https://github.com/Urigo/accounter-fullstack/commit/65e3c7f01993eb4f41244a40feefefa08b31a4e6),
|
|
318
347
|
[`65e3c7f`](https://github.com/Urigo/accounter-fullstack/commit/65e3c7f01993eb4f41244a40feefefa08b31a4e6),
|
|
319
348
|
[`65e3c7f`](https://github.com/Urigo/accounter-fullstack/commit/65e3c7f01993eb4f41244a40feefefa08b31a4e6)]:
|
|
320
|
-
- @accounter/pcn874-generator@0.6.3-alpha-
|
|
321
|
-
- @accounter/shaam-uniform-format-generator@0.2.2-alpha-
|
|
322
|
-
- @accounter/shaam6111-generator@0.1.4-alpha-
|
|
349
|
+
- @accounter/pcn874-generator@0.6.3-alpha-20251023065832-9a9f37786b0e29dc8e6ea58ec9856bc043cc0e8a
|
|
350
|
+
- @accounter/shaam-uniform-format-generator@0.2.2-alpha-20251023065832-9a9f37786b0e29dc8e6ea58ec9856bc043cc0e8a
|
|
351
|
+
- @accounter/shaam6111-generator@0.1.4-alpha-20251023065832-9a9f37786b0e29dc8e6ea58ec9856bc043cc0e8a
|
|
323
352
|
|
|
324
353
|
## 0.0.7
|
|
325
354
|
|
|
@@ -4,8 +4,8 @@ import type { GetMeshOptions } from '@graphql-mesh/runtime';
|
|
|
4
4
|
import type { YamlConfig } from '@graphql-mesh/types';
|
|
5
5
|
import { MeshHTTPHandler } from '@graphql-mesh/http';
|
|
6
6
|
import { type ExecuteMeshFn, type SubscribeMeshFn, type MeshContext as BaseMeshContext, type MeshInstance } from '@graphql-mesh/runtime';
|
|
7
|
-
import type { GreenInvoiceNewTypes } from './sources/GreenInvoiceNew/types';
|
|
8
7
|
import type { GreenInvoiceTypes } from './sources/GreenInvoice/types';
|
|
8
|
+
import type { GreenInvoiceNewTypes } from './sources/GreenInvoiceNew/types';
|
|
9
9
|
export type Maybe<T> = T | null;
|
|
10
10
|
export type InputMaybe<T> = Maybe<T>;
|
|
11
11
|
export type Exact<T extends {
|
|
@@ -195,7 +195,7 @@ export type AdminBusiness = {
|
|
|
195
195
|
readonly id: Scalars['UUID']['output'];
|
|
196
196
|
readonly name: Scalars['String']['output'];
|
|
197
197
|
readonly nationalInsuranceEmployerId?: Maybe<Scalars['String']['output']>;
|
|
198
|
-
readonly registrationDate
|
|
198
|
+
readonly registrationDate: Scalars['TimelessDate']['output'];
|
|
199
199
|
readonly taxPrepaymentId?: Maybe<Scalars['String']['output']>;
|
|
200
200
|
};
|
|
201
201
|
/** defines a tag / category for charge arrangement */
|
|
@@ -1104,12 +1104,12 @@ export type Country = {
|
|
|
1104
1104
|
};
|
|
1105
1105
|
/** Input type for creating a new admin business. */
|
|
1106
1106
|
export type CreateAdminBusinessInput = {
|
|
1107
|
-
readonly advanceTaxRate
|
|
1107
|
+
readonly advanceTaxRate?: InputMaybe<Scalars['Float']['input']>;
|
|
1108
1108
|
readonly businessId: Scalars['UUID']['input'];
|
|
1109
|
-
readonly employerWithholdingTaxAccountNumber
|
|
1110
|
-
readonly nationalInsuranceEmployerId
|
|
1109
|
+
readonly employerWithholdingTaxAccountNumber?: InputMaybe<Scalars['String']['input']>;
|
|
1110
|
+
readonly nationalInsuranceEmployerId?: InputMaybe<Scalars['String']['input']>;
|
|
1111
1111
|
readonly registrationDate: Scalars['TimelessDate']['input'];
|
|
1112
|
-
readonly taxPrepaymentId
|
|
1112
|
+
readonly taxPrepaymentId?: InputMaybe<Scalars['String']['input']>;
|
|
1113
1113
|
};
|
|
1114
1114
|
/** input for creating a new contract */
|
|
1115
1115
|
export type CreateContractInput = {
|
|
@@ -4779,7 +4779,7 @@ export type AdminBusinessResolvers<ContextType = GraphQLModules.Context, ParentT
|
|
|
4779
4779
|
id?: Resolver<ResolversTypes['UUID'], ParentType, ContextType>;
|
|
4780
4780
|
name?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
|
4781
4781
|
nationalInsuranceEmployerId?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
4782
|
-
registrationDate?: Resolver<
|
|
4782
|
+
registrationDate?: Resolver<ResolversTypes['TimelessDate'], ParentType, ContextType>;
|
|
4783
4783
|
taxPrepaymentId?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
4784
4784
|
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
4785
4785
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GraphQLError } from 'graphql';
|
|
2
|
-
import {
|
|
2
|
+
import { dateToTimelessDateString } from '../../../shared/helpers/index.js';
|
|
3
3
|
import { AdminBusinessesProvider } from '../providers/admin-businesses.provider.js';
|
|
4
4
|
import { BusinessesProvider } from '../providers/businesses.provider.js';
|
|
5
5
|
export const adminBusinessesResolvers = {
|
|
@@ -38,7 +38,12 @@ export const adminBusinessesResolvers = {
|
|
|
38
38
|
taxPrepaymentId: admin => admin.tax_siduri_number_2022,
|
|
39
39
|
nationalInsuranceEmployerId: admin => admin.pinkas_social_security_2022,
|
|
40
40
|
advanceTaxRate: admin => admin.advance_tax_rate,
|
|
41
|
-
registrationDate: admin =>
|
|
41
|
+
registrationDate: admin => {
|
|
42
|
+
if (!admin.registration_date) {
|
|
43
|
+
throw new GraphQLError(`Admin business ID="${admin.id}" has no registration date`);
|
|
44
|
+
}
|
|
45
|
+
return dateToTimelessDateString(admin.registration_date);
|
|
46
|
+
},
|
|
42
47
|
},
|
|
43
48
|
LtdFinancialEntity: {
|
|
44
49
|
adminInfo: async (parentBusiness, _, { injector }) => {
|
package/dist/server/src/modules/financial-entities/resolvers/admin-businesses.resolver.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin-businesses.resolver.js","sourceRoot":"","sources":["../../../../../../src/modules/financial-entities/resolvers/admin-businesses.resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"admin-businesses.resolver.js","sourceRoot":"","sources":["../../../../../../src/modules/financial-entities/resolvers/admin-businesses.resolver.ts"],"names":[],"mappings":"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"}
|
|
@@ -23,16 +23,16 @@ export default gql `
|
|
|
23
23
|
taxPrepaymentId: String
|
|
24
24
|
nationalInsuranceEmployerId: String
|
|
25
25
|
advanceTaxRate: Float
|
|
26
|
-
registrationDate: TimelessDate
|
|
26
|
+
registrationDate: TimelessDate!
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
" Input type for creating a new admin business. "
|
|
30
30
|
input CreateAdminBusinessInput {
|
|
31
31
|
businessId: UUID!
|
|
32
|
-
employerWithholdingTaxAccountNumber: String
|
|
33
|
-
taxPrepaymentId: String
|
|
34
|
-
nationalInsuranceEmployerId: String
|
|
35
|
-
advanceTaxRate: Float
|
|
32
|
+
employerWithholdingTaxAccountNumber: String
|
|
33
|
+
taxPrepaymentId: String
|
|
34
|
+
nationalInsuranceEmployerId: String
|
|
35
|
+
advanceTaxRate: Float
|
|
36
36
|
registrationDate: TimelessDate!
|
|
37
37
|
}
|
|
38
38
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@accounter/server",
|
|
3
|
-
"version": "0.0.8-alpha-
|
|
3
|
+
"version": "0.0.8-alpha-20251023065832-9a9f37786b0e29dc8e6ea58ec9856bc043cc0e8a",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "",
|
|
6
6
|
"license": "MIT",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"node-cache": "5.1.2",
|
|
49
49
|
"node-xlsx": "0.24.0",
|
|
50
50
|
"pg": "8.16.3",
|
|
51
|
-
"puppeteer": "24.
|
|
51
|
+
"puppeteer": "24.26.0",
|
|
52
52
|
"reflect-metadata": "0.2.2",
|
|
53
53
|
"strip-indent": "4.1.1",
|
|
54
54
|
"zod": "4.1.12"
|
|
@@ -150,7 +150,7 @@ export type AdminBusiness = {
|
|
|
150
150
|
readonly id: Scalars['UUID']['output'];
|
|
151
151
|
readonly name: Scalars['String']['output'];
|
|
152
152
|
readonly nationalInsuranceEmployerId?: Maybe<Scalars['String']['output']>;
|
|
153
|
-
readonly registrationDate
|
|
153
|
+
readonly registrationDate: Scalars['TimelessDate']['output'];
|
|
154
154
|
readonly taxPrepaymentId?: Maybe<Scalars['String']['output']>;
|
|
155
155
|
};
|
|
156
156
|
|
|
@@ -1145,12 +1145,12 @@ export type Country = {
|
|
|
1145
1145
|
|
|
1146
1146
|
/** Input type for creating a new admin business. */
|
|
1147
1147
|
export type CreateAdminBusinessInput = {
|
|
1148
|
-
readonly advanceTaxRate
|
|
1148
|
+
readonly advanceTaxRate?: InputMaybe<Scalars['Float']['input']>;
|
|
1149
1149
|
readonly businessId: Scalars['UUID']['input'];
|
|
1150
|
-
readonly employerWithholdingTaxAccountNumber
|
|
1151
|
-
readonly nationalInsuranceEmployerId
|
|
1150
|
+
readonly employerWithholdingTaxAccountNumber?: InputMaybe<Scalars['String']['input']>;
|
|
1151
|
+
readonly nationalInsuranceEmployerId?: InputMaybe<Scalars['String']['input']>;
|
|
1152
1152
|
readonly registrationDate: Scalars['TimelessDate']['input'];
|
|
1153
|
-
readonly taxPrepaymentId
|
|
1153
|
+
readonly taxPrepaymentId?: InputMaybe<Scalars['String']['input']>;
|
|
1154
1154
|
};
|
|
1155
1155
|
|
|
1156
1156
|
/** input for creating a new contract */
|
|
@@ -5529,7 +5529,7 @@ export type AdminBusinessResolvers<ContextType = GraphQLModules.Context, ParentT
|
|
|
5529
5529
|
id?: Resolver<ResolversTypes['UUID'], ParentType, ContextType>;
|
|
5530
5530
|
name?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
|
5531
5531
|
nationalInsuranceEmployerId?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
5532
|
-
registrationDate?: Resolver<
|
|
5532
|
+
registrationDate?: Resolver<ResolversTypes['TimelessDate'], ParentType, ContextType>;
|
|
5533
5533
|
taxPrepaymentId?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
5534
5534
|
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
5535
5535
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GraphQLError } from 'graphql';
|
|
2
|
-
import {
|
|
2
|
+
import { dateToTimelessDateString } from '@shared/helpers';
|
|
3
3
|
import { AdminBusinessesProvider } from '../providers/admin-businesses.provider.js';
|
|
4
4
|
import { BusinessesProvider } from '../providers/businesses.provider.js';
|
|
5
5
|
import type { FinancialEntitiesModule } from '../types.js';
|
|
@@ -42,7 +42,12 @@ export const adminBusinessesResolvers: FinancialEntitiesModule.Resolvers = {
|
|
|
42
42
|
taxPrepaymentId: admin => admin.tax_siduri_number_2022,
|
|
43
43
|
nationalInsuranceEmployerId: admin => admin.pinkas_social_security_2022,
|
|
44
44
|
advanceTaxRate: admin => admin.advance_tax_rate,
|
|
45
|
-
registrationDate: admin =>
|
|
45
|
+
registrationDate: admin => {
|
|
46
|
+
if (!admin.registration_date) {
|
|
47
|
+
throw new GraphQLError(`Admin business ID="${admin.id}" has no registration date`);
|
|
48
|
+
}
|
|
49
|
+
return dateToTimelessDateString(admin.registration_date);
|
|
50
|
+
},
|
|
46
51
|
},
|
|
47
52
|
LtdFinancialEntity: {
|
|
48
53
|
adminInfo: async (parentBusiness, _, { injector }) => {
|
|
@@ -24,16 +24,16 @@ export default gql`
|
|
|
24
24
|
taxPrepaymentId: String
|
|
25
25
|
nationalInsuranceEmployerId: String
|
|
26
26
|
advanceTaxRate: Float
|
|
27
|
-
registrationDate: TimelessDate
|
|
27
|
+
registrationDate: TimelessDate!
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
" Input type for creating a new admin business. "
|
|
31
31
|
input CreateAdminBusinessInput {
|
|
32
32
|
businessId: UUID!
|
|
33
|
-
employerWithholdingTaxAccountNumber: String
|
|
34
|
-
taxPrepaymentId: String
|
|
35
|
-
nationalInsuranceEmployerId: String
|
|
36
|
-
advanceTaxRate: Float
|
|
33
|
+
employerWithholdingTaxAccountNumber: String
|
|
34
|
+
taxPrepaymentId: String
|
|
35
|
+
nationalInsuranceEmployerId: String
|
|
36
|
+
advanceTaxRate: Float
|
|
37
37
|
registrationDate: TimelessDate!
|
|
38
38
|
}
|
|
39
39
|
|