Skip to content

Commit

Permalink
Merge pull request #7651 from ProcessMaker/bugfix/FOUR-19891
Browse files Browse the repository at this point in the history
FOUR-19891:The tab Request needs to show only when the case has more than 1 request
  • Loading branch information
ryancooley authored Oct 29, 2024
2 parents 3ac072a + 5872ccb commit c6e5cca
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import TabHistory from "./TabHistory.vue";
import CompletedForms from "./CompletedForms.vue";
import TabFiles from "./TabFiles.vue";
import Overview from "./Overview.vue";
import { getRequestCount } from "../variables/index";
const translate = ProcessMaker.i18n;
Expand All @@ -35,7 +36,7 @@ const tabs = [
name: translate.t("History"), href: "#history", current: "history", show: true, content: TabHistory,
},
{
name: translate.t("Requests"), href: "#requests", current: "requests", show: true, content: RequestTable,
name: translate.t("Requests"), href: "#requests", current: "requests", show: getRequestCount() !== 1, content: RequestTable,
},
];
Expand Down
8 changes: 5 additions & 3 deletions resources/jscomposition/cases/casesDetail/variables/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
export default {};

export const api = window.ProcessMaker?.apiClient;

export const useStore = () => Vue.globalStore;

export const getRequestId = () => requestId;

export const getCaseNumber = () => request.case_number;
Expand All @@ -12,6 +16,4 @@ export const getComentableType = () => comentable_type;

export const getProcessName = () => request.process.name;

export const api = window.ProcessMaker?.apiClient;

export const useStore = () => Vue.globalStore;
export const getRequestCount = () => requestCount;
1 change: 1 addition & 0 deletions resources/views/cases/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ class="tw-grow tw-overflow-hidden"
const processId = @json($request->process->id);
const canViewComments = @json($canViewComments);
const comentable_type = @json(get_class($request));
const requestCount = @json($requestCount);
</script>
<script src="{{mix('js/composition/cases/casesDetail/edit.js')}}"></script>
@if (hasPackage('package-files'))
Expand Down

0 comments on commit c6e5cca

Please sign in to comment.