Commit f495e00a authored by Miguel Rincon's avatar Miguel Rincon

Merge branch '229866-follow-up-use-glmodaldirective-on-deploy-freeze-modal' into 'master'

Use GlModalDirective on deploy freeze modal

Closes #229866

See merge request gitlab-org/gitlab!38360
parents e9599788 be72d8da
...@@ -3,7 +3,6 @@ import { GlFormGroup, GlFormInput, GlModal, GlSprintf, GlLink } from '@gitlab/ui ...@@ -3,7 +3,6 @@ import { GlFormGroup, GlFormInput, GlModal, GlSprintf, GlLink } from '@gitlab/ui
import { mapActions, mapState } from 'vuex'; import { mapActions, mapState } from 'vuex';
import { mapComputed } from '~/vuex_shared/bindings'; import { mapComputed } from '~/vuex_shared/bindings';
import { __ } from '~/locale'; import { __ } from '~/locale';
import { MODAL_ID } from '../utils/constants';
import TimezoneDropdown from '~/vue_shared/components/timezone_dropdown.vue'; import TimezoneDropdown from '~/vue_shared/components/timezone_dropdown.vue';
import { isValidCron } from 'cron-validator'; import { isValidCron } from 'cron-validator';
...@@ -18,7 +17,7 @@ export default { ...@@ -18,7 +17,7 @@ export default {
}, },
modalOptions: { modalOptions: {
ref: 'modal', ref: 'modal',
modalId: MODAL_ID, modalId: 'deploy-freeze-modal',
title: __('Add deploy freeze'), title: __('Add deploy freeze'),
actionCancel: { actionCancel: {
text: __('Cancel'), text: __('Cancel'),
......
...@@ -2,10 +2,8 @@ ...@@ -2,10 +2,8 @@
import { GlTable, GlButton, GlModalDirective, GlSprintf } from '@gitlab/ui'; import { GlTable, GlButton, GlModalDirective, GlSprintf } from '@gitlab/ui';
import { s__, __ } from '~/locale'; import { s__, __ } from '~/locale';
import { mapState, mapActions } from 'vuex'; import { mapState, mapActions } from 'vuex';
import { MODAL_ID } from '../utils/constants';
export default { export default {
modalId: MODAL_ID,
fields: [ fields: [
{ {
key: 'freezeStart', key: 'freezeStart',
...@@ -29,7 +27,7 @@ export default { ...@@ -29,7 +27,7 @@ export default {
GlSprintf, GlSprintf,
}, },
directives: { directives: {
GlModalDirective, GlModal: GlModalDirective,
}, },
computed: { computed: {
...mapState(['freezePeriods']), ...mapState(['freezePeriods']),
...@@ -73,7 +71,7 @@ export default { ...@@ -73,7 +71,7 @@ export default {
</gl-table> </gl-table>
<div class="gl-display-flex gl-justify-content-center"> <div class="gl-display-flex gl-justify-content-center">
<gl-button <gl-button
v-gl-modal-directive="$options.modalId" v-gl-modal.deploy-freeze-modal
data-testid="add-deploy-freeze" data-testid="add-deploy-freeze"
category="primary" category="primary"
variant="success" variant="success"
......
export const MODAL_ID = 'deploy-freeze-modal';
export default {
MODAL_ID,
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment