From f52d19f2a99db4916e7b9c38319db28795c425f2 Mon Sep 17 00:00:00 2001
From: Woraprat <73052317+aeworaprat@users.noreply.github.com>
Date: Wed, 15 Mar 2023 00:10:55 +0700
Subject: [PATCH] update before loading

---
 .../application/views/project/v_project_create.php    | 11 +++++++++++
 .../views/project/v_project_create_user.php           | 11 +++++++++++
 .../exhi/application/views/project/v_project_edit.php | 11 +++++++++++
 .../application/views/project/v_project_edit_user.php | 11 +++++++++++
 4 files changed, 44 insertions(+)

diff --git a/html/exhi/application/views/project/v_project_create.php b/html/exhi/application/views/project/v_project_create.php
index b7327a3..39ef1d1 100644
--- a/html/exhi/application/views/project/v_project_create.php
+++ b/html/exhi/application/views/project/v_project_create.php
@@ -799,6 +799,17 @@ function insert_projecct(){
 						'select_text': select_text,
 					},
 					dataType: 'json',
+					beforeSend: function() {
+                        Swal.fire({
+                            title: 'โปรดรอ',
+                            html: 'กำลังดำเนินการ',// add html attribute if you want or remove
+                            allowOutsideClick: false,
+                            showConfirmButton: false,
+                            onBeforeOpen: () => {
+                                Swal.showLoading()
+                            },
+                        })
+                    },
 					success: function(data) {
 						if (data['message'] == true) {
 							Toast.fire({
diff --git a/html/exhi/application/views/project/v_project_create_user.php b/html/exhi/application/views/project/v_project_create_user.php
index fff3bc5..8f08512 100644
--- a/html/exhi/application/views/project/v_project_create_user.php
+++ b/html/exhi/application/views/project/v_project_create_user.php
@@ -801,6 +801,17 @@ function insert_projecct(){
 						'select_text': select_text,
 					},
 					dataType: 'json',
+					beforeSend: function() {
+                        Swal.fire({
+                            title: 'โปรดรอ',
+                            html: 'กำลังดำเนินการ',// add html attribute if you want or remove
+                            allowOutsideClick: false,
+                            showConfirmButton: false,
+                            onBeforeOpen: () => {
+                                Swal.showLoading()
+                            },
+                        })
+                    },
 					success: function(data) {
 						if (data['message'] == true) {
 							Toast.fire({
diff --git a/html/exhi/application/views/project/v_project_edit.php b/html/exhi/application/views/project/v_project_edit.php
index 56c3a1f..5549968 100644
--- a/html/exhi/application/views/project/v_project_edit.php
+++ b/html/exhi/application/views/project/v_project_edit.php
@@ -970,6 +970,17 @@ function update_projecct(){
 						'select_text': select_text,
 					},
 					dataType: 'json',
+					beforeSend: function() {
+                        Swal.fire({
+                            title: 'โปรดรอ',
+                            html: 'กำลังดำเนินการ',// add html attribute if you want or remove
+                            allowOutsideClick: false,
+                            showConfirmButton: false,
+                            onBeforeOpen: () => {
+                                Swal.showLoading()
+                            },
+                        })
+                    },
 					success: function(data) {
 						if (data['message'] == true) {
 							Toast.fire({
diff --git a/html/exhi/application/views/project/v_project_edit_user.php b/html/exhi/application/views/project/v_project_edit_user.php
index f328d50..2e917ac 100644
--- a/html/exhi/application/views/project/v_project_edit_user.php
+++ b/html/exhi/application/views/project/v_project_edit_user.php
@@ -970,6 +970,17 @@ function update_projecct(){
 						'select_text': select_text,
 					},
 					dataType: 'json',
+					beforeSend: function() {
+                        Swal.fire({
+                            title: 'โปรดรอ',
+                            html: 'กำลังดำเนินการ',// add html attribute if you want or remove
+                            allowOutsideClick: false,
+                            showConfirmButton: false,
+                            onBeforeOpen: () => {
+                                Swal.showLoading()
+                            },
+                        })
+                    },
 					success: function(data) {
 						if (data['message'] == true) {
 							Toast.fire({
-- 
GitLab