Skip to content

Commit

Permalink
[KNOWAGE-8640] Resetting schedulations list on refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
Redjaw committed Oct 1, 2024
1 parent c26b3ec commit 9950bd6
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/modules/documentExecution/main/DocumentExecution.vue
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,7 @@ export default defineComponent({
this.loading = true
this.parameterSidebarVisible = false
this.schedulationsTableVisible = true
this.schedulations = []
await this.$http
.get(import.meta.env.VITE_KNOWAGE_CONTEXT + `/restful-services/1.0/documentsnapshot/getSnapshots?id=${this.document.id}`)
.then((response: AxiosResponse<any>) => response.data?.schedulers.forEach((el: any) => this.schedulations.push({ ...el, urlPath: response.data.urlPath })))
Expand Down Expand Up @@ -851,10 +852,10 @@ export default defineComponent({
})
.split(';')
},
replaceNullForDates(par,value){
if(value == 'null' && this.filtersData.filterStatus.find((i)=>i.urlName === par && i.type === 'DATE')){
return ''
}else return value
replaceNullForDates(par, value) {
if (value == 'null' && this.filtersData.filterStatus.find((i) => i.urlName === par && i.type === 'DATE')) {
return ''
} else return value
},
async sendForm(documentLabel: string | null = null, crossNavigationPopupMode = false) {
const tempIndex = this.breadcrumbs.findIndex((el: any) => el.label === this.document.name) as any
Expand Down Expand Up @@ -901,15 +902,15 @@ export default defineComponent({
element.type = 'hidden'
element.id = 'postForm_' + postObject.params.document + k
element.name = k
element.value = this.replaceNullForDates(k,i)
element.value = this.replaceNullForDates(k, i)
element.classList.add(`multiple_${k}`)
postForm.appendChild(element)
this.hiddenFormData.append(element.name, element.value)
})
} else {
inputElement.value = decodeURIComponent(postObject.params[k])
inputElement.value = inputElement.value.replace(/\+/g, ' ')
inputElement.value = this.replaceNullForDates(k,inputElement.value)
inputElement.value = this.replaceNullForDates(k, inputElement.value)
this.hiddenFormData.set(k, decodeURIComponent(postObject.params[k]).replace(/\+/g, ' '))
}
} else {
Expand All @@ -920,7 +921,7 @@ export default defineComponent({
element.type = 'hidden'
element.id = 'postForm_' + postObject.params.document + k
element.name = k
element.value = this.replaceNullForDates(k,i)
element.value = this.replaceNullForDates(k, i)
element.classList.add(`multiple_${k}`)
postForm.appendChild(element)
this.hiddenFormData.append(element.name, element.value)
Expand All @@ -931,7 +932,7 @@ export default defineComponent({
element.id = 'postForm_' + postObject.params.document + k
element.name = k
element.value = decodeURIComponent(postObject.params[k].replace(/\+/g, ' '))
element.value = this.replaceNullForDates(k,element.value)
element.value = this.replaceNullForDates(k, element.value)
postForm.appendChild(element)
this.hiddenFormData.append(element.name, element.value)
}
Expand Down

0 comments on commit 9950bd6

Please sign in to comment.