Skip to content

Commit

Permalink
resoled conflicts.
Browse files Browse the repository at this point in the history
  • Loading branch information
suraj-webkul committed Aug 30, 2024
2 parents eb29868 + 37846a7 commit 0592ff8
Show file tree
Hide file tree
Showing 109 changed files with 1,510 additions and 882 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ public function get(): JsonResponse
'lead_pipeline_stage_id' => $stage->id,
]);

if ($userIds = bouncer()->getAuthorizedUserIds()) {
$query->whereIn('leads.user_id', $userIds);
}

$stage->lead_value = (clone $query)->sum('lead_value');

$data[$stage->id] = (new StageResource($stage))->jsonSerialize();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ public function store()
]);

if (! auth()->guard('user')->attempt(request(['email', 'password']), request('remember'))) {
session()->flash('error', trans('admin::app.sessions.login.login-error'));
session()->flash('error', trans('admin::app.users.login-error'));

return redirect()->back();
}

if (auth()->guard('user')->user()->status == 0) {
session()->flash('warning', trans('admin::app.sessions.login.activate-warning'));
session()->flash('warning', trans('admin::app.users.activate-warning'));

auth()->guard('user')->logout();

Expand Down
3 changes: 3 additions & 0 deletions packages/Webkul/Admin/src/Resources/lang/en/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
],

