Skip to content

Task/FOUR-20032-fall: Hide FlowGenie from Ellucian's servers #7706

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

Merged
merged 2 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 9 additions & 0 deletions resources/js/processes/designer/Assets.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
<b-card-group deck>
<b-card
v-for="(asset, index) in assetsPackage"
v-if="isPackageInstalled(asset.package)"
:key="index"
bg-variant="light"
class="text-center"
Expand Down Expand Up @@ -73,6 +74,7 @@
<b-card-group deck>
<b-card
v-for="(asset, index) in assetsPackageExtra"
v-if="isPackageInstalled(asset.package)"
:key="index"
bg-variant="light"
class="text-center"
Expand Down Expand Up @@ -152,6 +154,7 @@ export default {
asset_name_new: "New Decision Table",
urlPath: "/designer/decision-tables",
urlAsset: "/designer/decision-tables?create=true",
package: "package-decision-engine",
},
{
color: "#B5D3E7",
Expand All @@ -161,6 +164,7 @@ export default {
asset_name_new: "New Data Connector",
urlPath: "/designer/data-sources",
urlAsset: "/designer/data-sources?create=true",
package: "package-data-sources",
},
{
color: "#556271",
Expand All @@ -170,6 +174,7 @@ export default {
asset_name_new: `${this.$t("New")} Genie`,
urlPath: "/designer/flow-genies",
urlAsset: "/designer/flow-genies?create=true",
package: "package-ai",
},
],
assetsPackageExtra: [
Expand All @@ -181,6 +186,7 @@ export default {
asset_name_new: "New Collection",
urlPath: "/collections",
urlAsset: "/collections?create=true",
package: "package-collections",
},
],
showButtonsCore: new Array(3).fill(false),
Expand All @@ -189,6 +195,9 @@ export default {
};
},
methods: {
isPackageInstalled(packageName) {
return window.ProcessMaker?.packages?.includes(packageName);
},
toggleButtons(index, section, status) {
if (section === "core") {
this.$set(this.showButtonsCore, index, status);
Expand Down
14 changes: 14 additions & 0 deletions resources/js/processes/designer/RecentAssets.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,26 @@ export default {
this.getOptionsType();
},
methods: {
isPackageInstalled(packageName) {
if (packageName) {
return window.ProcessMaker?.packages?.includes(packageName);
}
return true;
},
getOptionsType() {
if (this.project) {
window.ProcessMaker.apiClient
.get("projects/assets/type")
.then((response) => {
this.optionsType = response.data.data;
// Filter optionsType based on package installation
this.optionsType = Object.keys(this.optionsType).reduce((accumulator, type) => {
if (this.isPackageInstalled(this.optionsType[type].package)) {
accumulator[type] = this.optionsType[type];
}
return accumulator;
}, {});
// Add all asset types to selectedTypes
Object.keys(this.optionsType).forEach((type) => {
this.selectedTypes.push(this.optionsType[type].asset_type);
});
Expand Down
Loading