Skip to content

Commit

Permalink
Merge branch 'release-2024-fall' into observation/FOUR-20002
Browse files Browse the repository at this point in the history
  • Loading branch information
gproly committed Nov 8, 2024
2 parents 5351ad1 + 50d72db commit 2658501
Show file tree
Hide file tree
Showing 21 changed files with 372 additions and 96 deletions.
1 change: 0 additions & 1 deletion ProcessMaker/Http/Controllers/Auth/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,6 @@ public function beforeLogout(Request $request)
$eventResult = event(new Logout(Auth::user()));

// Remove the Laravel cookie
$request->session()->invalidate();
Cookie::queue(Cookie::forget(Passport::cookie()));

// process any redirects generated by the logout event listeners
Expand Down
32 changes: 21 additions & 11 deletions ProcessMaker/Templates/ScreenTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -707,23 +707,33 @@ public function applyTemplate(Request $request)
$screen = Screen::where('id', $screenId)->firstOrFail();
$currentScreenPage = $request->get('currentScreenPage');

if (hasPackage('package-versions')) {
// Fetch the latest screen version
$screen = \ProcessMaker\Models\ScreenVersion::where('screen_id', $screenId)->latest()->firstOrFail();
} else {
// Fallback: Use the screen model instead
$screen = Screen::where('id', $screenId)->firstOrFail();
$hasVersionsPackage = hasPackage('package-versions');

if ($hasVersionsPackage) {
$screenVersion = \ProcessMaker\Models\ScreenVersion::where('screen_id', $screenId)->latest()->firstOrFail();
}

$currentScreen = $hasVersionsPackage ? $screenVersion : $screen;

// Get the selected template options
$templateOptions = $request->get('templateOptions', []);
$supportedOptionComponents = ScreenComponents::getComponents();

if (is_array($templateOptions)) {
foreach ($templateOptions as $option) {
$this->applyTemplateOption($option, $supportedOptionComponents, $template,
$newTemplateScreen, $screen, $templateOptions, $currentScreenPage);
$newTemplateScreen, $currentScreen, $templateOptions, $currentScreenPage);
}

// Copy the updated config from screenVersion to screen
// This is needed to save the changes to the current screen when applying a template to the screen version
if ($hasVersionsPackage) {
$screen->config = $currentScreen->config;
$screen->custom_css = $currentScreen->custom_css;
$screen->save();
}
// This will save the changes to the screen versions table if installed else it will save the standard screen
$currentScreen->save();

$screen->save(); // Save the updated screen
}
Expand Down Expand Up @@ -776,22 +786,22 @@ private function generatePostOptions($payload)
}

