@attraccess/plugin-reservations 0.0.0-stage → 0.1.0-alpha.0
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/dist/index.js +6119 -0
- package/dist/migrations.js +161 -0
- package/frontend/__federation_expose_Plugin-DAM66N0j.js +3788 -0
- package/frontend/__federation_fn_import-DAGm_xmC.js +2 -0
- package/frontend/_virtual___federation_fn_import-BXODRNto.js +261 -0
- package/frontend/host-shared-placeholder-BvRk9kiK.js +0 -0
- package/frontend/index.html +13 -0
- package/frontend/remoteEntry.js +140 -0
- package/frontend/style.css +374 -0
- package/package.json +50 -4
- package/README.md +0 -3
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20
|
+
|
|
21
|
+
// backend/migrations.ts
|
|
22
|
+
var migrations_exports = {};
|
|
23
|
+
__export(migrations_exports, {
|
|
24
|
+
AddReservationStatusIndexes1790000000001: () => AddReservationStatusIndexes1790000000001,
|
|
25
|
+
CreateReservations1790000000000: () => CreateReservations1790000000000
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(migrations_exports);
|
|
28
|
+
|
|
29
|
+
// backend/migrations/1790000000000-create-reservations.ts
|
|
30
|
+
var CreateReservations1790000000000 = class {
|
|
31
|
+
constructor() {
|
|
32
|
+
__publicField(this, "name", "CreateReservations1790000000000");
|
|
33
|
+
}
|
|
34
|
+
async up(queryRunner) {
|
|
35
|
+
await queryRunner.query(
|
|
36
|
+
`CREATE TABLE IF NOT EXISTS "reservations_reservation" (
|
|
37
|
+
"id" integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
38
|
+
"resourceId" integer NOT NULL,
|
|
39
|
+
"userId" integer NOT NULL,
|
|
40
|
+
"startTime" datetime NOT NULL,
|
|
41
|
+
"endTime" datetime NOT NULL,
|
|
42
|
+
"bufferBeforeMinutes" integer NOT NULL DEFAULT (0),
|
|
43
|
+
"bufferAfterMinutes" integer NOT NULL DEFAULT (0),
|
|
44
|
+
"status" varchar NOT NULL,
|
|
45
|
+
"note" varchar,
|
|
46
|
+
"createdAt" datetime NOT NULL,
|
|
47
|
+
"endedEarlyAt" datetime,
|
|
48
|
+
"cancelledBy" integer,
|
|
49
|
+
"cancelReason" varchar,
|
|
50
|
+
"decidedBy" integer,
|
|
51
|
+
"decisionReason" varchar,
|
|
52
|
+
"decidedAt" datetime,
|
|
53
|
+
"checkedInAt" datetime,
|
|
54
|
+
"checkedInUsageId" integer,
|
|
55
|
+
"keptAt" datetime,
|
|
56
|
+
"confirmationSentAt" datetime,
|
|
57
|
+
"stillNeededSentAt" datetime,
|
|
58
|
+
"reminder24hSentAt" datetime,
|
|
59
|
+
"handoverSentAt" datetime,
|
|
60
|
+
"overrunSentAt" datetime,
|
|
61
|
+
"noShowNotifiedAt" datetime,
|
|
62
|
+
"expiredNotifiedAt" datetime
|
|
63
|
+
)`
|
|
64
|
+
);
|
|
65
|
+
await queryRunner.query(
|
|
66
|
+
`CREATE INDEX IF NOT EXISTS "IDX_reservations_reservation_slot" ON "reservations_reservation" ("resourceId", "status", "startTime", "endTime")`
|
|
67
|
+
);
|
|
68
|
+
await queryRunner.query(
|
|
69
|
+
`CREATE INDEX IF NOT EXISTS "IDX_reservations_reservation_user" ON "reservations_reservation" ("userId", "status")`
|
|
70
|
+
);
|
|
71
|
+
await queryRunner.query(
|
|
72
|
+
`CREATE TABLE IF NOT EXISTS "reservations_resource_settings" (
|
|
73
|
+
"resourceId" integer PRIMARY KEY NOT NULL,
|
|
74
|
+
"enabled" boolean NOT NULL DEFAULT (0),
|
|
75
|
+
"approvalRequired" boolean NOT NULL DEFAULT (0),
|
|
76
|
+
"timeStepMinutes" integer NOT NULL DEFAULT (15),
|
|
77
|
+
"minDurationMinutes" integer NOT NULL DEFAULT (15),
|
|
78
|
+
"maxDurationMinutes" integer NOT NULL DEFAULT (240),
|
|
79
|
+
"maxAdvanceDays" integer NOT NULL DEFAULT (30),
|
|
80
|
+
"minLeadMinutes" integer NOT NULL DEFAULT (0),
|
|
81
|
+
"bufferBeforeMinutes" integer NOT NULL DEFAULT (0),
|
|
82
|
+
"bufferAfterMinutes" integer NOT NULL DEFAULT (0),
|
|
83
|
+
"maxActiveBookingsPerUser" integer NOT NULL DEFAULT (3),
|
|
84
|
+
"whoCanBook" varchar NOT NULL DEFAULT ('can-start'),
|
|
85
|
+
"confirmWindowMinutes" integer NOT NULL DEFAULT (60),
|
|
86
|
+
"checkInEnabled" boolean NOT NULL DEFAULT (1),
|
|
87
|
+
"checkInGraceMinutes" integer NOT NULL DEFAULT (15),
|
|
88
|
+
"earlyCheckInMinutes" integer NOT NULL DEFAULT (15),
|
|
89
|
+
"handoverReminderMinutes" integer NOT NULL DEFAULT (15),
|
|
90
|
+
"bookableHours" text NOT NULL DEFAULT ('{}'),
|
|
91
|
+
"updatedAt" datetime NOT NULL
|
|
92
|
+
)`
|
|
93
|
+
);
|
|
94
|
+
await queryRunner.query(
|
|
95
|
+
`CREATE TABLE IF NOT EXISTS "reservations_global_settings" (
|
|
96
|
+
"key" varchar PRIMARY KEY NOT NULL,
|
|
97
|
+
"value" text NOT NULL
|
|
98
|
+
)`
|
|
99
|
+
);
|
|
100
|
+
await queryRunner.query(
|
|
101
|
+
`CREATE TABLE IF NOT EXISTS "reservations_ical_feed" (
|
|
102
|
+
"id" integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
103
|
+
"userId" integer NOT NULL,
|
|
104
|
+
"name" varchar NOT NULL,
|
|
105
|
+
"tokenHash" varchar NOT NULL,
|
|
106
|
+
"tokenPrefix" varchar,
|
|
107
|
+
"selection" text NOT NULL,
|
|
108
|
+
"createdAt" datetime NOT NULL,
|
|
109
|
+
"revokedAt" datetime,
|
|
110
|
+
"lastUsedAt" datetime,
|
|
111
|
+
CONSTRAINT "UQ_reservations_ical_feed_token" UNIQUE ("tokenHash")
|
|
112
|
+
)`
|
|
113
|
+
);
|
|
114
|
+
await queryRunner.query(
|
|
115
|
+
`CREATE INDEX IF NOT EXISTS "IDX_reservations_ical_feed_user" ON "reservations_ical_feed" ("userId")`
|
|
116
|
+
);
|
|
117
|
+
await queryRunner.query(
|
|
118
|
+
`CREATE TABLE IF NOT EXISTS "reservations_notice" (
|
|
119
|
+
"id" integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
120
|
+
"reservationId" integer NOT NULL,
|
|
121
|
+
"kind" varchar NOT NULL,
|
|
122
|
+
"refKey" varchar NOT NULL DEFAULT (''),
|
|
123
|
+
"sentAt" datetime NOT NULL
|
|
124
|
+
)`
|
|
125
|
+
);
|
|
126
|
+
await queryRunner.query(
|
|
127
|
+
`CREATE UNIQUE INDEX IF NOT EXISTS "UQ_reservations_notice" ON "reservations_notice" ("reservationId", "kind", "refKey")`
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
async down(queryRunner) {
|
|
131
|
+
await queryRunner.query(`DROP TABLE IF EXISTS "reservations_notice"`);
|
|
132
|
+
await queryRunner.query(`DROP TABLE IF EXISTS "reservations_ical_feed"`);
|
|
133
|
+
await queryRunner.query(`DROP TABLE IF EXISTS "reservations_global_settings"`);
|
|
134
|
+
await queryRunner.query(`DROP TABLE IF EXISTS "reservations_resource_settings"`);
|
|
135
|
+
await queryRunner.query(`DROP TABLE IF EXISTS "reservations_reservation"`);
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
// backend/migrations/1790000000001-add-reservation-status-indexes.ts
|
|
140
|
+
var AddReservationStatusIndexes1790000000001 = class {
|
|
141
|
+
constructor() {
|
|
142
|
+
__publicField(this, "name", "AddReservationStatusIndexes1790000000001");
|
|
143
|
+
}
|
|
144
|
+
async up(queryRunner) {
|
|
145
|
+
await queryRunner.query(
|
|
146
|
+
`CREATE INDEX IF NOT EXISTS "IDX_reservations_reservation_status_start" ON "reservations_reservation" ("status", "startTime")`
|
|
147
|
+
);
|
|
148
|
+
await queryRunner.query(
|
|
149
|
+
`CREATE INDEX IF NOT EXISTS "IDX_reservations_reservation_status_end" ON "reservations_reservation" ("status", "endTime")`
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
async down(queryRunner) {
|
|
153
|
+
await queryRunner.query(`DROP INDEX IF EXISTS "IDX_reservations_reservation_status_end"`);
|
|
154
|
+
await queryRunner.query(`DROP INDEX IF EXISTS "IDX_reservations_reservation_status_start"`);
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
158
|
+
0 && (module.exports = {
|
|
159
|
+
AddReservationStatusIndexes1790000000001,
|
|
160
|
+
CreateReservations1790000000000
|
|
161
|
+
});
|