add edit and delete data tax
This commit is contained in:
34
resources/views/taxation/edit.blade.php
Normal file
34
resources/views/taxation/edit.blade.php
Normal file
@@ -0,0 +1,34 @@
|
||||
@extends('layouts.vertical', ['subtitle' => 'Data'])
|
||||
|
||||
@section('content')
|
||||
|
||||
@include('layouts.partials/page-title', ['title' => 'Data', 'subtitle' => 'PDAM'])
|
||||
|
||||
<x-toast-notification />
|
||||
<input type="hidden" id="menuId" value="{{ $menuId ?? 0 }}">
|
||||
<div class="row d-flex justify-content-center">
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-header d-flex justify-content-end">
|
||||
<a href="{{ route('taxation', ['menu_id' => $menuId]) }}" class="btn btn-sm btn-secondary">Back</a>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form id="formUpdateTax" action="{{ route('api.taxs.update', $data->id) }}" method="post">
|
||||
@csrf
|
||||
@method('put')
|
||||
@include('taxation.form')
|
||||
<button type="button" class="btn btn-primary" id="btnUpdateTax">
|
||||
<span id="spinner" class="spinner-border spinner-border-sm me-1 d-none" role="status" aria-hidden="true"></span>
|
||||
Update
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
@vite(['resources/js/taxation/edit.js'])
|
||||
@endsection
|
||||
40
resources/views/taxation/form.blade.php
Normal file
40
resources/views/taxation/form.blade.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="tax_no">Tax No</label>
|
||||
<input type="text" id="tax_no" name="tax_no" class="form-control" placeholder="Enter tax_no" value="{{ old('tax_no', $data->tax_no ?? '') }}" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="tax_code">Tax Code</label>
|
||||
<input type="text" id="tax_code" name="tax_code" class="form-control" placeholder="Enter tax_code" value="{{ old('tax_code', $data->tax_code ?? '') }}" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="wp_name">WP Name</label>
|
||||
<input type="text" id="wp_name" name="wp_name" class="form-control" placeholder="Enter wp_name" value="{{ old('wp_name', $data->wp_name ?? '') }}" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="business_name">Business Name</label>
|
||||
<input type="text" id="business_name" name="business_name" class="form-control" placeholder="Enter business_name" value="{{ old('business_name', $data->business_name ?? '') }}" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="address">Address</label>
|
||||
<textarea class="form-control" id="address" name="address" rows="5" required>{{ old('address', $data->address ?? '') }}</textarea>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="start_validity">Start Validity</label>
|
||||
<input type="date" id="start_validity" name="start_validity" class="form-control" placeholder="Enter start_validity" value="{{ old('start_validity', $data->start_validity ?? '') }}" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="end_validity">End Validity</label>
|
||||
<input type="date" id="end_validity" name="end_validity" class="form-control" placeholder="Enter end_validity" value="{{ old('end_validity', $data->end_validity ?? '') }}" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="tax_value">Tax Value</label>
|
||||
<input type="number" id="tax_value" name="tax_value" class="form-control" placeholder="Enter tax_value" value="{{ old('tax_value', $data->tax_value ?? '') }}" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="subdistrict">Subdistrict</label>
|
||||
<input type="text" id="subdistrict" name="subdistrict" class="form-control" placeholder="Enter subdistrict" value="{{ old('subdistrict', $data->subdistrict ?? '') }}" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="village">Village</label>
|
||||
<input type="text" id="village" name="village" class="form-control" placeholder="Enter village" value="{{ old('village', $data->village ?? '') }}" required>
|
||||
</div>
|
||||
@@ -21,10 +21,14 @@
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="d-flex flex-wrap justify-content-end align-items-center mb-2">
|
||||
<a href="{{ route('taxation.upload', ['menu_id' => $menuId]) }}" class="btn btn-primary btn-sm d-block d-sm-inline w-auto">Upload</a>
|
||||
@if ($creator)
|
||||
<a href="{{ route('taxation.upload', ['menu_id' => $menuId]) }}" class="btn btn-primary btn-sm d-block d-sm-inline w-auto">Upload</a>
|
||||
@endif
|
||||
</div>
|
||||
<div>
|
||||
<div id="table-taxation"></div>
|
||||
<div id="table-taxation" data-updater="{{ $updater }}"
|
||||
data-destroyer="{{ $destroyer }}"
|
||||
data-menuId="{{ $menuId }}"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user