migrate to gtea from bistbucket
This commit is contained in:
115
resources/views/admin/plans/create.blade.php
Normal file
115
resources/views/admin/plans/create.blade.php
Normal file
@@ -0,0 +1,115 @@
|
||||
@extends('layouts.master')
|
||||
|
||||
@section('title')
|
||||
{{ __('Add Subscription Plan') }}
|
||||
@endsection
|
||||
|
||||
@section('main_content')
|
||||
<div class="erp-table-section">
|
||||
<div class="container-fluid">
|
||||
<div class="card border-0">
|
||||
<div class="card-bodys">
|
||||
<div class="table-header p-16">
|
||||
<h4>{{__('Add new Package')}}</h4>
|
||||
@can('plans-read')
|
||||
<a href="{{ route('admin.plans.index') }}" class="add-order-btn rounded-2 {{ Route::is('admin.users.create') ? 'active' : '' }}"><i class="far fa-list me-1" aria-hidden="true"></i> {{ __('Package List') }}</a>
|
||||
@endcan
|
||||
</div>
|
||||
<div class="order-form-section p-16">
|
||||
<form action="{{ route('admin.plans.store') }}" method="POST" class="ajaxform_instant_reload">
|
||||
@csrf
|
||||
<div class="add-suplier-modal-wrapper d-block">
|
||||
<div class="row">
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Package Name') }}</label>
|
||||
<input type="text" name="subscriptionName" required class="form-control" placeholder="{{ __('Enter Package Name') }}">
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Duration in Days') }}</label>
|
||||
<input type="number" step="any" name="duration" required class="form-control" placeholder="{{ __('Enter number') }}">
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Offer Price') }}</label>
|
||||
<input type="number" step="any" name="offerPrice" class="form-control price" placeholder="{{ __('Enter Plan Price') }}">
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Subscription Price') }}</label>
|
||||
<input type="number" step="any" name="subscriptionPrice" required class="form-control discount" placeholder="{{ __('Enter Subscription Price') }}">
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 mb-2">
|
||||
<div class="col-lg-12 my-2">
|
||||
<label>{{ __('Status') }}</label>
|
||||
<div class="form-control d-flex justify-content-between align-items-center radio-switcher">
|
||||
<p class="dynamic-text">Active</p>
|
||||
<label class="switch m-0">
|
||||
<input type="checkbox" name="status" class="change-text" checked>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (moduleCheck('MultiBranchAddon'))
|
||||
<div class="col-lg-6 mb-2">
|
||||
<div class="col-lg-12 my-2">
|
||||
<label>{{ __('Multibranch Allowed') }}</label>
|
||||
<div class="form-control d-flex justify-content-between align-items-center radio-switcher">
|
||||
<p class="dynamic-text">Active</p>
|
||||
<label class="switch m-0">
|
||||
<input type="checkbox" name="allow_multibranch" class="change-text" checked>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (moduleCheck('CustomDomainAddon'))
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Custom Domain Limit') }}</label>
|
||||
<input type="number" min="0" name="addon_domain_limit" class="form-control" placeholder="{{ __('Enter Custom domain limit') }}">
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Subdomain Limit') }}</label>
|
||||
<input type="number" min="0" name="subdomain_limit" class="form-control" placeholder="{{ __('Enter Subdomain limit') }}">
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="col-lg-6 mt-2">
|
||||
<label>{{ __('Add New Features') }}</label>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control add-feature border-0 bg-transparent" placeholder="{{ __('Enter features') }}">
|
||||
<button class="feature-btn" id="feature-btn">{{ __('Save') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-12">
|
||||
<div class="row feature-list">
|
||||
{{-- Will added dynamically. --}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-12">
|
||||
<div class="button-group text-center mt-5">
|
||||
<button type="reset" class="theme-btn border-btn m-2">{{ __('Cancel') }}</button>
|
||||
<button class="theme-btn m-2 submit-btn">{{ __('Save') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('js')
|
||||
<script src="{{ asset('assets/js/custom/custom.js') }}"></script>
|
||||
@endpush
|
||||
99
resources/views/admin/plans/datas.blade.php
Normal file
99
resources/views/admin/plans/datas.blade.php
Normal file
@@ -0,0 +1,99 @@
|
||||
<div class="responsive-table m-0">
|
||||
<table class="table" id="datatable">
|
||||
<thead>
|
||||
<tr>
|
||||
@can('plans-delete')
|
||||
<th>
|
||||
<div class="d-flex align-items-center gap-3">
|
||||
<label class="table-custom-checkbox">
|
||||
<input type="checkbox" class="table-hidden-checkbox selectAllCheckbox">
|
||||
<span class="table-custom-checkmark custom-checkmark"></span>
|
||||
</label>
|
||||
<i class="fal fa-trash-alt delete-selected"></i>
|
||||
</div>
|
||||
</th>
|
||||
@endcan
|
||||
<th>{{ __('SL') }}.</th>
|
||||
<th class="text-start">{{ __('Subscription Name') }}</th>
|
||||
<th>{{ __('Duration') }}</th>
|
||||
<th>{{ __('Offer Price') }}</th>
|
||||
<th>{{ __('Subscription Price') }}</th>
|
||||
@if (moduleCheck('MultiBranchAddon'))
|
||||
<th>{{ __('Allow Multibranch') }}</th>
|
||||
@endif
|
||||
<th>{{ __('Status') }}</th>
|
||||
<th>{{ __('Action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($plans as $plan)
|
||||
<tr>
|
||||
@can('plans-delete')
|
||||
<td class="w-60 checkbox text-start">
|
||||
<label class="table-custom-checkbox">
|
||||
<input type="checkbox" name="ids[]" class="table-hidden-checkbox checkbox-item"
|
||||
value="{{ $plan->id }}" data-url="{{ route('admin.plans.delete-all') }}">
|
||||
<span class="table-custom-checkmark custom-checkmark"></span>
|
||||
</label>
|
||||
</td>
|
||||
@endcan
|
||||
<td>{{ $plans->perPage() * ($plans->currentPage() - 1) + $loop->iteration }}</td>
|
||||
<td class="text-start">{{ $plan->subscriptionName }} </td>
|
||||
<td>{{ $plan->duration }} </td>
|
||||
<td class="fw-bold text-dark">{{ $plan->offerPrice ? currency_format($plan->offerPrice) : '' }}
|
||||
</td>
|
||||
<td class="fw-bold text-dark">{{ currency_format($plan->subscriptionPrice) }} </td>
|
||||
|
||||
@if (moduleCheck('MultiBranchAddon'))
|
||||
<td>
|
||||
<div class="badge bg-{{ $plan->allow_multibranch == 1 ? 'success' : 'danger' }}">
|
||||
{{ $plan->allow_multibranch == 1 ? 'Yes' : 'No' }}
|
||||
</div>
|
||||
</td>
|
||||
@endif
|
||||
|
||||
<td>
|
||||
@can('plans-update')
|
||||
<label class="switch">
|
||||
<input type="checkbox" {{ $plan->status == 1 ? 'checked' : '' }} class="status"
|
||||
data-url="{{ route('admin.plans.status', $plan->id) }}">
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
@endcan
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<div class="dropdown table-action">
|
||||
<button type="button" data-bs-toggle="dropdown">
|
||||
<i class="far fa-ellipsis-v"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
@can('plans-update')
|
||||
<li>
|
||||
<a href="{{ route('admin.plans.edit', $plan->id) }}" class="">
|
||||
<i class="fal fa-edit"></i>
|
||||
{{ __('Edit') }}
|
||||
</a>
|
||||
</li>
|
||||
@endcan
|
||||
|
||||
@can('plans-delete')
|
||||
<li>
|
||||
<a href="{{ route('admin.plans.destroy', $plan->id) }}" class="confirm-action"
|
||||
data-method="DELETE">
|
||||
<i class="fal fa-trash-alt"></i>
|
||||
{{ __('Delete') }}
|
||||
</a>
|
||||
</li>
|
||||
@endcan
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="mt-3">
|
||||
{{ $plans->links('vendor.pagination.bootstrap-5') }}
|
||||
</div>
|
||||
137
resources/views/admin/plans/edit.blade.php
Normal file
137
resources/views/admin/plans/edit.blade.php
Normal file
@@ -0,0 +1,137 @@
|
||||
@extends('layouts.master')
|
||||
|
||||
@section('title')
|
||||
{{ __('Edit Subscription Plan') }}
|
||||
@endsection
|
||||
|
||||
@section('main_content')
|
||||
<div class="erp-table-section">
|
||||
<div class="container-fluid">
|
||||
<div class="card border-0">
|
||||
<div class="card-bodys shadow-sm">
|
||||
<div class="table-header p-16">
|
||||
<h4>{{__('Edit Package')}}</h4>
|
||||
@can('plans-read')
|
||||
<a href="{{ route('admin.plans.index') }}" class="add-order-btn rounded-2 {{ Route::is('admin.users.create') ? 'active' : '' }}"><i class="far fa-list" aria-hidden="true"></i> {{ __('Package List') }}</a>
|
||||
@endcan
|
||||
</div>
|
||||
<div class="order-form-section p-16">
|
||||
<form action="{{ route('admin.plans.update',$plan->id) }}" method="POST" class="ajaxform_instant_reload">
|
||||
@csrf
|
||||
@method('put')
|
||||
<div class="add-suplier-modal-wrapper d-block">
|
||||
<div class="row">
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Package Name') }}</label>
|
||||
<input value="{{$plan->subscriptionName}}" type="text" name="subscriptionName" required class="form-control" placeholder="{{ __('Enter Package Name') }}" @readonly($plan->subscriptionName == 'Free')>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Duration in Days') }}</label>
|
||||
<input value="{{$plan->duration}}" type="number" step="any" name="duration" required class="form-control" placeholder="{{ __('Enter Duration Days') }}">
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Offer Price') }}</label>
|
||||
<input value="{{$plan->offerPrice}}" type="number" step="any" name="offerPrice" class="form-control price" placeholder="{{ __('Enter Plan Price') }}" @readonly($plan->subscriptionName == 'Free')>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Subscription Price') }}</label>
|
||||
<input value="{{$plan->subscriptionPrice}}" type="number" step="any" name="subscriptionPrice" required class="form-control" placeholder="{{ __('Enter Subscription Price') }}" @readonly($plan->subscriptionName == 'Free')>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Status') }}</label>
|
||||
<div class="form-control d-flex justify-content-between align-items-center radio-switcher">
|
||||
<p class="dynamic-text">{{ $plan->status == 1 ? 'Active' : 'Deactive' }}</p>
|
||||
<label class="switch m-0">
|
||||
<input type="checkbox" name="status" class="change-text" {{ $plan->status == 1 ? 'checked' : '' }}>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@if (moduleCheck('MultiBranchAddon'))
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Multibranch Allowed') }}</label>
|
||||
<div class="form-control d-flex justify-content-between align-items-center radio-switcher">
|
||||
<p class="dynamic-text">{{ $plan->allow_multibranch == 1 ? 'Active' : 'Deactive' }}</p>
|
||||
<label class="switch m-0">
|
||||
<input type="checkbox" name="allow_multibranch" class="change-text" {{ $plan->allow_multibranch == 1 ? 'checked' : '' }}>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (moduleCheck('CustomDomainAddon'))
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Addon Domain Limit') }}</label>
|
||||
<input type="number" min="0" name="addon_domain_limit" value="{{ $plan->addon_domain_limit }}" class="form-control" placeholder="{{ __('Enter Addon Domain limit') }}">
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Subdomain Limit') }}</label>
|
||||
<input type="number" min="0" name="subdomain_limit" value="{{ $plan->subdomain_limit }}" class="form-control" placeholder="{{ __('Enter Subdomain limit') }}">
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if($plan->planSubscribes()->exists() && (moduleCheck('MultiBranchAddon') || moduleCheck('CustomDomainAddon')))
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Allow Existing Subscribers') }}</label>
|
||||
<div class="form-control d-flex justify-content-between align-items-center radio-switcher">
|
||||
<p class="dynamic-text">{{ __('Deactive') }}</p>
|
||||
<label class="switch m-0">
|
||||
<input type="checkbox" name="allow_existing_subscriber" class="change-text">
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<br>
|
||||
<div class="col-lg-6">
|
||||
<label>{{ __('Add New Features') }}</label>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control add-feature border-0 bg-transparent" placeholder="{{ __('Enter features') }}">
|
||||
<button class="feature-btn" id="feature-btn">{{ __('Save') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-12">
|
||||
<div class="row feature-list">
|
||||
@foreach ($plan->features ?? [] as $key => $item)
|
||||
<div class="col-lg-6 mt-4">
|
||||
<div class="form-control manage-plan d-flex justify-content-between align-items-center position-relative">
|
||||
<input name="features[features_{{ $key }}][]" required class="form-control subscription-plan-edit-custom-input" type="text" value="{{ $item[0] ?? '' }}">
|
||||
<div class="custom-manageswitch">
|
||||
<label class="switch m-0">
|
||||
<input type="checkbox" name="features[features_{{ $key }}][]" @checked(isset($item[1])) value="1">
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-12">
|
||||
<div class="button-group text-center mt-5">
|
||||
<button type="reset" class="theme-btn border-btn m-2">{{ __('Cancel') }}</button>
|
||||
<button class="theme-btn m-2 submit-btn">{{ __('Update') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('js')
|
||||
<script src="{{ asset('assets/js/custom/custom.js') }}"></script>
|
||||
@endpush
|
||||
64
resources/views/admin/plans/index.blade.php
Normal file
64
resources/views/admin/plans/index.blade.php
Normal file
@@ -0,0 +1,64 @@
|
||||
@extends('layouts.master')
|
||||
|
||||
@section('title')
|
||||
{{ __('Subscription Plan') }}
|
||||
@endsection
|
||||
|
||||
@section('main_content')
|
||||
<div class="erp-table-section">
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-bodys ">
|
||||
<div class="table-header p-16">
|
||||
<h4>{{__('Plan List')}}</h4>
|
||||
@can('plans-create')
|
||||
<a type="button" href="{{route('admin.plans.create')}}" class="add-order-btn rounded-2 {{ Route::is('admin.plans.create') ? 'active' : '' }}" class="btn btn-primary" ><i class="fas fa-plus-circle me-1"></i>{{ __('Create Plans') }}</a>
|
||||
@endcan
|
||||
</div>
|
||||
<div class="table-top-form p-16-0">
|
||||
<form action="{{ route('admin.plans.index') }}" method="GET" class="filter-form" table="#plans-data">
|
||||
|
||||
<div class="table-top-left d-flex gap-3 margin-l-16">
|
||||
<div class="gpt-up-down-arrow position-relative">
|
||||
<select name="per_page" class="form-control">
|
||||
<option @selected(request('per_page') == 20) value="20">{{ __('Show 20') }}</option>
|
||||
<option @selected(request('per_page') == 50) value="50">{{ __('Show 50') }}</option>
|
||||
<option @selected(request('per_page') == 100) value="100">{{ __('Show 100') }}</option>
|
||||
<option @selected(request('per_page') == 500) value="500">{{ __('Show 500') }}</option>
|
||||
</select>
|
||||
<span></span>
|
||||
</div>
|
||||
|
||||
<div class="table-search position-relative">
|
||||
<input class="form-control searchInput" type="text" name="search" placeholder="{{ __('Search...') }}" value="{{ request('search') }}">
|
||||
<span class="position-absolute">
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M14.582 14.582L18.332 18.332" stroke="#4D4D4D" stroke-width="1.25"
|
||||
stroke-linecap="round" stroke-linejoin="round" />
|
||||
<path
|
||||
d="M16.668 9.16797C16.668 5.02584 13.3101 1.66797 9.16797 1.66797C5.02584 1.66797 1.66797 5.02584 1.66797 9.16797C1.66797 13.3101 5.02584 16.668 9.16797 16.668C13.3101 16.668 16.668 13.3101 16.668 9.16797Z"
|
||||
stroke="#4D4D4D" stroke-width="1.25" stroke-linejoin="round" />
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="plans-data">
|
||||
@include('admin.plans.datas')
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@push('modal')
|
||||
@include('admin.components.multi-delete-modal')
|
||||
@endpush
|
||||
|
||||
@push('js')
|
||||
<script src="{{ asset('assets/js/custom/custom.js') }}"></script>
|
||||
@endpush
|
||||
Reference in New Issue
Block a user