'users' => [
'activate-warning' => 'Your account is not activated yet. Please contact the administrator.',
'login-error' => 'The credentials do not match our records.',

'login' => [
'email' => 'Email Address',
'forget-password-link' => 'Forget Password ?',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@lang('admin::app.activities.edit.title')
</x-slot>

{!! view_render_event('krayin.admin.activities.edit.form.before') !!}
{!! view_render_event('admin.activities.edit.form.before') !!}

<x-admin::form
:action="route('admin.activities.update', $activity->id)"
Expand All @@ -30,7 +30,7 @@
<div class="flex items-center gap-x-2.5">
<!-- Create button for person -->
<div class="flex items-center gap-x-2.5">
{!! view_render_event('krayin.admin.activities.edit.submit-btn.before') !!}
{!! view_render_event('admin.activities.edit.submit-btn.before') !!}

<!-- Save Button -->
<button
Expand All @@ -40,7 +40,7 @@ class="primary-button"
@lang('admin::app.activities.edit.save-btn')
</button>

{!! view_render_event('krayin.admin.activities.edit.submit-btn.after') !!}
{!! view_render_event('admin.activities.edit.submit-btn.after') !!}
</div>
</div>
</div>
Expand Down Expand Up @@ -152,7 +152,7 @@ class="w-full px-1 py-1 dark:bg-gray-900 dark:text-gray-300"

<!-- Right sub-component -->
<div class="flex w-[360px] max-w-full flex-col gap-2 max-sm:w-full">
{!! view_render_event('krayin.admin.activities.edit.accordion.general.before') !!}
{!! view_render_event('admin.activities.edit.accordion.general.before') !!}

<x-admin::accordion>
<x-slot:header>
Expand Down Expand Up @@ -235,13 +235,13 @@ class="w-full px-1 py-1 dark:bg-gray-900 dark:text-gray-300"
</x-slot>
</x-admin::accordion>

{!! view_render_event('krayin.admin.activities.edit.accordion.general.after') !!}
{!! view_render_event('admin.activities.edit.accordion.general.after') !!}
</div>
</div>
</div>
</x-admin::form>

{!! view_render_event('krayin.admin.activities.edit.form.after') !!}
{!! view_render_event('admin.activities.edit.form.after') !!}

@pushOnce('scripts')
<script
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
</div>
</div>
{!! view_render_event('krayin.admin.activities.index.toggle_view.before') !!}
{!! view_render_event('admin.activities.index.toggle_view.before') !!}
<div class="flex">
<i
Expand All @@ -64,13 +64,13 @@ class="icon-calendar cursor-pointer rounded-md p-2 text-2xl"
></i>
</div>
{!! view_render_event('krayin.admin.activities.index.toggle_view.after') !!}
{!! view_render_event('admin.activities.index.toggle_view.after') !!}
</div>
<!-- DataGrid Shimmer -->
<div>
<template v-if="viewType == 'table'">
{!! view_render_event('krayin.admin.activities.index.datagrid.before') !!}
{!! view_render_event('admin.activities.index.datagrid.before') !!}
<x-admin::datagrid
src="{{ route('admin.activities.get') }}"
Expand Down Expand Up @@ -260,15 +260,15 @@ class="cursor-pointer rounded-md p-1.5 text-2xl transition-all hover:bg-gray-200
</template>
</x-admin::datagrid>
{!! view_render_event('krayin.admin.activities.index.datagrid.after') !!}
{!! view_render_event('admin.activities.index.datagrid.after') !!}
</template>
<template v-else>
{!! view_render_event('krayin.admin.activities.index.vue_calender.before') !!}
{!! view_render_event('admin.activities.index.vue_calender.before') !!}
<v-calendar></v-calendar>
{!! view_render_event('krayin.admin.activities.index.vue_calender.after') !!}
{!! view_render_event('admin.activities.index.vue_calender.after') !!}
</template>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@ class="flex flex-col gap-1"
<span>:</span>

<span>
@{{ activity.additional.old.label ?? "@lang('admin::app.components.activities.index.empty')" }}
@{{ activity.additional.old.label?.replaceAll(`<br>`, ' ') ?? "@lang('admin::app.components.activities.index.empty')" }}
</span>

<span class="icon-stats-up rotate-90 text-xl"></span>

<span>
@{{ activity.additional.new.label ?? "@lang('admin::app.components.activities.index.empty')" }}
@{{ activity.additional.new.label?.replaceAll(`<br>`, ' ') ?? "@lang('admin::app.components.activities.index.empty')" }}
</span>
</div>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
::errors="errors"
:placeholder="$attribute->name"
:url="$url"
:allow-edit="$allowEdit"
/>
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
::errors="errors"
:placeholder="$attribute->name"
:url="$url"
:allow-edit="$allowEdit"
/>
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@
::errors="errors"
:placeholder="$attribute->name"
:url="$url"
:allow-edit="$allowEdit"
/>
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
::errors="errors"
:placeholder="$attribute->name"
:url="$url"
:allow-edit="$allowEdit"
/>
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
::errors="errors"
:placeholder="$attribute->name"
:url="$url"
:allow-edit="$allowEdit"
/>
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
::errors="errors"
:placeholder="$attribute->name"
:url="$url"
:allow-edit="$allowEdit"
/>
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
::errors="errors"
:placeholder="$attribute->name"
:url="$url"
:allow-edit="$allowEdit"
/>
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
::errors="errors"
:placeholder="$attribute->name"
:url="$url"
:allow-edit="$allowEdit"
/>
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@
::errors="errors"
:placeholder="$attribute->name"
:url="$url"
:allow-edit="$allowEdit"
/>
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@
::errors="errors"
:placeholder="$attribute->name"
:url="$url"
:allow-edit="$allowEdit"
/>
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
::errors="errors"
:placeholder="$attribute->name"
:url="$url"
/>
:allow-edit="$allowEdit"
/>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<x-admin::form.control-group.control
<x-admin::form.control-group.controls.inline.text
type="inline"
::name="'{{ $attribute->code }}'"
::value="'{{ $value }}'"
Expand All @@ -8,4 +8,5 @@
:placeholder="$attribute->name"
::errors="errors"
:url="$url"
/>
:allow-edit="$allowEdit"
/>
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@
::errors="errors"
:placeholder="$attribute->name"
:url="$url"
:allow-edit="$allowEdit"
/>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<x-admin::form.control-group.control
<x-admin::form.control-group.controls.inline.text
type="inline"
::name="'{{ $attribute->code }}'"
::value="'{{ $value }}'"
Expand All @@ -8,4 +8,5 @@
:placeholder="$attribute->name"
::errors="errors"
:url="$url"
/>
:allow-edit="$allowEdit"
/>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<x-admin::form.control-group.control
<x-admin::form.control-group.controls.inline.text
type="inline"
::name="'{{ $attribute->code }}'"
::value="'{{ $value }}'"
Expand All @@ -8,4 +8,5 @@
:placeholder="$attribute->name"
::errors="errors"
:url="$url"
/>
:allow-edit="$allowEdit"
/>
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class="break-words"
<!-- Actions -->
<p
class="place-self-end"
class="flex h-full items-center place-self-end"
v-if="available.actions.length"
>
<span
Expand Down
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class="flex w-full items-center overflow-hidden rounded-md border text-sm text-g
@case('date')
<v-field
v-slot="{ field, errors }"
{{ $attributes->only(['name', ':name', 'value', ':value', 'v-model', 'rules', ':rules', 'label', ':label']) }}
{{ $attributes->only(['name', ':name', 'value', ':value', 'v-model', 'rules', ':rules', 'label', ':label'])->merge(['rules' => 'regex:^\d{4}-\d{2}-\d{2}$']) }}
name="{{ $name }}"
>
<x-admin::flat-picker.date>
Expand All @@ -136,7 +136,7 @@ class="flex w-full items-center overflow-hidden rounded-md border text-sm text-g
@case('datetime')
<v-field
v-slot="{ field, errors }"
{{ $attributes->only(['name', ':name', 'value', ':value', 'v-model', 'rules', ':rules', 'label', ':label']) }}
{{ $attributes->only(['name', ':name', 'value', ':value', 'v-model', 'rules', ':rules', 'label', ':label'])->merge(['rules' => 'regex:^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$']) }}
name="{{ $name }}"
>
<x-admin::flat-picker.datetime>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
@props([
'allowEdit' => true,
])

<v-inline-address-edit
{{ $attributes->except('value') }}
:value='@json($attributes->get('value'))'
:allow-edit="{{ $allowEdit ? 'true' : 'false' }}"
>
<div class="group w-full max-w-full hover:rounded-sm">
<div class="rounded-xs flex h-[34px] items-center ltr:pl-2.5 ltr:text-left rtl:pr-2.5 rtl:text-right">
Expand All @@ -17,14 +22,14 @@
<div class="group w-full max-w-full hover:rounded-sm">
<!-- Non-editing view -->
<div
class="flex h-[34px] items-center border border-transparent transition-all rounded"
class="flex h-[34px] items-center rounded border border-transparent transition-all"
:class="allowEdit ? 'hover:bg-gray-100 dark:hover:bg-gray-800' : ''"
>
<div
class="group relative !w-full pl-2.5"
:style="{ 'text-align': position }"
>
<span class="truncate rounded cursor-pointer">
<span class="cursor-pointer truncate rounded">
@{{ valueLabel ? valueLabel : `${inputValue?.address} ${inputValue?.postcode} ${inputValue?.city} ${inputValue?.state} ${inputValue?.country}`.length > 20 ? `${inputValue?.address} ${inputValue?.postcode} ${inputValue?.city} ${inputValue?.state} ${inputValue?.country}`.substring(0, 20) + '...' : `${inputValue?.address} ${inputValue?.postcode} ${inputValue?.city} ${inputValue?.state} ${inputValue?.country}` }}
</span>
Expand All @@ -35,7 +40,7 @@ class="group relative !w-full pl-2.5"
@{{ `${inputValue?.state}, ${inputValue?.country}` }}<br>
</span>
<div class="-mt-2 h-3 w-3 ml-4 rotate-45 bg-black dark:bg-white"></div>
<div class="-mt-2 ml-4 h-3 w-3 rotate-45 bg-black dark:bg-white"></div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
<v-inline-boolean-edit {{ $attributes->except('options') }}>
@props([
'allowEdit' => true,
])

<v-inline-boolean-edit
{{ $attributes->except('options') }}
:allow-edit="{{ $allowEdit ? 'true' : 'false' }}"
>
<div class="group w-full max-w-full hover:rounded-sm">
<div class="rounded-xs flex h-[34px] items-center pl-2.5 text-left">
<div class="shimmer h-5 w-48 rounded border border-transparent"></div>
Expand All @@ -15,7 +22,7 @@
<!-- Non-editing view -->
<div
v-if="! isEditing"
class="flex h-[34px] items-center border border-transparent transition-all rounded"
class="flex h-[34px] items-center rounded border border-transparent transition-all"
:class="allowEdit ? 'hover:bg-gray-100 dark:hover:bg-gray-800' : ''"
>
<x-admin::form.control-group.control
Expand All @@ -25,7 +32,7 @@ class="flex h-[34px] items-center border border-transparent transition-all round
v-model="inputValue"
/>
<span class="truncate rounded cursor-pointer">
<span class="cursor-pointer truncate rounded">
@{{ valueLabel ? valueLabel : selectedValue?.name }}
</span>
Expand Down
Loading

0 comments on commit 0592ff8

Please sign in to comment.