@tomei/rental 0.17.0 → 0.19.0-staging.1

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 (150) hide show
  1. package/dist/src/components/rental/rental.d.ts +7 -0
  2. package/dist/src/components/rental/rental.js +141 -4
  3. package/dist/src/components/rental/rental.js.map +1 -1
  4. package/dist/tsconfig.tsbuildinfo +1 -1
  5. package/package.json +11 -6
  6. package/src/ClassMappings/ItemClassMap.ts +7 -0
  7. package/src/ClassMappings/index.ts +3 -0
  8. package/src/components/rental/rental.ts +240 -4
  9. package/src/index.ts +2 -0
  10. package/dist/index.d.ts +0 -1
  11. package/dist/index.js +0 -18
  12. package/dist/index.js.map +0 -1
  13. package/dist/src/components/agreement/agreement.d.ts +0 -27
  14. package/dist/src/components/agreement/agreement.js +0 -137
  15. package/dist/src/components/agreement/agreement.js.map +0 -1
  16. package/dist/src/components/agreement/agreement.repository.d.ts +0 -8
  17. package/dist/src/components/agreement/agreement.repository.js +0 -67
  18. package/dist/src/components/agreement/agreement.repository.js.map +0 -1
  19. package/dist/src/components/agreement-history/agreement-history.d.ts +0 -17
  20. package/dist/src/components/agreement-history/agreement-history.js +0 -51
  21. package/dist/src/components/agreement-history/agreement-history.js.map +0 -1
  22. package/dist/src/components/agreement-history/agreement-history.repository.d.ts +0 -8
  23. package/dist/src/components/agreement-history/agreement-history.repository.js +0 -67
  24. package/dist/src/components/agreement-history/agreement-history.repository.js.map +0 -1
  25. package/dist/src/components/agreement-signature/agreement-signature.d.ts +0 -27
  26. package/dist/src/components/agreement-signature/agreement-signature.js +0 -112
  27. package/dist/src/components/agreement-signature/agreement-signature.js.map +0 -1
  28. package/dist/src/components/agreement-signature/agreement-signature.repository.d.ts +0 -8
  29. package/dist/src/components/agreement-signature/agreement-signature.repository.js +0 -68
  30. package/dist/src/components/agreement-signature/agreement-signature.repository.js.map +0 -1
  31. package/dist/src/components/booking/booking.d.ts +0 -46
  32. package/dist/src/components/booking/booking.js +0 -314
  33. package/dist/src/components/booking/booking.js.map +0 -1
  34. package/dist/src/components/booking/booking.repository.d.ts +0 -8
  35. package/dist/src/components/booking/booking.repository.js +0 -67
  36. package/dist/src/components/booking/booking.repository.js.map +0 -1
  37. package/dist/src/components/hirer-signature/hirer-signature.d.ts +0 -27
  38. package/dist/src/components/hirer-signature/hirer-signature.js +0 -112
  39. package/dist/src/components/hirer-signature/hirer-signature.js.map +0 -1
  40. package/dist/src/components/hirer-signature/hirer-signature.repository.d.ts +0 -8
  41. package/dist/src/components/hirer-signature/hirer-signature.repository.js +0 -67
  42. package/dist/src/components/hirer-signature/hirer-signature.repository.js.map +0 -1
  43. package/dist/src/components/joint-hirer/joint-hirer.d.ts +0 -23
  44. package/dist/src/components/joint-hirer/joint-hirer.js +0 -106
  45. package/dist/src/components/joint-hirer/joint-hirer.js.map +0 -1
  46. package/dist/src/components/joint-hirer/joint-hirer.repository.d.ts +0 -8
  47. package/dist/src/components/joint-hirer/joint-hirer.repository.js +0 -67
  48. package/dist/src/components/joint-hirer/joint-hirer.repository.js.map +0 -1
  49. package/dist/src/components/rental/rental.repository.d.ts +0 -8
  50. package/dist/src/components/rental/rental.repository.js +0 -67
  51. package/dist/src/components/rental/rental.repository.js.map +0 -1
  52. package/dist/src/components/rental-price/rental-price.d.ts +0 -18
  53. package/dist/src/components/rental-price/rental-price.js +0 -79
  54. package/dist/src/components/rental-price/rental-price.js.map +0 -1
  55. package/dist/src/components/rental-price/rental-price.repository.d.ts +0 -8
  56. package/dist/src/components/rental-price/rental-price.repository.js +0 -67
  57. package/dist/src/components/rental-price/rental-price.repository.js.map +0 -1
  58. package/dist/src/database.d.ts +0 -4
  59. package/dist/src/database.js +0 -29
  60. package/dist/src/database.js.map +0 -1
  61. package/dist/src/enum/account-type.enum.d.ts +0 -4
  62. package/dist/src/enum/account-type.enum.js +0 -9
  63. package/dist/src/enum/account-type.enum.js.map +0 -1
  64. package/dist/src/enum/aggrement-status.enum.d.ts +0 -5
  65. package/dist/src/enum/aggrement-status.enum.js +0 -10
  66. package/dist/src/enum/aggrement-status.enum.js.map +0 -1
  67. package/dist/src/enum/agreement-signature-status.enum.d.ts +0 -4
  68. package/dist/src/enum/agreement-signature-status.enum.js +0 -9
  69. package/dist/src/enum/agreement-signature-status.enum.js.map +0 -1
  70. package/dist/src/enum/booking.enum.d.ts +0 -5
  71. package/dist/src/enum/booking.enum.js +0 -10
  72. package/dist/src/enum/booking.enum.js.map +0 -1
  73. package/dist/src/enum/hirer-signature-status.enum.d.ts +0 -4
  74. package/dist/src/enum/hirer-signature-status.enum.js +0 -9
  75. package/dist/src/enum/hirer-signature-status.enum.js.map +0 -1
  76. package/dist/src/enum/hirer-type.enum.d.ts +0 -4
  77. package/dist/src/enum/hirer-type.enum.js +0 -9
  78. package/dist/src/enum/hirer-type.enum.js.map +0 -1
  79. package/dist/src/enum/index.d.ts +0 -7
  80. package/dist/src/enum/index.js +0 -16
  81. package/dist/src/enum/index.js.map +0 -1
  82. package/dist/src/enum/rental-status.enum.d.ts +0 -9
  83. package/dist/src/enum/rental-status.enum.js +0 -14
  84. package/dist/src/enum/rental-status.enum.js.map +0 -1
  85. package/dist/src/index.d.ts +0 -19
  86. package/dist/src/index.js +0 -51
  87. package/dist/src/index.js.map +0 -1
  88. package/dist/src/interfaces/agreemeent-signature-attr.interface.d.ts +0 -14
  89. package/dist/src/interfaces/agreemeent-signature-attr.interface.js +0 -3
  90. package/dist/src/interfaces/agreemeent-signature-attr.interface.js.map +0 -1
  91. package/dist/src/interfaces/agreement-attr.interface.d.ts +0 -7
  92. package/dist/src/interfaces/agreement-attr.interface.js +0 -3
  93. package/dist/src/interfaces/agreement-attr.interface.js.map +0 -1
  94. package/dist/src/interfaces/agreement-history-attr.interface.d.ts +0 -7
  95. package/dist/src/interfaces/agreement-history-attr.interface.js +0 -3
  96. package/dist/src/interfaces/agreement-history-attr.interface.js.map +0 -1
  97. package/dist/src/interfaces/booking-attr.interface.d.ts +0 -18
  98. package/dist/src/interfaces/booking-attr.interface.js +0 -3
  99. package/dist/src/interfaces/booking-attr.interface.js.map +0 -1
  100. package/dist/src/interfaces/booking-find-all-search-attr.interface.d.ts +0 -12
  101. package/dist/src/interfaces/booking-find-all-search-attr.interface.js +0 -3
  102. package/dist/src/interfaces/booking-find-all-search-attr.interface.js.map +0 -1
  103. package/dist/src/interfaces/hirer-signature-attr.interface.d.ts +0 -14
  104. package/dist/src/interfaces/hirer-signature-attr.interface.js +0 -3
  105. package/dist/src/interfaces/hirer-signature-attr.interface.js.map +0 -1
  106. package/dist/src/interfaces/index.d.ts +0 -9
  107. package/dist/src/interfaces/index.js +0 -3
  108. package/dist/src/interfaces/index.js.map +0 -1
  109. package/dist/src/interfaces/joint-hirer-attr.interface.d.ts +0 -10
  110. package/dist/src/interfaces/joint-hirer-attr.interface.js +0 -3
  111. package/dist/src/interfaces/joint-hirer-attr.interface.js.map +0 -1
  112. package/dist/src/interfaces/rental-attr.interface.d.ts +0 -24
  113. package/dist/src/interfaces/rental-attr.interface.js +0 -3
  114. package/dist/src/interfaces/rental-attr.interface.js.map +0 -1
  115. package/dist/src/interfaces/rental-find-all-search-attr.interface.d.ts +0 -10
  116. package/dist/src/interfaces/rental-find-all-search-attr.interface.js +0 -3
  117. package/dist/src/interfaces/rental-find-all-search-attr.interface.js.map +0 -1
  118. package/dist/src/interfaces/rental-price-attr.interface.d.ts +0 -7
  119. package/dist/src/interfaces/rental-price-attr.interface.js +0 -3
  120. package/dist/src/interfaces/rental-price-attr.interface.js.map +0 -1
  121. package/dist/src/interfaces/response-hirer-signature-attr.interface.d.ts +0 -14
  122. package/dist/src/interfaces/response-hirer-signature-attr.interface.js +0 -3
  123. package/dist/src/interfaces/response-hirer-signature-attr.interface.js.map +0 -1
  124. package/dist/src/models/agreement-history.entity.d.ts +0 -10
  125. package/dist/src/models/agreement-history.entity.js +0 -65
  126. package/dist/src/models/agreement-history.entity.js.map +0 -1
  127. package/dist/src/models/agreement-signature.entity.d.ts +0 -18
  128. package/dist/src/models/agreement-signature.entity.js +0 -101
  129. package/dist/src/models/agreement-signature.entity.js.map +0 -1
  130. package/dist/src/models/agreement.entity.d.ts +0 -14
  131. package/dist/src/models/agreement.entity.js +0 -70
  132. package/dist/src/models/agreement.entity.js.map +0 -1
  133. package/dist/src/models/booking.entity.d.ts +0 -21
  134. package/dist/src/models/booking.entity.js +0 -128
  135. package/dist/src/models/booking.entity.js.map +0 -1
  136. package/dist/src/models/hirer-signature.entity.d.ts +0 -16
  137. package/dist/src/models/hirer-signature.entity.js +0 -100
  138. package/dist/src/models/hirer-signature.entity.js.map +0 -1
  139. package/dist/src/models/index.d.ts +0 -8
  140. package/dist/src/models/index.js +0 -18
  141. package/dist/src/models/index.js.map +0 -1
  142. package/dist/src/models/joint-hirer.entity.d.ts +0 -13
  143. package/dist/src/models/joint-hirer.entity.js +0 -79
  144. package/dist/src/models/joint-hirer.entity.js.map +0 -1
  145. package/dist/src/models/rental-price.entity.d.ts +0 -8
  146. package/dist/src/models/rental-price.entity.js +0 -59
  147. package/dist/src/models/rental-price.entity.js.map +0 -1
  148. package/dist/src/models/rental.entity.d.ts +0 -29
  149. package/dist/src/models/rental.entity.js +0 -160
  150. package/dist/src/models/rental.entity.js.map +0 -1
