# Company Setting

resources / views / CompanySetting /

# Edit.Blade

resources / views / CompanySetting / edit.blade.php

@extends('layouts.master')
@section('page-title') Company Setting @endsection
@section('content')
    <div class="mb-2">
        <nav aria-label="breadcrumb" class="bg-white p-2 shadow-sm rounded">
            <ol class="breadcrumb mb-0">
                <li class="breadcrumb-item">
                    <a href="{{ route('company.show', $companySetting->id) }}" class="text-decoration-none">Company Setting</a>
                </li>
                <li class="breadcrumb-item active" aria-current="page">Update Company Setting</li>
            </ol>
        </nav>
    </div>
    <div class="card border-0 shadow-sm rounded">
        <div class="card-body">
            <div class="d-flex justify-content-between align-items-center">
                <h4 class="fw-bold text-black-50 mb-0">
                    <i class="fa-solid fa-gears me-1"></i>Update Company Setting
                </h4>
                <a href="{{ route('company.show', $companySetting->id) }}" class="btn btn-outline-primary">
                    <i class="fa-solid fa-sitemap"></i>
                </a>
            </div>
            <hr>
            <form action="{{ route('company.update', $companySetting->id) }}"
                  method="post" id="create-department"
                  class="row justify-content-center py-2">
                @csrf
                @method('put')
                <div class="col-12 col-md-8">

                    <div class="form-floating mb-3">
                        <input type="text" class="form-control"
                               id="name" name="name" value="{{$companySetting->company_name}}"
                               placeholder="title">
                        <label for="name">Company's Name</label>
                    </div>
                    <div class="form-floating mb-3">
                        <input type="text" class="form-control"
                               id="phone" name="phone" value="{{$companySetting->company_phone}}"
                               placeholder="title">
                        <label for="phone">Company's Phone</label>
                    </div>
                    <div class="form-floating mb-3">
                        <input type="email" class="form-control"
                               id="email" name="email" value="{{$companySetting->company_email}}"
                               placeholder="title">
                        <label for="email">Company's Email</label>
                    </div>
                    <div class="form-floating mb-3">
                        <input type="text" class="form-control"
                               id="address" name="address" value="{{$companySetting->company_address}}"
                               placeholder="title">
                        <label for="address">Company's Address</label>
                    </div>
                    <div class="form-floating mb-3">
                        <input type="text" class="form-control timePicker"
                               id="ost" name="ost" value="{{$companySetting->office_start_time}}"
                               placeholder="title">
                        <label for="ost">Company's Office Start Time</label>
                    </div>
                    <div class="form-floating mb-3">
                        <input type="text" class="form-control timePicker"
                               id="oet" name="oet" value="{{$companySetting->office_end_time}}"
                               placeholder="title">
                        <label for="oet">Company's Office End Time</label>
                    </div>
                    <div class="form-floating mb-3">
                        <input type="text" class="form-control timePicker"
                               id="bst" name="bst" value="{{$companySetting->break_start_time}}"
                               placeholder="title">
                        <label for="bst">Company's Break Start Time</label>
                    </div>
                    <div class="form-floating mb-3">
                        <input type="text" class="form-control timePicker"
                               id="bet" name="bet" value="{{$companySetting->break_end_time}}"
                               placeholder="title">
                        <label for="bet">Company's Break End Time</label>
                    </div>
                </div>
                <div class="col-12 col-md-6 my-3">
                    <button class="btn btn-primary w-100">Update Company Setting</button>
                </div>
            </form>
        </div>
    </div>
@endsection
@section('js')
{!! JsValidator::formRequest('App\Http\Requests\UpdateCompanySettingRequest','#create-department') !!}
<script>
    $('.timePicker').daterangepicker({
        "singleDatePicker": true,
        "autoApply": true,
        "timePicker": true,
        "timePicker24Hour": true,
        "timePickerSeconds": true,
        "drops": "up",
        "locale": {
            "format": "HH:mm:ss",
        }
    }).on('show.daterangepicker', function (ev, picker){
        $('.calendar-table').hide();
    });
</script>
@endsection
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105

UpdateCompanySettingRequest

# Show.Blade

resources / views / CompanySetting / show.blade.php

