@shisyamo4131/air-guard-v2-schemas 2.3.7-dev.5 → 2.3.7-dev.7
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/package.json
CHANGED
package/src/OperationResult.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/*****************************************************************************
|
|
2
2
|
* SiteOperationSchedule Model ver 1.1.0
|
|
3
|
-
* @version 1.1.
|
|
3
|
+
* @version 1.1.1
|
|
4
4
|
* @author shisyamo4131
|
|
5
5
|
*
|
|
6
|
+
* @update 2025-11-28 v1.1.1 - Removed the `agreement` parameter from `syncToOperationResult` method.
|
|
6
7
|
* @update 2025-11-22 v1.1.0 - Moved `duplicate`, `notify`, `syncToOperationResult`,
|
|
7
8
|
* and `toEvent` methods from client side code.
|
|
8
9
|
*
|
|
@@ -167,7 +168,8 @@
|
|
|
167
168
|
* @method syncToOperationResult - Creates an OperationResult document based on the current SiteOperationSchedule
|
|
168
169
|
* - The OperationResult document ID will be the same as the SiteOperationSchedule document ID.
|
|
169
170
|
* - Sets the `operationResultId` property of the SiteOperationSchedule to the created OperationResult document ID.
|
|
170
|
-
* -
|
|
171
|
+
* - If an OperationResult already exists, it will be overwritten.
|
|
172
|
+
* - [UPDATE 2025-11-28] Removed the `agreement` parameter. The agreement is now fetched internally.
|
|
171
173
|
*
|
|
172
174
|
* @method toEvent - Converts the SiteOperationSchedule instance to a VCalendar event object
|
|
173
175
|
* - Returns an object with properties required for displaying events in Vuetify's VCalendar component.
|
|
@@ -679,9 +681,14 @@ export default class SiteOperationSchedule extends Operation {
|
|
|
679
681
|
* 既に存在する場合は上書きされます。
|
|
680
682
|
* - 現場稼働予定ドキュメントの `operationResultId` プロパティに
|
|
681
683
|
* 作成された稼働実績ドキュメントの ID が設定されます。(当該ドキュメント ID と同一)
|
|
682
|
-
* @param {Object}
|
|
684
|
+
* @param {Object} notifications - 配置通知オブジェクトのマップ。
|
|
685
|
+
* - キー: 配置通知の一意キー(`notificationKey` プロパティ)
|
|
686
|
+
* - 値: 配置通知ドキュメントオブジェクト
|
|
687
|
+
* @returns {Promise<void>}
|
|
688
|
+
*
|
|
689
|
+
* @update 2025-11-28 - Removed the `agreement` parameter.
|
|
683
690
|
*/
|
|
684
|
-
async syncToOperationResult(
|
|
691
|
+
async syncToOperationResult(notifications = {}) {
|
|
685
692
|
if (!this.docId) {
|
|
686
693
|
throw new Error(
|
|
687
694
|
"不正な処理です。作成前の現場稼働予定から稼働実績を作成することはできません。"
|
|
@@ -712,10 +719,8 @@ export default class SiteOperationSchedule extends Operation {
|
|
|
712
719
|
...this.toObject(),
|
|
713
720
|
employees,
|
|
714
721
|
outsourcers,
|
|
715
|
-
// agreement: agreement || null,
|
|
716
722
|
siteOperationScheduleId: this.docId,
|
|
717
723
|
});
|
|
718
|
-
// operationResult.refreshBillingDateAt();
|
|
719
724
|
await this.constructor.runTransaction(async (transaction) => {
|
|
720
725
|
const docRef = await operationResult.create({
|
|
721
726
|
docId: this.docId,
|