@shisyamo4131/air-guard-v2-schemas 2.4.1-dev.0 → 2.4.2-dev.1
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/Company.js +16 -6
- package/src/constants/day-of-week.js +20 -0
- package/src/constants/index.js +10 -0
- package/src/parts/fieldDefinitions.js +1 -0
package/package.json
CHANGED
package/src/Company.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Company Model
|
|
3
3
|
* @version 1.0.0
|
|
4
4
|
* @author shisyamo4131
|
|
5
|
+
* @update 2026-01-06 - Add `firstDayOfWeek` property.
|
|
5
6
|
* @update 2025-12-29 - Add `isCompleteRequiredFields` computed property.
|
|
6
7
|
* @update 2025-12-02 - Add maintenance information properties.
|
|
7
8
|
* @update 2025-12-01 - Add Stripe integration fields (stripeCustomerId, subscription).
|
|
@@ -15,6 +16,7 @@ import Agreement from "./Agreement.js";
|
|
|
15
16
|
import SiteOrder from "./SiteOrder.js";
|
|
16
17
|
import RoundSetting from "./RoundSetting.js";
|
|
17
18
|
import { GeocodableMixin } from "./mixins/GeocodableMixin.js";
|
|
19
|
+
import { DAY_OF_WEEK_OPTIONS, DAY_OF_WEEK_VALUES } from "./constants/index.js";
|
|
18
20
|
|
|
19
21
|
const classProps = {
|
|
20
22
|
companyName: defField("name", { label: "会社名", required: true }),
|
|
@@ -42,12 +44,7 @@ const classProps = {
|
|
|
42
44
|
accountType: defField("select", {
|
|
43
45
|
label: "口座種別",
|
|
44
46
|
default: "普通",
|
|
45
|
-
component: {
|
|
46
|
-
name: "air-select",
|
|
47
|
-
attrs: {
|
|
48
|
-
items: ["普通", "当座"],
|
|
49
|
-
},
|
|
50
|
-
},
|
|
47
|
+
component: { name: "air-select", attrs: { items: ["普通", "当座"] } },
|
|
51
48
|
}),
|
|
52
49
|
accountNumber: defField("oneLine", { label: "口座番号", length: 7 }),
|
|
53
50
|
accountHolder: defField("oneLine", { label: "口座名義", length: 50 }),
|
|
@@ -97,6 +94,19 @@ const classProps = {
|
|
|
97
94
|
},
|
|
98
95
|
}),
|
|
99
96
|
|
|
97
|
+
firstDayOfWeek: defField("select", {
|
|
98
|
+
label: "週の始まり",
|
|
99
|
+
default: DAY_OF_WEEK_VALUES.SUNDAY.value,
|
|
100
|
+
component: {
|
|
101
|
+
name: "air-select",
|
|
102
|
+
attrs: {
|
|
103
|
+
items: DAY_OF_WEEK_OPTIONS,
|
|
104
|
+
hint: "勤怠管理などで週の始まりとする曜日を設定します。",
|
|
105
|
+
persistentHint: true,
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
}),
|
|
109
|
+
|
|
100
110
|
/** Stripe連携フィールド */
|
|
101
111
|
stripeCustomerId: defField("oneLine", {
|
|
102
112
|
label: "Stripe顧客ID",
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// prettier-ignore
|
|
2
|
+
export const VALUES = Object.freeze({
|
|
3
|
+
SUNDAY: { value: 0, title: "日曜日" },
|
|
4
|
+
MONDAY: { value: 1, title: "月曜日" },
|
|
5
|
+
TUESDAY: { value: 2, title: "火曜日" },
|
|
6
|
+
WEDNESDAY: { value: 3, title: "水曜日" },
|
|
7
|
+
THURSDAY: { value: 4, title: "木曜日" },
|
|
8
|
+
FRIDAY: { value: 5, title: "金曜日" },
|
|
9
|
+
SATURDAY: { value: 6, title: "土曜日" },
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export const OPTIONS = [
|
|
13
|
+
{ title: VALUES.SUNDAY.title, value: VALUES.SUNDAY.value },
|
|
14
|
+
{ title: VALUES.MONDAY.title, value: VALUES.MONDAY.value },
|
|
15
|
+
{ title: VALUES.TUESDAY.title, value: VALUES.TUESDAY.value },
|
|
16
|
+
{ title: VALUES.WEDNESDAY.title, value: VALUES.WEDNESDAY.value },
|
|
17
|
+
{ title: VALUES.THURSDAY.title, value: VALUES.THURSDAY.value },
|
|
18
|
+
{ title: VALUES.FRIDAY.title, value: VALUES.FRIDAY.value },
|
|
19
|
+
{ title: VALUES.SATURDAY.title, value: VALUES.SATURDAY.value },
|
|
20
|
+
];
|
package/src/constants/index.js
CHANGED
|
@@ -18,6 +18,16 @@ export {
|
|
|
18
18
|
VALUES as CONTRACT_STATUS_VALUES,
|
|
19
19
|
OPTIONS as CONTRACT_STATUS_OPTIONS,
|
|
20
20
|
} from "./contract-status.js";
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Day of Week Constants
|
|
24
|
+
* @see src/constants/day-of-week.js
|
|
25
|
+
*/
|
|
26
|
+
export {
|
|
27
|
+
VALUES as DAY_OF_WEEK_VALUES,
|
|
28
|
+
OPTIONS as DAY_OF_WEEK_OPTIONS,
|
|
29
|
+
} from "./day-of-week.js";
|
|
30
|
+
|
|
21
31
|
export {
|
|
22
32
|
VALUES as DAY_TYPE_VALUES,
|
|
23
33
|
OPTIONS as DAY_TYPE_OPTIONS,
|
|
@@ -808,6 +808,7 @@ export const defField = (key, options = {}) => {
|
|
|
808
808
|
if (options.hasOwnProperty("length")) {
|
|
809
809
|
// options.length が明示的に指定されていれば最優先
|
|
810
810
|
lengthToUseForRules = options.length;
|
|
811
|
+
newConfig.length = options.length; // newConfig.length も更新
|
|
811
812
|
} else if (
|
|
812
813
|
newConfig.hasOwnProperty("length") &&
|
|
813
814
|
newConfig.length !== undefined
|