diff --git a/resources/img/wf-to-pm.svg b/resources/img/wf-to-pm.svg new file mode 100644 index 0000000000..4fc331ce64 --- /dev/null +++ b/resources/img/wf-to-pm.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/resources/js/components/templates/ButtonCard.vue b/resources/js/components/templates/ButtonCard.vue index be9e5c8800..5a72ca1825 100644 --- a/resources/js/components/templates/ButtonCard.vue +++ b/resources/js/components/templates/ButtonCard.vue @@ -5,21 +5,14 @@
{{ button.title }}
+
+
{{ button.description }}
+
{{ $t("Powered by ProcessMaker AI") }}
- -
-
- -
-

{{ button.helperTitle }}

-

{{ button.helperDescription }}

-
-
-
@@ -93,26 +86,11 @@ export default { font-size: 1.5rem; } -.helper-container { - position: relative; -} -.arrow-left { - width: 0; - height: 0; - border-top: 16px solid transparent; - border-bottom: 16px solid transparent; - border-right: 13px solid #BCDCF8; - position: absolute; - top: calc(50% - 16px); - left: 0px; -} -.button-card.card-helper { - border: 0; - background: #BCDCF8; -} -.button-card.card-helper .card-text { - color:#363A3E; +.description { + font-weight: 200; + font-size: 14px; } + .ai-slogan-container { position: absolute; bottom: 0; diff --git a/resources/js/components/templates/SelectTemplateModal.vue b/resources/js/components/templates/SelectTemplateModal.vue index fe27a59d9e..f036055635 100644 --- a/resources/js/components/templates/SelectTemplateModal.vue +++ b/resources/js/components/templates/SelectTemplateModal.vue @@ -25,6 +25,7 @@ @show-details="updateModal($event)" @blank-process-button-clicked="createBlankProcess()" @ai-process-button-clicked="createAiProcess()" + @process-intelligence-clicked="importPI()" :showTemplateOptionsActionBar="true" :package-ai="packageAi" /> @@ -38,6 +39,11 @@ @resetModal="resetModal()" :projectId="projectId" /> + @@ -45,9 +51,10 @@ import Modal from "../shared/Modal.vue"; import TemplateSearch from "./TemplateSearch.vue"; import CreateProcessModal from "../../processes/components/CreateProcessModal.vue"; + import ImportPIModal from "../../processes/import/components/ImportPIModal.vue"; export default { - components: { Modal, TemplateSearch, CreateProcessModal }, + components: { Modal, TemplateSearch, CreateProcessModal, ImportPIModal }, props: ['type', 'countCategories', 'packageAi', 'isProjectsInstalled', 'hideAddBtn', 'projectId', 'isAbTestingInstalled'], data: function() { return { @@ -107,6 +114,14 @@ window.location.href = "/package-ai/processes/create"; } }, + onClosePIModal() { + this.$refs["import-pi-modal"].hide(); + this.$bvModal.show('selectTemplate'); + }, + importPI() { + this.$bvModal.hide("selectTemplate"); + this.$refs["import-pi-modal"].show(); + }, useSelectedTemplate() { this.selectedTemplate = true; this.blankTemplate = false; diff --git a/resources/js/components/templates/TemplateSearch.vue b/resources/js/components/templates/TemplateSearch.vue index 29cde20105..8f9a47fb14 100644 --- a/resources/js/components/templates/TemplateSearch.vue +++ b/resources/js/components/templates/TemplateSearch.vue @@ -28,13 +28,21 @@ @card-button-clicked="$emit('blank-process-button-clicked')" /> -
+
+ +
+ +
{{ $t('Templates') }}
@@ -140,13 +148,16 @@ export default { }, aiProcessButton: { title: this.$t("Generate from AI"), - helperEnabled: true, - helperTitle: this.$t("Try our new Generative AI"), - helperDescription: this.$t("Describe your process. Our AI will build the model for you. Use it immediately or tweak it as needed."), svgIcon: "../../../img/nl-to-process.svg", svgIconStyle: "height: 2em;", showAiSlogan: true, }, + processIntelligenceButton: { + title: this.$t("Import a PI Process"), + description: this.$t("Process Intelligence"), + svgIcon: "../../../img/wf-to-pm.svg", + svgIconStyle: "height: 2em;", + }, showWizardTemplateDetails: false, }; }, diff --git a/resources/js/processes/import/components/ImportPIModal.vue b/resources/js/processes/import/components/ImportPIModal.vue new file mode 100644 index 0000000000..f1d37a0135 --- /dev/null +++ b/resources/js/processes/import/components/ImportPIModal.vue @@ -0,0 +1,106 @@ + + \ No newline at end of file diff --git a/resources/lang/en.json b/resources/lang/en.json index e5955d7a61..afc538fd59 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -827,7 +827,9 @@ "image width": "image width", "Image": "Image", "Images for carousel": "Images for carousel", + "Import a PI Process": "Import a PI Process", "Import a Process and its associated assets into this ProcessMaker environment": "Import a Process and its associated assets into this ProcessMaker environment", + "Import a process from Process Intelligence to this ProcessMaker environment": "Import a process from Process Intelligence to this ProcessMaker environment", "Import a Process Template and its associated assets into this ProcessMaker environment": "Import a Process Template and its associated assets into this ProcessMaker environment", "Import all assets from the uploaded package.": "Import all assets from the uploaded package.", "Import As New": "Import As New",