@things-factory/organization 7.0.0-alpha.8 → 7.0.0

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.
Files changed (179) hide show
  1. package/client/component/approval-line-brief.ts +3 -3
  2. package/client/component/approval-line-items-editor-popup.ts +22 -8
  3. package/client/component/approval-line-items-editor.ts +40 -35
  4. package/client/component/approval-line-selector.ts +9 -10
  5. package/client/component/approval-line-templates-manager.ts +9 -4
  6. package/client/component/approval-line-view.ts +15 -9
  7. package/client/component/assignees-editor-popup.ts +10 -6
  8. package/client/component/assignees-editor.ts +5 -2
  9. package/client/component/assignees-view.ts +2 -2
  10. package/client/component/department-selector.ts +9 -10
  11. package/client/component/department-view.ts +3 -1
  12. package/client/component/recipients-editor-popup.ts +10 -6
  13. package/client/component/recipients-editor.ts +10 -12
  14. package/client/component/recipients-view.ts +2 -2
  15. package/client/grist-editor/grist-editor-approval-line.ts +4 -9
  16. package/client/grist-editor/grist-editor-assignees.ts +4 -7
  17. package/client/grist-editor/grist-editor-recipients.ts +4 -10
  18. package/client/grist-editor/grist-renderer-approval-line.ts +4 -3
  19. package/client/grist-editor/grist-renderer-assignees.ts +4 -3
  20. package/client/grist-editor/grist-renderer-recipients.ts +4 -3
  21. package/client/pages/approval-line/common-approval-line-templates-page.ts +5 -5
  22. package/client/pages/approval-line/my-approval-line-templates-page.ts +7 -5
  23. package/client/pages/department/department-importer.ts +8 -19
  24. package/client/pages/department/department-list-page.ts +5 -5
  25. package/client/pages/department/department-tree-page.ts +36 -10
  26. package/client/pages/employee/employee-importer.ts +5 -12
  27. package/client/pages/employee/employee-list-page.ts +12 -31
  28. package/client/pages/employee/employees-by-department.ts +1 -6
  29. package/dist-client/component/approval-line-brief.js +3 -3
  30. package/dist-client/component/approval-line-brief.js.map +1 -1
  31. package/dist-client/component/approval-line-items-editor-popup.d.ts +2 -1
  32. package/dist-client/component/approval-line-items-editor-popup.js +21 -8
  33. package/dist-client/component/approval-line-items-editor-popup.js.map +1 -1
  34. package/dist-client/component/approval-line-items-editor.js +12 -7
  35. package/dist-client/component/approval-line-items-editor.js.map +1 -1
  36. package/dist-client/component/approval-line-selector.d.ts +1 -0
  37. package/dist-client/component/approval-line-selector.js +9 -10
  38. package/dist-client/component/approval-line-selector.js.map +1 -1
  39. package/dist-client/component/approval-line-templates-manager.d.ts +3 -2
  40. package/dist-client/component/approval-line-templates-manager.js +7 -3
  41. package/dist-client/component/approval-line-templates-manager.js.map +1 -1
  42. package/dist-client/component/approval-line-view.js +13 -9
  43. package/dist-client/component/approval-line-view.js.map +1 -1
  44. package/dist-client/component/assignees-editor-popup.d.ts +1 -0
  45. package/dist-client/component/assignees-editor-popup.js +10 -6
  46. package/dist-client/component/assignees-editor-popup.js.map +1 -1
  47. package/dist-client/component/assignees-editor.d.ts +1 -0
  48. package/dist-client/component/assignees-editor.js +5 -2
  49. package/dist-client/component/assignees-editor.js.map +1 -1
  50. package/dist-client/component/assignees-view.js +2 -2
  51. package/dist-client/component/assignees-view.js.map +1 -1
  52. package/dist-client/component/department-selector.d.ts +1 -0
  53. package/dist-client/component/department-selector.js +9 -10
  54. package/dist-client/component/department-selector.js.map +1 -1
  55. package/dist-client/component/department-view.js +3 -0
  56. package/dist-client/component/department-view.js.map +1 -1
  57. package/dist-client/component/recipients-editor-popup.d.ts +1 -0
  58. package/dist-client/component/recipients-editor-popup.js +10 -6
  59. package/dist-client/component/recipients-editor-popup.js.map +1 -1
  60. package/dist-client/component/recipients-editor.d.ts +1 -0
  61. package/dist-client/component/recipients-editor.js +10 -12
  62. package/dist-client/component/recipients-editor.js.map +1 -1
  63. package/dist-client/component/recipients-view.js +2 -2
  64. package/dist-client/component/recipients-view.js.map +1 -1
  65. package/dist-client/grist-editor/grist-editor-approval-line.d.ts +1 -0
  66. package/dist-client/grist-editor/grist-editor-approval-line.js +4 -9
  67. package/dist-client/grist-editor/grist-editor-approval-line.js.map +1 -1
  68. package/dist-client/grist-editor/grist-editor-assignees.d.ts +1 -0
  69. package/dist-client/grist-editor/grist-editor-assignees.js +4 -6
  70. package/dist-client/grist-editor/grist-editor-assignees.js.map +1 -1
  71. package/dist-client/grist-editor/grist-editor-department-object.js.map +1 -1
  72. package/dist-client/grist-editor/grist-editor-recipients.d.ts +1 -0
  73. package/dist-client/grist-editor/grist-editor-recipients.js +4 -9
  74. package/dist-client/grist-editor/grist-editor-recipients.js.map +1 -1
  75. package/dist-client/grist-editor/grist-renderer-approval-line.d.ts +1 -1
  76. package/dist-client/grist-editor/grist-renderer-approval-line.js +3 -3
  77. package/dist-client/grist-editor/grist-renderer-approval-line.js.map +1 -1
  78. package/dist-client/grist-editor/grist-renderer-assignees.d.ts +1 -1
  79. package/dist-client/grist-editor/grist-renderer-assignees.js +3 -3
  80. package/dist-client/grist-editor/grist-renderer-assignees.js.map +1 -1
  81. package/dist-client/grist-editor/grist-renderer-department-object.js.map +1 -1
  82. package/dist-client/grist-editor/grist-renderer-recipients.d.ts +1 -1
  83. package/dist-client/grist-editor/grist-renderer-recipients.js +3 -3
  84. package/dist-client/grist-editor/grist-renderer-recipients.js.map +1 -1
  85. package/dist-client/pages/approval-line/common-approval-line-templates-page.d.ts +10 -2
  86. package/dist-client/pages/approval-line/common-approval-line-templates-page.js +5 -5
  87. package/dist-client/pages/approval-line/common-approval-line-templates-page.js.map +1 -1
  88. package/dist-client/pages/approval-line/my-approval-line-templates-page.d.ts +10 -2
  89. package/dist-client/pages/approval-line/my-approval-line-templates-page.js +6 -5
  90. package/dist-client/pages/approval-line/my-approval-line-templates-page.js.map +1 -1
  91. package/dist-client/pages/department/department-importer.d.ts +1 -0
  92. package/dist-client/pages/department/department-importer.js +5 -12
  93. package/dist-client/pages/department/department-importer.js.map +1 -1
  94. package/dist-client/pages/department/department-list-page.d.ts +10 -2
  95. package/dist-client/pages/department/department-list-page.js +5 -5
  96. package/dist-client/pages/department/department-list-page.js.map +1 -1
  97. package/dist-client/pages/department/department-tree-page.d.ts +8 -0
  98. package/dist-client/pages/department/department-tree-page.js +33 -10
  99. package/dist-client/pages/department/department-tree-page.js.map +1 -1
  100. package/dist-client/pages/employee/employee-importer.d.ts +1 -0
  101. package/dist-client/pages/employee/employee-importer.js +5 -12
  102. package/dist-client/pages/employee/employee-importer.js.map +1 -1
  103. package/dist-client/pages/employee/employee-list-page.d.ts +10 -2
  104. package/dist-client/pages/employee/employee-list-page.js +8 -24
  105. package/dist-client/pages/employee/employee-list-page.js.map +1 -1
  106. package/dist-client/pages/employee/employees-by-department.js +1 -6
  107. package/dist-client/pages/employee/employees-by-department.js.map +1 -1
  108. package/dist-client/route.js.map +1 -1
  109. package/dist-client/tsconfig.tsbuildinfo +1 -1
  110. package/dist-server/index.d.ts +2 -0
  111. package/dist-server/routes.d.ts +0 -0
  112. package/dist-server/routes.js +0 -1
  113. package/dist-server/routes.js.map +1 -1
  114. package/dist-server/service/approval-line/approval-line-item.d.ts +19 -0
  115. package/dist-server/service/approval-line/approval-line-item.js +5 -5
  116. package/dist-server/service/approval-line/approval-line-item.js.map +1 -1
  117. package/dist-server/service/approval-line/approval-line-mutation.d.ts +15 -0
  118. package/dist-server/service/approval-line/approval-line-mutation.js +2 -2
  119. package/dist-server/service/approval-line/approval-line-mutation.js.map +1 -1
  120. package/dist-server/service/approval-line/approval-line-query.d.ts +17 -0
  121. package/dist-server/service/approval-line/approval-line-query.js +6 -6
  122. package/dist-server/service/approval-line/approval-line-query.js.map +1 -1
  123. package/dist-server/service/approval-line/approval-line-type.d.ts +26 -0
  124. package/dist-server/service/approval-line/approval-line-type.js +8 -8
  125. package/dist-server/service/approval-line/approval-line-type.js.map +1 -1
  126. package/dist-server/service/approval-line/approval-line.d.ts +33 -0
  127. package/dist-server/service/approval-line/approval-line.js +14 -9
  128. package/dist-server/service/approval-line/approval-line.js.map +1 -1
  129. package/dist-server/service/approval-line/index.d.ts +6 -0
  130. package/dist-server/service/department/department-history.d.ts +31 -0
  131. package/dist-server/service/department/department-history.js +15 -7
  132. package/dist-server/service/department/department-history.js.map +1 -1
  133. package/dist-server/service/department/department-mutation.d.ts +10 -0
  134. package/dist-server/service/department/department-mutation.js +2 -2
  135. package/dist-server/service/department/department-mutation.js.map +1 -1
  136. package/dist-server/service/department/department-query.d.ts +17 -0
  137. package/dist-server/service/department/department-query.js +7 -6
  138. package/dist-server/service/department/department-query.js.map +1 -1
  139. package/dist-server/service/department/department-type.d.ts +29 -0
  140. package/dist-server/service/department/department-type.js +6 -6
  141. package/dist-server/service/department/department-type.js.map +1 -1
  142. package/dist-server/service/department/department.d.ts +28 -0
  143. package/dist-server/service/department/department.js +9 -10
  144. package/dist-server/service/department/department.js.map +1 -1
  145. package/dist-server/service/department/event-subscriber.d.ts +7 -0
  146. package/dist-server/service/department/event-subscriber.js +2 -2
  147. package/dist-server/service/department/event-subscriber.js.map +1 -1
  148. package/dist-server/service/department/index.d.ts +8 -0
  149. package/dist-server/service/employee/employee-history.d.ts +41 -0
  150. package/dist-server/service/employee/employee-history.js +6 -7
  151. package/dist-server/service/employee/employee-history.js.map +1 -1
  152. package/dist-server/service/employee/employee-mutation.d.ts +12 -0
  153. package/dist-server/service/employee/employee-mutation.js +2 -2
  154. package/dist-server/service/employee/employee-mutation.js.map +1 -1
  155. package/dist-server/service/employee/employee-query.d.ts +22 -0
  156. package/dist-server/service/employee/employee-query.js +3 -3
  157. package/dist-server/service/employee/employee-query.js.map +1 -1
  158. package/dist-server/service/employee/employee-type.d.ts +56 -0
  159. package/dist-server/service/employee/employee-type.js +10 -10
  160. package/dist-server/service/employee/employee-type.js.map +1 -1
  161. package/dist-server/service/employee/employee.d.ts +49 -0
  162. package/dist-server/service/employee/employee.js +13 -15
  163. package/dist-server/service/employee/employee.js.map +1 -1
  164. package/dist-server/service/employee/event-subscriber.d.ts +7 -0
  165. package/dist-server/service/employee/event-subscriber.js +2 -2
  166. package/dist-server/service/employee/event-subscriber.js.map +1 -1
  167. package/dist-server/service/employee/index.d.ts +8 -0
  168. package/dist-server/service/index.d.ts +8 -0
  169. package/dist-server/tsconfig.tsbuildinfo +1 -1
  170. package/package.json +10 -10
  171. package/server/routes.ts +0 -2
  172. package/server/service/approval-line/approval-line-query.ts +16 -4
  173. package/server/service/approval-line/approval-line.ts +27 -7
  174. package/server/service/department/department-history.ts +31 -9
  175. package/server/service/department/department-query.ts +13 -3
  176. package/server/service/department/department.ts +3 -3
  177. package/server/service/employee/employee-history.ts +5 -5
  178. package/server/service/employee/employee-query.ts +3 -3
  179. package/server/service/employee/employee.ts +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"employee-type.js","sourceRoot":"","sources":["../../../server/service/employee/employee-type.ts"],"names":[],"mappings":";;;;AACA,+FAA2D;AAC3D,+CAAsF;AACtF,qDAAqD;AAErD,iDAA+D;AAE/D,yCAAmD;AAG5C,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,iBAAS;CA2BlD,CAAA;AA1BC;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDACR;AAElB;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,uBAAY,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDAC7B;AAEnB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACZ;AAEd;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACZ;AAEd;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,qCAAmB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACzC;AAEd;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yDACN;AAEpB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+DACA;AAE1B;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;q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C,kBAAG,CAAC;;2CACN;AALF,YAAY;IADxB,IAAA,yBAAU,GAAE;GACA,YAAY,CAMxB;AANY,oCAAY","sourcesContent":["import type { FileUpload } from 'graphql-upload/GraphQLUpload.js'\nimport GraphQLUpload from 'graphql-upload/GraphQLUpload.js'\nimport { ObjectType, Field, InputType, Int, ID, registerEnumType } from 'type-graphql'\nimport { GraphQLEmailAddress } from 'graphql-scalars'\n\nimport { ObjectRef, ScalarObject } from '@things-factory/shell'\n\nimport { Employee, EmployeeType } from './employee'\n\n@InputType()\nexport class ObjectRefForEmployee extends ObjectRef {\n @Field({ nullable: true })\n controlNo?: string\n\n @Field(type => EmployeeType, { nullable: true })\n type?: EmployeeType\n\n @Field({ nullable: true })\n alias?: string\n\n @Field({ nullable: true })\n photo?: string\n\n @Field(type => GraphQLEmailAddress, { nullable: true })\n email?: string\n\n @Field({ nullable: true })\n jobPosition?: string\n\n @Field({ nullable: true })\n jobResponsibility?: string\n\n @Field({ nullable: true })\n hiredOn?: string\n\n @Field({ nullable: true })\n active?: boolean\n}\n\n@InputType()\nexport class ObjectRefForUser extends ObjectRef {\n @Field(type => GraphQLEmailAddress, { nullable: true })\n email?: string\n}\n\n@InputType()\nexport class NewEmployee {\n @Field()\n controlNo: string\n\n @Field()\n name: string\n\n @Field({ nullable: true })\n alias?: string\n\n @Field({ nullable: true })\n jobResponsibility?: string\n\n @Field({ nullable: true })\n jobPosition?: string\n\n @Field(type => EmployeeType, { nullable: true })\n type?: EmployeeType\n\n @Field({ nullable: true })\n active?: boolean\n\n @Field({ nullable: true })\n extension?: string\n\n @Field({ nullable: true })\n hiredOn?: string\n\n @Field({ nullable: true })\n retiredAt?: string\n\n @Field(type => GraphQLUpload, { nullable: true })\n photo?: FileUpload\n\n @Field({ nullable: true })\n note?: string\n\n @Field(type => ObjectRefForEmployee, { nullable: true })\n supervisor?: ObjectRefForEmployee\n\n @Field(type => ObjectRef, { nullable: true })\n department?: ObjectRef\n\n @Field(type => ObjectRefForUser, { nullable: true })\n user?: ObjectRefForUser\n}\n\n@InputType()\nexport class EmployeePatch {\n @Field(type => ID, { nullable: true })\n id?: string\n\n @Field({ nullable: true })\n controlNo?: string\n\n @Field({ nullable: true })\n name?: string\n\n @Field({ nullable: true })\n alias?: string\n\n @Field({ nullable: true })\n jobResponsibility?: string\n\n @Field({ nullable: true })\n jobPosition?: string\n\n @Field(type => EmployeeType, { nullable: true })\n type?: EmployeeType\n\n @Field({ nullable: true })\n active?: boolean\n\n @Field({ nullable: true })\n hiredOn?: string\n\n @Field({ nullable: true })\n retiredAt?: string\n\n @Field(type => GraphQLUpload, { nullable: true })\n photo?: FileUpload\n\n @Field({ nullable: true })\n note?: string\n\n @Field(type => ObjectRefForEmployee, { nullable: true })\n supervisor?: ObjectRefForEmployee\n\n @Field(type => ObjectRef, { nullable: true })\n department?: ObjectRef\n\n @Field(type => ObjectRefForUser, { nullable: true })\n user?: ObjectRefForUser\n\n @Field({ nullable: true })\n cuFlag?: string\n}\n\n@ObjectType()\nexport class EmployeeList {\n @Field(type => [Employee])\n items: Employee[]\n\n @Field(type => Int)\n total: number\n}\n"]}
1
+ {"version":3,"file":"employee-type.js","sourceRoot":"","sources":["../../../server/service/employee/employee-type.ts"],"names":[],"mappings":";;;;AACA,+FAA2D;AAC3D,+CAAsF;AACtF,qDAAqD;AAErD,iDAA+D;AAE/D,yCAAmD;AAG5C,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,iBAAS;CA2BlD,CAAA;AA3BY,oDAAoB;AAE/B;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDACR;AAGlB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,uBAAY,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDAC7B;AAGnB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACZ;AAGd;IADC,IAAA,oBAAK,EAA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AA;AAGvB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACX;wBA/CJ,aAAa;IADzB,IAAA,wBAAS,GAAE;GACC,aAAa,CAgDzB;AAGM,IAAM,YAAY,GAAlB,MAAM,YAAY;CAMxB,CAAA;AANY,oCAAY;AAEvB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,mBAAQ,CAAC,CAAC;;2CACT;AAGjB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;2CACN;uBALF,YAAY;IADxB,IAAA,yBAAU,GAAE;GACA,YAAY,CAMxB","sourcesContent":["import type { FileUpload } from 'graphql-upload/GraphQLUpload.js'\nimport GraphQLUpload from 'graphql-upload/GraphQLUpload.js'\nimport { ObjectType, Field, InputType, Int, ID, registerEnumType } from 'type-graphql'\nimport { GraphQLEmailAddress } from 'graphql-scalars'\n\nimport { ObjectRef, ScalarObject } from '@things-factory/shell'\n\nimport { Employee, EmployeeType } from './employee'\n\n@InputType()\nexport class ObjectRefForEmployee extends ObjectRef {\n @Field({ nullable: true })\n controlNo?: string\n\n @Field(type => EmployeeType, { nullable: true })\n type?: EmployeeType\n\n @Field({ nullable: true })\n alias?: string\n\n @Field({ nullable: true })\n photo?: string\n\n @Field(type => GraphQLEmailAddress, { nullable: true })\n email?: string\n\n @Field({ nullable: true })\n jobPosition?: string\n\n @Field({ nullable: true })\n jobResponsibility?: string\n\n @Field({ nullable: true })\n hiredOn?: string\n\n @Field({ nullable: true })\n active?: boolean\n}\n\n@InputType()\nexport class ObjectRefForUser extends ObjectRef {\n @Field(type => GraphQLEmailAddress, { nullable: true })\n email?: string\n}\n\n@InputType()\nexport class NewEmployee {\n @Field()\n controlNo: string\n\n @Field()\n name: string\n\n @Field({ nullable: true })\n alias?: string\n\n @Field({ nullable: true })\n jobResponsibility?: string\n\n @Field({ nullable: true })\n jobPosition?: string\n\n @Field(type => EmployeeType, { nullable: true })\n type?: EmployeeType\n\n @Field({ nullable: true })\n active?: boolean\n\n @Field({ nullable: true })\n extension?: string\n\n @Field({ nullable: true })\n hiredOn?: string\n\n @Field({ nullable: true })\n retiredAt?: string\n\n @Field(type => GraphQLUpload, { nullable: true })\n photo?: FileUpload\n\n @Field({ nullable: true })\n note?: string\n\n @Field(type => ObjectRefForEmployee, { nullable: true })\n supervisor?: ObjectRefForEmployee\n\n @Field(type => ObjectRef, { nullable: true })\n department?: ObjectRef\n\n @Field(type => ObjectRefForUser, { nullable: true })\n user?: ObjectRefForUser\n}\n\n@InputType()\nexport class EmployeePatch {\n @Field(type => ID, { nullable: true })\n id?: string\n\n @Field({ nullable: true })\n controlNo?: string\n\n @Field({ nullable: true })\n name?: string\n\n @Field({ nullable: true })\n alias?: string\n\n @Field({ nullable: true })\n jobResponsibility?: string\n\n @Field({ nullable: true })\n jobPosition?: string\n\n @Field(type => EmployeeType, { nullable: true })\n type?: EmployeeType\n\n @Field({ nullable: true })\n active?: boolean\n\n @Field({ nullable: true })\n hiredOn?: string\n\n @Field({ nullable: true })\n retiredAt?: string\n\n @Field(type => GraphQLUpload, { nullable: true })\n photo?: FileUpload\n\n @Field({ nullable: true })\n note?: string\n\n @Field(type => ObjectRefForEmployee, { nullable: true })\n supervisor?: ObjectRefForEmployee\n\n @Field(type => ObjectRef, { nullable: true })\n department?: ObjectRef\n\n @Field(type => ObjectRefForUser, { nullable: true })\n user?: ObjectRefForUser\n\n @Field({ nullable: true })\n cuFlag?: string\n}\n\n@ObjectType()\nexport class EmployeeList {\n @Field(type => [Employee])\n items: Employee[]\n\n @Field(type => Int)\n total: number\n}\n"]}
@@ -0,0 +1,49 @@
1
+ import { Domain } from '@things-factory/shell';
2
+ import { User } from '@things-factory/auth-base';
3
+ import { Contact, Profile } from '@things-factory/contact';
4
+ import { Department } from '../department/department';
5
+ import { ApprovalLine } from '../approval-line/approval-line';
6
+ export declare enum EmployeeType {
7
+ FULLTIME = "FULLTIME",
8
+ PARTTIME = "PARTTIME",
9
+ TEMPORARY = "TEMPORARY"
10
+ }
11
+ export declare class Employee {
12
+ readonly id: string;
13
+ version?: number;
14
+ domain?: Domain;
15
+ domainId?: string;
16
+ controlNo: string;
17
+ name?: string;
18
+ alias?: string;
19
+ jobResponsibility?: string;
20
+ jobPosition?: string;
21
+ supervisor?: Employee;
22
+ supervisorId?: string;
23
+ supervises?: Employee[];
24
+ department?: Department;
25
+ departmentId?: string;
26
+ manages?: Department[];
27
+ approvalLines?: ApprovalLine[];
28
+ active?: boolean;
29
+ type?: EmployeeType;
30
+ extension?: string;
31
+ photo?: string;
32
+ user?: User;
33
+ userId?: string;
34
+ contact?: Contact;
35
+ contactId?: string;
36
+ email?: string;
37
+ phone?: string;
38
+ profile?: Profile;
39
+ note?: string;
40
+ hiredOn?: string;
41
+ retiredAt?: string;
42
+ createdAt?: Date;
43
+ updatedAt?: Date;
44
+ deletedAt?: Date;
45
+ creator?: User;
46
+ creatorId?: string;
47
+ updater?: User;
48
+ updaterId?: string;
49
+ }
@@ -1,6 +1,4 @@
1
1
  "use strict";
