@things-factory/quotation 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 (58) hide show
  1. package/client/activities/activity-quotation-edit.ts +1 -1
  2. package/client/activities/activity-quotation-view.ts +1 -1
  3. package/client/pages/quotation/quotation-importer.ts +8 -19
  4. package/client/pages/quotation/quotation-list-page.ts +6 -5
  5. package/dist-client/activities/activity-quotation-edit.js +1 -1
  6. package/dist-client/activities/activity-quotation-edit.js.map +1 -1
  7. package/dist-client/activities/activity-quotation-view.js +1 -1
  8. package/dist-client/activities/activity-quotation-view.js.map +1 -1
  9. package/dist-client/pages/main.js.map +1 -1
  10. package/dist-client/pages/quotation/quotation-importer.d.ts +1 -0
  11. package/dist-client/pages/quotation/quotation-importer.js +5 -12
  12. package/dist-client/pages/quotation/quotation-importer.js.map +1 -1
  13. package/dist-client/pages/quotation/quotation-list-page.js +6 -5
  14. package/dist-client/pages/quotation/quotation-list-page.js.map +1 -1
  15. package/dist-client/reducers/main.js.map +1 -1
  16. package/dist-client/route.js.map +1 -1
  17. package/dist-client/tsconfig.tsbuildinfo +1 -1
  18. package/dist-server/activities/activity-quotation.d.ts +42 -0
  19. package/dist-server/activities/activity-quotation.js.map +1 -1
  20. package/dist-server/activities/index.d.ts +1 -0
  21. package/dist-server/activities/index.js +1 -1
  22. package/dist-server/activities/index.js.map +1 -1
  23. package/dist-server/controllers/index.d.ts +0 -0
  24. package/dist-server/index.d.ts +3 -0
  25. package/dist-server/middlewares/index.d.ts +1 -0
  26. package/dist-server/middlewares/index.js +1 -2
  27. package/dist-server/middlewares/index.js.map +1 -1
  28. package/dist-server/migrations/index.d.ts +1 -0
  29. package/dist-server/routes.d.ts +0 -0
  30. package/dist-server/routes.js +0 -1
  31. package/dist-server/routes.js.map +1 -1
  32. package/dist-server/service/index.d.ts +6 -0
  33. package/dist-server/service/quotation/event-subscriber.d.ts +7 -0
  34. package/dist-server/service/quotation/event-subscriber.js +2 -2
  35. package/dist-server/service/quotation/event-subscriber.js.map +1 -1
  36. package/dist-server/service/quotation/index.d.ts +7 -0
  37. package/dist-server/service/quotation/quotation-history.d.ts +25 -0
  38. package/dist-server/service/quotation/quotation-history.js +10 -6
  39. package/dist-server/service/quotation/quotation-history.js.map +1 -1
  40. package/dist-server/service/quotation/quotation-mutation.d.ts +10 -0
  41. package/dist-server/service/quotation/quotation-mutation.js +2 -2
  42. package/dist-server/service/quotation/quotation-mutation.js.map +1 -1
  43. package/dist-server/service/quotation/quotation-query.d.ts +12 -0
  44. package/dist-server/service/quotation/quotation-query.js +3 -3
  45. package/dist-server/service/quotation/quotation-query.js.map +1 -1
  46. package/dist-server/service/quotation/quotation-type.d.ts +23 -0
  47. package/dist-server/service/quotation/quotation-type.js +6 -6
  48. package/dist-server/service/quotation/quotation-type.js.map +1 -1
  49. package/dist-server/service/quotation/quotation.d.ts +25 -0
  50. package/dist-server/service/quotation/quotation.js +7 -5
  51. package/dist-server/service/quotation/quotation.js.map +1 -1
  52. package/dist-server/tsconfig.tsbuildinfo +1 -1
  53. package/package.json +7 -7
  54. package/server/activities/index.ts +3 -4
  55. package/server/routes.ts +0 -2
  56. package/server/service/quotation/quotation-history.ts +10 -6
  57. package/server/service/quotation/quotation-query.ts +4 -1
  58. package/server/service/quotation/quotation.ts +4 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/quotation",
3
- "version": "7.0.0-alpha.8",
3
+ "version": "7.0.0",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "dist-client/index.js",
6
6
  "things-factory": true,
@@ -27,11 +27,11 @@
27
27
  "migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations"
28
28
  },
29
29
  "dependencies": {
30
- "@operato/graphql": "^2.0.0-alpha.0",
31
- "@operato/shell": "^2.0.0-alpha.0",
32
- "@things-factory/auth-base": "^7.0.0-alpha.8",
33
- "@things-factory/shell": "^7.0.0-alpha.8",
34
- "@things-factory/worklist": "^7.0.0-alpha.8"
30
+ "@operato/graphql": "^7.0.0",
31
+ "@operato/shell": "^7.0.0",
32
+ "@things-factory/auth-base": "^7.0.0",
33
+ "@things-factory/shell": "^7.0.0",
34
+ "@things-factory/worklist": "^7.0.0"
35
35
  },
