Skip to content

Commit

Permalink
feat: update old modal component in ConfigurationsPoint.vue (#449)
Browse files Browse the repository at this point in the history
* feat: replaced modal component

Signed-off-by: Karan Singh Thakur <karanthakur.work@gmail.com>

* feat: updated component

Signed-off-by: Karan Singh Thakur <karanthakur.work@gmail.com>

* resolved lint

Signed-off-by: Karan Singh Thakur <karanthakur.work@gmail.com>

---------

Signed-off-by: Karan Singh Thakur <karanthakur.work@gmail.com>
  • Loading branch information
thisiskaransgit committed Mar 25, 2023
1 parent 27802f2 commit fe13457
Showing 1 changed file with 58 additions and 28 deletions.
86 changes: 58 additions & 28 deletions flint.ui/src/views/flint/ConfigurationsPoint.vue
Expand Up @@ -102,25 +102,50 @@
@click="Run()"
>Run</ButtonComponent
>
</div>
<div data-v-step="6">
<ButtonComponent
classname="primarywh"
BackgroundColor="#ffffff"
Color="#475447"
Padding="0.4rem 1.3rem"
MinWidth="100px"
FontSize="15px"
@click="showPointOutputTable()"
>Point Output Table</ButtonComponent
>
<div v-show="isModal">
<ModalComponent
:toggle="
() => {
isModal = !isModal
}
"
>
<CardComponent>
<h2 style="font-size: larger">Pool values are same as the last run!</h2>
<p style="font-size: medium">Click continue to run if this is intentional</p>
<ButtonComponent
class="modal"
@click="toggle()"
classname="primary hovered round"
BackgroundColor="#ffffff"
Color="#475447"
Padding="0.4rem 1.3rem"
MinWidth="100px"
FontSize="15px"
>Continue</ButtonComponent
>
</CardComponent>
</ModalComponent>
</div>
</div>
</div>
<div data-v-step="6">
<ButtonComponent
classname="primarywh"
BackgroundColor="#ffffff"
Color="#475447"
Padding="0.4rem 1.3rem"
MinWidth="100px"
FontSize="15px"
@click="showPointOutputTable()"
>Point Output Table</ButtonComponent
>
</div>
</div>
<v-tour name="MyTour" :steps="steps" :options="myOptions"></v-tour>
<PointOuterTable v-if="showTable" />
<ToastComponent />
</div>
<v-tour name="MyTour" :steps="steps" :options="myOptions"></v-tour>
<PointOuterTable v-if="showTable" />
<ToastComponent />
</div>
</template>

Expand All @@ -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'
Expand All @@ -153,6 +176,7 @@ export default {
setup() {
const isShow = ref(false)
const showTable = ref(false)
const isModal = ref(false)
const store = useStore()
Expand Down Expand Up @@ -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 {
Expand All @@ -286,6 +302,11 @@ export default {
}
}
function toggle() {
store.dispatch('send_pointConfig')
isModal.value = false
}
function Run() {
finalPoolValues()
showTable.value = false
Expand Down Expand Up @@ -319,15 +340,24 @@ export default {
return {
isShow,
showTable,
isModal,
pool1,
pool2,
pool3,
myOptions,
steps,
finalPoolValues,
Run,
showPointOutputTable
showPointOutputTable,
toggle
}
}
}
</script>

<style>
.modal {
margin-left: 30%;
margin-top: 5%;
}
</style>

1 comment on commit fe13457

@vercel
Copy link

@vercel vercel bot commented on fe13457 Mar 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

flint-ui – ./flint.ui

flint-ui-git-master-moja-global.vercel.app
flint-ui.vercel.app
flint-ui-moja-global.vercel.app

Please sign in to comment.