Skip to content

Commit 1e299f6

Browse files
Resolved conflicts
2 parents b1159e2 + 1c4da4b commit 1e299f6

File tree

10 files changed

+42
-15
lines changed

10 files changed

+42
-15
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ a progressive Javascript framework.
2828

2929
**We also have a forum for any type of concerns, feature requests, or discussions. Please visit: [Krayin CRM Forums](https://forums.krayincrm.com/)**
3030

31-
# Visit our live [Demo](https://crm.bagisto.com)
31+
# Visit our live [Demo](https://demo.krayincrm.com)
3232

3333
It packs in lots of features that will allow your E-Commerce business to scale in no time:
3434

packages/Webkul/Admin/src/DataGrids/Lead/LeadDataGrid.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ class LeadDataGrid extends DataGrid
1111

1212
protected $tabFilters = [];
1313

14-
protected $stagesMassActionOptions;
15-
1614
protected $redirectRow = [
1715
"id" => "id",
1816
"route" => "admin.leads.view",
@@ -161,6 +159,12 @@ public function prepareActions()
161159

162160
public function prepareMassActions()
163161
{
162+
$stages = [];
163+
164+
foreach (app("\Webkul\Lead\Repositories\StageRepository")->get(['id', 'name'])->toArray() as $stage) {
165+
$stages[$stage['name']] = $stage['id'];
166+
}
167+
164168
$this->addMassAction([
165169
'type' => 'delete',
166170
'label' => trans('ui::app.datagrid.delete'),
@@ -173,7 +177,7 @@ public function prepareMassActions()
173177
'label' => trans('admin::app.datagrid.update_stage'),
174178
'action' => route('admin.leads.mass_update'),
175179
'method' => 'PUT',
176-
'options' => $this->stagesMassActionOptions,
180+
'options' => $stages,
177181
]);
178182
}
179183
}

packages/Webkul/Admin/src/DataGrids/Quote/QuoteDataGrid.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public function prepareQueryBuilder()
4444

4545
$this->addFilter('id', 'quotes.id');
4646
$this->addFilter('user', 'quotes.user_id');
47+
$this->addFilter('user_name', 'quotes.user_id');
4748
$this->addFilter('person_name', 'persons.name');
4849

4950
$this->setQueryBuilder($queryBuilder);

packages/Webkul/Admin/src/DataGrids/Setting/GroupDataGrid.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function prepareQueryBuilder()
1818
->addSelect(
1919
'groups.id',
2020
'groups.name',
21-
'groups.description',
21+
'groups.description'
2222
);
2323

2424
$this->setQueryBuilder($queryBuilder);

packages/Webkul/Admin/src/Resources/lang/en/app.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@
375375
'update-btn-title' => 'Update Group',
376376
'create-success' => 'Group created successfully.',
377377
'update-success' => 'Group updated successfully.',
378-
'delete-success' => 'Group deleted successfully.',
378+
'destroy-success' => 'Group deleted successfully.',
379379
'delete-failed' => 'Group can not be deleted.',
380380
'user-define-error' => 'Can not delete system group.',
381381
],

packages/Webkul/Core/src/Config/concord.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
return [
44
'modules' => [
5+
\Webkul\Activity\Providers\ModuleServiceProvider::class,
56
\Webkul\Admin\Providers\ModuleServiceProvider::class,
67
\Webkul\Attribute\Providers\ModuleServiceProvider::class,
78
\Webkul\Contact\Providers\ModuleServiceProvider::class,

packages/Webkul/UI/publishable/assets/js/ui.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/Webkul/UI/publishable/assets/mix-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"/js/ui.js": "/js/ui.js?id=2ca0835dfe1f8da34c1a",
2+
"/js/ui.js": "/js/ui.js?id=04e2fdebe8621c6953e2",
33
"/css/ui.css": "/css/ui.css?id=58acb02c87af96127d4b",
44
"/images/add-icon.svg": "/images/add-icon.svg?id=9135b4e0e1c239c36981",
55
"/images/align-justify-icon.svg": "/images/align-justify-icon.svg?id=ee8d48e636b80417a884",

packages/Webkul/UI/src/DataGrid/Traits/DatagridCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ private function filterCollection($collection, $info, $columnName, $type = "filt
7272
switch ($condition) {
7373
case 'in':
7474
foreach (explode(',', $filter_value) as $value) {
75-
$collection->orWhere(
75+
$collection->where(
7676
$columnName,
7777
'like',
7878
"%$value%"

packages/Webkul/UI/src/Resources/assets/js/components/datagrid/filters.vue

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,12 @@
242242
}
243243
244244
this.makeURL();
245+
},
246+
247+
'$store.state.tableData.columns': function (newValue, oldValue) {
248+
if (newValue.length != oldValue.length) {
249+
this.updateFilterValue();
250+
}
245251
}
246252
},
247253
@@ -471,6 +477,7 @@
471477
472478
obj.column = key.replace(']', '').split('[')[0];
473479
obj.cond = key.replace(']', '').split('[')[1];
480+
474481
obj.val = value;
475482
476483
if (obj?.column?.replaceAll) {
@@ -537,17 +544,17 @@
537544
538545
if (key == "sort") {
539546
data.prettyValue = `${data.cond.replaceAll("_", " ")} - ${data.val}`;
540-
} else {
541-
if (data.cond == 'bw') {
542-
var timestamp = Date.parse(data.val.split(",")[0]);
547+
} else if (data.cond == 'bw') {
548+
var timestamp = Date.parse(data.val.split(",")[0]);
543549
544-
if (isNaN(timestamp) == false) {
545-
data.prettyValue = `${data.val.replaceAll(",", " - ")}`;
546-
}
550+
if (isNaN(timestamp) == false) {
551+
data.prettyValue = `${data.val.replaceAll(",", " - ")}`;
547552
}
548553
}
549554
550555
this.filters.push(data);
556+
557+
this.updateFilterValue();
551558
}
552559
553560
this.makeURL();
@@ -659,6 +666,20 @@
659666
}
660667
}
661668
},
669+
670+
updateFilterValue: function () {
671+
this.filters = this.filters.map(filter => {
672+
let column = this.$store.state.tableData.columns.find(column => column.index == filter.column);
673+
674+
if (column?.filterable_options) {
675+
let value = filter.val.split(",");
676+
value = value.map(id => column.filterable_options.find(option => option.value == id).label);
677+
filter.prettyValue = value.join(",");
678+
}
679+
680+
return filter;
681+
});
682+
}
662683
}
663684
};
664685
</script>

0 commit comments

Comments
 (0)