Файловый менеджер - Редактировать - /home/clickysoft/public_html/somni.clickysoft.net/resources/views/landlord/unit/unit_create.blade.php
Назад
@extends('landlord.layouts.landlord') @section('links') <link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" /> @endsection @section('title', 'Landlord Dashboard - SOMNI') @section('content') <div class="main-section"> <x-landlord-side-nav /> <main class="layout-main"> <div class="content-wrapper"> <section class="profile-edit"> <div class="container-fluid custom-container"> <div class="row "> <div class="col-md-12"> <div class="main-db-layout"> <x-landlord-mobile-widget :user="$user" :notifications="$notifications" :nCount="$nCount" /> <!--Here--> <div class="row"> <div class="col-md-12 col-lg-12"> <div class="row"> <div class="col-md-12"> <div class="maintenance-card "> <div class="cfh-main"> <div class="cash-flow-head"> <h4>Add Unit To: {{$property->name}}</h4> </div> @if ($errors->any()) @foreach ($errors->all() as $error) <label class="row justify-content-center custom_error">{{ $error }}</label> @endforeach @endif </div> <div class="maintenance-table-main"> <form method="POST" class="add-unit-main" action="{{route('landlord.save.unit')}}" id="new_unit_form"> @csrf <input type="hidden" name="property_id" value="{{$property->id}}" /> <input type="hidden" name="payment_through" value="card" /> <input type="hidden" name="flag" value="{{$disabled_flag}}" /> <div class="form-group"> <label for="number">Name:<span>*</span></label> <input type="text" name="number" class="form-control" value="{{ old('number') }}" required> @error('number') <div class="alert alert-danger">{{ $message }}</div> @enderror <span class="text-danger" id="number-error" style="display: none;"></span> </div> <div class="form-group"> <label for="lease_term">Lease Term:<span>*</span></label> <select class="custom-select lease_term default_select select-selected" data-class="lease_term" name="lease_term" style="width: 100%" required> <option class="select-selected" value="" disabled selected>Please Select</option> @foreach(App\Models\Unit::LEASE_TERM_SELECT as $optionValue => $optionLabel) <option value="{{ $optionValue }}"> {{ $optionLabel }} </option> @endforeach </select> <span class="text-danger" id="lease_term-error" style="display: none;"></span> @if($errors->has('lease_term')) <span class="text-danger">{{ $errors->first('lease_term') }}</span> @endif </div> <div class="form-group"> <label for="layout_type">Unit Layout<span>*</span></label> <select class="custom-select layout_type default_select select-selected" data-class="layout_type" name="layout_type" style="width: 100%" required> <option class="select-selected" value="" disabled selected>Please Select</option> @foreach(App\Models\Unit::LAYOUT_TYPE as $optionValue => $optionLabel) <option value="{{ $optionValue }}"> {{ $optionLabel }} </option> @endforeach </select> <span class="text-danger" id="layout_type-error" style="display: none;"></span> @if($errors->has('layout_type')) <span class="text-danger">{{ $errors->first('layout_type') }}</span> @endif </div> <div class="form-group"> <label for="amenities">{{ trans('cruds.unit.fields.amenity') }}<span>*</span></label> <select class="form-control select2 select2_with_search {{ $errors->has('amenities') ? 'is-invalid' : '' }}" name="amenities[]" id="amenities" multiple required> <option class="" value="" disabled>Please Select</option> @foreach(\App\Models\Amenity::all() as $id => $amenity) <option value="{{ $amenity->id }}">{{ $amenity->name }}</option> @endforeach </select> <span class="text-danger" id="amenities[]-error" style="display: none;"></span> @if($errors->has('amenities')) <span class="text-danger">{{ $errors->first('amenities') }}</span> @endif </div> <div class="form-group"> <label for="datePicks2">Rent Due Date<span>*</span></label> <div class="input-group date customDate datepicker" id="datepicker2"> <input type="text" class=" border-0 p-0" id="date" placeholder="Choose Date" name="rent_due_date" value="{{ old('rent_due_date') }}" required> <span class="input-group-append"> <img src="{{asset('/images/mini-date.svg')}}" alt="" class="img-fluid"> </span> </div> <span class="text-danger" id="rent_due_date-error" style="display: none;"></span> @if($errors->has('rent_due_date')) <span class="text-danger">{{ $errors->first('rent_due_date') }}</span> @endif </div> <div class="form-group"> <label for="datePicks2">Date Available</label> <div class="input-group date customDate datepicker" id="datepickerAvailable"> <input type="text" class=" border-0 p-0" id="date" placeholder="Choose Date" name="available_date" value="{{ old('available_date') }}"> <span class="input-group-append"> <img src="{{asset('/images/mini-date.svg')}}" alt="" class="img-fluid"> </span> </div> <span class="text-danger" id="available_date-error" style="display: none;"></span> </div> <div class="form-group "> <label for="">Unit Size <span>*</span></label> <div class="login-fields"> <input type="text" placeholder="Enter size of unit" name="unit_size" value="{{ old('unit_size') }}" required> <div class="sq-ft-text"> <span>sq. ft.</span> </div> <span class="text-danger" id="unit_size-error" style="display: none;"></span> @if($errors->has('unit_size')) <span class="text-danger">{{ $errors->first('unit_size') }}</span> @endif </div> </div> <div class="form-group edit_unit_input"> <label for="">Monthly Rent <span>*</span></label> <div class="login-fields"> <div class="rent-field"> <div class="dollar-sign"> <p>$</p> </div> <input type="number" step=".01" placeholder="20.99" name="monthly_rent" value="{{ old('monthly_rent') }}" required> </div> <span class="text-danger" id="monthly_rent-error" style="display: none;"></span> @if($errors->has('monthly_rent')) <span class="text-danger">{{ $errors->first('monthly_rent') }}</span> @endif </div> </div> <div class="form-group edit_unit_input"> <label for="">Security Deposit <span>*</span></label> <div class="login-fields"> <div class="rent-field"> <div class="dollar-sign"> <p>$</p> </div> <input type="number" step=".01" placeholder="20.99" name="security_deposit" value="{{ old('security_deposit') }}" required> </div> <span class="text-danger" id="security_deposit-error" style="display: none;"></span> @if($errors->has('security_deposit')) <span class="text-danger">{{ $errors->first('security_deposit') }}</span> @endif </div> </div> <div class="form-group edit_unit_input"> <label for="">Number of Bedrooms<span>*</span></label> <select class="custom-select no_of_bedrooms default_select select-selected" data-class="no_of_bedrooms" name="no_of_bedrooms" style="width: 100%" required> <option class="select-selected" value="">Please Select</option> <option class="select-selected" value="1" {{ old('no_of_bedrooms') == '1' ? 'selected' : '' }}>1</option> <option class="select-selected" value="2" {{ old('no_of_bedrooms') == '2' ? 'selected' : '' }}>2</option> <option class="select-selected" value="3" {{ old('no_of_bedrooms') == '3' ? 'selected' : '' }}>3</option> <option class="select-selected" value="4" {{ old('no_of_bedrooms') == '4' ? 'selected' : '' }}>4</option> <option class="select-selected" value="5" {{ old('no_of_bedrooms') == '5' ? 'selected' : '' }}>5</option> <option class="select-selected" value="6" {{ old('no_of_bedrooms') == '6' ? 'selected' : '' }}>6</option> <option class="select-selected" value="7" {{ old('no_of_bedrooms') == '7' ? 'selected' : '' }}>7</option> <option class="select-selected" value="8" {{ old('no_of_bedrooms') == '8' ? 'selected' : '' }}>8</option> <option class="select-selected" value="9" {{ old('no_of_bedrooms') == '9' ? 'selected' : '' }}>9</option> <option class="select-selected" value="10"{{ old('no_of_bedrooms') == '10' ? 'selected' : '' }}>10</option> </select> <span class="text-danger" id="no_of_bedrooms-error" style="display: none;"></span> @if($errors->has('no_of_bedrooms')) <span class="text-danger">{{ $errors->first('no_of_bedrooms') }}</span> @endif </div> <div class="form-group edit_unit_input"> <label for="">Number of Bathrooms<span>*</span></label> <select class="custom-select no_of_bathrooms default_select select-selected" data-class="no_of_bathrooms" name="no_of_bathroom" style="width: 100%" required> <option class="select-selected" value="">Please Select</option> <option class="select-selected" value="1" {{ old('no_of_bathrooms') == '1' ? 'selected' : '' }}>1</option> <option class="select-selected" value="2" {{ old('no_of_bathrooms') == '2' ? 'selected' : '' }}>2</option> <option class="select-selected" value="3" {{ old('no_of_bathrooms') == '3' ? 'selected' : '' }}>3</option> <option class="select-selected" value="4" {{ old('no_of_bathrooms') == '4' ? 'selected' : '' }}>4</option> <option class="select-selected" value="5" {{ old('no_of_bathrooms') == '5' ? 'selected' : '' }}>5</option> <option class="select-selected" value="6" {{ old('no_of_bathrooms') == '6' ? 'selected' : '' }}>6</option> <option class="select-selected" value="7" {{ old('no_of_bathrooms') == '7' ? 'selected' : '' }}>7</option> <option class="select-selected" value="8" {{ old('no_of_bathrooms') == '8' ? 'selected' : '' }}>8</option> <option class="select-selected" value="9" {{ old('no_of_bathrooms') == '9' ? 'selected' : '' }}>9</option> <option class="select-selected" value="10" {{ old('no_of_bathrooms') == '10' ? 'selected' : '' }}>10</option> </select> <span class="text-danger" id="no_of_bathroom-error" style="display: none;"></span> @if($errors->has('no_of_bathrooms')) <span class="text-danger">{{ $errors->first('no_of_bathrooms') }}</span> @endif </div> {{-- <div class="form-group description_edit_unit"> <label for="">Description<span>*</span></label> <textarea name="description">{{ old('description') }}</textarea> @if($errors->has('description')) <span class="text-danger">{{ $errors->first('description') }}</span> @endif </div> --}} <div class="form-group submit_btn"> @if ($disabled_flag == 2) <button type="button" class="transaction-view-btn payment_first">Save</button> @elseif($disabled_flag == 1) <label class="disabled transaction-view-btn" disabled>Disabled</label> <p class="error mt-3">You Can not have more units. Units limit reached!</p> {{-- <button type="submit" class="transaction-view-btn">Save</button> --}} @else <button type="submit" class="transaction-view-btn">Save</button> @endif </div> <!--MODAL--> <div class="modal fade center-modal" id="paymentExtraUnit" tabindex="-1" role="dialog" aria-labelledby="eventModalLabel" aria-hidden="true"> <div class="modal-dialog modal-lg md-event-dialog" role="document"> <div class="modal-content md-event-modal"> <div class="modal-body p-0"> <div class="justify-content-center"> <div class="plnsbs-content"> @if ($disabled_flag == 2) <div class="pln-card-fields pd-confirm-head"> <h4>Please Pay ${{ (number_format(\App\Helpers\Helper::getPercentageAmount(config('constants.payment.card_percentage'),$package->extra_unit_charges),2)) + number_format($package->extra_unit_charges,2)}}</h4> <p><strong>Per Unit:</strong> <span>${{number_format($package->extra_unit_charges,2)}}</span></p> <p><strong>Payment Charges:</strong> <span>${{number_format(\App\Helpers\Helper::getPercentageAmount(config('constants.payment.card_percentage'),$package->extra_unit_charges),2)}}</span></p> <p><strong>Total:</strong> <span>${{ (number_format(\App\Helpers\Helper::getPercentageAmount(config('constants.payment.card_percentage'),$package->extra_unit_charges),2)) + number_format($package->extra_unit_charges,2)}}</span></p> </div> @endif <div class="pln-card-fields"> <label for="cardholder-name">Cardholder’s Name</label> <input type="text" placeholder="John Doe" id="cardholder-name" class="debit-fields" name="holder_name" value="{{old('holder_name')}}"> </div> <div class="pln-card-fields"> <label for="cardholder-name">Card Details</label> <div id="card-element-payment" class="col-md-12 pt-4 pb-4"> </div> </div> <div class="row"> <div class="col-md-12"> <div class="purchase-button"> <button type="submit" id="payment-for-new-unit" class="smssg-btn" data-secret="{{$intent->client_secret }}">Pay</button> </div> </div> </div> </div> </div> </div> </div> </div> </div> <!--END MODAL--> </form> </div> </div> </div> </div> </div> </div> </div> </div> </div> </section> </div> </main> </div> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> <script src="https://www.gstatic.com/firebasejs/8.3.2/firebase.js"></script> <link href="https://cdn.jsdelivr.net/npm/sweetalert2@11.7.27/dist/sweetalert2.min.css" rel="stylesheet"> <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11.7.27/dist/sweetalert2.all.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/js/bootstrap-datepicker.min.js"></script> <script src="{{asset('/js/global.js')}}"></script> <script src="{{asset('/js/dashboard-overview.js')}}"></script> <script src="{{asset('/js/add_unit.js')}}"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/js/toastr.min.js"></script> @if(!empty($verification)) <x-email-verification-popup :verification=$verification /> @endif <script src="https://js.stripe.com/v3/"></script> <script> const stripe = Stripe('{{ config("constants.stripe.public_key") }}') var style = { base: { color: "#045ad0", fontFamily: 'Proxima-Nova, sans-serif', fontSize: '16px', padding: '40px', // backgroundColor: '#f5f5f5', } }; const elements = stripe.elements() $(document).on('click','.payment_first',function(e){ // alert('accordian hai ye'); e.preventDefault(); var go_ahead = validateForm('new_unit_form'); if(!go_ahead){ return 0; } // swalPop('success',"check",'Ok so lets moved forward Alhamdulillah'); $("#paymentExtraUnit").modal('show'); const cardElement = elements.create('card', {hidePostalCode: true, style: style }) cardElement.mount('#card-element-payment') var form = document.getElementById('new_unit_form'); form.addEventListener('submit', function(event) { event.preventDefault(); stripe.createPaymentMethod({ type: 'card', card: cardElement, }).then(function(result) { if (result.error) { // Handle error } else { // Send the result.paymentMethod.id to your server var paymentMethodId = result.paymentMethod.id; // Include the paymentMethodId in your form submission var hiddenInput = document.createElement('input'); hiddenInput.setAttribute('type', 'hidden'); hiddenInput.setAttribute('name', 'paymentMethodId'); hiddenInput.setAttribute('value', paymentMethodId); form.appendChild(hiddenInput); // Submit the form to your Laravel application form.submit(); } }); }); }); $('.saved_card_form').on('submit', function(event){ event.preventDefault(); var amountRadioButton = $('input[name="amount"]:checked'); if (amountRadioButton.length > 0) { // The radio button is selected $(this).unbind('submit').submit(); } else { // The radio button is not selected // console.log("Radio button is not selected"); swalPop('warning','Please Select Payment Type First'); return 0; } }); function validateForm(id) { var form = document.getElementById(id); var fields = form.querySelectorAll('[required]'); var isValid = true; $('.text-danger').css('display',' none'); fields.forEach(function(field) { var fieldName = field.name; // console.log('field name: ',fieldName); var errorDiv = document.getElementById(fieldName + '-error'); if (!field.value.trim()) { field.classList.add('required-field'); errorDiv.innerHTML = 'This field is required.'; isValid = false; errorDiv.style.display = 'block'; } else { field.classList.remove('required-field'); errorDiv.innerHTML = ''; errorDiv.style.display = 'none'; } }); return isValid; } </script> @if(\Session::has('success')) <script> toastr.options = { "closeButton": true, "debug": false, "newestOnTop": false, "progressBar": false, "positionClass": "toast-top-right", "preventDuplicates": false, "onclick": null, "showDuration": "300", "hideDuration": "1000", "timeOut": "5000", "extendedTimeOut": "1000", "showEasing": "swing", "hideEasing": "linear", "showMethod": "fadeIn", "hideMethod": "fadeOut" } toastr.success('{!! \Session::get("success") !!}'); </script> @endif @if(\Session::has('error')) <script> toastr.options = { "closeButton": true, "debug": false, "newestOnTop": false, "progressBar": false, "positionClass": "toast-top-right", "preventDuplicates": false, "onclick": null, "showDuration": "300", "hideDuration": "1000", "timeOut": "5000", "extendedTimeOut": "1000", "showEasing": "swing", "hideEasing": "linear", "showMethod": "fadeIn", "hideMethod": "fadeOut" } toastr.error('{!! \Session::get("error") !!}'); </script> @endif @endsection
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка