@extends('layouts.core.backend', [ 'menu' => 'plan', ]) @section('title', $plan->name) @section('head') @endsection @section('page_header')

{{ $plan->name }}

@endsection @section('content') @include('admin.plans._menu', [ 'menu' => 'general', ])
{{ csrf_field() }}

{{ trans('messages.plan.general.overview') }}

{{ trans('messages.plan.general.details.intro') }}

{{ $plan->name }}

{{ trans('messages.plan') }}

{{ $plan->displayPrice() }}

{{ trans('messages.plan.quota_time.wording', [ 'amount' => number_with_delimiter($plan->frequency_amount, $precision = 0), 'unit' => trans('messages.' . $plan->frequency_unit), ]) }}

{{ $plan->displayTotalQuota() }}

{{ trans('messages.plan.sending_credits') }}

{{ trans('messages.plan.general.details') }}

@if (Acelle\Model\Plugin::isInstalled('acelle/chatgpt') && Acelle\Model\Plugin::getByName('acelle/chatgpt')->isActive()) @include('admin.chat._plan_name', [ 'name' => 'plan[general][name]', 'value' => $plan->name, ]) @include('admin.chat._plan_description', [ 'name' => 'plan[general][description]', 'value' => $plan->description, ]) @else @include('helpers.form_control', [ 'type' => 'text', 'name' => 'plan[general][name]', 'label' => trans('messages.plan.name'), 'value' => $plan->name, 'help_class' => 'plan', 'rules' => $plan->generalRules() ]) @include('helpers.form_control', [ 'type' => 'text', 'name' => 'plan[general][description]', 'label' => trans('messages.plan.description'), 'value' => $plan->description, 'help_class' => 'plan', 'rules' => $plan->generalRules(), ]) @endif @include('helpers.form_control', [ 'class' => 'numeric', 'type' => 'text', 'name' => 'plan[general][price]', 'label' => trans('messages.plan.price'), 'value' => $plan->price, 'help_class' => 'plan', 'rules' => $plan->generalRules() ]) @include('helpers.form_control', [ 'type' => 'select_ajax', 'name' => 'plan[general][currency_id]', 'label' => trans('messages.plan.currency'), 'selected' => [ 'value' => $plan->currency_id, 'text' => $plan->currency ? $plan->currency->displayName() : '' ], 'help_class' => 'plan', 'rules' => $plan->generalRules(), 'url' => action('Admin\CurrencyController@select2'), 'placeholder' => trans('messages.select_currency') ])
@include ('admin.plans._billing_cycle', [ 'plan' => $plan, ])
@include('helpers.form_control.checkbox', [ 'name' => 'has_trial', 'value' => 'yes', 'label' => trans('messages.plan.has_trial_period'), 'attributes' => [ 'class' => 'numeric', 'checked' => $plan->hasTrial() ? 'checked' : false ], ])
@include('helpers.form_control.number', [ 'name' => 'plan[general][trial_amount]', 'value' => $plan->trial_amount, 'attributes' => [ 'class' => 'numeric', 'min' => '0', ], ])
@include('helpers.form_control', [ 'type' => 'select', 'name' => 'plan[general][trial_unit]', 'value' => $plan->trial_unit, 'options' => $plan->timeUnitOptions(), 'help_class' => 'plan', ])
@include('helpers.form_control', [ 'class' => '', 'type' => 'checkbox2', 'name' => 'plan[general][own_tracking_domain_required]', 'label' => trans('messages.plan.own_tracking_domain_required'), 'help' => trans('messages.plan.own_tracking_domain_required.help'), 'value' => $plan->own_tracking_domain_required, 'options' => ['0','1'], 'help_class' => 'plan', 'rules' => $plan->generalRules() ])
{{ trans('messages.cancel') }}
@endsection