Fixes for ordering, the themes are in frontend.metronic, not backend.adminlte
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 34s
Create Docker Image / Final Docker Image Manifest (push) Successful in 9s

This commit is contained in:
2024-08-15 21:30:34 +10:00
parent b4c7c3ad20
commit 5f66987a3e
15 changed files with 61 additions and 176 deletions

View File

@@ -1,3 +1,5 @@
@use(App\Models\Product)
@extends('metronic::layouts.app')
@section('htmlheader_title')
@@ -184,13 +186,13 @@
<select class="form-control" id="product_id" name="product_id">
<option value="">&nbsp;</option>
@php
$po = $selected = NULL;
$pdo = $selected = NULL;
@endphp
@foreach (\App\Models\Product::active()->get()->sortBy('name') as $o)
@foreach (Product::active()->get()->sortBy('name') as $o)
@php
if ($o->id == old('product_id')) {
$selected = 'selected';
$po = $o;
$pdo = $o;
} else {
$selected = NULL;
}
@@ -204,7 +206,7 @@
<div class="col-sm-6" id="product_info">
@if(old('product_id'))
@include('theme.frontend.metronic.order.widget.info',['o'=>$po])
@include('theme.frontend.metronic.order.widget.info',['pdo'=>$pdo])
@endif
</div>
</div>
@@ -212,7 +214,7 @@
<div class="row">
<div class="col-sm-12" id="product_order">
@if(old('product_id'))
@include('theme.frontend.metronic.order.widget.order',['o'=>$po])
@include('theme.frontend.metronic.order.widget.order',['pdo'=>$pdo])
@endif
</div>
</div>

View File

@@ -1,9 +1,9 @@
<!-- $o = Product::class [{{$o->category}}]-->
@if(View::exists('order.widget.info.'.$o->category))
<!-- $pdo=Product::class [{{$pdo->category}}]-->
@if(View::exists('theme.frontend.metronic.order.widget.info.'.$pdo->category))
<div class="box box-primary">
<div class="box-body">
{{-- Return Category Requirements --}}
@include('theme.frontend.metronic.order.widget.info.'.$o->category)
@include('theme.frontend.metronic.order.widget.info.'.$pdo->category)
{{-- Return Supplier Requirements --}}
{{-- Return Product Requirements --}}

View File

@@ -1,37 +1,37 @@
<!-- $o = Product::class -->
<!-- $pdo=Product::class -->
<div class="col-md-12">
<p>{!! $o->name !!}</p>
<p>{!! $pdo->name !!}</p>
</div>
<table class="table table-condensed">
<tr>
<th>Type</th>
<td class="text-right">{{ $o->category_name }}</td>
<td class="text-right">{{ $pdo->category_name }}</td>
</tr>
@if ($o->setup_charge)
@if ($pdo->setup_charge)
<tr>
<th>Setup Charges <sup>*</sup></th>
{{-- @todo this should use account::taxed() when the user is known --}}
<td class="text-right">${{ number_format($user->exists ? Config::get('site')->taxed($o->setup_charge) : Config::get('site')->taxed($o->setup_charge),2) }}</td>
<td class="text-right">${{ number_format($user->exists ? Config::get('site')->taxed($pdo->setup_charge) : Config::get('site')->taxed($pdo->setup_charge),2) }}</td>
</tr>
@endif
<tr>
<th>Cost <sup>+</sup></th>
{{-- @todo this should use account::taxed() when the user is known --}}
<td class="text-right">${{ number_format($user->exists ? Config::get('site')->taxed($o->base_charge) : Config::get('site')->taxed($o->base_charge),2) }}</td>
<td class="text-right">${{ number_format($user->exists ? Config::get('site')->taxed($pdo->base_charge) : Config::get('site')->taxed($pdo->base_charge),2) }}</td>
</tr>
<tr>
<th>Default Billing</th>
<td class="text-right">{{ $o->billing_interval_string }}</td>
<td class="text-right">{{ $pdo->billing_interval_string }}</td>
</tr>
<tr>
<th>Contract Term</th>
<td class="text-right">{{ $o->contract_term }} mths</td>
<td class="text-right">{{ $pdo->contract_term }} mths</td>
</tr>
<tr>
<th>Minimum Costs <sup>+*</sup></th>
{{-- @todo this should use account::taxed() when the user is known --}}
<td class="text-right">${{ number_format($user->exists ? Config::get('site')->taxed($o->min_charge) : Config::get('site')->taxed($o->min_charge),2) }}</td>
<td class="text-right">${{ number_format($user->exists ? Config::get('site')->taxed($pdo->min_charge) : Config::get('site')->taxed($pdo->min_charge),2) }}</td>
</tr>
<tfoot>

