Add confirmation dialog to Subject save
This commit is contained in:
1 parent
3da5840e8b
commit
1ed458a9c1
1 file changed
+7
@@ -70,7 +70,14 @@ export default defineComponent({
|
|||||||
created(): void {},
|
created(): void {},
|
||||||
methods: {
|
methods: {
|
||||||
save(): void {
|
save(): void {
|
||||||
|
const message = this.subject.id ? '이 과목의 수정 내용을 저장하시겠습니까?' : '새 과목을 등록하시겠습니까?';
|
||||||
|
|
||||||
|
if (!window.confirm(message)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.isSaving = true;
|
this.isSaving = true;
|
||||||
|
|
||||||
if (this.subject.id) {
|
if (this.subject.id) {
|
||||||
this.subjectService()
|
this.subjectService()
|
||||||
.update(this.subject)
|
.update(this.subject)
|
||||||
|
|||||||
Reference in new issue
Block a user