@extends('layouts.master')
@section('page-title') Company Setting @endsection
@section('content')
    <div class="mb-2">
        <nav aria-label="breadcrumb" class="bg-white p-2 shadow-sm rounded">
            <ol class="breadcrumb mb-0">
                <li class="breadcrumb-item active" aria-current="page">Company Setting</li>
            </ol>
        </nav>
    </div>
    <div class="card border-primary border-3 shadow-sm rounded-3">
        <div class="card-body">
            <div class="row px-3">
                <div class="col-12 text-center bg-theme-gray  shadow-sm rounded-3 p-5">
                        <h3 class="fw-bold text-primary mb-0">{{ $companySetting->company_name }}</h3>
                </div>
            </div>
        </div>
    </div>
    <div class="row justify-content-center">
        <div class="col-6 border-start border-end border-5 border-primary p-4"></div>
    </div>
    <div class="card border-primary border-3 shadow-sm rounded-3">
        <div class="card-body">
            <div class="row px-3">
                <div class="col-12">
                    <div class="row text-center">
                        <h4 class="fw-bold text-primary mb-3">
                            <i class="fa-solid fa-sitemap text-black-50"></i> Company Information
                        </h4>
                        <hr>
                    </div>
                    <div class="row justify-content-between">
                        <div class="col-md-3 mb-3 mb-md-0 me-0 me-md-3 text-center bg-theme-gray  shadow-sm rounded-3 p-3">
                            <p class="mb-0 fw-bold">
                                <i class="fa-solid fa-square-phone text-primary"></i> Company Phone
                            </p>
                            <p class="mb-0 ">{{ $companySetting->company_phone }}</p>
                        </div>
                        <div class="col-md-3 mb-3 mb-md-0 me-0 me-md-3 text-center bg-theme-gray  shadow-sm rounded-3 p-3">
                            <p class="mb-0 fw-bold">
                                <i class="fa-solid fa-envelope text-primary"></i> Company Email
                            </p>
                            <p class="mb-0 ">{{ $companySetting->company_email }}</p>
                        </div>
                        <div class="col-md-3 mb-3 mb-md-0 text-center bg-theme-gray  shadow-sm rounded-3 p-3">
                            <p class="mb-0 fw-bold">
                                <i class="fa-solid fa-map-location-dot text-primary"></i> Company Address
                            </p>
                            <p class="mb-0">{{ $companySetting->company_address }}</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="row justify-content-center">
        <div class="col-5 border-start border-end border-5 border-primary p-4"></div>
    </div>
    <div class="card border-primary border-3 shadow-sm rounded-3">
        <div class="card-body">
            <div class="row px-3">
                <div class="col-12">
                    <div class="row text-center">
                        <h4 class="fw-bold text-primary mb-3">
                            <i class="fa-solid fa-business-time text-black-50"></i> Office Time
                        </h4>
                        <hr>
                    </div>
                    <div class="row justify-content-between">
                        <div class="col-md-5 mb-3 mb-md-0 me-0 me-md-3 text-center bg-theme-gray  shadow-sm rounded-3 p-3">
                            <p class="mb-0 fw-bold">
                                <i class="fa-solid fa-hourglass-start text-primary"></i> Office Start Time
                            </p>
                            <p class="mb-0 text-primary">{{ $companySetting->office_start_time }} AM</p>
                        </div>
                        <div class="col-md-5 mb-3 mb-md-0 me-0 me-md-3 text-center bg-theme-gray  shadow-sm rounded-3 p-3">
                            <p class="mb-0 fw-bold">
                                <i class="fa-solid fa-hourglass-end text-primary"></i> Office End Time
                            </p>
                            <p class="mb-0 text-primary">{{ $companySetting->office_end_time }} PM</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="row justify-content-center">
        <div class="col-4 border-start border-end border-5 border-primary p-4"></div>
    </div>
    <div class="card border-primary border-3 shadow-sm rounded-3">
        <div class="card-body">
            <div class="row px-3">
                <div class="col-12">
                    <div class="row text-center">
                        <h4 class="fw-bold text-primary mb-3">
                            <i class="fa-solid fa-business-time text-primary text-black-50"></i> Break Time
                        </h4>
                        <hr>
                    </div>
                    <div class="row justify-content-between">
                        <div class="col-md-5 mb-3 mb-md-0 me-0 me-md-3 text-center bg-theme-gray  shadow-sm rounded-3 p-3">
                            <p class="mb-0 fw-bold">
                                <i class="fa-solid fa-hourglass-start text-primary"></i> Office Break Start Time
                            </p>
                            <p class="mb-0 text-primary">{{ $companySetting->break_start_time }} PM</p>
                        </div>
                        <div class="col-md-5 mb-3 mb-md-0 me-0 me-md-3 text-center bg-theme-gray  shadow-sm rounded-3 p-3">
                            <p class="mb-0 fw-bold">
                                <i class="fa-solid fa-hourglass-end text-primary"></i> Office Break End Time
                            </p>
                            <p class="mb-0 text-primary">{{ $companySetting->break_end_time }} PM</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    @can('Edit CompanySetting')
    <div class="row justify-content-center">
        <div class="col-3 border-start border-end border-5 border-primary p-4"></div>
    </div>
    <div class="card border-primary border-3 shadow-sm rounded-3">
        <div class="card-body">
            <div class="row px-3 justify-content-center">
                <div class="col-md-6 py-2  bg-theme-gray shadow-sm rounded-3">
                    <a href="{{ route('company.edit', 1) }}" class="btn btn-info w-100 text-white">
                        <i class="fa-solid fa-gears me-1"></i>Edit Company Setting
                    </a>
                </div>
            </div>
        </div>
    </div>
    @endcan
@endsection
@section('js')
@endsection
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
Last Updated: 6/1/2022, 10:25:03 PM