api code global jain
This commit is contained in:
203
resources/views/backend/sant/create.blade.php
Normal file
203
resources/views/backend/sant/create.blade.php
Normal file
@@ -0,0 +1,203 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('title',__('label.create_sant_page_title').' | '.env('APP_NAME'))
|
||||
|
||||
@push('after-styles')
|
||||
@endpush
|
||||
|
||||
@section('breadcrumb')
|
||||
<div class="subheader py-2 py-lg-4 subheader-solid" id="kt_subheader">
|
||||
<div class="container-fluid d-flex align-items-center justify-content-between flex-wrap flex-sm-nowrap">
|
||||
<!--begin::Info-->
|
||||
<div class="d-flex align-items-center flex-wrap mr-1">
|
||||
<!--begin::Page Heading-->
|
||||
<div class="d-flex align-items-baseline mr-5">
|
||||
<!--begin::Page Title-->
|
||||
<!--end::Page Title-->
|
||||
<!--begin::Breadcrumb-->
|
||||
<ul class="breadcrumb breadcrumb-transparent breadcrumb-dot font-weight-bold p-0 my-2 font-size-sm">
|
||||
<li class="breadcrumb-item active">
|
||||
<a href="{{ route('admin.dashboard') }}" class="text-muted">{{ __('breadcrumb.dashboard') }}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active">
|
||||
<a href="{{ route('admin.sant.index') }}" class="text-muted">{{ __('breadcrumb.sants') }}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item">
|
||||
{{ __('breadcrumb.add_sant') }}
|
||||
</li>
|
||||
</ul>
|
||||
<!--end::Breadcrumb-->
|
||||
</div>
|
||||
<!--end::Page Heading-->
|
||||
</div>
|
||||
<!--end::Info-->
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="card card-custom">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">
|
||||
{{ __('label.create_sant_form_title') }}
|
||||
</h3>
|
||||
<div class="card-toolbar">
|
||||
<div class="example-tools justify-content-center">
|
||||
<span class="example-toggle" data-toggle="tooltip" title="View code"></span>
|
||||
<span class="example-copy" data-toggle="tooltip" title="Copy code"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--begin::Form-->
|
||||
{{ Form::open(['route' => 'admin.sant.store','id' => 'createSantForm', 'files' => true]) }}
|
||||
@include('backend.sant.partials._form')
|
||||
{{ Form::close() }}
|
||||
|
||||
<!--end::Form-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('after-scripts')
|
||||
@component('backend.layouts.components.validation')@endcomponent
|
||||
<script>
|
||||
var dharma_id = false;
|
||||
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': "{{ csrf_token() }}"
|
||||
}
|
||||
});
|
||||
|
||||
function getSampraday() {
|
||||
$.ajax({
|
||||
url: "{{ route('admin.dharma.sampradaies') }}",
|
||||
type: "POST",
|
||||
data: {
|
||||
'dharma_id': $('#dharma').val(),
|
||||
},
|
||||
success: function (data) {
|
||||
$('#sampradaies').empty();
|
||||
console.log(data);
|
||||
// var emptyOption = new Option('Select the sampraday name', '', false, false);
|
||||
// $('#sampradaies').append(emptyOption);
|
||||
$.each(data.sampradaies, function (index, sampraday) {
|
||||
console.log(sampraday);
|
||||
if (dharma_id == sampraday.id) {
|
||||
var newOption = new Option(sampraday.name, sampraday.id, true, true);
|
||||
} else {
|
||||
var newOption = new Option(sampraday.name, sampraday.id, false, false);
|
||||
}
|
||||
$('#sampradaies').append(newOption);
|
||||
});
|
||||
$('#sampradaies').selectpicker('refresh');
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
var input = document.getElementById('honor'),
|
||||
// init Tagify script on the above inputs
|
||||
tagify = new Tagify(input, {
|
||||
whitelist: '',
|
||||
duplicates :true
|
||||
})
|
||||
|
||||
// "remove all honors" button event listener
|
||||
document.getElementById('honor_remove').addEventListener('click', tagify.removeAllTags.bind(tagify));
|
||||
|
||||
// Chainable event listeners
|
||||
tagify.on('add', onAddTag)
|
||||
|
||||
// tag added callback
|
||||
function onAddTag(e) {
|
||||
tagify.off('add', onAddTag) // exmaple of removing a custom Tagify event
|
||||
}
|
||||
|
||||
$('.datepicker').datepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
});
|
||||
|
||||
$(document).ready(function () {
|
||||
$(document).on('change', '#dharma', function (e) {
|
||||
getSampraday();
|
||||
});
|
||||
$("#createSantForm").validate({
|
||||
errorClass: 'is-invalid',
|
||||
normalizer: function(value) {
|
||||
return $.trim(value);
|
||||
},
|
||||
rules: {
|
||||
name: {
|
||||
required: true,
|
||||
}
|
||||
},
|
||||
onfocusout: function(element) {
|
||||
// "eager" validation
|
||||
// this.element(element);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var maxFileLimit = 5 * 1000000;
|
||||
$(document).on('change', '.avatar-image', function () {
|
||||
viewAvatarImage(this);
|
||||
$('.is_remove_avatar_image').val(1);
|
||||
});
|
||||
function viewAvatarImage(input) {
|
||||
if (input.files && input.files[0]) {
|
||||
var file = input.files[0];
|
||||
if (file.size < maxFileLimit) {
|
||||
var fileType = file["type"];
|
||||
var validImageTypes = ["image/jpg", "image/jpeg", "image/png"];
|
||||
if ($.inArray(fileType, validImageTypes) > 0) {
|
||||
// invalid file type code goes here.
|
||||
var reader = new FileReader();
|
||||
reader.onload = function (e) {
|
||||
$('.avatar-image-preview').attr('src', e.target.result);
|
||||
$('.avatar-image-preview-div').css('display', 'flex');
|
||||
}
|
||||
reader.readAsDataURL(input.files[0]);
|
||||
} else {
|
||||
$('.avatar-image').val('');
|
||||
$('#avatar-custom-file-label').text('{{ __("label.choose_image") }}');
|
||||
toastr.error('{{ __("label.image_type") }}');
|
||||
}
|
||||
} else {
|
||||
$('.avatar-image').val('');
|
||||
$('#avatar-custom-file-label').text('{{ __("label.choose_image") }}');
|
||||
toastr.error('{{ __("label.max_image_size") }}');
|
||||
}
|
||||
}
|
||||
}
|
||||
$(document).on('click', '.avatar-image-remove-button', function () {
|
||||
$('.is_remove_avatar_image').val(1);
|
||||
$('.avatar-image').val('');
|
||||
$('.avatar-image-preview-div').css('display', 'none');
|
||||
$('#avatar-custom-file-label').text('{{ __("label.choose_image") }}');
|
||||
});
|
||||
</script>
|
||||
|
||||
{{-- Google Map script --}}
|
||||
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAoZv-67UKDVz5Rp3fa3e2xcHunahFGKOc&libraries=places&callback=dummy"></script>
|
||||
<script>
|
||||
google.maps.event.addDomListener(window, 'load', initialize);
|
||||
function initialize() {
|
||||
var input = document.getElementById('diksha_place');
|
||||
var autocomplete = new google.maps.places.Autocomplete(input);
|
||||
autocomplete.addListener('place_changed', function () {
|
||||
var place = autocomplete.getPlace();
|
||||
$('#latitude_show').val(place.geometry['location'].lat());
|
||||
$('#longitude_show').val(place.geometry['location'].lng());
|
||||
$('#diksha_place_latitude').val(place.geometry['location'].lat());
|
||||
$('#diksha_place_longitude').val(place.geometry['location'].lng());
|
||||
$("#latitudeArea").removeAttr('hidden');
|
||||
$("#longtitudeArea").removeAttr('hidden');
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
219
resources/views/backend/sant/edit.blade.php
Normal file
219
resources/views/backend/sant/edit.blade.php
Normal file
@@ -0,0 +1,219 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('title',__('label.update_sant_page_title').' | '.env('APP_NAME'))
|
||||
|
||||
@push('after-styles')
|
||||
@endpush
|
||||
|
||||
@section('breadcrumb')
|
||||
<div class="subheader py-2 py-lg-4 subheader-solid" id="kt_subheader">
|
||||
<div class="container-fluid d-flex align-items-center justify-content-between flex-wrap flex-sm-nowrap">
|
||||
<!--begin::Info-->
|
||||
<div class="d-flex align-items-center flex-wrap mr-1">
|
||||
<!--begin::Page Heading-->
|
||||
<div class="d-flex align-items-baseline mr-5">
|
||||
<!--begin::Page Title-->
|
||||
<!--end::Page Title-->
|
||||
<!--begin::Breadcrumb-->
|
||||
<ul class="breadcrumb breadcrumb-transparent breadcrumb-dot font-weight-bold p-0 my-2 font-size-sm">
|
||||
<li class="breadcrumb-item active">
|
||||
<a href="{{ route('admin.dashboard') }}" class="text-muted">{{ __('breadcrumb.dashboard') }}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active">
|
||||
<a href="{{ route('admin.sant.index') }}" class="text-muted">{{ __('breadcrumb.sants') }}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item">
|
||||
{{ __('breadcrumb.edit_sant') }}
|
||||
</li>
|
||||
</ul>
|
||||
<!--end::Breadcrumb-->
|
||||
</div>
|
||||
<!--end::Page Heading-->
|
||||
</div>
|
||||
<!--end::Info-->
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="card card-custom">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">
|
||||
{{ __('label.update_sant_form_title') }}
|
||||
</h3>
|
||||
<div class="card-toolbar">
|
||||
<div class="example-tools justify-content-center">
|
||||
<span class="example-toggle" data-toggle="tooltip" title="View code"></span>
|
||||
<span class="example-copy" data-toggle="tooltip" title="Copy code"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--begin::Form-->
|
||||
{{ Form::model($sant,['route' => ['admin.sant.update', $sant->id],'method' => 'PATCH','id' => 'updateSantForm', 'files' => true]) }}
|
||||
@include('backend.sant.partials._form')
|
||||
{{ Form::close() }}
|
||||
<!--end::Form-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('after-scripts')
|
||||
@component('backend.layouts.components.validation')@endcomponent
|
||||
<script>
|
||||
var dharma_id = "{{ isset($sant) ? $sant->sampraday_id : false}}";
|
||||
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': "{{ csrf_token() }}"
|
||||
}
|
||||
});
|
||||
|
||||
function getSampraday() {
|
||||
$.ajax({
|
||||
url: "{{ route('admin.dharma.sampradaies') }}",
|
||||
type: "POST",
|
||||
data: {
|
||||
'dharma_id': $('#dharma').val(),
|
||||
},
|
||||
success: function (data) {
|
||||
$('#sampradaies').empty();
|
||||
console.log(data);
|
||||
// var emptyOption = new Option('Select the sampraday name', '', false, false);
|
||||
// $('#sampradaies').append(emptyOption);
|
||||
$.each(data.sampradaies, function (index, sampraday) {
|
||||
console.log(sampraday);
|
||||
if (dharma_id == sampraday.id) {
|
||||
var newOption = new Option(sampraday.name, sampraday.id, true, true);
|
||||
} else {
|
||||
var newOption = new Option(sampraday.name, sampraday.id, false, false);
|
||||
}
|
||||
$('#sampradaies').append(newOption);
|
||||
});
|
||||
$('#sampradaies').selectpicker('refresh');
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
var input = document.getElementById('honor'),
|
||||
// init Tagify script on the above inputs
|
||||
tagify = new Tagify(input, {
|
||||
whitelist: {!! collect($sant->honor) !!},
|
||||
duplicates :true
|
||||
})
|
||||
|
||||
// "remove all honors" button event listener
|
||||
document.getElementById('honor_remove').addEventListener('click', tagify.removeAllTags.bind(tagify));
|
||||
|
||||
// Chainable event listeners
|
||||
tagify.on('add', onAddTag)
|
||||
|
||||
// tag added callback
|
||||
function onAddTag(e) {
|
||||
tagify.off('add', onAddTag) // exmaple of removing a custom Tagify event
|
||||
}
|
||||
|
||||
$('.datepicker').datepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
});
|
||||
|
||||
if (dharma_id > 0) {
|
||||
getSampraday();
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
$(document).on('change', '#dharma', function (e) {
|
||||
getSampraday();
|
||||
});
|
||||
|
||||
$(document).on('change', '#dharmaCheckbox', function (e) {
|
||||
var isChecked = $('#dharmaCheckbox').is(":checked");
|
||||
if (isChecked) {
|
||||
$('#sampradayCheckbox').prop('checked', true);
|
||||
} else {
|
||||
$('#sampradayCheckbox').prop('checked', false);
|
||||
}
|
||||
});
|
||||
|
||||
$("#updateSantForm").validate({
|
||||
errorClass: 'is-invalid',
|
||||
normalizer: function(value) {
|
||||
return $.trim(value);
|
||||
},
|
||||
rules: {
|
||||
name: {
|
||||
required: true,
|
||||
}
|
||||
},
|
||||
onfocusout: function(element) {
|
||||
// "eager" validation
|
||||
// this.element(element);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var maxFileLimit = 5 * 1000000;
|
||||
$(document).on('change', '.avatar-image', function () {
|
||||
viewAvatarImage(this);
|
||||
$('.is_remove_avatar_image').val(1);
|
||||
});
|
||||
function viewAvatarImage(input) {
|
||||
if (input.files && input.files[0]) {
|
||||
var file = input.files[0];
|
||||
if (file.size < maxFileLimit) {
|
||||
var fileType = file["type"];
|
||||
var validImageTypes = ["image/jpg", "image/jpeg", "image/png"];
|
||||
if ($.inArray(fileType, validImageTypes) > 0) {
|
||||
// invalid file type code goes here.
|
||||
var reader = new FileReader();
|
||||
reader.onload = function (e) {
|
||||
$('.avatar-image-preview').attr('src', e.target.result);
|
||||
$('.avatar-image-preview-div').css('display', 'flex');
|
||||
}
|
||||
reader.readAsDataURL(input.files[0]);
|
||||
} else {
|
||||
$('.avatar-image').val('');
|
||||
$('#avatar-custom-file-label').text('{{ __("label.choose_image") }}');
|
||||
toastr.error('{{ __("label.image_type") }}');
|
||||
}
|
||||
} else {
|
||||
$('.avatar-image').val('');
|
||||
$('#avatar-custom-file-label').text('{{ __("label.choose_image") }}');
|
||||
toastr.error('{{ __("label.max_image_size") }}');
|
||||
}
|
||||
}
|
||||
}
|
||||
$(document).on('click', '#avatar-image-remove-button', function () {
|
||||
$('.is_remove_avatar_image').val(1);
|
||||
$('.avatar-image').val('');
|
||||
$('.avatar-image-preview-div').css('display', 'none');
|
||||
$('#avatar-custom-file-label').text('{{ __("label.choose_image") }}');
|
||||
});
|
||||
|
||||
</script>
|
||||
<script src="{{ asset('public/js/pages/crud/forms/widgets/bootstrap-switch.js?v=7.2.8') }}"></script>
|
||||
|
||||
{{-- Google Map script --}}
|
||||
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAoZv-67UKDVz5Rp3fa3e2xcHunahFGKOc&libraries=places&callback=dummy"></script>
|
||||
<script>
|
||||
google.maps.event.addDomListener(window, 'load', initialize);
|
||||
function initialize() {
|
||||
var input = document.getElementById('diksha_place');
|
||||
var autocomplete = new google.maps.places.Autocomplete(input);
|
||||
autocomplete.addListener('place_changed', function () {
|
||||
var place = autocomplete.getPlace();
|
||||
$('#latitude_show').val(place.geometry['location'].lat());
|
||||
$('#longitude_show').val(place.geometry['location'].lng());
|
||||
$('#diksha_place_latitude').val(place.geometry['location'].lat());
|
||||
$('#diksha_place_longitude').val(place.geometry['location'].lng());
|
||||
$("#latitudeArea").removeAttr('hidden');
|
||||
$("#longtitudeArea").removeAttr('hidden');
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
394
resources/views/backend/sant/list.blade.php
Normal file
394
resources/views/backend/sant/list.blade.php
Normal file
@@ -0,0 +1,394 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('title',__('label.listing_sant_page_title').' | '.env('APP_NAME'))
|
||||
|
||||
@push('after-styles')
|
||||
<!-- DataTables -->
|
||||
<link href="{{ asset('public/js/datatable/dataTables.bootstrap4.min.css') }}" rel="stylesheet" type="text/css"/>
|
||||
@endpush
|
||||
|
||||
@section('breadcrumb')
|
||||
<div class="subheader py-2 py-lg-4 subheader-solid" id="kt_subheader">
|
||||
<div class="container-fluid d-flex align-items-center justify-content-between flex-wrap flex-sm-nowrap">
|
||||
<!--begin::Info-->
|
||||
<div class="d-flex align-items-center flex-wrap mr-1">
|
||||
<!--begin::Page Heading-->
|
||||
<div class="d-flex align-items-baseline mr-5">
|
||||
<!--begin::Page Title-->
|
||||
<!--end::Page Title-->
|
||||
<!--begin::Breadcrumb-->
|
||||
<ul class="breadcrumb breadcrumb-transparent breadcrumb-dot font-weight-bold p-0 my-2 font-size-sm">
|
||||
<li class="breadcrumb-item active">
|
||||
<a href="{{ route('admin.dashboard') }}" class="text-muted">{{ __('breadcrumb.dashboard') }}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item">
|
||||
{{ __('breadcrumb.sants') }}
|
||||
</li>
|
||||
</ul>
|
||||
<!--end::Breadcrumb-->
|
||||
</div>
|
||||
<!--end::Page Heading-->
|
||||
</div>
|
||||
<!--end::Info-->
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-12">
|
||||
<div class="card card-custom">
|
||||
<div class="card-header flex-wrap border-0 pt-6 pb-0">
|
||||
<div class="card-title">
|
||||
<h3>{{ __('label.listing_sant_table_title') }}</h3>
|
||||
</div>
|
||||
|
||||
<div class="card-toolbar">
|
||||
<!-- begin::Button -->
|
||||
<form id="import" action="{{route('admin.sant.import-sant')}}" method="POST" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<input type="file" id="file" class="file-input" name="file" accept=".xlsx, .csv, .xls" data-original-title="import" required>
|
||||
<button class="btn btn-success font-weight-bolder mr-2" type="submit">
|
||||
<i class="fas fa-upload fa-sm"></i> {{ __('buttons.import') }}
|
||||
</button>
|
||||
</form>
|
||||
<!--end::Button-->
|
||||
<!-- begin::Button -->
|
||||
<a href="{{ route('admin.sant.create') }}" class="btn btn-primary font-weight-bolder">
|
||||
<i class="fas fa-plus fa-sm"></i> {{ __('buttons.create_sant') }}
|
||||
</a>
|
||||
<!--end::Button-->
|
||||
</div>
|
||||
</div>
|
||||
<div style="text-align: right; margin-right:25px;">
|
||||
<a href="{{ asset('assets/sample_sant.xlsx') }}" class="btn btn-sm btn-secondary font-weight-bolder">
|
||||
<i class="fas fa-download fa-sm"></i> Download Sample File
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="mb-7">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-lg-12 col-xl-12">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-md-3 my-2 my-md-0">
|
||||
<div class="d-flex align-items-center">
|
||||
{{ Form::text('name',null,['class' => 'form-control selectpicker datatable-input change-action','id' => 'title','placeholder' => __('label.search')]) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2 my-2 my-md-0">
|
||||
<div class="d-flex align-items-center">
|
||||
{{ Form::select('status',['2' => 'Active','1' => 'Inactive'],null,['class' => 'form-control selectpicker datatable-input change-action','id' => 'status', 'data-live-search' => 'true','data-allow-clear' => 'true', 'title' => __('placeholder.select_status')]) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2 my-2 my-md-0">
|
||||
<div class="d-flex align-items-center">
|
||||
{{ Form::select('verification_status',['1' => 'Approved', '2' => 'In-Review', '3' => 'Sent Back', '4' => 'Approved & In-Review', '5' => 'Approved & Sent back', '6' => 'Rejected'],null,['class' => 'form-control selectpicker datatable-input change-action','id' => 'status', 'data-live-search' => 'true','data-allow-clear' => 'true', 'title' => __('placeholder.select_verification_status')]) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2 my-2 my-md-0">
|
||||
<div class="d-flex align-items-center">
|
||||
{{ Form::select('dharma_id', $dharmas, null, ['class' => 'form-control selectpicker datatable-input change-action','id' => 'dharma_id', 'data-live-search' => 'true','data-allow-clear' => 'true', 'title' => __('placeholder.sant_select_dharma')]) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2 my-2 my-md-0">
|
||||
<div class="d-flex align-items-center">
|
||||
{{ Form::select('sampraday_id', $sampradaies, null, ['class' => 'form-control selectpicker datatable-input change-action','id' => 'sampraday_id', 'data-live-search' => 'true','title' => __('placeholder.sant_select_sampraday')]) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 my-md-0">
|
||||
<button class="btn btn-secondary btn-secondary--icon" id="kt_reset" style="display: none; margin-top:10px;">
|
||||
<span>
|
||||
<i class="la la-close"></i>
|
||||
<span>{{ __('buttons.reset') }}</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--begin: Selected Rows Group Action Form-->
|
||||
<div class="mb-2 multiple-actions" id="checkboxActionDropdown">
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="font-weight-bold text-danger mr-3">Selected
|
||||
<span id="datatableSelectedRecords">0</span> records:</div>
|
||||
<div class="dropdown mr-2">
|
||||
<button type="button" class="btn btn-primary btn-sm dropdown-toggle" data-toggle="dropdown">{{ __('label.update_action') }}</button>
|
||||
<div class="dropdown-menu dropdown-menu-sm">
|
||||
<ul class="nav nav-hover flex-column">
|
||||
<li class="nav-item">
|
||||
<a href="javascript:void(0);" data-value="active" class="nav-link action-type">
|
||||
<span class="nav-text">{{ __('label.active') }}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="javascript:void(0);" data-value="inactive" class="nav-link action-type">
|
||||
<span class="nav-text">{{ __('label.inactive') }}</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <a href="javascript:void(0);" class="btn btn-sm btn-danger mr-2 action-type" data-value="delete">Delete All</a> -->
|
||||
</div>
|
||||
</div>
|
||||
<!--end: Selected Rows Group Action Form-->
|
||||
<div id="kt_datatable_wrapper" class="dataTables_wrapper dt-bootstrap4 no-footer admin-table">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="datatable datatable-default datatable-bordered datatable-loaded">
|
||||
<table class="datatable-bordered datatable-head-custom datatable-table table-hover table table-hover responsive nowrap"
|
||||
id="users-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<span style="width: 20px;">
|
||||
<label class="checkbox checkbox-single">
|
||||
<input type="checkbox"
|
||||
name="checkbox_action[]" id="checkbox-all"/> <span></span>
|
||||
</label>
|
||||
</span>
|
||||
</th>
|
||||
<th>{{ __('label.sant_listing_heading_2') }}</th>
|
||||
<th>{{ __('label.sant_listing_heading_3') }}</th>
|
||||
<th>{{ __('label.sant_listing_heading_4') }}</th>
|
||||
<th>{{ __('label.sant_listing_heading_5') }}</th>
|
||||
{{-- <th>{{ __('label.created_at') }}</th> --}}
|
||||
<th>{{ __('label.updated_at') }}</th>
|
||||
<th>{{ __('label.thana') }}</th>
|
||||
{{-- <th class="text-wrap">{{ __('label.approved_thana') }}</th>
|
||||
<th class="text-wrap">{{ __('label.pending_thana') }}</th> --}}
|
||||
<th class="text-wrap">{{ __('label.sant_verification_status') }}</th>
|
||||
<th>{{ __('label.sant_listing_heading_6') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('after-scripts')
|
||||
<!-- DataTables -->
|
||||
<script src="{{ asset('public/js/datatable/jquery.dataTables.min.js') }}"></script>
|
||||
{{-- <script src="https://cdn.datatables.net/responsive/1.0.4/js/dataTables.responsive.js"></script> --}}
|
||||
<script src="{{ asset('public/js/datatable/dataTables.bootstrap4.min.js') }}"></script>
|
||||
<script src="{{ asset('public/js/datatable/datatable-skeleton.js?v='.time()) }}"></script>
|
||||
{{-- <script>
|
||||
$(document).ready(function() {
|
||||
$("#users-table").DataTable({
|
||||
aaSorting: [],
|
||||
responsive: true,
|
||||
|
||||
columnDefs: [
|
||||
{
|
||||
responsivePriority: 1,
|
||||
targets: 0
|
||||
},
|
||||
{
|
||||
responsivePriority: 2,
|
||||
targets: -1
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
$(".dataTables_filter input")
|
||||
.attr("placeholder", "Search here...")
|
||||
.css({
|
||||
width: "300px",
|
||||
display: "inline-block"
|
||||
});
|
||||
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
</script> --}}
|
||||
<script>
|
||||
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': "{{ csrf_token() }}"
|
||||
}
|
||||
});
|
||||
|
||||
function getSampraday() {
|
||||
$.ajax({
|
||||
url: "{{ route('admin.dharma.sampradaies') }}",
|
||||
type: "POST",
|
||||
data: {
|
||||
'dharma_id': $('#dharma_id').val(),
|
||||
},
|
||||
success: function (data) {
|
||||
$('#sampraday_id').empty();
|
||||
console.log(data);
|
||||
var emptyOption = new Option('Select the sampraday name', '', false, false);
|
||||
// $('#sampraday_id').append(emptyOption);
|
||||
$.each(data.sampradaies, function (index, sampraday) {
|
||||
console.log(sampraday);
|
||||
if (dharma_id == sampraday.id) {
|
||||
var newOption = new Option(sampraday.name, sampraday.id, true, true);
|
||||
} else {
|
||||
var newOption = new Option(sampraday.name, sampraday.id, false, false);
|
||||
}
|
||||
$('#sampraday_id').append(newOption);
|
||||
});
|
||||
$('#sampraday_id').selectpicker('refresh');
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
$(document).on('keyup', '#title', function () {
|
||||
if ($('#title').val() === '' && $('#status').val() === '' && $('#dharma_id').val() === '' && $('#sampraday_id').val() === '') {
|
||||
$('#kt_reset').hide();
|
||||
} else {
|
||||
$('#kt_reset').show();
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('change', '#status', function () {
|
||||
if ($('#title').val() === '' && $('#status').val() === '' && $('#verification_status').val() === '' && $('#dharma_id').val() === '' && $('#sampraday_id').val() === '') {
|
||||
$('#kt_reset').hide();
|
||||
} else {
|
||||
$('#kt_reset').show();
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('change', '#verification_status', function () {
|
||||
if ($('#title').val() === '' && $('#status').val() === '' && $('#verification_status').val() === '' && $('#dharma_id').val() === '' && $('#sampraday_id').val() === '') {
|
||||
$('#kt_reset').hide();
|
||||
} else {
|
||||
$('#kt_reset').show();
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('change', '#dharma_id', function () {
|
||||
if ($('#title').val() === '' && $('#status').val() === '' && $('#verification_status').val() === '' && $('#dharma_id').val() === '' && $('#sampraday_id').val() === '') {
|
||||
$('#kt_reset').hide();
|
||||
} else {
|
||||
$('#kt_reset').show();
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('change', '#dharma_id', function (e) {
|
||||
getSampraday();
|
||||
});
|
||||
|
||||
$(document).on('change', '#sampraday_id', function () {
|
||||
if ($('#title').val() === '' && $('#status').val() === '' && $('#verification_status').val() === '' && $('#dharma_id').val() === '' && $('#sampraday_id').val() === '') {
|
||||
$('#kt_reset').hide();
|
||||
} else {
|
||||
$('#kt_reset').show();
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '#kt_reset', function () {
|
||||
$('#kt_reset').hide();
|
||||
$('#sampraday_id').empty();
|
||||
$('#sampraday_id').selectpicker('refresh');
|
||||
});
|
||||
|
||||
customDataTableWidget.configuration({
|
||||
element: '#users-table',
|
||||
listingUrl: "{{ route('admin.sant.get-listing') }}",
|
||||
deleteUrl: "{{ route("admin.sant.destroy", ":id") }}",
|
||||
multipleActionUrl: "{{ route('admin.sant.grid.records.action') }}",
|
||||
columns: [
|
||||
{
|
||||
data: 'checkbox_action',
|
||||
name: 'checkbox_action',
|
||||
sortable: false
|
||||
},
|
||||
{
|
||||
data: 'name',
|
||||
name: 'name',
|
||||
class: "text-wrap",
|
||||
searchable: true
|
||||
},
|
||||
{
|
||||
data: 'sampraday_id',
|
||||
name: 'sampraday_id',
|
||||
class: "text-wrap",
|
||||
searchable: true
|
||||
},
|
||||
{
|
||||
data: 'dharma_id',
|
||||
name: 'dharma_id',
|
||||
searchable: true
|
||||
},
|
||||
{
|
||||
data: 'status',
|
||||
name: 'status',
|
||||
},
|
||||
// {
|
||||
// data: 'created_at',
|
||||
// name: 'created_at',
|
||||
// },
|
||||
{
|
||||
data: 'updated_at',
|
||||
name: 'updated_at',
|
||||
},
|
||||
|
||||
{
|
||||
data: 'thana',
|
||||
name: 'thana',
|
||||
},
|
||||
// {
|
||||
// data: 'approved_thana',
|
||||
// name: 'approved_thana',
|
||||
// },
|
||||
// {
|
||||
// data: 'pending_thana',
|
||||
// name: 'pending_thana',
|
||||
// },
|
||||
{
|
||||
data: 'verification_status',
|
||||
name: 'verification_status',
|
||||
},
|
||||
{
|
||||
data: 'action',
|
||||
name: 'action',
|
||||
sortable: false,
|
||||
class:'text-right ws-nowrap action-col'
|
||||
}
|
||||
|
||||
],
|
||||
search: [
|
||||
{
|
||||
key: 'status',
|
||||
type: 'select'
|
||||
},
|
||||
{
|
||||
key: 'verification_status',
|
||||
type: 'select'
|
||||
},
|
||||
{
|
||||
key: 'dharma_id',
|
||||
type: 'select'
|
||||
},
|
||||
{
|
||||
key: 'sampraday_id',
|
||||
type: 'select'
|
||||
},
|
||||
{
|
||||
key: 'name',
|
||||
type: 'text'
|
||||
}
|
||||
],
|
||||
defaultSortingIndex: 5,
|
||||
defaultSortingOrder: 'desc'
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
521
resources/views/backend/sant/partials/_form.blade.php
Normal file
521
resources/views/backend/sant/partials/_form.blade.php
Normal file
@@ -0,0 +1,521 @@
|
||||
<div class="card-body">
|
||||
|
||||
<div class="form-group row">
|
||||
|
||||
<div class="col-md-6">
|
||||
<label>{{ __('label.sant_dharma_name') }} </label>
|
||||
{{ Form::select('dharma_id',$dharmaName,(isset($sant->dharma_id) && !empty($sant->dharma_id)) ? $sant->dharma_id : null,['id' => 'dharma', 'class' => $errors->has('dharma_id') ? 'form-control selectpicker is-invalid dharma_id' : 'form-control selectpicker','title' => __('placeholder.sant_dharma_name'),'data-live-search' => 'true','data-allow-clear' => 'true']) }}
|
||||
@error('dharma_id')
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@enderror
|
||||
|
||||
@if(\Request::route()->getName() == 'admin.sant.edit' && $sant->verification_status == 2)
|
||||
<div class="form-check">
|
||||
<input class="form-check-input mt-2" type="checkbox" value="1" id="dharmaCheckbox" name="dharmaCheckbox" onchange="document.getElementById('send_back').disabled = !this.checked;">
|
||||
<label class="form-check-label mt-1" for="dharmaCheckbox">
|
||||
<font color="#EC7063">
|
||||
{{ __('label.need_to_update') }}
|
||||
</font>
|
||||
</label>
|
||||
</div>
|
||||
@endif
|
||||
<label class="mt-2">Current Data: <font color="blue">{{ $santLive->dharm->name ?? "-" }} </font> </label>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<label>{{ __('label.sant_sampraday_name') }} </label>
|
||||
{{ Form::select('sampraday_id',$sampradayName,(isset($sant->sampraday_id) && !empty($sant->sampraday_id)) ? $sant->sampraday_id : null,['id' => 'sampradaies', 'class' => $errors->has('sampraday_id') ? 'form-control selectpicker is-invalid sampraday_id' : 'form-control selectpicker','title' => __('placeholder.sant_sampraday_name'),'data-live-search' => 'true','data-allow-clear' => 'true']) }}
|
||||
@error('sampraday_id')
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@enderror
|
||||
|
||||
@if(\Request::route()->getName() == 'admin.sant.edit' && $sant->verification_status == 2)
|
||||
<div class="form-check">
|
||||
<input class="form-check-input mt-2" type="checkbox" value="1" id="sampradayCheckbox" name="sampradayCheckbox" onchange="document.getElementById('send_back').disabled = !this.checked;">
|
||||
<label class="form-check-label mt-1" for="sampradayCheckbox">
|
||||
<font color="#EC7063">
|
||||
{{ __('label.need_to_update') }}
|
||||
</font>
|
||||
</label>
|
||||
</div>
|
||||
@endif
|
||||
<label class="mt-2">Current Data: <font color="blue">{{ $santLive->sampraday->name ?? "-" }} </font> </label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-md-6">
|
||||
<label>{{ __('label.sant_form_name') }} <span class="text-danger">*</span></label>
|
||||
{{ Form::text('name',null,['class' => $errors->has('name') ? 'form-control is-invalid' : 'form-control','placeholder' => __('placeholder.sant_name')]) }}
|
||||
@error('name')
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@enderror
|
||||
|
||||
@if(\Request::route()->getName() == 'admin.sant.edit' && $sant->verification_status == 2)
|
||||
<div class="form-check">
|
||||
<input class="form-check-input mt-2" type="checkbox" value="1" id="nameCheckbox" name="nameCheckbox" onchange="document.getElementById('send_back').disabled = !this.checked;">
|
||||
<label class="form-check-label mt-1" for="nameCheckbox">
|
||||
<font color="#EC7063">
|
||||
{{ __('label.need_to_update') }}
|
||||
</font>
|
||||
</label>
|
||||
</div>
|
||||
@endif
|
||||
<label class="mt-2">Current Data: <font color="blue">{{ $santLive->name ?? "-" }} </font> </label>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<label>{{ __('label.sant_honor') }} </label>
|
||||
<input id="honor" class="form-control tagify" name='honor' placeholder='type...'
|
||||
value='{{old('honor',isset($sant->honor) && !empty($sant->honor) ? implode(', ', $sant->honor) : '')}}'/>
|
||||
<div class="mt-3">
|
||||
<a href="javascript:;" id="honor_remove" class="btn btn-sm btn-light-primary font-weight-bold">Remove
|
||||
honors</a>
|
||||
</div>
|
||||
<label class="mt-2">Current Data: <font color="blue">{{ isset($santLive->honor) ? implode(',', $santLive->honor) : "-" }} </font> </label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-md-6">
|
||||
<label>{{ __('label.sant_birth_date') }} </label>
|
||||
<div class="input-group date">
|
||||
{{ Form::text('birth_date',null,['autocomplete' => 'off','class' => $errors->has('birth_date') ? 'form-control datepicker is-invalid' : 'form-control datepicker','placeholder' => __('placeholder.sant_birth_date')]) }}
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">
|
||||
<i class="fas fa-calendar-alt"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@error('birth_date')
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@enderror
|
||||
|
||||
@if(\Request::route()->getName() == 'admin.sant.edit' && $sant->verification_status == 2)
|
||||
<div class="form-check">
|
||||
<input class="form-check-input mt-2" type="checkbox" value="1" id="birthDateCheckbox" name="birthDateCheckbox" onchange="document.getElementById('send_back').disabled = !this.checked;">
|
||||
<label class="form-check-label mt-1" for="birthDateCheckbox">
|
||||
<font color="#EC7063">
|
||||
{{ __('label.need_to_update') }}
|
||||
</font>
|
||||
</label>
|
||||
</div>
|
||||
@endif
|
||||
<label class="mt-2">Current Data: <font color="blue">{{ $santLive->birth_date ?? "-" }} </font> </label>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<label>{{ __('label.sant_gender') }}</label>
|
||||
{{ Form::select('gender',trans('sant.gender'),(isset($sant->gender) && !empty($sant->gender)) ? $sant->gender : null,['class' => $errors->has('gender') ? 'form-control selectpicker is-invalid gender' : 'form-control selectpicker','title' => __('placeholder.sant_gender'),'data-live-search' => 'true','data-allow-clear' => 'true']) }}
|
||||
@error('gender')
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@enderror
|
||||
|
||||
@if(\Request::route()->getName() == 'admin.sant.edit' && $sant->verification_status == 2)
|
||||
<div class="form-check">
|
||||
<input class="form-check-input mt-2" type="checkbox" value="1" id="genderCheckbox" name="genderCheckbox" onchange="document.getElementById('send_back').disabled = !this.checked;">
|
||||
<label class="form-check-label mt-1" for="genderCheckbox">
|
||||
<font color="#EC7063">
|
||||
{{ __('label.need_to_update') }}
|
||||
</font>
|
||||
</label>
|
||||
</div>
|
||||
@endif
|
||||
@if (!empty($santLive->gender) && $santLive->gender == 1)
|
||||
<label class="mt-2">Current Data: <font color="blue">Maharaj Saheb</font> </label>
|
||||
@elseif (!empty($santLive->gender) && $santLive->gender == 2)
|
||||
<label class="mt-2">Current Data: <font color="blue">Mahasati Ji</font> </label>
|
||||
@else
|
||||
<label class="mt-2">Current Data: <font color="blue">-</font> </label>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-md-6">
|
||||
<label>{{ __('label.sant_diksha_date') }} </label>
|
||||
<div class="input-group date">
|
||||
{{ Form::text('diksha_date',null,['autocomplete' => 'off','class' => $errors->has('diksha_date') ? 'form-control datepicker is-invalid' : 'form-control datepicker','placeholder' => __('placeholder.sant_diksha_date')]) }}
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">
|
||||
<i class="fas fa-calendar-alt"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@error('diksha_date')
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@enderror
|
||||
|
||||
@if(\Request::route()->getName() == 'admin.sant.edit' && $sant->verification_status == 2)
|
||||
<div class="form-check">
|
||||
<input class="form-check-input mt-2" type="checkbox" value="1" id="dikshaDateCheckbox" name="dikshaDateCheckbox" onchange="document.getElementById('send_back').disabled = !this.checked;">
|
||||
<label class="form-check-label mt-1" for="dikshaDateCheckbox">
|
||||
<font color="#EC7063">
|
||||
{{ __('label.need_to_update') }}
|
||||
</font>
|
||||
</label>
|
||||
</div>
|
||||
@endif
|
||||
<label class="mt-2">Current Data: <font color="blue">{{ $santLive->diksha_date ?? "-" }} </font> </label>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<label>{{ __('label.sant_diksha_place') }} </label>
|
||||
{{ Form::text('diksha_place',null,['class' => $errors->has('diksha_place') ? 'form-control is-invalid' : 'form-control', 'id' => 'diksha_place','placeholder' => __('placeholder.sant_diksha_place')]) }}
|
||||
@error('diksha_place')
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@enderror
|
||||
|
||||
@if(\Request::route()->getName() == 'admin.sant.edit' && $sant->verification_status == 2)
|
||||
<div class="form-check">
|
||||
<input class="form-check-input mt-2" type="checkbox" value="1" id="dikshaPlaceCheckbox" name="dikshaPlaceCheckbox" onchange="document.getElementById('send_back').disabled = !this.checked;">
|
||||
<label class="form-check-label mt-1" for="dikshaPlaceCheckbox">
|
||||
<font color="#EC7063">
|
||||
{{ __('label.need_to_update') }}
|
||||
</font>
|
||||
</label>
|
||||
</div>
|
||||
@endif
|
||||
<label class="mt-2">Current Data: <font color="blue">{{ $santLive->diksha_place ?? "-" }} </font> </label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-md-6 mt-3" id="latitudeArea" hidden>
|
||||
<label>{{ __('label.latitude') }}</label>
|
||||
<input type="text" id="latitude_show" name="latitude_show" class="form-control" disabled>
|
||||
</div>
|
||||
<input type="hidden" id="diksha_place_latitude" name="diksha_place_latitude" class="form-control">
|
||||
|
||||
<div class="col-md-6 mt-3" id="longtitudeArea" hidden>
|
||||
<label>{{ __('label.longitude') }}</label>
|
||||
<input type="text" name="longitude_show" id="longitude_show" class="form-control" disabled>
|
||||
</div>
|
||||
<input type="hidden" name="diksha_place_longitude" id="diksha_place_longitude" class="form-control">
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-md-6">
|
||||
<label>{{ __('label.sant_guru') }}</label>
|
||||
{{ Form::select('guru_id',$guruName,(isset($sant->guru_id) && !empty($sant->guru_id)) ? $sant->guru_id : null,['class' => $errors->has('guru_id') ? 'form-control selectpicker is-invalid guru_id' : 'form-control selectpicker','title' => __('placeholder.sant_guru'),'data-live-search' => 'true','data-allow-clear' => 'true']) }}
|
||||
@error('guru_id')
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@enderror
|
||||
|
||||
@if(\Request::route()->getName() == 'admin.sant.edit' && $sant->verification_status == 2)
|
||||
<div class="form-check">
|
||||
<input class="form-check-input mt-2" type="checkbox" value="1" id="guruCheckbox" name="guruCheckbox" onchange="document.getElementById('send_back').disabled = !this.checked;">
|
||||
<label class="form-check-label mt-1" for="guruCheckbox">
|
||||
<font color="#EC7063">
|
||||
{{ __('label.need_to_update') }}
|
||||
</font>
|
||||
</label>
|
||||
</div>
|
||||
@endif
|
||||
<label class="mt-2">Current Data: <font color="blue">{{ $santLive->guru->name ?? "-" }} </font> </label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-md-6">
|
||||
<label>{{ __('label.sant_father_name') }} </label>
|
||||
{{ Form::text('father_name',null,['class' => $errors->has('father_name') ? 'form-control is-invalid' : 'form-control','placeholder' => __('placeholder.sant_father_name')]) }}
|
||||
@error('father_name')
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@enderror
|
||||
|
||||
@if(\Request::route()->getName() == 'admin.sant.edit' && $sant->verification_status == 2)
|
||||
<div class="form-check">
|
||||
<input class="form-check-input mt-2" type="checkbox" value="1" id="fatherCheckbox" name="fatherCheckbox" onchange="document.getElementById('send_back').disabled = !this.checked;">
|
||||
<label class="form-check-label mt-1" for="fatherCheckbox">
|
||||
<font color="#EC7063">
|
||||
{{ __('label.need_to_update') }}
|
||||
</font>
|
||||
</label>
|
||||
</div>
|
||||
@endif
|
||||
<label class="mt-2">Current Data: <font color="blue">{{ $santLive->father_name ?? "-" }} </font> </label>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<label>{{ __('label.sant_mother_name') }} </label>
|
||||
{{ Form::text('mother_name',null,['class' => $errors->has('mother_name') ? 'form-control is-invalid' : 'form-control','placeholder' => __('placeholder.sant_mother_name')]) }}
|
||||
@error('mother_name')
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@enderror
|
||||
|
||||
@if(\Request::route()->getName() == 'admin.sant.edit' && $sant->verification_status == 2)
|
||||
<div class="form-check">
|
||||
<input class="form-check-input mt-2" type="checkbox" value="1" id="motherCheckbox" name="motherCheckbox" onchange="document.getElementById('send_back').disabled = !this.checked;">
|
||||
<label class="form-check-label mt-1" for="motherCheckbox">
|
||||
<font color="#EC7063">
|
||||
{{ __('label.need_to_update') }}
|
||||
</font>
|
||||
</label>
|
||||
</div>
|
||||
@endif
|
||||
<label class="mt-2">Current Data: <font color="blue">{{ $santLive->mother_name ?? "-" }} </font> </label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
{{-- <div class="col-md-6">
|
||||
<label>{{ __('label.sant_profile_verified_at') }} </label>
|
||||
<div class="input-group date">
|
||||
{{ Form::text('profile_verified_at',null,['autocomplete' => 'off','class' => $errors->has('profile_verified_at') ? 'form-control datepicker is-invalid' : 'form-control datepicker','placeholder' => __('placeholder.sant_profile_verified_at')]) }}
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">
|
||||
<i class="fas fa-calendar-alt"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@error('profile_verified_at')
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@enderror
|
||||
</div> --}}
|
||||
|
||||
<div class="col-md-12">
|
||||
<label>{{ __('label.sant_about') }}</label>
|
||||
{{ Form::textarea('about',null,['class' => $errors->has('about') ? 'form-control is-invalid' : 'form-control','placeholder' => __('placeholder.sant_about')]) }}
|
||||
@error('about')
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@enderror
|
||||
|
||||
@if(\Request::route()->getName() == 'admin.sant.edit' && $sant->verification_status == 2)
|
||||
<div class="form-check">
|
||||
<input class="form-check-input mt-2" type="checkbox" value="1" id="aboutCheckbox" name="aboutCheckbox" onchange="document.getElementById('send_back').disabled = !this.checked;">
|
||||
<label class="form-check-label mt-1" for="aboutCheckbox">
|
||||
<font color="#EC7063">
|
||||
{{ __('label.need_to_update') }}
|
||||
</font>
|
||||
</label>
|
||||
</div>
|
||||
@endif
|
||||
<label class="mt-2">Current Data: <font color="blue">{{ $santLive->about ?? "-" }} </font> </label>
|
||||
</div>
|
||||
|
||||
{{-- <div class="col-md-6">
|
||||
<label>{{ __('label.sant_qualification') }} </label>
|
||||
{{ Form::text('qualification',null,['class' => $errors->has('qualification') ? 'form-control is-invalid' : 'form-control','placeholder' => __('placeholder.sant_qualification')]) }}
|
||||
@error('qualification')
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@enderror
|
||||
</div> --}}
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-md-6">
|
||||
<label>{{ __('label.sant_avatar') }} </label>
|
||||
<div class="custom-file">
|
||||
<input type="file" name="avatar"
|
||||
class="custom-file-input avatar-image @if($errors->has('avatar')) is-invalid @endif"
|
||||
id="customFile"/>
|
||||
<label id="avatar-custom-file-label" class="custom-file-label"
|
||||
for="customFile">{{ __('label.choose_image') }}</label>
|
||||
<span class="form-text text-inverse-muted">{{ __('label.image_type') }}</span>
|
||||
@error('avatar')
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@enderror
|
||||
|
||||
@if(\Request::route()->getName() == 'admin.sant.edit' && $sant->verification_status == 2)
|
||||
<div class="form-check">
|
||||
<input class="form-check-input mt-2" type="checkbox" value="1" id="avatarCheckbox" name="avatarCheckbox" onchange="document.getElementById('send_back').disabled = !this.checked;">
|
||||
<label class="form-check-label mt-1" for="avatarCheckbox">
|
||||
<font color="#EC7063">
|
||||
{{ __('label.need_to_update') }}
|
||||
</font>
|
||||
</label>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if(\Request::route()->getName() == 'admin.sant.edit')
|
||||
<div class="col-lg-9 col-xl-6">
|
||||
<div class="form-group row">
|
||||
<div class="col-md-3">
|
||||
<label>{{ __('label.sant_created_by') }} </label>
|
||||
<div class="mt-2">{{ $sant->createdBy->name ?? '-' }}</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>{{ __('label.sant_updated_by') }} </label>
|
||||
<div class="mt-2">{{ $sant->updatedBy->name ?? '-' }}</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label>{{ __('label.thana_updated_by') }} </label>
|
||||
<div class="mt-2">{{ isset($thana->updatedBy) ? ($thana->updatedBy->name) : '-' }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if(\Request::route()->getName() != 'admin.sant.edit')
|
||||
<div class="col-md-6">
|
||||
<label class="col-5 col-form-label">{{ __('label.status') }}</label>
|
||||
<div class="col-3">
|
||||
<span class="switch switch-outline switch-icon switch-primary">
|
||||
<label>
|
||||
{{ Form::checkbox('status',$sant->status ?? null,isset($sant->status) && $sant->status == 2 ? 'checked' : '') }}
|
||||
<span></span>
|
||||
</label>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="form-group row avatar-image-preview-div"
|
||||
@if(isset($sant->avatar) && !empty($sant->avatar)) style="display: flex"
|
||||
@else style="display: none" @endif>
|
||||
<!--begin::Image-->
|
||||
<div class="col-lg-9 col-xl-6">
|
||||
<div class="image-input image-input-outline">
|
||||
<img
|
||||
src="{{(isset($sant) && !empty($sant->avatar)) ? $sant->avatar : ''}}"
|
||||
class="image-input-wrapper avatar-image-preview">
|
||||
<label
|
||||
class="btn btn-xs btn-icon btn-circle btn-white btn-hover-text-primary btn-shadow avatar-image-remove-button"
|
||||
data-action="change" data-toggle="tooltip" title="" data-original-title="Remove Image" id="avatar-image-remove-button">
|
||||
<i class="fa fa-trash icon-sm text-muted"></i>
|
||||
</label>
|
||||
<input type="hidden" name="is_remove_avatar_image" class="is_remove_avatar_image" value="
|
||||
{{ isset($sant->avatar) && !empty($sant->avatar) ? 0 : 1 }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- <div class="form-group row avatar-image-preview-div"
|
||||
@if(isset($santLive->avatar) && !empty($santLive->avatar)) style="display: flex"
|
||||
@else style="display: none" @endif>
|
||||
<!--begin::Image-->
|
||||
<div class="col-lg-9 col-xl-6">
|
||||
<div class="image-input image-input-outline">
|
||||
<img
|
||||
src="{{(isset($santLive) && !empty($santLive->avatar)) ? $sant->avatar : ''}}"
|
||||
class="image-input-wrapper avatar-image-preview">
|
||||
<label
|
||||
class="btn btn-xs btn-icon btn-circle btn-white btn-hover-text-primary btn-shadow avatar-image-remove-button"
|
||||
data-action="change" data-toggle="tooltip" title="" data-original-title="Remove Image" id="avatar-image-remove-button">
|
||||
<i class="fa fa-trash icon-sm text-muted"></i>
|
||||
</label>
|
||||
<input type="hidden" name="is_remove_avatar_image" class="is_remove_avatar_image" value="
|
||||
{{ isset($santLive->avatar) && !empty($santLive->avatar) ? 0 : 1 }}">
|
||||
</div>
|
||||
</div>
|
||||
</div> --}}
|
||||
|
||||
<div class="form-group row">
|
||||
@if (isset($thanaMembers))
|
||||
@forelse($thanaMembers as $thanaMember)
|
||||
<!--begin::Image-->
|
||||
<div class="col-lg-3 col-xl-3">
|
||||
<div class="col-lg-4 col-xl-4">
|
||||
<div class="image-input image-input-outline">
|
||||
<img
|
||||
src="{{(isset($thanaMember) && !empty($thanaMember->avatar)) ? $thanaMember->avatar : ''}}"
|
||||
class="image-input-wrapper avatar-image">
|
||||
<label
|
||||
class="btn btn-xs btn-icon btn-circle btn-white btn-hover-text-primary btn-shadow avatar-image-remove-button"
|
||||
data-action="change" data-toggle="tooltip" title="" data-original-title="Remove Thana" id="thana-remove-button-{{$thanaMember->pivot->id}}">
|
||||
<a href="{{route('admin.sant.remove-thana',['santID' => $thanaMember->id,'id' => $thanaMember->pivot->id])}}"><i class="fa fa-trash icon-sm text-muted"></i></a>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="col-12 col-form-label">{{ $thanaMember->name }}</label>
|
||||
<label class="col-12 col-form-label">Approve</label>
|
||||
<div class="col-3">
|
||||
<span class="switch switch-outline switch-icon switch-primary">
|
||||
<label>
|
||||
{{ Form::checkbox('status['.$thanaMember->pivot->id.']',$thanaMember->pivot->is_approved ?? null,isset($thanaMember->pivot->is_approved) && $thanaMember->pivot->is_approved == 1 ? 'checked' : '') }}
|
||||
<span></span>
|
||||
</label>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@empty
|
||||
{{-- <p>No thana</p> --}}
|
||||
@endforelse
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-footer">
|
||||
<button type="submit" name="save" value="save" class="btn btn-primary mr-2">
|
||||
@if(\Request::route()->getName() == 'admin.sant.edit')
|
||||
{{ __('buttons.approve') }}
|
||||
@else
|
||||
{{ __('buttons.save') }}
|
||||
@endif
|
||||
</button>
|
||||
|
||||
<!-- When sant profile is in reivew -->
|
||||
@if(\Request::route()->getName() == 'admin.sant.edit' && $sant->verification_status == 2)
|
||||
<button type="button" name="send_back" id="send_back" data-target="#sendBackModal" value="save" class="btn btn-warning mr-2 trigger-btn" data-toggle="modal" disabled>
|
||||
{{ __('buttons.send_back') }}
|
||||
</button>
|
||||
{{-- <input type="checkbox" onchange="document.getElementById('sendNewSms').disabled = !this.checked;" /> --}}
|
||||
|
||||
<button type="button" name="reject" data-target="#rejectModal" value="save" class="btn btn-danger mr-2 trigger-btn" data-toggle="modal">
|
||||
{{ __('buttons.reject') }}
|
||||
</button>
|
||||
@endif
|
||||
|
||||
<!-- When sant profile is not in reivew -->
|
||||
@if(\Request::route()->getName() == 'admin.sant.edit' && $sant->verification_status != 2)
|
||||
<button type="button" name="send_back" id="send_back" data-target="#sendBackModal" value="save" class="btn btn-warning mr-2 trigger-btn" data-toggle="modal">
|
||||
{{ __('buttons.send_back') }}
|
||||
</button>
|
||||
|
||||
<button type="button" name="reject" data-target="#rejectModal" value="save" class="btn btn-danger mr-2 trigger-btn" data-toggle="modal">
|
||||
{{ __('buttons.reject') }}
|
||||
</button>
|
||||
@endif
|
||||
|
||||
<a href="{{ route('admin.sant.index') }}" class="btn btn-secondary">{{ __('buttons.cancel') }}</a>
|
||||
</div>
|
||||
|
||||
<!-- Send back Modal -->
|
||||
<div class="modal fade" id="sendBackModal" tabindex="-1" aria-labelledby="sendBackModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="sendBackModalLabel">Reason For Send Back</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<textarea class="form-control" name="send_back_desc" rows="6" required></textarea>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
|
||||
<a href="#">
|
||||
<button type="submit" class="btn btn-primary" name="modalBtn" value="send_back">Submit</button></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Reject Modal -->
|
||||
<div class="modal fade" id="rejectModal" tabindex="-1" aria-labelledby="rejectModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="rejectModalLabel">Reason For Reject</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<textarea class="form-control" name="reject_desc" rows="6" required></textarea>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
|
||||
<a href="#">
|
||||
<button type="submit" class="btn btn-primary" name="modalBtn" value="reject">Submit</button></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
112
resources/views/backend/sant/sant-chaturmas/create.blade.php
Normal file
112
resources/views/backend/sant/sant-chaturmas/create.blade.php
Normal file
@@ -0,0 +1,112 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('title','Chaturmas'.' | '.env('APP_NAME'))
|
||||
|
||||
@push('after-styles')
|
||||
@endpush
|
||||
|
||||
@section('breadcrumb')
|
||||
<div class="subheader py-2 py-lg-4 subheader-solid" id="kt_subheader">
|
||||
<div class="container-fluid d-flex align-items-center justify-content-between flex-wrap flex-sm-nowrap">
|
||||
<!--begin::Info-->
|
||||
<div class="d-flex align-items-center flex-wrap mr-1">
|
||||
<!--begin::Page Heading-->
|
||||
<div class="d-flex align-items-baseline mr-5">
|
||||
<!--begin::Page Title-->
|
||||
<!--end::Page Title-->
|
||||
<!--begin::Breadcrumb-->
|
||||
<ul class="breadcrumb breadcrumb-transparent breadcrumb-dot font-weight-bold p-0 my-2 font-size-sm">
|
||||
<li class="breadcrumb-item active">
|
||||
<a href="{{ route('admin.dashboard') }}" class="text-muted">{{ __('breadcrumb.dashboard') }}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active">
|
||||
<a href="{{ route('admin.sant.chaturmas.index', $sant->id) }}" class="text-muted">{{ __('breadcrumb.chaturmases') }}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item">
|
||||
{{ __('breadcrumb.add_chaturmas') }}
|
||||
</li>
|
||||
</ul>
|
||||
<!--end::Breadcrumb-->
|
||||
</div>
|
||||
<!--end::Page Heading-->
|
||||
</div>
|
||||
<!--end::Info-->
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="card card-custom">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">
|
||||
Add Chaturmas
|
||||
</h3>
|
||||
<div class="card-toolbar">
|
||||
<div class="example-tools justify-content-center">
|
||||
<span class="example-toggle" data-toggle="tooltip" title="View code"></span>
|
||||
<span class="example-copy" data-toggle="tooltip" title="Copy code"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--begin::Form-->
|
||||
{{ Form::open(['route' => ['admin.sant.chaturmas.store',$sant->id],'id' => 'createSantChaturmasForm', 'files' => true]) }}
|
||||
@include('backend.sant.sant-chaturmas.partials._form')
|
||||
{{ Form::close() }}
|
||||
<!--end::Form-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('after-scripts')
|
||||
@component('backend.layouts.components.validation')@endcomponent
|
||||
<script>
|
||||
function demo1() {
|
||||
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
demo1();
|
||||
$("#createSantChaturmasForm").validate({
|
||||
errorClass: 'is-invalid',
|
||||
normalizer: function(value) {
|
||||
return $.trim(value);
|
||||
},
|
||||
rules: {
|
||||
name: {
|
||||
required: true,
|
||||
}
|
||||
},
|
||||
onfocusout: function(element) {
|
||||
// "eager" validation
|
||||
// this.element(element);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
{{-- Google Map script --}}
|
||||
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAoZv-67UKDVz5Rp3fa3e2xcHunahFGKOc&libraries=places&callback=dummy"></script>
|
||||
<script>
|
||||
google.maps.event.addDomListener(window, 'load', initialize);
|
||||
function initialize() {
|
||||
var input = document.getElementById('place');
|
||||
var autocomplete = new google.maps.places.Autocomplete(input);
|
||||
autocomplete.addListener('place_changed', function () {
|
||||
var place = autocomplete.getPlace();
|
||||
var state = place.address_components.find(item => item.types.includes('administrative_area_level_1'));
|
||||
|
||||
$('#latitude_show').val(place.geometry['location'].lat());
|
||||
$('#longitude_show').val(place.geometry['location'].lng());
|
||||
$('#latitude').val(place.geometry['location'].lat());
|
||||
$('#longitude').val(place.geometry['location'].lng());
|
||||
$("#latitudeArea").removeAttr('hidden');
|
||||
$("#longtitudeArea").removeAttr('hidden');
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
128
resources/views/backend/sant/sant-chaturmas/edit.blade.php
Normal file
128
resources/views/backend/sant/sant-chaturmas/edit.blade.php
Normal file
@@ -0,0 +1,128 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('title','Chaturmas'.' | '.env('APP_NAME'))
|
||||
|
||||
@push('after-styles')
|
||||
@endpush
|
||||
|
||||
@section('breadcrumb')
|
||||
<div class="subheader py-2 py-lg-4 subheader-solid" id="kt_subheader">
|
||||
<div class="container-fluid d-flex align-items-center justify-content-between flex-wrap flex-sm-nowrap">
|
||||
<!--begin::Info-->
|
||||
<div class="d-flex align-items-center flex-wrap mr-1">
|
||||
<!--begin::Page Heading-->
|
||||
<div class="d-flex align-items-baseline mr-5">
|
||||
<!--begin::Page Title-->
|
||||
<!--end::Page Title-->
|
||||
<!--begin::Breadcrumb-->
|
||||
<ul class="breadcrumb breadcrumb-transparent breadcrumb-dot font-weight-bold p-0 my-2 font-size-sm">
|
||||
<li class="breadcrumb-item active">
|
||||
<a href="{{ route('admin.dashboard') }}" class="text-muted">{{ __('breadcrumb.dashboard') }}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active">
|
||||
<a href="{{ route('admin.sant.chaturmas.index', $sant->id) }}" class="text-muted">{{ __('breadcrumb.chaturmases') }}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item">
|
||||
{{ __('breadcrumb.edit_chaturmas') }}
|
||||
</li>
|
||||
</ul>
|
||||
<!--end::Breadcrumb-->
|
||||
</div>
|
||||
<!--end::Page Heading-->
|
||||
</div>
|
||||
<!--end::Info-->
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="card card-custom">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">
|
||||
Edit Chaturmas
|
||||
</h3>
|
||||
<div class="card-toolbar">
|
||||
<div class="example-tools justify-content-center">
|
||||
<span class="example-toggle" data-toggle="tooltip" title="View code"></span>
|
||||
<span class="example-copy" data-toggle="tooltip" title="Copy code"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--begin::Form-->
|
||||
{{ Form::model($chaturma, ['route' => ['admin.sant.chaturmas.update', $sant->id, $chaturma->id], 'method' => 'PATCH', 'id' => 'createSantChaturmasForm', 'files' => true]) }}
|
||||
@include('backend.sant.sant-chaturmas.partials._form')
|
||||
{{ Form::close() }}
|
||||
<!--end::Form-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('after-scripts')
|
||||
@component('backend.layouts.components.validation')@endcomponent
|
||||
<script>
|
||||
function demo1() {
|
||||
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
demo1();
|
||||
$("#createSantChaturmasForm").validate({
|
||||
errorClass: 'is-invalid',
|
||||
normalizer: function(value) {
|
||||
return $.trim(value);
|
||||
},
|
||||
rules: {
|
||||
name: {
|
||||
required: true,
|
||||
}
|
||||
},
|
||||
onfocusout: function(element) {
|
||||
// "eager" validation
|
||||
// this.element(element);
|
||||
}
|
||||
});
|
||||
|
||||
var sants = "{{implode(',',$santName)}}";
|
||||
$('.approve-chaturmas').change(function() {
|
||||
if (this.checked && sants != "") {
|
||||
$('.approve-modal').show();
|
||||
}
|
||||
});
|
||||
|
||||
$('.agree').click(function() {
|
||||
$('.approve-modal').hide();
|
||||
});
|
||||
|
||||
$('.close-modal').click(function(e) {
|
||||
$('.approve-modal').hide();
|
||||
$('input:checked').removeAttr('checked');
|
||||
$('.approve-chaturmas').click();
|
||||
e.preventDefault();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
{{-- Google Map script --}}
|
||||
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAoZv-67UKDVz5Rp3fa3e2xcHunahFGKOc&libraries=places&callback=dummy"></script>
|
||||
<script>
|
||||
google.maps.event.addDomListener(window, 'load', initialize);
|
||||
function initialize() {
|
||||
var input = document.getElementById('place');
|
||||
var autocomplete = new google.maps.places.Autocomplete(input);
|
||||
autocomplete.addListener('place_changed', function () {
|
||||
var place = autocomplete.getPlace();
|
||||
$('#latitude_show').val(place.geometry['location'].lat());
|
||||
$('#longitude_show').val(place.geometry['location'].lng());
|
||||
$('#latitude').val(place.geometry['location'].lat());
|
||||
$('#longitude').val(place.geometry['location'].lng());
|
||||
$("#latitudeArea").removeAttr('hidden');
|
||||
$("#longtitudeArea").removeAttr('hidden');
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
210
resources/views/backend/sant/sant-chaturmas/list.blade.php
Normal file
210
resources/views/backend/sant/sant-chaturmas/list.blade.php
Normal file
@@ -0,0 +1,210 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('title',__('label.listing_chaturmas_table_title').' | '.env('APP_NAME'))
|
||||
|
||||
@push('after-styles')
|
||||
<!-- DataTables -->
|
||||
<link href="{{ asset('public/js/datatable/dataTables.bootstrap4.min.css') }}" rel="stylesheet" type="text/css"/>
|
||||
@endpush
|
||||
|
||||
@section('breadcrumb')
|
||||
<div class="subheader py-2 py-lg-4 subheader-solid" id="kt_subheader">
|
||||
<div class="container-fluid d-flex align-items-center justify-content-between flex-wrap flex-sm-nowrap">
|
||||
<!--begin::Info-->
|
||||
<div class="d-flex align-items-center flex-wrap mr-1">
|
||||
<!--begin::Page Heading-->
|
||||
<div class="d-flex align-items-baseline mr-5">
|
||||
<!--begin::Page Title-->
|
||||
<!--end::Page Title-->
|
||||
<!--begin::Breadcrumb-->
|
||||
<ul class="breadcrumb breadcrumb-transparent breadcrumb-dot font-weight-bold p-0 my-2 font-size-sm">
|
||||
<li class="breadcrumb-item active">
|
||||
<a href="{{ route('admin.dashboard') }}" class="text-muted">{{ __('breadcrumb.dashboard') }}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active">
|
||||
<a href="{{ route('admin.sant.index') }}" class="text-muted">{{ __('breadcrumb.sants') }}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item">
|
||||
{{ __('breadcrumb.chaturmases') }}
|
||||
</li>
|
||||
</ul>
|
||||
<!--end::Breadcrumb-->
|
||||
</div>
|
||||
<!--end::Page Heading-->
|
||||
</div>
|
||||
<!--end::Info-->
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-12">
|
||||
<div class="card card-custom">
|
||||
<div class="card-header flex-wrap border-0 pt-6 pb-0">
|
||||
<div class="card-title">
|
||||
<h3>{{ $sant->name.'\'s' ?? "" }} {{ __('label.listing_chaturmas_table_title') }}</h3>
|
||||
</div>
|
||||
|
||||
<div class="card-toolbar">
|
||||
<!--begin::Button-->
|
||||
<a href="{{ route('admin.sant.chaturmas.create',$sant->id) }}" class="btn btn-primary font-weight-bolder">
|
||||
<i class="fas fa-plus fa-sm"></i> {{ __('buttons.create_chaturmas') }}
|
||||
</a>
|
||||
<!--end::Button-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="mb-7">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-lg-12 col-xl-12">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-md-3 my-2 my-md-0">
|
||||
<div class="d-flex align-items-center">
|
||||
<label class="mr-3 mb-0 d-none d-md-block">{{ __('label.vihar_search_title')}}</label>
|
||||
{{ Form::text('name',null,['class' => 'form-control selectpicker datatable-input change-action','id' => 'title','title' => 'Enter Name']) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 my-md-0">
|
||||
<button class="btn btn-secondary btn-secondary--icon" id="kt_reset" style="display: none">
|
||||
<span>
|
||||
<i class="la la-close"></i>
|
||||
<span>{{ __('buttons.reset') }}</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--begin: Selected Rows Group Action Form-->
|
||||
<div class="mb-2 multiple-actions" id="checkboxActionDropdown">
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="font-weight-bold text-danger mr-3">Selected
|
||||
<span id="datatableSelectedRecords">0</span> records:</div>
|
||||
<a href="javascript:void(0);" class="btn btn-sm btn-danger mr-2 action-type" data-value="delete">Delete All</a>
|
||||
</div>
|
||||
</div>
|
||||
<!--end: Selected Rows Group Action Form-->
|
||||
<div id="kt_datatable_wrapper" class="dataTables_wrapper dt-bootstrap4 no-footer admin-table">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="datatable datatable-default datatable-bordered datatable-loaded">
|
||||
<table class="datatable-bordered datatable-head-custom datatable-table table-hover"
|
||||
id="users-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<span style="width: 20px;">
|
||||
<label class="checkbox checkbox-single">
|
||||
<input type="checkbox"
|
||||
name="checkbox_action[]" id="checkbox-all"/> <span></span>
|
||||
</label>
|
||||
</span>
|
||||
</th>
|
||||
<th>Place</th>
|
||||
<th>Year</th>
|
||||
{{-- <th>From</th> --}}
|
||||
<th>Updated By</th>
|
||||
<th>Status</th>
|
||||
<th>Created At</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('after-scripts')
|
||||
<!-- DataTables -->
|
||||
<script src="{{ asset('public/js/datatable/jquery.dataTables.min.js') }}"></script>
|
||||
<script src="{{ asset('public/js/datatable/dataTables.bootstrap4.min.js') }}"></script>
|
||||
<script src="{{ asset('public/js/datatable/datatable-skeleton.js?v='.time()) }}"></script>
|
||||
<script>
|
||||
|
||||
$(document).on('keyup', '#title', function () {
|
||||
if ($('#title').val() === '' && $('#status').val() === '') {
|
||||
$('#kt_reset').hide();
|
||||
} else {
|
||||
$('#kt_reset').show();
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('change', '#status', function () {
|
||||
if ($('#title').val() === '' && $('#status').val() === '') {
|
||||
$('#kt_reset').hide();
|
||||
} else {
|
||||
$('#kt_reset').show();
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '#kt_reset', function () {
|
||||
$('#kt_reset').hide();
|
||||
});
|
||||
|
||||
customDataTableWidget.configuration({
|
||||
element: '#users-table',
|
||||
listingUrl: "{{ route('admin.sant.chaturmas.get-listing', $sant->id) }}",
|
||||
{{--deleteUrl: "{{ route("admin.sant.chaturmas.destroy", $sant->id, ":id") }}",--}}
|
||||
multipleActionUrl: "{{ route('admin.sant.chaturmas.grid.records.action', $sant->id) }}",
|
||||
columns: [
|
||||
{
|
||||
data: 'checkbox_action',
|
||||
name: 'checkbox_action',
|
||||
sortable: false
|
||||
},
|
||||
{
|
||||
data: 'place',
|
||||
name: 'place',
|
||||
},
|
||||
{
|
||||
data: 'chaturmas_date_id',
|
||||
name: 'chaturmas_date_id',
|
||||
},
|
||||
// {
|
||||
// data: 'from',
|
||||
// name: 'from',
|
||||
// },
|
||||
{
|
||||
data: 'updated_by',
|
||||
name: 'updated_by',
|
||||
},
|
||||
{
|
||||
data: 'status',
|
||||
name: 'status',
|
||||
class: 'ws-nowrap'
|
||||
},
|
||||
{
|
||||
data:'created_at',
|
||||
name:'created_at'
|
||||
},
|
||||
{
|
||||
data: 'action',
|
||||
name: 'action',
|
||||
sortable: false,
|
||||
class:'text-right ws-nowrap action-col'
|
||||
}
|
||||
],
|
||||
search: [
|
||||
{
|
||||
key: 'name',
|
||||
type: 'text'
|
||||
}
|
||||
],
|
||||
defaultSortingIndex: 5,
|
||||
defaultSortingOrder: 'desc'
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,89 @@
|
||||
<div class="card-body">
|
||||
|
||||
<div class="form-group row">
|
||||
|
||||
<div class="col-md-6">
|
||||
<label>{{ __('label.chaturmas_year') }}</label>
|
||||
{{ Form::select('chaturmas_date_id', $years, (isset($chaturma->chaturmas_date_id) && !empty($chaturma->chaturmas_date_id)) ? $chaturma->chaturmas_date_id : null,['class' => $errors->has('chaturmas_date_id') ? 'form-control selectpicker is-invalid year_id' : 'form-control selectpicker','title' => __('placeholder.chaturmas_year'),'data-live-search' => 'true','data-allow-clear' => 'true']) }}
|
||||
@error('chaturmas_date_id')
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<label>{{ __('label.chaturmas_place') }} <span class="text-danger">*</span></label>
|
||||
{{ Form::text('place',$chaturma->place ?? $sanghAddress,['class' => $errors->has('place') ? 'form-control is-invalid' : 'form-control', 'id' => 'place', 'placeholder' => __('placeholder.chaturmas_place')]) }}
|
||||
@error('place')
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="col-md-6 mt-3" id="latitudeArea" hidden>
|
||||
<label>{{ __('label.latitude') }}</label>
|
||||
<input type="text" id="latitude_show" name="latitude_show" class="form-control" disabled>
|
||||
</div>
|
||||
<input type="hidden" id="latitude" name="latitude" class="form-control">
|
||||
|
||||
<div class="col-md-6 mt-3" id="longtitudeArea" hidden>
|
||||
<label>{{ __('label.longitude') }}</label>
|
||||
<input type="text" name="longitude_show" id="longitude_show" class="form-control" disabled>
|
||||
</div>
|
||||
<input type="hidden" name="longitude" id="longitude" class="form-control">
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-2 col-form-label">{{ __('label.is_approved') }}</label>
|
||||
<div class="col-3">
|
||||
<span class="switch switch-outline switch-icon switch-primary">
|
||||
<label>
|
||||
{{ Form::checkbox('is_approved', $chaturma->is_approved ?? 1, isset($chaturma->is_approved) && $chaturma->is_approved == 1 ? 'checked' : '', ['class' => 'approve-chaturmas']) }}
|
||||
<span></span>
|
||||
</label>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="card-footer">
|
||||
<button type="submit" name="save" value="save" class="btn btn-primary mr-2">
|
||||
@if(\Request::route()->getName() == 'admin.sant.edit')
|
||||
{{ __('buttons.update') }}
|
||||
@else
|
||||
{{ __('buttons.save') }}
|
||||
@endif
|
||||
</button>
|
||||
<a href="{{ route('admin.sant.chaturmas.index', $sant->id) }}" class="btn btn-secondary">{{ __('buttons.cancel') }}</a>
|
||||
</div>
|
||||
|
||||
<div class="approve-modal" style="display: none;">
|
||||
<div class="swal2-container swal2-center swal2-backdrop-show" style="overflow-y: auto;">
|
||||
<div aria-labelledby="swal2-title" aria-describedby="swal2-content"
|
||||
class="swal2-popup swal2-modal swal2-icon-warning swal2-show" tabindex="-1" role="dialog" aria-live="assertive"
|
||||
aria-modal="true" style="display: flex;">
|
||||
<div class="swal2-header">
|
||||
<ul class="swal2-progress-steps" style="display: none;"></ul>
|
||||
<div class="swal2-icon swal2-error" style="display: none;"></div>
|
||||
<div class="swal2-icon swal2-question" style="display: none;"></div>
|
||||
<div class="swal2-icon swal2-warning swal2-icon-show" style="display: flex;">
|
||||
<div class="swal2-icon-content">!</div>
|
||||
</div>
|
||||
<div class="swal2-icon swal2-info" style="display: none;"></div>
|
||||
<div class="swal2-icon swal2-success" style="display: none;"></div><img class="swal2-image"
|
||||
style="display: none;">
|
||||
<h2 class="swal2-title" id="swal2-title" style="display: flex;">Are you sure?</h2>
|
||||
<button type="button" class="swal2-close" aria-label="Close this dialog" style="display: none;">×</button>
|
||||
</div>
|
||||
<div class="mt-3" style="text-align: center;">
|
||||
<p>This will also approve chaturmas of following sants: <b>{!! isset($santName) ? implode(",<br>",$santName) : null !!}</b></p>
|
||||
</div>
|
||||
<div class="swal2-actions">
|
||||
<button type="button" class="swal2-cancel swal2-styled close-modal" aria-label="" style="display: inline-block;">No, cancel!</button>
|
||||
<button type="button" class="swal2-confirm swal2-styled agree" aria-label="" style="display: inline-block; border-left-color: rgb(48, 133, 214); border-right-color: rgb(48, 133, 214);">
|
||||
Yes, approve it!</button>
|
||||
</div>
|
||||
<div class="swal2-footer" style="display: none;"></div>
|
||||
<div class="swal2-timer-progress-bar-container">
|
||||
<div class="swal2-timer-progress-bar" style="display: none;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
199
resources/views/backend/sant/sant-vihar/create.blade.php
Normal file
199
resources/views/backend/sant/sant-vihar/create.blade.php
Normal file
@@ -0,0 +1,199 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('title',__('label.create_vihar_page_title').' | '.env('APP_NAME'))
|
||||
|
||||
@push('after-styles')
|
||||
@endpush
|
||||
|
||||
@section('breadcrumb')
|
||||
<div class="subheader py-2 py-lg-4 subheader-solid" id="kt_subheader">
|
||||
<div class="container-fluid d-flex align-items-center justify-content-between flex-wrap flex-sm-nowrap">
|
||||
<!--begin::Info-->
|
||||
<div class="d-flex align-items-center flex-wrap mr-1">
|
||||
<!--begin::Page Heading-->
|
||||
<div class="d-flex align-items-baseline mr-5">
|
||||
<!--begin::Page Title-->
|
||||
<!--end::Page Title-->
|
||||
<!--begin::Breadcrumb-->
|
||||
<ul class="breadcrumb breadcrumb-transparent breadcrumb-dot font-weight-bold p-0 my-2 font-size-sm">
|
||||
<li class="breadcrumb-item active">
|
||||
<a href="{{ route('admin.dashboard') }}" class="text-muted">{{ __('breadcrumb.dashboard') }}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active">
|
||||
<a href="{{ route('admin.sant.vihar.index', $sant->id) }}" class="text-muted">{{ __('breadcrumb.vihar') }}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item">
|
||||
{{ __('breadcrumb.add_vihar') }}
|
||||
</li>
|
||||
</ul>
|
||||
<!--end::Breadcrumb-->
|
||||
</div>
|
||||
<!--end::Page Heading-->
|
||||
</div>
|
||||
<!--end::Info-->
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="card card-custom">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">
|
||||
{{ __('label.create_vihar_form_title') }}
|
||||
</h3>
|
||||
<div class="card-toolbar">
|
||||
<div class="example-tools justify-content-center">
|
||||
<span class="example-toggle" data-toggle="tooltip" title="View code"></span>
|
||||
<span class="example-copy" data-toggle="tooltip" title="Copy code"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--begin::Form-->
|
||||
{{ Form::open(['route' => ['admin.sant.vihar.store', $sant->id], 'id' => 'createViharForm', 'files' => true]) }}
|
||||
@include('backend.sant.sant-vihar.partials._form')
|
||||
{{ Form::close() }}
|
||||
|
||||
<!--end::Form-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('after-scripts')
|
||||
@component('backend.layouts.components.validation')@endcomponent
|
||||
<script>
|
||||
function demo1() {
|
||||
|
||||
$('#start_time, #end_time').timepicker().on('changeTime.timepicker', function(e) {
|
||||
let timePicked = $(this).val();
|
||||
// only H:i
|
||||
(timePicked.length < 5) ? $(this).val("0" + timePicked) : '';
|
||||
});
|
||||
|
||||
$.validator.addMethod('validDate', function (value, element) {
|
||||
return this.optional(element) || /^(0?[1-9]|1[012])[ /](0?[1-9]|[12][0-9]|3[01])[ /][0-9]{4}$/.test(value);
|
||||
}, 'Please provide a date in the mm/dd/yyyy format');
|
||||
|
||||
$.validator.addMethod('dateBefore', function (value, element, params) {
|
||||
// if end date is valid, validate it as well
|
||||
var end = $(params);
|
||||
if (!end.data('validation.running')) {
|
||||
$(element).data('validation.running', true);
|
||||
setTimeout($.proxy(
|
||||
|
||||
function () {
|
||||
this.element(end);
|
||||
}, this), 0);
|
||||
// Ensure clearing the 'flag' happens after the validation of 'end' to prevent endless looping
|
||||
setTimeout(function () {
|
||||
$(element).data('validation.running', false);
|
||||
}, 0);
|
||||
}
|
||||
return this.optional(element) || this.optional(end[0]) || new Date(value) < new Date(end.val());
|
||||
|
||||
}, 'Must be before corresponding end date');
|
||||
|
||||
$.validator.addMethod('dateAfter', function (value, element, params) {
|
||||
// if start date is valid, validate it as well
|
||||
var start = $(params);
|
||||
if (!start.data('validation.running')) {
|
||||
$(element).data('validation.running', true);
|
||||
setTimeout($.proxy(
|
||||
|
||||
function () {
|
||||
this.element(start);
|
||||
}, this), 0);
|
||||
setTimeout(function () {
|
||||
$(element).data('validation.running', false);
|
||||
}, 0);
|
||||
}
|
||||
return this.optional(element) || this.optional(start[0]) || new Date(value) > new Date($(params).val());
|
||||
|
||||
}, 'Must be after corresponding Start date');
|
||||
}
|
||||
|
||||
|
||||
$(document).ready(function () {
|
||||
demo1();
|
||||
$("#createViharForm").validate({
|
||||
errorClass: 'is-invalid',
|
||||
normalizer: function(value) {
|
||||
return $.trim(value);
|
||||
},
|
||||
rules: {
|
||||
from: {
|
||||
required: true,
|
||||
},
|
||||
to: {
|
||||
required: true,
|
||||
},
|
||||
start_date: {
|
||||
dateBefore: '#end_date',
|
||||
required: true
|
||||
},
|
||||
// end_date: {
|
||||
// dateAfter: '#start_date',
|
||||
// required: true
|
||||
// },
|
||||
start_time: {
|
||||
required: true
|
||||
}
|
||||
// end_time: {
|
||||
// required: true
|
||||
// }
|
||||
},
|
||||
onfocusout: function(element) {
|
||||
// "eager" validation
|
||||
// this.element(element);
|
||||
},
|
||||
errorPlacement: function ( error, element ) {
|
||||
if(element.parent().hasClass('input-group')){
|
||||
error.insertAfter( element.parent() );
|
||||
} else{
|
||||
error.insertAfter( element );
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
{{-- Google Map script --}}
|
||||
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAoZv-67UKDVz5Rp3fa3e2xcHunahFGKOc&libraries=places&callback=dummy"></script>
|
||||
<script>
|
||||
google.maps.event.addDomListener(window, 'load', initialize);
|
||||
function initialize() {
|
||||
var from = document.getElementById('from');
|
||||
var to = document.getElementById('to');
|
||||
var fromautocomplete = new google.maps.places.Autocomplete(from);
|
||||
var toautocomplete = new google.maps.places.Autocomplete(to);
|
||||
|
||||
fromautocomplete.addListener('place_changed', function () {
|
||||
var fromplace = fromautocomplete.getPlace();
|
||||
$('#from_latitude_show').val(fromplace.geometry['location'].lat());
|
||||
$('#from_longitude_show').val(fromplace.geometry['location'].lng());
|
||||
|
||||
$('#from_latitude').val(fromplace.geometry['location'].lat());
|
||||
$('#from_longitude').val(fromplace.geometry['location'].lng());
|
||||
|
||||
$("#fromLatitudeArea").removeAttr('hidden');
|
||||
$("#fromLongtitudeArea").removeAttr('hidden');
|
||||
});
|
||||
|
||||
toautocomplete.addListener('place_changed', function () {
|
||||
var toplace = toautocomplete.getPlace();
|
||||
$('#to_latitude_show').val(toplace.geometry['location'].lat());
|
||||
$('#to_longitude_show').val(toplace.geometry['location'].lng());
|
||||
|
||||
$('#to_latitude').val(toplace.geometry['location'].lat());
|
||||
$('#to_longitude').val(toplace.geometry['location'].lng());
|
||||
|
||||
$("#toLatitudeArea").removeAttr('hidden');
|
||||
$("#toLongtitudeArea").removeAttr('hidden');
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
205
resources/views/backend/sant/sant-vihar/edit.blade.php
Normal file
205
resources/views/backend/sant/sant-vihar/edit.blade.php
Normal file
@@ -0,0 +1,205 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('title',__('label.update_vihar_page_title').' | '.env('APP_NAME'))
|
||||
|
||||
@push('after-styles')
|
||||
@endpush
|
||||
|
||||
@section('breadcrumb')
|
||||
<div class="subheader py-2 py-lg-4 subheader-solid" id="kt_subheader">
|
||||
<div class="container-fluid d-flex align-items-center justify-content-between flex-wrap flex-sm-nowrap">
|
||||
<!--begin::Info-->
|
||||
<div class="d-flex align-items-center flex-wrap mr-1">
|
||||
<!--begin::Page Heading-->
|
||||
<div class="d-flex align-items-baseline mr-5">
|
||||
<!--begin::Page Title-->
|
||||
<!--end::Page Title-->
|
||||
<!--begin::Breadcrumb-->
|
||||
<ul class="breadcrumb breadcrumb-transparent breadcrumb-dot font-weight-bold p-0 my-2 font-size-sm">
|
||||
<li class="breadcrumb-item active">
|
||||
<a href="{{ route('admin.dashboard') }}" class="text-muted">{{ __('breadcrumb.dashboard') }}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active">
|
||||
<a href="{{ route('admin.sant.vihar.index', $sant->id) }}" class="text-muted">{{ __('breadcrumb.vihar') }}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item">
|
||||
{{ __('breadcrumb.edit_vihar') }}
|
||||
</li>
|
||||
</ul>
|
||||
<!--end::Breadcrumb-->
|
||||
</div>
|
||||
<!--end::Page Heading-->
|
||||
</div>
|
||||
<!--end::Info-->
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="card card-custom">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">
|
||||
{{ __('label.update_vihar_form_title') }}
|
||||
</h3>
|
||||
<div class="card-toolbar">
|
||||
<div class="example-tools justify-content-center">
|
||||
<span class="example-toggle" data-toggle="tooltip" title="View code"></span>
|
||||
<span class="example-copy" data-toggle="tooltip" title="Copy code"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--begin::Form-->
|
||||
{{ Form::model($vihar,['route' => ['admin.sant.vihar.update', $sant->id, $vihar->id],'method' => 'PATCH','id' => 'updateViharForm', 'files' => true]) }}
|
||||
@include('backend.sant.sant-vihar.partials._form')
|
||||
{{ Form::close() }}
|
||||
|
||||
<!--end::Form-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('after-scripts')
|
||||
@component('backend.layouts.components.validation')@endcomponent
|
||||
<script>
|
||||
function demo1() {
|
||||
|
||||
$('#start_time, #end_time').timepicker().on('changeTime.timepicker', function(e) {
|
||||
let timePicked = $(this).val();
|
||||
// only H:i
|
||||
(timePicked.length < 5) ? $(this).val("0" + timePicked) : '';
|
||||
});
|
||||
|
||||
$.validator.addMethod('validDate', function (value, element) {
|
||||
return this.optional(element) || /^(0?[1-9]|1[012])[ /](0?[1-9]|[12][0-9]|3[01])[ /][0-9]{4}$/.test(value);
|
||||
}, 'Please provide a date in the mm/dd/yyyy format');
|
||||
|
||||
$.validator.addMethod('dateBefore', function (value, element, params) {
|
||||
// if end date is valid, validate it as well
|
||||
var end = $(params);
|
||||
if (!end.data('validation.running')) {
|
||||
$(element).data('validation.running', true);
|
||||
setTimeout($.proxy(
|
||||
|
||||
function () {
|
||||
this.element(end);
|
||||
}, this), 0);
|
||||
// Ensure clearing the 'flag' happens after the validation of 'end' to prevent endless looping
|
||||
setTimeout(function () {
|
||||
$(element).data('validation.running', false);
|
||||
}, 0);
|
||||
}
|
||||
return this.optional(element) || this.optional(end[0]) || new Date(value) < new Date(end.val());
|
||||
|
||||
}, 'Must be before corresponding to date');
|
||||
|
||||
$.validator.addMethod('dateAfter', function (value, element, params) {
|
||||
// if start date is valid, validate it as well
|
||||
var start = $(params);
|
||||
if (!start.data('validation.running')) {
|
||||
$(element).data('validation.running', true);
|
||||
setTimeout($.proxy(
|
||||
|
||||
function () {
|
||||
this.element(start);
|
||||
}, this), 0);
|
||||
setTimeout(function () {
|
||||
$(element).data('validation.running', false);
|
||||
}, 0);
|
||||
}
|
||||
return this.optional(element) || this.optional(start[0]) || new Date(value) > new Date($(params).val());
|
||||
|
||||
}, 'Must be after corresponding from date');
|
||||
|
||||
$("#updateViharForm").validate({
|
||||
errorClass: 'is-invalid',
|
||||
normalizer: function(value) {
|
||||
return $.trim(value);
|
||||
},
|
||||
rules: {
|
||||
from: {
|
||||
required: true,
|
||||
},
|
||||
to: {
|
||||
required: true,
|
||||
},
|
||||
start_date: {
|
||||
dateBefore: '#end_date',
|
||||
required: true
|
||||
},
|
||||
// end_date: {
|
||||
// dateAfter: '#start_date',
|
||||
// required: true
|
||||
// },
|
||||
start_time: {
|
||||
required: true
|
||||
}
|
||||
// end_time: {
|
||||
// required: true
|
||||
// }
|
||||
},
|
||||
onfocusout: function(element) {
|
||||
// "eager" validation
|
||||
// this.element(element);
|
||||
},
|
||||
errorPlacement: function ( error, element ) {
|
||||
if(element.parent().hasClass('input-group')){
|
||||
error.insertAfter( element.parent() );
|
||||
} else{
|
||||
error.insertAfter( element );
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
demo1();
|
||||
let start_time = $("#start_time").val();
|
||||
let end_time = $("#end_time").val();
|
||||
// only H:i
|
||||
(start_time.length < 5) ? $("#start_time").val("0" + start_time) : '';
|
||||
(end_time.length < 5) ? $("#end_time").val("0" + end_time) : '';
|
||||
});
|
||||
</script>
|
||||
<script src="{{ asset('/js/pages/crud/forms/widgets/bootstrap-switch.js?v=7.2.8') }}"></script>
|
||||
|
||||
{{-- Google Map script --}}
|
||||
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAoZv-67UKDVz5Rp3fa3e2xcHunahFGKOc&libraries=places&callback=dummy"></script>
|
||||
<script>
|
||||
google.maps.event.addDomListener(window, 'load', initialize);
|
||||
function initialize() {
|
||||
var from = document.getElementById('from');
|
||||
var to = document.getElementById('to');
|
||||
var fromautocomplete = new google.maps.places.Autocomplete(from);
|
||||
var toautocomplete = new google.maps.places.Autocomplete(to);
|
||||
|
||||
fromautocomplete.addListener('place_changed', function () {
|
||||
var fromplace = fromautocomplete.getPlace();
|
||||
$('#from_latitude_show').val(fromplace.geometry['location'].lat());
|
||||
$('#from_longitude_show').val(fromplace.geometry['location'].lng());
|
||||
|
||||
$('#from_latitude').val(fromplace.geometry['location'].lat());
|
||||
$('#from_longitude').val(fromplace.geometry['location'].lng());
|
||||
|
||||
$("#fromLatitudeArea").removeAttr('hidden');
|
||||
$("#fromLongtitudeArea").removeAttr('hidden');
|
||||
});
|
||||
|
||||
toautocomplete.addListener('place_changed', function () {
|
||||
var toplace = toautocomplete.getPlace();
|
||||
$('#to_latitude_show').val(toplace.geometry['location'].lat());
|
||||
$('#to_longitude_show').val(toplace.geometry['location'].lng());
|
||||
|
||||
$('#to_latitude').val(toplace.geometry['location'].lat());
|
||||
$('#to_longitude').val(toplace.geometry['location'].lng());
|
||||
|
||||
$("#toLatitudeArea").removeAttr('hidden');
|
||||
$("#toLongtitudeArea").removeAttr('hidden');
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
198
resources/views/backend/sant/sant-vihar/list.blade.php
Normal file
198
resources/views/backend/sant/sant-vihar/list.blade.php
Normal file
@@ -0,0 +1,198 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('title',__('label.listing_vihar_table_title').' | '.env('APP_NAME'))
|
||||
|
||||
@push('after-styles')
|
||||
<!-- DataTables -->
|
||||
<link href="{{ asset('public/js/datatable/dataTables.bootstrap4.min.css') }}" rel="stylesheet" type="text/css"/>
|
||||
@endpush
|
||||
|
||||
@section('breadcrumb')
|
||||
<div class="subheader py-2 py-lg-4 subheader-solid" id="kt_subheader">
|
||||
<div class="container-fluid d-flex align-items-center justify-content-between flex-wrap flex-sm-nowrap">
|
||||
<!--begin::Info-->
|
||||
<div class="d-flex align-items-center flex-wrap mr-1">
|
||||
<!--begin::Page Heading-->
|
||||
<div class="d-flex align-items-baseline mr-5">
|
||||
<!--begin::Page Title-->
|
||||
<!--end::Page Title-->
|
||||
<!--begin::Breadcrumb-->
|
||||
<ul class="breadcrumb breadcrumb-transparent breadcrumb-dot font-weight-bold p-0 my-2 font-size-sm">
|
||||
<li class="breadcrumb-item active">
|
||||
<a href="{{ route('admin.dashboard') }}" class="text-muted">{{ __('breadcrumb.dashboard') }}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active">
|
||||
<a href="{{ route('admin.sant.index') }}" class="text-muted">{{ __('breadcrumb.sants') }}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item">
|
||||
{{ __('breadcrumb.vihar') }}
|
||||
</li>
|
||||
</ul>
|
||||
<!--end::Breadcrumb-->
|
||||
</div>
|
||||
<!--end::Page Heading-->
|
||||
</div>
|
||||
<!--end::Info-->
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-12">
|
||||
<div class="card card-custom">
|
||||
<div class="card-header flex-wrap border-0 pt-6 pb-0">
|
||||
<div class="card-title">
|
||||
<h3>{{ $sant->name.'\'s' ?? "" }} {{ __('label.listing_vihar_table_title') }}</h3>
|
||||
</div>
|
||||
|
||||
<div class="card-toolbar">
|
||||
<!--begin::Button-->
|
||||
<a href="{{ route('admin.sant.vihar.create', $sant->id) }}" class="btn btn-primary font-weight-bolder">
|
||||
<i class="fas fa-plus fa-sm"></i> {{ __('buttons.create_vihar') }}
|
||||
</a>
|
||||
<!--end::Button-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="mb-7">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-lg-12 col-xl-12">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-md-3 my-2 my-md-0">
|
||||
<div class="d-flex align-items-center">
|
||||
<label class="mr-3 mb-0 d-none d-md-block">{{ __('label.vihar_search_title')}}</label>
|
||||
{{ Form::text('from',null,['class' => 'form-control selectpicker datatable-input change-action','id' => 'title','title' => __('placeholder.vihar_search_title_placeholder')]) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 my-md-0">
|
||||
<button class="btn btn-secondary btn-secondary--icon" id="kt_reset" style="display: none">
|
||||
<span>
|
||||
<i class="la la-close"></i>
|
||||
<span>{{ __('buttons.reset') }}</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--begin: Selected Rows Group Action Form-->
|
||||
<div class="mb-2 multiple-actions" id="checkboxActionDropdown">
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="font-weight-bold text-danger mr-3">Selected
|
||||
<span id="datatableSelectedRecords">0</span> records:</div>
|
||||
<a href="javascript:void(0);" class="btn btn-sm btn-danger mr-2 action-type" data-value="delete">Delete All</a>
|
||||
</div>
|
||||
</div>
|
||||
<!--end: Selected Rows Group Action Form-->
|
||||
<div id="kt_datatable_wrapper" class="dataTables_wrapper dt-bootstrap4 no-footer admin-table">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="datatable datatable-default datatable-bordered datatable-loaded">
|
||||
<table class="datatable-bordered datatable-head-custom datatable-table table-hover"
|
||||
id="vihars-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<span style="width: 20px;">
|
||||
<label class="checkbox checkbox-single">
|
||||
<input type="checkbox"
|
||||
name="checkbox_action[]" id="checkbox-all"/> <span></span>
|
||||
</label>
|
||||
</span>
|
||||
</th>
|
||||
<th>{{ __('label.vihar_listing_heading_3') }}</th>
|
||||
<th>{{ __('label.vihar_listing_heading_4') }}</th>
|
||||
<th>{{ __('label.vihar_listing_heading_5') }}</th>
|
||||
<th>{{ __('label.vihar_listing_heading_7') }}</th>
|
||||
<th>{{ __('label.created_at') }}</th>
|
||||
<th>{{ __('label.vihar_listing_heading_9') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('after-scripts')
|
||||
<!-- DataTables -->
|
||||
<script src="{{ asset('public/js/datatable/jquery.dataTables.min.js') }}"></script>
|
||||
<script src="{{ asset('public/js/datatable/dataTables.bootstrap4.min.js') }}"></script>
|
||||
<script src="{{ asset('public/js/datatable/datatable-skeleton.js?v='.time()) }}"></script>
|
||||
<script>
|
||||
|
||||
$(document).on('keyup', '#title', function () {
|
||||
if ($('#title').val() === '') {
|
||||
$('#kt_reset').hide();
|
||||
} else {
|
||||
$('#kt_reset').show();
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '#kt_reset', function () {
|
||||
$('#kt_reset').hide();
|
||||
});
|
||||
|
||||
customDataTableWidget.configuration({
|
||||
element: '#vihars-table',
|
||||
listingUrl: "{{ route('admin.sant.vihar.get-listing', $sant->id) }}",
|
||||
deleteUrl: "{{ route('admin.sant.vihar.get-listing', $sant->id, ":id") }}",
|
||||
multipleActionUrl: "{{ route('admin.sant.vihar.grid.records.action', $sant->id) }}",
|
||||
columns: [
|
||||
{
|
||||
data: 'checkbox_action',
|
||||
name: 'checkbox_action',
|
||||
sortable: false
|
||||
},
|
||||
{
|
||||
data: 'from',
|
||||
name: 'from',
|
||||
searchable: true
|
||||
},
|
||||
{
|
||||
data: 'to',
|
||||
name: 'to',
|
||||
searchable: true
|
||||
},
|
||||
{
|
||||
data: 'start_date',
|
||||
name: 'start_date',
|
||||
},
|
||||
{
|
||||
data: 'start_time',
|
||||
name: 'start_time',
|
||||
},
|
||||
{
|
||||
data: 'created_at',
|
||||
name: 'created_at',
|
||||
},
|
||||
{
|
||||
data: 'action',
|
||||
name: 'action',
|
||||
sortable: false,
|
||||
class:'text-right ws-nowrap action-col'
|
||||
}
|
||||
],
|
||||
search: [
|
||||
{
|
||||
key: 'from',
|
||||
type: 'text'
|
||||
},
|
||||
],
|
||||
defaultSortingIndex: 3,
|
||||
defaultSortingOrder: 'desc'
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
102
resources/views/backend/sant/sant-vihar/partials/_form.blade.php
Normal file
102
resources/views/backend/sant/sant-vihar/partials/_form.blade.php
Normal file
@@ -0,0 +1,102 @@
|
||||
<div class="card-body">
|
||||
|
||||
<div class="form-group row">
|
||||
|
||||
<div class="col-md-6">
|
||||
<label>{{ __('label.vihar_from') }} <span class="text-danger">*</span></label>
|
||||
{{ Form::text('from',null,['class' => $errors->has('from') ? 'form-control is-invalid' : 'form-control', 'id' => 'from','placeholder' => __('placeholder.vihar_from')]) }}
|
||||
@error('from')
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<label>{{ __('label.vihar_to') }} <span class="text-danger">*</span></label>
|
||||
{{ Form::text('to',null,['class' => $errors->has('to') ? 'form-control is-invalid' : 'form-control', 'id' => 'to','placeholder' => __('placeholder.vihar_to')]) }}
|
||||
@error('to')
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-md-6 mt-3" id="fromLatitudeArea" hidden>
|
||||
<label>{{ __('label.from_latitude') }}</label>
|
||||
<input type="text" id="from_latitude_show" name="from_latitude_show" class="form-control" disabled>
|
||||
</div>
|
||||
<input type="hidden" id="from_latitude" name="from_latitude" class="form-control">
|
||||
|
||||
<div class="col-md-6 mt-3" id="fromLongtitudeArea" hidden>
|
||||
<label>{{ __('label.from_longitude') }}</label>
|
||||
<input type="text" name="from_longitude_show" id="from_longitude_show" class="form-control" disabled>
|
||||
</div>
|
||||
<input type="hidden" name="from_longitude" id="from_longitude" class="form-control">
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-md-6 mt-3" id="toLatitudeArea" hidden>
|
||||
<label>{{ __('label.to_latitude') }}</label>
|
||||
<input type="text" id="to_latitude_show" name="to_latitude_show" class="form-control" disabled>
|
||||
</div>
|
||||
<input type="hidden" id="to_latitude" name="to_latitude" class="form-control">
|
||||
|
||||
<div class="col-md-6 mt-3" id="toLongtitudeArea" hidden>
|
||||
<label>{{ __('label.to_longitude') }}</label>
|
||||
<input type="text" name="to_longitude_show" id="to_longitude_show" class="form-control" disabled>
|
||||
</div>
|
||||
<input type="hidden" name="to_longitude" id="to_longitude" class="form-control">
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-md-6">
|
||||
<label>{{ __('label.vihar_start_date') }} <span class="text-danger">*</span></label>
|
||||
<div class="input-group date">
|
||||
{{ Form::text('start_date',null,['id' => 'start_date', 'autocomplete' => 'off','class' => $errors->has('start_date') ? 'form-control date-picker is-invalid' : 'form-control date-picker','placeholder' => __('placeholder.vihar_start_date')]) }}
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">
|
||||
<i class="fas fa-calendar-alt"></i>
|
||||
</span>
|
||||
</div>
|
||||
@error('start_date')
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label>{{ __('label.vihar_start_time') }} <span class="text-danger">*</span></label>
|
||||
<div class="input-group">
|
||||
{{ Form::text('start_time',null,['id' => 'start_time', 'autocomplete' => 'off', 'readonly' => 'readonly','class' => $errors->has('start_time') ? 'form-control time-vihar is-invalid' : 'form-control','placeholder' => __('placeholder.vihar_start_time')]) }}
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">
|
||||
<i class="fas fa-clock"></i>
|
||||
</span>
|
||||
</div>
|
||||
@error('start_time')
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-2 col-form-label">{{ __('label.is_approved') }}</label>
|
||||
<div class="col-3">
|
||||
<span class="switch switch-outline switch-icon switch-primary">
|
||||
<label>
|
||||
{{ Form::checkbox('is_approved', $vihar->is_approved ?? null, isset($vihar->is_approved) && $vihar->is_approved == 1 ? 'checked' : 'checked') }}
|
||||
<span></span>
|
||||
</label>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="card-footer">
|
||||
<button type="submit" name="save" value="save" class="btn btn-primary mr-2">
|
||||
@if(\Request::route()->getName() == 'admin.sant.vihar.edit')
|
||||
{{ __('buttons.update') }}
|
||||
@else
|
||||
{{ __('buttons.save') }}
|
||||
@endif
|
||||
</button>
|
||||
<a href="{{ route('admin.sant.vihar.index', $sant->id) }}" class="btn btn-secondary">{{ __('buttons.cancel') }}</a>
|
||||
</div>
|
||||
Reference in New Issue
Block a user