From fe13457853c3765b26685ed432ccdd3925a504ad Mon Sep 17 00:00:00 2001 From: Karan Singh Thakur Date: Sat, 25 Mar 2023 12:33:14 +0530 Subject: [PATCH] feat: update old modal component in `ConfigurationsPoint.vue` (#449) * feat: replaced modal component Signed-off-by: Karan Singh Thakur * feat: updated component Signed-off-by: Karan Singh Thakur * resolved lint Signed-off-by: Karan Singh Thakur --------- Signed-off-by: Karan Singh Thakur --- .../src/views/flint/ConfigurationsPoint.vue | 86 +++++++++++++------ 1 file changed, 58 insertions(+), 28 deletions(-) diff --git a/flint.ui/src/views/flint/ConfigurationsPoint.vue b/flint.ui/src/views/flint/ConfigurationsPoint.vue index 72077a4a..cb2b5282 100644 --- a/flint.ui/src/views/flint/ConfigurationsPoint.vue +++ b/flint.ui/src/views/flint/ConfigurationsPoint.vue @@ -102,25 +102,50 @@ @click="Run()" >Run - -
- Point Output Table +
+ + +

Pool values are same as the last run!

+

Click continue to run if this is intentional

+ Continue +
+
+
+
+ Point Output Table +
- - - + + + @@ -131,10 +156,8 @@ import Maptest from '@/components/Vuelayers/Maptest.vue' import Slider from '@/components/Slider/Slider.vue' import PointOuterTable from './PointOuterTable.vue' import { ModalComponent, CardComponent } from '@moja-global/mojaglobal-ui' -import { ref, onMounted, getCurrentInstance, createVNode } from 'vue' +import { ref, onMounted, getCurrentInstance } from 'vue' import { useStore } from 'vuex' -import { Modal } from 'ant-design-vue' -import { ExclamationCircleOutlined } from '@ant-design/icons-vue' import { useToast } from '@moja-global/mojaglobal-ui' import { ToastComponent } from '@moja-global/mojaglobal-ui' @@ -153,6 +176,7 @@ export default { setup() { const isShow = ref(false) const showTable = ref(false) + const isModal = ref(false) const store = useStore() @@ -266,15 +290,7 @@ export default { } if (poolValuesNotChanged(slider_values)) { - Modal.confirm({ - title: 'Pool values are same as the last run!', - content: 'Click OK to run if this is intentional', - icon: createVNode(ExclamationCircleOutlined), - onOk() { - store.dispatch('send_pointConfig') - }, - onCancel() {} - }) + isModal.value = true return } else { @@ -286,6 +302,11 @@ export default { } } + function toggle() { + store.dispatch('send_pointConfig') + isModal.value = false + } + function Run() { finalPoolValues() showTable.value = false @@ -319,6 +340,7 @@ export default { return { isShow, showTable, + isModal, pool1, pool2, pool3, @@ -326,8 +348,16 @@ export default { steps, finalPoolValues, Run, - showPointOutputTable + showPointOutputTable, + toggle } } } + +