File tree Expand file tree Collapse file tree 8 files changed +53
-55
lines changed
packages/Webkul/Admin/src
Http/Controllers/Contact/Persons Expand file tree Collapse file tree 8 files changed +53
-55
lines changed Original file line number Diff line number Diff line change @@ -174,14 +174,14 @@ public function massDestroy(MassDestroyRequest $request): JsonResponse
174
174
try {
175
175
$ persons = $ this ->personRepository ->findWhereIn ('id ' , $ request ->input ('indices ' , []));
176
176
177
- $ notDeleted = [] ;
177
+ $ hasBlocked = false ;
178
178
179
179
foreach ($ persons as $ person ) {
180
180
if (
181
181
$ person ->leads
182
182
&& $ person ->leads ->count () > 0
183
183
) {
184
- $ notDeleted [] = $ person -> name ?? " ID: { $ person -> id }" ;
184
+ $ hasBlocked = true ;
185
185
186
186
continue ;
187
187
}
@@ -195,10 +195,8 @@ public function massDestroy(MassDestroyRequest $request): JsonResponse
195
195
196
196
$ message = trans ('admin::app.contacts.persons.index.delete-success ' );
197
197
198
- if (! empty ($ notDeleted )) {
199
- $ message .= ' ' .trans ('admin::app.contacts.persons.index.delete-partial-warning ' , [
200
- 'persons ' => implode (', ' , $ notDeleted ),
201
- ]);
198
+ if ($ hasBlocked ) {
199
+ $ message .= ' ' .trans ('admin::app.contacts.persons.index.some-not-deleted-warning ' );
202
200
}
203
201
204
202
return response ()->json (['message ' => $ message ]);
Original file line number Diff line number Diff line change 539
539
'contacts ' => [
540
540
'persons ' => [
541
541
'index ' => [
542
- 'title ' => 'الأشخاص ' ,
543
- 'create-btn ' => 'إنشاء شخص ' ,
544
- 'create-success ' => 'تم إنشاء الشخص بنجاح. ' ,
545
- 'update-success ' => 'تم تحديث الشخص بنجاح. ' ,
546
- 'delete-success ' => 'تم حذف الشخص بنجاح. ' ,
547
- 'delete-failed ' => 'لا يمكن حذف الشخص. ' ,
548
- 'delete-partial- warning ' => 'ومع ذلك، لا يمكن حذف الأشخاص التاليين لأن لديهم عملاء محتملين: :persons . ' ,
542
+ 'title ' => 'الأشخاص ' ,
543
+ 'create-btn ' => 'إنشاء شخص ' ,
544
+ 'create-success ' => 'تم إنشاء الشخص بنجاح. ' ,
545
+ 'update-success ' => 'تم تحديث الشخص بنجاح. ' ,
546
+ 'delete-success ' => 'تم حذف الشخص بنجاح. ' ,
547
+ 'delete-failed ' => 'لا يمكن حذف الشخص. ' ,
548
+ 'some-not-deleted- warning ' => 'لا يمكن حذف بعض الأشخاص لأنهم مرتبطون بعملاء محتملين. ' ,
549
549
550
550
'datagrid ' => [
551
551
'contact-numbers ' => 'أرقام الاتصال ' ,
Original file line number Diff line number Diff line change 541
541
'contacts ' => [
542
542
'persons ' => [
543
543
'index ' => [
544
- 'title ' => 'Persons ' ,
545
- 'create-btn ' => 'Create Person ' ,
546
- 'create-success ' => 'Person created successfully. ' ,
547
- 'update-success ' => 'Person updated successfully. ' ,
548
- 'delete-success ' => 'Person deleted successfully. ' ,
549
- 'delete-failed ' => 'Person can not be deleted. ' ,
550
- 'delete-partial- warning ' => 'However, the following could not be deleted because they have leads: :persons . ' ,
544
+ 'title ' => 'Persons ' ,
545
+ 'create-btn ' => 'Create Person ' ,
546
+ 'create-success ' => 'Person created successfully. ' ,
547
+ 'update-success ' => 'Person updated successfully. ' ,
548
+ 'delete-success ' => 'Person deleted successfully. ' ,
549
+ 'delete-failed ' => 'Person can not be deleted. ' ,
550
+ 'some-not-deleted- warning ' => 'Some persons could not be deleted because they are linked to leads . ' ,
551
551
552
552
'datagrid ' => [
553
553
'contact-numbers ' => 'Contact Numbers ' ,
Original file line number Diff line number Diff line change 543
543
'contacts ' => [
544
544
'persons ' => [
545
545
'index ' => [
546
- 'title ' => 'Personas ' ,
547
- 'create-btn ' => 'Crear Persona ' ,
548
- 'create-success ' => 'Persona creada con éxito. ' ,
549
- 'update-success ' => 'Persona actualizada con éxito. ' ,
550
- 'delete-success ' => 'Persona eliminada con éxito. ' ,
551
- 'delete-failed ' => 'No se puede eliminar la persona. ' ,
552
- 'delete-partial- warning ' => 'Sin embargo, no se pudieron eliminar los siguientes porque tienen clientes potenciales: :persons . ' ,
546
+ 'title ' => 'Personas ' ,
547
+ 'create-btn ' => 'Crear Persona ' ,
548
+ 'create-success ' => 'Persona creada con éxito. ' ,
549
+ 'update-success ' => 'Persona actualizada con éxito. ' ,
550
+ 'delete-success ' => 'Persona eliminada con éxito. ' ,
551
+ 'delete-failed ' => 'No se puede eliminar la persona. ' ,
552
+ 'some-not-deleted- warning ' => 'No se pudieron eliminar algunas personas porque están vinculadas a oportunidades . ' ,
553
553
554
554
'datagrid ' => [
555
555
'contact-numbers ' => 'Números de Contacto ' ,
Original file line number Diff line number Diff line change 544
544
'contacts ' => [
545
545
'persons ' => [
546
546
'index ' => [
547
- 'title ' => 'اشخاص ' ,
548
- 'create-btn ' => 'ایجاد شخص ' ,
549
- 'create-success ' => 'شخص با موفقیت ایجاد شد. ' ,
550
- 'update-success ' => 'شخص با موفقیت بهروزرسانی شد. ' ,
551
- 'delete-success ' => 'شخص با موفقیت حذف شد. ' ,
552
- 'delete-failed ' => 'حذف شخص ممکن نیست. ' ,
553
- 'delete-partial- warning ' => 'با این حال، موارد زیر به دلیل داشتن سرنخ قابل حذف نیستند: :persons . ' ,
547
+ 'title ' => 'اشخاص ' ,
548
+ 'create-btn ' => 'ایجاد شخص ' ,
549
+ 'create-success ' => 'شخص با موفقیت ایجاد شد. ' ,
550
+ 'update-success ' => 'شخص با موفقیت بهروزرسانی شد. ' ,
551
+ 'delete-success ' => 'شخص با موفقیت حذف شد. ' ,
552
+ 'delete-failed ' => 'حذف شخص ممکن نیست. ' ,
553
+ 'some-not-deleted- warning ' => 'برخی از افراد به دلیل مرتبط بودن با سرنخها قابل حذف نیستند. ' ,
554
554
555
555
'datagrid ' => [
556
556
'contact-numbers ' => 'شمارههای تماس ' ,
Original file line number Diff line number Diff line change 537
537
'contacts ' => [
538
538
'persons ' => [
539
539
'index ' => [
540
- 'title ' => 'Pessoas ' ,
541
- 'create-btn ' => 'Adicionar Pessoa ' ,
542
- 'create-success ' => 'Pessoa adicionada com sucesso. ' ,
543
- 'update-success ' => 'Pessoa atualizada com sucesso. ' ,
544
- 'delete-success ' => 'Pessoa excluída com sucesso. ' ,
545
- 'delete-failed ' => 'Não foi possível excluir a pessoa. ' ,
546
- 'delete-partial- warning ' => 'No entanto, os seguintes não puderam ser excluídos porque possuem leads: :persons . ' ,
540
+ 'title ' => 'Pessoas ' ,
541
+ 'create-btn ' => 'Adicionar Pessoa ' ,
542
+ 'create-success ' => 'Pessoa adicionada com sucesso. ' ,
543
+ 'update-success ' => 'Pessoa atualizada com sucesso. ' ,
544
+ 'delete-success ' => 'Pessoa excluída com sucesso. ' ,
545
+ 'delete-failed ' => 'Não foi possível excluir a pessoa. ' ,
546
+ 'some-not-deleted- warning ' => 'Algumas pessoas não puderam ser excluídas porque estão vinculadas a leads . ' ,
547
547
548
548
'datagrid ' => [
549
549
'contact-numbers ' => 'Números de Contato ' ,
Original file line number Diff line number Diff line change 543
543
'contacts ' => [
544
544
'persons ' => [
545
545
'index ' => [
546
- 'title ' => 'Kişiler ' ,
547
- 'create-btn ' => 'Kişi Oluştur ' ,
548
- 'create-success ' => 'Kişi başarıyla oluşturuldu. ' ,
549
- 'update-success ' => 'Kişi başarıyla güncellendi. ' ,
550
- 'delete-success ' => 'Kişi başarıyla silindi. ' ,
551
- 'delete-failed ' => 'Kişi silinemedi. ' ,
552
- 'delete-partial- warning ' => 'Ancak aşağıdakiler silinemedi çünkü bunların fırsatları (leads) var: :persons . ' ,
546
+ 'title ' => 'Kişiler ' ,
547
+ 'create-btn ' => 'Kişi Oluştur ' ,
548
+ 'create-success ' => 'Kişi başarıyla oluşturuldu. ' ,
549
+ 'update-success ' => 'Kişi başarıyla güncellendi. ' ,
550
+ 'delete-success ' => 'Kişi başarıyla silindi. ' ,
551
+ 'delete-failed ' => 'Kişi silinemedi. ' ,
552
+ 'some-not-deleted- warning ' => 'Bazı kişiler, ilgili fırsatlar olduğu için silinemedi . ' ,
553
553
554
554
'datagrid ' => [
555
555
'contact-numbers ' => 'İletişim Numaraları ' ,
Original file line number Diff line number Diff line change 540
540
'contacts ' => [
541
541
'persons ' => [
542
542
'index ' => [
543
- 'title ' => 'Người ' ,
544
- 'create-btn ' => 'Tạo Người ' ,
545
- 'create-success ' => 'Người đã được tạo thành công. ' ,
546
- 'update-success ' => 'Người đã được cập nhật thành công. ' ,
547
- 'delete-success ' => 'Người đã được xóa thành công. ' ,
548
- 'delete-failed ' => 'Không thể xóa người này. ' ,
549
- 'delete-partial- warning ' => 'Tuy nhiên, các mục sau không thể bị xóa vì có các cơ hội tiềm năng: :persons . ' ,
543
+ 'title ' => 'Người ' ,
544
+ 'create-btn ' => 'Tạo Người ' ,
545
+ 'create-success ' => 'Người đã được tạo thành công. ' ,
546
+ 'update-success ' => 'Người đã được cập nhật thành công. ' ,
547
+ 'delete-success ' => 'Người đã được xóa thành công. ' ,
548
+ 'delete-failed ' => 'Không thể xóa người này. ' ,
549
+ 'some-not-deleted- warning ' => 'Không thể xóa một số người vì họ có liên kết với khách hàng tiềm năng. ' ,
550
550
551
551
'datagrid ' => [
552
552
'contact-numbers ' => 'Số Liên hệ ' ,
You can’t perform that action at this time.
0 commit comments