@extends('layout')
@section('title', 'Profile')
@section('page_title', 'Profile')
@section('content')
    <div class="row">
        <div class="col-md-4">
            <div class="panel panel-card margin-b-30">
                <div class="panel-header">
                    <u><i><h4>Change Password</h4></i></u>
                </div>
                <div class="panel-body">

                    <form id="change_pass_form">
                        <div class="row">
                            <div class="col-md-12">
                                <div class="form-group">
                                    <label for="city_name">Old Password <span class="text-danger">*</span></label>
                                    <input type="text" id="old_pass" autofocus class="form-control" name="old_password">
                                    <span class="text-danger error" id="old_password_error"></span>
                                </div>
                            </div>
                            <div class="col-md-12">
                                <div class="form-group">
                                    <label for="city_name">New Password <span class="text-danger">*</span></label>
                                    <input type="password" id="old_pass" autofocus class="form-control" name="password">
                                    <span class="text-danger error" id="password_error"></span>
                                </div>
                            </div>
                            <div class="col-md-12">
                                <div class="form-group">
                                    <label for="city_name">Confirm Password <span class="text-danger">*</span></label>
                                    <input type="password" id="old_pass" autofocus class="form-control"
                                           name="password_confirmation">
                                    <span class="text-danger error" id="password_confirmation_error"></span>
                                </div>
                            </div>

                        </div>
                        <div class="row">
                            <div class="col-md-12">
                                <div class="">
                                    @csrf
                                    <button id="pass_submit_btn" class="btn btn-primary" type="submit">
                                        Change Password
                                    </button>
                                </div>
                            </div>
                        </div>
                    </form>

                </div>
            </div>
        </div>

        <div class="col-md-4">
            <div class="panel panel-card ">
                <div class="panel-header">
                    <u><i><h4>Change Business Name</h4></i></u>

                </div>
                <div class="panel-body">
                    <form id="update_business_name_form">
                        <div class="row">
                            <div class="col-md-12">
                                <label for="">Business Name:</label>
                                <input type="text" name="business_name" value="{{ $business_name->name }}"
                                       class="form-control">
                                <span class="text-danger error" id="business_name_error"></span>
                            </div>
                            <div class="col-md-12">
                                <label for="">Phone:</label>
                                <input type="text" name="phone_number" value="{{ $business_name->phone }}"
                                       class="form-control">
                                <span class="text-danger error" id="phone_number_error"></span>
                            </div>
                            <div class="col-md-12">
                                <label for="">Address:</label>
                                <textarea name="address" class="form-control" cols="10" rows="2">{{$business_name->address}}</textarea>
                                <span class="text-danger error" id="address_error"></span>
                            </div>
                            <div class="col-md-12 mt-3">
                                @csrf
                                <input type="hidden" name="update_id" value="{{ $business_name->id }}">
                                <button id="b_submit_btn" class="btn btn-primary" type="submit">
                                    Update Profile
                                </button>
                            </div>
                        </div>

                    </form>
                </div>
            </div>
        </div>
    </div>

@endsection

@section('javascript')
    @include('dashboard.profile_js')
@endsection
