@things-factory/routing-base 5.0.11 → 5.0.15

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.
@@ -1 +1 @@
1
- {"version":3,"file":"operation-mutation.js","sourceRoot":"","sources":["../../../server/service/operation/operation-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA4B;AAE5B,qEAA0F;AAE1F,2CAAuC;AACvC,qDAA+D;AAG/D,IAAa,iBAAiB,GAA9B,MAAa,iBAAiB;IAG5B,KAAK,CAAC,eAAe,CAAmB,SAAuB,EAAS,OAAY;QAClF,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,aAAa,CAAC,qBAAS,CAAC,CAAC,IAAI,iCAChD,SAAS,KACZ,MAAM,EACN,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,IAAI,IACb,CAAA;QAEF,IAAI,SAAS,CAAC,SAAS,EAAE;YACvB,MAAM,IAAA,kCAAgB,EACpB,IAAI,EACJ;gBACE,UAAU,EAAE;oBACV,IAAI,EAAE,SAAS,CAAC,SAAS;oBACzB,OAAO,EAAE,qBAAS,CAAC,IAAI;oBACvB,KAAK,EAAE,MAAM,CAAC,EAAE;iBACjB;aACF,EACD,OAAO,CACR,CAAA;SACF;QAED,OAAO,MAAM,CAAA;IACf,CAAC;IAID,KAAK,CAAC,eAAe,CACR,EAAU,EACP,KAAqB,EAC5B,OAAY;QAEnB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,MAAM,UAAU,GAAG,EAAE,CAAC,aAAa,CAAC,qBAAS,CAAC,CAAA;QAC9C,MAAM,SAAS,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC;YACzC,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;SACtB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","sourcesContent":["import { Arg, Ctx, Directive, Mutation, Resolver } from 'type-graphql'\nimport { In } from 'typeorm'\n\nimport { createAttachment, deleteAttachmentsByRef } from '@things-factory/attachment-base'\n\nimport { Operation } from './operation'\nimport { NewOperation, OperationPatch } from './operation-type'\n\n@Resolver(Operation)\nexport class OperationMutation {\n @Directive('@transaction')\n @Mutation(returns => Operation, { description: 'To create new Operation' })\n async createOperation(@Arg('operation') operation: NewOperation, @Ctx() context: any): Promise<Operation> {\n const { domain, user, tx } = context.state\n\n const result = await tx.getRepository(Operation).save({\n ...operation,\n domain,\n creator: user,\n updater: user\n })\n\n if (operation.thumbnail) {\n await createAttachment(\n null,\n {\n attachment: {\n file: operation.thumbnail,\n refType: Operation.name,\n refBy: result.id\n }\n },\n context\n )\n }\n\n return result\n }\n\n @Directive('@transaction')\n @Mutation(returns => Operation, { description: 'To modify Operation information' })\n async updateOperation(\n @Arg('id') id: string,\n @Arg('patch') patch: OperationPatch,\n @Ctx() context: any\n ): Promise<Operation> {\n const { domain, user, tx } = context.state\n\n const repository = tx.getRepository(Operation)\n const operation = await repository.findOne({\n where: { domain, id }\n })\n\n const result = await repository.save({\n ...operation,\n ...patch,\n updater: user\n })\n\n if (patch.thumbnail) {\n // ?? { refBys: [operation.id] }\n await deleteAttachmentsByRef(null, { refBys: [result.id] }, context)\n await createAttachment(\n null,\n {\n attachment: {\n file: patch.thumbnail,\n refType: Operation.name,\n refBy: result.id\n }\n },\n context\n )\n }\n\n return result\n }\n\n @Directive('@transaction')\n @Mutation(returns => [Operation], { description: \"To modify multiple Operations' information\" })\n async updateMultipleOperation(\n @Arg('patches', type => [OperationPatch]) patches: OperationPatch[],\n @Ctx() context: any\n ): Promise<Operation[]> {\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 operationRepo = tx.getRepository(Operation)\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 operationRepo.save({\n ...newRecord,\n domain,\n creator: user,\n updater: user\n })\n\n if (newRecord.thumbnail) {\n await createAttachment(\n null,\n {\n attachment: {\n file: newRecord.thumbnail,\n refType: Operation.name,\n refBy: result.id\n }\n },\n context\n )\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 newRecord = _updateRecords[i]\n const operation = await operationRepo.findOne(newRecord.id)\n\n const result = await operationRepo.save({\n ...operation,\n ...newRecord,\n updater: user\n })\n\n if (newRecord.thumbnail) {\n await deleteAttachmentsByRef(null, { refBys: [result.id] }, context)\n await createAttachment(\n null,\n {\n attachment: {\n file: newRecord.thumbnail,\n refType: Operation.name,\n refBy: result.id\n }\n },\n context\n )\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 Operation' })\n async deleteOperation(@Arg('id') id: string, @Ctx() context: any): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(Operation).delete({ domain, id })\n await deleteAttachmentsByRef(null, { refBys: [id] }, context)\n\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete multiple operations' })\n async deleteOperations(@Arg('ids', type => [String]) ids: string[], @Ctx() context: any): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(Operation).delete({\n domain,\n id: In(ids)\n })\n\n await deleteAttachmentsByRef(null, { refBys: ids }, context)\n\n return true\n }\n}\n"]}
1
+ {"version":3,"file":"operation-mutation.js","sourceRoot":"","sources":["../../../server/service/operation/operation-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA4B;AAE5B,qEAA0F;AAE1F,2CAAuC;AACvC,qDAA+D;AAGxD,IAAM,iBAAiB,GAAvB,MAAM,iBAA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C;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,CAAC,qBAAS,CAAC,EAAE,EAAE,WAAW,EAAE,4CAA4C,EAAE,CAAC;IAE7F,mBAAA,IAAA,kBAAG,EAAC,SAAS,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,+BAAc,CAAC,CAAC,CAAA;IACxC,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;gEAqEP;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,qBAAqB,EAAE,CAAC;IAC9C,mBAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;wDAOlD;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,+BAA+B,EAAE,CAAC;IACvD,mBAAA,IAAA,kBAAG,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAAiB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;yDAWzE;AAxKU,iBAAiB;IAD7B,IAAA,uBAAQ,EAAC,qBAAS,CAAC;GACP,iBAAiB,CAyK7B;AAzKY,8CAAiB","sourcesContent":["import { Arg, Ctx, Directive, Mutation, Resolver } from 'type-graphql'\nimport { In } from 'typeorm'\n\nimport { createAttachment, deleteAttachmentsByRef } from '@things-factory/attachment-base'\n\nimport { Operation } from './operation'\nimport { NewOperation, OperationPatch } from './operation-type'\n\n@Resolver(Operation)\nexport class OperationMutation {\n @Directive('@transaction')\n @Mutation(returns => Operation, { description: 'To create new Operation' })\n async createOperation(@Arg('operation') operation: NewOperation, @Ctx() context: any): Promise<Operation> {\n const { domain, user, tx } = context.state\n\n const result = await tx.getRepository(Operation).save({\n ...operation,\n domain,\n creator: user,\n updater: user\n })\n\n if (operation.thumbnail) {\n await createAttachment(\n null,\n {\n attachment: {\n file: operation.thumbnail,\n refType: Operation.name,\n refBy: result.id\n }\n },\n context\n )\n }\n\n return result\n }\n\n @Directive('@transaction')\n @Mutation(returns => Operation, { description: 'To modify Operation information' })\n async updateOperation(\n @Arg('id') id: string,\n @Arg('patch') patch: OperationPatch,\n @Ctx() context: any\n ): Promise<Operation> {\n const { domain, user, tx } = context.state\n\n const repository = tx.getRepository(Operation)\n const operation = await repository.findOne({\n where: { domain, id }\n })\n\n const result = await repository.save({\n ...operation,\n ...patch,\n updater: user\n })\n\n if (patch.thumbnail) {\n // ?? { refBys: [operation.id] }\n await deleteAttachmentsByRef(null, { refBys: [result.id] }, context)\n await createAttachment(\n null,\n {\n attachment: {\n file: patch.thumbnail,\n refType: Operation.name,\n refBy: result.id\n }\n },\n context\n )\n }\n\n return result\n }\n\n @Directive('@transaction')\n @Mutation(returns => [Operation], { description: \"To modify multiple Operations' information\" })\n async updateMultipleOperation(\n @Arg('patches', type => [OperationPatch]) patches: OperationPatch[],\n @Ctx() context: any\n ): Promise<Operation[]> {\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 operationRepo = tx.getRepository(Operation)\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 operationRepo.save({\n ...newRecord,\n domain,\n creator: user,\n updater: user\n })\n\n if (newRecord.thumbnail) {\n await createAttachment(\n null,\n {\n attachment: {\n file: newRecord.thumbnail,\n refType: Operation.name,\n refBy: result.id\n }\n },\n context\n )\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 newRecord = _updateRecords[i]\n const operation = await operationRepo.findOne(newRecord.id)\n\n const result = await operationRepo.save({\n ...operation,\n ...newRecord,\n updater: user\n })\n\n if (newRecord.thumbnail) {\n await deleteAttachmentsByRef(null, { refBys: [result.id] }, context)\n await createAttachment(\n null,\n {\n attachment: {\n file: newRecord.thumbnail,\n refType: Operation.name,\n refBy: result.id\n }\n },\n context\n )\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 Operation' })\n async deleteOperation(@Arg('id') id: string, @Ctx() context: any): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(Operation).delete({ domain, id })\n await deleteAttachmentsByRef(null, { refBys: [id] }, context)\n\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete multiple operations' })\n async deleteOperations(@Arg('ids', type => [String]) ids: string[], @Ctx() context: any): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(Operation).delete({\n domain,\n id: In(ids)\n })\n\n await deleteAttachmentsByRef(null, { refBys: ids }, context)\n\n return true\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"operation-query.js","sourceRoot":"","sources":["../../../server/service/operation/operation-query.ts"],"names":[],"mappings":";;;;;AAAA,+CAAmF;AACnF,qCAAuC;AAEvC,qEAA4D;AAC5D,yDAAgD;AAChD,iDAAwF;AAExF,2CAAuC;AACvC,qDAAgD;AAGhD,IAAa,cAAc,GAA3B,MAAa,cAAc;IAEzB,KAAK,CAAC,SAAS,CAAY,EAAU,EAAS,OAAY;QACxD,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,OAAO,MAAM,IAAA,uBAAa,EAAC,qBAAS,CAAC,CAAC,OAAO,CAAC;YAC5C,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;SACtB,CAAC,CAAA;IAC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AAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,qBAAS,EAAE,EAAE,WAAW,EAAE,sBAAsB,EAAE,CAAC;IACpD,mBAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;+CAM5C;AAGD;IADC,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,8BAAa,EAAE,EAAE,WAAW,EAAE,8BAA8B,EAAE,CAAC;IAC/D,mBAAA,IAAA,mBAAI,GAAE,CAAA;IAAqB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;iEAAjB,iBAAS,oBAAT,iBAAS;;gDAazC;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IAChB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAY,qBAAS;;4CAExC;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAY,qBAAS;;6CAEzC;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAY,qBAAS;;6CAEzC;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAY,qBAAS;;+CAS3C;AAnDU,cAAc;IAD1B,IAAA,uBAAQ,EAAC,qBAAS,CAAC;GACP,cAAc,CAoD1B;AApDY,wCAAc","sourcesContent":["import { Arg, Args, Ctx, FieldResolver, Query, Resolver, Root } from 'type-graphql'\nimport { getRepository } from 'typeorm'\n\nimport { Attachment } from '@things-factory/attachment-base'\nimport { User } from '@things-factory/auth-base'\nimport { Domain, getQueryBuilderFromListParams, ListParam } from '@things-factory/shell'\n\nimport { Operation } from './operation'\nimport { OperationList } from './operation-type'\n\n@Resolver(Operation)\nexport class OperationQuery {\n @Query(returns => Operation, { description: 'To fetch a Operation' })\n async operation(@Arg('id') id: string, @Ctx() context: any): Promise<Operation> {\n const { domain } = context.state\n\n return await getRepository(Operation).findOne({\n where: { domain, id }\n })\n }\n\n @Query(returns => OperationList, { description: 'To fetch multiple Operations' })\n async operations(@Args() params: ListParam, @Ctx() context: any): Promise<OperationList> {\n const { domain } = context.state\n\n const queryBuilder = getQueryBuilderFromListParams({\n repository: getRepository(Operation),\n params,\n domain,\n searchables: ['name', 'description']\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n @FieldResolver(type => Domain)\n async domain(@Root() operation: Operation): Promise<Domain> {\n return await getRepository(Domain).findOne(operation.domainId)\n }\n\n @FieldResolver(type => User)\n async updater(@Root() operation: Operation): Promise<User> {\n return await getRepository(User).findOne(operation.updaterId)\n }\n\n @FieldResolver(type => User)\n async creator(@Root() operation: Operation): Promise<User> {\n return await getRepository(User).findOne(operation.creatorId)\n }\n\n @FieldResolver(type => String)\n async thumbnail(@Root() operation: Operation): Promise<string | undefined> {\n const attachment: Attachment = await getRepository(Attachment).findOne({\n where: {\n domain: operation.domainId,\n refBy: operation.id\n }\n })\n\n return attachment?.fullpath\n }\n}\n"]}
1
+ {"version":3,"file":"operation-query.js","sourceRoot":"","sources":["../../../server/service/operation/operation-query.ts"],"names":[],"mappings":";;;;;AAAA,+CAAmF;AACnF,qCAAuC;AAEvC,qEAA4D;AAC5D,yDAAgD;AAChD,iDAAwF;AAExF,2CAAuC;AACvC,qDAAgD;AAGzC,IAAM,cAAc,GAApB,MAAM,cAAc;IAEnB,AAAN,KAAK,CAAC,SAAS,CAAY,EAAU,EAAS,OAAY;QACxD,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,OAAO,MAAM,IAAA,uBAAa,EAAC,qBAAS,CAAC,CAAC,OAAO,CAAC;YAC5C,KAAK,EAA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,aAAV,UAAU,uBAAV,UAAU,CAAE,QAAQ,CAAA;IAC7B,CAAC;CACF,CAAA;AAlDO;IADL,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,qBAAS,EAAE,EAAE,WAAW,EAAE,sBAAsB,EAAE,CAAC;IACpD,mBAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;+CAM5C;AAGK;IADL,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,8BAAa,EAAE,EAAE,WAAW,EAAE,8BAA8B,EAAE,CAAC;IAC/D,mBAAA,IAAA,mBAAI,GAAE,CAAA;IAAqB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;iEAAjB,iBAAS,oBAAT,iBAAS;;gDAazC;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IAChB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAY,qBAAS;;4CAExC;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAY,qBAAS;;6CAEzC;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAY,qBAAS;;6CAEzC;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAY,qBAAS;;+CAS3C;AAnDU,cAAc;IAD1B,IAAA,uBAAQ,EAAC,qBAAS,CAAC;GACP,cAAc,CAoD1B;AApDY,wCAAc","sourcesContent":["import { Arg, Args, Ctx, FieldResolver, Query, Resolver, Root } from 'type-graphql'\nimport { getRepository } from 'typeorm'\n\nimport { Attachment } from '@things-factory/attachment-base'\nimport { User } from '@things-factory/auth-base'\nimport { Domain, getQueryBuilderFromListParams, ListParam } from '@things-factory/shell'\n\nimport { Operation } from './operation'\nimport { OperationList } from './operation-type'\n\n@Resolver(Operation)\nexport class OperationQuery {\n @Query(returns => Operation, { description: 'To fetch a Operation' })\n async operation(@Arg('id') id: string, @Ctx() context: any): Promise<Operation> {\n const { domain } = context.state\n\n return await getRepository(Operation).findOne({\n where: { domain, id }\n })\n }\n\n @Query(returns => OperationList, { description: 'To fetch multiple Operations' })\n async operations(@Args() params: ListParam, @Ctx() context: any): Promise<OperationList> {\n const { domain } = context.state\n\n const queryBuilder = getQueryBuilderFromListParams({\n repository: getRepository(Operation),\n params,\n domain,\n searchables: ['name', 'description']\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n @FieldResolver(type => Domain)\n async domain(@Root() operation: Operation): Promise<Domain> {\n return await getRepository(Domain).findOne(operation.domainId)\n }\n\n @FieldResolver(type => User)\n async updater(@Root() operation: Operation): Promise<User> {\n return await getRepository(User).findOne(operation.updaterId)\n }\n\n @FieldResolver(type => User)\n async creator(@Root() operation: Operation): Promise<User> {\n return await getRepository(User).findOne(operation.creatorId)\n }\n\n @FieldResolver(type => String)\n async thumbnail(@Root() operation: Operation): Promise<string | undefined> {\n const attachment: Attachment = await getRepository(Attachment).findOne({\n where: {\n domain: operation.domainId,\n refBy: operation.id\n }\n })\n\n return attachment?.fullpath\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"operation-type.js","sourceRoot":"","sources":["../../../server/service/operation/operation-type.ts"],"names":[],"mappings":";;;;AACA,+FAA2D;AAC3D,+CAAoE;AAEpE,2CAAuC;AAGvC,IAAa,YAAY,GAAzB,MAAa,YAAY;CAqBxB,CAAA;AAnBC;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;0CACf;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACN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;IADC,IAAA,oBAAK,GAAE;;8CACM;AA1BH,cAAc;IAD1B,IAAA,wBAAS,GAAE;GACC,cAAc,CA2B1B;AA3BY,wCAAc;AA8B3B,IAAa,aAAa,GAA1B,MAAa,aAAa;CAMzB,CAAA;AAJC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,qBAAS,CAAC,CAAC;;4CACT;AAGlB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;4CACN;AALF,aAAa;IADzB,IAAA,yBAAU,GAAE;GACA,aAAa,CAMzB;AANY,sCAAa","sourcesContent":["import type { FileUpload } from 'graphql-upload/GraphQLUpload.js'\nimport GraphQLUpload from 'graphql-upload/GraphQLUpload.js'\nimport { Field, ID, InputType, Int, ObjectType } from 'type-graphql'\n\nimport { Operation } from './operation'\n\n@InputType()\nexport class NewOperation {\n @Field({ nullable: false })\n name: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n type?: string\n\n @Field({ nullable: true })\n operationStdChart?: string\n\n @Field({ nullable: true })\n operationStdTime?: string\n\n @Field({ nullable: true })\n active?: boolean\n\n @Field(type => GraphQLUpload, { nullable: true })\n thumbnail?: FileUpload\n}\n\n@InputType()\nexport class OperationPatch {\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 type?: string\n\n @Field({ nullable: true })\n operationStdChart?: string\n\n @Field({ nullable: true })\n operationStdTime?: string\n\n @Field({ nullable: true })\n active?: boolean\n\n @Field(type => GraphQLUpload, { nullable: true })\n thumbnail?: FileUpload\n\n @Field()\n cuFlag: string\n}\n\n@ObjectType()\nexport class OperationList {\n @Field(type => [Operation])\n items: Operation[]\n\n @Field(type => Int)\n total: number\n}\n"]}
1
+ {"version":3,"file":"operation-type.js","sourceRoot":"","sources":["../../../server/service/operation/operation-type.ts"],"names":[],"mappings":";;;;AACA,+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oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wDACD;AAEzB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACV;AAEhB;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,0BAAa,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDAC3B;AAEtB;IAAC,IAAA,oBAAK,GAAE;;8CACM;AA1BH,cAAc;IAD1B,IAAA,wBAAS,GAAE;GACC,cAAc,CA2B1B;AA3BY,wCAAc;AA8BpB,IAAM,aAAa,GAAnB,MAAM,aAAa;CAMzB,CAAA;AALC;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,qBAAS,CAAC,CAAC;;4CACT;AAElB;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;4CACN;AALF,aAAa;IADzB,IAAA,yBAAU,GAAE;GACA,aAAa,CAMzB;AANY,sCAAa","sourcesContent":["import type { FileUpload } from 'graphql-upload/GraphQLUpload.js'\nimport GraphQLUpload from 'graphql-upload/GraphQLUpload.js'\nimport { Field, ID, InputType, Int, ObjectType } from 'type-graphql'\n\nimport { Operation } from './operation'\n\n@InputType()\nexport class NewOperation {\n @Field({ nullable: false })\n name: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n type?: string\n\n @Field({ nullable: true })\n operationStdChart?: string\n\n @Field({ nullable: true })\n operationStdTime?: string\n\n @Field({ nullable: true })\n active?: boolean\n\n @Field(type => GraphQLUpload, { nullable: true })\n thumbnail?: FileUpload\n}\n\n@InputType()\nexport class OperationPatch {\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 type?: string\n\n @Field({ nullable: true })\n operationStdChart?: string\n\n @Field({ nullable: true })\n operationStdTime?: string\n\n @Field({ nullable: true })\n active?: boolean\n\n @Field(type => GraphQLUpload, { nullable: true })\n thumbnail?: FileUpload\n\n @Field()\n cuFlag: string\n}\n\n@ObjectType()\nexport class OperationList {\n @Field(type => [Operation])\n items: Operation[]\n\n @Field(type => Int)\n total: number\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"operation.js","sourceRoot":"","sources":["../../../server/service/operation/operation.ts"],"names":[],"mappings":";;;;;AAAA,+CAAsE;AACtE,qCASgB;AAEhB,yDAAgD;AAChD,iDAA8C;AAE9C,IAAY,eASX;AATD,WAAY,eAAe;IACzB,wCAAqB,CAAA;IACrB,wCAAqB,CAAA;IACrB,oCAAiB,CAAA;IACjB,oCAAiB,CAAA;IACjB,mCAAgB,CAAA;IAChB,8BAAW,CAAA;IACX,mCAAgB,CAAA;IAChB,gCAAa,CAAA;AACf,CAAC,EATW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAS1B;AAED,IAAA,+BAAgB,EAAC,eAAe,EAAE;IAChC,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,kCAAkC;CAChD,CAAC,CAAA;AAKF,IAAa,SAAS,GAAtB,MAAa,SAAS;CA0ErB,CAAA;AAvEC;IAFC,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;qCACpB;AAInB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IACzB,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;0DACnC,cAAM,oBAAN,cAAM;yCAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,SAAoB,EAAE,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC;;2CACvC;AAIhB;IAFC,IAAA,gBAAM,GAAE;IACR,IAAA,oBAAK,EA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,gBAAI,EAAE;QACvB,QAAQ,EAAE,IAAI;KACf,CAAC;IACD,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;0DAC9B,gBAAI,oBAAJ,gBAAI;0CAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,SAAoB,EAAE,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC;;4CACtC;AAIlB;IAFC,IAAA,0BAAgB,GAAE;IAClB,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACd,IAAI;4CAAA;AAIhB;IAFC,IAAA,0BAAgB,GAAE;IAClB,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACd,IAAI;4CAAA;AAzEL,SAAS;IAHrB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,gBAAgB,EAAE,CAAC,SAAoB,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACvG,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,sBAAsB,EAAE,CAAC;GACvC,SAAS,CA0ErB;AA1EY,8BAAS","sourcesContent":["import { Field, ID, ObjectType, registerEnumType } from 'type-graphql'\nimport {\n Column,\n CreateDateColumn,\n Entity,\n Index,\n ManyToOne,\n PrimaryGeneratedColumn,\n RelationId,\n UpdateDateColumn\n} from 'typeorm'\n\nimport { User } from '@things-factory/auth-base'\nimport { Domain } from '@things-factory/shell'\n\nexport enum OperationStatus {\n STATUS_A = 'STATUS_A',\n STATUS_B = 'STATUS_B',\n ASSY = 'Assembly',\n INV = 'Inventory',\n PACK = 'Packing',\n SMT = 'SMT',\n STD = 'Standard',\n TEST = 'Test'\n}\n\nregisterEnumType(OperationStatus, {\n name: 'OperationStatus',\n description: 'state enumeration of a operation'\n})\n\n@Entity()\n@Index('ix_operation_0', (operation: Operation) => [operation.domain, operation.name], { unique: true })\n@ObjectType({ description: 'Entity for Operation' })\nexport class Operation {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID, { nullable: false })\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field(type => Domain, { nullable: false })\n domain: Domain\n\n @RelationId((operation: Operation) => operation.domain)\n domainId: string\n\n @Column()\n @Field({ nullable: false })\n name: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n description?: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n type?: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n operationStdChart?: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n operationStdTime?: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n active?: boolean\n\n @Field(type => String, { nullable: true })\n thumbnail?: string\n\n @ManyToOne(type => User, {\n nullable: true\n })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((operation: Operation) => operation.creator)\n creatorId?: string\n\n @ManyToOne(type => User, {\n nullable: true\n })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((operation: Operation) => operation.creator)\n updaterId?: string\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n}\n"]}
1
+ {"version":3,"file":"operation.js","sourceRoot":"","sources":["../../../server/service/operation/operation.ts"],"names":[],"mappings":";;;;;AAAA,+CAAsE;AACtE,qCASgB;AAEhB,yDAAgD;AAChD,iDAA8C;AAE9C,IAAY,eASX;AATD,WAAY,eAAe;IACzB,wCAAqB,CAAA;IACrB,wCAAqB,CAAA;IACrB,oCAAiB,CAAA;IACjB,oCAAiB,CAAA;IACjB,mCAAgB,CAAA;IAChB,8BAAW,CAAA;IACX,mCAAgB,CAAA;IAChB,gCAAa,CAAA;AACf,CAAC,EATW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QA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AAK,EAAC,gBAAgB,EAAE,CAAC,SAAoB,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACvG,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,sBAAsB,EAAE,CAAC;GACvC,SAAS,CA0ErB;AA1EY,8BAAS","sourcesContent":["import { Field, ID, ObjectType, registerEnumType } from 'type-graphql'\nimport {\n Column,\n CreateDateColumn,\n Entity,\n Index,\n ManyToOne,\n PrimaryGeneratedColumn,\n RelationId,\n UpdateDateColumn\n} from 'typeorm'\n\nimport { User } from '@things-factory/auth-base'\nimport { Domain } from '@things-factory/shell'\n\nexport enum OperationStatus {\n STATUS_A = 'STATUS_A',\n STATUS_B = 'STATUS_B',\n ASSY = 'Assembly',\n INV = 'Inventory',\n PACK = 'Packing',\n SMT = 'SMT',\n STD = 'Standard',\n TEST = 'Test'\n}\n\nregisterEnumType(OperationStatus, {\n name: 'OperationStatus',\n description: 'state enumeration of a operation'\n})\n\n@Entity()\n@Index('ix_operation_0', (operation: Operation) => [operation.domain, operation.name], { unique: true })\n@ObjectType({ description: 'Entity for Operation' })\nexport class Operation {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID, { nullable: false })\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field(type => Domain, { nullable: false })\n domain: Domain\n\n @RelationId((operation: Operation) => operation.domain)\n domainId: string\n\n @Column()\n @Field({ nullable: false })\n name: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n description?: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n type?: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n operationStdChart?: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n operationStdTime?: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n active?: boolean\n\n @Field(type => String, { nullable: true })\n thumbnail?: string\n\n @ManyToOne(type => User, {\n nullable: true\n })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((operation: Operation) => operation.creator)\n creatorId?: string\n\n @ManyToOne(type => User, {\n nullable: true\n })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((operation: Operation) => operation.creator)\n updaterId?: string\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"routing-mutation.js","sourceRoot":"","sources":["../../../server/service/routing/routing-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA2C;AAC3C,uCAAmC;AACnC,iDAAyD;AAGzD,IAAa,eAAe,GAA5B,MAAa,eAAe;IAG1B,KAAK,CAAC,aAAa,CAAiB,OAAmB,EAAS,OAAY;QAC1E,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,OAAO,MAAM,EAAE,CAAC,aAAa,CAAC,iBAAO,CAAC,CAAC,IAAI,iCACtC,OAAO,KACV,MAAM,EACN,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,IAAI,IACb,CAAA;IACJ,CAAC;IAID,KAAK,CAAC,aAAa,CACN,EAAU,EACP,KAAmB,EAC1B,OAAY;QAEnB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,MAAM,UAAU,GAAG,EAAE,CAAC,aAAa,CAAC,iBAAO,CAAC,CAAA;QAC5C,MAAM,OAAO,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC;YACvC,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;SACtB,CAAC,CAAA;QAEF,OAAO,MAAM,UAAU,CAAC,IAAI,+CACvB,OAAO,GACP,KAAK,KACR,OAAO,EAAE,IAAI,IACb,CAAA;IACJ,CAAC;IAID,KAAK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I,CAAC,CAAA;IACT,mBAAA,IAAA,kBAAG,EAAC,OAAO,CAAC,CAAA;IACZ,mBAAA,IAAA,kBAAG,GAAE,CAAA;;qDADe,2BAAY;;oDAelC;AAID;IAFC,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;;;;4DAwCP;AAID;IAFC,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,mBAAmB,EAAE,CAAC;IAC9C,mBAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;oDAKhD;AAID;IAFC,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,6BAA6B,EAAE,CAAC;IAE1E,mBAAA,IAAA,kBAAG,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAC5B,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;qDAUP;AAxGU,eAAe;IAD3B,IAAA,uBAAQ,EAAC,iBAAO,CAAC;GACL,eAAe,CAyG3B;AAzGY,0CAAe","sourcesContent":["import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'\nimport { getRepository, In } from 'typeorm'\nimport { Routing } from './routing'\nimport { NewRouting, RoutingPatch } from './routing-type'\n\n@Resolver(Routing)\nexport class RoutingMutation {\n @Directive('@transaction')\n @Mutation(returns => Routing, { description: 'To create new Routing' })\n async createRouting(@Arg('routing') routing: NewRouting, @Ctx() context: any): Promise<Routing> {\n const { domain, user, tx } = context.state\n\n return await tx.getRepository(Routing).save({\n ...routing,\n domain,\n creator: user,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => Routing, { description: 'To modify Routing information' })\n async updateRouting(\n @Arg('id') id: string,\n @Arg('patch') patch: RoutingPatch,\n @Ctx() context: any\n ): Promise<Routing> {\n const { domain, user, tx } = context.state\n\n const repository = tx.getRepository(Routing)\n const routing = await repository.findOne({\n where: { domain, id }\n })\n\n return await repository.save({\n ...routing,\n ...patch,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => [Routing], { description: \"To modify multiple Routings' information\" })\n async updateMultipleRouting(\n @Arg('patches', type => [RoutingPatch]) patches: RoutingPatch[],\n @Ctx() context: any\n ): Promise<Routing[]> {\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 routingRepo = tx.getRepository(Routing)\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 routingRepo.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 newRecord = _updateRecords[i]\n const routing = await routingRepo.findOne(newRecord.id)\n\n const result = await routingRepo.save({\n ...routing,\n ...newRecord,\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 Routing' })\n async deleteRouting(@Arg('id') id: string, @Ctx() context: any): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(Routing).delete({ domain, id })\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete multiple routings' })\n async deleteRoutings(\n @Arg('ids', type => [String]) ids: string[],\n @Ctx() context: any\n ): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(Routing).delete({\n domain,\n id: In(ids)\n })\n\n return true\n }\n}\n"]}
1
+ {"version":3,"file":"routing-mutation.js","sourceRoot":"","sources":["../../../server/service/routing/routing-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA2C;AAC3C,uCAAmC;AACnC,iDAAyD;AAGlD,IAAM,eAAe,GAArB,MAAM,eAAe;IAGpB,AAAN,KAAK,CAAC,aAAa,CAAiB,OAAmB,EAAS,OAAY;QAC1E,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,OAAO,MAAM,EAAE,CAAC,aAAa,CAAC,iBAAO,CAAC,CAAC,IAAI,iCACtC,OAAO,KACV,MAAM,EACN,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,IAAI,IACb,CAAA;IACJ,CAAC;IAIK,AAAN,KAAK,CAAC,aAAa,CACN,EAAU,EACP,KAAmB,EAC1B,OAAY;QAEnB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,MAAM,UAAU,GAAG,EAAE,CAAC,aAAa,CAAC,iBAAO,CAAC,CAAA;QAC5C,MAAM,OAAO,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC;YACvC,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;SACtB,CAAC,CAAA;QAEF,OAAO,MAAM,UAAU,CAAC,IAAI,+CACvB,OAAO,GACP,KAAK,KACR,OAAO,EAAE,IAAI,IACb,CAAA;IACJ,CAAC;IAIK,AAAN,KAAK,CAAC,qBAAqB,CACe,OAAuB,EACxD,OAAY;QAEnB,MAAM,EAAE,MAAM,EAAE,IA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CAAA;IACZ,mBAAA,IAAA,kBAAG,GAAE,CAAA;;qDADe,2BAAY;;oDAelC;AAIK;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;;;;4DAwCP;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,mBAAmB,EAAE,CAAC;IAC9C,mBAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;oDAKhD;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,6BAA6B,EAAE,CAAC;IAE1E,mBAAA,IAAA,kBAAG,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAC5B,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;qDAUP;AAxGU,eAAe;IAD3B,IAAA,uBAAQ,EAAC,iBAAO,CAAC;GACL,eAAe,CAyG3B;AAzGY,0CAAe","sourcesContent":["import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'\nimport { getRepository, In } from 'typeorm'\nimport { Routing } from './routing'\nimport { NewRouting, RoutingPatch } from './routing-type'\n\n@Resolver(Routing)\nexport class RoutingMutation {\n @Directive('@transaction')\n @Mutation(returns => Routing, { description: 'To create new Routing' })\n async createRouting(@Arg('routing') routing: NewRouting, @Ctx() context: any): Promise<Routing> {\n const { domain, user, tx } = context.state\n\n return await tx.getRepository(Routing).save({\n ...routing,\n domain,\n creator: user,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => Routing, { description: 'To modify Routing information' })\n async updateRouting(\n @Arg('id') id: string,\n @Arg('patch') patch: RoutingPatch,\n @Ctx() context: any\n ): Promise<Routing> {\n const { domain, user, tx } = context.state\n\n const repository = tx.getRepository(Routing)\n const routing = await repository.findOne({\n where: { domain, id }\n })\n\n return await repository.save({\n ...routing,\n ...patch,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => [Routing], { description: \"To modify multiple Routings' information\" })\n async updateMultipleRouting(\n @Arg('patches', type => [RoutingPatch]) patches: RoutingPatch[],\n @Ctx() context: any\n ): Promise<Routing[]> {\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 routingRepo = tx.getRepository(Routing)\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 routingRepo.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 newRecord = _updateRecords[i]\n const routing = await routingRepo.findOne(newRecord.id)\n\n const result = await routingRepo.save({\n ...routing,\n ...newRecord,\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 Routing' })\n async deleteRouting(@Arg('id') id: string, @Ctx() context: any): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(Routing).delete({ domain, id })\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete multiple routings' })\n async deleteRoutings(\n @Arg('ids', type => [String]) ids: string[],\n @Ctx() context: any\n ): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(Routing).delete({\n domain,\n id: In(ids)\n })\n\n return true\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"routing-query.js","sourceRoot":"","sources":["../../../server/service/routing/routing-query.ts"],"names":[],"mappings":";;;;;AAAA,+CAAmF;AACnF,qCAAuC;AAEvC,yDAAgD;AAChD,iDAAwF;AAExF,sDAAkD;AAClD,uCAAmC;AACnC,iDAA4C;AAG5C,IAAa,YAAY,GAAzB,MAAa,YAAY;IAEvB,KAAK,CAAC,OAAO,CAAY,EAAU,EAAS,OAAY;QACtD,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,OAAO,MAAM,IAAA,uBAAa,EAAC,iBAAO,CAAC,CAAC,OAAO,CAAC;YAC1C,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;SACxB,CAAC,CAAA;IACJ,CAAC;IAGD,KAAK,CAAC,QAAQ,CAAS,MAAiB,EAAS,OAAY;QAC3D,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,MAAM,YAAY,GAAG,IAAA,qCAA6B,EAAC;YACjD,UAAU,EAAE,IAAA,uBAAa,EAAC,iBAAO,CAAC;YAClC,MAAM;YACN,MAAM;YACN,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;IAGD,KAAK,CAAC,MAAM,CAAS,OAAgB;QACnC,OAAO,MAAM,IAAA,uBAAa,EAAC,cAAM,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;IAC9D,CAAC;IAGD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from 'type-graphql'\nimport { getRepository } from 'typeorm'\n\nimport { User } from '@things-factory/auth-base'\nimport { Domain, getQueryBuilderFromListParams, ListParam } from '@things-factory/shell'\n\nimport { Operation } from '../operation/operation'\nimport { Routing } from './routing'\nimport { RoutingList } from './routing-type'\n\n@Resolver(Routing)\nexport class RoutingQuery {\n @Query(returns => Routing, { description: 'To fetch a Routing' })\n async routing(@Arg('id') id: string, @Ctx() context: any): Promise<Routing> {\n const { domain } = context.state\n\n return await getRepository(Routing).findOne({\n where: { domain, name }\n })\n }\n\n @Query(returns => RoutingList, { description: 'To fetch multiple Routings' })\n async routings(@Args() params: ListParam, @Ctx() context: any): Promise<RoutingList> {\n const { domain } = context.state\n\n const queryBuilder = getQueryBuilderFromListParams({\n repository: getRepository(Routing),\n params,\n domain,\n searchables: ['name']\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n @FieldResolver(type => Domain)\n async domain(@Root() routing: Routing): Promise<Domain> {\n return await getRepository(Domain).findOne(routing.domainId)\n }\n\n @FieldResolver(type => User)\n async updater(@Root() routing: Routing): Promise<User> {\n return await getRepository(User).findOne(routing.updaterId)\n }\n\n @FieldResolver(type => User)\n async creator(@Root() routing: Routing): Promise<User> {\n return await getRepository(User).findOne(routing.creatorId)\n }\n}\n\nexport async function firstOperation(routingId: string, context: any): Promise<Operation> {\n const { domain, user, tx } = context.state\n const operation: Operation = await tx.getRepository(Operation).query(\n `\n select \n * \n from \n operations \n where \n id = \n (\n select \n operation_id \n from \n routing_items \n where \n routing_id = '${routingId}' \n and \n rank = \n (\n select \n min(rank) \n from \n routing_items \n where \n routing_id = '${routingId}'\n )\n )\n `\n )\n return operation\n}\n\nexport async function nextOperation(operationId: string, routingId: string, context: any): Promise<Operation> {\n const operation = await getRepository(Operation).query(\n `\n select \n * \n from \n operations \n where \n id = \n (\n select \n operation_id \n from \n routing_items \n where \n routing_id = '${routingId}' \n and \n rank = \n (\n select \n min(rank) \n from \n routing_items \n where \n routing_id = '${routingId}' \n and \n rank > \n (\n select \n rank \n from \n routing_items \n where \n routing_id = '${routingId}' \n and \n operation_id = '${operationId}'\n )\n )\n )\n `\n )\n return operation\n}\n\nexport async function prevOperation(operationId: string, routingId: string, context: any): Promise<Operation> {\n const operation = await getRepository(Operation).query(\n `\n select \n * \n from \n operations \n where \n id = \n (\n select \n operation_id \n from \n routing_items \n where \n routing_id = '${routingId}' \n and \n rank = \n (\n select \n max(rank) \n from \n routing_items \n where \n routing_id = '${routingId}' \n and \n rank < \n (\n select \n rank \n from \n routing_items \n where \n routing_id = '${routingId}' \n and \n operation_id = '${operationId}'\n )\n )\n )\n `\n )\n\n return operation\n}\n\nexport async function lastOperation(routingId: string, context: any): Promise<Operation> {\n const operation = await getRepository(Operation).query(\n `\n select \n * \n from \n operations \n where \n id = \n (\n select \n operation_id \n from \n routing_items \n where \n routing_id = '${routingId}' \n and \n rank = \n (\n select \n max(rank) \n from \n routing_items \n where \n routing_id = '${routingId}'\n )\n )\n `\n )\n return operation\n}\n"]}
1
+ {"version":3,"file":"routing-query.js","sourceRoot":"","sources":["../../../server/service/routing/routing-query.ts"],"names":[],"mappings":";;;;;AAAA,+CAAmF;AACnF,qCAAuC;AAEvC,yDAAgD;AAChD,iDAAwF;AAExF,sDAAkD;AAClD,uCAAmC;AACnC,iDAA4C;AAGrC,IAAM,YAAY,GAAlB,MAAM,YAAY;IAEjB,AAAN,KAAK,CAAC,OAAO,CAAY,EAAU,EAAS,OAAY;QACtD,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,OAAO,MAAM,IAAA,uBAAa,EAAC,iBAAO,CAAC,CAAC,OAAO,CAAC;YAC1C,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;SACxB,CAAC,CAAA;IACJ,CAAC;IAGK,AAAN,KAAK,CAAC,QAAQ,CAAS,MAAiB,EAAS,OAAY;QAC3D,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,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Aa,EAAC,qBAAS,CAAC,CAAC,KAAK,CACpD;;;;;;;;;;;;;gCAa4B,SAAS;;;;;;;;;sCASH,SAAS;;;;;;;;;4CASH,SAAS;;8CAEP,WAAW;;;;OAIlD,CACJ,CAAA;IAED,OAAO,SAAS,CAAA;AAClB,CAAC;AA3CD,sCA2CC;AAEM,KAAK,UAAU,aAAa,CAAC,SAAiB,EAAE,OAAY;IACjE,MAAM,SAAS,GAAG,MAAM,IAAA,uBAAa,EAAC,qBAAS,CAAC,CAAC,KAAK,CACpD;;;;;;;;;;;;;gCAa4B,SAAS;;;;;;;;;sCASH,SAAS;;;OAGxC,CACJ,CAAA;IACD,OAAO,SAAS,CAAA;AAClB,CAAC;AA9BD,sCA8BC","sourcesContent":["import { Arg, Args, Ctx, FieldResolver, Query, Resolver, Root } from 'type-graphql'\nimport { getRepository } from 'typeorm'\n\nimport { User } from '@things-factory/auth-base'\nimport { Domain, getQueryBuilderFromListParams, ListParam } from '@things-factory/shell'\n\nimport { Operation } from '../operation/operation'\nimport { Routing } from './routing'\nimport { RoutingList } from './routing-type'\n\n@Resolver(Routing)\nexport class RoutingQuery {\n @Query(returns => Routing, { description: 'To fetch a Routing' })\n async routing(@Arg('id') id: string, @Ctx() context: any): Promise<Routing> {\n const { domain } = context.state\n\n return await getRepository(Routing).findOne({\n where: { domain, name }\n })\n }\n\n @Query(returns => RoutingList, { description: 'To fetch multiple Routings' })\n async routings(@Args() params: ListParam, @Ctx() context: any): Promise<RoutingList> {\n const { domain } = context.state\n\n const queryBuilder = getQueryBuilderFromListParams({\n repository: getRepository(Routing),\n params,\n domain,\n searchables: ['name']\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n @FieldResolver(type => Domain)\n async domain(@Root() routing: Routing): Promise<Domain> {\n return await getRepository(Domain).findOne(routing.domainId)\n }\n\n @FieldResolver(type => User)\n async updater(@Root() routing: Routing): Promise<User> {\n return await getRepository(User).findOne(routing.updaterId)\n }\n\n @FieldResolver(type => User)\n async creator(@Root() routing: Routing): Promise<User> {\n return await getRepository(User).findOne(routing.creatorId)\n }\n}\n\nexport async function firstOperation(routingId: string, context: any): Promise<Operation> {\n const { domain, user, tx } = context.state\n const operation: Operation = await tx.getRepository(Operation).query(\n `\n select \n * \n from \n operations \n where \n id = \n (\n select \n operation_id \n from \n routing_items \n where \n routing_id = '${routingId}' \n and \n rank = \n (\n select \n min(rank) \n from \n routing_items \n where \n routing_id = '${routingId}'\n )\n )\n `\n )\n return operation\n}\n\nexport async function nextOperation(operationId: string, routingId: string, context: any): Promise<Operation> {\n const operation = await getRepository(Operation).query(\n `\n select \n * \n from \n operations \n where \n id = \n (\n select \n operation_id \n from \n routing_items \n where \n routing_id = '${routingId}' \n and \n rank = \n (\n select \n min(rank) \n from \n routing_items \n where \n routing_id = '${routingId}' \n and \n rank > \n (\n select \n rank \n from \n routing_items \n where \n routing_id = '${routingId}' \n and \n operation_id = '${operationId}'\n )\n )\n )\n `\n )\n return operation\n}\n\nexport async function prevOperation(operationId: string, routingId: string, context: any): Promise<Operation> {\n const operation = await getRepository(Operation).query(\n `\n select \n * \n from \n operations \n where \n id = \n (\n select \n operation_id \n from \n routing_items \n where \n routing_id = '${routingId}' \n and \n rank = \n (\n select \n max(rank) \n from \n routing_items \n where \n routing_id = '${routingId}' \n and \n rank < \n (\n select \n rank \n from \n routing_items \n where \n routing_id = '${routingId}' \n and \n operation_id = '${operationId}'\n )\n )\n )\n `\n )\n\n return operation\n}\n\nexport async function lastOperation(routingId: string, context: any): Promise<Operation> {\n const operation = await getRepository(Operation).query(\n `\n select \n * \n from \n operations \n where \n id = \n (\n select \n operation_id \n from \n routing_items \n where \n routing_id = '${routingId}' \n and \n rank = \n (\n select \n max(rank) \n from \n routing_items \n where \n routing_id = '${routingId}'\n )\n )\n `\n )\n return operation\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"routing-type.js","sourceRoot":"","sources":["../../../server/service/routing/routing-type.ts"],"names":[],"mappings":";;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AAG,CAAC;;0CACN;AALF,WAAW;IADvB,IAAA,yBAAU,GAAE;GACA,WAAW,CAMvB;AANY,kCAAW","sourcesContent":["import { ObjectType, Field, InputType, Int, ID, registerEnumType } from 'type-graphql'\n\nimport { Routing } from './routing'\n\n@InputType()\nexport class NewRouting {\n @Field({ nullable: false })\n name: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n createdLot?: boolean\n\n @Field({ nullable: true })\n active?: boolean\n}\n\n@InputType()\nexport class RoutingPatch {\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 createdLot?: boolean\n\n @Field({ nullable: true })\n active?: boolean\n\n @Field()\n cuFlag: string\n}\n\n@ObjectType()\nexport class RoutingList {\n @Field(type => [Routing])\n items: Routing[]\n\n @Field(type => Int)\n total: number\n}\n"]}
1
+ {"version":3,"file":"routing-type.js","sourceRoot":"","sources":["../../../server/service/routing/routing-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAsF;AAEtF,uCAAmC;AAG5B,IAAM,UAAU,GAAhB,MAAM,UAAU;CAYtB,CAAA;AAXC;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;wCACf;AAEZ;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACN;AAEpB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACN;AAEpB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACV;AAXL,UAAU;IADtB,IAAA,wBAAS,GAAE;GACC,UAAU,CAYtB;AAZY,gCAAU;AAehB,IAAM,YAAY,GAAlB,MAAM,YAAY;CAkBxB,CAAA;AAjBC;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wCAC5B;AAEV;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACd;AAEZ;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACN;AAEpB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACN;AAEpB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACV;AAEhB;IAAC,IAAA,oBAAK,GAAE;;4CACM;AAjBH,YAAY;IADxB,IAAA,wBAAS,GAAE;GACC,YAAY,CAkBxB;AAlBY,oCAAY;AAqBlB,IAAM,WAAW,GAAjB,MAAM,WAAW;CAMvB,CAAA;AALC;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,iBAAO,CAAC,CAAC;;0CACT;AAEhB;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;0CACN;AALF,WAAW;IADvB,IAAA,yBAAU,GAAE;GACA,WAAW,CAMvB;AANY,kCAAW","sourcesContent":["import { ObjectType, Field, InputType, Int, ID, registerEnumType } from 'type-graphql'\n\nimport { Routing } from './routing'\n\n@InputType()\nexport class NewRouting {\n @Field({ nullable: false })\n name: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n createdLot?: boolean\n\n @Field({ nullable: true })\n active?: boolean\n}\n\n@InputType()\nexport class RoutingPatch {\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 createdLot?: boolean\n\n @Field({ nullable: true })\n active?: boolean\n\n @Field()\n cuFlag: string\n}\n\n@ObjectType()\nexport class RoutingList {\n @Field(type => [Routing])\n items: Routing[]\n\n @Field(type => Int)\n total: number\n}\n"]}
@@ -1 +1 @@
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F,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,oBAAoB,EAAE,CAAC;GACrC,OAAO,CA2DnB;AA3DY,0BAAO","sourcesContent":["import {\n CreateDateColumn,\n UpdateDateColumn,\n Entity,\n Index,\n Column,\n RelationId,\n ManyToOne,\n PrimaryGeneratedColumn\n} from 'typeorm'\nimport { ObjectType, Field, Int, ID, registerEnumType } from 'type-graphql'\n\nimport { Domain } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\n\nexport enum RoutingStatus {\n STATUS_A = 'STATUS_A',\n STATUS_B = 'STATUS_B'\n}\n\nregisterEnumType(RoutingStatus, {\n name: 'RoutingStatus',\n description: 'state enumeration of a routing'\n})\n\n@Entity()\n@Index('ix_routing_0', (routing: Routing) => [routing.domain, routing.name], { unique: true })\n@ObjectType({ description: 'Entity for Routing' })\nexport class Routing {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID, { nullable: false })\n readonly id: string\n\n @ManyToOne(type => Domain, { nullable: false })\n @Field({ nullable: false })\n domain?: Domain\n\n @RelationId((routing: Routing) => routing.domain)\n domainId?: string\n\n @Column({ nullable: false })\n @Field({ nullable: false })\n name: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n description?: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n createdLot?: boolean\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n active?: boolean\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, {\n nullable: true\n })\n @Field({ nullable: true })\n creator?: User\n\n @RelationId((routing: Routing) => routing.creator)\n creatorId?: string\n\n @ManyToOne(type => User, {\n nullable: true\n })\n @Field({ nullable: true })\n updater?: User\n\n @RelationId((routing: Routing) => routing.creator)\n updaterId?: string\n}\n"]}
1
+ {"version":3,"file":"routing.js","sourceRoot":"","sources":["../../../server/service/routing/routing.ts"],"names":[],"mappings":";;;;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,CA2DnB;AA3DY,0BAAO","sourcesContent":["import {\n CreateDateColumn,\n UpdateDateColumn,\n Entity,\n Index,\n Column,\n RelationId,\n ManyToOne,\n PrimaryGeneratedColumn\n} from 'typeorm'\nimport { ObjectType, Field, Int, ID, registerEnumType } from 'type-graphql'\n\nimport { Domain } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\n\nexport enum RoutingStatus {\n STATUS_A = 'STATUS_A',\n STATUS_B = 'STATUS_B'\n}\n\nregisterEnumType(RoutingStatus, {\n name: 'RoutingStatus',\n description: 'state enumeration of a routing'\n})\n\n@Entity()\n@Index('ix_routing_0', (routing: Routing) => [routing.domain, routing.name], { unique: true })\n@ObjectType({ description: 'Entity for Routing' })\nexport class Routing {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID, { nullable: false })\n readonly id: string\n\n @ManyToOne(type => Domain, { nullable: false })\n @Field({ nullable: false })\n domain?: Domain\n\n @RelationId((routing: Routing) => routing.domain)\n domainId?: string\n\n @Column({ nullable: false })\n @Field({ nullable: false })\n name: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n description?: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n createdLot?: boolean\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n active?: boolean\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, {\n nullable: true\n })\n @Field({ nullable: true })\n creator?: User\n\n @RelationId((routing: Routing) => routing.creator)\n creatorId?: string\n\n @ManyToOne(type => User, {\n nullable: true\n })\n @Field({ nullable: true })\n updater?: User\n\n @RelationId((routing: Routing) => routing.creator)\n updaterId?: string\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"routing-item-mutation.js","sourceRoot":"","sources":["../../../server/service/routing-item/routing-item-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAMqB;AACrB,qCAA4B;AAE5B,iDAA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G,GAAE,CAAA;;;;oEAwCP;AAID;IAFC,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,uBAAuB,EAAE,CAAC;IAC9C,mBAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;4DAKpD;AAID;IAFC,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,iCAAiC,EAAE,CAAC;IACvD,mBAAA,IAAA,kBAAG,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAAiB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;6DAS3E;AArGU,mBAAmB;IAD/B,IAAA,uBAAQ,EAAC,0BAAW,CAAC;GACT,mBAAmB,CAsG/B;AAtGY,kDAAmB","sourcesContent":["import {\n Arg,\n Ctx,\n Directive,\n Mutation,\n Resolver\n} from 'type-graphql'\nimport { In } from 'typeorm'\n\nimport { RoutingItem } from './routing-item'\nimport {\n NewRoutingItem,\n RoutingItemPatch\n} from './routing-item-type'\n\n@Resolver(RoutingItem)\nexport class RoutingItemMutation {\n @Directive('@transaction')\n @Mutation(returns => RoutingItem, { description: 'To create new RoutingItem' })\n async createRoutingItem(@Arg('routingItem') routingItem: NewRoutingItem, @Ctx() context: any): Promise<RoutingItem> {\n const { domain, user, tx } = context.state\n\n return await tx.getRepository(RoutingItem).save({\n ...routingItem,\n domain,\n creator: user,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => RoutingItem, { description: 'To modify RoutingItem information' })\n async updateRoutingItem(\n @Arg('id') id: string,\n @Arg('patch') patch: RoutingItemPatch,\n @Ctx() context: any\n ): Promise<RoutingItem> {\n const { domain, user, tx } = context.state\n\n const repository = tx.getRepository(RoutingItem)\n const routingItem = await repository.findOne({\n where: { domain, id }\n })\n\n return await repository.save({\n ...routingItem,\n ...patch,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => [RoutingItem], { description: \"To modify multiple RoutingItems' information\" })\n async updateMultipleRoutingItem(\n @Arg('patches', type => [RoutingItemPatch]) patches: RoutingItemPatch[],\n @Ctx() context: any\n ): Promise<RoutingItem[]> {\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 routingItemRepo = tx.getRepository(RoutingItem)\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 routingItemRepo.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 newRecord = _updateRecords[i]\n const routingItem = await routingItemRepo.findOne(newRecord.id)\n\n const result = await routingItemRepo.save({\n ...routingItem,\n ...newRecord,\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 RoutingItem' })\n async deleteRoutingItem(@Arg('id') id: string, @Ctx() context: any): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(RoutingItem).delete({ domain, id })\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete multiple routingItems' })\n async deleteRoutingItems(@Arg('ids', type => [String]) ids: string[], @Ctx() context: any): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(RoutingItem).delete({\n domain,\n id: In(ids)\n })\n\n return true\n }\n}\n"]}
1
+ {"version":3,"file":"routing-item-mutation.js","sourceRoot":"","sources":["../../../server/service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AAA,IAAA,kBAAG,EAAC,SAAS,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,oCAAgB,CAAC,CAAC,CAAA;IAC1C,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;oEAwCP;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,uBAAuB,EAAE,CAAC;IAC9C,mBAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;4DAKpD;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,iCAAiC,EAAE,CAAC;IACvD,mBAAA,IAAA,kBAAG,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAAiB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;6DAS3E;AArGU,mBAAmB;IAD/B,IAAA,uBAAQ,EAAC,0BAAW,CAAC;GACT,mBAAmB,CAsG/B;AAtGY,kDAAmB","sourcesContent":["import {\n Arg,\n Ctx,\n Directive,\n Mutation,\n Resolver\n} from 'type-graphql'\nimport { In } from 'typeorm'\n\nimport { RoutingItem } from './routing-item'\nimport {\n NewRoutingItem,\n RoutingItemPatch\n} from './routing-item-type'\n\n@Resolver(RoutingItem)\nexport class RoutingItemMutation {\n @Directive('@transaction')\n @Mutation(returns => RoutingItem, { description: 'To create new RoutingItem' })\n async createRoutingItem(@Arg('routingItem') routingItem: NewRoutingItem, @Ctx() context: any): Promise<RoutingItem> {\n const { domain, user, tx } = context.state\n\n return await tx.getRepository(RoutingItem).save({\n ...routingItem,\n domain,\n creator: user,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => RoutingItem, { description: 'To modify RoutingItem information' })\n async updateRoutingItem(\n @Arg('id') id: string,\n @Arg('patch') patch: RoutingItemPatch,\n @Ctx() context: any\n ): Promise<RoutingItem> {\n const { domain, user, tx } = context.state\n\n const repository = tx.getRepository(RoutingItem)\n const routingItem = await repository.findOne({\n where: { domain, id }\n })\n\n return await repository.save({\n ...routingItem,\n ...patch,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => [RoutingItem], { description: \"To modify multiple RoutingItems' information\" })\n async updateMultipleRoutingItem(\n @Arg('patches', type => [RoutingItemPatch]) patches: RoutingItemPatch[],\n @Ctx() context: any\n ): Promise<RoutingItem[]> {\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 routingItemRepo = tx.getRepository(RoutingItem)\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 routingItemRepo.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 newRecord = _updateRecords[i]\n const routingItem = await routingItemRepo.findOne(newRecord.id)\n\n const result = await routingItemRepo.save({\n ...routingItem,\n ...newRecord,\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 RoutingItem' })\n async deleteRoutingItem(@Arg('id') id: string, @Ctx() context: any): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(RoutingItem).delete({ domain, id })\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete multiple routingItems' })\n async deleteRoutingItems(@Arg('ids', type => [String]) ids: string[], @Ctx() context: any): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(RoutingItem).delete({\n domain,\n id: In(ids)\n })\n\n return true\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"routing-item-query.js","sourceRoot":"","sources":["../../../server/service/routing-item/routing-item-query.ts"],"names":[],"mappings":";;;;;AAAA,+CAA8E;AAC9E,qCAAuC;AAEvC,yDAAgD;AAChD,iDAAwF;AAExF,sDAAkD;AAClD,gDAA4C;AAC5C,iDAA4C;AAC5C,2DAAqD;AAGrD,IAAa,gBAAgB,GAA7B,MAAa,gBAAgB;IAE3B,KAAK,CAAC,YAAY,CAAS,MAAiB,EAAS,OAAY;QAC/D,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,MAAM,YAAY,GAAG,IAAA,qCAA6B,EAAC;YACjD,UAAU,EAAE,IAAA,uBAAa,EAAC,0BAAW,CAAC;YACtC,MAAM;YACN,MAAM;YACN,KAAK,EAAE,IAAI;YACX,WAAW,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC;SACrC,CAAC,CAAA;QAEF,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,YAAY;aACtC,iBAAiB,CAAC,YAAY,EAAE,SAAS,CAAC;aAC1C,iBAAiB,CAAC,cAAc,EAAE,WAAW,CAAC;aAC9C,eAAe,EAAE,CAAA;QAEpB,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;IACzB,CAAC;IAGD,KAAK,CAAC,OAAO,CAAS,WAAwB;QAC5C,OAAO,WAAW,CAAC,OAAO,IAAI,CAAC,MAAM,IAAA,uBAAa,EAAC,iBAAO,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAA;IAC7F,CAAC;IAGD,KAAK,CAAC,SAAS,CAAS,WAAwB;QAC9C,OAAO,WAAW,CAAC,SAAS,IAAI,CAAC,MAAM,IAAA,uBAAa,EAAC,qBAAS,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,WAAW,C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E7C;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAc,0BAAW;;+CAE7C;AA5CU,gBAAgB;IAD5B,IAAA,uBAAQ,EAAC,0BAAW,CAAC;GACT,gBAAgB,CA6C5B;AA7CY,4CAAgB","sourcesContent":["import { Args, Ctx, FieldResolver, Query, Resolver, Root } from 'type-graphql'\nimport { getRepository } from 'typeorm'\n\nimport { User } from '@things-factory/auth-base'\nimport { Domain, getQueryBuilderFromListParams, ListParam } from '@things-factory/shell'\n\nimport { Operation } from '../operation/operation'\nimport { Routing } from '../routing/routing'\nimport { RoutingItem } from './routing-item'\nimport { RoutingItemList } from './routing-item-type'\n\n@Resolver(RoutingItem)\nexport class RoutingItemQuery {\n @Query(returns => RoutingItemList, { description: 'To fetch multiple RoutingItems' })\n async routingItems(@Args() params: ListParam, @Ctx() context: any): Promise<RoutingItemList> {\n const { domain } = context.state\n\n const queryBuilder = getQueryBuilderFromListParams({\n repository: getRepository(RoutingItem),\n params,\n domain,\n alias: 'ri',\n searchables: ['name', 'description']\n })\n\n const [items, total] = await queryBuilder\n .leftJoinAndSelect('ri.routing', 'routing')\n .leftJoinAndSelect('ri.operation', 'operation')\n .getManyAndCount()\n\n return { items, total }\n }\n\n @FieldResolver(type => Routing)\n async routing(@Root() routingItem: RoutingItem): Promise<Routing> {\n return routingItem.routing || (await getRepository(Routing).findOne(routingItem.routingId))\n }\n\n @FieldResolver(type => Operation)\n async operation(@Root() routingItem: RoutingItem): Promise<Operation> {\n return routingItem.operation || (await getRepository(Operation).findOne(routingItem.operationId))\n }\n\n @FieldResolver(type => Domain)\n async domain(@Root() routingItem: RoutingItem): Promise<Domain> {\n return await getRepository(Domain).findOne(routingItem.domainId)\n }\n\n @FieldResolver(type => User)\n async updater(@Root() routingItem: RoutingItem): Promise<User> {\n return await getRepository(User).findOne(routingItem.updaterId)\n }\n\n @FieldResolver(type => User)\n async creator(@Root() routingItem: RoutingItem): Promise<User> {\n return await getRepository(User).findOne(routingItem.creatorId)\n }\n}\n"]}
1
+ {"version":3,"file":"routing-item-query.js","sourceRoot":"","sources":["../../../server/service/routing-item/routing-item-query.ts"],"names":[],"mappings":";;;;;AAAA,+CAA8E;AAC9E,qCAAuC;AAEvC,yDAAgD;AAChD,iDAAwF;AAExF,sDAAkD;AAClD,gDAA4C;AAC5C,iDAA4C;AAC5C,2DAAqD;AAG9C,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAErB,AAAN,KAAK,CAAC,YAAY,CAAS,MAAiB,EAAS,OAAY;QAC/D,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,MAAM,YAAY,GAAG,IAAA,qCAA6B,EAAC;YACjD,UAAU,EAAE,IAAA,uBAAa,EAAC,0BAAW,CAAC;YACtC,MAAM;YACN,MAAM;YACN,KAAK,EAAE,IAAI;YACX,WAAW,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC;SACrC,CAAC,CAAA;QAEF,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,YAAY;aACtC,iBAAiB,CAAC,YAAY,EAAE,SAAS,CAAC;aAC1C,iBAAiB,CAAC,cAAc,EAAE,WAAW,CAAC;aAC9C,eAAe,EAAE,CAAA;QAEpB,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;IACzB,CAAC;IAGK,AAAN,KAAK,CAAC,OAAO,CAAS,WAAwB;QAC5C,OAAO,WAAW,CAAC,OAAO,IAAI,CAAC,MAAM,IAAA,uBAAa,EAAC,iBAAO,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAA;IAC7F,CAAC;IAGK,AAAN,KAAK,CAAC,SAAS,CAAS,WAAwB;QAC9C,OAAO,WAAW,CAAC,SAAS,IAAI,CAAC,MAAM,IAAA,uBAAa,EAAC,qBAAS,CAAC,CAAC,OAAO,CAAC,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AAI,GAAE,CAAA;;6CAAc,0BAAW;;+CAE7C;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAc,0BAAW;;+CAE7C;AA5CU,gBAAgB;IAD5B,IAAA,uBAAQ,EAAC,0BAAW,CAAC;GACT,gBAAgB,CA6C5B;AA7CY,4CAAgB","sourcesContent":["import { Args, Ctx, FieldResolver, Query, Resolver, Root } from 'type-graphql'\nimport { getRepository } from 'typeorm'\n\nimport { User } from '@things-factory/auth-base'\nimport { Domain, getQueryBuilderFromListParams, ListParam } from '@things-factory/shell'\n\nimport { Operation } from '../operation/operation'\nimport { Routing } from '../routing/routing'\nimport { RoutingItem } from './routing-item'\nimport { RoutingItemList } from './routing-item-type'\n\n@Resolver(RoutingItem)\nexport class RoutingItemQuery {\n @Query(returns => RoutingItemList, { description: 'To fetch multiple RoutingItems' })\n async routingItems(@Args() params: ListParam, @Ctx() context: any): Promise<RoutingItemList> {\n const { domain } = context.state\n\n const queryBuilder = getQueryBuilderFromListParams({\n repository: getRepository(RoutingItem),\n params,\n domain,\n alias: 'ri',\n searchables: ['name', 'description']\n })\n\n const [items, total] = await queryBuilder\n .leftJoinAndSelect('ri.routing', 'routing')\n .leftJoinAndSelect('ri.operation', 'operation')\n .getManyAndCount()\n\n return { items, total }\n }\n\n @FieldResolver(type => Routing)\n async routing(@Root() routingItem: RoutingItem): Promise<Routing> {\n return routingItem.routing || (await getRepository(Routing).findOne(routingItem.routingId))\n }\n\n @FieldResolver(type => Operation)\n async operation(@Root() routingItem: RoutingItem): Promise<Operation> {\n return routingItem.operation || (await getRepository(Operation).findOne(routingItem.operationId))\n }\n\n @FieldResolver(type => Domain)\n async domain(@Root() routingItem: RoutingItem): Promise<Domain> {\n return await getRepository(Domain).findOne(routingItem.domainId)\n }\n\n @FieldResolver(type => User)\n async updater(@Root() routingItem: RoutingItem): Promise<User> {\n return await getRepository(User).findOne(routingItem.updaterId)\n }\n\n @FieldResolver(type => User)\n async creator(@Root() routingItem: RoutingItem): Promise<User> {\n return await getRepository(User).findOne(routingItem.creatorId)\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"routing-item-type.js","sourceRoot":"","sources":["../../../server/service/routing-item/routing-item-type.ts"],"names":[],"mappings":";;;;;AAAA,+CAAsF;AACtF,iDAAiD;AAEjD,iDAA4C;AAG5C,IAAa,cAAc,GAA3B,MAAa,cAAc;CAqB1B,CAAA;AAnBC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;0DACpC,iBAAS,oBAAT,iBAAS;+CAAA;AAGlB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACd;AAGZ;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;0DAClC,iBAAS,oBAAT,iBAAS;iDAAA;AAGpB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0DACC;AAG3B;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACT;AAGjB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDACH;AAGvB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACV;AApBL,cAAc;IAD1B,IAAA,wBAAS,GAAE;GACC,cAAc,CAqB1B;AArBY,wCAAc;AAwB3B,IAAa,gBAAgB,GAA7B,MAAa,gBAAgB;CA2B5B,CAAA;AAzBC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CAC5B;AAGV;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;0DACpC,iBAAS,oBAAT,iBAAS;iDAAA;AAGlB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACd;AAGZ;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;0DACjC,iBAAS,oBAAT,iBAAS;mDAAA;AAGrB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4DACC;AAG3B;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACT;AAGjB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wDACH;AAGvB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACV;AAGhB;IADC,IAAA,oBAAK,GAAE;;gDACM;AA1BH,gBAAgB;IAD5B,IAAA,wBAAS,GAAE;GACC,gBAAgB,CA2B5B;AA3BY,4CAAgB;AA8B7B,IAAa,eAAe,GAA5B,MAAa,eAAe;CAM3B,CAAA;AAJC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,0BAAW,CAAC,CAAC;;8CACT;AAGpB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;8CACN;AALF,eAAe;IAD3B,IAAA,yBAAU,GAAE;GACA,eAAe,CAM3B;AANY,0CAAe","sourcesContent":["import { ObjectType, Field, InputType, Int, ID, registerEnumType } from 'type-graphql'\nimport { ObjectRef } from '@things-factory/shell'\n\nimport { RoutingItem } from './routing-item'\n\n@InputType()\nexport class NewRoutingItem {\n @Field(type => ObjectRef, { nullable: true })\n routing: ObjectRef\n\n @Field({ nullable: true })\n rank: string\n\n @Field(type => ObjectRef, { nullable: true })\n operation: ObjectRef\n\n @Field({ nullable: true })\n startedTransaction?: string\n\n @Field({ nullable: true })\n isStock?: boolean\n\n @Field({ nullable: true })\n operatorViewId?: string\n\n @Field({ nullable: true })\n active?: boolean\n}\n\n@InputType()\nexport class RoutingItemPatch {\n @Field(type => ID, { nullable: true })\n id: string\n\n @Field(type => ObjectRef, { nullable: true })\n routing: ObjectRef\n\n @Field({ nullable: true })\n rank: string\n\n @Field(type => ObjectRef, { nullable: true })\n operation?: ObjectRef\n\n @Field({ nullable: true })\n startedTransaction?: string\n\n @Field({ nullable: true })\n isStock?: boolean\n\n @Field({ nullable: true })\n operatorViewId?: string\n\n @Field({ nullable: true })\n active?: boolean\n\n @Field()\n cuFlag: string\n}\n\n@ObjectType()\nexport class RoutingItemList {\n @Field(type => [RoutingItem])\n items: RoutingItem[]\n\n @Field(type => Int)\n total: number\n}\n"]}
1
+ {"version":3,"file":"routing-item-type.js","sourceRoot":"","sources":["../../../server/service/routing-item/routing-item-type.ts"],"names":[],"mappings":";;;;;AAAA,+CAAsF;AACtF,iDAAiD;AAEjD,iDAA4C;AAGrC,IAAM,cAAc,GAApB,MAAM,cAAc;CAqB1B,CAAA;AApBC;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;0DACpC,iBAAS,oBAAT,iBAAS;+CAAA;AAElB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACd;AAEZ;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;0DAClC,iBAAS,oBAAT,iBAAS;iDAAA;AAEpB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0DACC;AAE3B;IA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A2B5B;AA3BY,4CAAgB;AA8BtB,IAAM,eAAe,GAArB,MAAM,eAAe;CAM3B,CAAA;AALC;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,0BAAW,CAAC,CAAC;;8CACT;AAEpB;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;8CACN;AALF,eAAe;IAD3B,IAAA,yBAAU,GAAE;GACA,eAAe,CAM3B;AANY,0CAAe","sourcesContent":["import { ObjectType, Field, InputType, Int, ID, registerEnumType } from 'type-graphql'\nimport { ObjectRef } from '@things-factory/shell'\n\nimport { RoutingItem } from './routing-item'\n\n@InputType()\nexport class NewRoutingItem {\n @Field(type => ObjectRef, { nullable: true })\n routing: ObjectRef\n\n @Field({ nullable: true })\n rank: string\n\n @Field(type => ObjectRef, { nullable: true })\n operation: ObjectRef\n\n @Field({ nullable: true })\n startedTransaction?: string\n\n @Field({ nullable: true })\n isStock?: boolean\n\n @Field({ nullable: true })\n operatorViewId?: string\n\n @Field({ nullable: true })\n active?: boolean\n}\n\n@InputType()\nexport class RoutingItemPatch {\n @Field(type => ID, { nullable: true })\n id: string\n\n @Field(type => ObjectRef, { nullable: true })\n routing: ObjectRef\n\n @Field({ nullable: true })\n rank: string\n\n @Field(type => ObjectRef, { nullable: true })\n operation?: ObjectRef\n\n @Field({ nullable: true })\n startedTransaction?: string\n\n @Field({ nullable: true })\n isStock?: boolean\n\n @Field({ nullable: true })\n operatorViewId?: string\n\n @Field({ nullable: true })\n active?: boolean\n\n @Field()\n cuFlag: string\n}\n\n@ObjectType()\nexport class RoutingItemList {\n @Field(type => [RoutingItem])\n items: RoutingItem[]\n\n @Field(type => Int)\n total: number\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"routing-item.js","sourceRoot":"","sources":["../../../server/service/routing-item/routing-item.ts"],"names":[],"mappings":";;;;;AAAA,+CAKqB;AACrB,qCASgB;AAEhB,yDAAgD;AAChD,iDAA8C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AAJ,gBAAI;4CAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,WAAwB,EAAE,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC;;8CAC5C;AAMlB;IAJC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE;QACvB,QAAQ,EAAE,IAAI;KACf,CAAC;IACD,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;0DAChB,gBAAI,oBAAJ,gBAAI;4CAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,WAAwB,EAAE,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC;;8CAC5C;AAhFP,WAAW;IAPvB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EACJ,mBAAmB,EACnB,CAAC,WAAwB,EAAE,EAAE,CAAC,CAAC,WAAW,CAAC,IAAI,EAAE,WAAW,CAAC,MAAM,EAAE,WAAW,CAAC,OAAO,EAAE,WAAW,CAAC,SAAS,CAAC,EAChH,EAAE,MAAM,EAAE,IAAI,EAAE,CACjB;IACA,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,wBAAwB,EAAE,CAAC;GACzC,WAAW,CAiFvB;AAjFY,kCAAW","sourcesContent":["import {\n Field,\n ID,\n ObjectType,\n registerEnumType\n} from 'type-graphql'\nimport {\n Column,\n CreateDateColumn,\n Entity,\n Index,\n ManyToOne,\n PrimaryGeneratedColumn,\n RelationId,\n UpdateDateColumn\n} from 'typeorm'\n\nimport { User } from '@things-factory/auth-base'\nimport { Domain } from '@things-factory/shell'\n\nimport { Operation } from '../operation/operation'\nimport { Routing } from '../routing/routing'\n\nexport enum RoutingItemStatus {\n STATUS_A = 'STATUS_A',\n STATUS_B = 'STATUS_B'\n}\n\nregisterEnumType(RoutingItemStatus, {\n name: 'RoutingItemStatus',\n description: 'state enumeration of a routingItem'\n})\n\n@Entity()\n@Index(\n 'ix_routing_item_0',\n (routingItem: RoutingItem) => [routingItem.rank, routingItem.domain, routingItem.routing, routingItem.operation],\n { unique: true }\n)\n@ObjectType({ description: 'Entity for RoutingItem' })\nexport class RoutingItem {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID, { nullable: false })\n readonly id: string\n\n @ManyToOne(type => Domain, { nullable: false })\n @Field({ nullable: false })\n domain: Domain\n\n @RelationId((routingItem: RoutingItem) => routingItem.domain)\n domainId: string\n\n @ManyToOne(type => Routing, { nullable: true })\n @Field({ nullable: true })\n routing: Routing\n\n @RelationId((routingItem: RoutingItem) => routingItem.routing)\n routingId: string\n\n @Column({\n nullable: false\n })\n @Field({ nullable: false })\n rank: string\n\n @ManyToOne(type => Operation, { nullable: true })\n @Field({ nullable: true })\n operation: Operation\n\n @RelationId((routingItem: RoutingItem) => routingItem.operation)\n operationId: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n startedTransaction?: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n isStock?: boolean\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n operatorViewId?: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n active?: boolean\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, {\n nullable: true\n })\n @Field({ nullable: true })\n creator?: User\n\n @RelationId((routingItem: RoutingItem) => routingItem.creator)\n creatorId?: string\n\n @ManyToOne(type => User, {\n nullable: true\n })\n @Field({ nullable: true })\n updater?: User\n\n @RelationId((routingItem: RoutingItem) => routingItem.creator)\n updaterId?: string\n}\n"]}
1
+ {"version":3,"file":"routing-item.js","sourceRoot":"","sources":["../../../server/service/routing-item/routing-item.ts"],"names":[],"mappings":";;;;;AAAA,+CAKqB;AACrB,qCASgB;AAEhB,yDAAgD;AAChD,iDAA8C;AAE9C,sDAAkD;AAClD,gDAA4C;AAE5C,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,0CAAqB,CAAA;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CAAC,OAAO,CAAC;;8CAC5C;AAElB;IAAC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE;QACvB,QAAQ,EAAE,IAAI;KACf,CAAC;IACD,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;0DAChB,gBAAI,oBAAJ,gBAAI;4CAAA;AAEd;IAAC,IAAA,oBAAU,EAAC,CAAC,WAAwB,EAAE,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC;;8CAC5C;AAhFP,WAAW;IAPvB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EACJ,mBAAmB,EACnB,CAAC,WAAwB,EAAE,EAAE,CAAC,CAAC,WAAW,CAAC,IAAI,EAAE,WAAW,CAAC,MAAM,EAAE,WAAW,CAAC,OAAO,EAAE,WAAW,CAAC,SAAS,CAAC,EAChH,EAAE,MAAM,EAAE,IAAI,EAAE,CACjB;IACA,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,wBAAwB,EAAE,CAAC;GACzC,WAAW,CAiFvB;AAjFY,kCAAW","sourcesContent":["import {\n Field,\n ID,\n ObjectType,\n registerEnumType\n} from 'type-graphql'\nimport {\n Column,\n CreateDateColumn,\n Entity,\n Index,\n ManyToOne,\n PrimaryGeneratedColumn,\n RelationId,\n UpdateDateColumn\n} from 'typeorm'\n\nimport { User } from '@things-factory/auth-base'\nimport { Domain } from '@things-factory/shell'\n\nimport { Operation } from '../operation/operation'\nimport { Routing } from '../routing/routing'\n\nexport enum RoutingItemStatus {\n STATUS_A = 'STATUS_A',\n STATUS_B = 'STATUS_B'\n}\n\nregisterEnumType(RoutingItemStatus, {\n name: 'RoutingItemStatus',\n description: 'state enumeration of a routingItem'\n})\n\n@Entity()\n@Index(\n 'ix_routing_item_0',\n (routingItem: RoutingItem) => [routingItem.rank, routingItem.domain, routingItem.routing, routingItem.operation],\n { unique: true }\n)\n@ObjectType({ description: 'Entity for RoutingItem' })\nexport class RoutingItem {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID, { nullable: false })\n readonly id: string\n\n @ManyToOne(type => Domain, { nullable: false })\n @Field({ nullable: false })\n domain: Domain\n\n @RelationId((routingItem: RoutingItem) => routingItem.domain)\n domainId: string\n\n @ManyToOne(type => Routing, { nullable: true })\n @Field({ nullable: true })\n routing: Routing\n\n @RelationId((routingItem: RoutingItem) => routingItem.routing)\n routingId: string\n\n @Column({\n nullable: false\n })\n @Field({ nullable: false })\n rank: string\n\n @ManyToOne(type => Operation, { nullable: true })\n @Field({ nullable: true })\n operation: Operation\n\n @RelationId((routingItem: RoutingItem) => routingItem.operation)\n operationId: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n startedTransaction?: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n isStock?: boolean\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n operatorViewId?: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n active?: boolean\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, {\n nullable: true\n })\n @Field({ nullable: true })\n creator?: User\n\n @RelationId((routingItem: RoutingItem) => routingItem.creator)\n creatorId?: string\n\n @ManyToOne(type => User, {\n nullable: true\n })\n @Field({ nullable: true })\n updater?: User\n\n @RelationId((routingItem: RoutingItem) => routingItem.creator)\n updaterId?: string\n}\n"]}