36
- "gitHead": "b4981ea2721e7eaf4dbd618b6c77316ebc000ee5"
36
+ "gitHead": "00f3917ca132679e3571f3f4fd16f4caf84f488e"
37
37
  }
@@ -2,12 +2,11 @@ import { ActivityInstallations } from '@things-factory/worklist'
2
2
 
3
3
  /* IMPORT ACTIVITY TEMPLATES */
4
4
  import { ActivityQuotation } from './activity-quotation'
5
-
6
5
  ;[
7
- /* ACTIVITY TEMPLATES */
8
- ActivityQuotation,
6
+ /* ACTIVITY TEMPLATES */
7
+ ActivityQuotation
9
8
  ].forEach(template => {
10
- ActivityInstallations.installActivityTemplate(template)
9
+ ActivityInstallations.installActivityTemplate(template as any)
11
10
  })
12
11
 
13
12
  /*
package/server/routes.ts CHANGED
@@ -1,5 +1,3 @@
1
- const debug = require('debug')('things-factory:quotation:routes')
2
-
3
1
  process.on('bootstrap-module-global-public-route' as any, (app, globalPublicRouter) => {
4
2
  /*
5
3
  * can add global public routes to application (auth not required, tenancy not required)
@@ -24,7 +24,11 @@ const DATABASE_TYPE = ORMCONFIG.type
24
24
  )
25
25
  @Index(
26
26
  'ix_quotation_history_1',
27
- (quotationHistory: QuotationHistory) => [quotationHistory.domain, quotationHistory.originalId, quotationHistory.version],
27
+ (quotationHistory: QuotationHistory) => [
28
+ quotationHistory.domain,
29
+ quotationHistory.originalId,
30
+ quotationHistory.version
31
+ ],
28
32
  { unique: true }
29
33
  )
30
34
  @ObjectType({ description: 'History Entity of Quotation' })
@@ -38,7 +42,7 @@ export class QuotationHistory implements HistoryEntityInterface<Quotation> {
38
42
  version?: number = 1
39
43
 
40
44
  @ManyToOne(type => Domain)
41
- @Field({ nullable: true })
45
+ @Field(type => Domain)
42
46
  domain?: Domain
43
47
 
44
48
  @RelationId((quotation: Quotation) => quotation.domain)
@@ -77,14 +81,14 @@ export class QuotationHistory implements HistoryEntityInterface<Quotation> {
77
81
  deletedAt?: Date
78
82
 
79
83
  @ManyToOne(type => User, { nullable: true })
80
- @Field({ nullable: true })
84
+ @Field(type => User, { nullable: true })
81
85
  creator?: User
82
86
 
83
87
  @RelationId((quotation: Quotation) => quotation.creator)
84
88
  creatorId?: string
85
89
 
86
90
  @ManyToOne(type => User, { nullable: true })
87
- @Field({ nullable: true })
91
+ @Field(type => User, { nullable: true })
88
92
  updater?: User
89
93
 
90
94
  @RelationId((quotation: Quotation) => quotation.updater)
@@ -102,8 +106,8 @@ export class QuotationHistory implements HistoryEntityInterface<Quotation> {
102
106
  DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'
103
107
  ? 'enum'
104
108
  : DATABASE_TYPE == 'oracle'
105
- ? 'varchar2'
106
- : 'smallint',
109
+ ? 'varchar2'
110
+ : 'smallint',
107
111
  enum: HistoryActionType
108
112
  })
109
113
  public action!: HistoryActionType
@@ -17,7 +17,10 @@ export class QuotationQuery {
17
17
  }
18
18
 
19
19
  @Query(returns => QuotationList, { description: 'To fetch multiple Quotations' })
20
- async quotations(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<QuotationList> {
20
+ async quotations(
21
+ @Args(type => ListParam) params: ListParam,
22
+ @Ctx() context: ResolverContext
23
+ ): Promise<QuotationList> {
21
24
  const { domain } = context.state
22
25
 
23
26
  const queryBuilder = getQueryBuilderFromListParams({
@@ -26,7 +26,9 @@ registerEnumType(QuotationStatus, {
26
26
  })
27
27
 
28
28
  @Entity()
29
- @Index('ix_quotation_0', (quotation: Quotation) => [quotation.domain, quotation.name, quotation.deletedAt], { unique: true })
29
+ @Index('ix_quotation_0', (quotation: Quotation) => [quotation.domain, quotation.name, quotation.deletedAt], {
30
+ unique: true
31
+ })
30
32
  @ObjectType({ description: 'Entity for Quotation' })
31
33
  export class Quotation {
32
34
  @PrimaryGeneratedColumn('uuid')
@@ -38,7 +40,7 @@ export class Quotation {
38
40
  version?: number = 1
39
41
 
40
42
  @ManyToOne(type => Domain)
41
- @Field({ nullable: true })
43
+ @Field(type => Domain)
42
44
  domain?: Domain
43
45
 
44
46
  @RelationId((quotation: Quotation) => quotation.domain)