Skip to content

Commit 7d64964

Browse files
committed
feat(appointments): add duplicate indicator to modal title
Signed-off-by: Abhinav Ohri <[email protected]>
1 parent cc5fb1a commit 7d64964

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

src/components/AppNavigation/AppointmentConfigList/AppointmentConfigListItem.vue

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@
5757
</AppNavigationItem>
5858
<AppointmentConfigModal
5959
v-if="showModal"
60-
:is-new="isCreatingNew"
60+
:is-new="isDuplicate"
61+
:is-duplicate="isDuplicate"
6162
:config="config"
6263
@close="closeModal" />
6364
</div>
@@ -106,7 +107,7 @@ export default {
106107
return {
107108
showModal: false,
108109
loading: false,
109-
isCreatingNew: false,
110+
isDuplicate: false,
110111
}
111112
},
112113
@@ -119,15 +120,16 @@ export default {
119120
methods: {
120121
closeModal() {
121122
this.showModal = false
123+
this.isDuplicate = false
122124
},
123125
124126
openEditModal() {
125-
this.isCreatingNew = false
127+
this.isDuplicate = false
126128
this.showModal = true
127129
},
128130
129131
duplicate() {
130-
this.isCreatingNew = true
132+
this.isDuplicate = true
131133
this.showModal = true
132134
},
133135

src/components/AppointmentConfigModal.vue

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,11 @@ export default {
199199
type: Boolean,
200200
required: true,
201201
},
202+
203+
isDuplicate: {
204+
type: Boolean,
205+
default: false,
206+
},
202207
},
203208
204209
data() {
@@ -225,7 +230,10 @@ export default {
225230
return this.$t('calendar', 'Appointment schedule saved')
226231
}
227232
if (this.isNew) {
228-
return this.$t('calendar', 'Create appointment schedule')
233+
const title = this.isDuplicate
234+
? 'Create appointment schedule (duplicate)'
235+
: 'Create appointment schedule'
236+
return this.$t('calendar', title)
229237
}
230238
231239
return this.$t('calendar', 'Edit appointment schedule')

0 commit comments

Comments
 (0)