Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible bugfix KNOWAGE-8643 #927

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
e1487f8
Bugfix KNOWAGE-8373
BojanSovticEngIT Jan 22, 2024
1897300
Reverted changes for KNOWAGE-8374
BojanSovticEngIT Jan 22, 2024
dce9031
Merge remote-tracking branch 'upstream/knowage-server-8.1' into dashb…
BojanSovticEngIT Jan 22, 2024
0e987b6
Bugfix KNOWAGE-8374
BojanSovticEngIT Jan 22, 2024
2374ccf
Merge remote-tracking branch 'upstream/knowage-server-8.1' into dashb…
BojanSovticEngIT Apr 19, 2024
fb50f34
Possible bugfix KNOWAGE-8460
BojanSovticEngIT Apr 19, 2024
b6a77de
Merge branch 'knowage-server-8.1' of https://github.com/KnowageLabs/K…
BojanSovticEngIT Jul 19, 2024
6b8cfa1
Possible bugfix KNOWAGE-8571
BojanSovticEngIT Jul 19, 2024
b5b9d74
Possible Bugfix KNOWAGE-8586
BojanSovticEngIT Jul 26, 2024
f3e682c
Merge branch 'knowage-server-8.1' into dashboard-sprint-15-bugfix-8.1
Redjaw Jul 26, 2024
449ffec
Bugfix KNOWAGE-8560
BojanSovticEngIT Jul 26, 2024
8f1ceb6
Possible bugfix KNOWAGE-8571
BojanSovticEngIT Aug 1, 2024
6df16c7
Merge branch 'knowage-server-8.1' into dashboard-sprint-15-bugfix-8.1
Redjaw Aug 1, 2024
d68687c
Bugfix KNOWAGE-8571
BojanSovticEngIT Aug 6, 2024
1c2f340
Merge branch 'dashboard-sprint-15-bugfix-8.1' of https://github.com/v…
BojanSovticEngIT Aug 6, 2024
5e73985
Merge branch 'knowage-server-8.1' into dashboard-sprint-15-bugfix-8.1
Redjaw Aug 6, 2024
07db227
Possible bugfix KNOWAGE-8543
BojanSovticEngIT Aug 6, 2024
8179c0c
Merge branch 'dashboard-sprint-15-bugfix-8.1' of https://github.com/v…
BojanSovticEngIT Aug 6, 2024
a53160b
Possible bugfix KNOWAGE-7893
BojanSovticEngIT Aug 6, 2024
260ccb5
Bugfix KNOWAGE-7679
BojanSovticEngIT Aug 23, 2024
22037ea
Possible bugfix KNOWAGE-8643
BojanSovticEngIT Oct 7, 2024
8ba7d31
Merge remote-tracking branch 'upstream/knowage-server-8.1' into dashb…
BojanSovticEngIT Oct 7, 2024
d6eb991
Possible bugfix KNOWAGE-8643
BojanSovticEngIT Oct 7, 2024
1d02b5c
Possible bugfix KNOWAGE-7852
BojanSovticEngIT Oct 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export interface iParameter {
dataDependsOnParameters?: iParameter[]
lovDependsOnParameters?: iParameter[]
lovDependentParameters?: iParameter[]
driverMaxValue?: Date
}