@@ -1,23 +0,0 @@
1
- import { ObjectBase } from '@tomei/general';
2
- import { JointHirerRepository } from './joint-hirer.repository';
3
- import { IJointHirerAttr } from '../../interfaces/joint-hirer-attr.interface';
4
- import { LoginUser } from '@tomei/sso';
5
- export declare class JointHirer extends ObjectBase {
6
- ObjectId: string;
7
- ObjectName: string;
8
- ObjectType: string;
9
- TableName: string;
10
- RentalId: string;
11
- CustomerId: string;
12
- CustomerType: string;
13
- CreatedById: string;
14
- CreatedAt: Date;
15
- UpdatedById: string;
16
- UpdatedAt: Date;
17
- get HirerId(): string;
18
- set HirerId(value: string);
19
- protected static _Repository: JointHirerRepository;
20
- protected constructor(jointHirerAttr?: IJointHirerAttr);
21
- static init(hirerId?: string, dbTransaction?: any): Promise<JointHirer>;
22
- create(loginUser: LoginUser, dbTransaction?: any): Promise<this>;
23
- }
@@ -1,106 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.JointHirer = void 0;
13
- const general_1 = require("@tomei/general");
14
- const joint_hirer_repository_1 = require("./joint-hirer.repository");
15
- const config_1 = require("@tomei/config");
16
- const activity_history_1 = require("@tomei/activity-history");
17
- class JointHirer extends general_1.ObjectBase {
18
- get HirerId() {
19
- return this.ObjectId;
20
- }
21
- set HirerId(value) {
22
- this.ObjectId = value;
23
- }
24
- constructor(jointHirerAttr) {
25
- super();
26
- this.ObjectType = 'JointHirer';
27
- this.TableName = 'rental_JointHirer';
28
- if (jointHirerAttr) {
29
- this.HirerId = jointHirerAttr.HirerId;
30
- this.RentalId = jointHirerAttr.RentalId;
31
- this.CustomerId = jointHirerAttr.CustomerId;
32
- this.CustomerType = jointHirerAttr.CustomerType;
33
- this.CreatedById = jointHirerAttr.CreatedById;
34
- this.CreatedAt = jointHirerAttr.CreatedAt;
35
- this.UpdatedById = jointHirerAttr.UpdatedById;
36
- this.UpdatedAt = jointHirerAttr.UpdatedAt;
37
- }
38
- }
39
- static init(hirerId, dbTransaction) {
40
- return __awaiter(this, void 0, void 0, function* () {
41
- try {
42
- if (hirerId) {
43
- const jr = yield JointHirer._Repository.findByPk(hirerId, dbTransaction);
44
- if (jr) {
45
- return new JointHirer(jr.get({ plain: true }));
46
- }
47
- else {
48
- throw new general_1.ClassError('JointHirer', 'JointHirerErrMsg01', 'JointHirer not found');
49
- }
50
- }
51
- return new JointHirer();
52
- }
53
- catch (error) {
54
- throw error;
55
- }
56
- });
57
- }
58
- create(loginUser, dbTransaction) {
59
- return __awaiter(this, void 0, void 0, function* () {
60
- try {
61
- const systemCode = config_1.ApplicationConfig.getComponentConfigValue('system-code');
62
- const isPrivileged = yield loginUser.checkPrivileges(systemCode, 'JointHirer - Create');
63
- if (!isPrivileged) {
64
- throw new general_1.ClassError('JointHirer', 'JointHirerErrMsg00', "You do not have 'JointHirer - Create' privilege.");
65
- }
66
- if (!this.RentalId || !this.CustomerId || !this.CustomerType) {
67
- throw new general_1.ClassError('JointHirer', 'JointHirerErrMsg03', 'RentalId, CustomerId and CustomerType are required.');
68
- }
69
- this.ObjectId = this.createId();
70
- this.CreatedById = loginUser.ObjectId;
71
- this.CreatedAt = new Date();
72
- this.UpdatedById = loginUser.ObjectId;
73
- this.UpdatedAt = new Date();
74
- const entityValueAfter = {
75
- HirerId: this.HirerId,
76
- RentalId: this.RentalId,
77
- CustomerId: this.CustomerId,
78
- CustomerType: this.CustomerType,
79
- CreatedById: this.CreatedById,
80
- CreatedAt: this.CreatedAt,
81
- UpdatedById: this.UpdatedById,
82
- UpdatedAt: this.UpdatedAt,
83
- };
84
- yield JointHirer._Repository.create(entityValueAfter, {
85
- transaction: dbTransaction,
86
- });
87
- const activity = new activity_history_1.Activity();
88
- activity.ObjectId = this._createId();
89
- activity.Action = activity_history_1.ActionEnum.CREATE;
90
- activity.Description = 'Add Joint Hirer';
91
- activity.EntityId = this.ObjectId;
92
- activity.EntityType = this.ObjectType;
93
- activity.EntityValueBefore = JSON.stringify({});
94
- activity.EntityValueAfter = JSON.stringify(entityValueAfter);
95
- yield activity.create(loginUser.ObjectId, dbTransaction);
96
- return this;
97
- }
98
- catch (error) {
99
- throw error;
100
- }
101
- });
102
- }
103
- }
104
- exports.JointHirer = JointHirer;
105
- JointHirer._Repository = new joint_hirer_repository_1.JointHirerRepository();
106
- //# sourceMappingURL=joint-hirer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"joint-hirer.js","sourceRoot":"","sources":["../../../../src/components/joint-hirer/joint-hirer.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAAwD;AACxD,qEAAgE;AAEhE,0CAAkD;AAElD,8DAA+D;AAE/D,MAAa,UAAW,SAAQ,oBAAU;IAaxC,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED,IAAI,OAAO,CAAC,KAAa;QACvB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IACxB,CAAC;IAID,YAAsB,cAAgC;QACpD,KAAK,EAAE,CAAC;QArBV,eAAU,GAAW,YAAY,CAAC;QAClC,cAAS,GAAW,mBAAmB,CAAC;QAqBtC,IAAI,cAAc,EAAE,CAAC;YACnB,IAAI,CAAC,OAAO,GAAG,cAAc,CAAC,OAAO,CAAC;YACtC,IAAI,CAAC,QAAQ,GAAG,cAAc,CAAC,QAAQ,CAAC;YACxC,IAAI,CAAC,UAAU,GAAG,cAAc,CAAC,UAAU,CAAC;YAC5C,IAAI,CAAC,YAAY,GAAG,cAAc,CAAC,YAAY,CAAC;YAChD,IAAI,CAAC,WAAW,GAAG,cAAc,CAAC,WAAW,CAAC;YAC9C,IAAI,CAAC,SAAS,GAAG,cAAc,CAAC,SAAS,CAAC;YAC1C,IAAI,CAAC,WAAW,GAAG,cAAc,CAAC,WAAW,CAAC;YAC9C,IAAI,CAAC,SAAS,GAAG,cAAc,CAAC,SAAS,CAAC;QAC5C,CAAC;IACH,CAAC;IAEM,MAAM,CAAO,IAAI,CAAC,OAAgB,EAAE,aAAmB;;YAC5D,IAAI,CAAC;gBACH,IAAI,OAAO,EAAE,CAAC;oBACZ,MAAM,EAAE,GAAG,MAAM,UAAU,CAAC,WAAW,CAAC,QAAQ,CAC9C,OAAO,EACP,aAAa,CACd,CAAC;oBACF,I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8 +0,0 @@
1
- import { RepositoryBase, IRepositoryBase } from '@tomei/general';
2
- import { JointHirerModel } from '../../models/joint-hirer.entity';
3
- export declare class JointHirerRepository extends RepositoryBase<JointHirerModel> implements IRepositoryBase<JointHirerModel> {
4
- constructor();
5
- findByPk(id: string, transaction?: any): Promise<JointHirerModel | null>;
6
- delete(hirerId: string, dbTransaction?: any): Promise<void>;
7
- findAndCountAll(options?: any): Promise<any>;
8
- }
@@ -1,67 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.JointHirerRepository = void 0;
13
- const general_1 = require("@tomei/general");
14
- const joint_hirer_entity_1 = require("../../models/joint-hirer.entity");
15
- class JointHirerRepository extends general_1.RepositoryBase {
16
- constructor() {
17
- super(joint_hirer_entity_1.JointHirerModel);
18
- }
19
- findByPk(id, transaction) {
20
- return __awaiter(this, void 0, void 0, function* () {
21
- try {
22
- const result = yield joint_hirer_entity_1.JointHirerModel.findByPk(id, {
23
- transaction: transaction,
24
- });
25
- return result;
26
- }
27
- catch (error) {
28
- throw new Error(`An Error occured when fetching : ${error.message}`);
29
- }
30
- });
31
- }
32
- delete(hirerId, dbTransaction) {
33
- return __awaiter(this, void 0, void 0, function* () {
34
- try {
35
- const options = {
36
- where: {
37
- HirerId: hirerId,
38
- },
39
- transaction: dbTransaction,
40
- };
41
- yield joint_hirer_entity_1.JointHirerModel.destroy(options);
42
- }
43
- catch (error) {
44
- throw new Error(`An Error occured when delete : ${error.message}`);
45
- }
46
- });
47
- }
48
- findAndCountAll(options) {
49
- return __awaiter(this, void 0, void 0, function* () {
50
- try {
51
- let jointHirers;
52
- if (options) {
53
- jointHirers = yield joint_hirer_entity_1.JointHirerModel.findAndCountAll(options);
54
- }
55
- else {
56
- jointHirers = yield joint_hirer_entity_1.JointHirerModel.findAndCountAll();
57
- }
58
- return jointHirers;
59
- }
60
- catch (error) {
61
- throw new Error(`An Error occured when retriving : ${error.message}`);
62
- }
63
- });
64
- }
65
- }
66
- exports.JointHirerRepository = JointHirerRepository;
67
- //# sourceMappingURL=joint-hirer.repository.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"joint-hirer.repository.js","sourceRoot":"","sources":["../../../../src/components/joint-hirer/joint-hirer.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAAiE;AACjE,wEAAkE;AAElE,MAAa,oBACX,SAAQ,wBAA+B;IAGvC;QACE,KAAK,CAAC,oCAAe,CAAC,CAAC;IACzB,CAAC;IAEK,QAAQ,CACZ,EAAU,EACV,WAAiB;;YAEjB,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,MAAM,oCAAe,CAAC,QAAQ,CAAC,EAAE,EAAE;oBAChD,WAAW,EAAE,WAAW;iBACzB,CAAC,CAAC;gBAEH,OAAO,MAAM,CAAC;YAChB,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,oCAAoC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YACvE,CAAC;QACH,CAAC;KAAA;IAEK,MAAM,CAAC,OAAe,EAAE,aAAmB;;YAC/C,IAAI,CAAC;gBACH,MAAM,OAAO,GAAG;oBACd,KAAK,EAAE;wBACL,OAAO,EAAE,OAAO;qBACjB;oBACD,WAAW,EAAE,aAAa;iBAC3B,CAAC;gBACF,MAAM,oCAAe,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YACzC,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,kCAAkC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YACrE,CAAC;QACH,CAAC;KAAA;IAEK,eAAe,CAAC,OAAa;;YACjC,IAAI,CAAC;gBACH,IAAI,WAAgB,CAAC;gBACrB,IAAI,OAAO,EAAE,CAAC;oBACZ,WAAW,GAAG,MAAM,oCAAe,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;gBAC/D,CAAC;qBAAM,CAAC;oBACN,WAAW,GAAG,MAAM,oCAAe,CAAC,eAAe,EAAE,CAAC;gBACxD,CAAC;gBACD,OAAO,WAAW,CAAC;YACrB,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,qCAAqC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YACxE,CAAC;QACH,CAAC;KAAA;CACF;AAlDD,oDAkDC"}
@@ -1,8 +0,0 @@
1
- import { RepositoryBase, IRepositoryBase } from '@tomei/general';
2
- import { RentalModel } from '../../models/rental.entity';
3
- export declare class RentalRepository extends RepositoryBase<RentalModel> implements IRepositoryBase<RentalModel> {
4
- constructor();
5
- findByPk(id: string, transaction?: any): Promise<RentalModel | null>;
6
- delete(RentalId: string, dbTransaction?: any): Promise<void>;
7
- findAndCountAll(options?: any): Promise<any>;
8
- }
@@ -1,67 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.RentalRepository = void 0;
13
- const general_1 = require("@tomei/general");
14
- const rental_entity_1 = require("../../models/rental.entity");
15
- class RentalRepository extends general_1.RepositoryBase {
16
- constructor() {
17
- super(rental_entity_1.RentalModel);
18
- }
19
- findByPk(id, transaction) {
20
- return __awaiter(this, void 0, void 0, function* () {
21
- try {
22
- const result = yield rental_entity_1.RentalModel.findByPk(id, {
23
- transaction: transaction,
24
- });
25
- return result;
26
- }
27
- catch (error) {
28
- throw new Error(`An Error occured when fetching : ${error.message}`);
29
- }
30
- });
31
- }
32
- delete(RentalId, dbTransaction) {
33
- return __awaiter(this, void 0, void 0, function* () {
34
- try {
35
- const options = {
36
- where: {
37
- RentalId: RentalId,
38
- },
39
- transaction: dbTransaction,
40
- };
41
- yield rental_entity_1.RentalModel.destroy(options);
42
- }
43
- catch (error) {
44
- throw new Error(`An Error occured when delete : ${error.message}`);
45
- }
46
- });
47
- }
48
- findAndCountAll(options) {
49
- return __awaiter(this, void 0, void 0, function* () {
50
- try {
51
- let Rentals;
52
- if (options) {
53
- Rentals = yield rental_entity_1.RentalModel.findAndCountAll(options);
54
- }
55
- else {
56
- Rentals = yield rental_entity_1.RentalModel.findAndCountAll();
57
- }
58
- return Rentals;
59
- }
60
- catch (error) {
61
- throw new Error(`An Error occured when retriving : ${error.message}`);
62
- }
63
- });
64
- }
65
- }
66
- exports.RentalRepository = RentalRepository;
67
- //# sourceMappingURL=rental.repository.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rental.repository.js","sourceRoot":"","sources":["../../../../src/components/rental/rental.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAAiE;AACjE,8DAAyD;AAEzD,MAAa,gBACX,SAAQ,wBAA2B;IAGnC;QACE,KAAK,CAAC,2BAAW,CAAC,CAAC;IACrB,CAAC;IAEK,QAAQ,CAAC,EAAU,EAAE,WAAiB;;YAC1C,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,MAAM,2BAAW,CAAC,QAAQ,CAAC,EAAE,EAAE;oBAC5C,WAAW,EAAE,WAAW;iBACzB,CAAC,CAAC;gBAEH,OAAO,MAAM,CAAC;YAChB,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,oCAAoC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YACvE,CAAC;QACH,CAAC;KAAA;IAEK,MAAM,CAAC,QAAgB,EAAE,aAAmB;;YAChD,IAAI,CAAC;gBACH,MAAM,OAAO,GAAG;oBACd,KAAK,EAAE;wBACL,QAAQ,EAAE,QAAQ;qBACnB;oBACD,WAAW,EAAE,aAAa;iBAC3B,CAAC;gBACF,MAAM,2BAAW,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YACrC,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,kCAAkC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YACrE,CAAC;QACH,CAAC;KAAA;IAEK,eAAe,CAAC,OAAa;;YACjC,IAAI,CAAC;gBACH,IAAI,OAAY,CAAC;gBACjB,IAAI,OAAO,EAAE,CAAC;oBACZ,OAAO,GAAG,MAAM,2BAAW,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;gBACvD,CAAC;qBAAM,CAAC;oBACN,OAAO,GAAG,MAAM,2BAAW,CAAC,eAAe,EAAE,CAAC;gBAChD,CAAC;gBACD,OAAO,OAAO,CAAC;YACjB,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,qCAAqC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YACxE,CAAC;QACH,CAAC;KAAA;CACF;AA/CD,4CA+CC"}
@@ -1,18 +0,0 @@
1
- import { ObjectBase } from '@tomei/general';
2
- import { LoginUser } from '@tomei/sso';
3
- export declare class RentalPrice extends ObjectBase {
4
- ObjectId: string;
5
- ObjectName: string;
6
- ObjectType: string;
7
- TableName: string;
8
- RetailPrice: number;
9
- Currency: string;
10
- PromoCode: string;
11
- Remarks: string;
12
- get PriceId(): string;
13
- set PriceId(value: string);
14
- private static _Repo;
15
- private constructor();
16
- static init(dbTransaction?: any, priceId?: string): Promise<RentalPrice>;
17
- create(loginUser: LoginUser, dbTransaction?: any): Promise<this>;
18
- }
@@ -1,79 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.RentalPrice = void 0;
13
- const general_1 = require("@tomei/general");
14
- const rental_price_repository_1 = require("./rental-price.repository");
15
- const config_1 = require("@tomei/config");
16
- class RentalPrice extends general_1.ObjectBase {
17
- get PriceId() {
18
- return this.ObjectId;
19
- }
20
- set PriceId(value) {
21
- this.ObjectId = value;
22
- }
23
- constructor(rentalPriceAttr) {
24
- super();
25
- this.ObjectType = 'RentalPrice';
26
- if (rentalPriceAttr) {
27
- this.PriceId = rentalPriceAttr.PriceId;
28
- this.RetailPrice = rentalPriceAttr.RetailPrice;
29
- this.Currency = rentalPriceAttr.Currency;
30
- this.PromoCode = rentalPriceAttr.PromoCode;
31
- this.Remarks = rentalPriceAttr.Remarks;
32
- }
33
- }
34
- static init(dbTransaction, priceId) {
35
- return __awaiter(this, void 0, void 0, function* () {
36
- try {
37
- if (priceId) {
38
- const rentalPrice = yield RentalPrice._Repo.findByPk(priceId, dbTransaction);
39
- if (rentalPrice) {
40
- return new RentalPrice(rentalPrice);
41
- }
42
- else {
43
- throw new general_1.ClassError('RentalPrice', 'RentalPriceErrMsg', 'RentalPrice Not Found');
44
- }
45
- }
46
- return new RentalPrice();
47
- }
48
- catch (error) {
49
- throw new general_1.ClassError('RentalPrice', 'RentalPriceErrMsg', 'Failed To Initialize RentalPrice');
50
- }
51
- });
52
- }
53
- create(loginUser, dbTransaction) {
54
- return __awaiter(this, void 0, void 0, function* () {
55
- try {
56
- const systemCode = config_1.ApplicationConfig.getComponentConfigValue('system-code');
57
- const isPrivileged = yield loginUser.checkPrivileges(systemCode, 'Rental - Create');
58
- if (!isPrivileged) {
59
- throw new general_1.ClassError('RentalPrice', 'RentalPriceErrMsg01', "You do not have 'Rental - Create' privilege.");
60
- }
61
- this.PriceId = this.createId();
62
- yield RentalPrice._Repo.create({
63
- PriceId: this.PriceId,
64
- RetailPrice: this.RetailPrice,
65
- Currency: this.Currency,
66
- PromoCode: this.PromoCode,
67
- Remarks: this.Remarks,
68
- }, dbTransaction);
69
- return this;
70
- }
71
- catch (error) {
72
- throw error;
73
- }
74
- });
75
- }
76
- }
77
- exports.RentalPrice = RentalPrice;
78
- RentalPrice._Repo = new rental_price_repository_1.RentalPriceRepository();
79
- //# sourceMappingURL=rental-price.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rental-price.js","sourceRoot":"","sources":["../../../../src/components/rental-price/rental-price.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAAwD;AACxD,uEAAkE;AAGlE,0CAAkD;AAElD,MAAa,WAAY,SAAQ,oBAAU;IAUzC,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED,IAAI,OAAO,CAAC,KAAa;QACvB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IACxB,CAAC;IAID,YAAoB,eAAkC;QACpD,KAAK,EAAE,CAAC;QAlBV,eAAU,GAAG,aAAa,CAAC;QAmBzB,IAAI,eAAe,EAAE,CAAC;YACpB,IAAI,CAAC,OAAO,GAAG,eAAe,CAAC,OAAO,CAAC;YACvC,IAA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;gBAE/B,MAAM,WAAW,CAAC,KAAK,CAAC,MAAM,CAC5B;oBACE,OAAO,EAAE,IAAI,CAAC,OAAO;oBACrB,WAAW,EAAE,IAAI,CAAC,WAAW;oBAC7B,QAAQ,EAAE,IAAI,CAAC,QAAQ;oBACvB,SAAS,EAAE,IAAI,CAAC,SAAS;oBACzB,OAAO,EAAE,IAAI,CAAC,OAAO;iBACtB,EACD,aAAa,CACd,CAAC;gBAEF,OAAO,IAAI,CAAC;YACd,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC;KAAA;;AA5FH,kCA6FC;AA3EgB,iBAAK,GAAG,IAAI,+CAAqB,EAAE,AAA9B,CAA+B"}
@@ -1,8 +0,0 @@
1
- import { RepositoryBase, IRepositoryBase } from '@tomei/general';
2
- import { RentalPriceModel } from '../../models/rental-price.entity';
3
- export declare class RentalPriceRepository extends RepositoryBase<RentalPriceModel> implements IRepositoryBase<RentalPriceModel> {
4
- constructor();
5
- findByPk(id: string, transaction?: any): Promise<RentalPriceModel | null>;
6
- delete(RentalPriceId: string, dbTransaction?: any): Promise<void>;
7
- findAndCountAll(options?: any): Promise<any>;
8
- }
@@ -1,67 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.RentalPriceRepository = void 0;
13
- const general_1 = require("@tomei/general");
14
- const rental_price_entity_1 = require("../../models/rental-price.entity");
15
- class RentalPriceRepository extends general_1.RepositoryBase {
16
- constructor() {
17
- super(rental_price_entity_1.RentalPriceModel);
18
- }
19
- findByPk(id, transaction) {
20
- return __awaiter(this, void 0, void 0, function* () {
21
- try {
22
- const result = yield rental_price_entity_1.RentalPriceModel.findByPk(id, {
23
- transaction: transaction,
24
- });
25
- return result;
26
- }
27
- catch (error) {
28
- throw new Error(`An Error occured when fetching : ${error.message}`);
29
- }
30
- });
31
- }
32
- delete(RentalPriceId, dbTransaction) {
33
- return __awaiter(this, void 0, void 0, function* () {
34
- try {
35
- const options = {
36
- where: {
37
- RentalPriceId: RentalPriceId,
38
- },
39
- transaction: dbTransaction,
40
- };
41
- yield rental_price_entity_1.RentalPriceModel.destroy(options);
42
- }
43
- catch (error) {
44
- throw new Error(`An Error occured when delete : ${error.message}`);
45
- }
46
- });
47
- }
48
- findAndCountAll(options) {
49
- return __awaiter(this, void 0, void 0, function* () {
50
- try {
51
- let RentalPrices;
52
- if (options) {
53
- RentalPrices = yield rental_price_entity_1.RentalPriceModel.findAndCountAll(options);
54
- }
55
- else {
56
- RentalPrices = yield rental_price_entity_1.RentalPriceModel.findAndCountAll();
57
- }
58
- return RentalPrices;
59
- }
60
- catch (error) {
61
- throw new Error(`An Error occured when retriving : ${error.message}`);
62
- }
63
- });
64
- }
65
- }
66
- exports.RentalPriceRepository = RentalPriceRepository;
67
- //# sourceMappingURL=rental-price.repository.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rental-price.repository.js","sourceRoot":"","sources":["../../../../src/components/rental-price/rental-price.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAAiE;AACjE,0EAAoE;AAEpE,MAAa,qBACX,SAAQ,wBAAgC;IAGxC;QACE,KAAK,CAAC,sCAAgB,CAAC,CAAC;IAC1B,CAAC;IAEK,QAAQ,CACZ,EAAU,EACV,WAAiB;;YAEjB,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,MAAM,sCAAgB,CAAC,QAAQ,CAAC,EAAE,EAAE;oBACjD,WAAW,EAAE,WAAW;iBACzB,CAAC,CAAC;gBAEH,OAAO,MAAM,CAAC;YAChB,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,oCAAoC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YACvE,CAAC;QACH,CAAC;KAAA;IAEK,MAAM,CAAC,aAAqB,EAAE,aAAmB;;YACrD,IAAI,CAAC;gBACH,MAAM,OAAO,GAAG;oBACd,KAAK,EAAE;wBACL,aAAa,EAAE,aAAa;qBAC7B;oBACD,WAAW,EAAE,aAAa;iBAC3B,CAAC;gBACF,MAAM,sCAAgB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YAC1C,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,kCAAkC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YACrE,CAAC;QACH,CAAC;KAAA;IAEK,eAAe,CAAC,OAAa;;YACjC,IAAI,CAAC;gBACH,IAAI,YAAiB,CAAC;gBACtB,IAAI,OAAO,EAAE,CAAC;oBACZ,YAAY,GAAG,MAAM,sCAAgB,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;gBACjE,CAAC;qBAAM,CAAC;oBACN,YAAY,GAAG,MAAM,sCAAgB,CAAC,eAAe,EAAE,CAAC;gBAC1D,CAAC;gBACD,OAAO,YAAY,CAAC;YACtB,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,qCAAqC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YACxE,CAAC;QACH,CAAC;KAAA;CACF;AAlDD,sDAkDC"}
@@ -1,4 +0,0 @@
1
- import { Sequelize, SequelizeOptions } from 'sequelize-typescript';
2
- declare function init(sequelizeOptions: SequelizeOptions): void;
3
- declare function getConnection(): Sequelize;
4
- export { init, getConnection };
@@ -1,29 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.init = init;
4
- exports.getConnection = getConnection;
5
- const sequelize_typescript_1 = require("sequelize-typescript");
6
- const rental_entity_1 = require("./models/rental.entity");
7
- const rental_price_entity_1 = require("./models/rental-price.entity");
8
- const booking_entity_1 = require("./models/booking.entity");
9
- const joint_hirer_entity_1 = require("./models/joint-hirer.entity");
10
- const agreement_entity_1 = require("./models/agreement.entity");
11
- const agreement_signature_entity_1 = require("./models/agreement-signature.entity");
12
- const agreement_history_entity_1 = require("./models/agreement-history.entity");
13
- let sequelize;
14
- function init(sequelizeOptions) {
15
- sequelize = new sequelize_typescript_1.Sequelize(sequelizeOptions);
16
- sequelize.addModels([
17
- rental_entity_1.RentalModel,
18
- rental_price_entity_1.RentalPriceModel,
19
- booking_entity_1.BookingModel,
20
- joint_hirer_entity_1.JointHirerModel,
21
- agreement_entity_1.AgreementModel,
22
- agreement_signature_entity_1.AgreementSignatureModel,
23
- agreement_history_entity_1.AgreementHistoryModel,
24
- ]);
25
- }
26
- function getConnection() {
27
- return sequelize;
28
- }
29
- //# sourceMappingURL=database.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"database.js","sourceRoot":"","sources":["../../src/database.ts"],"names":[],"mappings":";;AA8BS,oBAAI;AAAE,sCAAa;AA9B5B,+DAAmE;AACnE,0DAAqD;AACrD,sEAAgE;AAChE,4DAAuD;AACvD,oEAA8D;AAC9D,gEAA2D;AAC3D,oFAA8E;AAC9E,gFAA0E;AAE1E,IAAI,SAAoB,CAAC;AAEzB,SAAS,IAAI,CAAC,gBAAkC;IAC9C,SAAS,GAAG,IAAI,gCAAS,CAAC,gBAAgB,CAAC,CAAC;IAE5C,SAAS,CAAC,SAAS,CAAC;QAElB,2BAAW;QACX,sCAAgB;QAChB,6BAAY;QACZ,oCAAe;QACf,iCAAc;QACd,oDAAuB;QACvB,gDAAqB;KACtB,CAAC,CAAC;AACL,CAAC;AAED,SAAS,aAAa;IACpB,OAAO,SAAS,CAAC;AACnB,CAAC"}
@@ -1,4 +0,0 @@
1
- export declare enum RentalAccountTypeEnum {
2
- SINGLE = "Single",
3
- JOINT = "Joint"
4
- }
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RentalAccountTypeEnum = void 0;
4
- var RentalAccountTypeEnum;
5
- (function (RentalAccountTypeEnum) {
6
- RentalAccountTypeEnum["SINGLE"] = "Single";
7
- RentalAccountTypeEnum["JOINT"] = "Joint";
8
- })(RentalAccountTypeEnum || (exports.RentalAccountTypeEnum = RentalAccountTypeEnum = {}));
9
- //# sourceMappingURL=account-type.enum.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"account-type.enum.js","sourceRoot":"","sources":["../../../src/enum/account-type.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAC/B,0CAAiB,CAAA;IACjB,wCAAe,CAAA;AACjB,CAAC,EAHW,qBAAqB,qCAArB,qBAAqB,QAGhC"}
@@ -1,5 +0,0 @@
1
- export declare enum AggrementStatusEnum {
2
- NOT_GENERATED = "Not Generated",
3
- GENERATED = "Generated",
4
- SIGNED = "Signed"
5
- }
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AggrementStatusEnum = void 0;
4
- var AggrementStatusEnum;
5
- (function (AggrementStatusEnum) {
6
- AggrementStatusEnum["NOT_GENERATED"] = "Not Generated";
7
- AggrementStatusEnum["GENERATED"] = "Generated";
8
- AggrementStatusEnum["SIGNED"] = "Signed";
9
- })(AggrementStatusEnum || (exports.AggrementStatusEnum = AggrementStatusEnum = {}));
10
- //# sourceMappingURL=aggrement-status.enum.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"aggrement-status.enum.js","sourceRoot":"","sources":["../../../src/enum/aggrement-status.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,sDAA+B,CAAA;IAC/B,8CAAuB,CAAA;IACvB,wCAAiB,CAAA;AACnB,CAAC,EAJW,mBAAmB,mCAAnB,mBAAmB,QAI9B"}
@@ -1,4 +0,0 @@
1
- export declare enum AgreementSignatureStatusEnum {
2
- PENDING = "Pending",
3
- SIGNED = "Signed"
4
- }
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AgreementSignatureStatusEnum = void 0;
4
- var AgreementSignatureStatusEnum;
5
- (function (AgreementSignatureStatusEnum) {
6
- AgreementSignatureStatusEnum["PENDING"] = "Pending";
7
- AgreementSignatureStatusEnum["SIGNED"] = "Signed";
8
- })(AgreementSignatureStatusEnum || (exports.AgreementSignatureStatusEnum = AgreementSignatureStatusEnum = {}));
9
- //# sourceMappingURL=agreement-signature-status.enum.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"agreement-signature-status.enum.js","sourceRoot":"","sources":["../../../src/enum/agreement-signature-status.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,4BAGX;AAHD,WAAY,4BAA4B;IACtC,mDAAmB,CAAA;IACnB,iDAAiB,CAAA;AACnB,CAAC,EAHW,4BAA4B,4CAA5B,4BAA4B,QAGvC"}
@@ -1,5 +0,0 @@
1
- export declare enum BookingStatusEnum {
2
- CONFIRMED = "Confirmed",
3
- PENDING = "Pending",
4
- CANCELLED = "Cancelled"
5
- }
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BookingStatusEnum = void 0;
4
- var BookingStatusEnum;
5
- (function (BookingStatusEnum) {
6
- BookingStatusEnum["CONFIRMED"] = "Confirmed";
7
- BookingStatusEnum["PENDING"] = "Pending";
8
- BookingStatusEnum["CANCELLED"] = "Cancelled";
9
- })(BookingStatusEnum || (exports.BookingStatusEnum = BookingStatusEnum = {}));
10
- //# sourceMappingURL=booking.enum.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"booking.enum.js","sourceRoot":"","sources":["../../../src/enum/booking.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,4CAAuB,CAAA;IACvB,wCAAmB,CAAA;IACnB,4CAAuB,CAAA;AACzB,CAAC,EAJW,iBAAiB,iCAAjB,iBAAiB,QAI5B"}
@@ -1,4 +0,0 @@
1
- export declare enum HirerSignatureStatusEnum {
2
- PENDING = "Pending",
3
- SIGNED = "Signed"
4
- }
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.HirerSignatureStatusEnum = void 0;
4
- var HirerSignatureStatusEnum;
5
- (function (HirerSignatureStatusEnum) {
6
- HirerSignatureStatusEnum["PENDING"] = "Pending";
7
- HirerSignatureStatusEnum["SIGNED"] = "Signed";
8
- })(HirerSignatureStatusEnum || (exports.HirerSignatureStatusEnum = HirerSignatureStatusEnum = {}));
9
- //# sourceMappingURL=hirer-signature-status.enum.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hirer-signature-status.enum.js","sourceRoot":"","sources":["../../../src/enum/hirer-signature-status.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,wBAGX;AAHD,WAAY,wBAAwB;IAClC,+CAAmB,CAAA;IACnB,6CAAiB,CAAA;AACnB,CAAC,EAHW,wBAAwB,wCAAxB,wBAAwB,QAGnC"}