aboutsummaryrefslogtreecommitdiff
path: root/src/models/EventInfo.ts
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2021-09-05 23:57:27 -0500
committerFurkan Sahin <furkan-dev@proton.me>2021-09-05 23:57:27 -0500
commit9bce000c7b5799837fac15bd6339dfd27401b630 (patch)
tree3ce2be612b0ae9b71db21ab1e6ccb08e0809ef5f /src/models/EventInfo.ts
parentbc95a18a5daf1c0b08bcfac04c543ddf194dd049 (diff)
Add ability to assign labs to PTs
Diffstat (limited to 'src/models/EventInfo.ts')
-rw-r--r--src/models/EventInfo.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/models/EventInfo.ts b/src/models/EventInfo.ts
index 6fce60b..b0ac25b 100644
--- a/src/models/EventInfo.ts
+++ b/src/models/EventInfo.ts
@@ -43,6 +43,11 @@ export default class EventInfo {
return `${hour}:${minute} ${meridiem}`;
}
+ conflictsWith(event: EventInfo) {
+ const daysConflict = event.days.match(new RegExp(`[${this.days}]`));
+ return daysConflict && this.start <= event.end && event.start <= this.end;
+ }
+
get info() {
if(this.days === "") {
return `WEB`;