bitfix and add sql file

dev
Aji Kamaludin 1 year ago
parent f48e76eda0
commit a3f95b3e8a
No known key found for this signature in database
GPG Key ID: 19058F67F0083AD3

@ -3,6 +3,7 @@
## Note
- [ ] expired point
- [ ] like query must use ? and change to lower case or somethink else
## Front

@ -24,10 +24,10 @@ class CustomerController extends Controller
if ($request->q != '') {
$query->where(function ($query) use ($request) {
$query->where('name', 'ilike', "%$request->q%")
->orWhere('fullname', 'ilike', "%$request->q%")
->orWhere('email', 'ilike', "%$request->q%")
->orWhere('phone', 'ilike', "%$request->q%");
$query->where('name', 'like', "%$request->q%")
->orWhere('fullname', 'like', "%$request->q%")
->orWhere('email', 'like', "%$request->q%")
->orWhere('phone', 'like', "%$request->q%");
});
}

@ -44,10 +44,10 @@ class CustomerMitraController extends Controller
if ($request->q != '') {
$query->where(function ($query) use ($request) {
$query->where('name', 'ilike', "%$request->q%")
->orWhere('fullname', 'ilike', "%$request->q%")
->orWhere('email', 'ilike', "%$request->q%")
->orWhere('phone', 'ilike', "%$request->q%");
$query->where('name', 'like', "%$request->q%")
->orWhere('fullname', 'like', "%$request->q%")
->orWhere('email', 'like', "%$request->q%")
->orWhere('phone', 'like', "%$request->q%");
});
}
@ -87,7 +87,7 @@ class CustomerMitraController extends Controller
$locations = Location::query();
if ($request->location_q != '') {
$locations->where('name', 'ilike', "%$request->location_q%");
$locations->where('name', 'like', "%$request->location_q%");
}
return inertia('CustomerMitra/Form', [
@ -205,7 +205,7 @@ class CustomerMitraController extends Controller
$locations = Location::query();
if ($request->location_q != '') {
$locations->where('name', 'ilike', "%$request->location_q%");
$locations->where('name', 'like', "%$request->location_q%");
}
return inertia('CustomerMitra/Form', [

@ -20,11 +20,11 @@ class DepositController extends Controller
if ($request->q != '') {
$deposits->where(function ($query) use ($request) {
$query->where('description', 'ilike', "%$request->q%")
$query->where('description', 'like', "%$request->q%")
->orWhereHas('customer', function ($query) use ($request) {
$query->where('fullname', 'ilike', "%$request->q%")
->orWhere('email', 'ilike', "%$request->q%")
->orWhere('phone', 'ilike', "%$request->q%");
$query->where('fullname', 'like', "%$request->q%")
->orWhere('email', 'like', "%$request->q%")
->orWhere('phone', 'like', "%$request->q%");
});
});
}

@ -13,7 +13,7 @@ class LocationController extends Controller
$query = Location::orderBy('updated_at', 'desc');
if ($request->q != '') {
$query->where('name', 'ilike', "%$request->q%");
$query->where('name', 'like', "%$request->q%");
}
return inertia('Location/Index', [

@ -19,8 +19,8 @@ class LocationProfileController extends Controller
}
if ($request->q != '') {
$query->where('name', 'ilike', "%$request->q%")
->orWhere('display_note', 'ilike', "%$request->q%");
$query->where('name', 'like', "%$request->q%")
->orWhere('display_note', 'like', "%$request->q%");
}
return inertia('LocationProfile/Index', [

@ -22,11 +22,11 @@ class PaylaterController extends Controller
if ($request->q != '') {
$deposits->where(function ($query) use ($request) {
$query->where('description', 'ilike', "%$request->q%")
$query->where('description', 'like', "%$request->q%")
->orWhereHas('customer', function ($query) use ($request) {
$query->where('fullname', 'ilike', "%$request->q%")
->orWhere('email', 'ilike', "%$request->q%")
->orWhere('phone', 'ilike', "%$request->q%");
$query->where('fullname', 'like', "%$request->q%")
->orWhere('email', 'like', "%$request->q%")
->orWhere('phone', 'like', "%$request->q%");
});
});
}

@ -20,7 +20,7 @@ class RoleController extends Controller
$query = Role::query()->with(['users']);
if ($request->q) {
$query->where('name', 'ilike', "%{$request->q}%");
$query->where('name', 'like', "%{$request->q}%");
}
$query->orderBy('created_at', 'desc');

@ -39,11 +39,11 @@ class SaleController extends Controller
->withCount(['items']);
if ($request->q != '') {
$query->where('code', 'ilike', "%$request->q%")
$query->where('code', 'like', "%$request->q%")
->orWhereHas('customer', function ($query) use ($request) {
$query->where('name', 'ilike', "%$request->q%")
->orWhere('fullname', 'ilike', "%$request->q%")
->orWhere('username', 'ilike', "%$request->q%");
$query->where('name', 'like', "%$request->q%")
->orWhere('fullname', 'like', "%$request->q%")
->orWhere('username', 'like', "%$request->q%");
});
}

@ -15,7 +15,7 @@ class UserController extends Controller
$query = User::query()->with(['role']);
if ($request->q) {
$query->where('name', 'ilike', "%{$request->q}%");
$query->where('name', 'like', "%{$request->q}%");
}
$query->orderBy('created_at', 'desc');

@ -19,7 +19,7 @@ class VoucherController extends Controller
$query = Location::orderBy('updated_at', 'desc');
if ($request->q != '') {
$query->where('name', 'ilike', "%$request->q%");
$query->where('name', 'like', "%$request->q%");
}
return inertia('Voucher/Location', [
@ -37,8 +37,8 @@ class VoucherController extends Controller
}
if ($request->q != '') {
$query->where('name', 'ilike', "%$request->q%")
->orWhere('display_note', 'ilike', "%$request->q%");
$query->where('name', 'like', "%$request->q%")
->orWhere('display_note', 'like', "%$request->q%");
}
return inertia('Voucher/Profile', [
@ -55,9 +55,9 @@ class VoucherController extends Controller
if ($request->q != '') {
$query->where(function ($query) use ($request) {
$query->where('username', 'ilike', "%$request->q%")
->orWhere('comment', 'ilike', "%$request->q%")
->orWhere('profile', 'ilike', "%$request->q%");
$query->where('username', 'like', "%$request->q%")
->orWhere('comment', 'like', "%$request->q%")
->orWhere('profile', 'like', "%$request->q%");
});
}

@ -13,9 +13,9 @@ class CustomerController extends Controller
$query = Customer::orderBy('updated_at', 'desc');
if ($request->q != '') {
$query->where('name', 'ilike', "%$request->q%")
->orWhere('fullname', 'ilike', "%$request->q%")
->orWhere('username', 'ilike', "%$request->q%");
$query->where('name', 'like', "%$request->q%")
->orWhere('fullname', 'like', "%$request->q%")
->orWhere('username', 'like', "%$request->q%");
}
if ($request->levels != '') {

@ -13,7 +13,7 @@ class LocationController extends Controller
$query = Location::orderBy('updated_at', 'desc');
if ($request->q != '') {
$query->where('name', 'ilike', "%$request->q%");
$query->where('name', 'like', "%$request->q%");
}
return $query->limit(100)->get();

@ -14,9 +14,9 @@ class LocationProfileController extends Controller
->orderBy('updated_at', 'desc');
if ($request->q != '') {
$query->where('name', 'ilike', "%$request->q%")
->orWhere('display_note', 'ilike', "%$request->q%")
->orWhereHas('location', fn ($q) => $q->where('name', 'ilike', "%$request->q%"));
$query->where('name', 'like', "%$request->q%")
->orWhere('display_note', 'like', "%$request->q%")
->orWhereHas('location', fn ($q) => $q->where('name', 'like', "%$request->q%"));
}
return $query->limit(100)->get();

@ -13,7 +13,7 @@ class RoleController extends Controller
$query = Role::query();
if ($request->q) {
$query->where('name', 'ilike', "%{$request->q}%");
$query->where('name', 'like', "%{$request->q}%");
}
return $query->limit(100)->get();

@ -51,7 +51,7 @@ class Setting extends Model
{
$data = Cache::get('settings');
if ($data == null) {
$settings = Setting::where('key', 'ilike', 'OPEN%')->get();
$settings = Setting::where('key', 'like', 'OPEN%')->get();
foreach ($settings as $setting) {
$data[$setting->key] = $setting->value;
}

@ -26,11 +26,11 @@ class DummySeeder extends Seeder
{
$this->info();
$this->banner();
$this->account();
$this->location();
$this->location_profile();
$this->voucher();
$this->deposit_location();
// $this->account();
// $this->location();
// $this->location_profile();
// $this->voucher();
// $this->deposit_location();
}
public function info()

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save