@extends('layouts.main') @section('title') {{ __('Packages') }} @endsection @section('page-title')

@yield('title')

@endsection @section('content')
@if (has_permissions('create', 'package'))
{!! Form::open(['route' => 'package.store', 'data-parsley-validate', 'class' => 'create-form', 'data-success-function' => "formSuccessFunction"]) !!}
{{-- Package Name --}}
{{ Form::label('name', __('Package Name'), ['class' => 'form-label']) }} {{ Form::text('name', '', [ 'class' => 'form-control ', 'placeholder' => trans('Package Name'), 'data-parsley-required' => 'true', 'id' => 'name', ]) }}
{{-- Duration (Hidden - Fixed 30 days) --}} {{-- Package Type (Hidden - forced to Paid) --}} {{-- Purchase Type --}}
{{ Form::label('', __('Purchase Type'), ['class' => 'form-label col-12 ']) }} {{-- Unlimited --}} {{ Form::radio('purchase_type', 'unlimited', null, ['class' => 'form-check-input purchase-type', 'data-parsley-required' => 'true', 'id' => 'purchase-type-unlimited', 'checked' => true]) }} {{ Form::label('purchase-type-unlimited', __('Unlimited'), ['class' => 'form-check-label']) }} {{-- One Time --}} {{ Form::radio('purchase_type', 'one_time', null, ['class' => 'form-check-input purchase-type', 'data-parsley-required' => 'true', 'id' => 'purchase-type-one-time']) }} {{ Form::label('purchase-type-one-time', __('One Time'), ['class' => 'form-check-label']) }}
{{-- Is Managed Listing --}}
{{ Form::label('is_managed_listing', __('Lex Managed Listing'), ['class' => 'form-label']) }}
{{ Form::checkbox('is_managed_listing', '1', false, ['class' => 'form-check-input', 'id' => 'is_managed_listing']) }} {{ Form::label('is_managed_listing', __('Enable Lex Managed Listing (Commission-based)'), ['class' => 'form-check-label']) }}
{{ __('Price will be hidden on front website. Commission percentages will be configured by admin per customer after they select this plan.') }}
{{-- Is Add-on --}}
{{ Form::label('is_addon', __('Plan Type'), ['class' => 'form-label']) }}
{{ Form::checkbox('is_addon', '1', false, ['class' => 'form-check-input', 'id' => 'is_addon']) }} {{ Form::label('is_addon', __('Add-on Package'), ['class' => 'form-check-label']) }}
{{-- Price --}}
{{ Form::label('price', __('Price') . '(' . $currency_symbol . ')', ['class' => 'form-label']) }} {{ Form::number('price', '', [ 'class' => 'form-control ', 'placeholder' => trans('Price'), 'id' => 'price', 'data-parsley-required' => 'true', 'min' => '0', 'step' => '1', 'oninput' => 'this.value = Math.floor(this.value);' ])}}
{{-- Add-on Package Pricing --}}

{{-- Feature Section --}}
{{-- Select Feature --}}
{{-- Type --}}
{{ Form::label('', __('Type'), ['class' => 'form-label col-12 ']) }} {{-- Unlimited --}} {{ Form::radio('type', 'unlimited', true, ['class' => 'form-check-input feature-type feature-type-unlimited', 'required' => true, 'checked' => true]) }} {{ Form::label('', __('Unlimited'), ['class' => 'form-check-label feature-type-unlimited-label']) }} {{-- Limited --}} {{ Form::radio('type', 'limited', null, ['class' => 'form-check-input feature-type feature-type-limited', 'required' => true]) }} {{ Form::label('', __('Limited'), ['class' => 'form-check-label feature-type-limited-label']) }}
{{-- Hidden type input for selected_based features (always limited since no unlimited option) --}} {{-- Limited Value - Text Input (for regular features) --}} {{-- Limited Value - Dropdown (for fixed_value features) --}} {{-- Remove Option --}}

{{ Form::submit(trans('Add Package'), ['class' => 'center btn btn-primary', 'id' => 'btn_submit']) }}
{!! Form::close() !!}
@endif
@if (has_permissions('update', 'package') && has_permissions('delete', 'package')) @elseif (has_permissions('delete', 'package') && !has_permissions('update', 'package')) @else @endif
{{ __('ID') }} {{ __('Name') }} {{ __('Duration (In Days)') }} {{ __('Package Type') }} {{ __('Plan Type') }} {{ __('Price') }} {{ __('Features') }} {{ __('Enable/Disable') }} {{ __('Action') }} {{ __('Is Active ?') }} {{ __('Action') }} {{ __('Is Active ?') }}
@endsection @section('script') @endsection