Skip to content

Commit

Permalink
Merge pull request #1593 from ProcessMaker/feature/FOUR-15533
Browse files Browse the repository at this point in the history
FOUR-15533: Update Start  new Request Section
  • Loading branch information
pmPaulis committed May 24, 2024
2 parents b31dbd7 + 4e5e08c commit 828bb8c
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 8 deletions.
37 changes: 33 additions & 4 deletions src/components/renderer/form-list-table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,10 @@
<template v-if="listOption === 'My Tasks'">
<FormTasks @tasksCount="getData"></FormTasks>
</template>
<template v-if="listOption === 'My Cases'">
<template v-if="verifyListCase()">
<FormRequests @requestsCount="getData"></FormRequests>
</template>
<template v-if="listOption === 'Start New Request'">
<template v-if="verifyNewCase()">
<FormNewRequest @startControl="getData"></FormNewRequest>
</template>
</div>
Expand Down Expand Up @@ -212,14 +212,26 @@ export default {
},
watch: {
listOption() {
this.title = this.listOption;
this.title = this.checkTitle(this.listOption);
this.dataControl = {};
}
},
mounted() {
this.title = this.listOption;
this.title = this.checkTitle(this.listOption);
},
methods: {
/**
* Backward compatibility beacuse value is used as title
*/
checkTitle(option) {
if (option === "Start New Request") {
return "Start New Case";
}
if (option === "My Requests") {
return "My Cases";
}
return option;
},
getData(data) {
this.dataControl = data.dataControls;
},
Expand Down Expand Up @@ -313,6 +325,23 @@ export default {
this.badgeVariant = "";
this.showBadge = false;
}
},
/**
* Verify backward compatibility for Start New Case
*/
verifyNewCase() {
return (
this.listOption === "Start New Case" ||
this.listOption === "Start New Request"
);
},
/**
* Verify backward compatibility for List Cases
*/
verifyListCase() {
return (
this.listOption === "My Cases" || this.listOption === "My Requests"
);
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion src/components/renderer/form-new-request.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</b-container>
</div>
<div v-else>
<formEmpty link="" title="No Request to Start" url="" />
<formEmpty link="" title="No Case to Start" url="" />
</div>
</div>
</template>
Expand Down
2 changes: 1 addition & 1 deletion src/components/renderer/form-requests.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
</filter-table>
</div>
<div v-else>
<formEmpty link="Requests" title="No Requests to Show" :url="noDataUrl" />
<formEmpty link="Requests" title="No Cases to Show" :url="noDataUrl" />
</div>
</template>

Expand Down
4 changes: 2 additions & 2 deletions src/form-builder-controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -951,10 +951,10 @@ export default [
label: "List Table",
options: [
{ value: "My Tasks", content: "My Tasks" },
{ value: "My Requests", content: "My Requests" },
{ value: "My Requests", content: "My Cases" },
{
value: "Start New Request",
content: "Start New Request"
content: "Start New Case"
}
]
}
Expand Down

0 comments on commit 828bb8c

Please sign in to comment.