|
|
@ -46602,7 +46602,7 @@ module.exports = { |
|
|
|
this.tweet = {}; |
|
|
|
this.show = false; |
|
|
|
}, |
|
|
|
rejectTweet: function rejectTweet() { |
|
|
|
completedTweet: function completedTweet() { |
|
|
|
this.tweet = {}; |
|
|
|
this.show = false; |
|
|
|
} |
|
|
@ -46662,7 +46662,7 @@ module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c |
|
|
|
_vm.show = $event |
|
|
|
}, |
|
|
|
"dismiss": _vm.dismissTweet, |
|
|
|
"reject": _vm.rejectTweet |
|
|
|
"complete": _vm.completedTweet |
|
|
|
} |
|
|
|
})], 1)])]) |
|
|
|
},staticRenderFns: []} |
|
|
@ -46815,6 +46815,9 @@ module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c |
|
|
|
attrs: { |
|
|
|
"type": "button", |
|
|
|
"disabled": _vm.isAcceptDisabled |
|
|
|
}, |
|
|
|
on: { |
|
|
|
"click": _vm.scoreTweet |
|
|
|
} |
|
|
|
}, [_vm._v("Accept")]), _vm._v(" "), _c('button', { |
|
|
|
staticClass: "btn btn-danger", |
|
|
@ -47240,9 +47243,9 @@ module.exports = { |
|
|
|
centers: [], |
|
|
|
lines: [], |
|
|
|
replyText: '', |
|
|
|
selectedDocument: false, |
|
|
|
selectedTransitCenter: false, |
|
|
|
selectedTransitLine: false, |
|
|
|
selectedDocument: null, |
|
|
|
selectedTransitCenter: null, |
|
|
|
selectedTransitLine: null, |
|
|
|
selectedNonTrimetLine: '', |
|
|
|
selectedPhotoHasAnotherTeam: false, |
|
|
|
selectedM5Singing: false, |
|
|
@ -47255,9 +47258,9 @@ module.exports = { |
|
|
|
if (this.show) { |
|
|
|
switch (this.tweet.mission_id) { |
|
|
|
case 1: |
|
|
|
return this.selectedTransitLine == false && this.selectedNonTrimetLine == ''; |
|
|
|
return this.selectedTransitLine == null && this.selectedNonTrimetLine == ''; |
|
|
|
case 2: |
|
|
|
return this.selectedTransitCenter == false; |
|
|
|
return this.selectedTransitCenter == null; |
|
|
|
case 3: |
|
|
|
case 4: |
|
|
|
case 6: |
|
|
@ -47266,7 +47269,7 @@ module.exports = { |
|
|
|
case 5: |
|
|
|
return this.selectedM5Singing == false && this.selectedM5Tipping == false; |
|
|
|
case 7: |
|
|
|
return this.selectedDocument == false; |
|
|
|
return this.selectedDocument == null; |
|
|
|
default: |
|
|
|
return true; |
|
|
|
} |
|
|
@ -47280,11 +47283,13 @@ module.exports = { |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
clearState: function clearState() { |
|
|
|
this.selectedDocument = false; |
|
|
|
this.selectedTransitCenter = false; |
|
|
|
this.selectedTransitLine = false; |
|
|
|
this.selectedDocument = null; |
|
|
|
this.selectedTransitCenter = null; |
|
|
|
this.selectedTransitLine = null; |
|
|
|
this.selectedNonTrimetLine = ''; |
|
|
|
this.selectedPhotoHasAnotherTeam = false; |
|
|
|
this.selectedM5Singing = false; |
|
|
|
this.selectedM5Tipping = false; |
|
|
|
this.replyText = ''; |
|
|
|
}, |
|
|
|
dismiss: function dismiss() { |
|
|
@ -47296,7 +47301,45 @@ module.exports = { |
|
|
|
tweet_id: this.tweet.tweet_id |
|
|
|
}, function () { |
|
|
|
this.clearState(); |
|
|
|
this.$emit('reject'); |
|
|
|
this.$emit('complete'); |
|
|
|
}.bind(this)); |
|
|
|
}, |
|
|
|
scoreTweet: function scoreTweet() { |
|
|
|
var score_data = {}; |
|
|
|
|
|
|
|
switch (this.tweet.mission_id) { |
|
|
|
case 1: |
|
|
|
score_data['m1_transit_line_id'] = this.selectedTransitLine; |
|
|
|
score_data['m1_non_trimet'] = this.selectedNonTrimetLine; |
|
|
|
break; |
|
|
|
case 2: |
|
|
|
score_data['m2_transit_center_id'] = this.selectedTransitCenter; |
|
|
|
score_data['m2_with_other_team'] = this.selectedPhotoHasAnotherTeam ? 1 : 0; |
|
|
|
break; |
|
|
|
case 3: |
|
|
|
score_data['m3_complete'] = true ? 1 : 0; |
|
|
|
break; |
|
|
|
case 4: |
|
|
|
score_data['m4_complete'] = true ? 1 : 0; |
|
|
|
break; |
|
|
|
case 5: |
|
|
|
score_data['m5_complete'] = this.selectedM5Singing ? 1 : 0; |
|
|
|
score_data['m5_tip'] = this.selectedM5Tipping ? 1 : 0; |
|
|
|
break; |
|
|
|
case 6: |
|
|
|
score_data['m6_complete'] = true ? 1 : 0; |
|
|
|
break; |
|
|
|
case 7: |
|
|
|
score_data['m7_document_id'] = this.selectedDocument; |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
$.post("/dashboard/score-tweet", { |
|
|
|
tweet_id: this.tweet.tweet_id, |
|
|
|
score_data: score_data |
|
|
|
}, function () { |
|
|
|
this.clearState(); |
|
|
|
this.$emit('complete'); |
|
|
|
}.bind(this)); |
|
|
|
} |
|
|
|
}, |
|
|
|