biome format --write
This commit is contained in:
parent
8372348148
commit
9262e803ec
415 changed files with 54076 additions and 17419 deletions
|
|
@ -6,56 +6,58 @@ import { useStatusHistoryStore } from 'src/stores/statusHistory'
|
|||
const StatusHistoryModal = {
|
||||
components: {
|
||||
Modal,
|
||||
Status
|
||||
Status,
|
||||
},
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
statuses: []
|
||||
statuses: [],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
modalActivated () {
|
||||
modalActivated() {
|
||||
return useStatusHistoryStore().modalActivated
|
||||
},
|
||||
params () {
|
||||
params() {
|
||||
return useStatusHistoryStore().params
|
||||
},
|
||||
statusId () {
|
||||
statusId() {
|
||||
return this.params.id
|
||||
},
|
||||
historyCount () {
|
||||
historyCount() {
|
||||
return this.statuses.length
|
||||
},
|
||||
history () {
|
||||
history() {
|
||||
return this.statuses
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
params (newVal, oldVal) {
|
||||
params(newVal, oldVal) {
|
||||
const newStatusId = get(newVal, 'id') !== get(oldVal, 'id')
|
||||
if (newStatusId) {
|
||||
this.resetHistory()
|
||||
}
|
||||
|
||||
if (newStatusId || get(newVal, 'edited_at') !== get(oldVal, 'edited_at')) {
|
||||
if (
|
||||
newStatusId ||
|
||||
get(newVal, 'edited_at') !== get(oldVal, 'edited_at')
|
||||
) {
|
||||
this.fetchStatusHistory()
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
resetHistory () {
|
||||
resetHistory() {
|
||||
this.statuses = []
|
||||
},
|
||||
fetchStatusHistory () {
|
||||
this.$store.dispatch('fetchStatusHistory', this.params)
|
||||
.then(data => {
|
||||
this.statuses = data
|
||||
})
|
||||
fetchStatusHistory() {
|
||||
this.$store.dispatch('fetchStatusHistory', this.params).then((data) => {
|
||||
this.statuses = data
|
||||
})
|
||||
},
|
||||
closeModal () {
|
||||
closeModal() {
|
||||
useStatusHistoryStore().closeStatusHistoryModal()
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
export default StatusHistoryModal
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue