@@ -79,13 +79,7 @@ function hideAddPlanRecordModal() {
7979}
8080function deletePlanRecord ( planRecordId , noModal ) {
8181 $ ( "#workAroundInput" ) . show ( ) ;
82- Swal . fire ( {
83- title : "Confirm Deletion?" ,
84- text : "Deleted Plan Records cannot be restored." ,
85- showCancelButton : true ,
86- confirmButtonText : "Delete" ,
87- confirmButtonColor : "#dc3545"
88- } ) . then ( ( result ) => {
82+ confirmDelete ( "Deleted Plan Records cannot be restored." , ( result ) => {
8983 if ( result . isConfirmed ) {
9084 $ . post ( `/Vehicle/DeletePlanRecordById?planRecordId=${ planRecordId } ` , function ( data ) {
9185 if ( data . success ) {
@@ -161,13 +155,7 @@ function usePlannerRecordTemplate(planRecordTemplateId) {
161155
162156function deletePlannerRecordTemplate ( planRecordTemplateId ) {
163157 $ ( "#workAroundInput" ) . show ( ) ;
164- Swal . fire ( {
165- title : "Confirm Deletion?" ,
166- text : "Deleted Plan Templates cannot be restored." ,
167- showCancelButton : true ,
168- confirmButtonText : "Delete" ,
169- confirmButtonColor : "#dc3545"
170- } ) . then ( ( result ) => {
158+ confirmDelete ( "Deleted Plan Templates cannot be restored." , ( result ) => {
171159 if ( result . isConfirmed ) {
172160 $ . post ( `/Vehicle/DeletePlanRecordTemplateById?planRecordTemplateId=${ planRecordTemplateId } ` , function ( data ) {
173161 $ ( "#workAroundInput" ) . hide ( ) ;
0 commit comments