2
- var Employee_1;
3
- var _a, _b;
4
2
  Object.defineProperty(exports, "__esModule", { value: true });
5
3
  exports.Employee = exports.EmployeeType = void 0;
6
4
  const tslib_1 = require("tslib");
@@ -17,16 +15,17 @@ var EmployeeType;
17
15
  EmployeeType["FULLTIME"] = "FULLTIME";
18
16
  EmployeeType["PARTTIME"] = "PARTTIME";
19
17
  EmployeeType["TEMPORARY"] = "TEMPORARY";
20
- })(EmployeeType = exports.EmployeeType || (exports.EmployeeType = {}));
18
+ })(EmployeeType || (exports.EmployeeType = EmployeeType = {}));
21
19
  (0, type_graphql_1.registerEnumType)(EmployeeType, {
22
20
  name: 'EmployeeType',
23
21
  description: 'type enumeration of a employee'
24
22
  });
25
- let Employee = Employee_1 = class Employee {
23
+ let Employee = class Employee {
26
24
  constructor() {
27
25
  this.version = 1;
28
26
  }
29
27
  };
28
+ exports.Employee = Employee;
30
29
  tslib_1.__decorate([
31
30
  (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
32
31
  (0, type_graphql_1.Field)(type => type_graphql_1.ID),
@@ -39,7 +38,7 @@ tslib_1.__decorate([
39
38
  ], Employee.prototype, "version", void 0);
40
39
  tslib_1.__decorate([
41
40
  (0, typeorm_1.ManyToOne)(type => shell_1.Domain),
42
- (0, type_graphql_1.Field)({ nullable: true }),
41
+ (0, type_graphql_1.Field)(type => shell_1.Domain),
43
42
  tslib_1.__metadata("design:type", shell_1.Domain)
44
43
  ], Employee.prototype, "domain", void 0);
45
44
  tslib_1.__decorate([
@@ -72,8 +71,8 @@ tslib_1.__decorate([
72
71
  tslib_1.__metadata("design:type", String)
73
72
  ], Employee.prototype, "jobPosition", void 0);
74
73
  tslib_1.__decorate([
75
- (0, typeorm_1.ManyToOne)(type => Employee_1, supervisor => supervisor.supervises, { nullable: true }),
76
- (0, type_graphql_1.Field)(type => Employee_1, { nullable: true }),
74
+ (0, typeorm_1.ManyToOne)(type => Employee, supervisor => supervisor.supervises, { nullable: true }),
75
+ (0, type_graphql_1.Field)(type => Employee, { nullable: true }),
77
76
  tslib_1.__metadata("design:type", Employee)
78
77
  ], Employee.prototype, "supervisor", void 0);
79
78
  tslib_1.__decorate([
@@ -81,8 +80,8 @@ tslib_1.__decorate([
81
80
  tslib_1.__metadata("design:type", String)
82
81
  ], Employee.prototype, "supervisorId", void 0);
83
82
  tslib_1.__decorate([
84
- (0, typeorm_1.OneToMany)(type => Employee_1, employee => employee.supervisor),
85
- (0, type_graphql_1.Field)(type => [Employee_1]),
83
+ (0, typeorm_1.OneToMany)(type => Employee, employee => employee.supervisor),
84
+ (0, type_graphql_1.Field)(type => [Employee]),
86
85
  tslib_1.__metadata("design:type", Array)
87
86
  ], Employee.prototype, "supervises", void 0);
88
87
  tslib_1.__decorate([
@@ -135,7 +134,7 @@ tslib_1.__decorate([
135
134
  tslib_1.__decorate([
136
135
  (0, typeorm_1.ManyToOne)(type => contact_1.Contact, { nullable: true }),
137
136
  (0, type_graphql_1.Field)({ nullable: true }),
138
- tslib_1.__metadata("design:type", typeof (_a = typeof contact_1.Contact !== "undefined" && contact_1.Contact) === "function" ? _a : Object)
137
+ tslib_1.__metadata("design:type", contact_1.Contact)
139
138
  ], Employee.prototype, "contact", void 0);
140
139
  tslib_1.__decorate([
141
140
  (0, typeorm_1.RelationId)((employee) => employee.contact),
@@ -151,7 +150,7 @@ tslib_1.__decorate([
151
150
  ], Employee.prototype, "phone", void 0);
152
151
  tslib_1.__decorate([
153
152
  (0, type_graphql_1.Field)(type => contact_1.Profile, { nullable: true }),
154
- tslib_1.__metadata("design:type", typeof (_b = typeof contact_1.Profile !== "undefined" && contact_1.Profile) === "function" ? _b : Object)
153
+ tslib_1.__metadata("design:type", contact_1.Profile)
155
154
  ], Employee.prototype, "profile", void 0);
156
155
  tslib_1.__decorate([
157
156
  (0, typeorm_1.Column)({ nullable: true }),
@@ -185,7 +184,7 @@ tslib_1.__decorate([
185
184
  ], Employee.prototype, "deletedAt", void 0);
186
185
  tslib_1.__decorate([
187
186
  (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
188
- (0, type_graphql_1.Field)({ nullable: true }),
187
+ (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
189
188
  tslib_1.__metadata("design:type", auth_base_1.User)
190
189
  ], Employee.prototype, "creator", void 0);
191
190
  tslib_1.__decorate([
@@ -194,19 +193,18 @@ tslib_1.__decorate([
194
193
  ], Employee.prototype, "creatorId", void 0);
195
194
  tslib_1.__decorate([
196
195
  (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
197
- (0, type_graphql_1.Field)({ nullable: true }),
196
+ (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
198
197
  tslib_1.__metadata("design:type", auth_base_1.User)
199
198
  ], Employee.prototype, "updater", void 0);
200
199
  tslib_1.__decorate([
201
200
  (0, typeorm_1.RelationId)((employee) => employee.updater),
202
201
  tslib_1.__metadata("design:type", String)
203
202
  ], Employee.prototype, "updaterId", void 0);
204
- Employee = Employee_1 = tslib_1.__decorate([
203
+ exports.Employee = Employee = tslib_1.__decorate([
205
204
  (0, typeorm_1.Entity)(),
206
205
  (0, typeorm_1.Index)('ix_employee_0', (employee) => [employee.domain, employee.controlNo, employee.deletedAt], {
207
206
  unique: true
208
207
  }),
209
208
  (0, type_graphql_1.ObjectType)({ description: 'Entity for Employee' })
210
209
  ], Employee);
211
- exports.Employee = Employee;
212
210
  //# sourceMappingURL=employee.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"employee.js","sourceRoot":"","sources":["../../../server/service/employee/employee.ts"],"names":[],"mappings":";;;;;;AAAA,qCAYgB;AAChB,+CAA2E;AAC3E,qDAAqD;AAErD,iDAA8C;AAC9C,yDAAgD;AAChD,qDAA0D;AAE1D,yDAAqD;AACrD,kEAA6D;AAE7D,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,qCAAqB,CAAA;IACrB,qCAAqB,CAAA;IACrB,uCAAuB,CAAA;AACzB,CAAC,EAJW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAIvB;AAED,IAAA,+BAAgB,EAAC,YAAY,EAAE;IAC7B,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,gCAAgC;CAC9C,CAAC,CAAA;AAOK,IAAM,QAAQ,gBAAd,MAAM,QAAQ;IAAd;QAOL,YAAO,GAAY,CAAC,CAAA;IAkItB,CAAC;CAAA,CAAA;AAxIC;IAAC,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;oCACC;AAEnB;IAAC,IAAA,uBAAa,GAAE;IACf,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCACN;AAEpB;IAAC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IACzB,IAAA,oBAAK,EAAC,EAAE,QA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xIP,QAAQ;IALpB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,eAAe,EAAE,CAAC,QAAkB,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,SAAS,CAAC,EAAE;QACzG,MAAM,EAAE,IAAI;KACb,CAAC;IACD,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,qBAAqB,EAAE,CAAC;GACtC,QAAQ,CAyIpB;AAzIY,4BAAQ","sourcesContent":["import {\n CreateDateColumn,\n UpdateDateColumn,\n DeleteDateColumn,\n Entity,\n Index,\n Column,\n OneToMany,\n RelationId,\n ManyToOne,\n PrimaryGeneratedColumn,\n VersionColumn\n} from 'typeorm'\nimport { ObjectType, Field, Int, ID, registerEnumType } from 'type-graphql'\nimport { GraphQLEmailAddress } from 'graphql-scalars'\n\nimport { Domain } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { Contact, Profile } from '@things-factory/contact'\n\nimport { Department } from '../department/department'\nimport { ApprovalLine } from '../approval-line/approval-line'\n\nexport enum EmployeeType {\n FULLTIME = 'FULLTIME',\n PARTTIME = 'PARTTIME',\n TEMPORARY = 'TEMPORARY'\n}\n\nregisterEnumType(EmployeeType, {\n name: 'EmployeeType',\n description: 'type enumeration of a employee'\n})\n\n@Entity()\n@Index('ix_employee_0', (employee: Employee) => [employee.domain, employee.controlNo, employee.deletedAt], {\n unique: true\n})\n@ObjectType({ description: 'Entity for Employee' })\nexport class Employee {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @VersionColumn()\n @Field({ nullable: true })\n version?: number = 1\n\n @ManyToOne(type => Domain)\n @Field({ nullable: true })\n domain?: Domain\n\n @RelationId((employee: Employee) => employee.domain)\n domainId?: string\n\n @Column()\n @Field({ nullable: false })\n controlNo: string\n\n @Column()\n @Field({ nullable: true })\n name?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n alias?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n jobResponsibility?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n jobPosition?: string\n\n @ManyToOne(type => Employee, supervisor => supervisor.supervises, { nullable: true })\n @Field(type => Employee, { nullable: true })\n supervisor?: Employee\n\n @RelationId((employee: Employee) => employee.supervisor)\n supervisorId?: string\n\n @OneToMany(type => Employee, employee => employee.supervisor)\n @Field(type => [Employee])\n supervises?: Employee[]\n\n @ManyToOne(type => Department, department => department.members, { nullable: true })\n @Field(type => Department, { nullable: true })\n department?: Department\n\n @RelationId((employee: Employee) => employee.department)\n departmentId?: string\n\n @OneToMany(type => Department, department => department.manager)\n @Field(type => [Department])\n manages?: Department[]\n\n @OneToMany(type => ApprovalLine, employee => employee.ownerEmployee)\n @Field(type => [ApprovalLine])\n approvalLines?: ApprovalLine[]\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n active?: boolean\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n type?: EmployeeType\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n extension?: string\n\n @Field(type => String, { nullable: true })\n photo?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field({ nullable: true })\n user?: User\n\n @RelationId((employee: Employee) => employee.user)\n userId?: string\n\n @ManyToOne(type => Contact, { nullable: true })\n @Field({ nullable: true })\n contact?: Contact\n\n @RelationId((employee: Employee) => employee.contact)\n contactId?: string\n\n @Field(type => GraphQLEmailAddress, { nullable: true })\n email?: string\n\n @Field({ nullable: true })\n phone?: string\n\n @Field(type => Profile, { nullable: true })\n profile?: Profile\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n note?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n hiredOn?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n retiredAt?: string\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n\n @DeleteDateColumn()\n @Field({ nullable: true })\n deletedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field({ nullable: true })\n creator?: User\n\n @RelationId((employee: Employee) => employee.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field({ nullable: true })\n updater?: User\n\n @RelationId((employee: Employee) => employee.updater)\n updaterId?: string\n}\n"]}
1
+ {"version":3,"file":"employee.js","sourceRoot":"","sources":["../../../server/service/employee/employee.ts"],"names":[],"mappings":";;;;AAAA,qCAYgB;AAChB,+CAA2E;AAC3E,qDAAqD;AAErD,iDAA8C;AAC9C,yDAAgD;AAChD,qDAA0D;AAE1D,yDAAqD;AACrD,kEAA6D;AAE7D,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,qCAAqB,CAAA;IACrB,qCAAqB,CAAA;IACrB,uCAAuB,CAAA;AACzB,CAAC,EAJW,YAAY,4BAAZ,YAAY,QAIvB;AAED,IAAA,+BAAgB,EAAC,YAAY,EAAE;IAC7B,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,gCAAgC;CAC9C,CAAC,CAAA;AAOK,IAAM,QAAQ,GAAd,MAAM,QAAQ;IAAd;QAOL,YAAO,GAAY,CAAC,CAAA;IAkItB,CAAC;CAAA,CAAA;AAzIY,4BAAQ;AAGV;IAFR,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;oCACC;AAInB;IAFC,IAAA,uBAAa,GAAE;IACf,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCACN;AAIpB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IACzB,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;sCACb,cAAM;wCAAA;AAGf;IADC,IAAA,oBAAU,EAAC,CAAC,QAAkB,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC;;0CACnC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CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,SAAS,CAAC,EAAE;QACzG,MAAM,EAAE,IAAI;KACb,CAAC;IACD,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,qBAAqB,EAAE,CAAC;GACtC,QAAQ,CAyIpB","sourcesContent":["import {\n CreateDateColumn,\n UpdateDateColumn,\n DeleteDateColumn,\n Entity,\n Index,\n Column,\n OneToMany,\n RelationId,\n ManyToOne,\n PrimaryGeneratedColumn,\n VersionColumn\n} from 'typeorm'\nimport { ObjectType, Field, Int, ID, registerEnumType } from 'type-graphql'\nimport { GraphQLEmailAddress } from 'graphql-scalars'\n\nimport { Domain } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { Contact, Profile } from '@things-factory/contact'\n\nimport { Department } from '../department/department'\nimport { ApprovalLine } from '../approval-line/approval-line'\n\nexport enum EmployeeType {\n FULLTIME = 'FULLTIME',\n PARTTIME = 'PARTTIME',\n TEMPORARY = 'TEMPORARY'\n}\n\nregisterEnumType(EmployeeType, {\n name: 'EmployeeType',\n description: 'type enumeration of a employee'\n})\n\n@Entity()\n@Index('ix_employee_0', (employee: Employee) => [employee.domain, employee.controlNo, employee.deletedAt], {\n unique: true\n})\n@ObjectType({ description: 'Entity for Employee' })\nexport class Employee {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @VersionColumn()\n @Field({ nullable: true })\n version?: number = 1\n\n @ManyToOne(type => Domain)\n @Field(type => Domain)\n domain?: Domain\n\n @RelationId((employee: Employee) => employee.domain)\n domainId?: string\n\n @Column()\n @Field({ nullable: false })\n controlNo: string\n\n @Column()\n @Field({ nullable: true })\n name?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n alias?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n jobResponsibility?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n jobPosition?: string\n\n @ManyToOne(type => Employee, supervisor => supervisor.supervises, { nullable: true })\n @Field(type => Employee, { nullable: true })\n supervisor?: Employee\n\n @RelationId((employee: Employee) => employee.supervisor)\n supervisorId?: string\n\n @OneToMany(type => Employee, employee => employee.supervisor)\n @Field(type => [Employee])\n supervises?: Employee[]\n\n @ManyToOne(type => Department, department => department.members, { nullable: true })\n @Field(type => Department, { nullable: true })\n department?: Department\n\n @RelationId((employee: Employee) => employee.department)\n departmentId?: string\n\n @OneToMany(type => Department, department => department.manager)\n @Field(type => [Department])\n manages?: Department[]\n\n @OneToMany(type => ApprovalLine, employee => employee.ownerEmployee)\n @Field(type => [ApprovalLine])\n approvalLines?: ApprovalLine[]\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n active?: boolean\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n type?: EmployeeType\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n extension?: string\n\n @Field(type => String, { nullable: true })\n photo?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field({ nullable: true })\n user?: User\n\n @RelationId((employee: Employee) => employee.user)\n userId?: string\n\n @ManyToOne(type => Contact, { nullable: true })\n @Field({ nullable: true })\n contact?: Contact\n\n @RelationId((employee: Employee) => employee.contact)\n contactId?: string\n\n @Field(type => GraphQLEmailAddress, { nullable: true })\n email?: string\n\n @Field({ nullable: true })\n phone?: string\n\n @Field(type => Profile, { nullable: true })\n profile?: Profile\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n note?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n hiredOn?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n retiredAt?: string\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n\n @DeleteDateColumn()\n @Field({ nullable: true })\n deletedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((employee: Employee) => employee.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((employee: Employee) => employee.updater)\n updaterId?: string\n}\n"]}
@@ -0,0 +1,7 @@
1
+ import { HistoryEntitySubscriber } from '@operato/typeorm-history';
2
+ import { Employee } from './employee';
3
+ import { EmployeeHistory } from './employee-history';
4
+ export declare class EmployeeHistoryEntitySubscriber extends HistoryEntitySubscriber<Employee, EmployeeHistory> {
5
+ get entity(): typeof Employee;
6
+ get historyEntity(): typeof EmployeeHistory;
7
+ }
@@ -14,8 +14,8 @@ let EmployeeHistoryEntitySubscriber = class EmployeeHistoryEntitySubscriber exte
14
14
  return employee_history_1.EmployeeHistory;
15
15
  }
16
16
  };
17
- EmployeeHistoryEntitySubscriber = tslib_1.__decorate([
17
+ exports.EmployeeHistoryEntitySubscriber = EmployeeHistoryEntitySubscriber;
18
+ exports.EmployeeHistoryEntitySubscriber = EmployeeHistoryEntitySubscriber = tslib_1.__decorate([
18
19
  (0, typeorm_1.EventSubscriber)()
19
20
  ], EmployeeHistoryEntitySubscriber);
20
- exports.EmployeeHistoryEntitySubscriber = EmployeeHistoryEntitySubscriber;
21
21
  //# sourceMappingURL=event-subscriber.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"event-subscriber.js","sourceRoot":"","sources":["../../../server/service/employee/event-subscriber.ts"],"names":[],"mappings":";;;;AAAA,qCAAyC;AAEzC,8DAAkE;AAElE,yCAAqC;AACrC,yDAAoD;AAG7C,IAAM,+BAA+B,GAArC,MAAM,+BAAgC,SAAQ,yCAAkD;IACrG,IAAW,MAAM;QACf,OAAO,mBAAQ,CAAA;IACjB,CAAC;IAED,IAAW,aAAa;QACtB,OAAO,kCAAe,CAAA;IACxB,CAAC;CACF,CAAA;AARY,+BAA+B;IAD3C,IAAA,yBAAe,GAAE;GACL,+BAA+B,CAQ3C;AARY,0EAA+B","sourcesContent":["import { EventSubscriber } from 'typeorm'\n\nimport { HistoryEntitySubscriber } from '@operato/typeorm-history'\n\nimport { Employee } from './employee'\nimport { EmployeeHistory } from './employee-history'\n\n@EventSubscriber()\nexport class EmployeeHistoryEntitySubscriber extends HistoryEntitySubscriber<Employee, EmployeeHistory> {\n public get entity() {\n return Employee\n }\n\n public get historyEntity() {\n return EmployeeHistory\n }\n}\n"]}
1
+ {"version":3,"file":"event-subscriber.js","sourceRoot":"","sources":["../../../server/service/employee/event-subscriber.ts"],"names":[],"mappings":";;;;AAAA,qCAAyC;AAEzC,8DAAkE;AAElE,yCAAqC;AACrC,yDAAoD;AAG7C,IAAM,+BAA+B,GAArC,MAAM,+BAAgC,SAAQ,yCAAkD;IACrG,IAAW,MAAM;QACf,OAAO,mBAAQ,CAAA;IACjB,CAAC;IAED,IAAW,aAAa;QACtB,OAAO,kCAAe,CAAA;IACxB,CAAC;CACF,CAAA;AARY,0EAA+B;0CAA/B,+BAA+B;IAD3C,IAAA,yBAAe,GAAE;GACL,+BAA+B,CAQ3C","sourcesContent":["import { EventSubscriber } from 'typeorm'\n\nimport { HistoryEntitySubscriber } from '@operato/typeorm-history'\n\nimport { Employee } from './employee'\nimport { EmployeeHistory } from './employee-history'\n\n@EventSubscriber()\nexport class EmployeeHistoryEntitySubscriber extends HistoryEntitySubscriber<Employee, EmployeeHistory> {\n public get entity() {\n return Employee\n }\n\n public get historyEntity() {\n return EmployeeHistory\n }\n}\n"]}
@@ -0,0 +1,8 @@
1
+ import { Employee } from './employee';
2
+ import { EmployeeHistory } from './employee-history';
3
+ import { EmployeeQuery } from './employee-query';
4
+ import { EmployeeMutation } from './employee-mutation';
5
+ import { EmployeeHistoryEntitySubscriber } from './event-subscriber';
6
+ export declare const entities: (typeof Employee | typeof EmployeeHistory)[];
7
+ export declare const resolvers: (typeof EmployeeQuery | typeof EmployeeMutation)[];
8
+ export declare const subscribers: (typeof EmployeeHistoryEntitySubscriber)[];
@@ -0,0 +1,8 @@
1
+ export * from './approval-line/approval-line';
2
+ export * from './department/department';
3
+ export * from './employee/employee';
4
+ export declare const entities: (typeof import("./department/department").Department | typeof import("./employee/employee").Employee | typeof import("./approval-line/approval-line").ApprovalLine | typeof import("./department/department-history").DepartmentHistory | typeof import("./employee/employee-history").EmployeeHistory)[];
5
+ export declare const subscribers: (typeof import("./department/event-subscriber").DepartmentHistoryEntitySubscriber | typeof import("./employee/event-subscriber").EmployeeHistoryEntitySubscriber)[];
6
+ export declare const schema: {
7
+ resolverClasses: (typeof import("./approval-line/approval-line-query").ApprovalLineQuery | typeof import("./approval-line/approval-line-mutation").ApprovalLineMutation | typeof import("./department/department-query").DepartmentQuery | typeof import("./department/department-mutation").DepartmentMutation | typeof import("./employee/employee-query").EmployeeQuery | typeof import("./employee/employee-mutation").EmployeeMutation)[];
8
+ };