@shisyamo4131/air-guard-v2-schemas 2.3.1 → 2.3.2

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shisyamo4131/air-guard-v2-schemas",
3
- "version": "2.3.1",
3
+ "version": "2.3.2",
4
4
  "description": "Schemas for AirGuard V2",
5
5
  "type": "module",
6
6
  "main": "index.js",
package/src/Agreement.js CHANGED
@@ -75,8 +75,6 @@
75
75
  * - @param {Date} v - The new `dateAt` value
76
76
  *****************************************************************************/
77
77
  import WorkingResult from "./WorkingResult.js";
78
- import { VALUES as DAY_TYPE } from "./constants/day-type.js";
79
- import { VALUES as SHIFT_TYPE } from "./constants/shift-type.js";
80
78
  import {
81
79
  VALUES as BILLING_UNIT_TYPE,
82
80
  OPTIONS as BILLING_UNIT_TYPE_OPTIONS,
@@ -125,113 +123,11 @@ const classProps = {
125
123
  }),
126
124
  };
127
125
 
128
- /**
129
- * Table headers for displaying agreement details
130
- */
131
- const headers = [
132
- {
133
- title: "適用開始日",
134
- key: "dateAt",
135
- value: (item) => item.dateAt.toLocaleDateString(),
136
- },
137
- {
138
- title: "締日",
139
- key: "cutoffDate",
140
- value: (item) => {
141
- return CutoffDate.getDisplayText(item.cutoffDate);
142
- },
143
- align: "center",
144
- sortable: false,
145
- },
146
- {
147
- title: "区分",
148
- key: "type",
149
- value: (item) =>
150
- `${DAY_TYPE[item.dayType]}${SHIFT_TYPE[item.shiftType].title}`,
151
- align: "center",
152
- sortable: false,
153
- },
154
- {
155
- title: "勤務時間",
156
- key: "time",
157
- value: (item) => `${item.startTime} ~ ${item.endTime}`,
158
- align: "center",
159
- sortable: false,
160
- },
161
- {
162
- title: "規定実働時間",
163
- key: "regulationWorkMinutes",
164
- value: (item) => `${item.regulationWorkMinutes}分`,
165
- align: "center",
166
- sortable: false,
167
- },
168
- {
169
- title: "休憩時間",
170
- key: "breakMinutes",
171
- value: (item) => `${item.breakMinutes}分`,
172
- align: "center",
173
- sortable: false,
174
- },
175
- {
176
- title: "残業時間",
177
- key: "overtimeWorkMinutes",
178
- value: (item) => `${item.overtimeWorkMinutes}分`,
179
- align: "center",
180
- sortable: false,
181
- },
182
- {
183
- title: "通常",
184
- align: "center",
185
- children: [
186
- {
187
- title: "単価",
188
- key: "unitPriceBase",
189
- value: (item) => item.unitPriceBase.toLocaleString(),
190
- align: "center",
191
- sortable: false,
192
- },
193
- {
194
- title: "時間外",
195
- key: "overtimeUnitPriceBase",
196
- value: (item) => item.overtimeUnitPriceBase.toLocaleString(),
197
- align: "center",
198
- sortable: false,
199
- },
200
- ],
201
- },
202
- {
203
- title: "資格者",
204
- align: "center",
205
- children: [
206
- {
207
- title: "単価",
208
- key: "unitPriceQualified",
209
- value: (item) => item.unitPriceQualified.toLocaleString(),
210
- align: "center",
211
- sortable: false,
212
- },
213
- {
214
- title: "時間外",
215
- key: "overtimeUnitPriceQualified",
216
- value: (item) => item.overtimeUnitPriceQualified.toLocaleString(),
217
- align: "center",
218
- sortable: false,
219
- },
220
- ],
221
- },
222
- {
223
- title: "請求単位",
224
- key: "billingUnitType",
225
- value: (item) => BILLING_UNIT_TYPE[item.billingUnitType],
226
- align: "center",
227
- sortable: false,
228
- },
229
- ];
230
-
231
126
  export default class Agreement extends WorkingResult {
232
127
  static className = "取極め";
233
128
  static classProps = classProps;
234
- static headers = headers;
129
+
130
+ static BILLING_UNIT_TYPE = BILLING_UNIT_TYPE;
235
131
 
236
132
  /**
237
133
  * Returns an object containing price-related properties.
@@ -62,6 +62,8 @@ import FireModel from "@shisyamo4131/air-firebase-v2";
62
62
  import { defField } from "./parts/fieldDefinitions.js";
63
63
  import { getDateAt } from "./utils/index.js";
64
64
  import { getDayType } from "./constants/day-type.js";
65
+ import { VALUES as DAY_TYPE } from "./constants/day-type.js";
66
+ import { VALUES as SHIFT_TYPE } from "./constants/shift-type.js";
65
67
 
66
68
  const classProps = {
67
69
  dateAt: defField("dateAt", { required: true }),
@@ -106,6 +108,9 @@ export default class WorkingResult extends FireModel {
106
108
  static logicalDelete = false;
107
109
  static classProps = classProps;
108
110
 
111
+ static DAY_TYPE = DAY_TYPE;
112
+ static SHIFT_TYPE = SHIFT_TYPE;
113
+
109
114
  /**
110
115
  * Constructor
111
116
  * - Prevent direct instantiation of WorkingResult class.