private function applyTemplateOption($option, $supportedOptionComponents,
$template, $newTemplateScreen, $screen, $templateOptions, $currentScreenPage)
$template, $newTemplateScreen, $currentScreen, $templateOptions, $currentScreenPage)
{
// Check if the option is supported before applying
if (!array_key_exists($option, $supportedOptionComponents)) {
return;
}
switch ($option) {
case 'CSS':
$this->mergeCss($screen, $template);
$this->mergeCss($currentScreen, $template);
break;
case 'Layout':
$this->mergeLayout($screen, $currentScreenPage, $newTemplateScreen,
$this->mergeLayout($currentScreen, $currentScreenPage, $newTemplateScreen,
$templateOptions, $supportedOptionComponents[$option]);
break;
case 'Fields':
$this->mergeFields($screen, $currentScreenPage, $newTemplateScreen,
$this->mergeFields($currentScreen, $currentScreenPage, $newTemplateScreen,
$templateOptions, $supportedOptionComponents[$option]);
break;
default:
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "processmaker/processmaker",
"version": "4.12.0+beta-1",
"version": "4.12.0+beta-2",
"description": "BPM PHP Software",
"keywords": [
"php bpm processmaker"
Expand Down Expand Up @@ -106,7 +106,7 @@
"Gmail"
],
"processmaker": {
"build": "bea70f6c",
"build": "f5718c87",
"cicd-enabled": true,
"custom": {
"package-ellucian-ethos": "dev-release-2024-fall",
Expand Down Expand Up @@ -188,7 +188,7 @@
"microservices": {
"pmai": "fall-2023"
},
"release": "Fall 2024"
"release": "Winter 2025"
}
},
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 28 additions & 28 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@processmaker/processmaker",
"version": "4.12.0+beta-1",
"version": "4.12.0+beta-2",
"description": "ProcessMaker 4",
"author": "DevOps <[email protected]>",
"license": "ISC",
Expand Down Expand Up @@ -58,10 +58,10 @@
"@fortawesome/free-solid-svg-icons": "^5.15.1",
"@fortawesome/vue-fontawesome": "^0.1.9",
"@panter/vue-i18next": "^0.15.2",
"@processmaker/modeler": "1.63.2",
"@processmaker/modeler": "1.63.3",
"@processmaker/processmaker-bpmn-moddle": "0.16.0",
"@processmaker/screen-builder": "3.0.3",
"@processmaker/vue-form-elements": "0.61.1",
"@processmaker/screen-builder": "3.0.4",
"@processmaker/vue-form-elements": "0.61.2",
"@processmaker/vue-multiselect": "2.3.0",
"@tinymce/tinymce-vue": "2.0.0",
"axios": "^0.27.2",
Expand Down
5 changes: 5 additions & 0 deletions resources/js/admin/devlink/components/BundleAssets.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ const computedFields = computed(() => {
return fields.filter(field => field.key !== 'menu');
});
const isLocal = computed(() => {
return bundle.value.dev_link_id === null;
});
const loadAssets = async () => {
loading.value = true;
const response = await window.ProcessMaker.apiClient.get(`/api/1.0/devlink/local-bundles/${bundleId}`);
Expand Down Expand Up @@ -126,6 +130,7 @@ const remove = async (asset) => {
>
<template #cell(name)="data">
<a :href="data.item.url" target="_blank">{{ data.item.name }}</a>
<i v-if="!isLocal" class="ml-2 fa fa-lock"></i>
</template>

<template #cell(menu)="data">
Expand Down
5 changes: 4 additions & 1 deletion resources/js/admin/devlink/components/Instance.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ const load = () => {
ProcessMaker.apiClient
.get(`/devlink/${route.params.id}/remote-bundles?filter=${filter.value}`)
.then((result) => {
bundles.value = result.data.data;
bundles.value = result.data.data.filter(bundle =>{
// Do not show remote bundles
return bundle.dev_link_id === null;
});
loading.value = false;
});
};
Expand Down
11 changes: 7 additions & 4 deletions resources/js/components/shared/PaginationTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
>

<span class="pagination-total">
of {{ totalPageCount }}
{{ totalPageCountLabel }}
</span>

<b-button
Expand Down Expand Up @@ -125,14 +125,17 @@ export default {
totalPageCount() {
return this.meta.total_pages;
},
totalPageCountLabel() {
return `${this.$t("of")} ${this.meta.total_pages}`;
},
totalItems() {
if (this.meta.total === 1) {
return `${this.meta.total} item`;
return this.$t('{{count}} Item', { count: this.meta.total });
}
return `${this.meta.total} items`;
return this.$t('{{count}} Items', { count: this.meta.total });
},
perPageButton() {
return `${this.meta.per_page} per Page`;
return `${this.meta.per_page} ${this.$t("Per page")}`;
},
pageInputPlaceholder() {
return `${this.currentPage}`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -546,9 +546,9 @@ export default {
});
}
if (response.message === 'ProcessMaker\\Exception\\ImportPasswordException: password required') {
if (response.message.startsWith('ProcessMaker\\Exception\\ImportPasswordException: password required')) {
this.showEnterPasswordModal();
} else if (response.message === 'ProcessMaker\\Exception\\ImportPasswordException: incorrect password') {
} else if (response.message.startsWith('ProcessMaker\\Exception\\ImportPasswordException: incorrect password')) {
this.passwordError = "Incorrect password";
} else if (response.type === 'error') {
this.$root.allowDownloadDebug = true;
Expand Down
11 changes: 7 additions & 4 deletions resources/js/tasks/components/TasksList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,9 @@ export default {
return link;
},
previewTasks(info, size = null, fromButton = null) {
if (!info || !this.$refs.preview) {
return;
}
this.tooltipFromButton = fromButton;
this.selectedRow = info.id;
this.$refs.preview.showSideBar(info, this.data.data, true, size);
Expand All @@ -669,19 +672,19 @@ export default {
},
formatStatus(props) {
let color = "success";
let label = "In Progress";
let label = this.$t("In Progress");
if (props.status === "ACTIVE") {
if (props.is_self_service) {
color = "danger";
label = "Self Service";
label = this.$t("Self Service");
} else if (props.advanceStatus === "overdue") {
color = "danger";
label = "Overdue";
label = this.$t("Overdue");
}
} else if (props.status === "CLOSED") {
color = "primary";
label = "Completed";
label = this.$t("Completed");
}
return `
Expand Down
2 changes: 1 addition & 1 deletion resources/jscomposition/base/table/BaseTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
:class="{
'tw-table-fixed':getDefaultConfig(config).tableFixed
}">
<thead class="tw-border-b tw-sticky tw-top-0 tw-z-10 tw-bg-gray-100">
<thead class="tw-border-b tw-sticky tw-top-0 tw-z-[9] tw-bg-gray-100">
<tr>
<THeader
v-for="(column, index) in columns"
Expand Down
Loading

0 comments on commit 2658501

Please sign in to comment.