@sprucelabs/spruce-calendar-components 24.2.27 → 24.2.28
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.
|
@@ -222,13 +222,17 @@ class RootSkillViewController extends AbstractSkillViewController {
|
|
|
222
222
|
}
|
|
223
223
|
resetToRootState() {
|
|
224
224
|
return __awaiter(this, void 0, void 0, function* () {
|
|
225
|
+
if (this.transitionPromise) {
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
225
228
|
this.toolBeltVc.close();
|
|
226
|
-
this.transitionPromise = this.
|
|
227
|
-
yield this.transitionPromise;
|
|
228
|
-
yield this.events.reset();
|
|
229
|
+
this.transitionPromise = this.transitionToRoot();
|
|
229
230
|
this.makeDateSelectMatchSelectedDateFromCalendar();
|
|
230
231
|
this.syncPeopleOnCalendar();
|
|
232
|
+
yield this.transitionPromise;
|
|
233
|
+
yield this.events.reset();
|
|
231
234
|
yield this.calendarVc.deselectEvent();
|
|
235
|
+
delete this.transitionPromise;
|
|
232
236
|
});
|
|
233
237
|
}
|
|
234
238
|
ToolBeltVc() {
|
|
@@ -290,6 +294,11 @@ class RootSkillViewController extends AbstractSkillViewController {
|
|
|
290
294
|
handleDropEvent(id, updates) {
|
|
291
295
|
return __awaiter(this, void 0, void 0, function* () {
|
|
292
296
|
if (RootSkillViewController.shouldConfirmDrops) {
|
|
297
|
+
const event = this.events.getEvent(id);
|
|
298
|
+
if (!updates.startDateTimeMs ||
|
|
299
|
+
event.startDateTimeMs === updates.startDateTimeMs) {
|
|
300
|
+
return true;
|
|
301
|
+
}
|
|
293
302
|
const pass = yield this.confirm({
|
|
294
303
|
title: 'Did you mean to drag and drop this?',
|
|
295
304
|
});
|
|
@@ -195,13 +195,17 @@ class RootSkillViewController extends heartwood_view_controllers_1.AbstractSkill
|
|
|
195
195
|
await this.resetToRootState();
|
|
196
196
|
}
|
|
197
197
|
async resetToRootState() {
|
|
198
|
+
if (this.transitionPromise) {
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
198
201
|
this.toolBeltVc.close();
|
|
199
|
-
this.transitionPromise = this.
|
|
200
|
-
await this.transitionPromise;
|
|
201
|
-
await this.events.reset();
|
|
202
|
+
this.transitionPromise = this.transitionToRoot();
|
|
202
203
|
this.makeDateSelectMatchSelectedDateFromCalendar();
|
|
203
204
|
this.syncPeopleOnCalendar();
|
|
205
|
+
await this.transitionPromise;
|
|
206
|
+
await this.events.reset();
|
|
204
207
|
await this.calendarVc.deselectEvent();
|
|
208
|
+
delete this.transitionPromise;
|
|
205
209
|
}
|
|
206
210
|
ToolBeltVc() {
|
|
207
211
|
return this.Controller('toolBelt', {
|
|
@@ -253,6 +257,11 @@ class RootSkillViewController extends heartwood_view_controllers_1.AbstractSkill
|
|
|
253
257
|
}
|
|
254
258
|
async handleDropEvent(id, updates) {
|
|
255
259
|
if (RootSkillViewController.shouldConfirmDrops) {
|
|
260
|
+
const event = this.events.getEvent(id);
|
|
261
|
+
if (!updates.startDateTimeMs ||
|
|
262
|
+
event.startDateTimeMs === updates.startDateTimeMs) {
|
|
263
|
+
return true;
|
|
264
|
+
}
|
|
256
265
|
const pass = await this.confirm({
|
|
257
266
|
title: 'Did you mean to drag and drop this?',
|
|
258
267
|
});
|