Skip to content

Commit

Permalink
Merge branch 'issue#1691' of github.com:suraj-webkul/laravel-crm into…
Browse files Browse the repository at this point in the history
… issue#1691
  • Loading branch information
suraj-webkul committed Nov 7, 2024
2 parents 7718209 + 662df31 commit 3bdf9e8
Show file tree
Hide file tree
Showing 20 changed files with 86 additions and 76 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -362,11 +362,9 @@ public function massUpdate(MassUpdateRequest $massUpdateRequest): JsonResponse
foreach ($leads as $lead) {
Event::dispatch('lead.update.before', $lead->id);

$this->leadRepository->update(
['lead_pipeline_stage_id' => $massUpdateRequest->input('value')],
$lead->id,
['lead_pipeline_stage_id']
);
$lead = $this->leadRepository->find($lead->id);

$lead?->update(['lead_pipeline_stage_id' => $massUpdateRequest->input('value')]);

Event::dispatch('lead.update.before', $lead->id);
}
Expand All @@ -376,7 +374,7 @@ public function massUpdate(MassUpdateRequest $massUpdateRequest): JsonResponse
]);
} catch (\Exception $th) {
return response()->json([
'message' => trans('admin::app.leads.destroy-failed'),
'message' => trans('admin::app.leads.update-failed'),
], 400);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,17 +232,17 @@ public function download($id)
*/
public function massUpdate(MassUpdateRequest $massUpdateRequest): JsonResponse
{
$leads = $this->leadRepository->findWhereIn('id', $massUpdateRequest->input('indices'));
$emails = $this->emailRepository->findWhereIn('id', $massUpdateRequest->input('indices'));

try {
foreach ($leads as $lead) {
Event::dispatch('email.update.before', $lead->id);
foreach ($emails as $email) {
Event::dispatch('email.update.before', $email->id);

$this->emailRepository->update([
'folders' => request('folders'),
], $lead->id);
], $email->id);

Event::dispatch('email.update.after', $lead->id);
Event::dispatch('email.update.after', $email->id);
}

return response()->json([
Expand Down
8 changes: 8 additions & 0 deletions packages/Webkul/Admin/src/Resources/assets/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -622,3 +622,11 @@
.tox .tox-toolbar__group:last-child button[aria-disabled="true"] {
@apply cursor-not-allowed opacity-50;
}

.tox .tox-toolbar__group:last-child button {
@apply !bg-transparent;
}

.tox .tox-toolbar__group:last-child button:hover {
@apply border-0 !bg-[#3389ec] text-white shadow-none;
}
9 changes: 5 additions & 4 deletions packages/Webkul/Admin/src/Resources/lang/ar/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -849,13 +849,13 @@
],

'create' => [
'name' => 'الاسم',
'save-btn' => 'حفظ النوع',
'title' => 'إنشاء نوع',
'name' => 'اسم',
'save-btn' => 'حفظ المصدر',
'title' => 'إنشاء مصدر',
],

'edit' => [
'title' => 'تعديل النوع',
'title' => 'تعديل المصدر',
],
],
],
Expand Down Expand Up @@ -1654,6 +1654,7 @@
'leads' => [
'create-success' => 'تم إنشاء العميل المحتمل بنجاح.',
'update-success' => 'تم تحديث العميل المحتمل بنجاح.',
'update-failed' => 'Leads can not be deleted.',
'destroy-success' => 'تم حذف العميل المحتمل بنجاح.',
'destroy-failed' => 'لا يمكن حذف العميل المحتمل.',

Expand Down
9 changes: 5 additions & 4 deletions packages/Webkul/Admin/src/Resources/lang/en/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -850,12 +850,12 @@

'create' => [
'name' => 'Name',
'save-btn' => 'Save Type',
'title' => 'Create Type',
'save-btn' => 'Save Source',
'title' => 'Create Source',
],

'edit' => [
'title' => 'Edit Type',
'title' => 'Edit Source',
],
],
],
Expand Down Expand Up @@ -1653,7 +1653,8 @@

'leads' => [
'create-success' => 'Lead created successfully.',
'update-success' => 'Lead updated successfully.',
'update-success' => 'Leads updated successfully.',
'update-failed' => 'Leads can not be deleted.',
'destroy-success' => 'Lead deleted successfully.',
'destroy-failed' => 'Lead can not be deleted.',

Expand Down
7 changes: 4 additions & 3 deletions packages/Webkul/Admin/src/Resources/lang/es/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -850,12 +850,12 @@

'create' => [
'name' => 'Nombre',
'save-btn' => 'Guardar Fuente',
'title' => 'Crear Fuente',
'save-btn' => 'Guardar fuente',
'title' => 'Crear fuente',
],

'edit' => [
'title' => 'Editar Fuente',
'title' => 'Editar fuente',
],
],
],
Expand Down Expand Up @@ -1654,6 +1654,7 @@
'leads' => [
'create-success' => 'Lead creado exitosamente.',
'update-success' => 'Lead actualizado exitosamente.',
'update-failed' => 'No se pueden eliminar los clientes potenciales.',
'destroy-success' => 'Lead eliminado exitosamente.',
'destroy-failed' => 'No se puede eliminar el lead.',

Expand Down
1 change: 1 addition & 0 deletions packages/Webkul/Admin/src/Resources/lang/fa/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -1654,6 +1654,7 @@
'leads' => [
'create-success' => 'سرنخ با موفقیت ایجاد شد.',
'update-success' => 'سرنخ با موفقیت به‌روزرسانی شد.',
'update-failed' => 'سرنخ‌ها قابل حذف نیستند.',
'destroy-success' => 'سرنخ با موفقیت حذف شد.',
'destroy-failed' => 'سرنخ قابل حذف نیست.',

Expand Down
7 changes: 4 additions & 3 deletions packages/Webkul/Admin/src/Resources/lang/tr/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -850,12 +850,12 @@

'create' => [
'name' => 'Ad',
'save-btn' => 'Türü Kaydet',
'title' => 'Tür Oluştur',
'save-btn' => 'Kaynağı Kaydet',
'title' => 'Kaynak Oluştur',
],

'edit' => [
'title' => 'Tür Düzenle',
'title' => 'Kaynağı Düzenle',
],
],
],
Expand Down Expand Up @@ -1654,6 +1654,7 @@
'leads' => [
'create-success' => 'Lead başarıyla oluşturuldu.',
'update-success' => 'Lead başarıyla güncellendi.',
'update-failed' => 'Potansiyel müşteriler silinemez.',
'destroy-success' => 'Lead başarıyla silindi.',
'destroy-failed' => 'Lead silinemedi.',

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ class="cursor-pointer rounded-md p-1.5 text-2xl transition-all hover:bg-gray-200
data() {
return {
viewType: (new URLSearchParams(window.location.search))?.get('view-type') || 'table',
viewType: '{{ request('view-type') }}' || 'table',
};
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ class="dark:!bg-gray-900"
:placeholder="placeholder"
:label="label"
@keydown.enter.prevent="addTag"
autocomplete="new-email"
@blur="addTag"
/>
</v-field>
Expand Down Expand Up @@ -106,7 +108,13 @@ class="mt-1 text-xs italic text-red-600"
return;
}
this.tags.push(this.input.trim());
const tag = this.input.trim();
if (! tag) {
return;
}
this.tags.push(tag);
this.$emit('tags-updated', this.tags);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div
ref="sidebar"
class="duration-80 fixed top-[60px] z-[10002] h-full w-[200px] border-r border-gray-200 bg-white pt-4 transition-all group-[.sidebar-collapsed]/container:w-[70px] dark:border-gray-800 dark:bg-gray-900 max-lg:hidden"
class="duration-80 fixed top-[60px] z-[10002] h-full w-[200px] border-gray-200 bg-white pt-4 transition-all group-[.sidebar-collapsed]/container:w-[70px] dark:border-gray-800 dark:bg-gray-900 max-lg:hidden ltr:border-r rtl:border-l"
@mouseover="handleMouseOver"
@mouseleave="handleMouseLeave"
>
Expand Down Expand Up @@ -36,7 +36,7 @@ class="flex gap-2 p-1.5 items-center cursor-pointer hover:rounded-lg {{ $menuIte
class="absolute top-0 hidden flex-col bg-gray-100 ltr:left-[200px] rtl:right-[199px]"
:class="[isMenuActive && (hoveringMenu == '{{$menuItem->getKey()}}') ? '!flex' : 'hidden']"
>
<div class="sidebar-rounded fixed z-[1000] h-full min-w-[140px] max-w-max border-r bg-white pt-4 after:-right-[30px] dark:border-gray-800 dark:bg-gray-900 max-lg:hidden">
<div class="sidebar-rounded fixed z-[1000] h-full min-w-[140px] max-w-max bg-white pt-4 after:-right-[30px] dark:border-gray-800 dark:bg-gray-900 max-lg:hidden ltr:border-r rtl:border-x">
<div class="journal-scroll h-[calc(100vh-100px)] overflow-hidden">
<nav class="grid w-full gap-2">
@foreach ($menuItem->getChildren() as $subMenuItem)
Expand All @@ -60,4 +60,4 @@ class="flex gap-2.5 p-2 items-center cursor-pointer hover:rounded-lg {{ $subMenu
@endforeach
</nav>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
height="{{ $height }}"
:errors="errors"
>
<x-admin::shimmer.image class="h-[110px] w-[110px] rounded" />
<x-admin::shimmer.image class="h-[120px] w-[120px] rounded" />
</v-media-images>

@pushOnce('scripts')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,4 @@ class="primary-button"
</x-admin::form>

{!! view_render_event('admin.configuration.edit.form_controls.after') !!}
</x-admin::layouts>
</x-admin::layouts>
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
@lang('admin::app.configuration.index.title')
</x-slot>

<!-- Breadcrumbs -->
<x-admin::breadcrumbs name="configuration" />

{!! view_render_event('admin.configuration.index.header.before') !!}

<!-- Heading of the page -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,9 @@
class="flex max-w-[360px] items-center gap-2 rounded-lg p-2 transition-all hover:bg-gray-100 dark:hover:bg-gray-950"
href="{{ $child->getUrl() }}"
>
@if ($icon = $child->getIcon())
<div class="rounded-lg bg-gray-100 p-3 dark:bg-gray-800">
<i class="{{ $child->getIcon() }} text-3xl "></i>
</div>
@endif
<div class="rounded-lg bg-gray-100 p-3 dark:bg-gray-800">
<i class="{{ $child->getIcon() }} text-3xl"></i>
</div>

<div class="grid">
<p class="mb-1.5 text-base font-semibold text-gray-800 dark:text-white">
Expand All @@ -57,4 +55,4 @@ class="flex max-w-[360px] items-center gap-2 rounded-lg p-2 transition-all hover
</div>
@endforeach
</div>
</x-admin::layouts>
</x-admin::layouts>
Original file line number Diff line number Diff line change
Expand Up @@ -92,37 +92,27 @@ class="icon-checkbox-outline peer-checked:icon-checkbox-select cursor-pointer ro
<!-- Users Id -->
<p>@{{ record.id }}</p>
<!-- Users Name -->
<p>
<div class="flex items-center gap-2.5">
<div
class="border-3 mr-2 inline-block h-9 w-9 overflow-hidden rounded-full border-gray-800 text-center align-middle"
v-if="record.name.image"
>
<img
class="h-9 w-9"
:src="record.name.image"
alt="record.name"
/>
</div>
<div
class="profile-info-icon"
v-else
>
<button class="flex h-9 w-9 cursor-pointer items-center justify-center rounded-full bg-blue-400 text-sm font-semibold leading-6 text-white transition-all hover:bg-blue-500 focus:bg-blue-500">
@{{ record.name.name[0].toUpperCase() }}
</button>
</div>
<div class="text-sm">
@{{ record.name.name }}
</div>
<!-- Users Name and Profile -->
<div class="flex items-center gap-2.5">
<template v-if="record.name.image">
<img
class="flex h-9 w-9 items-center justify-center rounded-full"
:src="record.name.image"
alt="record.name"
/>
</template>
<template v-else>
<x-admin::avatar ::name="record.name.name"/>
</template>
<div class="text-sm">
@{{ record.name.name }}
</div>
</p>
</div>
<!-- Users Email -->
<p>@{{ record.email }}</p>
<p class="truncate">@{{ record.email }}</p>
<!-- Users Status -->
<span
Expand Down
16 changes: 8 additions & 8 deletions packages/Webkul/WebForm/src/Resources/lang/en/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

return [
'acl' => [
'title' => 'نماذج الويب',
'view' => 'عرض',
'create' => 'إنشاء',
'edit' => 'تحرير',
'delete' => 'حذف',
'title' => 'Web Forms',
'view' => 'View',
'create' => 'Create',
'edit' => 'Edit',
'delete' => 'Delete',
],

'menu' => [
'title' => 'نماذج الويب',
'title-info' => 'إضافة، تعديل أو حذف نماذج الويب من CRM',
'title' => 'Web Forms',
'title-info' => 'Add, edit, or delete web forms from the CRM',
],

'validations' => [
'invalid-phone-number' => 'رقم الهاتف غير صالح',
'invalid-phone-number' => 'Invalid phone number',
],
];
1 change: 0 additions & 1 deletion public/admin/build/assets/app-1a3013f6.css

This file was deleted.

1 change: 1 addition & 0 deletions public/admin/build/assets/app-d6168e0d.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/admin/build/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@
"src": "node_modules/vue-cal/dist/i18n/zh-hk.es.js"
},
"src/Resources/assets/css/app.css": {
"file": "assets/app-1a3013f6.css",
"file": "assets/app-d6168e0d.css",
"isEntry": true,
"src": "src/Resources/assets/css/app.css"
},
Expand Down

0 comments on commit 3bdf9e8

Please sign in to comment.