Browse Source

update merge hospital

pearlgw 2 months ago
parent
commit
4457e4e373
1 changed files with 0 additions and 20 deletions
  1. 0 20
      src/services/sales/HospitalService.js

+ 0 - 20
src/services/sales/HospitalService.js

@@ -218,35 +218,15 @@ exports.updateHospitalService = async (validateData, id, req) => {
218
         );
218
         );
219
     }
219
     }
220
 
220
 
221
-<<<<<<< HEAD
222
-    let existingHospital = null;
223
-
224
-    if (validateData.name && validateData.city_id) {
225
-        existingHospital = await prisma.hospital.findFirst({
226
-=======
227
     if (validateData.name && validateData.city_id) {
221
     if (validateData.name && validateData.city_id) {
228
         const existingHospital = await prisma.hospital.findFirst({
222
         const existingHospital = await prisma.hospital.findFirst({
229
->>>>>>> update_fitur_sales
230
             where: {
223
             where: {
231
                 name: validateData.name,
224
                 name: validateData.name,
232
                 city_id: validateData.city_id,
225
                 city_id: validateData.city_id,
233
                 deletedAt: null,
226
                 deletedAt: null,
234
-<<<<<<< HEAD
235
-                // NOT: {
236
-                //     id: id,
237
-                // }
238
-            }
239
-        });
240
-
241
-        if (existingHospital) {
242
-            throw new HttpException('Hospital with same name in this city already exists', 400);
243
-        }
244
-    }
245
-=======
246
                 NOT: { id }
227
                 NOT: { id }
247
             }
228
             }
248
         });
229
         });
249
->>>>>>> update_fitur_sales
250
 
230
 
251
         if (existingHospital) {
231
         if (existingHospital) {
252
             throw new HttpException('Hospital with same name in this city already exists', 400);
232
             throw new HttpException('Hospital with same name in this city already exists', 400);