utiller 1.0.358 → 1.0.359
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/lib/utiller/index.js +42 -57
- package/package.json +1 -1
- package/template/sample.package.json +1 -1
package/lib/utiller/index.js
CHANGED
|
@@ -4191,63 +4191,48 @@ var Utiller = /*#__PURE__*/function () {
|
|
|
4191
4191
|
items: conflictItems // 衝突的任務列表
|
|
4192
4192
|
};
|
|
4193
4193
|
}
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
}
|
|
4237
|
-
*/
|
|
4238
|
-
|
|
4239
|
-
// 測試:兩人資源
|
|
4240
|
-
console.log(checkPeriodConflict(newTask, existingTasks, 2));
|
|
4241
|
-
/*
|
|
4242
|
-
{
|
|
4243
|
-
conflict: false,
|
|
4244
|
-
items: [
|
|
4245
|
-
{ id: 'T005', period: '202508201630-202508201700' },
|
|
4246
|
-
{ id: 'T006', period: '202508201645-202508201700' }
|
|
4247
|
-
]
|
|
4248
|
-
}
|
|
4249
|
-
*/
|
|
4250
|
-
}
|
|
4194
|
+
|
|
4195
|
+
// testOfConflict() {
|
|
4196
|
+
// // ===== 測試資料 =====
|
|
4197
|
+
// const newTask = {
|
|
4198
|
+
// timeSlot: "2025/08/20 (三)|16:00-17:00", // 格式: YYYY/MM/DD (週)|HH:mm-HH:mm
|
|
4199
|
+
// id: "JOB001",
|
|
4200
|
+
// description: "安裝冷氣"
|
|
4201
|
+
// };
|
|
4202
|
+
//
|
|
4203
|
+
// const existingTasks = [
|
|
4204
|
+
// { id: "T001", period: "202508151400-202508151500" },
|
|
4205
|
+
// { id: "T002", period: "202508151600-202508151700" },
|
|
4206
|
+
// { id: "T003", period: "202508161400-202508161500" },
|
|
4207
|
+
// { id: "T004", period: "202508171600-202508171700" },
|
|
4208
|
+
// { id: "T005", period: "202508201630-202508201700" }, // 衝突
|
|
4209
|
+
// { id: "T006", period: "202508201645-202508201700" } // 衝突
|
|
4210
|
+
// ];
|
|
4211
|
+
//
|
|
4212
|
+
// // 測試:一人資源
|
|
4213
|
+
// console.log(this.checkPeriodConflict(newTask, existingTasks, 1));
|
|
4214
|
+
// /*
|
|
4215
|
+
// {
|
|
4216
|
+
// conflict: true,
|
|
4217
|
+
// items: [
|
|
4218
|
+
// { id: 'T005', period: '202508201630-202508201700' },
|
|
4219
|
+
// { id: 'T006', period: '202508201645-202508201700' }
|
|
4220
|
+
// ]
|
|
4221
|
+
// }
|
|
4222
|
+
// */
|
|
4223
|
+
//
|
|
4224
|
+
// // 測試:兩人資源
|
|
4225
|
+
// console.log(this.checkPeriodConflict(newTask, existingTasks, 2));
|
|
4226
|
+
// /*
|
|
4227
|
+
// {
|
|
4228
|
+
// conflict: false,
|
|
4229
|
+
// items: [
|
|
4230
|
+
// { id: 'T005', period: '202508201630-202508201700' },
|
|
4231
|
+
// { id: 'T006', period: '202508201645-202508201700' }
|
|
4232
|
+
// ]
|
|
4233
|
+
// }
|
|
4234
|
+
// */
|
|
4235
|
+
// }
|
|
4251
4236
|
/** ============== 排課系統公式 結束 ============== */
|
|
4252
4237
|
}]);
|
|
4253
4238
|
}();
|
package/package.json
CHANGED