@shisyamo4131/air-guard-v2-schemas 1.0.1 → 1.2.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.
- package/index.js +1 -0
- package/package.json +1 -1
- package/src/OperationResult.js +53 -40
package/index.js
CHANGED
|
@@ -2,6 +2,7 @@ export { default as Agreement } from "./src/Agreement.js";
|
|
|
2
2
|
export { default as ArrangementNotification } from "./src/ArrangementNotification.js";
|
|
3
3
|
export { default as Company } from "./src/Company.js";
|
|
4
4
|
export { default as Customer, CustomerMinimal } from "./src/Customer.js";
|
|
5
|
+
export { default as CutoffDate } from "./src/utils/CutoffDate.js";
|
|
5
6
|
export { default as Employee } from "./src/Employee.js";
|
|
6
7
|
export { default as OperationBilling } from "./src/OperationBilling.js";
|
|
7
8
|
export { default as OperationResult } from "./src/OperationResult.js";
|
package/package.json
CHANGED
package/src/OperationResult.js
CHANGED
|
@@ -8,19 +8,19 @@
|
|
|
8
8
|
* - Provides comprehensive billing calculations including statistics, sales amounts, and tax.
|
|
9
9
|
* - Supports both daily and hourly billing with adjusted quantities.
|
|
10
10
|
* ---------------------------------------------------------------------------
|
|
11
|
-
* @
|
|
11
|
+
* @prop {string|null} siteOperationScheduleId - Associated SiteOperationSchedule document ID
|
|
12
12
|
* - If this OperationResult was created from a SiteOperationSchedule, this property holds that ID.
|
|
13
13
|
* - If this property is set, the instance cannot be deleted.
|
|
14
|
-
* @
|
|
15
|
-
* @
|
|
14
|
+
* @prop {boolean} useAdjustedQuantity - Flag to indicate if adjusted quantities are used for billing
|
|
15
|
+
* @prop {number} adjustedQuantityBase - Adjusted quantity for base workers
|
|
16
16
|
* - Quantity used for billing base workers when `useAdjustedQuantity` is true.
|
|
17
|
-
* @
|
|
17
|
+
* @prop {number} adjustedOvertimeBase - Adjusted overtime for base workers
|
|
18
18
|
* - Overtime used for billing base workers when `useAdjustedQuantity` is true.
|
|
19
|
-
* @
|
|
19
|
+
* @prop {number} adjustedQuantityQualified - Adjusted quantity for qualified workers
|
|
20
20
|
* - Quantity used for billing qualified workers when `useAdjustedQuantity` is true.
|
|
21
|
-
* @
|
|
21
|
+
* @prop {number} adjustedOvertimeQualified - Adjusted overtime for qualified workers
|
|
22
22
|
* - Overtime used for billing qualified workers when `useAdjustedQuantity` is true.
|
|
23
|
-
* @
|
|
23
|
+
* @prop {Date} billingDateAt - Billing date
|
|
24
24
|
* ---------------------------------------------------------------------------
|
|
25
25
|
* @computed {Object} statistics - Statistics of workers (read-only)
|
|
26
26
|
* - Contains counts and total work minutes for base and qualified workers, including OJT breakdowns.
|
|
@@ -40,39 +40,39 @@
|
|
|
40
40
|
* - Sum of `salesAmount` and `tax`.
|
|
41
41
|
* ---------------------------------------------------------------------------
|
|
42
42
|
* @inherited - The following properties are inherited from Operation:
|
|
43
|
-
* @
|
|
43
|
+
* @prop {string} siteId - Site document ID (trigger property)
|
|
44
44
|
* - Automatically synchronizes to all `employees` and `outsourcers` when changed.
|
|
45
|
-
* @
|
|
46
|
-
* @
|
|
47
|
-
* @
|
|
48
|
-
* @
|
|
49
|
-
* @
|
|
45
|
+
* @prop {number} requiredPersonnel - Required number of personnel
|
|
46
|
+
* @prop {boolean} qualificationRequired - Qualification required flag
|
|
47
|
+
* @prop {string} workDescription - Work description
|
|
48
|
+
* @prop {string} remarks - Remarks
|
|
49
|
+
* @prop {Array<OperationResultDetail>} employees - Assigned employees
|
|
50
50
|
* - Array of `OperationResultDetail` instances representing assigned employees
|
|
51
|
-
* @
|
|
51
|
+
* @prop {Array<OperationResultDetail>} outsourcers - Assigned outsourcers
|
|
52
52
|
* - Array of `OperationResultDetail` instances representing assigned outsourcers
|
|
53
53
|
* ---------------------------------------------------------------------------
|
|
54
54
|
* @inherited - The following properties are inherited from Agreement (via Operation):
|
|
55
|
-
* @
|
|
56
|
-
* @
|
|
57
|
-
* @
|
|
58
|
-
* @
|
|
59
|
-
* @
|
|
60
|
-
* @
|
|
61
|
-
* @
|
|
55
|
+
* @prop {number} unitPriceBase - Base unit price (JPY)
|
|
56
|
+
* @prop {number} overtimeUnitPriceBase - Overtime unit price (JPY/hour)
|
|
57
|
+
* @prop {number} unitPriceQualified - Qualified unit price (JPY)
|
|
58
|
+
* @prop {number} overtimeUnitPriceQualified - Qualified overtime unit price (JPY/hour)
|
|
59
|
+
* @prop {string} billingUnitType - Billing unit type
|
|
60
|
+
* @prop {boolean} includeBreakInBilling - Whether to include break time in billing if `billingUnitType` is `PER_HOUR`.
|
|
61
|
+
* @prop {number} cutoffDate - Cutoff date value from CutoffDate.VALUES
|
|
62
62
|
* - The cutoff date for billing, using values defined in the CutoffDate utility class.
|
|
63
63
|
* ---------------------------------------------------------------------------
|
|
64
64
|
* @inherited - The following properties are inherited from WorkingResult (via Operation):
|
|
65
|
-
* @
|
|
65
|
+
* @prop {Date} dateAt - Date of operation (placement date) (trigger property)
|
|
66
66
|
* - Automatically synchronizes to all `employees` and `outsourcers` when changed.
|
|
67
|
-
* @
|
|
68
|
-
* @
|
|
67
|
+
* @prop {string} dayType - Day type (e.g., `WEEKDAY`, `WEEKEND`, `HOLIDAY`)
|
|
68
|
+
* @prop {string} shiftType - `DAY` or `NIGHT` (trigger property)
|
|
69
69
|
* - Automatically synchronizes to all `employees` and `outsourcers` when changed.
|
|
70
|
-
* @
|
|
71
|
-
* @
|
|
70
|
+
* @prop {string} startTime - Start time (HH:MM format)
|
|
71
|
+
* @prop {boolean} isStartNextDay - Next day start flag
|
|
72
72
|
* - `true` if the actual work starts the day after the placement date `dateAt`
|
|
73
|
-
* @
|
|
74
|
-
* @
|
|
75
|
-
* @
|
|
73
|
+
* @prop {string} endTime - End time (HH:MM format)
|
|
74
|
+
* @prop {number} breakMinutes - Break time (minutes)
|
|
75
|
+
* @prop {number} regulationWorkMinutes - Regulation work minutes (trigger property)
|
|
76
76
|
* - Indicates the maximum working time treated as regular working hours.
|
|
77
77
|
* - Automatically synchronizes to all `employees` and `outsourcers` when changed.
|
|
78
78
|
* ---------------------------------------------------------------------------
|
|
@@ -188,17 +188,6 @@ import CutoffDate from "./utils/CutoffDate.js";
|
|
|
188
188
|
const classProps = {
|
|
189
189
|
...Operation.classProps,
|
|
190
190
|
...Agreement.classProps,
|
|
191
|
-
cutoffDate: defField("select", {
|
|
192
|
-
label: "締日区分",
|
|
193
|
-
default: CutoffDate.VALUES.END_OF_MONTH,
|
|
194
|
-
required: true,
|
|
195
|
-
hidden: true,
|
|
196
|
-
component: {
|
|
197
|
-
attrs: {
|
|
198
|
-
items: CutoffDate.OPTIONS,
|
|
199
|
-
},
|
|
200
|
-
},
|
|
201
|
-
}),
|
|
202
191
|
siteOperationScheduleId: defField("oneLine", { hidden: true }),
|
|
203
192
|
useAdjustedQuantity: defField("check", {
|
|
204
193
|
label: "調整数量を使用",
|
|
@@ -246,7 +235,25 @@ export default class OperationResult extends Operation {
|
|
|
246
235
|
super.afterInitialize();
|
|
247
236
|
|
|
248
237
|
/** Computed properties */
|
|
238
|
+
let _cutoffDate = this.cutoffDate;
|
|
249
239
|
Object.defineProperties(this, {
|
|
240
|
+
cutoffDate: {
|
|
241
|
+
configurable: true,
|
|
242
|
+
enumerable: true,
|
|
243
|
+
get() {
|
|
244
|
+
return _cutoffDate;
|
|
245
|
+
},
|
|
246
|
+
set(v) {
|
|
247
|
+
_cutoffDate = v;
|
|
248
|
+
// Update billingDateAt when cutoffDate changes
|
|
249
|
+
if (this.dateAt) {
|
|
250
|
+
this.billingDateAt = CutoffDate.getBillingDateAt(
|
|
251
|
+
this.dateAt,
|
|
252
|
+
this.cutoffDate
|
|
253
|
+
);
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
},
|
|
250
257
|
statistics: {
|
|
251
258
|
configurable: true,
|
|
252
259
|
enumerable: true,
|
|
@@ -422,6 +429,12 @@ export default class OperationResult extends Operation {
|
|
|
422
429
|
});
|
|
423
430
|
}
|
|
424
431
|
|
|
432
|
+
setDateAtCallback(v) {
|
|
433
|
+
super.setDateAtCallback(v);
|
|
434
|
+
if (!this.cutoffDate) return;
|
|
435
|
+
this.billingDateAt = CutoffDate.getBillingDateAt(v, this.cutoffDate);
|
|
436
|
+
}
|
|
437
|
+
|
|
425
438
|
/**
|
|
426
439
|
* Override `beforeDelete`.
|
|
427
440
|
* - Prevents deletion if the instance has `siteOperationScheduleId`.
|