feat: check if user have courses on the weekend(#1)
- 檢查是否有週末的課,若有則設定flag - 未更動前端表格
This commit is contained in:
parent
db8bedb52a
commit
8d571063e9
@ -18,6 +18,7 @@ var courseTable = {
|
||||
data: function(){
|
||||
return {
|
||||
'courses': {},
|
||||
'existWeekend': false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -37,8 +38,17 @@ var courseTable = {
|
||||
watch: {
|
||||
'select_c': function(){
|
||||
this.courses = {}
|
||||
var weekendLock = false
|
||||
|
||||
for(var c of this.select_c){
|
||||
this.courses[c.time] = c.name
|
||||
|
||||
if(c.time[0]==6 || c.time[0]==7){
|
||||
weekendLock = true
|
||||
}
|
||||
}
|
||||
if(weekendLock){
|
||||
this.existWeekend = true
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user