Skip to content

Commit

Permalink
Resolved Conflcits
Browse files Browse the repository at this point in the history
  • Loading branch information
amit-webkul committed Jan 13, 2025
2 parents 42383d5 + 5dd869c commit 2d14299
Show file tree
Hide file tree
Showing 88 changed files with 1,431 additions and 926 deletions.
92 changes: 46 additions & 46 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ public function prepareColumns(): void
return "<span class='text-gray-800 dark:text-gray-300'>N/A</span>";
}

$route = urldecode(route('admin.leads.index', ['pipeline_id' => $row->lead_pipeline_id, 'view_type' => 'table', 'id[eq]' => $row->lead_id]));
$route = urldecode(route('admin.leads.view', $row->lead_id));

return "<a class='text-brandColor hover:underline' href='".$route."'>".$row->lead_title.'</a>';
return "<a class='text-brandColor hover:underline' target='_blank' href='".$route."'>".$row->lead_title.'</a>';
},
]);

Expand Down
2 changes: 1 addition & 1 deletion packages/Webkul/Admin/src/DataGrids/Lead/LeadDataGrid.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ public function prepareColumns(): void

$this->addColumn([
'index' => 'expected_close_date',
'label' => trans('admin::app.leads.index.datagrid.expected-close-date'),
'label' => trans('admin::app.leads.index.datagrid.date-to'),
'type' => 'date',
'searchable' => false,
'sortable' => true,
Expand Down
28 changes: 22 additions & 6 deletions packages/Webkul/Admin/src/DataGrids/Settings/AttributeDataGrid.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,23 @@ public function prepareColumns(): void
]);

$this->addColumn([
'index' => 'entity_type',
'label' => trans('admin::app.settings.attributes.index.datagrid.entity-type'),
'type' => 'string',
'sortable' => true,
'searchable' => false,
'filterable' => true,
'index' => 'entity_type',
'label' => trans('admin::app.settings.attributes.index.datagrid.entity-type'),
'type' => 'string',
'sortable' => true,
'searchable' => false,
'filterable' => true,
'filterable_type' => 'dropdown',
'filterable_options' => app(AttributeRepository::class)
->select('entity_type as label', 'entity_type as value')
->distinct()
->get()
->map(function ($item) {
$item->label = trans('admin::app.settings.attributes.index.datagrid.entity-types.'.$item->label);

return $item;
})
->toArray(),
'closure' => fn ($row) => ucfirst($row->entity_type),
]);

Expand All @@ -84,6 +95,11 @@ public function prepareColumns(): void
->select('type as label', 'type as value')
->distinct()
->get()
->map(function ($item) {
$item->label = trans('admin::app.settings.attributes.index.datagrid.types.'.$item->label);

return $item;
})
->toArray(),
]);

Expand Down
9 changes: 2 additions & 7 deletions packages/Webkul/Admin/src/DataGrids/Settings/TagDataGrid.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,8 @@ public function prepareColumns(): void
'index' => 'id',
'label' => trans('admin::app.settings.tags.index.datagrid.id'),
'type' => 'string',
'searchable' => false,
'sortable' => true,
'sortable' => true,
'searchable' => true,
'sortable' => true,
'filterable' => true,
]);

Expand All @@ -56,19 +54,16 @@ public function prepareColumns(): void
'label' => trans('admin::app.settings.tags.index.datagrid.name'),
'type' => 'string',
'searchable' => true,
'sortable' => false,
'sortable' => true,
'searchable' => true,
'filterable' => true,
]);

$this->addColumn([
'index' => 'user_name',
'label' => trans('admin::app.settings.tags.index.datagrid.users'),
'type' => 'string',
'searchable' => false,
'sortable' => true,
'searchable' => true,
'sortable' => true,
'filterable' => true,
]);

Expand Down
18 changes: 8 additions & 10 deletions packages/Webkul/Admin/src/DataGrids/Settings/UserDataGrid.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,19 @@ public function prepareQueryBuilder(): Builder
$queryBuilder = DB::table('users')
->distinct()
->addSelect(
'users.id',
'users.name',
'users.email',
'users.image',
'users.status',
'users.created_at'
'id',
'name',
'email',
'image',
'status',
'created_at'
)
->leftJoin('user_groups', 'users.id', '=', 'user_groups.user_id');
->leftJoin('user_groups', 'id', '=', 'user_groups.user_id');

if ($userIds = bouncer()->getAuthorizedUserIds()) {
$queryBuilder->whereIn('users.user_id', $userIds);
$queryBuilder->whereIn('id', $userIds);
}

$this->addFilter('id', 'users.id');

return $queryBuilder;
}

Expand Down
Loading

0 comments on commit 2d14299

Please sign in to comment.