export interface iDocument {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
:class="{
'p-invalid': parameter.mandatory && parameter.parameterValue && !parameter.parameterValue[0]?.value
}"
:maxDate="parameter.driverMaxValue ?? undefined"
@change="updateDependency(parameter)"
@date-select="updateDependency(parameter)"
:data-test="'parameter-date-input-' + parameter.id"
Expand Down Expand Up @@ -431,7 +432,7 @@ export default defineComponent({
})
} else if (parameter.type === 'DATE' && parameter.showOnPanel === 'true' && parameter.visible) {
if (parameter.driverDefaultValue[0].desc?.split('#')[0]) {
parameter.parameterValue[0].value = luxonFormatDate(parameter.driverDefaultValue[0].desc?.split('#')[0],parameter.driverDefaultValue[0].desc?.split('#')[1])
parameter.parameterValue[0].value = luxonFormatDate(parameter.driverDefaultValue[0].desc?.split('#')[0], parameter.driverDefaultValue[0].desc?.split('#')[1])
}
} else {
if (!parameter.parameterValue[0]) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export async function dataDependencyCheck(loadedParameters: { filterStatus: iPar
loading = true

resetParameterValueToEmptyValues(parameter)
if (resetValue || !parameter.parameterValue?.[0]?.value) return
if (resetValue) return

const postData = { label: document?.label, parameters: getFormattedParameters(loadedParameters, userDateFormat), paramId: parameter.urlName, role: sessionRole }
let url = '2.0/documentExeParameters/admissibleValues'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export async function lovDependencyCheck(loadedParameters: { filterStatus: iPara
loading = true

resetParameterValueToEmptyValues(parameter)
if (resetValue || !parameter.parameterValue?.[0]?.value) return
if (resetValue) return

const postData = { label: document?.label, parameters: getFormattedParameters(loadedParameters, userDateFormat), paramId: parameter.urlName, role: sessionRole }
let url = '2.0/documentExeParameters/admissibleValues'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const crypto = require('crypto')
const deepcopy = require('deepcopy')
// @ts-ignore
// eslint-disable-next-line
window.execExternalCrossNavigation = function (outputParameters, otherOutputParameters, crossNavigationLabel) {
window.execExternalCrossNavigation = function(outputParameters, otherOutputParameters, crossNavigationLabel) {
postMessage(
{
type: 'crossNavigation',
Expand All @@ -124,7 +124,7 @@ window.execExternalCrossNavigation = function (outputParameters, otherOutputPara

// @ts-ignore
// eslint-disable-next-line
window.execPreviewDataset = function (dsLabel, parameters, directDownload) {
window.execPreviewDataset = function(dsLabel, parameters, directDownload) {
postMessage(
{
type: 'preview',
Expand Down Expand Up @@ -367,7 +367,7 @@ export default defineComponent({
},
async directDownloadDataset(dataset: any) {
await this.$http
.post(process.env.VUE_APP_RESTFUL_SERVICES_PATH + `2.0/export/dataset/${dataset.id}/csv`, this.prepareDriversAndParameter(dataset.pars), { headers: { Accept: 'application/json, text/plain, */*', 'Content-Type': 'application/json;charset=UTF-8' } })
.post(process.env.VUE_APP_RESTFUL_SERVICES_PATH + `2.0/export/dataset/${dataset.id}/csv`, this.prepareDriversAndParameter(dataset.pars), { headers: { Accept: 'application/json, text/plain, */*', 'Content-Type': 'application/json;charset=UTF-8' } })
.then(() => {
this.$store.commit('setInfo', {
title: this.$t('common.toast.updateTitle'),
Expand Down Expand Up @@ -781,6 +781,7 @@ export default defineComponent({

if (el.type === 'DATE' && !el.selectionType && el.valueSelection === 'man_in' && el.showOnPanel === 'true' && el.visible) {
el.parameterValue[0].value = getValidDate('' + el.parameterValue[0].value, this.dateFormat)
if (el.driverMaxValue) el.driverMaxValue = getValidDate('' + el.driverMaxValue, this.dateFormat)
}
}
if (el.data) {
Expand Down Expand Up @@ -873,10 +874,10 @@ export default defineComponent({
if (!this.urlData || !this.urlData.engineLabel) return
await this.$http.get(process.env.VUE_APP_RESTFUL_SERVICES_PATH + `2.0/exporters/config/${this.urlData.engineLabel}`).then((response: AxiosResponse<any>) => (this.exporters = response.data.exporters))
},
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: boolean = false) {
let tempIndex = this.breadcrumbs.findIndex((el: any) => el.label === this.document.name) as any
Expand Down Expand Up @@ -918,7 +919,7 @@ export default defineComponent({
if (inputElement) {
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 @@ -928,7 +929,7 @@ export default defineComponent({
element.name = k
element.value = decodeURIComponent(postObject.params[k])
element.value = element.value.replace(/\+/g, ' ')
element.value = this.replaceNullForDates(k,element.value)
element.value = this.replaceNullForDates(k, element.value)

postForm.appendChild(element)
this.hiddenFormData.append(k, decodeURIComponent(postObject.params[k]).replace(/\+/g, ' '))
Expand Down Expand Up @@ -1044,7 +1045,7 @@ export default defineComponent({
parameters[parameter.urlName + '_field_visible_description'] = parameter.parameterValue[0].value
} else if (parameter.selectionType === 'TREE' || parameter.selectionType === 'LOOKUP' || parameter.multivalue) {
parameters[parameter.urlName] = parameter.parameterValue.map((el: any) => {
if(typeof el.value === "object") return el.value[0]
if (typeof el.value === 'object') return el.value[0]
else return el.value
})
let tempString = ''
Expand Down
Loading