View File

@@ -1,4 +1,4 @@
<!-- $o = Product::class -->
<!-- $pdo=Product::class -->
@include('theme.frontend.metronic.order.widget.info.base',['footer'=>'
<sup>
* Additional setup charges may apply for complex installations.<br>

View File

@@ -1,4 +1,4 @@
<!-- $o = Product::class -->
<!-- $pdo=Product::class -->
@include('theme.frontend.metronic.order.widget.info.base',['footer'=>'
<sup>
* Depends on domain availability.<br>

View File

@@ -1,4 +1,4 @@
<!-- $o = Product::class -->
<!-- $pdo=Product::class -->
@include('theme.frontend.metronic.order.widget.info.base',['footer'=>'
<sup>
* Depends on domain availability.<br>

View File

@@ -1,4 +1,4 @@
<!-- $o = Product::class -->
<!-- $pdo=Product::class -->
@include('theme.frontend.metronic.order.widget.info.base',['footer'=>'
<sup>
* Depends on domain availability.<br>

View File

@@ -1,4 +1,4 @@
<!-- $o = Product::class -->
<!-- $pdo=Product::class -->
@include('theme.frontend.metronic.order.widget.info.base',['footer'=>'
<sup>
* Depends on complex porting.<br>

View File

@@ -1,5 +1,5 @@
<!-- $o = Product::class [{{$o->category}}] -->
@if(View::exists('order.widget.order.'.$o->category))
<!-- $pdo=Product::class [{{$pdo->category}}] -->
@if(View::exists('theme.frontend.metronic.order.widget.order.'.$pdo->category))
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">Order Configuration</h3>
@@ -7,7 +7,7 @@
<div class="box-body">
{{-- Return Category Requirements --}}
@include('theme.frontend.metronic.order.widget.order.'.$o->category)
@include('theme.frontend.metronic.order.widget.order.'.$pdo->category)
{{-- Return Supplier Requirements --}}
{{-- Return Product Requirements --}}

View File

@@ -1,5 +1,5 @@
<fieldset class="form-group col-sm-12">
<label>ADSL</label>
<label>BROADBAND</label>
<div class="form-group col-sm-12 {{ $errors->has('options.address') ? 'has-error' : '' }}">
<label for="options.address">Site Address</label>

View File

@@ -1,3 +1,5 @@
@use(App\Models\TLD)
<fieldset class="form-group">
<label class="col-md-12">DOMAIN</label>
@@ -10,8 +12,8 @@
<div class="form-group col-sm-6 {{ $errors->has('options.tld_id') ? 'has-error' : '' }}">
<label for="options.tld_id">Domain TLD</label>
<select style="width:25%;" class="form-control @error('options.tld_id') is-invalid @enderror" id="options.tld_id" name="options[tld_id]">
@foreach(\App\Models\TLD::orderBy('name')->get() as $oo)
<option value="{{ $oo->id }}" @if($oo->id == old('options.tld_id',$o->tld_id))selected @endif>{{ $oo->name }}</option>
@foreach(TLD::orderBy('name')->get() as $oo)
<option value="{{ $oo->id }}" @selected($oo->id == old('options.tld_id',$pdo->tld_id))>{{ $oo->name }}</option>
@endforeach
</select>
<span class="help-block">{{ $errors->first('options.tld') }}</span>