@dssp/project 1.0.0-alpha.38 → 1.0.0-alpha.40
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/index.d.ts +1 -0
- package/dist-client/index.js +1 -1
- package/dist-client/index.js.map +1 -1
- package/dist-client/pages/lib/chatbot-widget.d.ts +43 -0
- package/dist-client/pages/lib/chatbot-widget.js +469 -0
- package/dist-client/pages/lib/chatbot-widget.js.map +1 -0
- package/dist-client/pages/project/project-detail.js +2 -2
- package/dist-client/pages/project/project-detail.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/service/index.d.ts +2 -2
- package/dist-server/service/project/project-query.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -9,7 +9,7 @@ export * from './manager/manager';
|
|
|
9
9
|
export * from './manager/manager-type';
|
|
10
10
|
export * from './task/task';
|
|
11
11
|
export * from './project/project';
|
|
12
|
-
export declare const entities: (typeof import("./project/project").Project | typeof import("./task/task").Task | typeof import("./task-checklist-binding/task-checklist-binding").TaskChecklistBinding | typeof import("./task-resource/task-resource").TaskResource | typeof import("./resource/resource").Resource | typeof import("./construction-type/construction-type").
|
|
12
|
+
export declare const entities: (typeof import("./project/project").Project | typeof import("./task/task").Task | typeof import("./task-checklist-binding/task-checklist-binding").TaskChecklistBinding | typeof import("./task-resource/task-resource").TaskResource | typeof import("./resource/resource").Resource | typeof import("./construction-detail-type/construction-detail-type").ConstructionDetailType | typeof import("./construction-type/construction-type").ConstructionType | typeof import("./inspection-drawing-type/inspection-drawing-type").InspectionDrawingType | typeof import("./inspection-part/inspection-part").InspectionPart | typeof import("./worker-type/worker-type").WorkerType | typeof import("./manager/manager").Manager)[];
|
|
13
13
|
export declare const schema: {
|
|
14
|
-
resolverClasses: (typeof import("./task-resource/task-resource-query").TaskResourceQuery | typeof import("./task-resource/task-resource-mutation").TaskResourceMutation | typeof import("./resource/resource-query").ResourceQuery | typeof import("./resource/resource-mutation").ResourceMutation | typeof import("./
|
|
14
|
+
resolverClasses: (typeof import("./task-resource/task-resource-query").TaskResourceQuery | typeof import("./task-resource/task-resource-mutation").TaskResourceMutation | typeof import("./resource/resource-query").ResourceQuery | typeof import("./resource/resource-mutation").ResourceMutation | typeof import("./task/task-query").TaskQuery | typeof import("./task/task-mutation").TaskMutation | typeof import("./project/project-query").ProjectQuery | typeof import("./project/project-mutation").ProjectMutation | typeof import("./task-checklist-binding/task-checklist-binding-query").TaskChecklistBindingQuery | typeof import("./task-checklist-binding/task-checklist-binding-mutation").TaskChecklistBindingMutation | typeof import("./construction-detail-type/construction-detail-type-query").ConstructionDetailTypeQuery | typeof import("./construction-detail-type/construction-detail-type-mutation").ConstructionDetailTypeMutation | typeof import("./construction-type/construction-type-query").ConstructionTypeQuery | typeof import("./construction-type/construction-type-mutation").ConstructionTypeMutation | typeof import("./inspection-drawing-type/inspection-drawing-type-query").InspectionDrawingTypeQuery | typeof import("./inspection-drawing-type/inspection-drawing-type-mutation").InspectionDrawingTypeMutation | typeof import("./inspection-part/inspection-part-query").InspectionPartQuery | typeof import("./inspection-part/inspection-part-mutation").InspectionPartMutation | typeof import("./worker-type/worker-type-query").WorkerTypeQuery | typeof import("./worker-type/worker-type-mutation").WorkerTypeMutation | typeof import("./manager/manager-query").ManagerQuery | typeof import("./manager/manager-mutation").ManagerMutation)[];
|
|
15
15
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-query.js","sourceRoot":"","sources":["../../../server/service/project/project-query.ts"],"names":[],"mappings":";;;;AAAA,+CAAmF;AACnF,qCAAgC;AAChC,iDAAuG;AACvG,yDAAgD;AAChD,uCAAgD;AAChD,uCAAmC;AACnC,iDAA4C;AAC5C,qEAA4D;AAC5D,6DAAwD;AACxD,6CAA4C;AAGrC,IAAM,YAAY,GAAlB,MAAM,YAAY;IAEjB,AAAN,KAAK,CAAC,OAAO,CAAY,EAAU,EAAS,O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;+CAEzC;uBAnHU,YAAY;IADxB,IAAA,uBAAQ,EAAC,iBAAO,CAAC;GACL,YAAY,CAoHxB","sourcesContent":["import { Resolver, Query, FieldResolver, Root, Arg, Args, Ctx } from 'type-graphql'\nimport { IsNull } from 'typeorm'\nimport { Domain, getRepository, ListParam, getQueryBuilderFromListParams } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { Project, ProjectType } from './project'\nimport { Task } from '../task/task'\nimport { ProjectList } from './project-type'\nimport { Attachment } from '@things-factory/attachment-base'\nimport { BuildingComplex } from '@dssp/building-complex'\nimport { config } from '@things-factory/env'\n\n@Resolver(Project)\nexport class ProjectQuery {\n @Query(returns => Project!, { nullable: true, description: 'To fetch a Project' })\n async project(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<Project> {\n const { domain } = context.state\n\n return await getRepository(Project).findOne({\n where: { domain: { id: domain.id }, id }\n })\n }\n\n @Query(returns => ProjectList, { description: '프로젝트 리스트' })\n async projects(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<ProjectList> {\n const { domain } = context.state\n\n const queryBuilder = getQueryBuilderFromListParams({\n domain,\n params,\n repository: getRepository(Project),\n alias: 'p',\n searchables: ['name', 'description', 'state']\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n @Query(returns => Project!, { nullable: true, description: 'To fetch a Project' })\n async projectByBuildingComplexId(\n @Arg('buildingComplexId') buildingComplexId: string,\n @Ctx() context: ResolverContext\n ): Promise<Project> {\n const { domain } = context.state\n\n return await getRepository(Project).findOne({\n where: { domain: { id: domain.id }, buildingComplex: { id: buildingComplexId } }\n })\n }\n\n @Query(returns => Project!, { description: 'To fetch Project' })\n async projectByBuildingLevelId(\n @Arg('buildingLevelId') buildingLevelId: string,\n @Ctx() context: ResolverContext\n ): Promise<Project> {\n const queryBuilder = getRepository(Project)\n .createQueryBuilder('p')\n .innerJoin('building_complexes', 'bc', 'p.building_complex_id = bc.id')\n .innerJoin('buildings', 'b', 'b.building_complex_id = bc.id')\n .innerJoin('building_levels', 'bl', 'bl.building_id = b.id')\n .where('bl.id = :buildingLevelId', { buildingLevelId })\n\n const result = await queryBuilder.getOne()\n\n return result\n }\n\n @FieldResolver(type => [Task], { nullable: true })\n async rootTasks(@Root() project: Project): Promise<Task[]> {\n return await getRepository<Task>(Task).find({\n where: {\n project: { id: project.id },\n parent: IsNull()\n }\n })\n }\n\n @FieldResolver(type => Attachment)\n async mainPhoto(@Root() project: Project): Promise<string | Attachment> {\n const attachment: Attachment = await getRepository(Attachment).findOne({\n where: {\n domain: { id: project.domainId },\n refBy: project.id\n },\n order: { createdAt: 'ASC' }\n })\n\n return attachment\n }\n\n @FieldResolver(type => Attachment)\n async scheduleTable(@Root() project: Project): Promise<Attachment | undefined> {\n const attachment: Attachment = await getRepository(Attachment).findOne({\n where: {\n domain: { id: project.domainId },\n refBy: project.id,\n refType: Project.name + '_schedule_table'\n }\n })\n\n return attachment\n }\n\n @FieldResolver(type => BuildingComplex)\n async buildingComplex(@Root() project: Project): Promise<BuildingComplex> {\n return await getRepository(BuildingComplex).findOneBy({ id: project.buildingComplexId })\n }\n\n @FieldResolver(type => Domain)\n async domain(@Root() project: Project): Promise<Domain> {\n return await getRepository(Domain).findOneBy({ id: project.domainId })\n }\n\n @FieldResolver(type => User)\n async updater(@Root() project: Project): Promise<User> {\n return await getRepository(User).findOneBy({ id: project.updaterId })\n }\n\n @FieldResolver(type => User)\n async creator(@Root() project: Project): Promise<User> {\n return await getRepository(User).findOneBy({ id: project.creatorId })\n }\n\n @FieldResolver(type => String)\n async projectType(@Root() project: Project): Promise<string> {\n return config.get('projectType', ProjectType.DSSP)\n }\n}\n"]}
|