@dssp/project 1.0.0-alpha.2 → 1.0.0-alpha.5
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/pages/lib/select2-component.js +1 -1
- package/dist-client/pages/lib/select2-component.js.map +1 -1
- package/dist-client/pages/lib/waether.js.map +1 -1
- package/dist-client/pages/project/component/project-update-header.js.map +1 -1
- package/dist-client/pages/project/popup/popup-plan-upload.js.map +1 -1
- package/dist-client/pages/project/popup/popup-project-create.js.map +1 -1
- package/dist-client/pages/project/popup/popup-schedule-upload.js.map +1 -1
- package/dist-client/pages/project/project-completed-list.js +0 -1
- package/dist-client/pages/project/project-completed-list.js.map +1 -1
- package/dist-client/pages/project/project-detail.js.map +1 -1
- package/dist-client/pages/project/project-list.js +9 -8
- package/dist-client/pages/project/project-list.js.map +1 -1
- package/dist-client/pages/project/project-plan-management.js.map +1 -1
- package/dist-client/pages/project/project-schedule-list.js.map +1 -1
- package/dist-client/pages/project/project-schedule.js.map +1 -1
- package/dist-client/pages/project/project-setting-list.js +25 -24
- package/dist-client/pages/project/project-setting-list.js.map +1 -1
- package/dist-client/pages/project/project-update.js.map +1 -1
- package/dist-client/pages/resource/construction-detail-type-popup.js.map +1 -1
- package/dist-client/pages/resource/construction-type-management.js.map +1 -1
- package/dist-client/pages/resource/inspection-drawing-type-management.js.map +1 -1
- package/dist-client/pages/resource/inspection-part-popup.js.map +1 -1
- package/dist-client/pages/resource/resource-importer.js.map +1 -1
- package/dist-client/pages/resource/resource-list-page.js.map +1 -1
- package/dist-client/pages/resource/worker-type-management.js.map +1 -1
- package/dist-client/pages/task/task-importer.js.map +1 -1
- package/dist-client/pages/task/task-list-page.js.map +1 -1
- package/dist-client/pages/task-resource/task-resource-importer.js.map +1 -1
- package/dist-client/pages/task-resource/task-resource-list-page.js.map +1 -1
- package/dist-client/route.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/controllers/export-tasks.js +1 -2
- package/dist-server/controllers/export-tasks.js.map +1 -1
- package/dist-server/controllers/import-task.js +1 -2
- package/dist-server/controllers/import-task.js.map +1 -1
- package/dist-server/controllers/parse-excel.d.ts +0 -2
- package/dist-server/controllers/parse-excel.js +1 -2
- package/dist-server/controllers/parse-excel.js.map +1 -1
- package/dist-server/middlewares/index.js +1 -2
- package/dist-server/middlewares/index.js.map +1 -1
- package/dist-server/migrations/1723861466413-seed-roles.js.map +1 -1
- package/dist-server/migrations/1723861466414-seed-codes.js.map +1 -1
- package/dist-server/migrations/1723861476419-seed-resources.js.map +1 -1
- package/dist-server/migrations/1723861478420-seed-/bsample-project.js.map +1 -1
- package/dist-server/migrations/1723861478421-seed-/bsample-tasks.js.map +1 -1
- package/dist-server/service/construction-detail-type/construction-detail-type-mutation.js +2 -2
- package/dist-server/service/construction-detail-type/construction-detail-type-mutation.js.map +1 -1
- package/dist-server/service/construction-detail-type/construction-detail-type-query.js +2 -2
- package/dist-server/service/construction-detail-type/construction-detail-type-query.js.map +1 -1
- package/dist-server/service/construction-detail-type/construction-detail-type-type.js +4 -4
- package/dist-server/service/construction-detail-type/construction-detail-type-type.js.map +1 -1
- package/dist-server/service/construction-detail-type/construction-detail-type.js +2 -2
- package/dist-server/service/construction-detail-type/construction-detail-type.js.map +1 -1
- package/dist-server/service/construction-type/construction-type-mutation.js +2 -2
- package/dist-server/service/construction-type/construction-type-mutation.js.map +1 -1
- package/dist-server/service/construction-type/construction-type-query.js +2 -2
- package/dist-server/service/construction-type/construction-type-query.js.map +1 -1
- package/dist-server/service/construction-type/construction-type-type.js +4 -4
- package/dist-server/service/construction-type/construction-type-type.js.map +1 -1
- package/dist-server/service/construction-type/construction-type.js +2 -2
- package/dist-server/service/construction-type/construction-type.js.map +1 -1
- package/dist-server/service/index.d.ts +1 -0
- package/dist-server/service/index.js +1 -0
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/service/inspection-drawing-type/inspection-drawing-type-mutation.js +2 -2
- package/dist-server/service/inspection-drawing-type/inspection-drawing-type-mutation.js.map +1 -1
- package/dist-server/service/inspection-drawing-type/inspection-drawing-type-query.js +2 -2
- package/dist-server/service/inspection-drawing-type/inspection-drawing-type-query.js.map +1 -1
- package/dist-server/service/inspection-drawing-type/inspection-drawing-type-type.js +4 -4
- package/dist-server/service/inspection-drawing-type/inspection-drawing-type-type.js.map +1 -1
- package/dist-server/service/inspection-drawing-type/inspection-drawing-type.js +2 -2
- package/dist-server/service/inspection-drawing-type/inspection-drawing-type.js.map +1 -1
- package/dist-server/service/inspection-part/inspection-part-mutation.js +2 -2
- package/dist-server/service/inspection-part/inspection-part-mutation.js.map +1 -1
- package/dist-server/service/inspection-part/inspection-part-query.js +2 -2
- package/dist-server/service/inspection-part/inspection-part-query.js.map +1 -1
- package/dist-server/service/inspection-part/inspection-part-type.js +4 -4
- package/dist-server/service/inspection-part/inspection-part-type.js.map +1 -1
- package/dist-server/service/inspection-part/inspection-part.js +2 -2
- package/dist-server/service/inspection-part/inspection-part.js.map +1 -1
- package/dist-server/service/manager/index.d.ts +2 -0
- package/dist-server/service/manager/index.js +3 -1
- package/dist-server/service/manager/index.js.map +1 -1
- package/dist-server/service/manager/manager-mutation.js +2 -2
- package/dist-server/service/manager/manager-mutation.js.map +1 -1
- package/dist-server/service/manager/manager-query.js +3 -3
- package/dist-server/service/manager/manager-query.js.map +1 -1
- package/dist-server/service/manager/manager-type.js +4 -4
- package/dist-server/service/manager/manager-type.js.map +1 -1
- package/dist-server/service/manager/manager.js +2 -2
- package/dist-server/service/manager/manager.js.map +1 -1
- package/dist-server/service/project/project-mutation.js +7 -12
- package/dist-server/service/project/project-mutation.js.map +1 -1
- package/dist-server/service/project/project-query.d.ts +1 -0
- package/dist-server/service/project/project-query.js +14 -3
- package/dist-server/service/project/project-query.js.map +1 -1
- package/dist-server/service/project/project-type.js +8 -8
- package/dist-server/service/project/project-type.js.map +1 -1
- package/dist-server/service/project/project.d.ts +4 -0
- package/dist-server/service/project/project.js +9 -4
- package/dist-server/service/project/project.js.map +1 -1
- package/dist-server/service/resource/resource-mutation.js +2 -2
- package/dist-server/service/resource/resource-mutation.js.map +1 -1
- package/dist-server/service/resource/resource-query.js +2 -2
- package/dist-server/service/resource/resource-query.js.map +1 -1
- package/dist-server/service/resource/resource-type.js +6 -6
- package/dist-server/service/resource/resource-type.js.map +1 -1
- package/dist-server/service/resource/resource.js +3 -3
- package/dist-server/service/resource/resource.js.map +1 -1
- package/dist-server/service/task/task-mutation.js +2 -2
- package/dist-server/service/task/task-mutation.js.map +1 -1
- package/dist-server/service/task/task-query.js +4 -4
- package/dist-server/service/task/task-query.js.map +1 -1
- package/dist-server/service/task/task-type.js +10 -10
- package/dist-server/service/task/task-type.js.map +1 -1
- package/dist-server/service/task/task.js +7 -8
- package/dist-server/service/task/task.js.map +1 -1
- package/dist-server/service/task-resource/task-resource-mutation.js +2 -2
- package/dist-server/service/task-resource/task-resource-mutation.js.map +1 -1
- package/dist-server/service/task-resource/task-resource-query.js +2 -2
- package/dist-server/service/task-resource/task-resource-query.js.map +1 -1
- package/dist-server/service/task-resource/task-resource-type.js +6 -6
- package/dist-server/service/task-resource/task-resource-type.js.map +1 -1
- package/dist-server/service/task-resource/task-resource.js +2 -2
- package/dist-server/service/task-resource/task-resource.js.map +1 -1
- package/dist-server/service/worker-type/worker-type-mutation.js +2 -2
- package/dist-server/service/worker-type/worker-type-mutation.js.map +1 -1
- package/dist-server/service/worker-type/worker-type-query.js +2 -2
- package/dist-server/service/worker-type/worker-type-query.js.map +1 -1
- package/dist-server/service/worker-type/worker-type-type.js +4 -4
- package/dist-server/service/worker-type/worker-type-type.js.map +1 -1
- package/dist-server/service/worker-type/worker-type.js +2 -2
- package/dist-server/service/worker-type/worker-type.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"construction-type-query.js","sourceRoot":"","sources":["../../../server/service/construction-type/construction-type-query.ts"],"names":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EAAC,cAAM,CAAC,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,gBAAgB,CAAC,QAAQ,EAAE,CAAC,CAAA;IACjF,CAAC;IAGK,AAAN,KAAK,CAAC,OAAO,CAAS,gBAAkC;QACtD,OAAO,MAAM,IAAA,qBAAa,EAAC,gBAAI,CAAC,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,gBAAgB,CAAC,SAAS,EAAE,CAAC,CAAA;IAChF,CAAC;IAGK,AAAN,KAAK,CAAC,OAAO,CAAS,gBAAkC;QACtD,OAAO,MAAM,IAAA,qBAAa,EAAC,gBAAI,CAAC,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,gBAAgB,CAAC,SAAS,EAAE,CAAC,CAAA;IAChF,CAAC;CACF,CAAA;
|
|
1
|
+
{"version":3,"file":"construction-type-query.js","sourceRoot":"","sources":["../../../server/service/construction-type/construction-type-query.ts"],"names":[],"mappings":";;;;AAAA,+CAAmF;AACnF,iDAAuG;AACvG,yDAAgD;AAChD,2DAAsD;AACtD,qEAA+D;AAC/D,mGAA6F;AAGtF,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAE1B,AAAN,KAAK,CAAC,gBAAgB,CAAY,EAAU,EAAS,OAAwB;QAC3E,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,OAAO,MAAM,IAAA,qBAAa,EAAC,oCAAgB,CAAC,CAAC,OAAO,CAAC;YACnD,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;SACzC,CAAC,CAAA;IACJ,CAAC;IAGK,AAAN,KAAK,CAAC,iBAAiB,CAAS,MAAiB,EAAS,OAAwB;QAChF,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,MAAM,YAAY,GAAG,IAAA,qCAA6B,EAAC;YACjD,MAAM;YACN,MAAM;YACN,UAAU,EAAE,MA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CAAC,CAAA;IAAc,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;6DAMnD;AAGK;IADL,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,6CAAoB,EAAE,EAAE,WAAW,EAAE,qCAAqC,EAAE,CAAC;IACtE,mBAAA,IAAA,mBAAI,GAAE,CAAA;IAAqB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;6CAAjB,iBAAS;;8DAYhD;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,iDAAsB,CAAC,CAAC;IACjB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAmB,oCAAgB;;oEAKvE;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IAChB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAmB,oCAAgB;;mDAEtD;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAmB,oCAAgB;;oDAEvD;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAmB,oCAAgB;;oDAEvD;gCA9CU,qBAAqB;IADjC,IAAA,uBAAQ,EAAC,oCAAgB,CAAC;GACd,qBAAqB,CA+CjC","sourcesContent":["import { Resolver, Query, FieldResolver, Root, Args, Arg, Ctx } from 'type-graphql'\nimport { Domain, getQueryBuilderFromListParams, getRepository, ListParam } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { ConstructionType } from './construction-type'\nimport { ConstructionTypeList } from './construction-type-type'\nimport { ConstructionDetailType } from '../construction-detail-type/construction-detail-type'\n\n@Resolver(ConstructionType)\nexport class ConstructionTypeQuery {\n @Query(returns => ConstructionType!, { nullable: true, description: 'To fetch a ConstructionType' })\n async constructionType(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<ConstructionType> {\n const { domain } = context.state\n\n return await getRepository(ConstructionType).findOne({\n where: { domain: { id: domain.id }, id }\n })\n }\n\n @Query(returns => ConstructionTypeList, { description: 'To fetch multiple ConstructionTypes' })\n async constructionTypes(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<ConstructionTypeList> {\n const { domain } = context.state\n\n const queryBuilder = getQueryBuilderFromListParams({\n domain,\n params,\n repository: await getRepository(ConstructionType)\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n @FieldResolver(type => [ConstructionDetailType])\n async constructionDetailTypes(@Root() constructionType: ConstructionType): Promise<ConstructionDetailType[]> {\n return await getRepository(ConstructionDetailType).find({\n where: { constructionType: { id: constructionType.id } },\n order: { sequence: 'ASC' }\n })\n }\n\n @FieldResolver(type => Domain)\n async domain(@Root() constructionType: ConstructionType): Promise<Domain> {\n return await getRepository(Domain).findOneBy({ id: constructionType.domainId })\n }\n\n @FieldResolver(type => User)\n async updater(@Root() constructionType: ConstructionType): Promise<User> {\n return await getRepository(User).findOneBy({ id: constructionType.updaterId })\n }\n\n @FieldResolver(type => User)\n async creator(@Root() constructionType: ConstructionType): Promise<User> {\n return await getRepository(User).findOneBy({ id: constructionType.creatorId })\n }\n}\n"]}
|
|
@@ -6,6 +6,7 @@ const type_graphql_1 = require("type-graphql");
|
|
|
6
6
|
const construction_type_1 = require("./construction-type");
|
|
7
7
|
let ConstructionTypePatch = class ConstructionTypePatch {
|
|
8
8
|
};
|
|
9
|
+
exports.ConstructionTypePatch = ConstructionTypePatch;
|
|
9
10
|
tslib_1.__decorate([
|
|
10
11
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
|
|
11
12
|
tslib_1.__metadata("design:type", String)
|
|
@@ -22,12 +23,12 @@ tslib_1.__decorate([
|
|
|
22
23
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
23
24
|
tslib_1.__metadata("design:type", String)
|
|
24
25
|
], ConstructionTypePatch.prototype, "cuFlag", void 0);
|
|
25
|
-
ConstructionTypePatch = tslib_1.__decorate([
|
|
26
|
+
exports.ConstructionTypePatch = ConstructionTypePatch = tslib_1.__decorate([
|
|
26
27
|
(0, type_graphql_1.InputType)()
|
|
27
28
|
], ConstructionTypePatch);
|
|
28
|
-
exports.ConstructionTypePatch = ConstructionTypePatch;
|
|
29
29
|
let ConstructionTypeList = class ConstructionTypeList {
|
|
30
30
|
};
|
|
31
|
+
exports.ConstructionTypeList = ConstructionTypeList;
|
|
31
32
|
tslib_1.__decorate([
|
|
32
33
|
(0, type_graphql_1.Field)(type => [construction_type_1.ConstructionType]),
|
|
33
34
|
tslib_1.__metadata("design:type", Array)
|
|
@@ -36,8 +37,7 @@ tslib_1.__decorate([
|
|
|
36
37
|
(0, type_graphql_1.Field)(type => type_graphql_1.Int),
|
|
37
38
|
tslib_1.__metadata("design:type", Number)
|
|
38
39
|
], ConstructionTypeList.prototype, "total", void 0);
|
|
39
|
-
ConstructionTypeList = tslib_1.__decorate([
|
|
40
|
+
exports.ConstructionTypeList = ConstructionTypeList = tslib_1.__decorate([
|
|
40
41
|
(0, type_graphql_1.ObjectType)()
|
|
41
42
|
], ConstructionTypeList);
|
|
42
|
-
exports.ConstructionTypeList = ConstructionTypeList;
|
|
43
43
|
//# sourceMappingURL=construction-type-type.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"construction-type-type.js","sourceRoot":"","sources":["../../../server/service/construction-type/construction-type-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAoE;AACpE,2DAAsD;AAG/C,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;CAYjC,CAAA;
|
|
1
|
+
{"version":3,"file":"construction-type-type.js","sourceRoot":"","sources":["../../../server/service/construction-type/construction-type-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAoE;AACpE,2DAAsD;AAG/C,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;CAYjC,CAAA;AAZY,sDAAqB;AAEhC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDAC3B;AAGX;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACb;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0DACN;AAGpB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACX;gCAXJ,qBAAqB;IADjC,IAAA,wBAAS,GAAE;GACC,qBAAqB,CAYjC;AAGM,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;CAMhC,CAAA;AANY,oDAAoB;AAE/B;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,oCAAgB,CAAC,CAAC;;mDACT;AAGzB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;mDACN;+BALF,oBAAoB;IADhC,IAAA,yBAAU,GAAE;GACA,oBAAoB,CAMhC","sourcesContent":["import { ObjectType, Field, InputType, Int, ID } from 'type-graphql'\nimport { ConstructionType } from './construction-type'\n\n@InputType()\nexport class ConstructionTypePatch {\n @Field(type => ID, { nullable: true })\n id?: string\n\n @Field({ nullable: true })\n name?: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n cuFlag?: string\n}\n\n@ObjectType()\nexport class ConstructionTypeList {\n @Field(type => [ConstructionType])\n items: ConstructionType[]\n\n @Field(type => Int)\n total: number\n}\n"]}
|
|
@@ -9,6 +9,7 @@ const auth_base_1 = require("@things-factory/auth-base");
|
|
|
9
9
|
const construction_detail_type_1 = require("../construction-detail-type/construction-detail-type");
|
|
10
10
|
let ConstructionType = class ConstructionType {
|
|
11
11
|
};
|
|
12
|
+
exports.ConstructionType = ConstructionType;
|
|
12
13
|
tslib_1.__decorate([
|
|
13
14
|
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
14
15
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
|
@@ -71,7 +72,7 @@ tslib_1.__decorate([
|
|
|
71
72
|
(0, typeorm_1.RelationId)((constructionType) => constructionType.updater),
|
|
72
73
|
tslib_1.__metadata("design:type", String)
|
|
73
74
|
], ConstructionType.prototype, "updaterId", void 0);
|
|
74
|
-
ConstructionType = tslib_1.__decorate([
|
|
75
|
+
exports.ConstructionType = ConstructionType = tslib_1.__decorate([
|
|
75
76
|
(0, typeorm_1.Entity)(),
|
|
76
77
|
(0, typeorm_1.Index)('ix_construction_type_0', (constructionType) => [constructionType.domain, constructionType.name], {
|
|
77
78
|
unique: true,
|
|
@@ -79,5 +80,4 @@ ConstructionType = tslib_1.__decorate([
|
|
|
79
80
|
}),
|
|
80
81
|
(0, type_graphql_1.ObjectType)({ description: '공종 타입' })
|
|
81
82
|
], ConstructionType);
|
|
82
|
-
exports.ConstructionType = ConstructionType;
|
|
83
83
|
//# sourceMappingURL=construction-type.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"construction-type.js","sourceRoot":"","sources":["../../../server/service/construction-type/construction-type.ts"],"names":[],"mappings":";;;;AAAA,qCAWgB;AAChB,+CAAoD;AACpD,iDAA8C;AAC9C,yDAAgD;AAChD,mGAA6F;AAQtF,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAkD5B,CAAA;
|
|
1
|
+
{"version":3,"file":"construction-type.js","sourceRoot":"","sources":["../../../server/service/construction-type/construction-type.ts"],"names":[],"mappings":";;;;AAAA,qCAWgB;AAChB,+CAAoD;AACpD,iDAA8C;AAC9C,yDAAgD;AAChD,mGAA6F;AAQtF,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAkD5B,CAAA;AAlDY,4CAAgB;AAGlB;IAFR,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC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,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCAC9B,gBAAI;iDAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,gBAAkC,EAAE,EAAE,CAAC,gBAAgB,CAAC,OAAO,CAAC;;mDAC3D;AAIlB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC3C,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCAC9B,gBAAI;iDAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,gBAAkC,EAAE,EAAE,CAAC,gBAAgB,CAAC,OAAO,CAAC;;mDAC3D;2BAjDP,gBAAgB;IAN5B,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,wBAAwB,EAAE,CAAC,gBAAkC,EAAE,EAAE,CAAC,CAAC,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,CAAC,IAAI,CAAC,EAAE;QACzH,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,sBAAsB;KAC9B,CAAC;IACD,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC;GACxB,gBAAgB,CAkD5B","sourcesContent":["import {\n CreateDateColumn,\n UpdateDateColumn,\n DeleteDateColumn,\n Entity,\n Index,\n Column,\n RelationId,\n ManyToOne,\n PrimaryGeneratedColumn,\n OneToMany\n} from 'typeorm'\nimport { ObjectType, Field, ID } from 'type-graphql'\nimport { Domain } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { ConstructionDetailType } from '../construction-detail-type/construction-detail-type'\n\n@Entity()\n@Index('ix_construction_type_0', (constructionType: ConstructionType) => [constructionType.domain, constructionType.name], {\n unique: true,\n where: '\"deleted_at\" IS NULL'\n})\n@ObjectType({ description: '공종 타입' })\nexport class ConstructionType {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field({ nullable: true })\n domain?: Domain\n\n @RelationId((constructionType: ConstructionType) => constructionType.domain)\n domainId?: string\n\n @Column()\n @Field({ nullable: true })\n name?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n description?: string\n\n // 상세 공종 정보 (하위 테이블 참조)\n @Field(() => [ConstructionDetailType], { nullable: true })\n @OneToMany(() => ConstructionDetailType, constructionDetailType => constructionDetailType.constructionType)\n constructionDetailTypes?: ConstructionDetailType[]\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n\n @DeleteDateColumn()\n @Field({ nullable: true })\n deletedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((constructionType: ConstructionType) => constructionType.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((constructionType: ConstructionType) => constructionType.updater)\n updaterId?: string\n}\n"]}
|
|
@@ -6,6 +6,7 @@ export * from './inspection-drawing-type/inspection-drawing-type';
|
|
|
6
6
|
export * from './inspection-part/inspection-part';
|
|
7
7
|
export * from './worker-type/worker-type';
|
|
8
8
|
export * from './manager/manager';
|
|
9
|
+
export * from './manager/manager-type';
|
|
9
10
|
export * from './task/task';
|
|
10
11
|
export * from './project/project';
|
|
11
12
|
export declare const entities: (typeof import("./project/project").Project | typeof import("./task/task").Task | typeof import("./task-resource/task-resource").TaskResource | typeof import("./resource/resource").Resource | typeof import("./construction-type/construction-type").ConstructionType | typeof import("./construction-detail-type/construction-detail-type").ConstructionDetailType | typeof import("./inspection-part/inspection-part").InspectionPart | typeof import("./inspection-drawing-type/inspection-drawing-type").InspectionDrawingType | typeof import("./worker-type/worker-type").WorkerType | typeof import("./manager/manager").Manager)[];
|
|
@@ -11,6 +11,7 @@ tslib_1.__exportStar(require("./inspection-drawing-type/inspection-drawing-type"
|
|
|
11
11
|
tslib_1.__exportStar(require("./inspection-part/inspection-part"), exports);
|
|
12
12
|
tslib_1.__exportStar(require("./worker-type/worker-type"), exports);
|
|
13
13
|
tslib_1.__exportStar(require("./manager/manager"), exports);
|
|
14
|
+
tslib_1.__exportStar(require("./manager/manager-type"), exports);
|
|
14
15
|
tslib_1.__exportStar(require("./task/task"), exports);
|
|
15
16
|
tslib_1.__exportStar(require("./project/project"), exports);
|
|
16
17
|
/* IMPORT ENTITIES AND RESOLVERS */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/service/index.ts"],"names":[],"mappings":";;;;AAAA,yBAAyB;AACzB,wEAA6C;AAC7C,8DAAmC;AACnC,8FAAmE;AACnE,gFAAqD;AACrD,4FAAiE;AACjE,4EAAiD;AACjD,oEAAyC;AACzC,4DAAiC;AACjC,sDAA2B;AAC3B,4DAAiC;AAEjC,mCAAmC;AACnC,mDAAsG;AACtG,yCAAyF;AACzF,yEAGmC;AACnC,2DAAkH;AAClH,uEAAkI;AAClI,uDAA4G;AAC5G,+CAAgG;AAChG,uCAAsF;AACtF,iCAA6E;AAC7E,uCAAsF;AAEzE,QAAA,QAAQ,GAAG;IACtB,cAAc;IACd,GAAG,wBAAoB;IACvB,GAAG,mBAAgB;IACnB,GAAG,mCAA8B;IACjC,GAAG,4BAAwB;IAC3B,GAAG,kCAA6B;IAChC,GAAG,0BAAsB;IACzB,GAAG,sBAAkB;IACrB,GAAG,kBAAe;IAClB,GAAG,eAAY;IACf,GAAG,kBAAe;CACnB,CAAA;AAEY,QAAA,MAAM,GAAG;IACpB,eAAe,EAAE;QACf,sBAAsB;QACtB,GAAG,yBAAqB;QACxB,GAAG,oBAAiB;QACpB,GAAG,oCAA+B;QAClC,GAAG,6BAAyB;QAC5B,GAAG,mCAA8B;QACjC,GAAG,2BAAuB;QAC1B,GAAG,uBAAmB;QACtB,GAAG,mBAAgB;QACnB,GAAG,gBAAa;QAChB,GAAG,mBAAgB;KACpB;CACF,CAAA","sourcesContent":["/* EXPORT ENTITY TYPES */\nexport * from './task-resource/task-resource'\nexport * from './resource/resource'\nexport * from './construction-detail-type/construction-detail-type'\nexport * from './construction-type/construction-type'\nexport * from './inspection-drawing-type/inspection-drawing-type'\nexport * from './inspection-part/inspection-part'\nexport * from './worker-type/worker-type'\nexport * from './manager/manager'\nexport * from './task/task'\nexport * from './project/project'\n\n/* IMPORT ENTITIES AND RESOLVERS */\nimport { entities as TaskResourceEntities, resolvers as TaskResourceResolvers } from './task-resource'\nimport { entities as ResourceEntities, resolvers as ResourceResolvers } from './resource'\nimport {\n entities as ConstructionDetailTypeEntities,\n resolvers as ConstructionDetailTypeResolvers\n} from './construction-detail-type'\nimport { entities as ConstructionTypeEntities, resolvers as ConstructionTypeResolvers } from './construction-type'\nimport { entities as InspectionDrawingTypeEntities, resolvers as InspectionDrawingTypeResolvers } from './inspection-drawing-type'\nimport { entities as InspectionPartEntities, resolvers as InspectionPartResolvers } from './inspection-part'\nimport { entities as WorkerTypeEntities, resolvers as WorkerTypeResolvers } from './worker-type'\nimport { entities as ManagerEntities, resolvers as ManagerResolvers } from './manager'\nimport { entities as TaskEntities, resolvers as TaskResolvers } from './task'\nimport { entities as ProjectEntities, resolvers as ProjectResolvers } from './project'\n\nexport const entities = [\n /* ENTITIES */\n ...TaskResourceEntities,\n ...ResourceEntities,\n ...ConstructionDetailTypeEntities,\n ...ConstructionTypeEntities,\n ...InspectionDrawingTypeEntities,\n ...InspectionPartEntities,\n ...WorkerTypeEntities,\n ...ManagerEntities,\n ...TaskEntities,\n ...ProjectEntities\n]\n\nexport const schema = {\n resolverClasses: [\n /* RESOLVER CLASSES */\n ...TaskResourceResolvers,\n ...ResourceResolvers,\n ...ConstructionDetailTypeResolvers,\n ...ConstructionTypeResolvers,\n ...InspectionDrawingTypeResolvers,\n ...InspectionPartResolvers,\n ...WorkerTypeResolvers,\n ...ManagerResolvers,\n ...TaskResolvers,\n ...ProjectResolvers\n ]\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/service/index.ts"],"names":[],"mappings":";;;;AAAA,yBAAyB;AACzB,wEAA6C;AAC7C,8DAAmC;AACnC,8FAAmE;AACnE,gFAAqD;AACrD,4FAAiE;AACjE,4EAAiD;AACjD,oEAAyC;AACzC,4DAAiC;AACjC,iEAAsC;AACtC,sDAA2B;AAC3B,4DAAiC;AAEjC,mCAAmC;AACnC,mDAAsG;AACtG,yCAAyF;AACzF,yEAGmC;AACnC,2DAAkH;AAClH,uEAAkI;AAClI,uDAA4G;AAC5G,+CAAgG;AAChG,uCAAsF;AACtF,iCAA6E;AAC7E,uCAAsF;AAEzE,QAAA,QAAQ,GAAG;IACtB,cAAc;IACd,GAAG,wBAAoB;IACvB,GAAG,mBAAgB;IACnB,GAAG,mCAA8B;IACjC,GAAG,4BAAwB;IAC3B,GAAG,kCAA6B;IAChC,GAAG,0BAAsB;IACzB,GAAG,sBAAkB;IACrB,GAAG,kBAAe;IAClB,GAAG,eAAY;IACf,GAAG,kBAAe;CACnB,CAAA;AAEY,QAAA,MAAM,GAAG;IACpB,eAAe,EAAE;QACf,sBAAsB;QACtB,GAAG,yBAAqB;QACxB,GAAG,oBAAiB;QACpB,GAAG,oCAA+B;QAClC,GAAG,6BAAyB;QAC5B,GAAG,mCAA8B;QACjC,GAAG,2BAAuB;QAC1B,GAAG,uBAAmB;QACtB,GAAG,mBAAgB;QACnB,GAAG,gBAAa;QAChB,GAAG,mBAAgB;KACpB;CACF,CAAA","sourcesContent":["/* EXPORT ENTITY TYPES */\nexport * from './task-resource/task-resource'\nexport * from './resource/resource'\nexport * from './construction-detail-type/construction-detail-type'\nexport * from './construction-type/construction-type'\nexport * from './inspection-drawing-type/inspection-drawing-type'\nexport * from './inspection-part/inspection-part'\nexport * from './worker-type/worker-type'\nexport * from './manager/manager'\nexport * from './manager/manager-type'\nexport * from './task/task'\nexport * from './project/project'\n\n/* IMPORT ENTITIES AND RESOLVERS */\nimport { entities as TaskResourceEntities, resolvers as TaskResourceResolvers } from './task-resource'\nimport { entities as ResourceEntities, resolvers as ResourceResolvers } from './resource'\nimport {\n entities as ConstructionDetailTypeEntities,\n resolvers as ConstructionDetailTypeResolvers\n} from './construction-detail-type'\nimport { entities as ConstructionTypeEntities, resolvers as ConstructionTypeResolvers } from './construction-type'\nimport { entities as InspectionDrawingTypeEntities, resolvers as InspectionDrawingTypeResolvers } from './inspection-drawing-type'\nimport { entities as InspectionPartEntities, resolvers as InspectionPartResolvers } from './inspection-part'\nimport { entities as WorkerTypeEntities, resolvers as WorkerTypeResolvers } from './worker-type'\nimport { entities as ManagerEntities, resolvers as ManagerResolvers } from './manager'\nimport { entities as TaskEntities, resolvers as TaskResolvers } from './task'\nimport { entities as ProjectEntities, resolvers as ProjectResolvers } from './project'\n\nexport const entities = [\n /* ENTITIES */\n ...TaskResourceEntities,\n ...ResourceEntities,\n ...ConstructionDetailTypeEntities,\n ...ConstructionTypeEntities,\n ...InspectionDrawingTypeEntities,\n ...InspectionPartEntities,\n ...WorkerTypeEntities,\n ...ManagerEntities,\n ...TaskEntities,\n ...ProjectEntities\n]\n\nexport const schema = {\n resolverClasses: [\n /* RESOLVER CLASSES */\n ...TaskResourceResolvers,\n ...ResourceResolvers,\n ...ConstructionDetailTypeResolvers,\n ...ConstructionTypeResolvers,\n ...InspectionDrawingTypeResolvers,\n ...InspectionPartResolvers,\n ...WorkerTypeResolvers,\n ...ManagerResolvers,\n ...TaskResolvers,\n ...ProjectResolvers\n ]\n}\n"]}
|
|
@@ -39,6 +39,7 @@ let InspectionDrawingTypeMutation = class InspectionDrawingTypeMutation {
|
|
|
39
39
|
return true;
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
|
+
exports.InspectionDrawingTypeMutation = InspectionDrawingTypeMutation;
|
|
42
43
|
tslib_1.__decorate([
|
|
43
44
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
44
45
|
(0, type_graphql_1.Mutation)(returns => [inspection_drawing_type_1.InspectionDrawingType], { description: "To modify multiple InspectionDrawingTypes' information" }),
|
|
@@ -57,8 +58,7 @@ tslib_1.__decorate([
|
|
|
57
58
|
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
58
59
|
tslib_1.__metadata("design:returntype", Promise)
|
|
59
60
|
], InspectionDrawingTypeMutation.prototype, "deleteInspectionDrawingTypes", null);
|
|
60
|
-
InspectionDrawingTypeMutation = tslib_1.__decorate([
|
|
61
|
+
exports.InspectionDrawingTypeMutation = InspectionDrawingTypeMutation = tslib_1.__decorate([
|
|
61
62
|
(0, type_graphql_1.Resolver)(inspection_drawing_type_1.InspectionDrawingType)
|
|
62
63
|
], InspectionDrawingTypeMutation);
|
|
63
|
-
exports.InspectionDrawingTypeMutation = InspectionDrawingTypeMutation;
|
|
64
64
|
//# sourceMappingURL=inspection-drawing-type-mutation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inspection-drawing-type-mutation.js","sourceRoot":"","sources":["../../../server/service/inspection-drawing-type/inspection-drawing-type-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA4B;AAC5B,iDAAqD;AACrD,uEAAiE;AACjE,iFAA2E;AAGpE,IAAM,6BAA6B,GAAnC,MAAM,6BAA6B;IAGlC,AAAN,KAAK,CAAC,mCAAmC,CACe,OAAqC,EACpF,OAAwB;QAE/B,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,IAAI,OAAO,GAAG,EAAE,CAAA;QAChB,MAAM,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,EAAE,KAAK,GAAG,CAAC,CAAA;QACzF,MAAM,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,EAAE,KAAK,GAAG,CAAC,CAAA;QACzF,MAAM,yBAAyB,GAAG,IAAA,qBAAa,EAAC,+CAAqB,EAAE,EAAE,CAAC,CAAA;QAE1E,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE;
|
|
1
|
+
{"version":3,"file":"inspection-drawing-type-mutation.js","sourceRoot":"","sources":["../../../server/service/inspection-drawing-type/inspection-drawing-type-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA4B;AAC5B,iDAAqD;AACrD,uEAAiE;AACjE,iFAA2E;AAGpE,IAAM,6BAA6B,GAAnC,MAAM,6BAA6B;IAGlC,AAAN,KAAK,CAAC,mCAAmC,CACe,OAAqC,EACpF,OAAwB;QAE/B,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,IAAI,OAAO,GAAG,EAAE,CAAA;QAChB,MAAM,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,EAAE,KAAK,GAAG,CAAC,CAAA;QACzF,MAAM,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,EAAE,KAAK,GAAG,CAAC,CAAA;QACzF,MAAM,yBAAyB,GAAG,IAAA,qBAAa,EAAC,+CAAqB,EAAE,EAAE,CAAC,CAAA;QAE1E,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC9B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,cAAc,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;gBAC/C,MAAM,SAAS,GAAG,cAAc,CAAC,CAAC,CAAC,CAAA;gBAEnC,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CAAC,+CAAqB,CAAC,EAAE,EAAE,WAAW,EAAE,wDAAwD,EAAE,CAAC;IAErH,mBAAA,IAAA,kBAAG,EAAC,SAAS,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,yDAA0B,CAAC,CAAC,CAAA;IACpD,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;wFAwCP;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,2CAA2C,EAAE,CAAC;IAExF,mBAAA,IAAA,kBAAG,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAC5B,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;iFASP;wCA5DU,6BAA6B;IADzC,IAAA,uBAAQ,EAAC,+CAAqB,CAAC;GACnB,6BAA6B,CA6DzC","sourcesContent":["import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'\nimport { In } from 'typeorm'\nimport { getRepository } from '@things-factory/shell'\nimport { InspectionDrawingType } from './inspection-drawing-type'\nimport { InspectionDrawingTypePatch } from './inspection-drawing-type-type'\n\n@Resolver(InspectionDrawingType)\nexport class InspectionDrawingTypeMutation {\n @Directive('@transaction')\n @Mutation(returns => [InspectionDrawingType], { description: \"To modify multiple InspectionDrawingTypes' information\" })\n async updateMultipleInspectionDrawingType(\n @Arg('patches', type => [InspectionDrawingTypePatch]) patches: InspectionDrawingTypePatch[],\n @Ctx() context: ResolverContext\n ): Promise<InspectionDrawingType[]> {\n const { domain, user, tx } = context.state\n\n let results = []\n const _createRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === '+')\n const _updateRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === 'M')\n const inspectionDrawingTypeRepo = getRepository(InspectionDrawingType, tx)\n\n if (_createRecords.length > 0) {\n for (let i = 0; i < _createRecords.length; i++) {\n const newRecord = _createRecords[i]\n\n const result = await inspectionDrawingTypeRepo.save({\n ...newRecord,\n domain,\n creator: user,\n updater: user\n })\n\n results.push({ ...result, cuFlag: '+' })\n }\n }\n\n if (_updateRecords.length > 0) {\n for (let i = 0; i < _updateRecords.length; i++) {\n const updateRecord = _updateRecords[i]\n const inspectionDrawingType = await inspectionDrawingTypeRepo.findOneBy({ id: updateRecord.id })\n\n const result = await inspectionDrawingTypeRepo.save({\n ...inspectionDrawingType,\n ...updateRecord,\n updater: user\n })\n\n results.push({ ...result, cuFlag: 'M' })\n }\n }\n\n return results\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete multiple InspectionDrawingTypes' })\n async deleteInspectionDrawingTypes(\n @Arg('ids', type => [String]) ids: string[],\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n const { domain, tx } = context.state\n\n await getRepository(InspectionDrawingType, tx).delete({\n id: In(ids)\n })\n\n return true\n }\n}\n"]}
|
|
@@ -39,6 +39,7 @@ let InspectionDrawingTypeQuery = class InspectionDrawingTypeQuery {
|
|
|
39
39
|
return inspectionDrawingType.creatorId && (await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: inspectionDrawingType.creatorId }));
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
|
+
exports.InspectionDrawingTypeQuery = InspectionDrawingTypeQuery;
|
|
42
43
|
tslib_1.__decorate([
|
|
43
44
|
(0, type_graphql_1.Query)(returns => inspection_drawing_type_1.InspectionDrawingType, { nullable: true, description: 'To fetch a InspectionDrawingType' }),
|
|
44
45
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
@@ -76,8 +77,7 @@ tslib_1.__decorate([
|
|
|
76
77
|
tslib_1.__metadata("design:paramtypes", [inspection_drawing_type_1.InspectionDrawingType]),
|
|
77
78
|
tslib_1.__metadata("design:returntype", Promise)
|
|
78
79
|
], InspectionDrawingTypeQuery.prototype, "creator", null);
|
|
79
|
-
InspectionDrawingTypeQuery = tslib_1.__decorate([
|
|
80
|
+
exports.InspectionDrawingTypeQuery = InspectionDrawingTypeQuery = tslib_1.__decorate([
|
|
80
81
|
(0, type_graphql_1.Resolver)(inspection_drawing_type_1.InspectionDrawingType)
|
|
81
82
|
], InspectionDrawingTypeQuery);
|
|
82
|
-
exports.InspectionDrawingTypeQuery = InspectionDrawingTypeQuery;
|
|
83
83
|
//# sourceMappingURL=inspection-drawing-type-query.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inspection-drawing-type-query.js","sourceRoot":"","sources":["../../../server/service/inspection-drawing-type/inspection-drawing-type-query.ts"],"names":[],"mappings":";;;;AAAA,+CAA8F;AAC9F,iDAAuG;AACvG,yDAAgD;AAChD,uEAAiE;AACjE,iFAA0E;AAC1E,wEAAmE;AAG5D,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;IAE/B,AAAN,KAAK,CAAC,qBAAqB,CAAY,EAAU,EAAS,OAAwB;QAChF,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,OAAO,MAAM,IAAA,qBAAa,EAAC,+CAAqB,CAAC,CAAC,OAAO,CAAC;YACxD,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;SACzC,CAAC,CAAA;IACJ,CAAC;IAGK,AAAN,KAAK,CAAC,sBAAsB,CACD,MAAiB,EACnC,OAAwB;QAE/B,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,MAAM,YAAY,GAAG,IAAA,qCAA6B,EAAC;YACjD,MAAM;YACN,MAAM;YACN,UAAU,EAAE,MAAM,IAAA,qBAAa,EAAC,+CAAqB,CAAC;YACtD,WAAW,EAAE,CAAC,MAAM,CAAC;SACtB,CAAC,CAAA;QAEF,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,YAAY,CAAC,eAAe,EAAE,CAAA;QAE3D,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;IACzB,CAAC;IAGK,AAAN,KAAK,CAAC,eAAe,CAAS,qBAA4C;QACxE,OAAO,MAAM,IAAA,qBAAa,EAAC,gCAAc,CAAC,CAAC,IAAI,CAAC;YAC9C,KAAK,EAAE,EAAE,qBAAqB,EAAE,EAAE,EAAE,EAAE,qBAAqB,CAAC,EAAE,EAAE,EAAE;YAClE,KAAK,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE;SAC3B,CAAC,CAAA;IACJ,CAAC;IAGK,AAAN,KAAK,CAAC,OAAO,CAAS,qBAA4C;QAChE,OAAO,qBAAqB,CAAC,SAAS,IAAI,CAAC,MAAM,IAAA,qBAAa,EAAC,gBAAI,CAAC,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,qBAAqB,CAAC,SAAS,EAAE,CAAC,CAAC,CAAA;IAC1H,CAAC;IAGK,AAAN,KAAK,CAAC,OAAO,CAAS,qBAA4C;QAChE,OAAO,qBAAqB,CAAC,SAAS,IAAI,CAAC,MAAM,IAAA,qBAAa,EAAC,gBAAI,CAAC,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,qBAAqB,CAAC,SAAS,EAAE,CAAC,CAAC,CAAA;IAC1H,CAAC;CACF,CAAA;
|
|
1
|
+
{"version":3,"file":"inspection-drawing-type-query.js","sourceRoot":"","sources":["../../../server/service/inspection-drawing-type/inspection-drawing-type-query.ts"],"names":[],"mappings":";;;;AAAA,+CAA8F;AAC9F,iDAAuG;AACvG,yDAAgD;AAChD,uEAAiE;AACjE,iFAA0E;AAC1E,wEAAmE;AAG5D,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;IAE/B,AAAN,KAAK,CAAC,qBAAqB,CAAY,EAAU,EAAS,OAAwB;QAChF,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,OAAO,MAAM,IAAA,qBAAa,EAAC,+CAAqB,CAAC,CAAC,OAAO,CAAC;YAC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AAE,qBAAqB,CAAC,SAAS,EAAE,CAAC,CAAC,CAAA;IAC1H,CAAC;CACF,CAAA;AA9CY,gEAA0B;AAE/B;IADL,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,+CAAsB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,kCAAkC,EAAE,CAAC;IACjF,mBAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;uEAMxD;AAGK;IADL,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,wDAAyB,EAAE,EAAE,WAAW,EAAE,0CAA0C,EAAE,CAAC;IAEtG,mBAAA,IAAA,mBAAI,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAS,CAAC,CAAA;IACvB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;6CAD2B,iBAAS;;wEAe3C;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,gCAAc,CAAC,CAAC;IACjB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAwB,+CAAqB;;iEAKzE;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAwB,+CAAqB;;yDAEjE;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAwB,+CAAqB;;yDAEjE;qCA7CU,0BAA0B;IADtC,IAAA,uBAAQ,EAAC,+CAAqB,CAAC;GACnB,0BAA0B,CA8CtC","sourcesContent":["import { Resolver, Query, FieldResolver, Root, Args, Arg, Ctx, Directive } from 'type-graphql'\nimport { Domain, getQueryBuilderFromListParams, getRepository, ListParam } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { InspectionDrawingType } from './inspection-drawing-type'\nimport { InspectionDrawingTypeList } from './inspection-drawing-type-type'\nimport { InspectionPart } from '../inspection-part/inspection-part'\n\n@Resolver(InspectionDrawingType)\nexport class InspectionDrawingTypeQuery {\n @Query(returns => InspectionDrawingType!, { nullable: true, description: 'To fetch a InspectionDrawingType' })\n async inspectionDrawingType(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<InspectionDrawingType> {\n const { domain } = context.state\n\n return await getRepository(InspectionDrawingType).findOne({\n where: { domain: { id: domain.id }, id }\n })\n }\n\n @Query(returns => InspectionDrawingTypeList, { description: 'To fetch multiple InspectionDrawingTypes' })\n async inspectionDrawingTypes(\n @Args(type => ListParam) params: ListParam,\n @Ctx() context: ResolverContext\n ): Promise<InspectionDrawingTypeList> {\n const { domain } = context.state\n\n const queryBuilder = getQueryBuilderFromListParams({\n domain,\n params,\n repository: await getRepository(InspectionDrawingType),\n searchables: ['name']\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n @FieldResolver(type => [InspectionPart])\n async inspectionParts(@Root() inspectionDrawingType: InspectionDrawingType): Promise<InspectionPart[]> {\n return await getRepository(InspectionPart).find({\n where: { inspectionDrawingType: { id: inspectionDrawingType.id } },\n order: { sequence: 'ASC' }\n })\n }\n\n @FieldResolver(type => User)\n async updater(@Root() inspectionDrawingType: InspectionDrawingType): Promise<User> {\n return inspectionDrawingType.updaterId && (await getRepository(User).findOneBy({ id: inspectionDrawingType.updaterId }))\n }\n\n @FieldResolver(type => User)\n async creator(@Root() inspectionDrawingType: InspectionDrawingType): Promise<User> {\n return inspectionDrawingType.creatorId && (await getRepository(User).findOneBy({ id: inspectionDrawingType.creatorId }))\n }\n}\n"]}
|
|
@@ -6,6 +6,7 @@ const type_graphql_1 = require("type-graphql");
|
|
|
6
6
|
const inspection_drawing_type_1 = require("./inspection-drawing-type");
|
|
7
7
|
let InspectionDrawingTypePatch = class InspectionDrawingTypePatch {
|
|
8
8
|
};
|
|
9
|
+
exports.InspectionDrawingTypePatch = InspectionDrawingTypePatch;
|
|
9
10
|
tslib_1.__decorate([
|
|
10
11
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
|
|
11
12
|
tslib_1.__metadata("design:type", String)
|
|
@@ -18,12 +19,12 @@ tslib_1.__decorate([
|
|
|
18
19
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
19
20
|
tslib_1.__metadata("design:type", String)
|
|
20
21
|
], InspectionDrawingTypePatch.prototype, "cuFlag", void 0);
|
|
21
|
-
InspectionDrawingTypePatch = tslib_1.__decorate([
|
|
22
|
+
exports.InspectionDrawingTypePatch = InspectionDrawingTypePatch = tslib_1.__decorate([
|
|
22
23
|
(0, type_graphql_1.InputType)()
|
|
23
24
|
], InspectionDrawingTypePatch);
|
|
24
|
-
exports.InspectionDrawingTypePatch = InspectionDrawingTypePatch;
|
|
25
25
|
let InspectionDrawingTypeList = class InspectionDrawingTypeList {
|
|
26
26
|
};
|
|
27
|
+
exports.InspectionDrawingTypeList = InspectionDrawingTypeList;
|
|
27
28
|
tslib_1.__decorate([
|
|
28
29
|
(0, type_graphql_1.Field)(type => [inspection_drawing_type_1.InspectionDrawingType]),
|
|
29
30
|
tslib_1.__metadata("design:type", Array)
|
|
@@ -32,8 +33,7 @@ tslib_1.__decorate([
|
|
|
32
33
|
(0, type_graphql_1.Field)(type => type_graphql_1.Int),
|
|
33
34
|
tslib_1.__metadata("design:type", Number)
|
|
34
35
|
], InspectionDrawingTypeList.prototype, "total", void 0);
|
|
35
|
-
InspectionDrawingTypeList = tslib_1.__decorate([
|
|
36
|
+
exports.InspectionDrawingTypeList = InspectionDrawingTypeList = tslib_1.__decorate([
|
|
36
37
|
(0, type_graphql_1.ObjectType)()
|
|
37
38
|
], InspectionDrawingTypeList);
|
|
38
|
-
exports.InspectionDrawingTypeList = InspectionDrawingTypeList;
|
|
39
39
|
//# sourceMappingURL=inspection-drawing-type-type.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inspection-drawing-type-type.js","sourceRoot":"","sources":["../../../server/service/inspection-drawing-type/inspection-drawing-type-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAoE;AACpE,uEAAiE;AAG1D,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;CAStC,CAAA;
|
|
1
|
+
{"version":3,"file":"inspection-drawing-type-type.js","sourceRoot":"","sources":["../../../server/service/inspection-drawing-type/inspection-drawing-type-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAoE;AACpE,uEAAiE;AAG1D,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;CAStC,CAAA;AATY,gEAA0B;AAErC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDAC3B;AAGX;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wDACb;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0DACX;qCARJ,0BAA0B;IADtC,IAAA,wBAAS,GAAE;GACC,0BAA0B,CAStC;AAGM,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;CAMrC,CAAA;AANY,8DAAyB;AAEpC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,+CAAqB,CAAC,CAAC;;wDACT;AAG9B;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;wDACN;oCALF,yBAAyB;IADrC,IAAA,yBAAU,GAAE;GACA,yBAAyB,CAMrC","sourcesContent":["import { ObjectType, Field, InputType, Int, ID } from 'type-graphql'\nimport { InspectionDrawingType } from './inspection-drawing-type'\n\n@InputType()\nexport class InspectionDrawingTypePatch {\n @Field(type => ID, { nullable: true })\n id?: string\n\n @Field({ nullable: true })\n name?: string\n\n @Field({ nullable: true })\n cuFlag?: string\n}\n\n@ObjectType()\nexport class InspectionDrawingTypeList {\n @Field(type => [InspectionDrawingType])\n items: InspectionDrawingType[]\n\n @Field(type => Int)\n total: number\n}\n"]}
|
|
@@ -9,6 +9,7 @@ const shell_1 = require("@things-factory/shell");
|
|
|
9
9
|
const inspection_part_1 = require("../inspection-part/inspection-part");
|
|
10
10
|
let InspectionDrawingType = class InspectionDrawingType {
|
|
11
11
|
};
|
|
12
|
+
exports.InspectionDrawingType = InspectionDrawingType;
|
|
12
13
|
tslib_1.__decorate([
|
|
13
14
|
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
14
15
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
|
@@ -61,12 +62,11 @@ tslib_1.__decorate([
|
|
|
61
62
|
(0, typeorm_1.RelationId)((inspectionDrawingType) => inspectionDrawingType.updater),
|
|
62
63
|
tslib_1.__metadata("design:type", String)
|
|
63
64
|
], InspectionDrawingType.prototype, "updaterId", void 0);
|
|
64
|
-
InspectionDrawingType = tslib_1.__decorate([
|
|
65
|
+
exports.InspectionDrawingType = InspectionDrawingType = tslib_1.__decorate([
|
|
65
66
|
(0, typeorm_1.Entity)(),
|
|
66
67
|
(0, typeorm_1.Index)('ix_inspection_drawing_type_0', (inspectionDrawingType) => [inspectionDrawingType.domain, inspectionDrawingType.name], {
|
|
67
68
|
unique: true
|
|
68
69
|
}),
|
|
69
70
|
(0, type_graphql_1.ObjectType)({ description: 'Entity for InspectionDrawingType' })
|
|
70
71
|
], InspectionDrawingType);
|
|
71
|
-
exports.InspectionDrawingType = InspectionDrawingType;
|
|
72
72
|
//# sourceMappingURL=inspection-drawing-type.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inspection-drawing-type.js","sourceRoot":"","sources":["../../../server/service/inspection-drawing-type/inspection-drawing-type.ts"],"names":[],"mappings":";;;;AAAA,qCAUgB;AAChB,+CAAoD;AACpD,yDAAgD;AAChD,iDAA8C;AAC9C,wEAAmE;AAW5D,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;CA0CjC,CAAA;
|
|
1
|
+
{"version":3,"file":"inspection-drawing-type.js","sourceRoot":"","sources":["../../../server/service/inspection-drawing-type/inspection-drawing-type.ts"],"names":[],"mappings":";;;;AAAA,qCAUgB;AAChB,+CAAoD;AACpD,yDAAgD;AAChD,iDAA8C;AAC9C,wEAAmE;AAW5D,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;CA0CjC,CAAA;AA1CY,sDAAqB;AAGvB;IAFR,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;iDACC;AAInB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IACzB,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACjB,cAAM;qDAAA;AAGf;IADC,IAAA,oBAAU,EAAC,CAAC,qBAA4C,EAAE,EAAE,CAAC,qBAAqB,CAAC,MAAM,CAAC;;uDAC1E;AAIjB;IAFC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC;IACnD,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACb;AAKb;IAFC,IAAA,oBAAK,EAAC,GAAG,EAAE,CAAC,CAAC,gCAAc,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACjD,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,gCAAc,EAAE,cAAc,CAAC,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC;;8DACtD;AAIlC;IAFC,IAAA,0BAAgB,GAAE;IAClB,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACd,IAAI;wDAAA;AAIhB;IAFC,IAAA,0BAAgB,GAAE;IAClB,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACd,IAAI;wDAAA;AAIhB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC3C,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCAC9B,gBAAI;sDAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,qBAA4C,EAAE,EAAE,CAAC,qBAAqB,CAAC,OAAO,CAAC;;wDAC1E;AAIlB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC3C,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCAC9B,gBAAI;sDAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,qBAA4C,EAAE,EAAE,CAAC,qBAAqB,CAAC,OAAO,CAAC;;wDAC1E;gCAzCP,qBAAqB;IATjC,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EACJ,8BAA8B,EAC9B,CAAC,qBAA4C,EAAE,EAAE,CAAC,CAAC,qBAAqB,CAAC,MAAM,EAAE,qBAAqB,CAAC,IAAI,CAAC,EAC5G;QACE,MAAM,EAAE,IAAI;KACb,CACF;IACA,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,kCAAkC,EAAE,CAAC;GACnD,qBAAqB,CA0CjC","sourcesContent":["import {\n CreateDateColumn,\n UpdateDateColumn,\n Entity,\n Index,\n Column,\n RelationId,\n ManyToOne,\n OneToMany,\n PrimaryGeneratedColumn\n} from 'typeorm'\nimport { ObjectType, Field, ID } from 'type-graphql'\nimport { User } from '@things-factory/auth-base'\nimport { Domain } from '@things-factory/shell'\nimport { InspectionPart } from '../inspection-part/inspection-part'\n\n@Entity()\n@Index(\n 'ix_inspection_drawing_type_0',\n (inspectionDrawingType: InspectionDrawingType) => [inspectionDrawingType.domain, inspectionDrawingType.name],\n {\n unique: true\n }\n)\n@ObjectType({ description: 'Entity for InspectionDrawingType' })\nexport class InspectionDrawingType {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field({ nullable: true })\n domain?: Domain\n\n @RelationId((inspectionDrawingType: InspectionDrawingType) => inspectionDrawingType.domain)\n domainId?: string\n\n @Column({ nullable: false, comment: '검측 도면 타입 이름' })\n @Field({ nullable: true })\n name?: string\n\n // 검측 부위 정보 (하위 테이블 참조)\n @Field(() => [InspectionPart], { nullable: true })\n @OneToMany(() => InspectionPart, inspectionPart => inspectionPart.inspectionDrawingType)\n inspectionParts?: InspectionPart[]\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((inspectionDrawingType: InspectionDrawingType) => inspectionDrawingType.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((inspectionDrawingType: InspectionDrawingType) => inspectionDrawingType.updater)\n updaterId?: string\n}\n"]}
|
|
@@ -29,6 +29,7 @@ let InspectionPartMutation = class InspectionPartMutation {
|
|
|
29
29
|
return true;
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
|
+
exports.InspectionPartMutation = InspectionPartMutation;
|
|
32
33
|
tslib_1.__decorate([
|
|
33
34
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
34
35
|
(0, type_graphql_1.Mutation)(returns => [inspection_part_1.InspectionPart], { description: "To modify multiple InspectionParts' information" }),
|
|
@@ -48,8 +49,7 @@ tslib_1.__decorate([
|
|
|
48
49
|
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
49
50
|
tslib_1.__metadata("design:returntype", Promise)
|
|
50
51
|
], InspectionPartMutation.prototype, "deleteInspectionParts", null);
|
|
51
|
-
InspectionPartMutation = tslib_1.__decorate([
|
|
52
|
+
exports.InspectionPartMutation = InspectionPartMutation = tslib_1.__decorate([
|
|
52
53
|
(0, type_graphql_1.Resolver)(inspection_part_1.InspectionPart)
|
|
53
54
|
], InspectionPartMutation);
|
|
54
|
-
exports.InspectionPartMutation = InspectionPartMutation;
|
|
55
55
|
//# sourceMappingURL=inspection-part-mutation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inspection-part-mutation.js","sourceRoot":"","sources":["../../../server/service/inspection-part/inspection-part-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA4B;AAC5B,iDAAqD;AACrD,uDAAkD;AAClD,iEAA4D;AAC5D,gGAA0F;AAGnF,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAG3B,AAAN,KAAK,CAAC,4BAA4B,CACe,OAA8B,EAC7C,uBAA+B,EACxD,OAAwB;QAE/B,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAElC,IAAI,OAAO,GAAG,EAAE,CAAA;QAEhB,MAAM,kBAAkB,GAAG,EAAE,CAAC,aAAa,CAAC,gCAAc,CAAC,CAAA;QAC3D,MAAM,qBAAqB,GAAG,MAAM,EAAE,CAAC,aAAa,CAAC,+CAAqB,CAAC,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,uBAAuB,EAAE,CAAC,CAAA;QAEtH,MAAM,kBAAkB,CAAC,MAAM,CAAC,EAAE,qBAAqB,EAAE,EAAE,EAAE,EAAE,uBAAuB,EAAE,EAAE,CAAC,CAAA;QAE3F,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;
|
|
1
|
+
{"version":3,"file":"inspection-part-mutation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A;QAEpC,MAAM,IAAA,qBAAa,EAAC,gCAAc,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC;YAC7C,EAAE,EAAE,IAAA,YAAE,EAAC,GAAG,CAAC;SACZ,CAAC,CAAA;QAEF,OAAO,IAAI,CAAA;IACb,CAAC;CACF,CAAA;AA3CY,wDAAsB;AAG3B;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,CAAC,gCAAc,CAAC,EAAE,EAAE,WAAW,EAAE,iDAAiD,EAAE,CAAC;IAEvG,mBAAA,IAAA,kBAAG,EAAC,SAAS,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,0CAAmB,CAAC,CAAC,CAAA;IAC7C,mBAAA,IAAA,kBAAG,EAAC,yBAAyB,CAAC,CAAA;IAC9B,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;0EAwBP;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,oCAAoC,EAAE,CAAC;IACvD,mBAAA,IAAA,kBAAG,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAAiB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;mEAQ9E;iCA1CU,sBAAsB;IADlC,IAAA,uBAAQ,EAAC,gCAAc,CAAC;GACZ,sBAAsB,CA2ClC","sourcesContent":["import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'\nimport { In } from 'typeorm'\nimport { getRepository } from '@things-factory/shell'\nimport { InspectionPart } from './inspection-part'\nimport { InspectionPartPatch } from './inspection-part-type'\nimport { InspectionDrawingType } from '../inspection-drawing-type/inspection-drawing-type'\n\n@Resolver(InspectionPart)\nexport class InspectionPartMutation {\n @Directive('@transaction')\n @Mutation(returns => [InspectionPart], { description: \"To modify multiple InspectionParts' information\" })\n async updateMultipleInspectionPart(\n @Arg('patches', type => [InspectionPartPatch]) patches: InspectionPartPatch[],\n @Arg('inspectionDrawingTypeId') inspectionDrawingTypeId: string,\n @Ctx() context: ResolverContext\n ): Promise<InspectionPart[]> {\n const { user, tx } = context.state\n\n let results = []\n\n const inspectionPartRepo = tx.getRepository(InspectionPart)\n const inspectionDrawingType = await tx.getRepository(InspectionDrawingType).findOneBy({ id: inspectionDrawingTypeId })\n\n await inspectionPartRepo.delete({ inspectionDrawingType: { id: inspectionDrawingTypeId } })\n\n for (let i = 0; i < patches.length; i++) {\n const result = await inspectionPartRepo.save({\n ...patches[i],\n sequence: i,\n inspectionDrawingType,\n creator: user,\n updater: user\n })\n\n results.push({ ...result, cuFlag: '+' })\n }\n\n return results\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete multiple InspectionParts' })\n async deleteInspectionParts(@Arg('ids', type => [String]) ids: string[], @Ctx() context: ResolverContext): Promise<boolean> {\n const { domain, tx } = context.state\n\n await getRepository(InspectionPart, tx).delete({\n id: In(ids)\n })\n\n return true\n }\n}\n"]}
|
|
@@ -29,6 +29,7 @@ let InspectionPartQuery = class InspectionPartQuery {
|
|
|
29
29
|
return inspectionPart.creatorId && (await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: inspectionPart.creatorId }));
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
|
+
exports.InspectionPartQuery = InspectionPartQuery;
|
|
32
33
|
tslib_1.__decorate([
|
|
33
34
|
(0, type_graphql_1.Query)(returns => inspection_part_1.InspectionPart, { nullable: true, description: 'To fetch a InspectionPart' }),
|
|
34
35
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
@@ -59,8 +60,7 @@ tslib_1.__decorate([
|
|
|
59
60
|
tslib_1.__metadata("design:paramtypes", [inspection_part_1.InspectionPart]),
|
|
60
61
|
tslib_1.__metadata("design:returntype", Promise)
|
|
61
62
|
], InspectionPartQuery.prototype, "creator", null);
|
|
62
|
-
InspectionPartQuery = tslib_1.__decorate([
|
|
63
|
+
exports.InspectionPartQuery = InspectionPartQuery = tslib_1.__decorate([
|
|
63
64
|
(0, type_graphql_1.Resolver)(inspection_part_1.InspectionPart)
|
|
64
65
|
], InspectionPartQuery);
|
|
65
|
-
exports.InspectionPartQuery = InspectionPartQuery;
|
|
66
66
|
//# sourceMappingURL=inspection-part-query.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inspection-part-query.js","sourceRoot":"","sources":["../../../server/service/inspection-part/inspection-part-query.ts"],"names":[],"mappings":";;;;AAAA,+CAAmF;AACnF,iDAA+F;AAC/F,yDAAgD;AAChD,uDAAkD;AAClD,iEAA2D;AAGpD,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAExB,AAAN,KAAK,CAAC,cAAc,CAAY,EAAU,EAAS,OAAwB;QACzE,OAAO,MAAM,IAAA,qBAAa,EAAC,gCAAc,CAAC,CAAC,OAAO,CAAC;YACjD,KAAK,EAAE,EAAE,EAAE,EAAE;SACd,CAAC,CAAA;IACJ,CAAC;IAGK,AAAN,KAAK,CAAC,eAAe,CACM,MAAiB,EACnC,OAAwB;QAE/B,MAAM,YAAY,GAAG,IAAA,qCAA6B,EAAC;YACjD,MAAM;YACN,UAAU,EAAE,MAAM,IAAA,qBAAa,EAAC,gCAAc,CAAC;YAC/C,WAAW,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC;SACrC,CAAC,CAAA;QAEF,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,YAAY,CAAC,eAAe,EAAE,CAAA;QAE3D,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;IACzB,CAAC;IAGK,AAAN,KAAK,CAAC,OAAO,CAAS,cAA8B;QAClD,OAAO,cAAc,CAAC,SAAS,IAAI,CAAC,MAAM,IAAA,qBAAa,EAAC,gBAAI,CAAC,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,cAAc,CAAC,SAAS,EAAE,CAAC,CAAC,CAAA;IAC5G,CAAC;IAGK,AAAN,KAAK,CAAC,OAAO,CAAS,cAA8B;QAClD,OAAO,cAAc,CAAC,SAAS,IAAI,CAAC,MAAM,IAAA,qBAAa,EAAC,gBAAI,CAAC,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,cAAc,CAAC,SAAS,EAAE,CAAC,CAAC,CAAA;IAC5G,CAAC;CACF,CAAA;
|
|
1
|
+
{"version":3,"file":"inspection-part-query.js","sourceRoot":"","sources":["../../../server/service/inspection-part/inspection-part-query.ts"],"names":[],"mappings":";;;;AAAA,+CAAmF;AACnF,iDAA+F;AAC/F,yDAAgD;AAChD,uDAAkD;AAClD,iEAA2D;AAGpD,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAExB,AAAN,KAAK,CAAC,cAAc,CAAY,EAAU,EAAS,OAAwB;QACzE,OAAO,MAAM,IAAA,qBAAa,EAAC,gCAAc,CAAC,CAAC,OAAO,CAAC;YACjD,KAAK,EAAE,EAAE,EAAE,EAAE;SACd,CAAC,CAAA;IACJ,CAAC;IAGK,AAAN,KAAK,CAAC,eAAe,CACM,MAAiB,EACnC,OAAwB;QAE/B,MAAM,YAAY,GAAG,IAAA,qCAA6B,EAAC;YACjD,MAAM;YACN,UAAU,EAAE,MAAM,IAAA,qBAAa,EAAC,gCAAc,CAAC;YAC/C,WAAW,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC;SACrC,CAAC,CAAA;QAEF,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,YAAY,CAAC,eAAe,EAAE,CAAA;QAE3D,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;IACzB,CAAC;IAGK,AAAN,KAAK,CAAC,OAAO,CAAS,cAA8B;QAClD,OAAO,cAAc,CAAC,SAAS,IAAI,CAAC,MAAM,IAAA,qBAAa,EAAC,gBAAI,CAAC,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,cAAc,CAAC,SAAS,EAAE,CAAC,CAAC,CAAA;IAC5G,CAAC;IAGK,AAAN,KAAK,CAAC,OAAO,CAAS,cAA8B;QAClD,OAAO,cAAc,CAAC,SAAS,IAAI,CAAC,MAAM,IAAA,qBAAa,EAAC,gBAAI,CAAC,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,cAAc,CAAC,SAAS,EAAE,CAAC,CAAC,CAAA;IAC5G,CAAC;CACF,CAAA;AAjCY,kDAAmB;AAExB;IADL,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,gCAAe,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,2BAA2B,EAAE,CAAC;IAC1E,mBAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;yDAIjD;AAGK;IADL,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,yCAAkB,EAAE,EAAE,WAAW,EAAE,mCAAmC,EAAE,CAAC;IAExF,mBAAA,IAAA,mBAAI,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAS,CAAC,CAAA;IACvB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;6CAD2B,iBAAS;;0DAY3C;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAiB,gCAAc;;kDAEnD;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAiB,gCAAc;;kDAEnD;8BAhCU,mBAAmB;IAD/B,IAAA,uBAAQ,EAAC,gCAAc,CAAC;GACZ,mBAAmB,CAiC/B","sourcesContent":["import { Resolver, Query, FieldResolver, Root, Args, Arg, Ctx } from 'type-graphql'\nimport { getQueryBuilderFromListParams, getRepository, ListParam } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { InspectionPart } from './inspection-part'\nimport { InspectionPartList } from './inspection-part-type'\n\n@Resolver(InspectionPart)\nexport class InspectionPartQuery {\n @Query(returns => InspectionPart!, { nullable: true, description: 'To fetch a InspectionPart' })\n async inspectionPart(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<InspectionPart> {\n return await getRepository(InspectionPart).findOne({\n where: { id }\n })\n }\n\n @Query(returns => InspectionPartList, { description: 'To fetch multiple InspectionParts' })\n async inspectionParts(\n @Args(type => ListParam) params: ListParam,\n @Ctx() context: ResolverContext\n ): Promise<InspectionPartList> {\n const queryBuilder = getQueryBuilderFromListParams({\n params,\n repository: await getRepository(InspectionPart),\n searchables: ['name', 'description']\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n @FieldResolver(type => User)\n async updater(@Root() inspectionPart: InspectionPart): Promise<User> {\n return inspectionPart.updaterId && (await getRepository(User).findOneBy({ id: inspectionPart.updaterId }))\n }\n\n @FieldResolver(type => User)\n async creator(@Root() inspectionPart: InspectionPart): Promise<User> {\n return inspectionPart.creatorId && (await getRepository(User).findOneBy({ id: inspectionPart.creatorId }))\n }\n}\n"]}
|
|
@@ -6,6 +6,7 @@ const type_graphql_1 = require("type-graphql");
|
|
|
6
6
|
const inspection_part_1 = require("./inspection-part");
|
|
7
7
|
let InspectionPartPatch = class InspectionPartPatch {
|
|
8
8
|
};
|
|
9
|
+
exports.InspectionPartPatch = InspectionPartPatch;
|
|
9
10
|
tslib_1.__decorate([
|
|
10
11
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
|
|
11
12
|
tslib_1.__metadata("design:type", String)
|
|
@@ -22,12 +23,12 @@ tslib_1.__decorate([
|
|
|
22
23
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
23
24
|
tslib_1.__metadata("design:type", String)
|
|
24
25
|
], InspectionPartPatch.prototype, "cuFlag", void 0);
|
|
25
|
-
InspectionPartPatch = tslib_1.__decorate([
|
|
26
|
+
exports.InspectionPartPatch = InspectionPartPatch = tslib_1.__decorate([
|
|
26
27
|
(0, type_graphql_1.InputType)()
|
|
27
28
|
], InspectionPartPatch);
|
|
28
|
-
exports.InspectionPartPatch = InspectionPartPatch;
|
|
29
29
|
let InspectionPartList = class InspectionPartList {
|
|
30
30
|
};
|
|
31
|
+
exports.InspectionPartList = InspectionPartList;
|
|
31
32
|
tslib_1.__decorate([
|
|
32
33
|
(0, type_graphql_1.Field)(type => [inspection_part_1.InspectionPart]),
|
|
33
34
|
tslib_1.__metadata("design:type", Array)
|
|
@@ -36,8 +37,7 @@ tslib_1.__decorate([
|
|
|
36
37
|
(0, type_graphql_1.Field)(type => type_graphql_1.Int),
|
|
37
38
|
tslib_1.__metadata("design:type", Number)
|
|
38
39
|
], InspectionPartList.prototype, "total", void 0);
|
|
39
|
-
InspectionPartList = tslib_1.__decorate([
|
|
40
|
+
exports.InspectionPartList = InspectionPartList = tslib_1.__decorate([
|
|
40
41
|
(0, type_graphql_1.ObjectType)()
|
|
41
42
|
], InspectionPartList);
|
|
42
|
-
exports.InspectionPartList = InspectionPartList;
|
|
43
43
|
//# sourceMappingURL=inspection-part-type.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inspection-part-type.js","sourceRoot":"","sources":["../../../server/service/inspection-part/inspection-part-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAoE;AACpE,uDAAkD;AAG3C,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;CAY/B,CAAA;
|
|
1
|
+
{"version":3,"file":"inspection-part-type.js","sourceRoot":"","sources":["../../../server/service/inspection-part/inspection-part-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAoE;AACpE,uDAAkD;AAG3C,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;CAY/B,CAAA;AAZY,kDAAmB;AAE9B;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CAC3B;AAGX;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACb;AAGb;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACtB;AAGjB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACX;8BAXJ,mBAAmB;IAD/B,IAAA,wBAAS,GAAE;GACC,mBAAmB,CAY/B;AAGM,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CAM9B,CAAA;AANY,gDAAkB;AAE7B;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,gCAAc,CAAC,CAAC;;iDACT;AAGvB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;iDACN;6BALF,kBAAkB;IAD9B,IAAA,yBAAU,GAAE;GACA,kBAAkB,CAM9B","sourcesContent":["import { ObjectType, Field, InputType, Int, ID } from 'type-graphql'\nimport { InspectionPart } from './inspection-part'\n\n@InputType()\nexport class InspectionPartPatch {\n @Field(type => ID, { nullable: true })\n id?: string\n\n @Field({ nullable: true })\n name?: string\n\n @Field(type => Int, { nullable: true })\n sequence?: number\n\n @Field({ nullable: true })\n cuFlag?: string\n}\n\n@ObjectType()\nexport class InspectionPartList {\n @Field(type => [InspectionPart])\n items: InspectionPart[]\n\n @Field(type => Int)\n total: number\n}\n"]}
|
|
@@ -8,6 +8,7 @@ const auth_base_1 = require("@things-factory/auth-base");
|
|
|
8
8
|
const inspection_drawing_type_1 = require("../inspection-drawing-type/inspection-drawing-type");
|
|
9
9
|
let InspectionPart = class InspectionPart {
|
|
10
10
|
};
|
|
11
|
+
exports.InspectionPart = InspectionPart;
|
|
11
12
|
tslib_1.__decorate([
|
|
12
13
|
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
13
14
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
|
@@ -60,10 +61,9 @@ tslib_1.__decorate([
|
|
|
60
61
|
(0, typeorm_1.RelationId)((inspectionPart) => inspectionPart.updater),
|
|
61
62
|
tslib_1.__metadata("design:type", String)
|
|
62
63
|
], InspectionPart.prototype, "updaterId", void 0);
|
|
63
|
-
InspectionPart = tslib_1.__decorate([
|
|
64
|
+
exports.InspectionPart = InspectionPart = tslib_1.__decorate([
|
|
64
65
|
(0, typeorm_1.Entity)(),
|
|
65
66
|
(0, typeorm_1.Index)('ix_inspection_part_0', (inspectionPart) => [inspectionPart.sequence]),
|
|
66
67
|
(0, type_graphql_1.ObjectType)({ description: 'Entity for InspectionPart' })
|
|
67
68
|
], InspectionPart);
|
|
68
|
-
exports.InspectionPart = InspectionPart;
|
|
69
69
|
//# sourceMappingURL=inspection-part.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inspection-part.js","sourceRoot":"","sources":["../../../server/service/inspection-part/inspection-part.ts"],"names":[],"mappings":";;;;AAAA,qCAAkI;AAClI,+CAAyD;AACzD,yDAAgD;AAChD,gGAA0F;AAKnF,IAAM,cAAc,GAApB,MAAM,cAAc;CA0C1B,CAAA;
|
|
1
|
+
{"version":3,"file":"inspection-part.js","sourceRoot":"","sources":["../../../server/service/inspection-part/inspection-part.ts"],"names":[],"mappings":";;;;AAAA,qCAAkI;AAClI,+CAAyD;AACzD,yDAAgD;AAChD,gGAA0F;AAKnF,IAAM,cAAc,GAApB,MAAM,cAAc;CA0C1B,CAAA;AA1CY,wCAAc;AAGhB;IAFR,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;0CACC;AAInB;IAFC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;IAC7C,IAAA,oBAAK,EAAC,EAAE,Q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,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCAC9B,gBAAI;+CAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,cAA8B,EAAE,EAAE,CAAC,cAAc,CAAC,OAAO,CAAC;;iDACrD;yBAzCP,cAAc;IAH1B,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,sBAAsB,EAAE,CAAC,cAA8B,EAAE,EAAE,CAAC,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;IAC5F,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,2BAA2B,EAAE,CAAC;GAC5C,cAAc,CA0C1B","sourcesContent":["import { CreateDateColumn, UpdateDateColumn, Entity, Index, Column, RelationId, ManyToOne, PrimaryGeneratedColumn } from 'typeorm'\nimport { ObjectType, Field, ID, Int } from 'type-graphql'\nimport { User } from '@things-factory/auth-base'\nimport { InspectionDrawingType } from '../inspection-drawing-type/inspection-drawing-type'\n\n@Entity()\n@Index('ix_inspection_part_0', (inspectionPart: InspectionPart) => [inspectionPart.sequence])\n@ObjectType({ description: 'Entity for InspectionPart' })\nexport class InspectionPart {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @Column({ nullable: false, comment: '검측 부위' })\n @Field({ nullable: true })\n name?: string\n\n @Column({ nullable: true, comment: '시퀀스' })\n @Field(type => Int, { nullable: true })\n sequence?: number\n\n // 검측 도면 정보 (상위 테이블 참조)\n @ManyToOne(type => InspectionDrawingType)\n @Field(type => InspectionDrawingType, { nullable: true })\n inspectionDrawingType?: InspectionDrawingType\n\n @RelationId((inspectionPart: InspectionPart) => inspectionPart.inspectionDrawingType)\n inspectionDrawingTypeId?: string\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((inspectionPart: InspectionPart) => inspectionPart.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((inspectionPart: InspectionPart) => inspectionPart.updater)\n updaterId?: string\n}\n"]}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Manager } from './manager';
|
|
2
2
|
import { ManagerQuery } from './manager-query';
|
|
3
3
|
import { ManagerMutation } from './manager-mutation';
|
|
4
|
+
import { ManagerOutput } from './manager-type';
|
|
4
5
|
export declare const entities: (typeof Manager)[];
|
|
5
6
|
export declare const resolvers: (typeof ManagerQuery | typeof ManagerMutation)[];
|
|
7
|
+
export declare const types: (typeof ManagerOutput)[];
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resolvers = exports.entities = void 0;
|
|
3
|
+
exports.types = exports.resolvers = exports.entities = void 0;
|
|
4
4
|
const manager_1 = require("./manager");
|
|
5
5
|
const manager_query_1 = require("./manager-query");
|
|
6
6
|
const manager_mutation_1 = require("./manager-mutation");
|
|
7
|
+
const manager_type_1 = require("./manager-type");
|
|
7
8
|
exports.entities = [manager_1.Manager];
|
|
8
9
|
exports.resolvers = [manager_query_1.ManagerQuery, manager_mutation_1.ManagerMutation];
|
|
10
|
+
exports.types = [manager_type_1.ManagerOutput];
|
|
9
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/manager/index.ts"],"names":[],"mappings":";;;AAAA,uCAAmC;AACnC,mDAA8C;AAC9C,yDAAoD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/manager/index.ts"],"names":[],"mappings":";;;AAAA,uCAAmC;AACnC,mDAA8C;AAC9C,yDAAoD;AACpD,iDAA8C;AAEjC,QAAA,QAAQ,GAAG,CAAC,iBAAO,CAAC,CAAA;AACpB,QAAA,SAAS,GAAG,CAAC,4BAAY,EAAE,kCAAe,CAAC,CAAA;AAC3C,QAAA,KAAK,GAAG,CAAC,4BAAa,CAAC,CAAA","sourcesContent":["import { Manager } from './manager'\nimport { ManagerQuery } from './manager-query'\nimport { ManagerMutation } from './manager-mutation'\nimport { ManagerOutput } from './manager-type'\n\nexport const entities = [Manager]\nexport const resolvers = [ManagerQuery, ManagerMutation]\nexport const types = [ManagerOutput]\n"]}
|
|
@@ -23,6 +23,7 @@ let ManagerMutation = class ManagerMutation {
|
|
|
23
23
|
return results;
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
|
+
exports.ManagerMutation = ManagerMutation;
|
|
26
27
|
tslib_1.__decorate([
|
|
27
28
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
28
29
|
(0, type_graphql_1.Mutation)(returns => [manager_1.Manager], { description: "To modify multiple Managers' information" }),
|
|
@@ -32,8 +33,7 @@ tslib_1.__decorate([
|
|
|
32
33
|
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
33
34
|
tslib_1.__metadata("design:returntype", Promise)
|
|
34
35
|
], ManagerMutation.prototype, "updateMultipleManager", null);
|
|
35
|
-
ManagerMutation = tslib_1.__decorate([
|
|
36
|
+
exports.ManagerMutation = ManagerMutation = tslib_1.__decorate([
|
|
36
37
|
(0, type_graphql_1.Resolver)(manager_1.Manager)
|
|
37
38
|
], ManagerMutation);
|
|
38
|
-
exports.ManagerMutation = ManagerMutation;
|
|
39
39
|
//# sourceMappingURL=manager-mutation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manager-mutation.js","sourceRoot":"","sources":["../../../server/service/manager/manager-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,uCAAmC;AACnC,iDAA6C;AAC7C,yDAAgD;AAGzC,IAAM,eAAe,GAArB,MAAM,eAAe;IAGpB,AAAN,KAAK,CAAC,qBAAqB,CACe,OAAuB,EACxD,OAAwB;QAE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EAAE,YAAY,CAAC,MAAM,EAAE,CAAC,CAAA;YAEzE,MAAM,QAAQ,CAAC,IAAI,iCACd,WAAW,KACd,IAAI,EAAE,YAAY,CAAC,IAAI,EACvB,OAAO,EAAE,IAAI,IACb,CAAA;YAEF,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,IAAI,+CAChC,OAAO,KACV,IAAI,EAAE,WAAW,KACd,YAAY,EACf,CAAA;YAEF,OAAO,CAAC,IAAI,mBAAM,MAAM,EAAG,CAAA;QAC7B,CAAC;QAED,OAAO,OAAO,CAAA;IAChB,CAAC;CACF,CAAA;AAnCY,0CAAe;AAGpB;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,CAAC,iBAAO,CAAC,EAAE,EAAE,WAAW,EAAE,0CAA0C,EAAE,CAAC;IAEzF,mBAAA,IAAA,kBAAG,EAAC,SAAS,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,2BAAY,CAAC,CAAC,CAAA;IACtC,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;4DA6BP;0BAlCU,eAAe;IAD3B,IAAA,uBAAQ,EAAC,iBAAO,CAAC;GACL,eAAe,CAmC3B","sourcesContent":["import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'\nimport { Manager } from './manager'\nimport { ManagerPatch } from './manager-type'\nimport { User } from '@things-factory/auth-base'\n\n@Resolver(Manager)\nexport class ManagerMutation {\n @Directive('@transaction')\n @Mutation(returns => [Manager], { description: \"To modify multiple Managers' information\" })\n async updateMultipleManager(\n @Arg('patches', type => [ManagerPatch]) patches: ManagerPatch[],\n @Ctx() context: ResolverContext\n ): Promise<Manager[]> {\n const { tx, user } = context.state\n\n let results = []\n const managerRepo = tx.getRepository(Manager)\n const userRepo = tx.getRepository(User)\n\n for (let i = 0; i < patches.length; i++) {\n const updateRecord = patches[i]\n const manager = updateRecord.id ? await managerRepo.findOneBy({ id: updateRecord.id }) : {}\n const managerUser = await userRepo.findOneBy({ id: updateRecord.userId })\n\n await userRepo.save({\n ...managerUser,\n name: updateRecord.name,\n updater: user\n })\n\n const result = await managerRepo.save({\n ...manager,\n user: managerUser,\n ...updateRecord\n })\n\n results.push({ ...result })\n }\n\n return results\n }\n}\n"]}
|