filter worked

This commit is contained in:
gerchek 2022-04-25 12:43:07 +05:00
parent 2e7f314270
commit 86171c2790
7 changed files with 79 additions and 43 deletions

View File

@ -1,6 +1,19 @@
scopes:
payed:
label: Payment
type: checkbox
default: 0
conditions: payed = true
created_at:
label: "Date filter"
type: daterange
conditions: created_at >= ':after' AND created_at <= ':before'
selected_card:
label: "Selected card"
type: text
conditions: selected_card like concat('%', :value, '%')
#selected_card:
# label: Holiday Type
# modelClass: Atash\Contact\Models\OnlineCard
# conditions: selected_card in (:filtered)
# options:
# "Aýlyk karty": "Aýlyk karty"

View File

@ -5,6 +5,7 @@ noRecordsMessage: 'backend::lang.list.no_records'
showSetup: true
showCheckboxes: true
recordsPerPage: 20
filter: config_filter.yaml
toolbar:
buttons: list_toolbar
search:

View File

@ -52,6 +52,19 @@ class OnlineCard extends Model
];
protected $guarded = ['*'];
#public function getHolidayTypesAttribute(){
#return [
# "Aýlyk karty" => 'Aýlyk karty'
# ];
#}
// public function scopeFieldFilter($query, $val)
//{
// $id = FieldModel::where('selected_card','LIKE','%'.$val.'%')->lists('id');
// return $query->whereIn('id', $id);
//}
// public function scopePayed($query)
// {

View File

@ -3,6 +3,7 @@ fields:
label: 'Saýlanan kart'
span: auto
type: text
# scope: fieldFilter
name:
label: 'First name'
span: auto

View File

@ -6,42 +6,49 @@ plugin:
homepage: ''
navigation:
main-menu-item:
label: 'Online Card'
url: atash/contact/onlinecardcontroller
icon: icon-credit-card
label: Contact
url: atash/contact/contactcontroller
icon: icon-calendar
permissions:
- online_card_form
- contact
sideMenu:
side-menu-item:
label: 'Online Credit'
url: atash/contact/onlinecreditcontroller
icon: icon-indent
permissions:
- credit_form
side-menu-item2:
label: Contact
url: atash/contact/contactcontroller
icon: icon-calendar
permissions:
- contact_form
side-menu-item3:
label: 'Вид кредита'
url: atash/contact/creditdatacontroller
icon: icon-credit-card
permissions:
- creditdata
side-menu-item4:
label: 'Вид карты'
url: atash/contact/carddatacontroller
icon: icon-envelope
permissions:
- carddata
side-menu-item:
label: 'Online Card'
url: /atash/contact/onlinecardcontroller
icon: icon-credit-card
permissions:
- online_card_form
side-menu-item2:
label: 'Online Credit'
url: /atash/contact/onlinecreditcontroller
icon: icon-dedent
permissions:
- onlinecredit
permissions:
contact_form:
tab: Other
label: Contact_Form
credit_form:
tab: Other
label: Credit_Form
online_card_form:
tab: Other
label: Online_card_Form
online_card_branch_form:
tab: Other
label: Online_card_branch_Form
tab: other
label: online_card_form
creditdata:
tab: other
label: creditdata
carddata:
tab: other
label: carddata
onlinecredit:
tab: other
label: onlinecredit
contact:
tab: other
label: contact

View File

@ -375,31 +375,33 @@ Route::post('restore', function (Request $request) {
$vars = [
'name' => $name,
'subject' => $subject,
'messsage' => $message
'messsage' => $message,
'type' => $type
];
if($type==true)
// dd($type);
if($subject == "Plastik kartlar" || $subject == "Пластиковые карты")
{
Mail::send('vdomah.jwtauth::mail.message', $vars, function($message) {
$message->to('gerchekgerchek1@gmail.com', 'Admin Person');
$message->to('bank_kart@halkbank.gov.tm', 'Admin Person');
$message->subject('This is a reminder');
});
}
elseif($type==false)
else
{
Mail::send('vdomah.jwtauth::mail.message', $vars, function($message) {
$message->to('digital.tps2018@gmail.com', 'Admin Person');
$message->to('karzonline@halkbank.gov.tm', 'Admin Person');
$message->subject('This is a reminder');
});
}
}
return Response::json(compact('data'));
return Response::json(compact('type'));
})->middleware('\Tymon\JWTAuth\Middleware\GetUserFromToken');

View File

@ -1,4 +1,3 @@
<section class="mail" style="width:100%;display:block;position:relative;">
<table class="mail_table" cellpadding="0" cellspacing="0" border="0" style="position:relative;width:100%;margin:10px 0;border:1px solid #E5E5E5;border-spacing:0; background: url({{ asset('themes/form/assets/images/logologo.png') }}) no-repeat center; background-size: contain; background-size: 30%;">
<thead>