inital commit
This commit is contained in:
266
resources/views/client/list.blade.php
Normal file
266
resources/views/client/list.blade.php
Normal file
@@ -0,0 +1,266 @@
|
||||
@extends('layouts.admin')
|
||||
<style>
|
||||
#table-clients td {
|
||||
text-align: left !important;
|
||||
padding: 8px !important;
|
||||
}
|
||||
|
||||
#table-clients th {
|
||||
padding: 8px !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
@php
|
||||
$pageLimit = $searchData['pageLimit'];
|
||||
$account_status = $searchData['account_status'];
|
||||
$search_value = $searchData['search_value'];
|
||||
$payment_status = $searchData['payment_status'];
|
||||
$client_type = $searchData['client_type'];
|
||||
@endphp
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12 col-xs-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<div class="row" style="padding-left: 20px;padding-right: 15px">
|
||||
<h3 class="pull-left">Client List</h3>
|
||||
@if(isShowContent('client.create'))
|
||||
<a href="{{route('client.create')}}" class="btn btn2 btn-success btn-flat pull-right">
|
||||
<i class="fa fa-user" aria-hidden="true"></i>
|
||||
Add Client
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12 col-xs-12">
|
||||
<div class="x_panel">
|
||||
<div class="x_content">
|
||||
|
||||
<form action="{{route('get.clients')}}" method="get" role="search">
|
||||
<div class="row">
|
||||
<div class="col-md-1 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label>Show</label>
|
||||
<select name="pageLimit" id="pagination" class="form-control"
|
||||
onchange="this.form.submit()">
|
||||
<option value="10" @if($pageLimit == 10) selected @endif>10</option>
|
||||
<option value="20" @if($pageLimit == 20) selected @endif>20</option>
|
||||
<option value="50" @if($pageLimit == 50) selected @endif>50</option>
|
||||
<option value="100" @if($pageLimit == 100) selected @endif>100</option>
|
||||
<option value="500" @if($pageLimit == 500) selected @endif>500</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label>Account Status</label>
|
||||
<select name="account_status" id="account_status" class="form-control">
|
||||
<option value="">All</option>
|
||||
@foreach(config('constant.ACCOUNT_STATUS') as $key => $obj )
|
||||
<option value="{{$obj}}"
|
||||
@if ($obj==$searchData['account_status'])
|
||||
selected="selected"
|
||||
@endif
|
||||
>{{$key}}</option>
|
||||
@endforeach
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label>Client Type</label>
|
||||
<select name="client_type" id="client_type" class="form-control">
|
||||
<option value="">All</option>
|
||||
@if(!empty(config('constant.CLIENT_TYPES')))
|
||||
@foreach(config('constant.CLIENT_TYPES') as $key => $obj )
|
||||
<option value="{{$key}}"
|
||||
@if ($key == $searchData['client_type'])
|
||||
selected="selected"
|
||||
@endif
|
||||
>{{$obj}}</option>
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label>Payment Status</label>
|
||||
<select name="payment_status" id="payment_status" class="form-control">
|
||||
<option value="">All</option>
|
||||
@if(!empty(config('constant.PAYMENT_STATUS')))
|
||||
@foreach(config('constant.PAYMENT_STATUS') as $key => $obj )
|
||||
<option value="{{$key}}"
|
||||
@if ($key == $searchData['payment_status'])
|
||||
selected="selected"
|
||||
@endif
|
||||
>{{$obj}}</option>
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label>Client Name/Email/Phone</label>
|
||||
<input id="search_value"
|
||||
type="text"
|
||||
value="{{$searchData['search_value']}}"
|
||||
placeholder="Search By Client Name/Email/Phone"
|
||||
class="form-control" name="search_value" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 col-xs-12">
|
||||
<div class="form-group" style="margin-top: 25px;">
|
||||
<button class="btn btn-primary btn-outline-primary" style="width:100%" type="submit">Search</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
@if(isShowContent('admin.ajax.process'))
|
||||
<button style="margin-top: 15px;" onclick="return multipleClientDelete()" type="button"
|
||||
class="btn btn-danger pull-left" style="margin-left: 10px"
|
||||
id="btnDeleteMultipleClient" disabled>Delete Client
|
||||
</button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="table-responsive py-5">
|
||||
<table id="table-clients" class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" name="allChecked" value="all"
|
||||
onclick="common_helper.allChecked(this,'checkedBoxClient')"></th>
|
||||
<th>Client Name</th>
|
||||
<th>Email</th>
|
||||
<th>Phone</th>
|
||||
<th>Address</th>
|
||||
<th> Account Status</th>
|
||||
<th> Payment Status</th>
|
||||
<th> Account Cancel Date</th>
|
||||
<th>Created At</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if(!empty($users['data']))
|
||||
@foreach ($users['data'] as $key => $obj)
|
||||
@php
|
||||
$user_info = json_encode([$obj->id,$obj->email]);
|
||||
$action = 'DELETE_CLIENT';
|
||||
@endphp
|
||||
<tr class="tr-height">
|
||||
<td><input type="checkbox" name="checkedBoxClient"
|
||||
value="{{ $user_info }}" onclick="checkedornot(this)"></td>
|
||||
<td>{{$obj->first_name.' '.$obj->last_name}}</td>
|
||||
<td>{{ $obj->email}}</td>
|
||||
<td>{{ $obj->phone }}</td>
|
||||
<td>{{ $obj->street_no.', '.$obj->street_name.', '.$obj->city }}</td>
|
||||
<td> @php echo getAccountStatus($obj->subscription_status,$obj->status) @endphp</td>
|
||||
<td> @php echo getPaymentStatus($obj->last_payment_date) @endphp</td>
|
||||
<td>{{ ($obj->account_cancel_datetime !=null)? getStringToDateTime($obj->account_cancel_datetime,'m/d/Y h:i:s a'):'' }}</td>
|
||||
<td>{{ getStringToDateTime($obj->created_at,'m/d/Y h:i:s a') }}</td>
|
||||
<td>
|
||||
@if(isShowContent('get.client.info'))
|
||||
<a href="{{route('get.client.info',$obj->id)}}"
|
||||
class="btn btn-success" style="padding: 5px;"> <span
|
||||
class="glyphicon glyphicon-pencil" title="Edit"></span></a>
|
||||
@endif
|
||||
@if(isShowContent('admin.ajax.process'))
|
||||
<button onclick="return clientDelete({{$user_info}},'{{$action}}')"
|
||||
class="btn btn-danger" style="padding: 5px;"><span
|
||||
class="glyphicon glyphicon-trash" title="Delete"></span>
|
||||
</button>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div id="pagination_panel">
|
||||
{{ $users['data']->appends(compact('pageLimit' ,'account_status','payment_status', 'search_value','client_type')) ->links('basic.pagination') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
@push('script')
|
||||
<script>
|
||||
const multipleClientDelete = () => {
|
||||
let action = 'DELETE_MULTIPLE_CLIENT';
|
||||
let checkedData = $("[name='checkedBoxClient']");
|
||||
let clientId = [];
|
||||
for (let checkbox of checkedData) {
|
||||
if (checkbox.checked)
|
||||
clientId.push(checkbox.value);
|
||||
}
|
||||
if (clientId.length > 0) {
|
||||
clientDelete(clientId,action);
|
||||
}
|
||||
}
|
||||
|
||||
const clientDelete = (userData,action) => {
|
||||
let html_content = `<h4>Are you sure you want to delete client?</h4>`;
|
||||
const swalresponse = common_helper.swalAleart(html_content, 'warning', 450, true, '', true, true, 'Yes');
|
||||
swalresponse.then(async function (result) {
|
||||
if (result.isConfirmed) {
|
||||
let response = await common_helper.globalAjaxRequest('{{route('admin.ajax.process')}}', 'POST', {
|
||||
action: action,
|
||||
userData: userData,
|
||||
_token: "{{ csrf_token() }}"
|
||||
});
|
||||
if (response.status) {
|
||||
Swal.fire({icon: response.type, title: response.message, width: 450,closeOnConfirm: true});
|
||||
window.location = `{{route('get.clients')}}`;
|
||||
} else {
|
||||
Swal.fire({icon: response.type, title: response.message, width: 450,closeOnConfirm: true});
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const checkedornot = (e) => {
|
||||
|
||||
let allData = $("[name='checkedBoxClient']");
|
||||
let checkedData = $("[name='checkedBoxClient']:checked");
|
||||
let allChecked = false;
|
||||
let alldelete = false;
|
||||
|
||||
if(allData.length === checkedData.length){
|
||||
allChecked = true;
|
||||
}
|
||||
|
||||
if(checkedData.length === 0){
|
||||
alldelete = true;
|
||||
}
|
||||
|
||||
$("[name='allChecked']").prop('checked', allChecked);
|
||||
|
||||
$('#btnDeleteMultipleClient').prop('disabled', alldelete);
|
||||
|
||||
}
|
||||
|
||||
const paymentStatusOnChange = (e) => {
|
||||
let status = $('#payment_status').val();
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
@endpush
|
||||
449
resources/views/client/manual_client_create.blade.php
Normal file
449
resources/views/client/manual_client_create.blade.php
Normal file
@@ -0,0 +1,449 @@
|
||||
@extends('layouts.admin')
|
||||
@section('content')
|
||||
<style>
|
||||
.d-none{
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 column col-sm-offset-0 ">
|
||||
<div class="panel panel-default panel-frm">
|
||||
<div class="panel-heading">
|
||||
<div class="row" style="padding-left: 20px;padding-right: 15px">
|
||||
<h3 class="pull-left"> Client Registration</h3>
|
||||
@if(isShowContent('get.clients'))
|
||||
<a href="{{route('get.clients')}}" class="btn btn2 btn-success btn-flat pull-right">
|
||||
<i class="fa fa-list" aria-hidden="true"></i>
|
||||
Client List
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<div class="clearfix"></div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12 col-xs-12">
|
||||
<div class="x_panel">
|
||||
<form method="post" action="{{route('client.insert')}}" id="client_form" autocomplete="off"
|
||||
class="input-form-section">
|
||||
@csrf
|
||||
<div class="x_content">
|
||||
<div class="col-md-12">
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label for="firstname">First Name</label>
|
||||
<input class="form-control" name="first_name" type="text" placeholder=" First Name" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label for="Last Name">Last Name</label>
|
||||
<input class="form-control" name="last_name" type="text" placeholder=" Last Name">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label for="dob">Email</label>
|
||||
<input class="form-control" name="email"
|
||||
type="text" placeholder=" Email" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label for="dob">Password</label>
|
||||
<div class="input-group" id="manage_client_show_hide_password">
|
||||
<input class="form-control" name="password"
|
||||
type="password" placeholder=" Password">
|
||||
<div class="input-group-addon">
|
||||
<a href=""><i class="fa fa-eye-slash" aria-hidden="true"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label for="Phone">Phone</label>
|
||||
<input class="form-control" name="phone" type="text" placeholder=" Phone Number">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label for="Street Number">Street Number</label>
|
||||
<input class="form-control" name="street_no" type="text" placeholder=" street No">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label for="Street Name">Street Name</label>
|
||||
<input class="form-control" name="street_name" type="text" placeholder=" Street Name">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label for="City">City</label>
|
||||
<input class="form-control" name="city" type="text" placeholder=" City" >
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label for="State">State</label>
|
||||
<input class="form-control" name="state" type="text" placeholder=" State" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label for="zip_code">Zip</label>
|
||||
<input class="form-control" name="zip_code" type="text" placeholder=" Zip Code">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-xs-12" id="user_access_date_div">
|
||||
<div class="form-group">
|
||||
<label for="month">Free Access Date</label>
|
||||
<input class="form-control" name="user_access_date" id="user_access_date" type="text" placeholder="mm/dd/yyyy">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6 col-xs-12 text-left">
|
||||
<input class="form-check-input" type="checkbox" name="make_payment"
|
||||
value="1" id="make_payment">
|
||||
<label class="form-check-label" >
|
||||
Make Payment
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row d-none" id="card_info" >
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label for="dob">Date of Birth</label>
|
||||
<input class="form-control" name="birth_date" id="birth_date" type="text" maxlength="10" onkeyup="birthDateCompleted()" placeholder="mm/dd/yyyy" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label for="ssn">Social Security Number</label>
|
||||
<input class="form-control" name="ssn" maxlength="4"
|
||||
type="text" placeholder="last 4 digit of ssn">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label for="dob">Payment Date</label>
|
||||
<input class="form-control" name="payment_date" id="payment_date" type="text" maxlength="10" onkeyup="paymentDateCompleted()" placeholder="mm/dd/yyyy" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label for="">Source Type</label>
|
||||
@php
|
||||
$source_types = config('constant.sourceType');
|
||||
@endphp
|
||||
<select name="source_type" class="form-control">
|
||||
@foreach($source_types as $key=>$value)
|
||||
<option value="{{$value}}"> {{$key}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label for="card_number">Card Number</label>
|
||||
<input class="form-control" name="card_number" type="text" placeholder="e.g, 4111111111111111" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label for="expiry">Expiry</label>
|
||||
<input class="form-control" name="expiry" type="text" maxlength="5" onkeyup="expiryDateCompleted()" placeholder="e.g, DD/YY" >
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 c" style="margin-top: 10px; text-align: center; ">
|
||||
<input class="btn btn-success btn2" type="submit" onclick="return client_form_submit(this)" value="Save Changes">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="common_confirmation_modal" style="margin-top: 50px" tabindex="-1" aria-hidden="true">
|
||||
<div class="modal-dialog modal-md" id="modal-dialog-panel">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<h4 class="mb-2 text-center" style="color: red" id="common_message_text">
|
||||
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-footer" style="text-align: center">
|
||||
<button type="button" class="btn btn-secondary btn-lg" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('script')
|
||||
<script>
|
||||
|
||||
$(function(){
|
||||
common_helper.datePicker('#user_access_date','mm/dd/yyyy',false,new Date(new Date().setDate(new Date().getDate() + 1)),null);
|
||||
common_helper.datePicker('#birth_date','mm/dd/yyyy',true,null);
|
||||
common_helper.datePicker('#payment_date','mm/dd/yyyy',true,null);
|
||||
|
||||
});
|
||||
|
||||
$("#manage_client_show_hide_password a").on('click', function(event) {
|
||||
common_helper.globalPasswordView('#manage_client_show_hide_password',event);
|
||||
});
|
||||
|
||||
const birthDateCompleted=()=>{
|
||||
let birth_date=$("[name='birth_date']").val();
|
||||
if(birth_date.length===2){
|
||||
birth_date+='/';
|
||||
}
|
||||
else if(birth_date.length===5){
|
||||
birth_date+='/';
|
||||
}
|
||||
$("[name='birth_date']").val(birth_date);
|
||||
}
|
||||
|
||||
const expiryDateCompleted=()=>{
|
||||
let expiry_date=$("[name='expiry']").val();
|
||||
if(expiry_date.length===2){
|
||||
expiry_date+='/';
|
||||
}
|
||||
$("[name='expiry']").val(expiry_date);
|
||||
}
|
||||
|
||||
const paymentDateCompleted=()=>{
|
||||
let pay_date=$("[name='payment_date']").val();
|
||||
if(pay_date.length===2){
|
||||
pay_date+='/';
|
||||
}
|
||||
else if(pay_date.length===5){
|
||||
pay_date+='/';
|
||||
}
|
||||
$("[name='payment_date']").val(pay_date);
|
||||
}
|
||||
|
||||
const client_form_submit =(e)=>{
|
||||
|
||||
var data = $('#make_payment').prop("checked");
|
||||
|
||||
if(data) {
|
||||
$('#client_form').validate({
|
||||
rules: {
|
||||
'first_name': 'required',
|
||||
'last_name': 'required',
|
||||
'email' : 'required',
|
||||
'password' : 'required',
|
||||
'street_no' : 'required',
|
||||
'street_name' : 'required',
|
||||
'city' : 'required',
|
||||
'state' : 'required',
|
||||
'zip_code' : 'required',
|
||||
'phone' : 'required',
|
||||
'birth_date': 'required',
|
||||
'ssn' : 'required',
|
||||
'payment_date' : 'required',
|
||||
'source_type' : 'required',
|
||||
'card_number' : 'required',
|
||||
'expiry' : 'required',
|
||||
|
||||
},
|
||||
messages: {
|
||||
'first_name': {
|
||||
required: "Please enter first name"
|
||||
},
|
||||
'last_name': {
|
||||
required: "Please enter last name"
|
||||
}, 'email': {
|
||||
required: "Please enter email"
|
||||
}, 'password': {
|
||||
required: "Please enter password"
|
||||
},
|
||||
'street_no': {
|
||||
required: "Please enter street number"
|
||||
},
|
||||
'street_name': {
|
||||
required: "Please enter street name"
|
||||
},
|
||||
'state': {
|
||||
required: "Please enter state"
|
||||
},
|
||||
'city': {
|
||||
required: "Please enter city"
|
||||
},
|
||||
'zip_code': {
|
||||
required: "Please enter zip code"
|
||||
},
|
||||
'phone': {
|
||||
required: "Please enter phone number"
|
||||
},
|
||||
'birth_date': {
|
||||
required: "Please enter birth date",
|
||||
},
|
||||
'ssn': {
|
||||
required: "Please enter ssn"
|
||||
},
|
||||
'payment_date': {
|
||||
required: "Please enter Payment Date"
|
||||
},
|
||||
'source_type': {
|
||||
required: "Please enter source type"
|
||||
},
|
||||
'card_number' : {
|
||||
required: "Please enter valid card number"
|
||||
},
|
||||
'expiry' : {
|
||||
required: "Please enter expiry date"
|
||||
},
|
||||
|
||||
},
|
||||
highlight: function (element) {
|
||||
$(element).parent().addClass("has-error");
|
||||
},
|
||||
// submitHandler: function (form) {
|
||||
// form.submit();
|
||||
// }
|
||||
});
|
||||
if($('#client_form').valid()) {
|
||||
let url = '{{ route('admin.ajax.get.process') }}';
|
||||
let email = $('#client_form').find('input[name=email]').val();
|
||||
let password = $('[name="password"]').val();
|
||||
let source_type = $('[name="source_type"]').val();
|
||||
let ssn = $('[name="ssn"]').val();
|
||||
let data = {
|
||||
action: 'GET_SUBSCRIPTION_STATUS_CREDIT_REPORT_PROVIDER',
|
||||
email: email,
|
||||
password: password,
|
||||
source_type: source_type,
|
||||
ssn: ssn
|
||||
};
|
||||
common_helper.globalAjaxRequestAsync(url, 'get', data, callbackfromreportprovider);
|
||||
}
|
||||
return false;
|
||||
}else {
|
||||
$('#client_form').validate({
|
||||
rules: {
|
||||
'first_name': 'required',
|
||||
'last_name': 'required',
|
||||
'email' : 'required',
|
||||
'password' : 'required',
|
||||
'street_no' : 'required',
|
||||
'street_name' : 'required',
|
||||
'city' : 'required',
|
||||
'state' : 'required',
|
||||
'zip_code' : 'required',
|
||||
'phone' : 'required',
|
||||
'user_access_date' : 'required',
|
||||
},
|
||||
messages: {
|
||||
'first_name': {
|
||||
required: "Please enter first name"
|
||||
},
|
||||
'last_name': {
|
||||
required: "Please enter last name"
|
||||
}, 'email': {
|
||||
required: "Please enter email"
|
||||
}, 'password': {
|
||||
required: "Please enter password"
|
||||
},
|
||||
'street_no': {
|
||||
required: "Please enter street number"
|
||||
},
|
||||
'street_name': {
|
||||
required: "Please enter street name"
|
||||
},
|
||||
'state': {
|
||||
required: "Please enter state"
|
||||
},
|
||||
'city': {
|
||||
required: "Please enter city"
|
||||
},
|
||||
'zip_code': {
|
||||
required: "Please enter zip code"
|
||||
},
|
||||
'phone': {
|
||||
required: "Please enter phone number"
|
||||
},
|
||||
'user_access_date': {
|
||||
required: "Please enter last access date"
|
||||
},
|
||||
|
||||
},
|
||||
highlight: function (element) {
|
||||
$(element).parent().addClass("has-error");
|
||||
},
|
||||
submitHandler: function (form) {
|
||||
form.submit();
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const callbackfromreportprovider =(response)=>{
|
||||
|
||||
if(response.status) {
|
||||
$('#client_form').submit();
|
||||
}else {
|
||||
let html = response.message;
|
||||
$('#common_message_text').text(html);
|
||||
$('#common_confirmation_modal').modal('show');
|
||||
}
|
||||
}
|
||||
|
||||
$('#make_payment').change(function() {
|
||||
|
||||
if(this.checked) {
|
||||
$('#card_info').removeClass('d-none');
|
||||
$('#user_access_date_div').addClass('d-none');
|
||||
|
||||
}else {
|
||||
$('#card_info').addClass('d-none');
|
||||
$('#user_access_date_div').removeClass('d-none');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
@endpush
|
||||
117
resources/views/client/recurring_list.blade.php
Normal file
117
resources/views/client/recurring_list.blade.php
Normal file
@@ -0,0 +1,117 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12 col-xs-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h1>Client Recurring List</h1>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<form action="{{route('recurring.data') }}" method="post">
|
||||
@csrf
|
||||
<div class="col-md-3 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label>Client Name</label>
|
||||
<input id="clientName"
|
||||
type="text"
|
||||
class="form-control" name="clientName" autocomplete="off">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label>From Date</label>
|
||||
<input id="fdate"
|
||||
type="text"
|
||||
class="form-control " name="fdate" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label>To Date</label>
|
||||
<input id="tdate"
|
||||
type="text"
|
||||
class="form-control" name="tdate" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 col-xs-12">
|
||||
<div class="form-group" style="margin-top: 25px;">
|
||||
<button class="btn btn-outline-info" type="submit">Search</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<hr/>
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12 col-xs-12">
|
||||
<div class="x_panel">
|
||||
<div class="x_content">
|
||||
<table id="datatable-responsive" class="table table-striped table-hover table-responsive dt-responsive nowrap" cellspacing="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Client Id</th>
|
||||
<th>Client Name</th>
|
||||
<th>Email</th>
|
||||
<th>Subscription Id</th>
|
||||
<th>Transaction Status</th>
|
||||
<th>Transaction Id</th>
|
||||
<th>Plan Amount</th>
|
||||
<th>Month Frequency</th>
|
||||
<th>Day Of Month</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if(!empty($recurringInfo))
|
||||
@foreach ($recurringInfo as $key => $obj)
|
||||
@php
|
||||
if(($obj->transaction_status==config('constant.API_SUCCESS_CODE')))
|
||||
{
|
||||
$label='Success';
|
||||
}
|
||||
else{
|
||||
$label='Fail';
|
||||
}
|
||||
@endphp
|
||||
<tr class="tr-height">
|
||||
<td>{{$obj->user_id}}</td>
|
||||
<td>{{$obj->name}}</td>
|
||||
<td>{{ $obj->email}}</td>
|
||||
<td>{{ $obj->subscription_id }}</td>
|
||||
<td>{{ $label }}</td>
|
||||
<td>{{ $obj->transaction_id}}</td>
|
||||
<td>{{ $obj->plan_amount }}</td>
|
||||
<td>{{ $obj->month_frequency}}</td>
|
||||
<td>{{ $obj->day_of_month }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
<div id="pagination_panel">
|
||||
{{ $recurringInfo->links('basic.pagination') }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
@push('script')
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#fdate,#tdate').val(common_helper.formatDate());
|
||||
})
|
||||
common_helper.datePicker('#fdate');
|
||||
common_helper.datePicker('#tdate');
|
||||
</script>
|
||||
@endpush
|
||||
504
resources/views/client/view.blade.php
Normal file
504
resources/views/client/view.blade.php
Normal file
@@ -0,0 +1,504 @@
|
||||
@extends('layouts.admin')
|
||||
@section('content')
|
||||
<style>
|
||||
.d-none{
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
@php
|
||||
$user_access_end_date = '';
|
||||
if(!empty($user['data']['user_access_end_date'])){
|
||||
$user_access_end_date = getStringToDate($user['data']['user_access_end_date'],'m/d/Y');
|
||||
}
|
||||
|
||||
$inputData['subscription_status'] = $user['data']['subscription_status'];
|
||||
$inputData['status'] = $user['data']['status'];
|
||||
$inputData['is_import'] = $user['data']['is_import'];
|
||||
$waves = clientWaves(config('constant.MAX_WAVE'));
|
||||
@endphp
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 column col-sm-offset-0 ">
|
||||
<div class="panel panel-default panel-frm">
|
||||
<div class="panel-heading">
|
||||
<div class="row" style="padding-left: 20px;padding-right: 15px">
|
||||
<h3 class="pull-left">Account Info Of {{$user['data']['first_name'].' '.$user['data']['last_name']}}
|
||||
|
||||
</h3>
|
||||
|
||||
<form method="post" action="{{route('update.client.id')}}"
|
||||
autocomplete="off"
|
||||
class="input-form-section" id="client_activate_form">
|
||||
@csrf
|
||||
<input type="hidden" name="client_id" value="{{$user['data']['id']}}">
|
||||
|
||||
@if(getEnableImportReset($inputData))
|
||||
|
||||
<div class="pull-right">
|
||||
@if($user['data']['is_free'] == 1 )<label style="color: red">Free Member</label> @endif
|
||||
<input type="hidden" name="type" value="2">
|
||||
<input class="btn btn-success btn2" type="submit" onclick="return client_activate(this)" value="Reset Credit Report">
|
||||
</div>
|
||||
@endif
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="clearfix"></div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12 col-xs-12">
|
||||
<div class="x_panel">
|
||||
<form method="post" action="{{route('update.client')}}" id="client_form"
|
||||
autocomplete="off"
|
||||
class="input-form-section">
|
||||
@csrf
|
||||
<input type="hidden" name="id" value="{{$user['data']['id']}}">
|
||||
<input type="hidden" name="previous_email" value="{{$user['data']['email']}}">
|
||||
<div class="x_content">
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label for="firstname">First Name</label>
|
||||
<input class="form-control" name="first_name" type="text"
|
||||
value="{{$user['data']['first_name']}}" id="firstname">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label for="Last Name">Last Name</label>
|
||||
<input class="form-control" name="last_name" type="text"
|
||||
value="{{$user['data']['last_name']}}" id="lastname">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label for="Phone">Phone</label>
|
||||
<input class="form-control" name="phone" type="text"
|
||||
value="{{$user['data']['phone']}}" id="phone">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label for="Street Number">Street Number</label>
|
||||
<input class="form-control" name="street_no" type="text"
|
||||
value="{{$user['data']['street_no']}}" id="street_no">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label for="Street Name">Street Name</label>
|
||||
<input class="form-control" name="street_name" type="text"
|
||||
value="{{$user['data']['street_name']}}"
|
||||
id="street_name">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label for="City">City</label>
|
||||
<input class="form-control" name="city" type="text"
|
||||
value="{{$user['data']['city']}}" id="city">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label for="State">State</label>
|
||||
<input class="form-control" name="state" type="text"
|
||||
value="{{$user['data']['state']}}" id="state">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label for="zip">Zip</label>
|
||||
<input class="form-control" name="zip_code" type="text"
|
||||
value="{{$user['data']['zip_code']}}" id="zip_code">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label for="email">Email</label>
|
||||
<input class="form-control" name="email"
|
||||
type="text"
|
||||
value="{{$user['data']['email']}}" id="email">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label for="password">Password</label>
|
||||
<div class="input-group" id="client_show_hide_password">
|
||||
<input class="form-control" name="password"
|
||||
type="password"
|
||||
value="{{customDecrypt($user['data']['password'])}}"
|
||||
id="password">
|
||||
<div class="input-group-addon">
|
||||
<a href=""><i class="fa fa-eye-slash"
|
||||
aria-hidden="true"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label for="Status">Status</label>
|
||||
|
||||
<select name="status" class="form-control">
|
||||
|
||||
<option
|
||||
value="1" {{ $user['data']['status'] == 1 ? 'selected' : '' }}>
|
||||
Active
|
||||
</option>
|
||||
<option
|
||||
value="2" {{ $user['data']['status'] == 2 ? 'selected' : '' }}>
|
||||
Inactive
|
||||
</option>
|
||||
<option
|
||||
value="2" {{ $user['data']['subscription_status'] == 2 ? 'selected' : '' }}>
|
||||
Canceled
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label for="month">Last Access Date</label>
|
||||
<input class="form-control" name="user_access_end_date" disabled value="{{$user['data']['user_access_end_date']}}" type="text" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-xs-12" id="user_access_date_div">
|
||||
<div class="form-group">
|
||||
<label for="month">Free Access Date</label>
|
||||
<input class="form-control" name="user_access_date" readonly id="user_access_end_date" type="text" value="{{$user_access_end_date}}" placeholder="mm/dd/yyyy">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-xs-12">
|
||||
<div class="form-group">
|
||||
<div class="form-group col-md-6 col-xs-12 text-left" >
|
||||
<input class="form-check-input" type="checkbox" name="change_wave"
|
||||
value="1" id="change_wave">
|
||||
<label class="form-check-label" data-toggle="tooltip" data-placement="right" title="">
|
||||
Unlock Wave
|
||||
</label>
|
||||
</div>
|
||||
<select name="wave" class="form-control" id="wave">
|
||||
@foreach($waves as $key => $value)
|
||||
@php $select = ($value['key'] == $user['data']['wave']) ? 'selected': ''; @endphp
|
||||
<option value="{{$value['key']}}" {{$select}}> {{$value['text']}} </option>
|
||||
@endforeach
|
||||
|
||||
</select>
|
||||
{{-- <input class="form-control" name="wave" type="text" value="{{$user['data']['wave']}}" >--}}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6 col-xs-12 text-left" >
|
||||
<input class="form-check-input" type="checkbox" name="report_provider_info"
|
||||
value="1" id="report_provider_info">
|
||||
<label class="form-check-label" data-toggle="tooltip" data-placement="right" title="">
|
||||
Credit Report Provider Information
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="credit_report_info">
|
||||
<div class="col-md-12">
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label for="birth_date">Date of Birth</label>
|
||||
<input class="form-control" name="birth_date" id="birth_date" type="text"
|
||||
value="{{$user['data']['birth_date']}}" placeholder="mm/dd/yyyy">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label for="ssn">Social Security Number</label>
|
||||
<input class="form-control" name="ssn"
|
||||
type="text" maxlength="4"
|
||||
value="{{$user['data']['ssn']}}"
|
||||
id="ssn">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label for="">Source Type</label>
|
||||
@php
|
||||
$source_types = config('constant.sourceType');
|
||||
@endphp
|
||||
<select name="source_type" class="form-control">
|
||||
@foreach($source_types as $key=>$value)
|
||||
<option value="{{$value}}" {{$user['data']['credit_report_company_type'] == $value ? 'selected':''}}> {{$key}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if(isSupport())
|
||||
<div class="col-md-6 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label for="month">Previous Import Date</label>
|
||||
<input class="form-control" name="last_import_date" readonly id="last_import_date" type="text" value="{{$user['data']['last_import_date']}}" placeholder="mm/dd/yyyy">
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
@if(isShowContent('update.client'))
|
||||
<div class="col-sm-12 center" style="margin-top: 10px; text-align: center; ">
|
||||
<input class="btn btn-success btn2" type="submit" onclick="return client_form_submit(this)" value="Save Changes">
|
||||
</div>
|
||||
@endif
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="common_confirmation_modal" style="margin-top: 50px" tabindex="-1" aria-hidden="true">
|
||||
<div class="modal-dialog modal-md" id="modal-dialog-panel">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<h4 class="mb-2 text-center" style="color: red" id="common_message_text">
|
||||
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-footer" style="text-align: center">
|
||||
<button type="button" class="btn btn-secondary btn-lg" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@push('script')
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
common_helper.datePicker('#user_access_end_date','mm/dd/yyyy',false,new Date(new Date().setDate(new Date().getDate() + 1)),null);
|
||||
common_helper.datePicker('#birth_date','mm/dd/yyyy',true,null);
|
||||
common_helper.datePicker('#last_import_date','mm/dd/yyyy',true,null);
|
||||
$('#wave').prop('disabled', true);
|
||||
|
||||
});
|
||||
|
||||
const client_form_submit =(e)=>{
|
||||
var data = $('#report_provider_info').prop("checked");
|
||||
|
||||
if(data) {
|
||||
$('#client_form').validate({
|
||||
|
||||
rules: {
|
||||
'first_name': 'required',
|
||||
'last_name': 'required',
|
||||
'email': 'required',
|
||||
'password': 'required',
|
||||
'birth_date': 'required',
|
||||
'street_no': 'required',
|
||||
'street_name': 'required',
|
||||
'city': 'required',
|
||||
'state': 'required',
|
||||
'zip_code': 'required',
|
||||
'phone': 'required',
|
||||
'ssn': {'required': true,'minlength':4,'maxlength':4},
|
||||
'source_type': 'required',
|
||||
},
|
||||
|
||||
messages: {
|
||||
'first_name': {
|
||||
required: "Please enter first name"
|
||||
},
|
||||
'last_name': {
|
||||
required: "Please enter last name"
|
||||
}, 'email': {
|
||||
required: "Please enter email"
|
||||
}, 'password': {
|
||||
required: "Please enter password"
|
||||
},
|
||||
'birth_date': {
|
||||
required: "Please enter birth date",
|
||||
},
|
||||
'street_no': {
|
||||
required: "Please enter street number"
|
||||
},
|
||||
'street_name': {
|
||||
required: "Please enter street name"
|
||||
},
|
||||
'state': {
|
||||
required: "Please enter state"
|
||||
},
|
||||
'city': {
|
||||
required: "Please enter city"
|
||||
},
|
||||
'zip_code': {
|
||||
required: "Please enter zip code"
|
||||
},
|
||||
'phone': {
|
||||
required: "Please enter phone number"
|
||||
},
|
||||
'ssn': {
|
||||
required: "Please enter last 4 digit of your ssn",
|
||||
minlength:"Please enter last 4 digit of your ssn",
|
||||
maxlength:"Please enter last 4 digit of your ssn"
|
||||
},
|
||||
'source_type': {
|
||||
required: "Please enter source type"
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
highlight: function (element) {
|
||||
$(element).parent().addClass("has-error");
|
||||
},
|
||||
|
||||
});
|
||||
if ($('#client_form').valid()) {
|
||||
let url = '{{ route('admin.ajax.get.process') }}';
|
||||
let previous_email = $('[name="previous_email"]').val();
|
||||
let email = $('#client_form').find('input[name=email]').val();
|
||||
let password = $('[name="password"]').val();
|
||||
let source_type = $('[name="source_type"]').val();
|
||||
let ssn = $('[name="ssn"]').val();
|
||||
let data = {
|
||||
action: 'GET_SUBSCRIPTION_STATUS_CREDIT_REPORT_PROVIDER',
|
||||
email: email,
|
||||
password: password,
|
||||
previous_email: previous_email,
|
||||
source_type: source_type,
|
||||
ssn: ssn
|
||||
};
|
||||
common_helper.globalAjaxRequestAsync(url, 'get', data, callbackfromreportprovider);
|
||||
}
|
||||
return false;
|
||||
}else {
|
||||
$('#client_form').validate({
|
||||
|
||||
rules: {
|
||||
'first_name': 'required',
|
||||
'last_name': 'required',
|
||||
'email': 'required',
|
||||
'password': 'required',
|
||||
'street_no': 'required',
|
||||
'street_name': 'required',
|
||||
'city': 'required',
|
||||
'state': 'required',
|
||||
'zip_code': 'required',
|
||||
'phone': 'required'
|
||||
},
|
||||
|
||||
messages: {
|
||||
'first_name': {
|
||||
required: "Please enter first name"
|
||||
},
|
||||
'last_name': {
|
||||
required: "Please enter last name"
|
||||
}, 'email': {
|
||||
required: "Please enter email"
|
||||
}, 'password': {
|
||||
required: "Please enter password"
|
||||
},
|
||||
'street_no': {
|
||||
required: "Please enter street number"
|
||||
},
|
||||
'street_name': {
|
||||
required: "Please enter street name"
|
||||
},
|
||||
'state': {
|
||||
required: "Please enter state"
|
||||
},
|
||||
'city': {
|
||||
required: "Please enter city"
|
||||
},
|
||||
'zip_code': {
|
||||
required: "Please enter zip code"
|
||||
},
|
||||
'phone': {
|
||||
required: "Please enter phone number"
|
||||
},
|
||||
},
|
||||
|
||||
highlight: function (element) {
|
||||
$(element).parent().addClass("has-error");
|
||||
},
|
||||
submitHandler: function (form) {
|
||||
form.submit();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const callbackfromreportprovider =(response)=>{
|
||||
|
||||
if(response.status) {
|
||||
$('#client_form').submit();
|
||||
}else {
|
||||
let html = response.message;
|
||||
$('#common_message_text').text(html);
|
||||
$('#common_confirmation_modal').modal('show');
|
||||
}
|
||||
}
|
||||
|
||||
$("#client_show_hide_password a").on('click', function (event) {
|
||||
common_helper.globalPasswordView('#client_show_hide_password', event);
|
||||
})
|
||||
|
||||
const client_activate =(e) => {
|
||||
|
||||
let type = $('#client_activate_form').find('input[name=type]').val();
|
||||
|
||||
let html_content = `<h4>Are you sure you want to activate client?</h4>`;
|
||||
|
||||
if(type === '2'){
|
||||
html_content = `<h4>Are you sure you want to reset credit report?</h4>`;
|
||||
}
|
||||
|
||||
const swalresponse = common_helper.swalAleart(html_content, 'warning', 450, true, '', true, true, 'Yes');
|
||||
|
||||
swalresponse.then(function (result) {
|
||||
|
||||
if (result.isConfirmed) {
|
||||
$('#client_activate_form').submit();
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
$("#change_wave").on('click', function (event) {
|
||||
|
||||
$('#wave').prop('disabled', !this.checked);
|
||||
})
|
||||
|
||||
</script>
|
||||
@endpush
|
||||
Reference in New Issue
Block a user