first commit
This commit is contained in:
@@ -0,0 +1,247 @@
|
||||
@extends('frontend.layout')
|
||||
@section('content')
|
||||
<div class="container page_container">
|
||||
<div class="row">
|
||||
<div class="col-md-2"></div>
|
||||
<div class="col-md-4">
|
||||
@if(Session::has('success'))
|
||||
<div class="alert alert-success">
|
||||
{{ Session::get('success') }}
|
||||
@php
|
||||
Session::forget('success');
|
||||
@endphp
|
||||
</div>
|
||||
@endif
|
||||
@if(Session::has('error'))
|
||||
<div class="alert alert-danger">
|
||||
{{ Session::get('error') }}
|
||||
@php
|
||||
Session::forget('error');
|
||||
@endphp
|
||||
</div>
|
||||
@endif
|
||||
@if(Session::has('errors'))
|
||||
<div class="alert alert-danger">
|
||||
{{ 'Có lỗi xảy ra'}}
|
||||
@php
|
||||
Session::forget('errors');
|
||||
@endphp
|
||||
</div>
|
||||
@endif
|
||||
<div class="customer_form">
|
||||
@if (Auth::check())
|
||||
<div class="title">Cập nhật thông tin cá nhân</div>
|
||||
<form action="{{ route('updateaccount') }}" method="POST">
|
||||
{{ csrf_field() }}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="name">Tên người dùng:</label>
|
||||
@php
|
||||
$name = Auth::user()->name ?? '';
|
||||
if (old('name') != '') {
|
||||
$name = old('name');
|
||||
}
|
||||
@endphp
|
||||
<input class="form-control" name="name" id="name" value="{{ $name ?? '' }}" />
|
||||
@if ($errors->has('name'))
|
||||
<span class="text-danger">{{ $errors->first('name') }}</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="phone">Số điện thoại:</label>
|
||||
@php
|
||||
$phone = Auth::user()->phone ?? '';
|
||||
if (old('phone') != '') {
|
||||
$phone = old('phone');
|
||||
}
|
||||
@endphp
|
||||
<input class="form-control" name="phone" id="phone" value="{{ $phone ?? '' }}" />
|
||||
@if ($errors->has('phone'))
|
||||
<span class="text-danger">{{ $errors->first('phone') }}</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="address">Nơi sinh sống:</label>
|
||||
@php
|
||||
$address = Auth::user()->address ?? '';
|
||||
if (old('address') != '') {
|
||||
$address = old('address');
|
||||
}
|
||||
@endphp
|
||||
<input class="form-control" name="address" id="address" value="{{ $address ?? '' }}" />
|
||||
@if ($errors->has('address'))
|
||||
<span class="text-danger">{{ $errors->first('address') }}</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label>Nếu trước đó đã biết Bệnh viện ĐKQT S.I.S Cần Thơ?</label>
|
||||
@php
|
||||
$known_sis = old('known_sis', Auth::user()->known_sis ?? '');
|
||||
@endphp
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="known_sis" id="known_sis_yes" value="1" {{ $known_sis === '1' ? 'checked' : '' }}>
|
||||
<label class="form-check-label" for="known_sis_yes">Có</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="known_sis" id="known_sis_no" value="0" {{ $known_sis === '0' ? 'checked' : '' }}>
|
||||
<label class="form-check-label" for="known_sis_no">Không</label>
|
||||
</div>
|
||||
@if ($errors->has('known_sis'))
|
||||
<span class="text-danger">{{ $errors->first('known_sis') }}</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="job">Nghề nghiệp:</label>
|
||||
@php
|
||||
$job = Auth::user()->job ?? '';
|
||||
if (old('job') != '') {
|
||||
$job = old('job');
|
||||
}
|
||||
@endphp
|
||||
<input class="form-control" name="job" id="job" value="{{ $job ?? '' }}" />
|
||||
@if ($errors->has('job'))
|
||||
<span class="text-danger">{{ $errors->first('job') }}</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12" style="display: none;">
|
||||
<div class="form-group">
|
||||
<label for="password">Mật khẩu:</label>
|
||||
<input class="form-control" name="password" id="password" value="" />
|
||||
@if ($errors->has('password'))
|
||||
<span class="text-danger">{{ $errors->first('password') }}</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<button type="submit" class="custom_btn align-right">Cập nhật</button>
|
||||
<a href="{{ route('logout') }}" type="button" class="custom_btn red_btn align-right">Đăng
|
||||
xuất</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@else
|
||||
<div class="title">Nhập thông tin cá nhân</div>
|
||||
<div class="alert alert-danger">
|
||||
(*) Nhập thông tin cá nhân trước khi quay số
|
||||
</div>
|
||||
<form action="{{ route('createaccount') }}" method="POST">
|
||||
{{ csrf_field() }}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="name">Tên người dùng:</label>
|
||||
@php
|
||||
$name = '';
|
||||
if (old('name') != '') {
|
||||
$name = old('name');
|
||||
}
|
||||
@endphp
|
||||
<input class="form-control" name="name" id="name" value="{{ $name ?? '' }}" />
|
||||
@if ($errors->has('name'))
|
||||
<span class="text-danger">{{ $errors->first('name') }}</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="phone">Số điện thoại:</label>
|
||||
@php
|
||||
$phone = '';
|
||||
if (old('phone') != '') {
|
||||
$phone = old('phone');
|
||||
}
|
||||
@endphp
|
||||
<input class="form-control" name="phone" id="phone" value="{{ $phone ?? '' }}" />
|
||||
@if ($errors->has('phone'))
|
||||
<span class="text-danger">{{ $errors->first('phone') }}</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="address">Nơi sinh sống:</label>
|
||||
@php
|
||||
$address = '';
|
||||
if (old('address') != '') {
|
||||
$address = old('address');
|
||||
}
|
||||
@endphp
|
||||
<input class="form-control" name="address" id="address" value="{{ $address ?? '' }}" />
|
||||
@if ($errors->has('address'))
|
||||
<span class="text-danger">{{ $errors->first('address') }}</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label>Nếu trước đó đã biết Bệnh viện ĐKQT S.I.S Cần Thơ?</label>
|
||||
@php
|
||||
$known_sis = old('known_sis', '');
|
||||
@endphp
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="known_sis" id="known_sis_yes" value="1" {{ $known_sis === '1' ? 'checked' : '' }}>
|
||||
<label class="form-check-label" for="known_sis_yes">Có</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="known_sis" id="known_sis_no" value="0" {{ $known_sis === '0' ? 'checked' : '' }}>
|
||||
<label class="form-check-label" for="known_sis_no">Không</label>
|
||||
</div>
|
||||
@if ($errors->has('known_sis'))
|
||||
<span class="text-danger">{{ $errors->first('known_sis') }}</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="job">Nghề nghiệp:</label>
|
||||
@php
|
||||
$job = '';
|
||||
if (old('job') != '') {
|
||||
$job = old('job');
|
||||
}
|
||||
@endphp
|
||||
<input class="form-control" name="job" id="job" value="{{ $job ?? '' }}" />
|
||||
@if ($errors->has('job'))
|
||||
<span class="text-danger">{{ $errors->first('job') }}</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<button type="submit" class="custom_btn align-right">Gửi thông tin</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="prize_history">
|
||||
<a class="blinking-border-button mx-auto" href="{{route('game')}}">Quay lại chức năng quay số</a>
|
||||
<div class="title">LỊCH SỬ HOẠT ĐỘNG</div>
|
||||
<ul class="list-group">
|
||||
@if (isset($history_data))
|
||||
@foreach ($history_data as $history_item)
|
||||
<li class="list-group-item">
|
||||
Trúng thưởng {{ $history_item->prize_name ?? '' }} vào lúc
|
||||
{{ date_format(date_create($history_item->created_at), "d/m/Y H:i") }}
|
||||
</li>
|
||||
@endforeach
|
||||
@endif
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
@@ -0,0 +1,60 @@
|
||||
@extends('frontend.layout')
|
||||
@section('content')
|
||||
<script src="{{asset('frontend/js/login.js')}}"></script>
|
||||
<header id="home" class="header">
|
||||
<div class="overlay"></div>
|
||||
<div class="header-content login-header-content container">
|
||||
<div class="custom_form">
|
||||
@if(Session::has('success'))
|
||||
<div class="alert alert-success">
|
||||
{{ Session::get('success') }}
|
||||
@php
|
||||
Session::forget('success');
|
||||
@endphp
|
||||
</div>
|
||||
@endif
|
||||
@if(Session::has('error'))
|
||||
<div class="alert alert-danger">
|
||||
{{ Session::get('error') }}
|
||||
@php
|
||||
Session::forget('error');
|
||||
@endphp
|
||||
</div>
|
||||
@endif
|
||||
@if(Session::has('errors'))
|
||||
<div class="alert alert-danger">
|
||||
{{ 'Có lỗi xảy ra'}}
|
||||
@php
|
||||
Session::forget('errors');
|
||||
@endphp
|
||||
</div>
|
||||
@endif
|
||||
<form action="{{route('login')}}" method="POST">
|
||||
<div class="title">Đăng nhập</div>
|
||||
{{ csrf_field() }}
|
||||
<div class="form-group">
|
||||
<label for="email">Tên đăng nhập <span class="required">(*)</span></label>
|
||||
<input class="form-control" name="email" id="email" placeholder="Tên đăng nhập ..." value="{{old('email')}}" />
|
||||
@if ($errors->has('email'))
|
||||
<span class="text-danger">{{ $errors->first('email') }}</span>
|
||||
@endif
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password">Mật khẩu <span class="required">(*)</span></label>
|
||||
<div class="form-control input-group">
|
||||
<input type="password" placeholder="Mật khẩu ..." name="password" id="password"
|
||||
autocomplete="new-password" class="form-control" >
|
||||
<button type="button" id="btnToggle" class="toggle"><i id="eyeIcon" class="fa fa-eye"></i></button>
|
||||
</div>
|
||||
@if ($errors->has('password'))
|
||||
<span class="text-danger">{{ $errors->first('password') }}</span>
|
||||
@endif
|
||||
</div>
|
||||
<button class="custom_btn" type="submit">Đăng nhập</button>
|
||||
<div class="custom_line"></div>
|
||||
<p>Nếu chưa có tài khoản, <a class="custom_btn" href="{{route('register')}}">Đăng ký</a> tại đây</p>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user