@tactics/toddle-styleguide 5.4.5 → 5.4.7

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": "@tactics/toddle-styleguide",
3
- "version": "5.4.5",
3
+ "version": "5.4.7",
4
4
  "main": "index.tsx",
5
5
  "types": "index.d.ts",
6
6
  "prepublish": "tsc",
@@ -59,7 +59,7 @@ export const TimetableEditorStaff = ({
59
59
  newSeq.tenth.end = tenth.end;
60
60
 
61
61
  onChange(newSeq);
62
- }, [first, second]);
62
+ }, [first, second, third, fourth, fifth, sixth, seventh, eighth, nineth, tenth]);
63
63
 
64
64
  return (
65
65
  <View style={styles.rootContainer}>
@@ -133,6 +133,23 @@ export class TimeSlotEmployeeSequence {
133
133
  }
134
134
  }
135
135
 
136
+ isIn(): boolean {
137
+ return this.first.hasIn() && !this.first.hasOut() ||
138
+ this.second.hasIn() && !this.second.hasOut() ||
139
+ this.third.hasIn() && !this.third.hasOut() ||
140
+ this.fourth.hasIn() && !this.fourth.hasOut() ||
141
+ this.fifth.hasIn() && !this.fifth.hasOut() ||
142
+ this.sixth.hasIn() && !this.sixth.hasOut() ||
143
+ this.seventh.hasIn() && !this.seventh.hasOut() ||
144
+ this.eighth.hasIn() && !this.eighth.hasOut() ||
145
+ this.ninth.hasIn() && !this.ninth.hasOut() ||
146
+ this.tenth.hasIn() && !this.tenth.hasOut();
147
+ }
148
+
149
+ isOut() : boolean {
150
+ return !this.isIn();
151
+ }
152
+
136
153
  isComplete(): boolean {
137
154
  return (
138
155
  this.first.isComplete() &&
@@ -20,6 +20,14 @@ export class TimeSlotRecord {
20
20
  return new TimeSlotRecord(seq.start, seq.end);
21
21
  }
22
22
 
23
+ hasIn() : boolean {
24
+ return this.start !== '';
25
+ }
26
+
27
+ hasOut() : boolean {
28
+ return this.end !== '';
29
+ }
30
+
23
31
  isEmpty(): boolean {
24
32
  return this.start == '' && this.end == '';
25
33
  }