@things-factory/quotation 10.1.124 → 10.1.128
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/dist-client/bootstrap.js +1 -7
- package/dist-client/bootstrap.js.map +1 -1
- package/dist-client/index.d.ts +2 -1
- package/dist-client/index.js +2 -1
- package/dist-client/index.js.map +1 -1
- package/dist-client/pages/quotation-editor.d.ts +43 -0
- package/dist-client/pages/quotation-editor.js +313 -0
- package/dist-client/pages/quotation-editor.js.map +1 -0
- package/dist-client/pages/quotation-list.d.ts +36 -0
- package/dist-client/pages/quotation-list.js +113 -0
- package/dist-client/pages/quotation-list.js.map +1 -0
- package/dist-client/quotation-attach.d.ts +16 -0
- package/dist-client/quotation-attach.js +8 -0
- package/dist-client/quotation-attach.js.map +1 -0
- package/dist-client/quotation-words.d.ts +1 -0
- package/dist-client/quotation-words.js +13 -0
- package/dist-client/quotation-words.js.map +1 -0
- package/dist-client/route.d.ts +1 -1
- package/dist-client/route.js +4 -4
- package/dist-client/route.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/index.d.ts +1 -0
- package/dist-server/index.js +1 -0
- package/dist-server/index.js.map +1 -1
- package/dist-server/service/index.d.ts +8 -3
- package/dist-server/service/index.js +9 -17
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/service/quotation/index.d.ts +8 -5
- package/dist-server/service/quotation/index.js +8 -6
- package/dist-server/service/quotation/index.js.map +1 -1
- package/dist-server/service/quotation/quotation-event-query.d.ts +9 -0
- package/dist-server/service/quotation/quotation-event-query.js +55 -0
- package/dist-server/service/quotation/quotation-event-query.js.map +1 -0
- package/dist-server/service/quotation/quotation-event.d.ts +22 -0
- package/dist-server/service/quotation/quotation-event.js +98 -0
- package/dist-server/service/quotation/quotation-event.js.map +1 -0
- package/dist-server/service/quotation/quotation-item-query.d.ts +8 -0
- package/dist-server/service/quotation/quotation-item-query.js +45 -0
- package/dist-server/service/quotation/quotation-item-query.js.map +1 -0
- package/dist-server/service/quotation/quotation-item.d.ts +18 -0
- package/dist-server/service/quotation/quotation-item.js +75 -0
- package/dist-server/service/quotation/quotation-item.js.map +1 -0
- package/dist-server/service/quotation/quotation-mutation.d.ts +7 -6
- package/dist-server/service/quotation/quotation-mutation.js +66 -140
- package/dist-server/service/quotation/quotation-mutation.js.map +1 -1
- package/dist-server/service/quotation/quotation-query.d.ts +10 -5
- package/dist-server/service/quotation/quotation-query.js +69 -41
- package/dist-server/service/quotation/quotation-query.js.map +1 -1
- package/dist-server/service/quotation/quotation-rules.d.ts +6 -0
- package/dist-server/service/quotation/quotation-rules.js +22 -0
- package/dist-server/service/quotation/quotation-rules.js.map +1 -0
- package/dist-server/service/quotation/quotation-service.d.ts +23 -0
- package/dist-server/service/quotation/quotation-service.js +114 -0
- package/dist-server/service/quotation/quotation-service.js.map +1 -0
- package/dist-server/service/quotation/quotation-type.d.ts +4 -18
- package/dist-server/service/quotation/quotation-type.js +9 -63
- package/dist-server/service/quotation/quotation-type.js.map +1 -1
- package/dist-server/service/quotation/quotation.d.ts +19 -11
- package/dist-server/service/quotation/quotation.js +41 -44
- package/dist-server/service/quotation/quotation.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +16 -6
- package/things-factory.config.js +2 -2
- package/translations/en.json +36 -1
- package/translations/ko.json +36 -1
- package/dist-client/actions/main.d.ts +0 -1
- package/dist-client/actions/main.js +0 -2
- package/dist-client/actions/main.js.map +0 -1
- package/dist-client/activities/activity-quotation-edit.d.ts +0 -14
- package/dist-client/activities/activity-quotation-edit.js +0 -87
- package/dist-client/activities/activity-quotation-edit.js.map +0 -1
- package/dist-client/activities/activity-quotation-view.d.ts +0 -14
- package/dist-client/activities/activity-quotation-view.js +0 -87
- package/dist-client/activities/activity-quotation-view.js.map +0 -1
- package/dist-client/pages/main.d.ts +0 -1
- package/dist-client/pages/main.js +0 -36
- package/dist-client/pages/main.js.map +0 -1
- package/dist-client/pages/quotation/quotation-importer.d.ts +0 -23
- package/dist-client/pages/quotation/quotation-importer.js +0 -93
- package/dist-client/pages/quotation/quotation-importer.js.map +0 -1
- package/dist-client/pages/quotation/quotation-list-page.d.ts +0 -55
- package/dist-client/pages/quotation/quotation-list-page.js +0 -262
- package/dist-client/pages/quotation/quotation-list-page.js.map +0 -1
- package/dist-client/reducers/main.d.ts +0 -6
- package/dist-client/reducers/main.js +0 -14
- package/dist-client/reducers/main.js.map +0 -1
- package/dist-server/activities/activity-quotation.d.ts +0 -42
- package/dist-server/activities/activity-quotation.js +0 -114
- package/dist-server/activities/activity-quotation.js.map +0 -1
- package/dist-server/activities/index.d.ts +0 -1
- package/dist-server/activities/index.js +0 -17
- package/dist-server/activities/index.js.map +0 -1
- package/dist-server/service/quotation/event-subscriber.d.ts +0 -7
- package/dist-server/service/quotation/event-subscriber.js +0 -21
- package/dist-server/service/quotation/event-subscriber.js.map +0 -1
- package/dist-server/service/quotation/quotation-history.d.ts +0 -25
- package/dist-server/service/quotation/quotation-history.js +0 -132
- package/dist-server/service/quotation/quotation-history.js.map +0 -1
package/dist-server/index.d.ts
CHANGED
package/dist-server/index.js
CHANGED
|
@@ -3,5 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./migrations"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./middlewares"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./service"), exports);
|
|
6
7
|
require("./routes");
|
|
7
8
|
//# sourceMappingURL=index.js.map
|
package/dist-server/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../server/index.ts"],"names":[],"mappings":";;;AAAA,uDAA4B;AAC5B,wDAA6B;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../server/index.ts"],"names":[],"mappings":";;;AAAA,uDAA4B;AAC5B,wDAA6B;AAC7B,oDAAyB;AAEzB,oBAAiB","sourcesContent":["export * from './migrations'\nexport * from './middlewares'\nexport * from './service'\n\nimport './routes'\n"]}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
export * from './quotation/quotation';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export * from './quotation/quotation-item';
|
|
3
|
+
export * from './quotation/quotation-event';
|
|
4
|
+
export * from './quotation/quotation-rules';
|
|
5
|
+
export * from './quotation/quotation-service';
|
|
6
|
+
export * from './quotation/quotation-type';
|
|
7
|
+
export declare const entities: (typeof import("./quotation/quotation-item").QuotationItem | typeof import("./quotation/quotation").Quotation | typeof import("./quotation/quotation-event").QuotationEvent)[];
|
|
8
|
+
export declare const subscribers: any[];
|
|
4
9
|
export declare const schema: {
|
|
5
|
-
resolverClasses: (typeof import("./quotation/quotation-query").
|
|
10
|
+
resolverClasses: (typeof import("./quotation/quotation-event-query").QuotationEventQuery | typeof import("./quotation/quotation-item-query").QuotationItemQuery | typeof import("./quotation/quotation-mutation").QuotationMutation | typeof import("./quotation/quotation-query").QuotationQuery)[];
|
|
6
11
|
};
|
|
@@ -2,22 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.schema = exports.subscribers = exports.entities = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
/* EXPORT ENTITY TYPES */
|
|
6
5
|
tslib_1.__exportStar(require("./quotation/quotation"), exports);
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
exports.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
];
|
|
17
|
-
exports.schema = {
|
|
18
|
-
resolverClasses: [
|
|
19
|
-
/* RESOLVER CLASSES */
|
|
20
|
-
...quotation_1.resolvers,
|
|
21
|
-
]
|
|
22
|
-
};
|
|
6
|
+
tslib_1.__exportStar(require("./quotation/quotation-item"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./quotation/quotation-event"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./quotation/quotation-rules"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./quotation/quotation-service"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./quotation/quotation-type"), exports);
|
|
11
|
+
const quotation = tslib_1.__importStar(require("./quotation"));
|
|
12
|
+
exports.entities = quotation.entities;
|
|
13
|
+
exports.subscribers = quotation.subscribers;
|
|
14
|
+
exports.schema = { resolverClasses: quotation.resolvers };
|
|
23
15
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/service/index.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/service/index.ts"],"names":[],"mappings":";;;;AAAA,gEAAqC;AACrC,qEAA0C;AAC1C,sEAA2C;AAC3C,sEAA2C;AAC3C,wEAA6C;AAC7C,qEAA0C;AAE1C,+DAAwC;AAE3B,QAAA,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAA;AAC7B,QAAA,WAAW,GAAG,SAAS,CAAC,WAAW,CAAA;AACnC,QAAA,MAAM,GAAG,EAAE,eAAe,EAAE,SAAS,CAAC,SAAS,EAAE,CAAA","sourcesContent":["export * from './quotation/quotation'\nexport * from './quotation/quotation-item'\nexport * from './quotation/quotation-event'\nexport * from './quotation/quotation-rules'\nexport * from './quotation/quotation-service'\nexport * from './quotation/quotation-type'\n\nimport * as quotation from './quotation'\n\nexport const entities = quotation.entities\nexport const subscribers = quotation.subscribers\nexport const schema = { resolverClasses: quotation.resolvers }\n"]}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { Quotation } from './quotation';
|
|
2
|
-
import {
|
|
2
|
+
import { QuotationEvent } from './quotation-event';
|
|
3
|
+
import { QuotationEventQuery } from './quotation-event-query';
|
|
4
|
+
import { QuotationItem } from './quotation-item';
|
|
5
|
+
import { QuotationItemQuery } from './quotation-item-query';
|
|
3
6
|
import { QuotationMutation } from './quotation-mutation';
|
|
4
|
-
import {
|
|
5
|
-
export declare const entities: (typeof Quotation)[];
|
|
6
|
-
export declare const resolvers: (typeof
|
|
7
|
-
export declare const subscribers:
|
|
7
|
+
import { QuotationQuery } from './quotation-query';
|
|
8
|
+
export declare const entities: (typeof QuotationItem | typeof Quotation | typeof QuotationEvent)[];
|
|
9
|
+
export declare const resolvers: (typeof QuotationEventQuery | typeof QuotationItemQuery | typeof QuotationMutation | typeof QuotationQuery)[];
|
|
10
|
+
export declare const subscribers: any[];
|
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.subscribers = exports.resolvers = exports.entities = void 0;
|
|
4
4
|
const quotation_1 = require("./quotation");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
5
|
+
const quotation_event_1 = require("./quotation-event");
|
|
6
|
+
const quotation_event_query_1 = require("./quotation-event-query");
|
|
7
|
+
const quotation_item_1 = require("./quotation-item");
|
|
8
|
+
const quotation_item_query_1 = require("./quotation-item-query");
|
|
7
9
|
const quotation_mutation_1 = require("./quotation-mutation");
|
|
8
|
-
const
|
|
9
|
-
exports.entities = [quotation_1.Quotation,
|
|
10
|
-
exports.resolvers = [quotation_query_1.QuotationQuery, quotation_mutation_1.QuotationMutation];
|
|
11
|
-
exports.subscribers = [
|
|
10
|
+
const quotation_query_1 = require("./quotation-query");
|
|
11
|
+
exports.entities = [quotation_1.Quotation, quotation_item_1.QuotationItem, quotation_event_1.QuotationEvent];
|
|
12
|
+
exports.resolvers = [quotation_query_1.QuotationQuery, quotation_mutation_1.QuotationMutation, quotation_item_query_1.QuotationItemQuery, quotation_event_query_1.QuotationEventQuery];
|
|
13
|
+
exports.subscribers = [];
|
|
12
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/quotation/index.ts"],"names":[],"mappings":";;;AAAA,2CAAuC;AACvC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/quotation/index.ts"],"names":[],"mappings":";;;AAAA,2CAAuC;AACvC,uDAAkD;AAClD,mEAA6D;AAC7D,qDAAgD;AAChD,iEAA2D;AAC3D,6DAAwD;AACxD,uDAAkD;AAErC,QAAA,QAAQ,GAAG,CAAC,qBAAS,EAAE,8BAAa,EAAE,gCAAc,CAAC,CAAA;AACrD,QAAA,SAAS,GAAG,CAAC,gCAAc,EAAE,sCAAiB,EAAE,yCAAkB,EAAE,2CAAmB,CAAC,CAAA;AACxF,QAAA,WAAW,GAAG,EAAE,CAAA","sourcesContent":["import { Quotation } from './quotation'\nimport { QuotationEvent } from './quotation-event'\nimport { QuotationEventQuery } from './quotation-event-query'\nimport { QuotationItem } from './quotation-item'\nimport { QuotationItemQuery } from './quotation-item-query'\nimport { QuotationMutation } from './quotation-mutation'\nimport { QuotationQuery } from './quotation-query'\n\nexport const entities = [Quotation, QuotationItem, QuotationEvent]\nexport const resolvers = [QuotationQuery, QuotationMutation, QuotationItemQuery, QuotationEventQuery]\nexport const subscribers = []\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { User } from '@things-factory/auth-base';
|
|
2
|
+
import { Domain } from '@things-factory/shell';
|
|
3
|
+
import { QuotationEvent } from './quotation-event';
|
|
4
|
+
export declare class QuotationEventQuery {
|
|
5
|
+
actor(row: QuotationEvent): User | Promise<User>;
|
|
6
|
+
domain(row: QuotationEvent): Domain | Promise<Domain>;
|
|
7
|
+
creator(row: QuotationEvent): User | Promise<User>;
|
|
8
|
+
updater(row: QuotationEvent): User | Promise<User>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.QuotationEventQuery = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const auth_base_1 = require("@things-factory/auth-base");
|
|
6
|
+
const shell_1 = require("@things-factory/shell");
|
|
7
|
+
const type_graphql_1 = require("type-graphql");
|
|
8
|
+
const quotation_event_1 = require("./quotation-event");
|
|
9
|
+
let QuotationEventQuery = class QuotationEventQuery {
|
|
10
|
+
actor(row) {
|
|
11
|
+
return row.actor ?? (row.actorId ? (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: row.actorId }) : undefined);
|
|
12
|
+
}
|
|
13
|
+
domain(row) {
|
|
14
|
+
return row.domain ?? (row.domainId ? (0, shell_1.getRepository)(shell_1.Domain).findOneBy({ id: row.domainId }) : undefined);
|
|
15
|
+
}
|
|
16
|
+
creator(row) {
|
|
17
|
+
return row.creator ?? (row.creatorId ? (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: row.creatorId }) : undefined);
|
|
18
|
+
}
|
|
19
|
+
updater(row) {
|
|
20
|
+
return row.updater ?? (row.updaterId ? (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: row.updaterId }) : undefined);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
exports.QuotationEventQuery = QuotationEventQuery;
|
|
24
|
+
tslib_1.__decorate([
|
|
25
|
+
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User, { nullable: true }),
|
|
26
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
27
|
+
tslib_1.__metadata("design:type", Function),
|
|
28
|
+
tslib_1.__metadata("design:paramtypes", [quotation_event_1.QuotationEvent]),
|
|
29
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
30
|
+
], QuotationEventQuery.prototype, "actor", null);
|
|
31
|
+
tslib_1.__decorate([
|
|
32
|
+
(0, type_graphql_1.FieldResolver)(type => shell_1.Domain, { nullable: true }),
|
|
33
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
34
|
+
tslib_1.__metadata("design:type", Function),
|
|
35
|
+
tslib_1.__metadata("design:paramtypes", [quotation_event_1.QuotationEvent]),
|
|
36
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
37
|
+
], QuotationEventQuery.prototype, "domain", null);
|
|
38
|
+
tslib_1.__decorate([
|
|
39
|
+
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User, { nullable: true }),
|
|
40
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
41
|
+
tslib_1.__metadata("design:type", Function),
|
|
42
|
+
tslib_1.__metadata("design:paramtypes", [quotation_event_1.QuotationEvent]),
|
|
43
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
44
|
+
], QuotationEventQuery.prototype, "creator", null);
|
|
45
|
+
tslib_1.__decorate([
|
|
46
|
+
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User, { nullable: true }),
|
|
47
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
48
|
+
tslib_1.__metadata("design:type", Function),
|
|
49
|
+
tslib_1.__metadata("design:paramtypes", [quotation_event_1.QuotationEvent]),
|
|
50
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
51
|
+
], QuotationEventQuery.prototype, "updater", null);
|
|
52
|
+
exports.QuotationEventQuery = QuotationEventQuery = tslib_1.__decorate([
|
|
53
|
+
(0, type_graphql_1.Resolver)(quotation_event_1.QuotationEvent)
|
|
54
|
+
], QuotationEventQuery);
|
|
55
|
+
//# sourceMappingURL=quotation-event-query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quotation-event-query.js","sourceRoot":"","sources":["../../../server/service/quotation/quotation-event-query.ts"],"names":[],"mappings":";;;;AAAA,yDAAgD;AAChD,iDAA6D;AAC7D,+CAA4D;AAE5D,uDAAkD;AAG3C,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAE9B,KAAK,CAAS,GAAmB;QAC/B,OAAO,GAAG,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,IAAA,qBAAa,EAAC,gBAAI,CAAC,C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GD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACvC,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAM,gCAAc;;kDAElC;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACvC,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAM,gCAAc;;kDAElC;8BAlBU,mBAAmB;IAD/B,IAAA,uBAAQ,EAAC,gCAAc,CAAC;GACZ,mBAAmB,CAmB/B","sourcesContent":["import { User } from '@things-factory/auth-base'\nimport { Domain, getRepository } from '@things-factory/shell'\nimport { FieldResolver, Resolver, Root } from 'type-graphql'\n\nimport { QuotationEvent } from './quotation-event'\n\n@Resolver(QuotationEvent)\nexport class QuotationEventQuery {\n @FieldResolver(type => User, { nullable: true })\n actor(@Root() row: QuotationEvent) {\n return row.actor ?? (row.actorId ? getRepository(User).findOneBy({ id: row.actorId }) : undefined)\n }\n @FieldResolver(type => Domain, { nullable: true })\n domain(@Root() row: QuotationEvent) {\n return row.domain ?? (row.domainId ? getRepository(Domain).findOneBy({ id: row.domainId }) : undefined)\n }\n\n @FieldResolver(type => User, { nullable: true })\n creator(@Root() row: QuotationEvent) {\n return row.creator ?? (row.creatorId ? getRepository(User).findOneBy({ id: row.creatorId }) : undefined)\n }\n\n @FieldResolver(type => User, { nullable: true })\n updater(@Root() row: QuotationEvent) {\n return row.updater ?? (row.updaterId ? getRepository(User).findOneBy({ id: row.updaterId }) : undefined)\n }\n}\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { User } from '@things-factory/auth-base';
|
|
2
|
+
import { Domain } from '@things-factory/shell';
|
|
3
|
+
import { Quotation } from './quotation';
|
|
4
|
+
export declare class QuotationEvent {
|
|
5
|
+
readonly id: string;
|
|
6
|
+
domain?: Domain;
|
|
7
|
+
domainId?: string;
|
|
8
|
+
quotation: Quotation;
|
|
9
|
+
quotationId: string;
|
|
10
|
+
action: string;
|
|
11
|
+
reason?: string;
|
|
12
|
+
snapshot: any;
|
|
13
|
+
actor?: User;
|
|
14
|
+
actorId?: string;
|
|
15
|
+
createdAt?: Date;
|
|
16
|
+
updatedAt?: Date;
|
|
17
|
+
deletedAt?: Date;
|
|
18
|
+
creator?: User;
|
|
19
|
+
creatorId?: string;
|
|
20
|
+
updater?: User;
|
|
21
|
+
updaterId?: string;
|
|
22
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.QuotationEvent = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const auth_base_1 = require("@things-factory/auth-base");
|
|
6
|
+
const shell_1 = require("@things-factory/shell");
|
|
7
|
+
const type_graphql_1 = require("type-graphql");
|
|
8
|
+
const typeorm_1 = require("typeorm");
|
|
9
|
+
const quotation_1 = require("./quotation");
|
|
10
|
+
let QuotationEvent = class QuotationEvent {
|
|
11
|
+
};
|
|
12
|
+
exports.QuotationEvent = QuotationEvent;
|
|
13
|
+
tslib_1.__decorate([
|
|
14
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
15
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
|
16
|
+
tslib_1.__metadata("design:type", String)
|
|
17
|
+
], QuotationEvent.prototype, "id", void 0);
|
|
18
|
+
tslib_1.__decorate([
|
|
19
|
+
(0, typeorm_1.ManyToOne)(type => shell_1.Domain),
|
|
20
|
+
(0, type_graphql_1.Field)(type => shell_1.Domain, { nullable: true }),
|
|
21
|
+
tslib_1.__metadata("design:type", shell_1.Domain)
|
|
22
|
+
], QuotationEvent.prototype, "domain", void 0);
|
|
23
|
+
tslib_1.__decorate([
|
|
24
|
+
(0, typeorm_1.RelationId)((event) => event.domain),
|
|
25
|
+
tslib_1.__metadata("design:type", String)
|
|
26
|
+
], QuotationEvent.prototype, "domainId", void 0);
|
|
27
|
+
tslib_1.__decorate([
|
|
28
|
+
(0, typeorm_1.ManyToOne)(type => quotation_1.Quotation, { nullable: false }),
|
|
29
|
+
tslib_1.__metadata("design:type", quotation_1.Quotation)
|
|
30
|
+
], QuotationEvent.prototype, "quotation", void 0);
|
|
31
|
+
tslib_1.__decorate([
|
|
32
|
+
(0, typeorm_1.RelationId)((event) => event.quotation),
|
|
33
|
+
(0, type_graphql_1.Field)({ description: 'The quotation the event happened to' }),
|
|
34
|
+
tslib_1.__metadata("design:type", String)
|
|
35
|
+
], QuotationEvent.prototype, "quotationId", void 0);
|
|
36
|
+
tslib_1.__decorate([
|
|
37
|
+
(0, typeorm_1.Column)(),
|
|
38
|
+
(0, type_graphql_1.Field)({ description: 'What happened: CREATED, UPDATED, SENT, ACCEPTED, REJECTED, EXPIRED, REVISED or SUPERSEDED' }),
|
|
39
|
+
tslib_1.__metadata("design:type", String)
|
|
40
|
+
], QuotationEvent.prototype, "action", void 0);
|
|
41
|
+
tslib_1.__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
43
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Why, when the buyer declined' }),
|
|
44
|
+
tslib_1.__metadata("design:type", String)
|
|
45
|
+
], QuotationEvent.prototype, "reason", void 0);
|
|
46
|
+
tslib_1.__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({ type: 'simple-json' }),
|
|
48
|
+
(0, type_graphql_1.Field)(type => shell_1.ScalarObject, { description: 'The quotation as it stood after the action' }),
|
|
49
|
+
tslib_1.__metadata("design:type", Object)
|
|
50
|
+
], QuotationEvent.prototype, "snapshot", void 0);
|
|
51
|
+
tslib_1.__decorate([
|
|
52
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
53
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
|
|
54
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
55
|
+
], QuotationEvent.prototype, "actor", void 0);
|
|
56
|
+
tslib_1.__decorate([
|
|
57
|
+
(0, typeorm_1.RelationId)((event) => event.actor),
|
|
58
|
+
tslib_1.__metadata("design:type", String)
|
|
59
|
+
], QuotationEvent.prototype, "actorId", void 0);
|
|
60
|
+
tslib_1.__decorate([
|
|
61
|
+
(0, typeorm_1.CreateDateColumn)(),
|
|
62
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'When it happened' }),
|
|
63
|
+
tslib_1.__metadata("design:type", Date)
|
|
64
|
+
], QuotationEvent.prototype, "createdAt", void 0);
|
|
65
|
+
tslib_1.__decorate([
|
|
66
|
+
(0, typeorm_1.UpdateDateColumn)(),
|
|
67
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'When the row last changed' }),
|
|
68
|
+
tslib_1.__metadata("design:type", Date)
|
|
69
|
+
], QuotationEvent.prototype, "updatedAt", void 0);
|
|
70
|
+
tslib_1.__decorate([
|
|
71
|
+
(0, typeorm_1.DeleteDateColumn)(),
|
|
72
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'When the row was deleted' }),
|
|
73
|
+
tslib_1.__metadata("design:type", Date)
|
|
74
|
+
], QuotationEvent.prototype, "deletedAt", void 0);
|
|
75
|
+
tslib_1.__decorate([
|
|
76
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
77
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
|
|
78
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
79
|
+
], QuotationEvent.prototype, "creator", void 0);
|
|
80
|
+
tslib_1.__decorate([
|
|
81
|
+
(0, typeorm_1.RelationId)((event) => event.creator),
|
|
82
|
+
tslib_1.__metadata("design:type", String)
|
|
83
|
+
], QuotationEvent.prototype, "creatorId", void 0);
|
|
84
|
+
tslib_1.__decorate([
|
|
85
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
86
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
|
|
87
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
88
|
+
], QuotationEvent.prototype, "updater", void 0);
|
|
89
|
+
tslib_1.__decorate([
|
|
90
|
+
(0, typeorm_1.RelationId)((event) => event.updater),
|
|
91
|
+
tslib_1.__metadata("design:type", String)
|
|
92
|
+
], QuotationEvent.prototype, "updaterId", void 0);
|
|
93
|
+
exports.QuotationEvent = QuotationEvent = tslib_1.__decorate([
|
|
94
|
+
(0, typeorm_1.Entity)(),
|
|
95
|
+
(0, typeorm_1.Index)('ix_quotation_event_0', (event) => [event.quotation, event.createdAt]),
|
|
96
|
+
(0, type_graphql_1.ObjectType)({ description: 'Entity for QuotationEvent — what happened to a quotation, with the document as it then stood' })
|
|
97
|
+
], QuotationEvent);
|
|
98
|
+
//# sourceMappingURL=quotation-event.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quotation-event.js","sourceRoot":"","sources":["../../../server/service/quotation/quotation-event.ts"],"names":[],"mappings":";;;;AAAA,yDAAgD;AAChD,iDAA4D;AAC5D,+CAAoD;AACpD,qCAAoJ;AAEpJ,2CAAuC;AAKhC,IAAM,cAAc,GAApB,MAAM,cAAc;CA+D1B,CAAA;AA/DY,wCAAc;AAGhB;IAFR,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;0CACC;AAInB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IACzB,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACjC,cAAM;8CAAA;AAGf;IADC,IAAA,oBAAU,EAAC,CAAC,KAAqB,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC;;gDACn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import { Field, ID, ObjectType } from 'type-graphql'\nimport { Column, CreateDateColumn, DeleteDateColumn, Entity, Index, ManyToOne, PrimaryGeneratedColumn, RelationId, UpdateDateColumn } from 'typeorm'\n\nimport { Quotation } from './quotation'\n\n@Entity()\n@Index('ix_quotation_event_0', (event: QuotationEvent) => [event.quotation, event.createdAt])\n@ObjectType({ description: 'Entity for QuotationEvent — what happened to a quotation, with the document as it then stood' })\nexport class QuotationEvent {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field(type => Domain, { nullable: true })\n domain?: Domain\n\n @RelationId((event: QuotationEvent) => event.domain)\n domainId?: string\n\n @ManyToOne(type => Quotation, { nullable: false })\n quotation: Quotation\n\n @RelationId((event: QuotationEvent) => event.quotation)\n @Field({ description: 'The quotation the event happened to' })\n quotationId: string\n\n @Column()\n @Field({ description: 'What happened: CREATED, UPDATED, SENT, ACCEPTED, REJECTED, EXPIRED, REVISED or SUPERSEDED' })\n action: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Why, when the buyer declined' })\n reason?: string\n\n @Column({ type: 'simple-json' })\n @Field(type => ScalarObject, { description: 'The quotation as it stood after the action' })\n snapshot: any\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n actor?: User\n\n @RelationId((event: QuotationEvent) => event.actor)\n actorId?: string\n\n @CreateDateColumn()\n @Field({ nullable: true, description: 'When it happened' })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true, description: 'When the row last changed' })\n updatedAt?: Date\n\n @DeleteDateColumn()\n @Field({ nullable: true, description: 'When the row was deleted' })\n deletedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((event: QuotationEvent) => event.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((event: QuotationEvent) => event.updater)\n updaterId?: string\n}\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { User } from '@things-factory/auth-base';
|
|
2
|
+
import { Domain } from '@things-factory/shell';
|
|
3
|
+
import { QuotationItem } from './quotation-item';
|
|
4
|
+
export declare class QuotationItemQuery {
|
|
5
|
+
domain(row: QuotationItem): Domain | Promise<Domain>;
|
|
6
|
+
creator(row: QuotationItem): User | Promise<User>;
|
|
7
|
+
updater(row: QuotationItem): User | Promise<User>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.QuotationItemQuery = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const auth_base_1 = require("@things-factory/auth-base");
|
|
6
|
+
const shell_1 = require("@things-factory/shell");
|
|
7
|
+
const type_graphql_1 = require("type-graphql");
|
|
8
|
+
const quotation_item_1 = require("./quotation-item");
|
|
9
|
+
let QuotationItemQuery = class QuotationItemQuery {
|
|
10
|
+
domain(row) {
|
|
11
|
+
return row.domain ?? (row.domainId ? (0, shell_1.getRepository)(shell_1.Domain).findOneBy({ id: row.domainId }) : undefined);
|
|
12
|
+
}
|
|
13
|
+
creator(row) {
|
|
14
|
+
return row.creator ?? (row.creatorId ? (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: row.creatorId }) : undefined);
|
|
15
|
+
}
|
|
16
|
+
updater(row) {
|
|
17
|
+
return row.updater ?? (row.updaterId ? (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: row.updaterId }) : undefined);
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
exports.QuotationItemQuery = QuotationItemQuery;
|
|
21
|
+
tslib_1.__decorate([
|
|
22
|
+
(0, type_graphql_1.FieldResolver)(type => shell_1.Domain, { nullable: true }),
|
|
23
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
24
|
+
tslib_1.__metadata("design:type", Function),
|
|
25
|
+
tslib_1.__metadata("design:paramtypes", [quotation_item_1.QuotationItem]),
|
|
26
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
27
|
+
], QuotationItemQuery.prototype, "domain", null);
|
|
28
|
+
tslib_1.__decorate([
|
|
29
|
+
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User, { nullable: true }),
|
|
30
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
31
|
+
tslib_1.__metadata("design:type", Function),
|
|
32
|
+
tslib_1.__metadata("design:paramtypes", [quotation_item_1.QuotationItem]),
|
|
33
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
34
|
+
], QuotationItemQuery.prototype, "creator", null);
|
|
35
|
+
tslib_1.__decorate([
|
|
36
|
+
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User, { nullable: true }),
|
|
37
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
38
|
+
tslib_1.__metadata("design:type", Function),
|
|
39
|
+
tslib_1.__metadata("design:paramtypes", [quotation_item_1.QuotationItem]),
|
|
40
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
41
|
+
], QuotationItemQuery.prototype, "updater", null);
|
|
42
|
+
exports.QuotationItemQuery = QuotationItemQuery = tslib_1.__decorate([
|
|
43
|
+
(0, type_graphql_1.Resolver)(quotation_item_1.QuotationItem)
|
|
44
|
+
], QuotationItemQuery);
|
|
45
|
+
//# sourceMappingURL=quotation-item-query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quotation-item-query.js","sourceRoot":"","sources":["../../../server/service/quotation/quotation-item-query.ts"],"names":[],"mappings":";;;;AAAA,yDAAgD;AAChD,iDAA6D;AAC7D,+CAA4D;AAE5D,qDAAgD;AAGzC,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAG7B,MAAM,CAAS,GAAkB;QAC/B,OAAO,GAAG,CAAC,MAAM,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAA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Aa,CAAC;GACX,kBAAkB,CAgB9B","sourcesContent":["import { User } from '@things-factory/auth-base'\nimport { Domain, getRepository } from '@things-factory/shell'\nimport { FieldResolver, Resolver, Root } from 'type-graphql'\n\nimport { QuotationItem } from './quotation-item'\n\n@Resolver(QuotationItem)\nexport class QuotationItemQuery {\n\n @FieldResolver(type => Domain, { nullable: true })\n domain(@Root() row: QuotationItem) {\n return row.domain ?? (row.domainId ? getRepository(Domain).findOneBy({ id: row.domainId }) : undefined)\n }\n\n @FieldResolver(type => User, { nullable: true })\n creator(@Root() row: QuotationItem) {\n return row.creator ?? (row.creatorId ? getRepository(User).findOneBy({ id: row.creatorId }) : undefined)\n }\n\n @FieldResolver(type => User, { nullable: true })\n updater(@Root() row: QuotationItem) {\n return row.updater ?? (row.updaterId ? getRepository(User).findOneBy({ id: row.updaterId }) : undefined)\n }\n}\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { User } from '@things-factory/auth-base';
|
|
2
|
+
import { CommercialLine } from '@things-factory/invoice';
|
|
3
|
+
import { Domain } from '@things-factory/shell';
|
|
4
|
+
import { Quotation } from './quotation';
|
|
5
|
+
export declare class QuotationItem extends CommercialLine {
|
|
6
|
+
readonly id: string;
|
|
7
|
+
domain?: Domain;
|
|
8
|
+
domainId?: string;
|
|
9
|
+
quotation: Quotation;
|
|
10
|
+
quotationId: string;
|
|
11
|
+
createdAt?: Date;
|
|
12
|
+
updatedAt?: Date;
|
|
13
|
+
deletedAt?: Date;
|
|
14
|
+
creator?: User;
|
|
15
|
+
creatorId?: string;
|
|
16
|
+
updater?: User;
|
|
17
|
+
updaterId?: string;
|
|
18
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.QuotationItem = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const auth_base_1 = require("@things-factory/auth-base");
|
|
6
|
+
const invoice_1 = require("@things-factory/invoice");
|
|
7
|
+
const shell_1 = require("@things-factory/shell");
|
|
8
|
+
const type_graphql_1 = require("type-graphql");
|
|
9
|
+
const typeorm_1 = require("typeorm");
|
|
10
|
+
const quotation_1 = require("./quotation");
|
|
11
|
+
let QuotationItem = class QuotationItem extends invoice_1.CommercialLine {
|
|
12
|
+
};
|
|
13
|
+
exports.QuotationItem = QuotationItem;
|
|
14
|
+
tslib_1.__decorate([
|
|
15
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
16
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
|
17
|
+
tslib_1.__metadata("design:type", String)
|
|
18
|
+
], QuotationItem.prototype, "id", void 0);
|
|
19
|
+
tslib_1.__decorate([
|
|
20
|
+
(0, typeorm_1.ManyToOne)(type => shell_1.Domain),
|
|
21
|
+
(0, type_graphql_1.Field)(type => shell_1.Domain, { nullable: true }),
|
|
22
|
+
tslib_1.__metadata("design:type", shell_1.Domain)
|
|
23
|
+
], QuotationItem.prototype, "domain", void 0);
|
|
24
|
+
tslib_1.__decorate([
|
|
25
|
+
(0, typeorm_1.RelationId)((item) => item.domain),
|
|
26
|
+
tslib_1.__metadata("design:type", String)
|
|
27
|
+
], QuotationItem.prototype, "domainId", void 0);
|
|
28
|
+
tslib_1.__decorate([
|
|
29
|
+
(0, typeorm_1.ManyToOne)(type => quotation_1.Quotation, quotation => quotation.items, { nullable: false, onDelete: 'CASCADE' }),
|
|
30
|
+
tslib_1.__metadata("design:type", quotation_1.Quotation)
|
|
31
|
+
], QuotationItem.prototype, "quotation", void 0);
|
|
32
|
+
tslib_1.__decorate([
|
|
33
|
+
(0, typeorm_1.RelationId)((item) => item.quotation),
|
|
34
|
+
(0, type_graphql_1.Field)({ description: 'The quotation the line belongs to' }),
|
|
35
|
+
tslib_1.__metadata("design:type", String)
|
|
36
|
+
], QuotationItem.prototype, "quotationId", void 0);
|
|
37
|
+
tslib_1.__decorate([
|
|
38
|
+
(0, typeorm_1.CreateDateColumn)(),
|
|
39
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'When the line was written' }),
|
|
40
|
+
tslib_1.__metadata("design:type", Date)
|
|
41
|
+
], QuotationItem.prototype, "createdAt", void 0);
|
|
42
|
+
tslib_1.__decorate([
|
|
43
|
+
(0, typeorm_1.UpdateDateColumn)(),
|
|
44
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'When the line last changed' }),
|
|
45
|
+
tslib_1.__metadata("design:type", Date)
|
|
46
|
+
], QuotationItem.prototype, "updatedAt", void 0);
|
|
47
|
+
tslib_1.__decorate([
|
|
48
|
+
(0, typeorm_1.DeleteDateColumn)(),
|
|
49
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'When the line was removed' }),
|
|
50
|
+
tslib_1.__metadata("design:type", Date)
|
|
51
|
+
], QuotationItem.prototype, "deletedAt", void 0);
|
|
52
|
+
tslib_1.__decorate([
|
|
53
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
54
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
|
|
55
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
56
|
+
], QuotationItem.prototype, "creator", void 0);
|
|
57
|
+
tslib_1.__decorate([
|
|
58
|
+
(0, typeorm_1.RelationId)((item) => item.creator),
|
|
59
|
+
tslib_1.__metadata("design:type", String)
|
|
60
|
+
], QuotationItem.prototype, "creatorId", void 0);
|
|
61
|
+
tslib_1.__decorate([
|
|
62
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
63
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
|
|
64
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
65
|
+
], QuotationItem.prototype, "updater", void 0);
|
|
66
|
+
tslib_1.__decorate([
|
|
67
|
+
(0, typeorm_1.RelationId)((item) => item.updater),
|
|
68
|
+
tslib_1.__metadata("design:type", String)
|
|
69
|
+
], QuotationItem.prototype, "updaterId", void 0);
|
|
70
|
+
exports.QuotationItem = QuotationItem = tslib_1.__decorate([
|
|
71
|
+
(0, typeorm_1.Entity)(),
|
|
72
|
+
(0, typeorm_1.Index)('ix_quotation_item_0', (item) => [item.quotation, item.position]),
|
|
73
|
+
(0, type_graphql_1.ObjectType)({ description: 'Entity for QuotationItem — one line of a quotation' })
|
|
74
|
+
], QuotationItem);
|
|
75
|
+
//# sourceMappingURL=quotation-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quotation-item.js","sourceRoot":"","sources":["../../../server/service/quotation/quotation-item.ts"],"names":[],"mappings":";;;;AAAA,yDAAgD;AAChD,qDAAwD;AACxD,iDAA8C;AAC9C,+CAAoD;AACpD,qCAA4I;AAE5I,2CAAuC;AAKhC,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,wBAAc;CA4ChD,CAAA;AA5CY,sCAAa;AAGf;IAFR,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;yCACC;AAInB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IACzB,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACjC,cAAM;6CAAA;AAGf;IADC,IAAA,oBAAU,EAAC,CAAC,IAAmB,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC;;+CAChC;AAGjB;IADC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,qBAAS,EAAE,SAAS,CAAC,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;sCAC1F,qBAAS;gDAAA;AAIpB;IAFC,IAAA,oBAAU,EAAC,CAAC,IAAmB,EAAE,E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AAA,eAAK,EAAC,qBAAqB,EAAE,CAAC,IAAmB,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IACtF,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,oDAAoD,EAAE,CAAC;GACrE,aAAa,CA4CzB","sourcesContent":["import { User } from '@things-factory/auth-base'\nimport { CommercialLine } from '@things-factory/invoice'\nimport { Domain } from '@things-factory/shell'\nimport { Field, ID, ObjectType } from 'type-graphql'\nimport { CreateDateColumn, DeleteDateColumn, Entity, Index, ManyToOne, PrimaryGeneratedColumn, RelationId, UpdateDateColumn } from 'typeorm'\n\nimport { Quotation } from './quotation'\n\n@Entity()\n@Index('ix_quotation_item_0', (item: QuotationItem) => [item.quotation, item.position])\n@ObjectType({ description: 'Entity for QuotationItem — one line of a quotation' })\nexport class QuotationItem extends CommercialLine {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field(type => Domain, { nullable: true })\n domain?: Domain\n\n @RelationId((item: QuotationItem) => item.domain)\n domainId?: string\n\n @ManyToOne(type => Quotation, quotation => quotation.items, { nullable: false, onDelete: 'CASCADE' })\n quotation: Quotation\n\n @RelationId((item: QuotationItem) => item.quotation)\n @Field({ description: 'The quotation the line belongs to' })\n quotationId: string\n\n @CreateDateColumn()\n @Field({ nullable: true, description: 'When the line was written' })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true, description: 'When the line last changed' })\n updatedAt?: Date\n\n @DeleteDateColumn()\n @Field({ nullable: true, description: 'When the line was removed' })\n deletedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((item: QuotationItem) => item.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((item: QuotationItem) => item.updater)\n updaterId?: string\n}\n"]}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Quotation } from './quotation';
|
|
2
|
-
import { NewQuotation
|
|
2
|
+
import { NewQuotation } from './quotation-type';
|
|
3
3
|
export declare class QuotationMutation {
|
|
4
4
|
createQuotation(quotation: NewQuotation, context: ResolverContext): Promise<Quotation>;
|
|
5
|
-
updateQuotation(id: string,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
updateQuotation(id: string, quotation: NewQuotation, context: ResolverContext): Promise<Quotation>;
|
|
6
|
+
sendQuotation(id: string, context: ResolverContext): Promise<Quotation>;
|
|
7
|
+
acceptQuotation(id: string, context: ResolverContext): Promise<Quotation>;
|
|
8
|
+
rejectQuotation(id: string, reason: string, context: ResolverContext): Promise<Quotation>;
|
|
9
|
+
expireQuotation(id: string, context: ResolverContext): Promise<Quotation>;
|
|
10
|
+
reviseQuotation(id: string, context: ResolverContext): Promise<Quotation>;
|
|
10
11
|
}
|