feature: form edit

This commit is contained in:
antv
2026-07-10 08:16:20 +07:00
parent 326e1f1028
commit a1ad7e738b
14 changed files with 509 additions and 165 deletions
@@ -1,17 +0,0 @@
@extends('layouts.app')
@section('title', 'Thêm User Mới')
@section('content')
<div class="mb-6 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 pl-1">
<div>
<h1 class="text-[28px] font-extrabold text-[#1a2b49] flex items-center gap-2 mb-1.5 tracking-tight">
Thêm User Mới
</h1>
<p class="text-gray-500 font-medium text-[14px]">
Tạo tài khoản nhân viên mới thiết lập các thông tin bản.
</p>
</div>
</div>
<x-user-page mode="create" />
@endsection
@@ -1,17 +0,0 @@
@extends('layouts.app')
@section('title', 'Chi tiết User')
@section('content')
<div class="mb-6 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 pl-1">
<div>
<h1 class="text-[28px] font-extrabold text-[#1a2b49] flex items-center gap-2 mb-1.5 tracking-tight">
Chi tiết User
</h1>
<p class="text-gray-500 font-medium text-[14px]">
Quản thông tin thẻ theo dõi lịch sử nhận gửi của nhân viên.
</p>
</div>
</div>
<x-user-page mode="edit" :user="$user" :administrations="$administrations" :selectedMonth="$selectedMonth" :addCards="$addCards" :admins="$admins" />
@endsection
@@ -0,0 +1,23 @@
@extends('layouts.app')
@section('title', $mode === 'create' ? 'Thêm User Mới' : 'Chi tiết User')
@section('content')
<div class="mb-6 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 pl-1">
<div>
<h1 class="text-[28px] font-extrabold text-[#1a2b49] flex items-center gap-2 mb-1.5 tracking-tight">
{{ $mode === 'create' ? 'Thêm User Mới' : 'Chi tiết User' }}
</h1>
<p class="text-gray-500 font-medium text-[14px]">
{{ $mode === 'create' ? 'Tạo tài khoản nhân viên mới và thiết lập các thông tin cơ bản.' : 'Quản lý thông tin thẻ và theo dõi lịch sử nhận gửi của nhân viên.' }}
</p>
</div>
</div>
<x-user-page :mode="$mode" :user="$user ?? null" :administrations="$administrations ?? null" :selectedMonth="$selectedMonth ?? null" :addCards="$addCards ?? null" :admins="$admins ?? null" />
@endsection
@push('modals')
@if($mode === 'edit' && $user)
<x-confirm-modal id="deleteModal" title="Xác nhận nghỉ việc" confirmText="Xác nhận Nghỉ việc" />
@endif
@endpush
+2 -2
View File
@@ -63,9 +63,9 @@
<x-slot name="footer">
<form action="{{ route('admin.reset_cards') }}" method="POST" class="w-full sm:w-auto">
@csrf
<button type="submit" class="w-full btn-primary !px-6 shadow-sm bg-red-600 hover:bg-red-700">Đồng ý Reset</button>
<button type="submit" class="w-full sm:w-auto inline-flex items-center justify-center bg-red-600 hover:bg-red-700 text-white font-bold py-2.5 px-6 rounded-xl text-sm transition-colors shadow-md shadow-red-500/10 min-w-[120px] h-[42px]">Đồng ý Reset</button>
</form>
<button type="button" onclick="closeModal('resetModal')" class="w-full sm:w-auto btn-secondary !px-6 shadow-sm">Hủy bỏ</button>
<button type="button" onclick="closeModal('resetModal')" class="w-full sm:w-auto inline-flex items-center justify-center bg-white border border-[#d9dfe7] hover:bg-gray-50 text-[#1a2b49] font-bold py-2.5 px-6 rounded-xl text-sm transition-colors shadow-sm min-w-[120px] h-[42px]">Hủy bỏ</button>
</x-slot>
</x-modal>
@endsection