@shisyamo4131/air-guard-v2-schemas 2.3.7-dev.50 → 2.3.7-dev.52
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 +1 -1
- package/src/Employee.js +2 -2
- package/src/SiteOperationSchedule.js +7 -1
package/package.json
CHANGED
package/src/Employee.js
CHANGED
|
@@ -276,7 +276,7 @@ export default class Employee extends FireModel {
|
|
|
276
276
|
set(v) {
|
|
277
277
|
if (v !== _lastName) {
|
|
278
278
|
_lastName = v;
|
|
279
|
-
this.displayName = `${_lastName}${this.firstName}`.trim();
|
|
279
|
+
this.displayName = `${_lastName}${this.firstName || ""}`.trim();
|
|
280
280
|
}
|
|
281
281
|
},
|
|
282
282
|
},
|
|
@@ -289,7 +289,7 @@ export default class Employee extends FireModel {
|
|
|
289
289
|
set(v) {
|
|
290
290
|
if (v !== _firstName) {
|
|
291
291
|
_firstName = v;
|
|
292
|
-
this.displayName = `${this.lastName}${_firstName}`.trim();
|
|
292
|
+
this.displayName = `${this.lastName || ""}${_firstName}`.trim();
|
|
293
293
|
}
|
|
294
294
|
},
|
|
295
295
|
},
|
|
@@ -595,7 +595,13 @@ export default class SiteOperationSchedule extends Operation {
|
|
|
595
595
|
// 加えて重複も除外する。
|
|
596
596
|
const targetDates = dates
|
|
597
597
|
.map((date) => {
|
|
598
|
-
if (date instanceof Date)
|
|
598
|
+
if (date instanceof Date) {
|
|
599
|
+
const jstDate = new Date(date.getTime() + 9 * 60 * 60 * 1000);
|
|
600
|
+
const year = jstDate.getUTCFullYear();
|
|
601
|
+
const month = String(jstDate.getUTCMonth() + 1).padStart(2, "0");
|
|
602
|
+
const day = String(jstDate.getUTCDate()).padStart(2, "0");
|
|
603
|
+
return `${year}-${month}-${day}`;
|
|
604
|
+
}
|
|
599
605
|
return date;
|
|
600
606
|
})
|
|
601
607
|
.filter((date) => date !== this.date)
|