HUGE REFACTOR / CLEANUP
if there is a issue it's probably something in here that was changed
This commit is contained in:
@@ -17,7 +17,6 @@
|
||||
></v-select>
|
||||
</template>
|
||||
<script>
|
||||
/* Xeslint-disable */
|
||||
//bitwise selection of days of week
|
||||
//https://stackoverflow.com/a/24174625/8939
|
||||
|
||||
@@ -43,10 +42,10 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
selectedValue() {
|
||||
let ret = [];
|
||||
const ret = [];
|
||||
if (this.value != null && this.value != 0) {
|
||||
for (let i = 0; i < this.daysOfWeek.length; i++) {
|
||||
let day = this.daysOfWeek[i];
|
||||
const day = this.daysOfWeek[i];
|
||||
if (!!(this.value & day.id)) {
|
||||
ret.push(day.id);
|
||||
}
|
||||
@@ -60,7 +59,7 @@ export default {
|
||||
let newValue = 0;
|
||||
if (value != null && value != [] && value.length > 0) {
|
||||
for (let i = 0; i < value.length; i++) {
|
||||
let day = value[i];
|
||||
const day = value[i];
|
||||
newValue = newValue | day;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user