first initial
This commit is contained in:
0
resources/css/app.css
Normal file
0
resources/css/app.css
Normal file
1
resources/js/app.js
Normal file
1
resources/js/app.js
Normal file
@@ -0,0 +1 @@
|
||||
require('./bootstrap');
|
||||
32
resources/js/bootstrap.js
vendored
Normal file
32
resources/js/bootstrap.js
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
window._ = require('lodash');
|
||||
|
||||
try {
|
||||
require('bootstrap');
|
||||
} catch (e) {}
|
||||
|
||||
/**
|
||||
* We'll load the axios HTTP library which allows us to easily issue requests
|
||||
* to our Laravel back-end. This library automatically handles sending the
|
||||
* CSRF token as a header based on the value of the "XSRF" token cookie.
|
||||
*/
|
||||
|
||||
window.axios = require('axios');
|
||||
|
||||
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
||||
|
||||
/**
|
||||
* Echo exposes an expressive API for subscribing to channels and listening
|
||||
* for events that are broadcast by Laravel. Echo and event broadcasting
|
||||
* allows your team to easily build robust real-time web applications.
|
||||
*/
|
||||
|
||||
// import Echo from 'laravel-echo';
|
||||
|
||||
// window.Pusher = require('pusher-js');
|
||||
|
||||
// window.Echo = new Echo({
|
||||
// broadcaster: 'pusher',
|
||||
// key: process.env.MIX_PUSHER_APP_KEY,
|
||||
// cluster: process.env.MIX_PUSHER_APP_CLUSTER,
|
||||
// forceTLS: true
|
||||
// });
|
||||
20
resources/lang/en/auth.php
Normal file
20
resources/lang/en/auth.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Authentication Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used during authentication for various
|
||||
| messages that we need to display to the user. You are free to modify
|
||||
| these language lines according to your application's requirements.
|
||||
|
|
||||
*/
|
||||
|
||||
'failed' => 'These credentials do not match our records.',
|
||||
'password' => 'The provided password is incorrect.',
|
||||
'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
|
||||
|
||||
];
|
||||
19
resources/lang/en/pagination.php
Normal file
19
resources/lang/en/pagination.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Pagination Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used by the paginator library to build
|
||||
| the simple pagination links. You are free to change them to anything
|
||||
| you want to customize your views to better match your application.
|
||||
|
|
||||
*/
|
||||
|
||||
'previous' => '« Previous',
|
||||
'next' => 'Next »',
|
||||
|
||||
];
|
||||
22
resources/lang/en/passwords.php
Normal file
22
resources/lang/en/passwords.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Password Reset Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are the default lines which match reasons
|
||||
| that are given by the password broker for a password update attempt
|
||||
| has failed, such as for an invalid token or invalid new password.
|
||||
|
|
||||
*/
|
||||
|
||||
'reset' => 'Your password has been reset!',
|
||||
'sent' => 'We have emailed your password reset link!',
|
||||
'throttled' => 'Please wait before retrying.',
|
||||
'token' => 'This password reset token is invalid.',
|
||||
'user' => "We can't find a user with that email address.",
|
||||
|
||||
];
|
||||
163
resources/lang/en/validation.php
Normal file
163
resources/lang/en/validation.php
Normal file
@@ -0,0 +1,163 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Validation Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines contain the default error messages used by
|
||||
| the validator class. Some of these rules have multiple versions such
|
||||
| as the size rules. Feel free to tweak each of these messages here.
|
||||
|
|
||||
*/
|
||||
|
||||
'accepted' => 'The :attribute must be accepted.',
|
||||
'accepted_if' => 'The :attribute must be accepted when :other is :value.',
|
||||
'active_url' => 'The :attribute is not a valid URL.',
|
||||
'after' => 'The :attribute must be a date after :date.',
|
||||
'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
|
||||
'alpha' => 'The :attribute must only contain letters.',
|
||||
'alpha_dash' => 'The :attribute must only contain letters, numbers, dashes and underscores.',
|
||||
'alpha_num' => 'The :attribute must only contain letters and numbers.',
|
||||
'array' => 'The :attribute must be an array.',
|
||||
'before' => 'The :attribute must be a date before :date.',
|
||||
'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
|
||||
'between' => [
|
||||
'numeric' => 'The :attribute must be between :min and :max.',
|
||||
'file' => 'The :attribute must be between :min and :max kilobytes.',
|
||||
'string' => 'The :attribute must be between :min and :max characters.',
|
||||
'array' => 'The :attribute must have between :min and :max items.',
|
||||
],
|
||||
'boolean' => 'The :attribute field must be true or false.',
|
||||
'confirmed' => 'The :attribute confirmation does not match.',
|
||||
'current_password' => 'The password is incorrect.',
|
||||
'date' => 'The :attribute is not a valid date.',
|
||||
'date_equals' => 'The :attribute must be a date equal to :date.',
|
||||
'date_format' => 'The :attribute does not match the format :format.',
|
||||
'declined' => 'The :attribute must be declined.',
|
||||
'declined_if' => 'The :attribute must be declined when :other is :value.',
|
||||
'different' => 'The :attribute and :other must be different.',
|
||||
'digits' => 'The :attribute must be :digits digits.',
|
||||
'digits_between' => 'The :attribute must be between :min and :max digits.',
|
||||
'dimensions' => 'The :attribute has invalid image dimensions.',
|
||||
'distinct' => 'The :attribute field has a duplicate value.',
|
||||
'email' => 'The :attribute must be a valid email address.',
|
||||
'ends_with' => 'The :attribute must end with one of the following: :values.',
|
||||
'enum' => 'The selected :attribute is invalid.',
|
||||
'exists' => 'The selected :attribute is invalid.',
|
||||
'file' => 'The :attribute must be a file.',
|
||||
'filled' => 'The :attribute field must have a value.',
|
||||
'gt' => [
|
||||
'numeric' => 'The :attribute must be greater than :value.',
|
||||
'file' => 'The :attribute must be greater than :value kilobytes.',
|
||||
'string' => 'The :attribute must be greater than :value characters.',
|
||||
'array' => 'The :attribute must have more than :value items.',
|
||||
],
|
||||
'gte' => [
|
||||
'numeric' => 'The :attribute must be greater than or equal to :value.',
|
||||
'file' => 'The :attribute must be greater than or equal to :value kilobytes.',
|
||||
'string' => 'The :attribute must be greater than or equal to :value characters.',
|
||||
'array' => 'The :attribute must have :value items or more.',
|
||||
],
|
||||
'image' => 'The :attribute must be an image.',
|
||||
'in' => 'The selected :attribute is invalid.',
|
||||
'in_array' => 'The :attribute field does not exist in :other.',
|
||||
'integer' => 'The :attribute must be an integer.',
|
||||
'ip' => 'The :attribute must be a valid IP address.',
|
||||
'ipv4' => 'The :attribute must be a valid IPv4 address.',
|
||||
'ipv6' => 'The :attribute must be a valid IPv6 address.',
|
||||
'json' => 'The :attribute must be a valid JSON string.',
|
||||
'lt' => [
|
||||
'numeric' => 'The :attribute must be less than :value.',
|
||||
'file' => 'The :attribute must be less than :value kilobytes.',
|
||||
'string' => 'The :attribute must be less than :value characters.',
|
||||
'array' => 'The :attribute must have less than :value items.',
|
||||
],
|
||||
'lte' => [
|
||||
'numeric' => 'The :attribute must be less than or equal to :value.',
|
||||
'file' => 'The :attribute must be less than or equal to :value kilobytes.',
|
||||
'string' => 'The :attribute must be less than or equal to :value characters.',
|
||||
'array' => 'The :attribute must not have more than :value items.',
|
||||
],
|
||||
'mac_address' => 'The :attribute must be a valid MAC address.',
|
||||
'max' => [
|
||||
'numeric' => 'The :attribute must not be greater than :max.',
|
||||
'file' => 'The :attribute must not be greater than :max kilobytes.',
|
||||
'string' => 'The :attribute must not be greater than :max characters.',
|
||||
'array' => 'The :attribute must not have more than :max items.',
|
||||
],
|
||||
'mimes' => 'The :attribute must be a file of type: :values.',
|
||||
'mimetypes' => 'The :attribute must be a file of type: :values.',
|
||||
'min' => [
|
||||
'numeric' => 'The :attribute must be at least :min.',
|
||||
'file' => 'The :attribute must be at least :min kilobytes.',
|
||||
'string' => 'The :attribute must be at least :min characters.',
|
||||
'array' => 'The :attribute must have at least :min items.',
|
||||
],
|
||||
'multiple_of' => 'The :attribute must be a multiple of :value.',
|
||||
'not_in' => 'The selected :attribute is invalid.',
|
||||
'not_regex' => 'The :attribute format is invalid.',
|
||||
'numeric' => 'The :attribute must be a number.',
|
||||
'password' => 'The password is incorrect.',
|
||||
'present' => 'The :attribute field must be present.',
|
||||
'prohibited' => 'The :attribute field is prohibited.',
|
||||
'prohibited_if' => 'The :attribute field is prohibited when :other is :value.',
|
||||
'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.',
|
||||
'prohibits' => 'The :attribute field prohibits :other from being present.',
|
||||
'regex' => 'The :attribute format is invalid.',
|
||||
'required' => 'The :attribute field is required.',
|
||||
'required_array_keys' => 'The :attribute field must contain entries for: :values.',
|
||||
'required_if' => 'The :attribute field is required when :other is :value.',
|
||||
'required_unless' => 'The :attribute field is required unless :other is in :values.',
|
||||
'required_with' => 'The :attribute field is required when :values is present.',
|
||||
'required_with_all' => 'The :attribute field is required when :values are present.',
|
||||
'required_without' => 'The :attribute field is required when :values is not present.',
|
||||
'required_without_all' => 'The :attribute field is required when none of :values are present.',
|
||||
'same' => 'The :attribute and :other must match.',
|
||||
'size' => [
|
||||
'numeric' => 'The :attribute must be :size.',
|
||||
'file' => 'The :attribute must be :size kilobytes.',
|
||||
'string' => 'The :attribute must be :size characters.',
|
||||
'array' => 'The :attribute must contain :size items.',
|
||||
],
|
||||
'starts_with' => 'The :attribute must start with one of the following: :values.',
|
||||
'string' => 'The :attribute must be a string.',
|
||||
'timezone' => 'The :attribute must be a valid timezone.',
|
||||
'unique' => 'The :attribute has already been taken.',
|
||||
'uploaded' => 'The :attribute failed to upload.',
|
||||
'url' => 'The :attribute must be a valid URL.',
|
||||
'uuid' => 'The :attribute must be a valid UUID.',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Custom Validation Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify custom validation messages for attributes using the
|
||||
| convention "attribute.rule" to name the lines. This makes it quick to
|
||||
| specify a specific custom language line for a given attribute rule.
|
||||
|
|
||||
*/
|
||||
|
||||
'custom' => [
|
||||
'attribute-name' => [
|
||||
'rule-name' => 'custom-message',
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Custom Validation Attributes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used to swap our attribute placeholder
|
||||
| with something more reader friendly such as "E-Mail Address" instead
|
||||
| of "email". This simply helps us make our message more expressive.
|
||||
|
|
||||
*/
|
||||
|
||||
'attributes' => [],
|
||||
|
||||
];
|
||||
7
resources/sass/_variables.scss
Normal file
7
resources/sass/_variables.scss
Normal file
@@ -0,0 +1,7 @@
|
||||
// Body
|
||||
$body-bg: #f8fafc;
|
||||
|
||||
// Typography
|
||||
$font-family-sans-serif: 'Nunito', sans-serif;
|
||||
$font-size-base: 0.9rem;
|
||||
$line-height-base: 1.6;
|
||||
8
resources/sass/app.scss
Normal file
8
resources/sass/app.scss
Normal file
@@ -0,0 +1,8 @@
|
||||
// Fonts
|
||||
@import url('https://fonts.googleapis.com/css?family=Nunito');
|
||||
|
||||
// Variables
|
||||
@import 'variables';
|
||||
|
||||
// Bootstrap
|
||||
@import '~bootstrap/scss/bootstrap';
|
||||
196
resources/views/auth/login.blade.php
Normal file
196
resources/views/auth/login.blade.php
Normal file
@@ -0,0 +1,196 @@
|
||||
{{-- @extends('layouts.app') --}}
|
||||
|
||||
{{-- @section('content') --}}
|
||||
{{-- <div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<div class="card">
|
||||
<div class="card-header">{{ __('Login') }}</div>
|
||||
|
||||
<div class="card-body">
|
||||
<form method="POST" action="{{ route('login') }}">
|
||||
@csrf
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="email" class="col-md-4 col-form-label text-md-end">{{ __('Email Address') }}</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="email" type="email" class="form-control @error('email') is-invalid @enderror" name="email" value="{{ old('email') }}" required autocomplete="email" autofocus>
|
||||
|
||||
@error('email')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="password" class="col-md-4 col-form-label text-md-end">{{ __('Password') }}</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="password" type="password" class="form-control @error('password') is-invalid @enderror" name="password" required autocomplete="current-password">
|
||||
|
||||
@error('password')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-6 offset-md-4">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" name="remember" id="remember" {{ old('remember') ? 'checked' : '' }}>
|
||||
|
||||
<label class="form-check-label" for="remember">
|
||||
{{ __('Remember Me') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-0">
|
||||
<div class="col-md-8 offset-md-4">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{{ __('Login') }}
|
||||
</button>
|
||||
|
||||
@if (Route::has('password.request'))
|
||||
<a class="btn btn-link" href="{{ route('password.request') }}">
|
||||
{{ __('Forgot Your Password?') }}
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> --}}
|
||||
{{-- @endsection --}}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<!-- begin::Head -->
|
||||
|
||||
<head>
|
||||
<!--end::Base Path -->
|
||||
<meta charset="utf-8" />
|
||||
|
||||
<title>POS | Login</title>
|
||||
<meta name="description" content="Login page example">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="base-url" content="{{ url('/') }}">
|
||||
|
||||
<!--begin::Fonts -->
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700|Roboto:300,400,500,600,700">
|
||||
<!--end::Fonts -->
|
||||
|
||||
<!--begin::Page Custom Styles(used by this page) -->
|
||||
<link href="{{ url('assets/css/demo1/pages/login/login-3.css') }}" rel="stylesheet" type="text/css" />
|
||||
<!--end::Page Custom Styles -->
|
||||
|
||||
<!--begin::Global Theme Styles(used by all pages) -->
|
||||
<link href="{{ url('assets/css/app.bundle.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
<!--end::Global Theme Styles -->
|
||||
|
||||
<link rel="shortcut icon" href="{{ url('assets/media/logos/ckb.jpeg') }}" />
|
||||
</head>
|
||||
<!-- end::Head -->
|
||||
|
||||
<!-- begin::Body -->
|
||||
|
||||
<body class="kt-quick-panel--right kt-demo-panel--right kt-offcanvas-panel--right kt-header--fixed kt-header-mobile--fixed kt-subheader--enabled kt-subheader--fixed kt-subheader--solid kt-aside--enabled kt-aside--fixed kt-page--loading">
|
||||
<!-- begin:: Page -->
|
||||
<div class="kt-grid kt-grid--ver kt-grid--root">
|
||||
<div class="kt-grid kt-grid--hor kt-grid--root kt-login kt-login--v3 kt-login--signin" id="kt_login">
|
||||
<div class="kt-grid__item kt-grid__item--fluid kt-grid kt-grid--hor" style="background-image: url('{{ url('assets/media/bg/bg-3.jpg') }}');">
|
||||
<div class="kt-grid__item kt-grid__item--fluid kt-login__wrapper">
|
||||
<div class="kt-login__container">
|
||||
<div class="kt-login__logo kt-margin-b-0">
|
||||
<a href="#">
|
||||
<img src="{{ url('assets/media/logos/ckb.jpeg') }}" width="128">
|
||||
</a>
|
||||
</div>
|
||||
<div class="kt-login__signin">
|
||||
<div class="kt-login__head">
|
||||
<h3 class="kt-login__title">Sign In</h3>
|
||||
</div>
|
||||
<form method="POST" class="kt-form" action="{{ route('login') }}">
|
||||
@csrf
|
||||
<div class="input-group">
|
||||
<input class="form-control @error('email') is-invalid @enderror" type="email" placeholder="Email" name="email" value="{{ old('email') }}" required autofocus autocomplete="off">
|
||||
@error('email')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input class="form-control @error('password') is-invalid @enderror" name="password" required autocomplete="current-password" type="password" placeholder="Password">
|
||||
@error('password')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }} error </strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
{{-- <div class="row kt-login__extra">
|
||||
<div class="col kt-align-right">
|
||||
@if (Route::has('password.request'))
|
||||
<a href="{{ route('password.request') }}" id="kt_login_forgot" class="kt-login__link">
|
||||
{{ __('Forgot your password?') }}
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
</div> --}}
|
||||
<div class="kt-login__actions">
|
||||
<button id="kt_login_signin_submit" class="btn btn-brand btn-elevate kt-login__btn-primary">{{ __('Login') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- end:: Page -->
|
||||
|
||||
|
||||
<!-- begin::Global Config(global config for global JS sciprts) -->
|
||||
<script>
|
||||
var KTAppOptions = {
|
||||
"colors": {
|
||||
"state": {
|
||||
"brand": "#5d78ff",
|
||||
"dark": "#282a3c",
|
||||
"light": "#ffffff",
|
||||
"primary": "#5867dd",
|
||||
"success": "#34bfa3",
|
||||
"info": "#36a3f7",
|
||||
"warning": "#ffb822",
|
||||
"danger": "#fd3995"
|
||||
},
|
||||
"base": {
|
||||
"label": ["#c5cbe3", "#a1a8c3", "#3d4465", "#3e4466"],
|
||||
"shape": ["#f0f3ff", "#d9dffa", "#afb4d4", "#646c9a"]
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<!-- end::Global Config -->
|
||||
|
||||
<!--begin::Global Theme Bundle(used by all pages) -->
|
||||
<script src="{{ url('assets/js/app.bundle.min.js') }}" type="text/javascript"></script>
|
||||
<!--end::Global Theme Bundle -->
|
||||
|
||||
<!--begin::Page Scripts(used by this page) -->
|
||||
{{-- <script src="{{ url('assets/js/demo1/pages/login/login-general.js') }}" type="text/javascript"></script> --}}
|
||||
<!--end::Page Scripts -->
|
||||
</body>
|
||||
<!-- end::Body -->
|
||||
|
||||
</html>
|
||||
49
resources/views/auth/passwords/confirm.blade.php
Normal file
49
resources/views/auth/passwords/confirm.blade.php
Normal file
@@ -0,0 +1,49 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<div class="card">
|
||||
<div class="card-header">{{ __('Confirm Password') }}</div>
|
||||
|
||||
<div class="card-body">
|
||||
{{ __('Please confirm your password before continuing.') }}
|
||||
|
||||
<form method="POST" action="{{ route('password.confirm') }}">
|
||||
@csrf
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="password" class="col-md-4 col-form-label text-md-end">{{ __('Password') }}</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="password" type="password" class="form-control @error('password') is-invalid @enderror" name="password" required autocomplete="current-password">
|
||||
|
||||
@error('password')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-0">
|
||||
<div class="col-md-8 offset-md-4">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{{ __('Confirm Password') }}
|
||||
</button>
|
||||
|
||||
@if (Route::has('password.request'))
|
||||
<a class="btn btn-link" href="{{ route('password.request') }}">
|
||||
{{ __('Forgot Your Password?') }}
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
47
resources/views/auth/passwords/email.blade.php
Normal file
47
resources/views/auth/passwords/email.blade.php
Normal file
@@ -0,0 +1,47 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<div class="card">
|
||||
<div class="card-header">{{ __('Reset Password') }}</div>
|
||||
|
||||
<div class="card-body">
|
||||
@if (session('status'))
|
||||
<div class="alert alert-success" role="alert">
|
||||
{{ session('status') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<form method="POST" action="{{ route('password.email') }}">
|
||||
@csrf
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="email" class="col-md-4 col-form-label text-md-end">{{ __('Email Address') }}</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="email" type="email" class="form-control @error('email') is-invalid @enderror" name="email" value="{{ old('email') }}" required autocomplete="email" autofocus>
|
||||
|
||||
@error('email')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-0">
|
||||
<div class="col-md-6 offset-md-4">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{{ __('Send Password Reset Link') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
65
resources/views/auth/passwords/reset.blade.php
Normal file
65
resources/views/auth/passwords/reset.blade.php
Normal file
@@ -0,0 +1,65 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<div class="card">
|
||||
<div class="card-header">{{ __('Reset Password') }}</div>
|
||||
|
||||
<div class="card-body">
|
||||
<form method="POST" action="{{ route('password.update') }}">
|
||||
@csrf
|
||||
|
||||
<input type="hidden" name="token" value="{{ $token }}">
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="email" class="col-md-4 col-form-label text-md-end">{{ __('Email Address') }}</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="email" type="email" class="form-control @error('email') is-invalid @enderror" name="email" value="{{ $email ?? old('email') }}" required autocomplete="email" autofocus>
|
||||
|
||||
@error('email')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="password" class="col-md-4 col-form-label text-md-end">{{ __('Password') }}</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="password" type="password" class="form-control @error('password') is-invalid @enderror" name="password" required autocomplete="new-password">
|
||||
|
||||
@error('password')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="password-confirm" class="col-md-4 col-form-label text-md-end">{{ __('Confirm Password') }}</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="password-confirm" type="password" class="form-control" name="password_confirmation" required autocomplete="new-password">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-0">
|
||||
<div class="col-md-6 offset-md-4">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{{ __('Reset Password') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
77
resources/views/auth/register.blade.php
Normal file
77
resources/views/auth/register.blade.php
Normal file
@@ -0,0 +1,77 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<div class="card">
|
||||
<div class="card-header">{{ __('Register') }}</div>
|
||||
|
||||
<div class="card-body">
|
||||
<form method="POST" action="{{ route('register') }}">
|
||||
@csrf
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="name" class="col-md-4 col-form-label text-md-end">{{ __('Name') }}</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="name" type="text" class="form-control @error('name') is-invalid @enderror" name="name" value="{{ old('name') }}" required autocomplete="name" autofocus>
|
||||
|
||||
@error('name')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="email" class="col-md-4 col-form-label text-md-end">{{ __('Email Address') }}</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="email" type="email" class="form-control @error('email') is-invalid @enderror" name="email" value="{{ old('email') }}" required autocomplete="email">
|
||||
|
||||
@error('email')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="password" class="col-md-4 col-form-label text-md-end">{{ __('Password') }}</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="password" type="password" class="form-control @error('password') is-invalid @enderror" name="password" required autocomplete="new-password">
|
||||
|
||||
@error('password')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="password-confirm" class="col-md-4 col-form-label text-md-end">{{ __('Confirm Password') }}</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="password-confirm" type="password" class="form-control" name="password_confirmation" required autocomplete="new-password">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-0">
|
||||
<div class="col-md-6 offset-md-4">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{{ __('Register') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
28
resources/views/auth/verify.blade.php
Normal file
28
resources/views/auth/verify.blade.php
Normal file
@@ -0,0 +1,28 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<div class="card">
|
||||
<div class="card-header">{{ __('Verify Your Email Address') }}</div>
|
||||
|
||||
<div class="card-body">
|
||||
@if (session('resent'))
|
||||
<div class="alert alert-success" role="alert">
|
||||
{{ __('A fresh verification link has been sent to your email address.') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{ __('Before proceeding, please check your email for a verification link.') }}
|
||||
{{ __('If you did not receive the email') }},
|
||||
<form class="d-inline" method="POST" action="{{ route('verification.resend') }}">
|
||||
@csrf
|
||||
<button type="submit" class="btn btn-link p-0 m-0 align-baseline">{{ __('click here to request another') }}</button>.
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
91
resources/views/back/master/category.blade.php
Normal file
91
resources/views/back/master/category.blade.php
Normal file
@@ -0,0 +1,91 @@
|
||||
@extends('layouts.backapp')
|
||||
|
||||
@section('content')
|
||||
|
||||
<style type="text/css">
|
||||
#nama{
|
||||
text-transform: uppercase;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="kt-portlet kt-portlet--mobile" id="kt_blockui_datatable">
|
||||
<div class="kt-portlet__head kt-portlet__head--lg">
|
||||
<div class="kt-portlet__head-label">
|
||||
<span class="kt-portlet__head-icon">
|
||||
<i class="kt-font-brand flaticon2-line-chart"></i>
|
||||
</span>
|
||||
<h3 class="kt-portlet__head-title">
|
||||
Kategori Pekerjaan
|
||||
</h3>
|
||||
</div>
|
||||
@can('create', $menus['category.index'])
|
||||
<div class="kt-portlet__head-toolbar">
|
||||
<div class="kt-portlet__head-wrapper">
|
||||
<div class="kt-portlet__head-actions">
|
||||
<button type="button" class="btn btn-bold btn-label-brand btn-sm" id="addCategory"> Tambah </button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endcan
|
||||
</div>
|
||||
|
||||
<div class="kt-portlet__body">
|
||||
<div class="table-responsive">
|
||||
<!--begin: Datatable -->
|
||||
<table class="table table-striped table-bordered table-hover table-checkable" id="kt_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 70%;">Kategori</th>
|
||||
<th style="width: 15%;">Form</th>
|
||||
<th style="width: 15%;">Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<!--end: Datatable -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--begin::Modal-->
|
||||
<div class="modal fade" id="categoryModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<form id="categoryForm" data-form="store" action="{{ route('category.store') }}" class="kt-form">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="modalHeading"></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
@csrf
|
||||
<div class="form-group">
|
||||
<label>Nama Kategori</label>
|
||||
<input type="text" class="form-control inputUppercase" id="name" name="name" placeholder="Masukan Nama kategori" value="" required="" autocomplete="off" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Form</label>
|
||||
<select name="form" class="form-control">
|
||||
<option value="work">Kerja</option>
|
||||
<option value="wash">Cuci</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Batal</button>
|
||||
<button type="submit" class="btn btn-primary" id="saveBtn" value="create">Simpan</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!--end::Modal-->
|
||||
|
||||
|
||||
<input type="hidden" name="ajax_url" value="{{ route('category.index') }}">
|
||||
<input type="hidden" name="store_url" value="{{ route('category.store') }}">
|
||||
@endsection
|
||||
|
||||
@section('javascripts')
|
||||
<script src="{{ url('js/pages/back/master/category.js') }}" type="text/javascript"></script>
|
||||
@endsection
|
||||
135
resources/views/back/master/dealer.blade.php
Normal file
135
resources/views/back/master/dealer.blade.php
Normal file
@@ -0,0 +1,135 @@
|
||||
@extends('layouts.backapp')
|
||||
|
||||
@section('content')
|
||||
|
||||
<style type="text/css">
|
||||
#nama{
|
||||
text-transform: uppercase;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="kt-portlet kt-portlet--mobile" id="kt_blockui_datatable">
|
||||
<div class="kt-portlet__head kt-portlet__head--lg">
|
||||
<div class="kt-portlet__head-label">
|
||||
<span class="kt-portlet__head-icon">
|
||||
<i class="kt-font-brand flaticon2-line-chart"></i>
|
||||
</span>
|
||||
<h3 class="kt-portlet__head-title">
|
||||
Dealers
|
||||
</h3>
|
||||
</div>
|
||||
<div class="kt-portlet__head-toolbar">
|
||||
<div class="kt-portlet__head-wrapper">
|
||||
<div class="kt-portlet__head-actions">
|
||||
@can('create', $menus['dealer.index'])
|
||||
<button type="button" class="btn btn-bold btn-label-brand btn-sm" id="addDealer"> Tambah </button>
|
||||
@endcan
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="kt-portlet__body">
|
||||
<!--begin: Datatable -->
|
||||
<table class="table table-responsive table-striped table-bordered table-hover table-checkable" id="kt_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Kode</th>
|
||||
<th style="width: 35%;">Nama Dealer</th>
|
||||
<th>PIC</th>
|
||||
<th>Alamat</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<!--end: Datatable -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--begin::Modal-->
|
||||
<div class="modal fade" id="dealerModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<form id="dealerForm" action="{{ route('dealer.store') }}" data-form="store" class="kt-form">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="modalHeading"></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
@csrf
|
||||
<input type="hidden" name="id" id="id">
|
||||
<div class="kt-portlet__body">
|
||||
<div class="form-group">
|
||||
<label>Kode</label>
|
||||
<input type="text" class="form-control" id="dealer_code" name="dealer_code" placeholder="Masukan Kode Dealer" value="" autocomplete="off" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Nama Dealer</label>
|
||||
<input type="text" class="form-control inputUppercase" id="name" name="name" placeholder="Masukan Nama Dealer" value="" required="" autocomplete="off" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Alamat</label>
|
||||
<input type="text" class="form-control" id="address" name="address" required placeholder="Masukan Alamat" value="" autocomplete="off" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Batal</button>
|
||||
<button type="submit" class="btn btn-primary" id="saveBtn" value="create">Simpan</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!--end::Modal-->
|
||||
<!--begin::Modal-->
|
||||
<div class="modal fade" id="picModal" tabindex="-1" role="dialog" aria-labelledby="picModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<form id="picForm" data-form="store" class="kt-form">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="modalHeading"></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
@csrf
|
||||
<div class="kt-portlet__body">
|
||||
<div class="form-group">
|
||||
<label>Kode</label>
|
||||
<input type="text" class="form-control" disabled id="dealer_code" name="dealer_code" placeholder="Masukan Kode Dealer" value="" autocomplete="off" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Nama Dealer</label>
|
||||
<input type="text" class="form-control inputUppercase" disabled id="name" name="name" placeholder="Masukan Nama Dealer" value="" required="" autocomplete="off" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="pic_id">PIC</label>
|
||||
<select name="pic_id" id="pic_id" class="form-control">
|
||||
@foreach ($mechanics as $mechanic)
|
||||
<option value="{{ $mechanic->id }}">{{ $mechanic->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Batal</button>
|
||||
<button type="submit" class="btn btn-primary" id="saveBtn" value="create">Simpan</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!--end::Modal-->
|
||||
|
||||
<input type="hidden" name="ajax_url" value="{{ route('dealer.index') }}">
|
||||
<input type="hidden" name="store_url" value="{{ route('dealer.store') }}">
|
||||
@endsection
|
||||
|
||||
@section('javascripts')
|
||||
<script src="{{ url('js/pages/back/master/dealer.js') }}" type="text/javascript"></script>
|
||||
@endsection
|
||||
105
resources/views/back/master/work.blade.php
Normal file
105
resources/views/back/master/work.blade.php
Normal file
@@ -0,0 +1,105 @@
|
||||
@extends('layouts.backapp')
|
||||
|
||||
@section('content')
|
||||
|
||||
<style type="text/css">
|
||||
#nama{
|
||||
text-transform: uppercase;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="kt-portlet kt-portlet--mobile" id="kt_blockui_datatable">
|
||||
<div class="kt-portlet__head kt-portlet__head--lg">
|
||||
<div class="kt-portlet__head-label">
|
||||
<span class="kt-portlet__head-icon">
|
||||
<i class="kt-font-brand flaticon2-line-chart"></i>
|
||||
</span>
|
||||
<h3 class="kt-portlet__head-title">
|
||||
Pekerjaan
|
||||
</h3>
|
||||
</div>
|
||||
@can('create', $menus['work.index'])
|
||||
<div class="kt-portlet__head-toolbar">
|
||||
<div class="kt-portlet__head-wrapper">
|
||||
<div class="kt-portlet__head-actions">
|
||||
<button type="button" class="btn btn-bold btn-label-brand btn-sm" id="addWork"> Tambah </button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endcan
|
||||
</div>
|
||||
|
||||
<div class="kt-portlet__body">
|
||||
<div class="table-responsive">
|
||||
<!--begin: Datatable -->
|
||||
<table class="table table-striped table-bordered table-hover table-checkable" id="kt_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Kategori</th>
|
||||
<th>Pekerjaan</th>
|
||||
<th>Short Name</th>
|
||||
<th>Deskripsi</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<!--end: Datatable -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--begin::Modal-->
|
||||
<div class="modal fade" id="workModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<form id="workForm" class="kt-form">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="modalHeading"></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="kt-portlet__body">
|
||||
<div class="form-group">
|
||||
<label>Nama Pekerjaan</label>
|
||||
<input type="text" class="form-control inputUppercase" id="name" name="name" placeholder="Masukan Nama Pekerjaan" value="" required="" autocomplete="off" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Short Name</label>
|
||||
<input type="text" class="form-control inputUppercase" id="shortname" name="shortname" placeholder="Masukan Short Name" value="" required="" autocomplete="off" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="category_id">Kategori</label>
|
||||
<select name="category_id" id="category_id" class="form-control">
|
||||
@foreach ($categories as $category)
|
||||
<option value="{{ $category->id }}">{{ $category->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="desc">Deskripsi Pekerjaan</label>
|
||||
<textarea name="desc" id="desc" rows="5" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Batal</button>
|
||||
<button type="submit" class="btn btn-primary" id="saveBtn" value="create">Simpan</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!--end::Modal-->
|
||||
|
||||
|
||||
<input type="hidden" name="ajax_url" value="{{ route('work.index') }}">
|
||||
<input type="hidden" name="store_url" value="{{ route('work.store') }}">
|
||||
|
||||
@endsection
|
||||
|
||||
@section('javascripts')
|
||||
<script src="{{ url('js/pages/back/master/work.js') }}" type="text/javascript"></script>
|
||||
@endsection
|
||||
410
resources/views/back/report/transaction.blade.php
Normal file
410
resources/views/back/report/transaction.blade.php
Normal file
@@ -0,0 +1,410 @@
|
||||
@extends('layouts.backapp')
|
||||
|
||||
@section('content')
|
||||
<style>
|
||||
.table-responsive {
|
||||
height: 60vh;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.nav-link-tab {
|
||||
font-weight: bold !important;
|
||||
}
|
||||
|
||||
.nav-link-tab.active {
|
||||
font-weight: normal !important;
|
||||
}
|
||||
|
||||
.dataTables_wrapper .dataTable td, .dataTables_wrapper .dataTable th, .dataTables_wrapper .dataTable tr {
|
||||
background: #fff;
|
||||
}
|
||||
</style>
|
||||
<div class="kt-portlet kt-portlet--mobile" id="kt_blockui_datatable">
|
||||
<div class="kt-portlet__head kt-portlet__head--lg">
|
||||
<div class="kt-portlet__head-label">
|
||||
<span class="kt-portlet__head-icon">
|
||||
<i class="kt-font-brand flaticon2-line-chart"></i>
|
||||
</span>
|
||||
<h3 class="kt-portlet__head-title">
|
||||
Laporan Pekerjaan
|
||||
</h3>
|
||||
</div>
|
||||
<div class="kt-portlet__head-toolbar">
|
||||
<div class="kt-portlet__head-wrapper">
|
||||
<div class="kt-portlet__head-actions mt-2 mb-2">
|
||||
@can('update', $menus['report.transaction'])
|
||||
<a href="{{ route('report.transaction.bulkclose') }}" id="bulk-close" class="btn btn-warning">Close Terpilih</a>
|
||||
@endcan
|
||||
<button id="export" class="btn btn-success">Export</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="kt-portlet__body">
|
||||
<form class="kt-form kt-form--fit mb-5" id="searchForm">
|
||||
<div class="row">
|
||||
<div class="col-4 kt-margin-b-10-tablet-and-mobile">
|
||||
<div class="input-daterange input-group" id="kt_datepicker_range">
|
||||
<input type="text" class="form-control" placeholder="Tanggal Mulai" id="date_start" name="date_start">
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text"><i class="la la-ellipsis-h"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" placeholder="Tanggal Akhir" id="date_end" name="date_end">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3 kt-margin-b-10-tablet-and-mobile">
|
||||
<div class="input-daterange input-group">
|
||||
<select name="mechanic" id="mechanic" class="form-control">
|
||||
<option value="0" disabled selected>Mekanik</option>
|
||||
@foreach ($mechanics as $mechanic)
|
||||
<option value="{{ $mechanic->id }}">{{ $mechanic->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<select name="sa" id="sa" class="form-control">
|
||||
<option value="0" disabled selected>SA</option>
|
||||
@foreach ($sas as $sa)
|
||||
<option value="{{ $sa->id }}">{{ $sa->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3 kt-margin-b-10-tablet-and-mobile">
|
||||
<div class="form-group">
|
||||
<select name="dealer" id="dealer" class="form-control">
|
||||
<option value="0" disabled selected>Dealer</option>
|
||||
@foreach ($dealers as $dealer)
|
||||
<option value="{{ $dealer->id }}">{{ $dealer->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2 kt-margin-b-10-tablet-and-mobile">
|
||||
<button type="button" class="btn btn-brand btn-elevate btn-icon-sm" id="kt_search"> Cari</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!--begin: Datatable -->
|
||||
<div class="table-responsive">
|
||||
<table class="table" id="kt_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="background: #fff;z-index: 2;"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', this.checked);" /></th>
|
||||
<th style="background: #fff;z-index: 2;">Tanggal</th>
|
||||
<th>Dealer</th>
|
||||
<th>Mekanik</th>
|
||||
<th>SA</th>
|
||||
<th>No. Polisi</th>
|
||||
<th>Warranty</th>
|
||||
<th>Kategori</th>
|
||||
<th>Qty</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<!--end: Datatable -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!--begin::Modal-->
|
||||
<div class="modal fade" id="transactionModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<form id="transactionForm" data-form="store" class="kt-form">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="modalHeading"></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
@csrf
|
||||
<div class="kt-portlet__body">
|
||||
<div class="form-group">
|
||||
<label>Dealer</label>
|
||||
<select name="dealer_id" id="dealer_id" class="form-control">
|
||||
@foreach ($dealers as $dealer)
|
||||
<option value="{{ $dealer->id }}">{{ $dealer->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>SPK</label>
|
||||
<input type="text" class="form-control" id="spk" name="spk" placeholder="SPK" value="" autocomplete="off" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Tanggal</label>
|
||||
<input type="date" class="form-control" id="date" name="date" placeholder="Tanggal" value="" autocomplete="off" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>No. Polisi</label>
|
||||
<input type="text" class="form-control" id="police_number" name="police_number" placeholder="No. Polisi" value="" autocomplete="off" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Pekerjaan</label>
|
||||
<select name="work_id" id="work_id" class="form-control">
|
||||
@foreach ($works as $work)
|
||||
<option value="{{ $work->id }}">{{ $work->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Qty</label>
|
||||
<input type="number" class="form-control" id="qty" name="qty" placeholder="Qty" value="" autocomplete="off" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Warranty</label>
|
||||
<select name="warranty" id="warranty" class="form-control">
|
||||
<option value="1">Ya</option>
|
||||
<option value="0">Tidak</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Service Advisor</label>
|
||||
<select name="sa_id" id="sa_id" class="form-control">
|
||||
@foreach ($sas as $sa)
|
||||
<option value="{{ $sa->id }}">{{ $sa->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Batal</button>
|
||||
<button type="submit" class="btn btn-primary" id="saveBtn" value="create">Simpan</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!--end::Modal-->
|
||||
|
||||
<input type="hidden" name="ajax_url" value="{{ route('report.transaction_data') }}">
|
||||
@endsection
|
||||
|
||||
@section('javascripts')
|
||||
<script>
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
}
|
||||
});
|
||||
|
||||
var table = $('#kt_table').DataTable({
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
fixedColumns: {
|
||||
left: 2,
|
||||
right: 1
|
||||
},
|
||||
ajax: {
|
||||
url: $('input[name="ajax_url"]').val(),
|
||||
type: "POST",
|
||||
data: function (q) {
|
||||
q.date_start = $('input[name="date_start"]').val();
|
||||
q.date_end = $('input[name="date_end"]').val();
|
||||
q.sa = $('select[name="sa"]').val();
|
||||
q.mechanic = $('select[name="mechanic"]').val();
|
||||
q.dealer = $('select[name="dealer"]').val();
|
||||
}
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
data: 'id',
|
||||
orderable: false,
|
||||
searchable: false,
|
||||
name: 'transaction.id',
|
||||
render: function(data, type, row) {
|
||||
return `<input type="checkbox" name="selected[]" value="${data}" />`;
|
||||
}
|
||||
},
|
||||
{data: 'date', name: 'transactions.date'},
|
||||
{data: 'dealer_name', name: 'd.name'},
|
||||
{data: 'username', name: 'users.name'},
|
||||
{data: 'sa_name', name: 'sa.name'},
|
||||
{data: 'police_number', name: 'transactions.police_number'},
|
||||
{
|
||||
data: 'warranty',
|
||||
name: 'transactions.warranty',
|
||||
render: function(data, type, row) {
|
||||
if(row.warranty == 1){
|
||||
return 'Ya'
|
||||
}else{
|
||||
return 'Tidak'
|
||||
}
|
||||
}
|
||||
},
|
||||
{data: 'category_name', name: 'cat.name'},
|
||||
{data: 'qty', name: 'transactions.qty'},
|
||||
{data: 'action', name: 'action', orderable: false, searchable: false},
|
||||
]
|
||||
});
|
||||
|
||||
$("#export").click(function() {
|
||||
let data = {
|
||||
date_start : $('input[name="date_start"]').val(),
|
||||
date_end : $('input[name="date_end"]').val(),
|
||||
sa : $('select[name="sa"]').val(),
|
||||
mechanic : $('select[name="mechanic"]').val(),
|
||||
dealer : $('select[name="dealer"]').val()
|
||||
}
|
||||
|
||||
var url = '{{ route("report.transaction.export") }}?' + $.param(data)
|
||||
window.location = url;
|
||||
})
|
||||
|
||||
function closeTransaction(id)
|
||||
{
|
||||
let url = $("#closeTransaction"+id).attr('data-url')
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: 'PUT',
|
||||
success: function(res) {
|
||||
table.ajax.reload()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function destroyTransaction(id)
|
||||
{
|
||||
let action = $("#destroyTransaction"+id).attr("data-action")
|
||||
Swal.fire({
|
||||
title: 'Hapus Pekerjaan?',
|
||||
text: "Anda tidak akan bisa mengembalikannya!",
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#d33',
|
||||
cancelButtonColor: '#dedede',
|
||||
confirmButtonText: 'Hapus'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
$.ajax({
|
||||
url: action,
|
||||
type: 'POST',
|
||||
data: {
|
||||
_token: $('meta[name="csrf-token"]').attr('content'),
|
||||
_method: 'DELETE'
|
||||
},
|
||||
success: function(res) {
|
||||
Swal.fire(
|
||||
'Pekerjaan Dihapus!'
|
||||
)
|
||||
table.ajax.reload()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function editTransaction(id) {
|
||||
let form_action = $("#editTransaction"+id).attr("data-action")
|
||||
let edit_url = $("#editTransaction"+id).attr("data-url")
|
||||
$("#transactionModal").modal("show")
|
||||
$("#transactionForm").append('<input type="hidden" name="_method" value="PUT">')
|
||||
$("#transactionForm").attr('action', form_action)
|
||||
$("#transactionForm").attr('data-form', 'update')
|
||||
$.get(edit_url, function(res) {
|
||||
$("#transactionForm select[name='dealer_id'] option[value='"+ res.data.dealer_id +"']").prop('selected', true);
|
||||
$("#transactionForm select[name='sa_id'] option[value='"+ res.data.user_sa_id +"']").prop('selected', true);
|
||||
$("#transactionForm select[name='work_id'] option[value='"+ res.data.work_id +"']").prop('selected', true);
|
||||
$("#transactionForm select[name='dealer_id'] option[value='"+ res.data.dealer_id +"']").prop('selected', true);
|
||||
$("#transactionForm select[name='warranty'] option[value='"+ res.data.warranty +"']").prop('selected', true);
|
||||
$("#transactionForm input[name='spk']").val(res.data.spk)
|
||||
var d = new Date(res.data.date);
|
||||
var day = ("0" + d.getDate()).slice(-2);
|
||||
var month = ("0" + (d.getMonth() + 1)).slice(-2);
|
||||
|
||||
var date = d.getFullYear()+"-"+(month)+"-"+(day) ;
|
||||
$("#transactionForm input[name='date']").val(date)
|
||||
$("#transactionForm input[name='police_number']").val(res.data.police_number)
|
||||
$("#transactionForm input[name='qty']").val(res.data.qty)
|
||||
})
|
||||
}
|
||||
|
||||
var KTBootstrapDatepicker = function () {
|
||||
var arrows;
|
||||
arrows = {
|
||||
leftArrow: '<i class="la la-angle-left"></i>',
|
||||
rightArrow: '<i class="la la-angle-right"></i>'
|
||||
}
|
||||
|
||||
var daterange = function () {
|
||||
$('#kt_datepicker_range').datepicker({
|
||||
todayHighlight: true,
|
||||
orientation: "bottom left",
|
||||
templates: arrows,
|
||||
autoclose: true,
|
||||
format: "yyyy-mm-dd",
|
||||
todayBtn: "linked",
|
||||
clearBtn: true
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
init: function () {
|
||||
daterange();
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
function bulkClose(url, selected) {
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: 'POST',
|
||||
data: { selected: selected },
|
||||
success: function(res) {
|
||||
$("#workModal").modal("hide")
|
||||
$('#workForm').trigger("reset")
|
||||
table.ajax.reload()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
jQuery(document).ready(function () {
|
||||
KTBootstrapDatepicker.init();
|
||||
|
||||
$('#kt_search').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
table.ajax.reload();
|
||||
});
|
||||
|
||||
$('#bulk-close').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
let url = $('#bulk-close').attr('href')
|
||||
let selected = $("input[name='selected[]']:checked").map(function (idx, elem) {
|
||||
return $(elem).val();
|
||||
}).get();
|
||||
|
||||
bulkClose(url, selected)
|
||||
table.ajax.reload();
|
||||
});
|
||||
|
||||
|
||||
$("#transactionForm").submit(function(e) {
|
||||
e.preventDefault();
|
||||
$.ajax({
|
||||
url: $('#transactionForm').attr("action"),
|
||||
type: 'POST',
|
||||
data: $('#transactionForm').serialize(),
|
||||
success: function(res) {
|
||||
$("#transactionModal").modal("hide")
|
||||
$('#transactionForm').trigger("reset")
|
||||
if(res.status == 200) {
|
||||
Swal.fire(
|
||||
'Ubah Data',
|
||||
'Data berhasil diubah'
|
||||
).then((result) => {
|
||||
table.ajax.reload()
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
144
resources/views/back/report/transaction_dealer.blade.php
Normal file
144
resources/views/back/report/transaction_dealer.blade.php
Normal file
@@ -0,0 +1,144 @@
|
||||
@extends('layouts.backapp')
|
||||
|
||||
@section('content')
|
||||
<div class="kt-portlet kt-portlet--mobile" id="kt_blockui_datatable">
|
||||
<div class="kt-portlet__head kt-portlet__head--lg">
|
||||
<div class="kt-portlet__head-label">
|
||||
<span class="kt-portlet__head-icon">
|
||||
<i class="kt-font-brand flaticon2-line-chart"></i>
|
||||
</span>
|
||||
<h3 class="kt-portlet__head-title">
|
||||
Laporan Performa Dealer
|
||||
</h3>
|
||||
</div>
|
||||
<div class="kt-portlet__head-toolbar">
|
||||
<div class="kt-portlet__head-wrapper">
|
||||
<div class="kt-portlet__head-actions mt-2 mb-2">
|
||||
<a href="{{ route('report.transaction.bulkclose') }}" id="bulk-close" class="btn btn-warning">Close Terpilih</a>
|
||||
<button id="export" class="btn btn-success">Export</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="kt-portlet__body">
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" data-toggle="tab" href="#" data-target="#kt_tabs_1_1">Tabel</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-toggle="tab" href="#kt_tabs_1_2">Diagram</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="kt_tabs_1_1" role="tabpanel">
|
||||
<div class="table-responsive">
|
||||
<!--begin: Datatable -->
|
||||
<table class="table table-striped table-responsive table-bordered table-hover table-checkable" id="kt_table">
|
||||
<thead>
|
||||
<tr>
|
||||
{{-- <th><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', this.checked);" /></th> --}}
|
||||
<th rowspan="2">No</th>
|
||||
<th rowspan="2">SA</th>
|
||||
<th colspan="{{ $work_count }}" class="text-center">Pekerjaan</th>
|
||||
</tr>
|
||||
<tr>
|
||||
@foreach ($works as $work)
|
||||
<th>{{ $work['name'] }}</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($trxs as $index => $transaction)
|
||||
<tr>
|
||||
<td>{{ $index + 1 }}</td>
|
||||
<td>{{ $transaction['sa_name'] }}</td>
|
||||
@foreach ($transaction['works'] as $item)
|
||||
<td>{{ $item['qty'] }}</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<!--end: Datatable -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="kt_tabs_1_2" role="tabpanel">
|
||||
<div style="margin-top: 100px"><canvas id="sa-chart"></canvas></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="ajax_url" value="{{ route('report.transaction_sa') }}">
|
||||
@endsection
|
||||
|
||||
@section('javascripts')
|
||||
<script>
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
}
|
||||
});
|
||||
|
||||
function random_rgba(alpha) {
|
||||
var o = Math.round, r = Math.random, s = 255;
|
||||
return 'rgba(' + o(r()*s) + ',' + o(r()*s) + ',' + o(r()*s) + ','+ alpha +')';
|
||||
}
|
||||
|
||||
let labels = JSON.parse('{{ $sa_names }}'.replace(/("\;)/g,"\""));
|
||||
let labels2 = []
|
||||
labels.forEach(function(label) {
|
||||
if (/\s/.test(label)) {
|
||||
labels2.push(label.split(" "))
|
||||
}else{
|
||||
labels2.push(label)
|
||||
}
|
||||
})
|
||||
|
||||
const trx_data = JSON.parse('{{ $trx_data }}'.replace(/("\;)/g,"\""));
|
||||
let trxs = []
|
||||
trx_data.forEach(trx => {
|
||||
let data = {
|
||||
label : trx['work_name'],
|
||||
data: trx[['qty']],
|
||||
fill: false,
|
||||
backgroundColor: random_rgba(0.2),
|
||||
borderColor: random_rgba(1),
|
||||
borderWidth: 1
|
||||
}
|
||||
|
||||
trxs.push(data)
|
||||
});
|
||||
|
||||
const data = {
|
||||
labels: labels2,
|
||||
datasets: trxs
|
||||
};
|
||||
|
||||
new Chart($("#sa-chart"), {
|
||||
type: 'bar',
|
||||
data: data,
|
||||
options: {
|
||||
indexAxis: 'y',
|
||||
maintainAspectRatio: false,
|
||||
scales: {
|
||||
xAxis: {
|
||||
position: 'top'
|
||||
}
|
||||
},
|
||||
plugins: {
|
||||
legend: {
|
||||
display: true,
|
||||
labels: {
|
||||
color: 'rgb(255, 99, 132)'
|
||||
},
|
||||
position: 'bottom'
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
$('#kt_table').DataTable();
|
||||
</script>
|
||||
@endsection
|
||||
133
resources/views/back/report/transaction_sa.blade.php
Normal file
133
resources/views/back/report/transaction_sa.blade.php
Normal file
@@ -0,0 +1,133 @@
|
||||
@extends('layouts.backapp')
|
||||
|
||||
@section('content')
|
||||
<div class="kt-portlet kt-portlet--mobile" id="kt_blockui_datatable">
|
||||
<div class="kt-portlet__head kt-portlet__head--lg">
|
||||
<div class="kt-portlet__head-label">
|
||||
<span class="kt-portlet__head-icon">
|
||||
<i class="kt-font-brand flaticon2-line-chart"></i>
|
||||
</span>
|
||||
<h3 class="kt-portlet__head-title">
|
||||
Laporan Performa SA
|
||||
</h3>
|
||||
</div>
|
||||
<div class="kt-portlet__head-toolbar">
|
||||
<div class="kt-portlet__head-wrapper">
|
||||
<div class="kt-portlet__head-actions mt-4">
|
||||
<form action="{{ route('report.transaction_sa') }}" method="get">
|
||||
<div class="form-group row">
|
||||
<div class="col-lg-2">
|
||||
<label class="">Sa:</label>
|
||||
<select name="sa" id="sa" class="form-control">
|
||||
<option value="all">Semua Sa</option>
|
||||
@foreach ($sa_datas as $sa_data)
|
||||
<option @if($sa_data->id == $sa) selected @endif value="{{ $sa_data->id }}">{{ $sa_data->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<label class="">Dealer:</label>
|
||||
<select name="dealer" id="dealer" class="form-control">
|
||||
@foreach ($dealer_datas as $dealer_data)
|
||||
<option @if($dealer_data->id == $dealer) selected @endif value="{{ $dealer_data->id }}">{{ $dealer_data->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
<label class="">Bulan:</label>
|
||||
<select name="month" id="month" class="form-control">
|
||||
<option value="01" @if($month == '01') selected @endif>Januari</option>
|
||||
<option value="02" @if($month == '02') selected @endif>Februari</option>
|
||||
<option value="03" @if($month == '03') selected @endif>Maret</option>
|
||||
<option value="04" @if($month == '04') selected @endif>April</option>
|
||||
<option value="05" @if($month == '05') selected @endif>Mei</option>
|
||||
<option value="06" @if($month == '06') selected @endif>Juni</option>
|
||||
<option value="07" @if($month == '07') selected @endif>Juli</option>
|
||||
<option value="08" @if($month == '08') selected @endif>Agustus</option>
|
||||
<option value="09" @if($month == '09') selected @endif>September</option>
|
||||
<option value="10" @if($month == '10') selected @endif>Oktober</option>
|
||||
<option value="11" @if($month == '11') selected @endif>November</option>
|
||||
<option value="12" @if($month == '12') selected @endif>Desember</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-2 col-12">
|
||||
<label for="year">Tahun</label>
|
||||
<input type="number" class="form-control" name="year" id="year" value="{{ $year }}">
|
||||
</div>
|
||||
<div class="col-lg-1">
|
||||
<br>
|
||||
<button class="btn mt-2 btn-primary">Cari</button>
|
||||
</div>
|
||||
<div class="col-lg-1">
|
||||
<br>
|
||||
<button type="button" id="export" class="btn btn-success mt-2">Export</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="kt-portlet__body">
|
||||
<style>
|
||||
.nav-link-tab {
|
||||
font-weight: bold !important;
|
||||
}
|
||||
|
||||
.nav-link-tab.active {
|
||||
font-weight: normal !important;
|
||||
}
|
||||
</style>
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link nav-link-tab active btn-primary text-light" data-toggle="tab" href="#kt_tabs_1_2"><i class="flaticon2-pie-chart-4 text-light"></i> Diagram</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link nav-link-tab btn-primary text-light" data-toggle="tab" href="#" data-target="#kt_tabs_1_1"><i class="flaticon-squares-1 text-light"></i> Tabel</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content" id="data">
|
||||
<div class="kt-portlet__body" style=" display: flex; justify-content: center; align-items: center;" id="spinner-data">
|
||||
<div class="card card-body" style="width:200px;">
|
||||
<span class="kt-spinner kt-spinner--md kt-spinner--info kt-spinner--center mt-3"></span><br>
|
||||
<h5 class="mt-2 text-center">Loading Data... </h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="ajax_url" value="{{ route('report.transaction_sa') }}">
|
||||
@endsection
|
||||
|
||||
@section('javascripts')
|
||||
<script src="{{ url('js/pages/doublescroll.js') }}" type="text/javascript"></script>
|
||||
<script>
|
||||
$.ajax({
|
||||
url: '{{ $ajax_url }}',
|
||||
type: 'GET',
|
||||
beforeSend: function(e){
|
||||
$('#spinner-data').show();
|
||||
},
|
||||
success: function(res) {
|
||||
$("#data").html(res)
|
||||
},
|
||||
complete: function(){
|
||||
$('#spinner-data').hide();
|
||||
},
|
||||
})
|
||||
|
||||
$("#export").click(function() {
|
||||
let data = {
|
||||
month : $('select[name="month"]').val(),
|
||||
dealer : $('select[name="dealer"]').val(),
|
||||
sa : $('select[name="sa"]').val()
|
||||
}
|
||||
|
||||
var url = '{{ route("report.transaction_sa.export") }}?' + $.param(data)
|
||||
window.location = url;
|
||||
})
|
||||
</script>
|
||||
@endsection
|
||||
270
resources/views/back/report/transaction_sa.blade.php.old2
Normal file
270
resources/views/back/report/transaction_sa.blade.php.old2
Normal file
@@ -0,0 +1,270 @@
|
||||
@extends('layouts.backapp')
|
||||
|
||||
@section('content')
|
||||
<div class="kt-portlet kt-portlet--mobile" id="kt_blockui_datatable">
|
||||
<div class="kt-portlet__head kt-portlet__head--lg">
|
||||
<div class="kt-portlet__head-label">
|
||||
<span class="kt-portlet__head-icon">
|
||||
<i class="kt-font-brand flaticon2-line-chart"></i>
|
||||
</span>
|
||||
<h3 class="kt-portlet__head-title">
|
||||
Laporan Performa SA
|
||||
</h3>
|
||||
</div>
|
||||
<div class="kt-portlet__head-toolbar">
|
||||
<div class="kt-portlet__head-wrapper">
|
||||
<div class="kt-portlet__head-actions mt-4">
|
||||
<form action="{{ route('report.transaction_sa') }}" method="get">
|
||||
<div class="form-group row">
|
||||
<div class="col-lg-3">
|
||||
<label class="">Sa:</label>
|
||||
<select name="sa" id="sa" class="form-control">
|
||||
<option value="all">Semua Sa</option>
|
||||
@foreach ($sa_datas as $sa_data)
|
||||
<option @if($sa_data->id == $sa) selected @endif value="{{ $sa_data->id }}">{{ $sa_data->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<label class="">Dealer:</label>
|
||||
<select name="dealer" id="dealer" class="form-control">
|
||||
<option value="all">Semua Dealer</option>
|
||||
@foreach ($dealer_datas as $dealer_data)
|
||||
<option @if($dealer_data->id == $dealer) selected @endif value="{{ $dealer_data->id }}">{{ $dealer_data->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<label class="">Bulan:</label>
|
||||
<select name="month" id="month" class="form-control">
|
||||
<option value="01" @if($month == '01') selected @endif>Januari</option>
|
||||
<option value="02" @if($month == '02') selected @endif>Februari</option>
|
||||
<option value="03" @if($month == '03') selected @endif>Maret</option>
|
||||
<option value="04" @if($month == '04') selected @endif>April</option>
|
||||
<option value="05" @if($month == '05') selected @endif>Mei</option>
|
||||
<option value="06" @if($month == '06') selected @endif>Juni</option>
|
||||
<option value="07" @if($month == '07') selected @endif>Juli</option>
|
||||
<option value="08" @if($month == '08') selected @endif>Agustus</option>
|
||||
<option value="09" @if($month == '09') selected @endif>September</option>
|
||||
<option value="10" @if($month == '10') selected @endif>Oktober</option>
|
||||
<option value="11" @if($month == '11') selected @endif>November</option>
|
||||
<option value="12" @if($month == '12') selected @endif>Desember</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
<br>
|
||||
<button class="btn mt-2 btn-primary">Cari</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="kt-portlet__body">
|
||||
<style>
|
||||
.nav-link-tab {
|
||||
font-weight: bold !important;
|
||||
}
|
||||
|
||||
.nav-link-tab.active {
|
||||
font-weight: normal !important;
|
||||
}
|
||||
</style>
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link nav-link-tab active btn-primary text-light" data-toggle="tab" href="#kt_tabs_1_2"><i class="flaticon2-pie-chart-4 text-light"></i> Diagram</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link nav-link-tab btn-primary text-light" data-toggle="tab" href="#" data-target="#kt_tabs_1_1"><i class="flaticon-squares-1 text-light"></i> Tabel</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="kt_tabs_1_2" role="tabpanel">
|
||||
<div style="margin-top: 100px;width: 100%;"><canvas id="sa-chart" ></canvas></div>
|
||||
</div>
|
||||
<div class="tab-pane" id="kt_tabs_1_1" role="tabpanel">
|
||||
<div class="table-responsive">
|
||||
<!--begin: Datatable -->
|
||||
<table class="table table-striped table-bordered table-hover table-checkable" id="kt_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan="2">SA</th>
|
||||
<th colspan="{{ count($works) }}" class="text-center">Pekerjaan</th>
|
||||
</tr>
|
||||
<tr>
|
||||
@foreach ($works as $work)
|
||||
<th>{{ $work['name'] }}</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<!--end: Datatable -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="ajax_url" value="{{ route('report.transaction_sa') }}">
|
||||
@endsection
|
||||
|
||||
@section('javascripts')
|
||||
<script>
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
}
|
||||
});
|
||||
|
||||
function random_rgba(alpha) {
|
||||
var o = Math.round, r = Math.random, s = 255;
|
||||
return 'rgba(' + o(r()*s) + ',' + o(r()*s) + ',' + o(r()*s) + ','+ alpha +')';
|
||||
}
|
||||
|
||||
const options = {
|
||||
indexAxis: 'y',
|
||||
maintainAspectRatio: false,
|
||||
scales: {
|
||||
x: {
|
||||
position: 'top'
|
||||
}
|
||||
},
|
||||
plugins: {
|
||||
legend: {
|
||||
display: true,
|
||||
labels: {
|
||||
color: 'rgb(255, 99, 132)'
|
||||
},
|
||||
position: 'top'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var chart = new Chart($("#sa-chart"), {
|
||||
type: 'bar',
|
||||
data: {
|
||||
labels: [],
|
||||
datasets: []
|
||||
},
|
||||
plugins: [ChartDataLabels],
|
||||
options: options
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: '{{ route("report.get_sa_has_transactions") }}',
|
||||
type: 'POST',
|
||||
data: {
|
||||
_token: '{{ csrf_token() }}',
|
||||
month: '{{ $month }}',
|
||||
dealer: '{{ $dealer }}',
|
||||
sa: '{{ $sa }}',
|
||||
},
|
||||
success: function(res) {
|
||||
res.forEach(function(sa, i) {
|
||||
$.ajax({
|
||||
url: '{{ route("report.sa_work_trx") }}',
|
||||
type: 'POST',
|
||||
data: {
|
||||
'_token': '{{ csrf_token() }}',
|
||||
'month' : '{{ $month }}',
|
||||
'dealer' : '{{ $dealer }}',
|
||||
'sa_filter' : '{{ $sa }}',
|
||||
'sa' : sa.id,
|
||||
},
|
||||
success: function(resWork) {
|
||||
if (/\s/.test(sa.name)) {
|
||||
chart.data.labels.push(sa.name.split(" "))
|
||||
if(res.length == 1) {
|
||||
chart.update()
|
||||
}
|
||||
}else{
|
||||
chart.data.labels.push(sa.name)
|
||||
if(res.length == 1) {
|
||||
chart.update()
|
||||
}
|
||||
}
|
||||
let tds = `<td id="row-${sa.id}">${sa.name}</td>`;
|
||||
|
||||
resWork.forEach(function(work, j) {
|
||||
if(i == 0) {
|
||||
$.when(addTrxData(work)).then(function() {
|
||||
chart.data.datasets[j].data.push(work.qty)
|
||||
if(res.length == 1) {
|
||||
chart.update()
|
||||
}
|
||||
})
|
||||
}else{
|
||||
chart.data.datasets[j].data.push(work.qty)
|
||||
if(res.length == 1) {
|
||||
chart.update()
|
||||
}
|
||||
}
|
||||
|
||||
tds += `<td>${work.qty}</td>`
|
||||
})
|
||||
|
||||
$("#kt_table tbody").append(`
|
||||
<tr>
|
||||
${tds}
|
||||
</tr>
|
||||
`)
|
||||
}
|
||||
}).done(function() {
|
||||
if(res.length > 1) {
|
||||
chart.update()
|
||||
}
|
||||
})
|
||||
|
||||
$("#sa-chart").parent().height($("#sa-chart").parent().height() + 650)
|
||||
})
|
||||
}
|
||||
}).done(function(res) {
|
||||
if(res.length == 0) {
|
||||
$("#sa-chart").parent().append(`
|
||||
<div class="alert" role="alert">
|
||||
<div class="alert-text">
|
||||
<h4 class="alert-heading">Data Kosong!</h4>
|
||||
<p>Belum ada data pekerjaan masuk</p>
|
||||
<hr>
|
||||
</div>
|
||||
</div>
|
||||
`)
|
||||
$("#sa-chart").parent().css('height', '100%')
|
||||
$("#sa-chart").remove()
|
||||
}
|
||||
})
|
||||
|
||||
function addTrxData(work) {
|
||||
let data = {
|
||||
label : work['work_name'],
|
||||
data: [],
|
||||
fill: false,
|
||||
backgroundColor: random_rgba(0.2),
|
||||
borderColor: random_rgba(1),
|
||||
borderWidth: 1,
|
||||
barPercentage: 0.5,
|
||||
categoryPercentage: 1
|
||||
}
|
||||
|
||||
chart.data.datasets.push(data)
|
||||
}
|
||||
|
||||
$(".nav-link-tab.active").removeClass('btn-primary')
|
||||
$(".nav-link-tab.active").removeClass('text-light')
|
||||
$(".nav-link-tab.active i").toggleClass('text-light')
|
||||
$(".nav-link-tab").parent().click(function() {
|
||||
$(".nav-link-tab").toggleClass('btn-primary')
|
||||
$(".nav-link-tab").toggleClass('text-light')
|
||||
$(".nav-link-tab i").toggleClass('text-light')
|
||||
})
|
||||
|
||||
setTimeout(() => {
|
||||
$('#kt_table').DataTable();
|
||||
}, 10000);
|
||||
</script>
|
||||
@endsection
|
||||
133
resources/views/back/report/transaction_sa_data.blade.php
Normal file
133
resources/views/back/report/transaction_sa_data.blade.php
Normal file
@@ -0,0 +1,133 @@
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="kt_tabs_1_2" role="tabpanel">
|
||||
<canvas id="sa-chart" ></canvas>
|
||||
</div>
|
||||
<div class="tab-pane" id="kt_tabs_1_1" role="tabpanel">
|
||||
<div class="table-responsive">
|
||||
<!--begin: Datatable -->
|
||||
<table class="table table-striped table-bordered table-hover table-checkable" id="kt_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan="2">No</th>
|
||||
<th colspan="{{ count($theads) }}" class="text-center">Pekerjaan</th>
|
||||
</tr>
|
||||
<tr>
|
||||
@foreach ($theads as $thead)
|
||||
<th>{{ $thead }}</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($work_trx as $sa_id => $trx)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
@foreach ($trx as $item)
|
||||
<td>{{ $item }}</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<!--end: Datatable -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
}
|
||||
});
|
||||
|
||||
function random_rgba(alpha) {
|
||||
var o = Math.round, r = Math.random, s = 255;
|
||||
return 'rgba(' + o(r()*s) + ',' + o(r()*s) + ',' + o(r()*s) + ','+ alpha +')';
|
||||
}
|
||||
|
||||
let labels = JSON.parse('{{ $sa_names }}'.replace(/("\;)/g,"\""));
|
||||
let labels2 = []
|
||||
labels.forEach(function(label) {
|
||||
if (/\s/.test(label)) {
|
||||
labels2.push(label.split(" "))
|
||||
}else{
|
||||
labels2.push(label)
|
||||
}
|
||||
})
|
||||
|
||||
const trx_data = JSON.parse('{{ $sa_trx }}'.replace(/("\;)/g,"\""));
|
||||
let height = trx_data.length * 20;
|
||||
let chart_height = 0;
|
||||
let trxs = []
|
||||
trx_data.forEach(trx => {
|
||||
let data = {
|
||||
label : trx['work_name'],
|
||||
data: trx['qty'],
|
||||
fill: false,
|
||||
backgroundColor: random_rgba(0.2),
|
||||
borderColor: random_rgba(1),
|
||||
borderWidth: 1,
|
||||
barPercentage: 0.5,
|
||||
categoryPercentage: 1,
|
||||
skipNull: true
|
||||
}
|
||||
chart_height += height
|
||||
trxs.push(data)
|
||||
});
|
||||
|
||||
const data = {
|
||||
labels: labels2,
|
||||
datasets: trxs
|
||||
};
|
||||
|
||||
if(labels2.length && trxs.length) {
|
||||
new Chart($("#sa-chart"), {
|
||||
type: 'bar',
|
||||
data: data,
|
||||
plugins: [ChartDataLabels],
|
||||
options: {
|
||||
indexAxis: 'y',
|
||||
maintainAspectRatio: false,
|
||||
scales: {
|
||||
x: {
|
||||
position: 'top',
|
||||
beginAtZero: true
|
||||
}
|
||||
},
|
||||
plugins: {
|
||||
legend: {
|
||||
display: true,
|
||||
labels: {
|
||||
color: 'rgb(255, 99, 132)'
|
||||
},
|
||||
position: 'top'
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
$("#sa-chart").parent().height($("#sa-chart").parent().height() + chart_height)
|
||||
}else{
|
||||
$("#sa-chart").parent().append(`
|
||||
<div class="alert" role="alert">
|
||||
<div class="alert-text">
|
||||
<h4 class="alert-heading">Data Kosong!</h4>
|
||||
<p>Belum ada data pekerjaan masuk</p>
|
||||
<hr>
|
||||
</div>
|
||||
</div>
|
||||
`)
|
||||
$("#sa-chart").parent().css('height', '100%')
|
||||
$("#sa-chart").remove()
|
||||
}
|
||||
|
||||
$(".nav-link-tab.active").removeClass('btn-primary')
|
||||
$(".nav-link-tab.active").removeClass('text-light')
|
||||
$(".nav-link-tab.active i").toggleClass('text-light')
|
||||
$(".nav-link-tab").parent().click(function() {
|
||||
$(".nav-link-tab").toggleClass('btn-primary')
|
||||
$(".nav-link-tab").toggleClass('text-light')
|
||||
$(".nav-link-tab i").toggleClass('text-light')
|
||||
})
|
||||
|
||||
$('#kt_table').DataTable();
|
||||
</script>
|
||||
269
resources/views/back/roleprivileges.blade.php
Normal file
269
resources/views/back/roleprivileges.blade.php
Normal file
@@ -0,0 +1,269 @@
|
||||
@extends('layouts.backapp')
|
||||
|
||||
@section('content')
|
||||
@if (session('success'))
|
||||
<div class="alert alert-success alert-dismissible fade show" role="alert">
|
||||
<p>{{ session('success') }}</p>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="kt-portlet kt-portlet--mobile" id="kt_blockui_datatable">
|
||||
<div class="kt-portlet__head kt-portlet__head--lg">
|
||||
<div class="kt-portlet__head-label">
|
||||
<span class="kt-portlet__head-icon">
|
||||
<i class="kt-font-brand flaticon2-line-chart"></i>
|
||||
</span>
|
||||
<h3 class="kt-portlet__head-title">
|
||||
Role & Privileges
|
||||
</h3>
|
||||
</div>
|
||||
@can('create', $menus['roleprivileges.index'])
|
||||
<div class="kt-portlet__head-toolbar">
|
||||
<div class="kt-portlet__head-wrapper">
|
||||
<div class="kt-portlet__head-actions">
|
||||
<button type="button" class="btn btn-bold btn-label-brand btn-sm" data-toggle="modal" data-target="#roleModal"> Tambah </button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endcan
|
||||
</div>
|
||||
|
||||
<div class="kt-portlet__body">
|
||||
<div class="table-responsive">
|
||||
<!--begin: Datatable -->
|
||||
<table class="table table-striped table-bordered table-hover table-checkable" id="kt_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th>Nama Role</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($roles as $role)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $role->name }}</td>
|
||||
<td>
|
||||
@can('update', $menus['roleprivileges.index'])
|
||||
<button class="btn btn-sm btn-warning" onclick="editRole({{$role->id}})"><i class="fa fa-edit"></i> Edit</button>
|
||||
@endcan
|
||||
@can('delete', $menus['roleprivileges.index'])
|
||||
<br>
|
||||
<br>
|
||||
<form action="{{ route('roleprivileges.delete', $role->id) }}" method="post" onsubmit="return confirm('Anda akan menghapus role {{ $role->name }}?');">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<button type="submit" class="btn btn-sm btn-danger"><i class="fa fa-trash"></i> Hapus</button>
|
||||
</form>
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<!--end: Datatable -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="roleModal" tabindex="-1" role="dialog" aria-labelledby="roleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<form action="{{ route('roleprivileges.store') }}" method="post">
|
||||
@csrf
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="roleModalLabel">Tambah Role & Privileges</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label for="role">Nama Role Baru </label>
|
||||
<input type="text" class="form-control @error('role') is-invalid @enderror" name="role" id="role">
|
||||
@error('role')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="container @error('privileges') is-invalid @enderror" id="role-privilege">
|
||||
@foreach ($menus as $menu)
|
||||
<div>
|
||||
<h5>{{ $menu->name }}</h5>
|
||||
<div class="row">
|
||||
@if ($menu->link == 'adminarea' || $menu->link == 'mechanicarea')
|
||||
<div class="col-lg-12">
|
||||
<div class="form-group">
|
||||
<label style="cursor: pointer;"><input type="checkbox" onChange="if(this.checked) { this.parentNode.nextElementSibling.value = 1 }else{ this.parentNode.nextElementSibling.value = 0} "/> View</label>
|
||||
<input type="hidden" value="0" name="privileges[{{ $menu->id }}][view]">
|
||||
<input type="hidden" value="0" name="privileges[{{ $menu->id }}][create]">
|
||||
<input type="hidden" value="0" name="privileges[{{ $menu->id }}][update]">
|
||||
<input type="hidden" value="0" name="privileges[{{ $menu->id }}][delete]">
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<div class="col-lg-3">
|
||||
<div class="form-group">
|
||||
<label style="cursor: pointer;"><input type="checkbox" onChange="if(this.checked) { this.parentNode.nextElementSibling.value = 1 }else{ this.parentNode.nextElementSibling.value = 0} "/> Create</label>
|
||||
<input type="hidden" value="0" name="privileges[{{ $menu->id }}][create]">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="form-group">
|
||||
<label style="cursor: pointer;"><input type="checkbox" onChange="if(this.checked) { this.parentNode.nextElementSibling.value = 1 }else{ this.parentNode.nextElementSibling.value = 0} "/> Update</label>
|
||||
<input type="hidden" value="0" name="privileges[{{ $menu->id }}][update]">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="form-group">
|
||||
<label style="cursor: pointer;"><input type="checkbox" onChange="if(this.checked) { this.parentNode.nextElementSibling.value = 1 }else{ this.parentNode.nextElementSibling.value = 0} "/> Delete</label>
|
||||
<input type="hidden" value="0" name="privileges[{{ $menu->id }}][delete]">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="form-group">
|
||||
<label style="cursor: pointer;"><input type="checkbox" onChange="if(this.checked) { this.parentNode.nextElementSibling.value = 1 }else{ this.parentNode.nextElementSibling.value = 0} "/> View</label>
|
||||
<input type="hidden" value="0" name="privileges[{{ $menu->id }}][view]">
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@error('privileges')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="submit" class="btn btn-primary">Save changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="roleEditModal" tabindex="-1" role="dialog" aria-labelledby="roleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<form action="" method="post">
|
||||
@csrf
|
||||
@method('PUT')
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="roleModalLabel">Tambah Role & Privileges</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label for="role">Nama Role Baru </label>
|
||||
<input type="text" class="form-control @error('role') is-invalid @enderror" name="role" id="role">
|
||||
@error('role')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="container" id="role-privilege-edit">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="submit" class="btn btn-primary">Save changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('javascripts')
|
||||
<script>
|
||||
function editRole(id) {
|
||||
let url = '{{ route("roleprivileges.edit", ":id") }}'
|
||||
url = url.replace(':id', id);
|
||||
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: 'GET',
|
||||
success: function(res) {
|
||||
let url = '{{ route("roleprivileges.update", ":id") }}'
|
||||
url = url.replace(':id', id);
|
||||
$("#roleEditModal").modal("show")
|
||||
$("#roleEditModal form").attr("action", url)
|
||||
$("#roleEditModal input[name='role']").val(res.role.name)
|
||||
|
||||
let menuHtml = ''
|
||||
for(let i = 0; i < res.role_privileges.length; i++) {
|
||||
const menu = res.role_privileges[i]
|
||||
const isCreateChecked = menu.create == 1 ? "checked" : ""
|
||||
const isUpdateChecked = menu.update == 1 ? "checked" : ""
|
||||
const isDeleteChecked = menu.delete == 1 ? "checked" : ""
|
||||
const isViewChecked = menu.view == 1 ? "checked" : ""
|
||||
|
||||
if(menu.name == 'Admin Area' || menu.name == 'Mekanik Area') {
|
||||
menuHtml += `
|
||||
<h5>${menu.name}</h5>
|
||||
<div class="row">
|
||||
<input type="hidden" value="${menu.create}" name="privileges[${menu.menu_id}][create]">
|
||||
<input type="hidden" value="${menu.update}" name="privileges[${menu.menu_id}][update]">
|
||||
<input type="hidden" value="${menu.delete}" name="privileges[${menu.menu_id}][delete]">
|
||||
<div class="col-lg-12">
|
||||
<div class="form-group">
|
||||
<label><input type="checkbox" ${isViewChecked} onChange="if(this.checked) { this.parentNode.nextElementSibling.value = 1 }else{ this.parentNode.nextElementSibling.value = 0} "/> View</label>
|
||||
<input type="hidden" value="${menu.view}" name="privileges[${menu.menu_id}][view]">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
}else{
|
||||
menuHtml += `
|
||||
<h5>${menu.name}</h5>
|
||||
<div class="row">
|
||||
<div class="col-lg-3">
|
||||
<div class="form-group">
|
||||
<label><input type="checkbox" ${isCreateChecked} onChange="if(this.checked) { this.parentNode.nextElementSibling.value = 1 }else{ this.parentNode.nextElementSibling.value = 0} "/> Create</label>
|
||||
<input type="hidden" value="${menu.create}" name="privileges[${menu.menu_id}][create]">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="form-group">
|
||||
<label><input type="checkbox" ${isUpdateChecked} onChange="if(this.checked) { this.parentNode.nextElementSibling.value = 1 }else{ this.parentNode.nextElementSibling.value = 0} "/> Update</label>
|
||||
<input type="hidden" value="${menu.update}" name="privileges[${menu.menu_id}][update]">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="form-group">
|
||||
<label><input type="checkbox" ${isDeleteChecked} onChange="if(this.checked) { this.parentNode.nextElementSibling.value = 1 }else{ this.parentNode.nextElementSibling.value = 0} "/> Delete</label>
|
||||
<input type="hidden" value="${menu.delete}" name="privileges[${menu.menu_id}][delete]">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="form-group">
|
||||
<label><input type="checkbox" ${isViewChecked} onChange="if(this.checked) { this.parentNode.nextElementSibling.value = 1 }else{ this.parentNode.nextElementSibling.value = 0} "/> View</label>
|
||||
<input type="hidden" value="${menu.view}" name="privileges[${menu.menu_id}][view]">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
}
|
||||
}
|
||||
|
||||
$("#roleEditModal #role-privilege-edit").html(`<div>${menuHtml}</div>`)
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
110
resources/views/back/users.blade.php
Normal file
110
resources/views/back/users.blade.php
Normal file
@@ -0,0 +1,110 @@
|
||||
@extends('layouts.backapp')
|
||||
|
||||
@section('content')
|
||||
<div class="kt-portlet kt-portlet--mobile" id="kt_blockui_datatable">
|
||||
<div class="kt-portlet__head kt-portlet__head--lg">
|
||||
<div class="kt-portlet__head-label">
|
||||
<span class="kt-portlet__head-icon">
|
||||
<i class="kt-font-brand flaticon2-line-chart"></i>
|
||||
</span>
|
||||
<h3 class="kt-portlet__head-title">
|
||||
Pengguna
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
@can('create', $menus['user.index'])
|
||||
<div class="kt-portlet__head-toolbar">
|
||||
<div class="kt-portlet__head-wrapper">
|
||||
<div class="kt-portlet__head-actions">
|
||||
<button type="button" class="btn btn-bold btn-label-brand btn-sm" id="addUser"> Tambah </button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endcan
|
||||
</div>
|
||||
|
||||
<div class="kt-portlet__body">
|
||||
<!--begin: Datatable -->
|
||||
<table class="table table-responsive table-striped table-bordered table-hover table-checkable" id="kt_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th>Dealer</th>
|
||||
<th>Role</th>
|
||||
<th style="width: 35%;">Nama Pengguna</th>
|
||||
<th>Email</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<!--end: Datatable -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--begin::Modal-->
|
||||
<div class="modal fade" id="userModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<form id="userForm" action="{{ route('user.store') }}" data-form="store" class="kt-form">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="modalHeading"></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
@csrf
|
||||
<input type="hidden" name="id" id="id">
|
||||
<div class="kt-portlet__body">
|
||||
<div class="form-group">
|
||||
<label>Nama</label>
|
||||
<input type="text" class="form-control" id="name" name="name" placeholder="Masukan Nama Pengguna" value="" autocomplete="off" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Role</label>
|
||||
<select name="role" id="role" class="form-control">
|
||||
@foreach ($roles as $role)
|
||||
<option value="{{ $role->id }}">{{ $role->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Dealer</label>
|
||||
<select name="dealer_id" id="dealer_id" class="form-control">
|
||||
@foreach ($dealers as $dealer)
|
||||
<option value="{{ $dealer->id }}">{{ $dealer->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Email</label>
|
||||
<input type="email" class="form-control" id="email" name="email" placeholder="Masukan Email Pengguna" value="" autocomplete="off" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Password</label>
|
||||
<input type="password" class="form-control" id="password" name="password" required placeholder="Masukan Password" value="" autocomplete="off" />
|
||||
</div>
|
||||
{{-- <div class="form-group">
|
||||
<label>Konfirmasi Password</label>
|
||||
<input type="password" class="form-control" id="password_confirmation" name="password_confirmation" required placeholder="Masukan Konfirmasi Password" value="" autocomplete="off" />
|
||||
</div> --}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Batal</button>
|
||||
<button type="submit" class="btn btn-primary" id="saveBtn" value="create">Simpan</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!--end::Modal-->
|
||||
|
||||
<input type="hidden" name="ajax_url" value="{{ route('user.index') }}">
|
||||
<input type="hidden" name="store_url" value="{{ route('user.store') }}">
|
||||
@endsection
|
||||
|
||||
@section('javascripts')
|
||||
<script src="{{ url('js/pages/back/user.js') }}" type="text/javascript"></script>
|
||||
@endsection
|
||||
118
resources/views/dashboard.blade.php
Normal file
118
resources/views/dashboard.blade.php
Normal file
@@ -0,0 +1,118 @@
|
||||
@extends('layouts.backapp')
|
||||
@section('styles')
|
||||
<style>
|
||||
.kt-spinner--info {
|
||||
width: 100%;
|
||||
/* height: 100%; */
|
||||
}
|
||||
/* .kt-spinner--info::before {
|
||||
width: 300px;
|
||||
height: 300px;
|
||||
top: 30%;left: 30%;
|
||||
} */
|
||||
</style>
|
||||
@endsection
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="kt-portlet kt-portlet--mobile" id="kt_blockui_datatable">
|
||||
<div class="kt-portlet__head kt-portlet__head--lg">
|
||||
<div class="kt-portlet__head-label">
|
||||
<span class="kt-portlet__head-icon">
|
||||
<i class="kt-font-brand flaticon2-line-chart"></i>
|
||||
</span>
|
||||
<h3 class="kt-portlet__head-title">
|
||||
Laporan Dealers
|
||||
</h3>
|
||||
</div>
|
||||
<div class="kt-portlet__head-toolbar">
|
||||
<div class="kt-portlet__head-wrapper">
|
||||
<div class="kt-portlet__head-actions mt-4">
|
||||
<form action="{{ route('dashboard') }}" method="get">
|
||||
<div class="form-group row">
|
||||
<div class="col-lg-5 col-12">
|
||||
<label for="dealer">Dealer</label>
|
||||
<select name="dealer" id="dealer" class="form-control">
|
||||
<option value="all" @if($dealer == 'all') selected @endif>Semua Dealer</option>
|
||||
@foreach ($dealer_datas as $dealer_data)
|
||||
<option value="{{ $dealer_data->id }}" @if($dealer == $dealer_data->id) selected @endif>{{ $dealer_data->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-3 col-12">
|
||||
<label for="month">Bulan</label>
|
||||
<select name="month" id="month" class="form-control">
|
||||
<option value="01" @if($month == '01') selected @endif>Januari</option>
|
||||
<option value="02" @if($month == '02') selected @endif>Februari</option>
|
||||
<option value="03" @if($month == '03') selected @endif>Maret</option>
|
||||
<option value="04" @if($month == '04') selected @endif>April</option>
|
||||
<option value="05" @if($month == '05') selected @endif>Mei</option>
|
||||
<option value="06" @if($month == '06') selected @endif>Juni</option>
|
||||
<option value="07" @if($month == '07') selected @endif>Juli</option>
|
||||
<option value="08" @if($month == '08') selected @endif>Agustus</option>
|
||||
<option value="09" @if($month == '09') selected @endif>September</option>
|
||||
<option value="10" @if($month == '10') selected @endif>Oktober</option>
|
||||
<option value="11" @if($month == '11') selected @endif>November</option>
|
||||
<option value="12" @if($month == '12') selected @endif>Desember</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-2 col-12">
|
||||
<label for="year">Tahun</label>
|
||||
<input type="number" class="form-control" name="year" id="year" value="{{ $year }}">
|
||||
</div>
|
||||
<div class="col-lg-1 col-12">
|
||||
<br>
|
||||
<button class="btn btn-primary mt-2">Cari</button>
|
||||
</div>
|
||||
<div class="col-lg-1 col-12">
|
||||
<br>
|
||||
<button type="button" id="export" class="btn btn-success mt-2">Export</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="kt-portlet__body" id="data" style="min-height: 400px;">
|
||||
<div class="kt-portlet__body" style=" display: flex; justify-content: center; align-items: center;" id="spinner-data">
|
||||
<div class="card card-body" style="width:200px;">
|
||||
<span class="kt-spinner kt-spinner--md kt-spinner--info kt-spinner--center mt-3"></span><br>
|
||||
<h5 class="mt-2 text-center">Loading Data... </h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('javascripts')
|
||||
<script src="{{ url('js/pages/doublescroll.js') }}" type="text/javascript"></script>
|
||||
<script>
|
||||
$.ajax({
|
||||
url: '{{ $ajax_url }}',
|
||||
type: 'GET',
|
||||
beforeSend: function(e){
|
||||
$('#spinner-data').show();
|
||||
},
|
||||
success: function(res) {
|
||||
$("#data").html(res)
|
||||
},
|
||||
complete: function(){
|
||||
$('#spinner-data').hide();
|
||||
},
|
||||
})
|
||||
|
||||
$("#export").click(function() {
|
||||
let data = {
|
||||
month : $('select[name="month"]').val(),
|
||||
dealer : $('select[name="dealer"]').val()
|
||||
}
|
||||
|
||||
var url = '{{ route("report.transaction_dealer.export") }}?' + $.param(data)
|
||||
window.location = url;
|
||||
})
|
||||
</script>
|
||||
@endsection
|
||||
368
resources/views/dashboard.blade.php.old2
Normal file
368
resources/views/dashboard.blade.php.old2
Normal file
@@ -0,0 +1,368 @@
|
||||
@extends('layouts.backapp')
|
||||
@section('styles')
|
||||
<style>
|
||||
.kt-spinner--info {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.kt-spinner--info::before {
|
||||
width: 300px;
|
||||
height: 300px;
|
||||
top: 30%;left: 30%;
|
||||
}
|
||||
</style>
|
||||
@endsection
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="kt-portlet kt-portlet--mobile" id="kt_blockui_datatable">
|
||||
<div class="kt-portlet__head kt-portlet__head--lg row pt-4">
|
||||
<div class="col-6">
|
||||
<div class="kt-portlet__head-label">
|
||||
<span class="kt-portlet__head-icon">
|
||||
<i class="kt-font-brand flaticon2-line-chart"></i>
|
||||
</span>
|
||||
<h3 class="kt-portlet__head-title">
|
||||
Laporan Dealers
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<form action="{{ route('dashboard') }}" method="get" class="row" style="display: flex; justify-content:right;">
|
||||
<div class="col-lg-5 col-4">
|
||||
<div class="form-group float-right" >
|
||||
<label for="dealer">Dealer</label>
|
||||
<select name="dealer" id="dealer" class="form-control">
|
||||
<option value="all" @if($dealer == 'all') selected @endif>Semua Dealer</option>
|
||||
@foreach ($dealers_data as $dealer_data)
|
||||
<option value="{{ $dealer_data->id }}" @if($dealer == $dealer_data->id) selected @endif>{{ $dealer_data->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3 col-4">
|
||||
<div class="form-group float-right" >
|
||||
<label for="month">Bulan</label>
|
||||
<select name="month" id="month" class="form-control">
|
||||
<option value="01" @if($month == '01') selected @endif>Januari</option>
|
||||
<option value="02" @if($month == '02') selected @endif>Februari</option>
|
||||
<option value="03" @if($month == '03') selected @endif>Maret</option>
|
||||
<option value="04" @if($month == '04') selected @endif>April</option>
|
||||
<option value="05" @if($month == '05') selected @endif>Mei</option>
|
||||
<option value="06" @if($month == '06') selected @endif>Juni</option>
|
||||
<option value="07" @if($month == '07') selected @endif>Juli</option>
|
||||
<option value="08" @if($month == '08') selected @endif>Agustus</option>
|
||||
<option value="09" @if($month == '09') selected @endif>September</option>
|
||||
<option value="10" @if($month == '10') selected @endif>Oktober</option>
|
||||
<option value="11" @if($month == '11') selected @endif>November</option>
|
||||
<option value="12" @if($month == '12') selected @endif>Desember</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-2 col-4">
|
||||
<button class="btn btn-primary float-right">Cari</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{{-- <div class="kt-portlet__head-label">
|
||||
<span class="kt-portlet__head-icon">
|
||||
<i class="kt-font-brand flaticon2-line-chart"></i>
|
||||
</span>
|
||||
<h3 class="kt-portlet__head-title">
|
||||
Laporan Dealers
|
||||
</h3>
|
||||
</div>
|
||||
<div class="kt-portlet__head-toolbar">
|
||||
<div class="kt-portlet__head-wrapper">
|
||||
<div class="kt-portlet__head-actions mt-4">
|
||||
<form action="{{ route('dashboard') }}" method="get">
|
||||
<div class="form-group">
|
||||
<label for="month">Bulan</label>
|
||||
<select name="month" id="month" class="form-control">
|
||||
<option value="01" @if($month == '01') selected @endif>Januari</option>
|
||||
<option value="02" @if($month == '02') selected @endif>Februari</option>
|
||||
<option value="03" @if($month == '03') selected @endif>Maret</option>
|
||||
<option value="04" @if($month == '04') selected @endif>April</option>
|
||||
<option value="05" @if($month == '05') selected @endif>Mei</option>
|
||||
<option value="06" @if($month == '06') selected @endif>Juni</option>
|
||||
<option value="07" @if($month == '07') selected @endif>Juli</option>
|
||||
<option value="08" @if($month == '08') selected @endif>Agustus</option>
|
||||
<option value="09" @if($month == '09') selected @endif>September</option>
|
||||
<option value="10" @if($month == '10') selected @endif>Oktober</option>
|
||||
<option value="11" @if($month == '11') selected @endif>November</option>
|
||||
<option value="12" @if($month == '12') selected @endif>Desember</option>
|
||||
</select>
|
||||
</div>
|
||||
<button class="btn btn-primary">Cari</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div> --}}
|
||||
</div>
|
||||
|
||||
<div class="kt-portlet__body" id="data">
|
||||
{{-- <div id="spinner-data" style="height: 400px;" class="kt-spinner kt-spinner--info"></div> --}}
|
||||
<!--begin: Datatable -->
|
||||
<style>
|
||||
.table-responsive {
|
||||
height: 60vh;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.nav-link-tab {
|
||||
font-weight: bold !important;
|
||||
}
|
||||
|
||||
.nav-link-tab.active {
|
||||
font-weight: normal !important;
|
||||
}
|
||||
|
||||
.dataTables_wrapper .dataTable td, .dataTables_wrapper .dataTable th {
|
||||
background: #fff;
|
||||
}
|
||||
</style>
|
||||
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link nav-link-tab active btn-primary text-light" data-toggle="tab" href="#kt_tabs_1_2"><i class="flaticon2-pie-chart-4 text-light"></i> Diagram</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link nav-link-tab btn-primary text-light" data-toggle="tab" href="#" data-target="#kt_tabs_1_1"><i class="flaticon-squares-1 text-light"></i> Tabel</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="kt_tabs_1_2" role="tabpanel">
|
||||
<div>
|
||||
<canvas id="dealer-chart"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="kt_tabs_1_1" role="tabpanel">
|
||||
<div class="table-responsive" id="table">
|
||||
<table class="table" id="kt_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan="2" style="width: 18%; z-index: 99;">Dealer</th>
|
||||
@if ($works)
|
||||
<th colspan="{{ count($works) }}" class="text-center">Pekerjaan</th>
|
||||
@endif
|
||||
<th rowspan="2" style="width: 18%; z-index: 99;">Aksi</th>
|
||||
</tr>
|
||||
@if ($works)
|
||||
<tr>
|
||||
@foreach ($works as $work)
|
||||
<th>{{ $work->name }}</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
@endif
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th style="background: #C5CEFF !important;">
|
||||
<p>Total Bulan Ini</p><hr>
|
||||
<p>Total Bulan Kemarin</p>
|
||||
</th>
|
||||
@foreach ($totals as $total)
|
||||
<th style="background: #C5CEFF !important;">
|
||||
<p>{{ $total['now'] }} @if($total['now'] > $total['prev']) <i class="ml-3 fa fa-caret-up text-success"></i> @else <i class="ml-3 fa fa-caret-down text-danger"></i> @endif</p><hr>
|
||||
<p>{{ $total['prev'] }}</p>
|
||||
</th>
|
||||
@endforeach
|
||||
<th style="background: #C5CEFF !important;"></th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('javascripts')
|
||||
<script src="{{ url('js/pages/doublescroll.js') }}" type="text/javascript"></script>
|
||||
<script>
|
||||
function random_rgba(alpha) {
|
||||
var o = Math.round, r = Math.random, s = 255;
|
||||
return 'rgba(' + o(r()*s) + ',' + o(r()*s) + ',' + o(r()*s) + ','+ alpha +')';
|
||||
}
|
||||
|
||||
|
||||
// var table = $("#kt_table").DataTable({
|
||||
// paging: false,
|
||||
// fixedColumns: {
|
||||
// left: 1,
|
||||
// right: 1
|
||||
// }
|
||||
// })
|
||||
|
||||
const options = {
|
||||
indexAxis: 'y',
|
||||
maintainAspectRatio: false,
|
||||
scales: {
|
||||
x: {
|
||||
position: 'top'
|
||||
}
|
||||
},
|
||||
plugins: {
|
||||
legend: {
|
||||
display: true,
|
||||
labels: {
|
||||
color: 'rgb(255, 99, 132)'
|
||||
},
|
||||
position: 'top'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var chart = new Chart($("#dealer-chart"), {
|
||||
type: 'bar',
|
||||
data: {
|
||||
labels: [],
|
||||
datasets: []
|
||||
},
|
||||
plugins: [ChartDataLabels],
|
||||
options: options
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: '{{ route("get_dealer_has_transactions") }}',
|
||||
type: 'POST',
|
||||
data: {
|
||||
_token: '{{ csrf_token() }}',
|
||||
month: '{{ $month }}',
|
||||
dealer: '{{ $dealer }}'
|
||||
},
|
||||
success: function(res) {
|
||||
res.forEach(function(dealer, i) {
|
||||
$.ajax({
|
||||
url: '{{ route("dealer_work_trx") }}',
|
||||
type: 'POST',
|
||||
data: {
|
||||
'_token': '{{ csrf_token() }}',
|
||||
'month' : '{{ $month }}',
|
||||
'dealer_filter' : '{{ $dealer }}',
|
||||
'dealer' : dealer.id
|
||||
},
|
||||
success: function(resWork) {
|
||||
if (/\s/.test(dealer.name)) {
|
||||
chart.data.labels.push(dealer.name.split(" "))
|
||||
if(res.length == 1) {
|
||||
chart.update()
|
||||
}
|
||||
}else{
|
||||
chart.data.labels.push(dealer.name)
|
||||
if(res.length == 1) {
|
||||
chart.update()
|
||||
}
|
||||
}
|
||||
|
||||
let tds = `<td id="row-${dealer.id}">${dealer.name}</td>`;
|
||||
|
||||
resWork.forEach(function(work, j) {
|
||||
if(i == 0) {
|
||||
$.when(addTrxData(work)).then(function() {
|
||||
chart.data.datasets[j].data.push(work.qty)
|
||||
if(res.length == 1) {
|
||||
chart.update()
|
||||
}
|
||||
})
|
||||
}else{
|
||||
chart.data.datasets[j].data.push(work.qty)
|
||||
if(res.length == 1) {
|
||||
chart.update()
|
||||
}
|
||||
}
|
||||
|
||||
tds += `<td>${work.qty}</td>`
|
||||
})
|
||||
var url = '{{ route("dealer_recap", ":id") }}';
|
||||
url = url.replace(':id', dealer.id);
|
||||
|
||||
$("#kt_table tbody").append(`
|
||||
<tr>
|
||||
${tds}
|
||||
<td><a href="${url}" class="btn btn-info btn-sm">Detail</a></td>
|
||||
</tr>
|
||||
`)
|
||||
}
|
||||
}).done(function() {
|
||||
if(res.length > 1) {
|
||||
chart.update()
|
||||
}
|
||||
})
|
||||
|
||||
$("#dealer-chart").parent().height($("#dealer-chart").parent().height() + 650)
|
||||
})
|
||||
}
|
||||
}).done(function(res) {
|
||||
if(res.length == 0) {
|
||||
$("#dealer-chart").parent().append(`
|
||||
<div class="alert" role="alert">
|
||||
<div class="alert-text">
|
||||
<h4 class="alert-heading">Data Kosong!</h4>
|
||||
<p>Belum ada data pekerjaan masuk untuk bulan
|
||||
@if($month == '01')
|
||||
januari
|
||||
@elseif($month == '02')
|
||||
februari
|
||||
@elseif($month == '03')
|
||||
maret
|
||||
@elseif($month == '04')
|
||||
april
|
||||
@elseif($month == '05')
|
||||
mei
|
||||
@elseif($month == '06')
|
||||
juni
|
||||
@elseif($month == '07')
|
||||
juli
|
||||
@elseif($month == '08')
|
||||
agustus
|
||||
@elseif($month == '09')
|
||||
september
|
||||
@elseif($month == '10')
|
||||
oktober
|
||||
@elseif($month == '11')
|
||||
november
|
||||
@elseif($month == '12')
|
||||
desember
|
||||
@endif
|
||||
</p>
|
||||
<hr>
|
||||
</div>
|
||||
</div>
|
||||
`)
|
||||
$("#dealer-chart").parent().css('height', '100%')
|
||||
$("#dealer-chart").remove()
|
||||
}
|
||||
})
|
||||
|
||||
function addTrxData(work) {
|
||||
let data = {
|
||||
label : work['work_name'],
|
||||
data: [],
|
||||
fill: false,
|
||||
backgroundColor: random_rgba(0.2),
|
||||
borderColor: random_rgba(1),
|
||||
borderWidth: 1,
|
||||
barPercentage: 0.5,
|
||||
categoryPercentage: 1
|
||||
}
|
||||
|
||||
chart.data.datasets.push(data)
|
||||
}
|
||||
|
||||
$(".nav-link-tab.active").removeClass('btn-primary')
|
||||
$(".nav-link-tab.active").removeClass('text-light')
|
||||
$(".nav-link-tab.active i").toggleClass('text-light')
|
||||
$(".nav-link-tab").parent().click(function() {
|
||||
$(".nav-link-tab").toggleClass('btn-primary')
|
||||
$(".nav-link-tab").toggleClass('text-light')
|
||||
$(".nav-link-tab i").toggleClass('text-light')
|
||||
})
|
||||
</script>
|
||||
@endsection
|
||||
208
resources/views/dashboard_data.blade.php
Normal file
208
resources/views/dashboard_data.blade.php
Normal file
@@ -0,0 +1,208 @@
|
||||
<!--begin: Datatable -->
|
||||
<style>
|
||||
.table-responsive {
|
||||
height: 60vh;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.nav-link-tab {
|
||||
font-weight: bold !important;
|
||||
}
|
||||
|
||||
.nav-link-tab.active {
|
||||
font-weight: normal !important;
|
||||
}
|
||||
|
||||
.dataTables_wrapper .dataTable td, .dataTables_wrapper .dataTable th {
|
||||
background: #fff;
|
||||
}
|
||||
</style>
|
||||
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link nav-link-tab active btn-primary text-light" data-toggle="tab" href="#kt_tabs_1_2"><i class="flaticon2-pie-chart-4 text-light"></i> Diagram</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link nav-link-tab btn-primary text-light" data-toggle="tab" href="#" data-target="#kt_tabs_1_1"><i class="flaticon-squares-1 text-light"></i> Tabel</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="kt_tabs_1_2" role="tabpanel">
|
||||
<div>
|
||||
<canvas id="dealer-chart"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="kt_tabs_1_1" role="tabpanel">
|
||||
<div class="table-responsive" id="table">
|
||||
<table class="table" id="kt_table">
|
||||
<thead>
|
||||
<tr>
|
||||
{{-- <th rowspan="2" style="width: 18%; z-index: 99;">Dealer</th> --}}
|
||||
@if ($theads)
|
||||
<th colspan="{{ count($theads) }}" class="text-center">Pekerjaan</th>
|
||||
@endif
|
||||
<th rowspan="2" style="width: 18%; z-index: 99;">Aksi</th>
|
||||
</tr>
|
||||
@if ($theads)
|
||||
<tr>
|
||||
@foreach ($theads as $thead)
|
||||
<th>{{ $thead }}</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
@endif
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($work_trx as $dealer_id => $trx)
|
||||
<tr>
|
||||
{{-- <td>{{ $trx['dealer_name'] }}</td> --}}
|
||||
@foreach ($trx as $item)
|
||||
<td>{{ $item }}</td>
|
||||
@endforeach
|
||||
<td>
|
||||
{{-- <div class="btn btn-danger">ASD</div> --}}
|
||||
<a href="{{ route('dealer_recap', ["id" => $dealer_id, "month" => $month, "year" => $year]) }}" class="btn btn-info btn-sm">Detail</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th style="background: #C5CEFF !important;">
|
||||
<p>Total Bulan Ini</p><hr>
|
||||
<p>Total Bulan Kemarin</p>
|
||||
</th>
|
||||
@foreach ($totals as $total)
|
||||
<th style="background: #C5CEFF !important;">
|
||||
<p>{{ $total['now'] }} @if($total['now'] > $total['prev']) <i class="ml-3 fa fa-caret-up text-success"></i> @else <i class="ml-3 fa fa-caret-down text-danger"></i> @endif</p><hr>
|
||||
<p>{{ $total['prev'] }}</p>
|
||||
</th>
|
||||
@endforeach
|
||||
<th style="background: #C5CEFF !important;"></th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function random_rgba(alpha) {
|
||||
var o = Math.round, r = Math.random, s = 255;
|
||||
return 'rgba(' + o(r()*s) + ',' + o(r()*s) + ',' + o(r()*s) + ','+ alpha +')';
|
||||
}
|
||||
|
||||
let labels = JSON.parse('{{ $dealer_names }}'.replace(/("\;)/g,"\""));
|
||||
let labels2 = []
|
||||
labels.forEach(function(label) {
|
||||
if (/\s/.test(label)) {
|
||||
labels2.push(label.split(" "))
|
||||
}else{
|
||||
labels2.push(label)
|
||||
}
|
||||
})
|
||||
|
||||
const trx_data = JSON.parse('{{ $dealer_trx }}'.replace(/("\;)/g,"\""));
|
||||
let trxs = []
|
||||
trx_data.forEach(trx => {
|
||||
let data = {
|
||||
label : trx['work_name'],
|
||||
data: trx['qty'],
|
||||
fill: false,
|
||||
backgroundColor: random_rgba(0.2),
|
||||
borderColor: random_rgba(1),
|
||||
borderWidth: 1,
|
||||
barPercentage: 0.5,
|
||||
categoryPercentage: 1
|
||||
}
|
||||
|
||||
trxs.push(data)
|
||||
});
|
||||
|
||||
const data = {
|
||||
labels: labels2,
|
||||
datasets: trxs
|
||||
};
|
||||
|
||||
if(trxs.length && labels2.length) {
|
||||
new Chart($("#dealer-chart"), {
|
||||
type: 'bar',
|
||||
data: data,
|
||||
plugins: [ChartDataLabels],
|
||||
options: {
|
||||
indexAxis: 'y',
|
||||
maintainAspectRatio: false,
|
||||
scales: {
|
||||
x: {
|
||||
position: 'top'
|
||||
}
|
||||
},
|
||||
plugins: {
|
||||
legend: {
|
||||
display: true,
|
||||
labels: {
|
||||
color: 'rgb(255, 99, 132)'
|
||||
},
|
||||
position: 'top'
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
$("#dealer-chart").parent().height($("#dealer-chart").parent().height() + trxs.length * 800)
|
||||
}else{
|
||||
$("#dealer-chart").parent().append(`
|
||||
<div class="alert" role="alert">
|
||||
<div class="alert-text">
|
||||
<h4 class="alert-heading">Data Kosong!</h4>
|
||||
<p>Belum ada data pekerjaan masuk untuk bulan
|
||||
@if($month == '01')
|
||||
januari
|
||||
@elseif($month == '02')
|
||||
februari
|
||||
@elseif($month == '03')
|
||||
maret
|
||||
@elseif($month == '04')
|
||||
april
|
||||
@elseif($month == '05')
|
||||
mei
|
||||
@elseif($month == '06')
|
||||
juni
|
||||
@elseif($month == '07')
|
||||
juli
|
||||
@elseif($month == '08')
|
||||
agustus
|
||||
@elseif($month == '09')
|
||||
september
|
||||
@elseif($month == '10')
|
||||
oktober
|
||||
@elseif($month == '11')
|
||||
november
|
||||
@elseif($month == '12')
|
||||
desember
|
||||
@endif
|
||||
</p>
|
||||
<hr>
|
||||
</div>
|
||||
</div>
|
||||
`)
|
||||
$("#dealer-chart").parent().css('height', '100%')
|
||||
$("#dealer-chart").remove()
|
||||
}
|
||||
|
||||
$(".nav-link-tab.active").removeClass('btn-primary')
|
||||
$(".nav-link-tab.active").removeClass('text-light')
|
||||
$(".nav-link-tab.active i").toggleClass('text-light')
|
||||
$(".nav-link-tab").parent().click(function() {
|
||||
$(".nav-link-tab").toggleClass('btn-primary')
|
||||
$(".nav-link-tab").toggleClass('text-light')
|
||||
$(".nav-link-tab i").toggleClass('text-light')
|
||||
})
|
||||
|
||||
$("#kt_table").DataTable({
|
||||
paging: false,
|
||||
fixedColumns: {
|
||||
left: 1,
|
||||
right: 1
|
||||
}
|
||||
})
|
||||
</script>
|
||||
155
resources/views/dealer_recap.blade.php
Normal file
155
resources/views/dealer_recap.blade.php
Normal file
@@ -0,0 +1,155 @@
|
||||
@extends('layouts.backapp')
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="kt-portlet kt-portlet--mobile" id="kt_blockui_datatable">
|
||||
<div class="kt-portlet__head kt-portlet__head--lg">
|
||||
<div class="kt-portlet__head-label">
|
||||
<span class="kt-portlet__head-icon">
|
||||
<i class="kt-font-brand flaticon2-line-chart"></i>
|
||||
</span>
|
||||
<h3 class="kt-portlet__head-title">
|
||||
Laporan {{ $dealer->name }}
|
||||
</h3>
|
||||
</div>
|
||||
<div class="kt-portlet__head-toolbar">
|
||||
<div class="kt-portlet__head-wrapper">
|
||||
<div class="kt-portlet__head-actions mt-4">
|
||||
<form action="{{ route('dealer_recap', $dealer->id) }}" method="get">
|
||||
<div class="form-group row">
|
||||
{{-- <div class="col-2">
|
||||
<label><b>Bulan</b></label>
|
||||
</div> --}}
|
||||
<div class="col-6">
|
||||
<label for="month">Bulan</label>
|
||||
<select name="month" id="month" class="form-control">
|
||||
<option value="01" @if($month == '01') selected @endif>Januari</option>
|
||||
<option value="02" @if($month == '02') selected @endif>Februari</option>
|
||||
<option value="03" @if($month == '03') selected @endif>Maret</option>
|
||||
<option value="04" @if($month == '04') selected @endif>April</option>
|
||||
<option value="05" @if($month == '05') selected @endif>Mei</option>
|
||||
<option value="06" @if($month == '06') selected @endif>Juni</option>
|
||||
<option value="07" @if($month == '07') selected @endif>Juli</option>
|
||||
<option value="08" @if($month == '08') selected @endif>Agustus</option>
|
||||
<option value="09" @if($month == '09') selected @endif>September</option>
|
||||
<option value="10" @if($month == '10') selected @endif>Oktober</option>
|
||||
<option value="11" @if($month == '11') selected @endif>November</option>
|
||||
<option value="12" @if($month == '12') selected @endif>Desember</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<label for="year">Tahun</label>
|
||||
<input type="number" class="form-control" name="year" id="year" value="{{ $year }}">
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<br>
|
||||
<button class="btn btn-primary mt-2">Cari</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="kt-portlet__body">
|
||||
<!--begin: Datatable -->
|
||||
<table class="table table-responsive table-striped table-bordered table-hover table-checkable" id="kt_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan="2" style="width: 17%;">Tanggal</th>
|
||||
<th colspan="{{ $works_count }}" class="text-center">Pekerjaan</th>
|
||||
</tr>
|
||||
<tr>
|
||||
@foreach ($works as $work)
|
||||
<th>{{ $work->name }}</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($trxs as $trx)
|
||||
<tr>
|
||||
<td>{{ $trx['date'] }}</td>
|
||||
@foreach ($trx['works'] as $item)
|
||||
<td>{{ $item['qty'] }}</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
@endforeach
|
||||
{{-- <tr>
|
||||
<td>Pt B</td>
|
||||
<td>2</td>
|
||||
<td>9</td>
|
||||
<td>9</td>
|
||||
<td><a href="#" class="btn btn-info btn-sm">Detail</a></td>
|
||||
</tr> --}}
|
||||
</tbody>
|
||||
<tfoot style="background: #C5CEFF !important;">
|
||||
<tr>
|
||||
<th style="background: #C5CEFF !important;">
|
||||
<p>Total Bulan Ini</p><hr>
|
||||
<p>Total Bulan Kemarin</p>
|
||||
</th>
|
||||
@foreach ($totals as $total)
|
||||
<th style="background: #C5CEFF !important;">
|
||||
<p>{{ $total['now'] }} @if($total['now'] > $total['prev']) <i class="ml-3 fa fa-caret-up text-success"></i> @else <i class="ml-3 fa fa-caret-down text-danger"></i> @endif</p><hr>
|
||||
<p>{{ $total['prev'] }}</p>
|
||||
</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<!--end: Datatable -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="kt-portlet kt-portlet--mobile" id="kt_blockui_datatable">
|
||||
<div class="kt-portlet__head kt-portlet__head--lg">
|
||||
<div class="kt-portlet__head-label">
|
||||
<span class="kt-portlet__head-icon">
|
||||
<i class="kt-font-brand flaticon2-line-chart"></i>
|
||||
</span>
|
||||
<h3 class="kt-portlet__head-title">
|
||||
Laporan {{ $dealer->name }}
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="kt-portlet__body">
|
||||
<!--begin: Datatable -->
|
||||
<table class="table table-responsive table-striped table-bordered table-hover table-checkable" id="kt_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan="2">SA</th>
|
||||
<th colspan="{{ $works_count }}" class="text-center">Pekerjaan</th>
|
||||
</tr>
|
||||
<tr>
|
||||
@foreach ($works as $work)
|
||||
<th>{{ $work->name }}</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($dealer_trxs as $trx)
|
||||
<tr>
|
||||
<td>{{ $trx['sa_name'] }}</td>
|
||||
@foreach ($trx['works'] as $item)
|
||||
<td>{{ $item['qty'] }}</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<!--end: Datatable -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('javascripts')
|
||||
<script src="{{ url('js/pages/dashboard.js') }}" type="text/javascript"></script>
|
||||
@endsection
|
||||
23
resources/views/home.blade.php
Normal file
23
resources/views/home.blade.php
Normal file
@@ -0,0 +1,23 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<div class="card">
|
||||
<div class="card-header">{{ __('Dashboard') }}</div>
|
||||
|
||||
<div class="card-body">
|
||||
@if (session('status'))
|
||||
<div class="alert alert-success" role="alert">
|
||||
{{ session('status') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{ __('You are logged in!') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
84
resources/views/layouts/app.blade.php
Normal file
84
resources/views/layouts/app.blade.php
Normal file
@@ -0,0 +1,84 @@
|
||||
<!doctype html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<!-- CSRF Token -->
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
|
||||
<title>{{ config('app.name', 'Laravel') }}</title>
|
||||
|
||||
<!-- Scripts -->
|
||||
<script src="{{ asset('js/app.js') }}" defer></script>
|
||||
|
||||
<!-- Fonts -->
|
||||
<link rel="dns-prefetch" href="//fonts.gstatic.com">
|
||||
<link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet">
|
||||
|
||||
<!-- Styles -->
|
||||
<link href="{{ asset('css/app.css') }}" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
<nav class="navbar navbar-expand-md navbar-light bg-white shadow-sm">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="{{ url('/') }}">
|
||||
{{ config('app.name', 'Laravel') }}
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="{{ __('Toggle navigation') }}">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<!-- Left Side Of Navbar -->
|
||||
<ul class="navbar-nav me-auto">
|
||||
|
||||
</ul>
|
||||
|
||||
<!-- Right Side Of Navbar -->
|
||||
<ul class="navbar-nav ms-auto">
|
||||
<!-- Authentication Links -->
|
||||
@guest
|
||||
@if (Route::has('login'))
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ route('login') }}">{{ __('Login') }}</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@if (Route::has('register'))
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ route('register') }}">{{ __('Register') }}</a>
|
||||
</li>
|
||||
@endif
|
||||
@else
|
||||
<li class="nav-item dropdown">
|
||||
<a id="navbarDropdown" class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" v-pre>
|
||||
{{ Auth::user()->name }}
|
||||
</a>
|
||||
|
||||
<div class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdown">
|
||||
<a class="dropdown-item" href="{{ route('logout') }}"
|
||||
onclick="event.preventDefault();
|
||||
document.getElementById('logout-form').submit();">
|
||||
{{ __('Logout') }}
|
||||
</a>
|
||||
|
||||
<form id="logout-form" action="{{ route('logout') }}" method="POST" class="d-none">
|
||||
@csrf
|
||||
</form>
|
||||
</div>
|
||||
</li>
|
||||
@endguest
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<main class="py-4">
|
||||
@yield('content')
|
||||
</main>
|
||||
</div>
|
||||
<script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-datalabels@2"></script>
|
||||
</body>
|
||||
</html>
|
||||
122
resources/views/layouts/backapp.blade.php
Normal file
122
resources/views/layouts/backapp.blade.php
Normal file
@@ -0,0 +1,122 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Template Name: Metronic - Responsive Admin Dashboard Template build with Twitter Bootstrap 4 & Angular 8
|
||||
Author: KeenThemes
|
||||
Website: http://www.keenthemes.com/
|
||||
Contact: support@keenthemes.com
|
||||
Follow: www.twitter.com/keenthemes
|
||||
Dribbble: www.dribbble.com/keenthemes
|
||||
Like: www.facebook.com/keenthemes
|
||||
Purchase: http://themeforest.net/item/metronic-responsive-admin-dashboard-template/4021469?ref=keenthemes
|
||||
Renew Support: http://themeforest.net/item/metronic-responsive-admin-dashboard-template/4021469?ref=keenthemes
|
||||
License: You must have a valid license purchased only from themeforest(the above link) in order to legally use the theme for your project.
|
||||
-->
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<!-- begin::Head -->
|
||||
|
||||
<head>
|
||||
<!--begin::Base Path (base relative path for assets of this page) -->
|
||||
<base href="../">
|
||||
<!--end::Base Path -->
|
||||
<meta charset="utf-8" />
|
||||
|
||||
<title>{{ config('app.name', 'Bengkel') }} {{ isset($page_title) ? ' | ' . $page_title : '' }}</title>
|
||||
<meta name="description" content="Updates and statistics">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
|
||||
<!--begin::Fonts -->
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700|Roboto:300,400,500,600,700">
|
||||
<!--end::Fonts -->
|
||||
|
||||
<!--begin::Global Theme Styles(used by all pages) -->
|
||||
<link href="{{ url('css/app.bundle.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
<!--end::Global Theme Styles -->
|
||||
|
||||
<!--begin::Global Custom Styles(used by all pages) -->
|
||||
<link href="{{ url('css/custom-web.css') }}" rel="stylesheet" type="text/css" />
|
||||
<!--end::Global Custom Styles -->
|
||||
|
||||
<link rel="shortcut icon" href="{{ url('assets/media/logos/ckb.jpeg') }}" />
|
||||
<!-- begin::Global Config(global config for global JS sciprts) -->
|
||||
<script>
|
||||
var KTAppOptions = {
|
||||
"colors": {
|
||||
"state": {
|
||||
"brand": "#5d78ff",
|
||||
"dark": "#282a3c",
|
||||
"light": "#ffffff",
|
||||
"primary": "#5867dd",
|
||||
"success": "#34bfa3",
|
||||
"info": "#36a3f7",
|
||||
"warning": "#ffb822",
|
||||
"danger": "#fd3995"
|
||||
},
|
||||
"base": {
|
||||
"label": ["#c5cbe3", "#a1a8c3", "#3d4465", "#3e4466"],
|
||||
"shape": ["#f0f3ff", "#d9dffa", "#afb4d4", "#646c9a"]
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<!-- end::Global Config -->
|
||||
|
||||
<!--begin::Global Theme Bundle(used by all pages) -->
|
||||
<script src="{{ url('js/app.bundle.min.js') }}" type="text/javascript"></script>
|
||||
<script src="//maps.google.com/maps/api/js?key=AIzaSyBTGnKT7dt597vo9QgeQ7BFhvSRP4eiMSM" type="text/javascript"></script>
|
||||
<!--end::Global Theme Bundle -->
|
||||
|
||||
<!--begin::Common Script -->
|
||||
<script src="{{ url('js/init.js') }}" type="text/javascript"></script>
|
||||
<!--end::Common Scripts -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.3.0/dist/chart.umd.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-datalabels@2"></script>
|
||||
<script src="https://cdn.datatables.net/fixedcolumns/4.2.2/js/dataTables.fixedColumns.min.js"></script>
|
||||
|
||||
@yield('styles')
|
||||
</head>
|
||||
<!-- end::Head -->
|
||||
|
||||
<!-- begin::Body -->
|
||||
|
||||
<body class="kt-quick-panel--right kt-demo-panel--right kt-offcanvas-panel--right kt-header--fixed kt-header-mobile--fixed kt-aside--enabled kt-aside--fixed kt-page--loading">
|
||||
<!-- begin:: Page -->
|
||||
<!-- begin:: Header Mobile -->
|
||||
@include('layouts.partials.headerMobile')
|
||||
<!-- end:: Header Mobile -->
|
||||
<div class="kt-grid kt-grid--hor kt-grid--root">
|
||||
<div class="kt-grid__item kt-grid__item--fluid kt-grid kt-grid--ver kt-page">
|
||||
<!-- begin:: Aside -->
|
||||
@include('layouts.partials.sidebarMenu')
|
||||
<!-- end:: Aside -->
|
||||
<div class="kt-grid__item kt-grid__item--fluid kt-grid kt-grid--hor kt-wrapper" id="kt_wrapper">
|
||||
<!-- begin:: Header -->
|
||||
@include('layouts.partials.header')
|
||||
<!-- end:: Header -->
|
||||
<div class="kt-content kt-grid__item kt-grid__item--fluid kt-grid kt-grid--hor" id="kt_content">
|
||||
<!-- begin:: Content -->
|
||||
<div class="kt-container kt-container--fluid kt-grid__item kt-grid__item--fluid">
|
||||
@yield('content')
|
||||
</div>
|
||||
<!-- end:: Content -->
|
||||
</div>
|
||||
<!-- begin:: Footer -->
|
||||
@include('layouts.partials.footer')
|
||||
<!-- end:: Footer -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end:: Page -->
|
||||
|
||||
<!-- begin::Scrolltop -->
|
||||
<div id="kt_scrolltop" class="kt-scrolltop">
|
||||
<i class="fa fa-arrow-up"></i>
|
||||
</div>
|
||||
<!-- end::Scrolltop -->
|
||||
|
||||
|
||||
@yield('javascripts')
|
||||
</body>
|
||||
<!-- end::Body -->
|
||||
|
||||
</html>
|
||||
55
resources/views/layouts/front-partials/header.blade.php
Normal file
55
resources/views/layouts/front-partials/header.blade.php
Normal file
@@ -0,0 +1,55 @@
|
||||
{{-- <div id="kt_header" class="kt-header kt-grid__item kt-header--fixed pageNotPrint">
|
||||
<!-- begin:: Header Menu -->
|
||||
<div class="kt-header-menu-wrapper" id="kt_header_menu_wrapper">
|
||||
<div id="kt_header_menu" class="kt-header-menu kt-header-menu-mobile kt-header-menu--layout-default ">
|
||||
<ul class="kt-menu__nav ">
|
||||
<li>
|
||||
<div class="wrapperbtnToAdmin">
|
||||
<a href="{{ route('dashboard') }}" class="btn btn-sm btn-primary">Ke Halaman Admin</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end:: Header Menu -->
|
||||
<!-- begin:: Header Topbar -->
|
||||
<div class="kt-header__topbar">
|
||||
<!--begin: User Bar -->
|
||||
<div class="kt-header__topbar-item kt-header__topbar-item--user">
|
||||
<div class="kt-header__topbar-wrapper" data-toggle="dropdown" data-offset="0px,0px">
|
||||
<div class="kt-header__topbar-user">
|
||||
<span class="kt-header__topbar-welcome kt-hidden-mobile">Hi,</span>
|
||||
<span class="kt-header__topbar-username kt-hidden-mobile">{{ Auth::user()->name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dropdown-menu dropdown-menu-fit dropdown-menu-right dropdown-menu-anim dropdown-menu-top-unround dropdown-menu-xl">
|
||||
<!--begin: Head -->
|
||||
<div class="kt-user-card kt-user-card--skin-dark kt-notification-item-padding-x" style="background-image: url('{{ url('assets/media/misc/bg-1.jpg') }}')">
|
||||
<div class="kt-user-card__name">
|
||||
{{ Auth::user()->name }}
|
||||
</div>
|
||||
</div>
|
||||
<!--end: Head -->
|
||||
|
||||
<!--begin: Navigation -->
|
||||
<div class="kt-notification">
|
||||
<div class="kt-notification__custom kt-space-between">
|
||||
<a class="btn btn-danger btn-sm btn-bold" href="{{ route('logout') }}"
|
||||
onclick="event.preventDefault();
|
||||
document.getElementById('logout-form').submit();">
|
||||
{{ __('Logout') }}
|
||||
</a>
|
||||
|
||||
<form id="logout-form" action="{{ route('logout') }}" method="POST" class="d-none">
|
||||
@csrf
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!--end: Navigation -->
|
||||
</div>
|
||||
</div>
|
||||
<!--end: User Bar -->
|
||||
</div>
|
||||
<!-- end:: Header Topbar -->
|
||||
</div> --}}
|
||||
136
resources/views/layouts/frontapp.blade.php
Normal file
136
resources/views/layouts/frontapp.blade.php
Normal file
@@ -0,0 +1,136 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Template Name: Metronic - Responsive Admin Dashboard Template build with Twitter Bootstrap 4 & Angular 8
|
||||
Author: KeenThemes
|
||||
Website: http://www.keenthemes.com/
|
||||
Contact: support@keenthemes.com
|
||||
Follow: www.twitter.com/keenthemes
|
||||
Dribbble: www.dribbble.com/keenthemes
|
||||
Like: www.facebook.com/keenthemes
|
||||
Purchase: http://themeforest.net/item/metronic-responsive-admin-dashboard-template/4021469?ref=keenthemes
|
||||
Renew Support: http://themeforest.net/item/metronic-responsive-admin-dashboard-template/4021469?ref=keenthemes
|
||||
License: You must have a valid license purchased only from themeforest(the above link) in order to legally use the theme for your project.
|
||||
-->
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<!-- begin::Head -->
|
||||
|
||||
<head>
|
||||
<!--begin::Base Path (base relative path for assets of this page) -->
|
||||
<base href="../">
|
||||
<!--end::Base Path -->
|
||||
<meta charset="utf-8" />
|
||||
|
||||
<title>{{ config('app.name', 'Bengkel') }} {{ isset($page_title) ? ' | ' . $page_title : '' }}</title>
|
||||
<meta name="description" content="Updates and statistics">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
<meta name="base-url" content="{{ url('/') }}">
|
||||
|
||||
<!--begin::Fonts -->
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700|Roboto:300,400,500,600,700">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,500,600,700|Roboto:300,400,500,600,700">
|
||||
|
||||
<!--end::Fonts -->
|
||||
|
||||
<!--begin::Global Theme Styles(used by all pages) -->
|
||||
<link href="{{ url('css/app.bundle.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
<link href="{{ url('css/saxmono.ttf') }}" rel="stylesheet" type="text/css" />
|
||||
<!--end::Global Theme Styles -->
|
||||
|
||||
<!--begin::Global Custom Styles(used by all pages) -->
|
||||
<link href="{{ url('css/custom-web.css') }}" rel="stylesheet" type="text/css" />
|
||||
<!--end::Global Custom Styles -->
|
||||
|
||||
<link rel="shortcut icon" href="{{ url('assets/media/logos/ckb.jpeg') }}" />
|
||||
|
||||
<link href="{{ asset('css/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
|
||||
<style>
|
||||
input[type="date"]::-webkit-clear-button {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.mobile-container {
|
||||
background: #dfe9f9;
|
||||
margin: 0 auto;
|
||||
height: 100vh;
|
||||
overflow: auto;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* @media(min-width: 1024px) {
|
||||
.mobile-container {
|
||||
max-width: 1024px;
|
||||
}
|
||||
} */
|
||||
|
||||
/* Scrollbar */
|
||||
::-webkit-scrollbar {
|
||||
width: .45rem;
|
||||
}
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: rgba(88, 103, 221, .2);
|
||||
border-radius: 3px;
|
||||
}
|
||||
::-webkit-scrollbar-track{
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
/* .mobile-container p, .mobile-container span, .mobile-container b, .mobile-container a {
|
||||
font-size: 10px !important;
|
||||
} */
|
||||
</style>
|
||||
|
||||
@yield('styles')
|
||||
</head>
|
||||
<!-- end::Head -->
|
||||
|
||||
<!-- begin::Body -->
|
||||
|
||||
<body>
|
||||
|
||||
@yield('content')
|
||||
|
||||
<!-- begin::Global Config(global config for global JS sciprts) -->
|
||||
<script>
|
||||
var KTAppOptions = {
|
||||
"colors": {
|
||||
"state": {
|
||||
"brand": "#5d78ff",
|
||||
"dark": "#282a3c",
|
||||
"light": "#ffffff",
|
||||
"primary": "#5867dd",
|
||||
"success": "#34bfa3",
|
||||
"info": "#36a3f7",
|
||||
"warning": "#ffb822",
|
||||
"danger": "#fd3995"
|
||||
},
|
||||
"base": {
|
||||
"label": ["#c5cbe3", "#a1a8c3", "#3d4465", "#3e4466"],
|
||||
"shape": ["#f0f3ff", "#d9dffa", "#afb4d4", "#646c9a"]
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<!-- end::Global Config -->
|
||||
|
||||
<!--begin::Global Theme Bundle(used by all pages) -->
|
||||
<script src="{{ url('js/app.bundle.min.js') }}" type="text/javascript"></script>
|
||||
<script src="//maps.google.com/maps/api/js?key=AIzaSyBTGnKT7dt597vo9QgeQ7BFhvSRP4eiMSM" type="text/javascript"></script>
|
||||
<!--end::Global Theme Bundle -->
|
||||
|
||||
<!--begin::Common Script -->
|
||||
<script src="{{ url('js/init.js') }}" type="text/javascript"></script>
|
||||
<!--end::Common Scripts -->
|
||||
|
||||
<!--end::Common Scripts -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.3.0/dist/chart.umd.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-datalabels@2"></script>
|
||||
<script src="{{ asset('js/bootstrap-datepicker.min.js') }}" type="text/javascript"></script>
|
||||
<script src="https://cdn.datatables.net/fixedcolumns/4.2.2/js/dataTables.fixedColumns.min.js"></script>
|
||||
@yield('javascripts')
|
||||
</body>
|
||||
<!-- end::Body -->
|
||||
|
||||
</html>
|
||||
24
resources/views/layouts/guest.blade.php
Normal file
24
resources/views/layouts/guest.blade.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
|
||||
<title>{{ config('app.name', 'Laravel') }}</title>
|
||||
|
||||
<!-- Fonts -->
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap">
|
||||
|
||||
<!-- Styles -->
|
||||
<link rel="stylesheet" href="{{ asset('css/app.css') }}">
|
||||
|
||||
<!-- Scripts -->
|
||||
<script src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.7.3/dist/alpine.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="font-sans text-gray-900 antialiased">
|
||||
{{ $slot }}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
7
resources/views/layouts/partials/footer.blade.php
Normal file
7
resources/views/layouts/partials/footer.blade.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<div class="kt-footer kt-grid__item kt-grid kt-grid--desktop kt-grid--ver-desktop" id="kt_footer">
|
||||
<div class="kt-container kt-container--fluid ">
|
||||
<div class="kt-footer__copyright">
|
||||
2020 © CV. Bangun Sukses Bersama
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
68
resources/views/layouts/partials/header.blade.php
Normal file
68
resources/views/layouts/partials/header.blade.php
Normal file
@@ -0,0 +1,68 @@
|
||||
<div id="kt_header" class="kt-header kt-grid__item kt-header--fixed pageNotPrint">
|
||||
<!-- begin:: Header Menu -->
|
||||
<div class="kt-header-menu-wrapper" id="kt_header_menu_wrapper">
|
||||
<div id="kt_header_menu" class="kt-header-menu kt-header-menu-mobile kt-header-menu--layout-default ">
|
||||
<ul class="kt-menu__nav ">
|
||||
<li>
|
||||
<div class="wrapperbtnToAdmin">
|
||||
<a href="{{ route('transaction') }}" class="btn btn-sm btn-primary">Ke Halaman Transaksi</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end:: Header Menu -->
|
||||
<!-- begin:: Header Topbar -->
|
||||
<div class="kt-header__topbar">
|
||||
<!--begin: User Bar -->
|
||||
<div class="kt-header__topbar-item kt-header__topbar-item--user">
|
||||
<div class="kt-header__topbar-wrapper" data-toggle="dropdown" data-offset="0px,0px">
|
||||
<div class="kt-header__topbar-user">
|
||||
<span class="kt-header__topbar-welcome kt-hidden-mobile">Hi,</span>
|
||||
<span class="kt-header__topbar-username kt-hidden-mobile">John Doe</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dropdown-menu dropdown-menu-fit dropdown-menu-right dropdown-menu-anim dropdown-menu-top-unround dropdown-menu-xl">
|
||||
<!--begin: Head -->
|
||||
<div class="kt-user-card kt-user-card--skin-dark kt-notification-item-padding-x" style="background-image: url('{{ url('assets/media/misc/bg-1.jpg') }}')">
|
||||
<div class="kt-user-card__name">
|
||||
John Doe
|
||||
</div>
|
||||
</div>
|
||||
<!--end: Head -->
|
||||
|
||||
<!--begin: Navigation -->
|
||||
<div class="kt-notification">
|
||||
<a href="#" class="kt-notification__item hide">
|
||||
<div class="kt-notification__item-icon">
|
||||
<i class="flaticon2-calendar-3 kt-font-success"></i>
|
||||
</div>
|
||||
<div class="kt-notification__item-details">
|
||||
<div class="kt-notification__item-title kt-font-bold">
|
||||
My Profile
|
||||
</div>
|
||||
<div class="kt-notification__item-time">
|
||||
Account settings and more
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<div class="kt-notification__custom kt-space-between">
|
||||
<a class="btn btn-danger btn-sm btn-bold" href="{{ route('logout') }}"
|
||||
onclick="event.preventDefault();
|
||||
document.getElementById('logout-form').submit();">
|
||||
{{ __('Logout') }}
|
||||
</a>
|
||||
|
||||
<form id="logout-form" action="{{ route('logout') }}" method="POST" class="d-none">
|
||||
@csrf
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!--end: Navigation -->
|
||||
</div>
|
||||
</div>
|
||||
<!--end: User Bar -->
|
||||
</div>
|
||||
<!-- end:: Header Topbar -->
|
||||
</div>
|
||||
14
resources/views/layouts/partials/headerMobile.blade.php
Normal file
14
resources/views/layouts/partials/headerMobile.blade.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<div id="kt_header_mobile" class="kt-header-mobile kt-header-mobile--fixed pageNotPrint">
|
||||
<div class="kt-header-mobile__logo">
|
||||
<a href="demo1/index.html">
|
||||
<img alt="Logo" src="{{ url('assets/media/logos/logo-landscape-white.png') }}" width="92" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="kt-header-mobile__toolbar">
|
||||
<button class="kt-header-mobile__toggler kt-header-mobile__toggler--left" id="kt_aside_mobile_toggler"><span></span></button>
|
||||
|
||||
<button class="kt-header-mobile__toggler" id="kt_header_mobile_toggler"><span></span></button>
|
||||
|
||||
<button class="kt-header-mobile__topbar-toggler" id="kt_header_mobile_topbar_toggler"><i class="flaticon-more"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
137
resources/views/layouts/partials/sidebarMenu.blade.php
Normal file
137
resources/views/layouts/partials/sidebarMenu.blade.php
Normal file
@@ -0,0 +1,137 @@
|
||||
<div class="kt-aside kt-aside--fixed kt-grid__item kt-grid kt-grid--desktop kt-grid--hor-desktop" id="kt_aside">
|
||||
<!-- begin:: Aside -->
|
||||
<div class="kt-aside__brand kt-grid__item " id="kt_aside_brand">
|
||||
<div class="kt-aside__brand-logo">
|
||||
<a href="{{ route('dashboard') }}">
|
||||
<img alt="Logo" src="{{ url('assets/media/logos/ckb.jpeg') }}" width="92" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="kt-aside__brand-tools">
|
||||
<button class="kt-aside__brand-aside-toggler" id="kt_aside_toggler">
|
||||
<span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24px" height="24px" viewBox="0 0 24 24" version="1.1" class="kt-svg-icon">
|
||||
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<polygon points="0 0 24 0 24 24 0 24" />
|
||||
<path d="M5.29288961,6.70710318 C4.90236532,6.31657888 4.90236532,5.68341391 5.29288961,5.29288961 C5.68341391,4.90236532 6.31657888,4.90236532 6.70710318,5.29288961 L12.7071032,11.2928896 C13.0856821,11.6714686 13.0989277,12.281055 12.7371505,12.675721 L7.23715054,18.675721 C6.86395813,19.08284 6.23139076,19.1103429 5.82427177,18.7371505 C5.41715278,18.3639581 5.38964985,17.7313908 5.76284226,17.3242718 L10.6158586,12.0300721 L5.29288961,6.70710318 Z" fill="#000000" fill-rule="nonzero" transform="translate(8.999997, 11.999999) scale(-1, 1) translate(-8.999997, -11.999999) " />
|
||||
<path d="M10.7071009,15.7071068 C10.3165766,16.0976311 9.68341162,16.0976311 9.29288733,15.7071068 C8.90236304,15.3165825 8.90236304,14.6834175 9.29288733,14.2928932 L15.2928873,8.29289322 C15.6714663,7.91431428 16.2810527,7.90106866 16.6757187,8.26284586 L22.6757187,13.7628459 C23.0828377,14.1360383 23.1103407,14.7686056 22.7371482,15.1757246 C22.3639558,15.5828436 21.7313885,15.6103465 21.3242695,15.2371541 L16.0300699,10.3841378 L10.7071009,15.7071068 Z" fill="#000000" fill-rule="nonzero" opacity="0.3" transform="translate(15.999997, 11.999999) scale(-1, 1) rotate(-270.000000) translate(-15.999997, -11.999999) " />
|
||||
</g>
|
||||
</svg></span>
|
||||
<span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24px" height="24px" viewBox="0 0 24 24" version="1.1" class="kt-svg-icon">
|
||||
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<polygon points="0 0 24 0 24 24 0 24" />
|
||||
<path d="M12.2928955,6.70710318 C11.9023712,6.31657888 11.9023712,5.68341391 12.2928955,5.29288961 C12.6834198,4.90236532 13.3165848,4.90236532 13.7071091,5.29288961 L19.7071091,11.2928896 C20.085688,11.6714686 20.0989336,12.281055 19.7371564,12.675721 L14.2371564,18.675721 C13.863964,19.08284 13.2313966,19.1103429 12.8242777,18.7371505 C12.4171587,18.3639581 12.3896557,17.7313908 12.7628481,17.3242718 L17.6158645,12.0300721 L12.2928955,6.70710318 Z" fill="#000000" fill-rule="nonzero" />
|
||||
<path d="M3.70710678,15.7071068 C3.31658249,16.0976311 2.68341751,16.0976311 2.29289322,15.7071068 C1.90236893,15.3165825 1.90236893,14.6834175 2.29289322,14.2928932 L8.29289322,8.29289322 C8.67147216,7.91431428 9.28105859,7.90106866 9.67572463,8.26284586 L15.6757246,13.7628459 C16.0828436,14.1360383 16.1103465,14.7686056 15.7371541,15.1757246 C15.3639617,15.5828436 14.7313944,15.6103465 14.3242754,15.2371541 L9.03007575,10.3841378 L3.70710678,15.7071068 Z" fill="#000000" fill-rule="nonzero" opacity="0.3" transform="translate(9.000003, 11.999999) rotate(-270.000000) translate(-9.000003, -11.999999) " />
|
||||
</g>
|
||||
</svg></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end:: Aside -->
|
||||
<!-- begin:: Aside Menu -->
|
||||
<div class="kt-aside-menu-wrapper kt-grid__item kt-grid__item--fluid" id="kt_aside_menu_wrapper">
|
||||
|
||||
<div id="kt_aside_menu" class="kt-aside-menu " data-ktmenu-vertical="1" data-ktmenu-scroll="1" data-ktmenu-dropdown-timeout="500">
|
||||
|
||||
<ul class="kt-menu__nav ">
|
||||
@can('view', $menus['dashboard'])
|
||||
<li class="kt-menu__item kt-menu__item--submenu" aria-haspopup="true" data-ktmenu-submenu-toggle="hover">
|
||||
<a href="{{ route('dashboard') }}" class="kt-menu__link kt-menu__toggle">
|
||||
<span class="kt-menu__link-icon">
|
||||
<i class="fa fa-list"></i>
|
||||
</span>
|
||||
<span class="kt-menu__link-text">Dashboard</span>
|
||||
</a>
|
||||
</li>
|
||||
@endcan
|
||||
|
||||
@if (Auth::user()->can('view', $menus['dealer.index']) || Auth::user()->can('view', $menus['category.index']) || Auth::user()->can('view', $menus['work.index']))
|
||||
<li class="kt-menu__item kt-menu__item--submenu" aria-haspopup="true" data-ktmenu-submenu-toggle="hover">
|
||||
<a href="javascript:;" class="kt-menu__link kt-menu__toggle">
|
||||
<span class="kt-menu__link-icon">
|
||||
<i class="fa fa-box"></i>
|
||||
</span>
|
||||
<span class="kt-menu__link-text">Data Master</span><i class="kt-menu__ver-arrow la la-angle-right"></i>
|
||||
</a>
|
||||
<div class="kt-menu__submenu "><span class="kt-menu__arrow"></span>
|
||||
<ul class="kt-menu__subnav">
|
||||
{{-- <li class="kt-menu__item kt-menu__item--parent" aria-haspopup="true"><span class="kt-menu__link"><span class="kt-menu__link-text">Kategori Pekerjaan</span></span></li> --}}
|
||||
@can('view', $menus['dealer.index'])
|
||||
<li class="kt-menu__item" aria-haspopup="true"><a href="{{ route('dealer.index') }}" class="kt-menu__link "><i class="fa fa-car" style="display: flex; align-items: center; margin-right: 10px;"><span></span></i><span class="kt-menu__link-text">Dealer</span></a></li>
|
||||
@endcan
|
||||
@can('view', $menus['category.index'])
|
||||
<li class="kt-menu__item" aria-haspopup="true"><a href="{{ route('category.index') }}" class="kt-menu__link "><i class="fa fa-users" style="display: flex; align-items: center; margin-right: 10px;"><span></span></i><span class="kt-menu__link-text">Kategori Pekerjaan</span></a></li>
|
||||
@endcan
|
||||
@can('view', $menus['work.index'])
|
||||
<li class="kt-menu__item" aria-haspopup="true"><a href="{{ route('work.index') }}" class="kt-menu__link "><i class="fa fa-list" style="display: flex; align-items: center; margin-right: 10px;"><span></span></i><span class="kt-menu__link-text">Pekerjaan</span></a></li>
|
||||
@endcan
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@if (Auth::user()->can('view', $menus['user.index']) || Auth::user()->can('view', $menus['roleprivileges.index']))
|
||||
<li class="kt-menu__item kt-menu__item--submenu" aria-haspopup="true" data-ktmenu-submenu-toggle="hover">
|
||||
<a href="javascript:;" class="kt-menu__link kt-menu__toggle">
|
||||
<span class="kt-menu__link-icon">
|
||||
<i class="fa fa-box"></i>
|
||||
</span>
|
||||
<span class="kt-menu__link-text">Management User</span><i class="kt-menu__ver-arrow la la-angle-right"></i>
|
||||
</a>
|
||||
<div class="kt-menu__submenu "><span class="kt-menu__arrow"></span>
|
||||
<ul class="kt-menu__subnav">
|
||||
{{-- <li class="kt-menu__item kt-menu__item--parent" aria-haspopup="true"><span class="kt-menu__link"><span class="kt-menu__link-text">Kategori Pekerjaan</span></span></li> --}}
|
||||
@can('view', $menus['user.index'])
|
||||
<li class="kt-menu__item" aria-haspopup="true"><a href="{{ route('user.index') }}" class="kt-menu__link "><i class="fa fa-car" style="display: flex; align-items: center; margin-right: 10px;"><span></span></i><span class="kt-menu__link-text">User</span></a></li>
|
||||
@endcan
|
||||
@can('view', $menus['roleprivileges.index'])
|
||||
<li class="kt-menu__item" aria-haspopup="true"><a href="{{ route('roleprivileges.index') }}" class="kt-menu__link "><i class="fa fa-users" style="display: flex; align-items: center; margin-right: 10px;"><span></span></i><span class="kt-menu__link-text">Role & Privileges</span></a></li>
|
||||
@endcan
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
@endcan
|
||||
|
||||
{{-- <li class="kt-menu__item kt-menu__item--submenu" aria-haspopup="true" data-ktmenu-submenu-toggle="hover">
|
||||
<a href="{{ route('user.index') }}" class="kt-menu__link kt-menu__toggle">
|
||||
<span class="kt-menu__link-icon">
|
||||
<i class="fa fa-list"></i>
|
||||
</span>
|
||||
<span class="kt-menu__link-text">User</span>
|
||||
</a>
|
||||
</li> --}}
|
||||
|
||||
@if (Auth::user()->can('view', $menus['report.transaction']) || Auth::user()->can('view', $menus['report.transaction_sa']) || Auth::user()->can('view', $menus['report.transaction_dealer']))
|
||||
<li class="kt-menu__item kt-menu__item--submenu" aria-haspopup="true" data-ktmenu-submenu-toggle="hover">
|
||||
<a href="javascript:;" class="kt-menu__link kt-menu__toggle">
|
||||
<span class="kt-menu__link-icon">
|
||||
<i class="fa fa-box"></i>
|
||||
</span>
|
||||
<span class="kt-menu__link-text">Laporan</span><i class="kt-menu__ver-arrow la la-angle-right"></i>
|
||||
</a>
|
||||
<div class="kt-menu__submenu "><span class="kt-menu__arrow"></span>
|
||||
<ul class="kt-menu__subnav">
|
||||
{{-- <li class="kt-menu__item kt-menu__item--parent" aria-haspopup="true"><span class="kt-menu__link"><span class="kt-menu__link-text">Kategori Pekerjaan</span></span></li> --}}
|
||||
@can('view', $menus['report.transaction'])
|
||||
<li class="kt-menu__item" aria-haspopup="true">
|
||||
<a href="{{ route('report.transaction') }}" class="kt-menu__link "><i class="fa fa-wrench" style="display: flex; align-items: center; margin-right: 10px;"><span></span></i><span class="kt-menu__link-text">Laporan Pekerjaan</span></a>
|
||||
</li>
|
||||
@endcan
|
||||
@can('view', $menus['report.transaction_sa'])
|
||||
<li class="kt-menu__item" aria-haspopup="true">
|
||||
<a href="{{ route('report.transaction_sa') }}" class="kt-menu__link "><i class="fa fa-user" style="display: flex; align-items: center; margin-right: 10px;"><span></span></i><span class="kt-menu__link-text">Laporan Performa SA</span></a>
|
||||
</li>
|
||||
@endcan
|
||||
@can('view', $menus['report.transaction_dealer'])
|
||||
<li class="kt-menu__item" aria-haspopup="true">
|
||||
<a href="{{ route('report.transaction_dealer') }}" class="kt-menu__link "><i class="fa fa-car" style="display: flex; align-items: center; margin-right: 10px;"><span></span></i><span class="kt-menu__link-text">Laporan Performa Dealer</span></a>
|
||||
</li>
|
||||
@endcan
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end:: Aside Menu -->
|
||||
</div>
|
||||
553
resources/views/transaction/index.blade.php
Normal file
553
resources/views/transaction/index.blade.php
Normal file
@@ -0,0 +1,553 @@
|
||||
@extends('layouts.frontapp')
|
||||
|
||||
{{-- @section('contentHead')
|
||||
<div class="kt-subheader kt-grid__item" id="kt_subheader">
|
||||
<div class="kt-container kt-container--fluid ">
|
||||
<div class="kt-subheader__main">
|
||||
<h3 class="kt-subheader__title"> Transaksi </h3>
|
||||
</div>
|
||||
<div class="kt-subheader__toolbar" style="width: 1000px;">
|
||||
<a href="{{ route('transaction.create') }}" id="addBtn" class="btn btn-label-success btn-bold" data-url="" data-redirect="">Tambah Transaksi</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection --}}
|
||||
|
||||
@section('styles')
|
||||
<style>
|
||||
button.disabled {
|
||||
cursor: not-allowed !important;
|
||||
pointer-events: none;
|
||||
}
|
||||
</style>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="mobile-container">
|
||||
<div class="container">
|
||||
<div class="row mb-4 mt-4">
|
||||
<div class="col-8">
|
||||
{{-- <h5 class="text-center mt-4">Cipta Kreasi Baru</h5> --}}
|
||||
<a href="/"><img src="{{ asset('logo-ckb.png') }}" style="width: 100%" alt="LOGO CKB"></a>
|
||||
</div>
|
||||
<div class="col-4 text-right my-auto">
|
||||
<a class="btn btn-sm btn-danger mt-3" style="background: red !important;" href="{{ route('logout') }}" onclick="logout(event)">
|
||||
{{ __('Logout') }}
|
||||
</a>
|
||||
|
||||
<form id="logout-form" action="{{ route('logout') }}" method="POST" class="d-none">
|
||||
@csrf
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<!--begin::Portlet-->
|
||||
<div class="kt-portlet">
|
||||
<div class="kt-portlet__head">
|
||||
<div class="kt-portlet__head-label">
|
||||
<span>{{ $mechanic->name }}</span>
|
||||
</div>
|
||||
<div class="kt-portlet__head-toolbar">
|
||||
<span class="float-right">{{ $now }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="kt-portlet__body">
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
<b>Dealer {{ $mechanic->dealer_name }}</b><br><br>
|
||||
<a href="#">Total {{ $count_transaction_dealers }} Pekerjaan terkirim pada dealer</a><br>
|
||||
<a href="#">Anda telah posting {{ $count_transaction_users }} pekerjaan</a>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="text-center mt-2">
|
||||
<a href="{{ route('transaction.lists') }}">
|
||||
<i style="font-size: 16px;" class="fa fa-eye"></i>
|
||||
<p>Laporan harian</p>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mt-2">
|
||||
<a href="{{ route('transaction.recap') }}">
|
||||
<i style="font-size: 16px;" class="fa fa-eye"></i>
|
||||
<p>Rekap Laporan</p>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@if (session('success'))
|
||||
<div class="row mt-2 mb-2">
|
||||
<div class="col-12">
|
||||
<div class="alert alert—check alert-success fade show" role="alert">
|
||||
<div class="alert-text">{{ session('success') }}</div>
|
||||
<div class="alert-close">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true"><i class="la la-close"></i></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<!--begin::Portlet-->
|
||||
<div class="kt-portlet">
|
||||
<div class="kt-portlet__body">
|
||||
<ul class="nav nav-tabs nav-tabs-line nav-tabs-line-primary" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link @if(old('form') == 'wash') @else active @endif" data-toggle="tab" href="#work">Form Kerja</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link @if(old('form') == 'wash') active @endif" data-toggle="tab" href="#wash">Form Cuci</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane @if(old('form') == 'wash') @else active @endif" id="work" role="tabpanel">
|
||||
<form action="{{ route('transaction.store') }}" method="POST" id="workForm">
|
||||
@csrf
|
||||
<input type="hidden" name="form" value="work">
|
||||
<input type="hidden" name="mechanic_id" value="{{ $mechanic->id }}">
|
||||
<input type="hidden" name="dealer_id" value="{{ $mechanic->dealer_id }}">
|
||||
<div class="form-group row">
|
||||
<div class="col-6">
|
||||
<input type="text" name="spk_no" class="form-control @if(old('form') == 'work') @error('spk_no') is-invalid @enderror @endif" value="{{ old('spk_no') }}" placeholder="No. SPK">
|
||||
|
||||
@if(old('form') == 'work')
|
||||
@error('spk_no')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{!! $message !!}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<input type="text" name="police_number" class="form-control @if(old('form') == 'work') @error('police_number') is-invalid @enderror" @endif value="{{ old('police_number') }}" placeholder="No. Polisi">
|
||||
@if(old('form') == 'work')
|
||||
@error('police_number')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{!! $message !!}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-6">
|
||||
<select name="warranty" class="form-control @if(old('form') == 'work') @error('warranty') is-invalid @enderror @endif">
|
||||
<option selected>Warranty</option>
|
||||
<option value="1" @if(old('form') == 'work') @if(old('warranty') == 1) selected @endif @endif>Ya</option>
|
||||
<option value="0" @if(old('form') == 'work') @if(old('warranty') == 0) selected @endif @endif>Tidak</option>
|
||||
</select>
|
||||
@if(old('form') == 'work')
|
||||
@error('warranty')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{!! $message !!}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<input type="text" name="date" id="date-work" required class="form-control @if(old('form') == 'work') @error('date') is-invalid @enderror @endif" placeholder="Tanggal Pekerjaan">
|
||||
@if(old('form') == 'work')
|
||||
@error('date')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{!! $message !!}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mt-4">
|
||||
<select name="user_sa_id" class="form-control @if(old('form') == 'work') @error('user_sa_id') is-invalid @enderror @endif">
|
||||
<option value="" selected>Service Advisor</option>
|
||||
@foreach ($user_sas as $user_sa)
|
||||
<option @if(old('form') == 'work') @if($user_sa->id == old('user_sa_id')) selected @enderror @endif value="{{ $user_sa->id }}">{{ $user_sa->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
@error('user_sa_id')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{!! $message !!}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
<input type="hidden" name="category" value="work">
|
||||
<div class="work_multirow">
|
||||
@if (old('work_id') && old('form') == 'work')
|
||||
{{-- @php
|
||||
dd($errors->all());
|
||||
@endphp --}}
|
||||
<input type="hidden" class="work_field_counter" value="{{ count(old('work_id')) }}">
|
||||
@for ($i = 0; $i < count(old('work_id')); $i++)
|
||||
<div class="form-group row" id="work_field{{ $i+1 }}">
|
||||
<div class="col-6">
|
||||
<select name="work_id[]" id="work_work{{ $i+1 }}" class="form-control @error('work_id.'.$i)" is-invalid @enderror>
|
||||
<option selected disabled>Pekerjaan</option>
|
||||
@foreach ($work_works as $work)
|
||||
<option value="{{ $work->id }}" @if($work->id == old('work_id.'.$i)) selected @endif>{{ $work->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
@error('work_id.'.$i)
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{!! $message !!}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<input type="number" class="form-control @error('quantity.'.$i) is-invalid @enderror" value="{{ old('quantity.'.$i) }}" name="quantity[]" placeholder="Qty">
|
||||
@error('quantity.'.$i)
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{!! $message !!}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<button class="btn btn-danger work-btn-remove float-right" style="width: 100%;" type="button" id="workRemove1" onclick="removeFormField('work', 1)">X</button>
|
||||
</div>
|
||||
</div>
|
||||
@endfor
|
||||
@else
|
||||
<input type="hidden" class="work_field_counter" value="5">
|
||||
<div class="form-group row" id="work_field1">
|
||||
<div class="col-6">
|
||||
<select name="work_id[]" id="work_work1" class="form-control">
|
||||
<option selected disabled>Pekerjaan</option>
|
||||
@foreach ($work_works as $work)
|
||||
<option value="{{ $work->id }}">{{ $work->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<input type="number" class="form-control" name="quantity[]" placeholder="Qty">
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<button class="btn btn-danger work-btn-remove float-right" style="width: 100%;" type="button" id="workRemove1" onclick="removeFormField('work', 1)">X</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" id="work_field2">
|
||||
<div class="col-6">
|
||||
<select name="work_id[]" id="work_work2" class="form-control">
|
||||
<option selected disabled>Pekerjaan</option>
|
||||
@foreach ($work_works as $work)
|
||||
<option value="{{ $work->id }}">{{ $work->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<input type="number" class="form-control" name="quantity[]" placeholder="Qty">
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<button class="btn btn-danger work-btn-remove float-right" style="width: 100%;" type="button" id="workRemove2" onclick="removeFormField('work', 2)">X</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" id="work_field3">
|
||||
<div class="col-6">
|
||||
<select name="work_id[]" id="work_work3" class="form-control">
|
||||
<option selected disabled>Pekerjaan</option>
|
||||
@foreach ($work_works as $work)
|
||||
<option value="{{ $work->id }}">{{ $work->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<input type="number" class="form-control" name="quantity[]" placeholder="Qty">
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<button class="btn btn-danger work-btn-remove float-right" style="width: 100%;" type="button" id="workRemove3" onclick="removeFormField('work', 3)">X</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" id="work_field4">
|
||||
<div class="col-6">
|
||||
<select name="work_id[]" id="work_work4" class="form-control">
|
||||
<option selected disabled>Pekerjaan</option>
|
||||
@foreach ($work_works as $work)
|
||||
<option value="{{ $work->id }}">{{ $work->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<input type="number" class="form-control" name="quantity[]" placeholder="Qty">
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<button class="btn btn-danger work-btn-remove float-right" style="width: 100%;" type="button" id="workRemove4" onclick="removeFormField('work', 4)">X</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" id="work_field5">
|
||||
<div class="col-6">
|
||||
<select name="work_id[]" id="work_work5" class="form-control">
|
||||
<option selected disabled>Pekerjaan</option>
|
||||
@foreach ($work_works as $work)
|
||||
<option value="{{ $work->id }}">{{ $work->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<input type="number" class="form-control" name="quantity[]" placeholder="Qty">
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<button class="btn btn-danger work-btn-remove float-right" style="width: 100%;" type="button" id="workRemove5" onclick="removeFormField('work', 5)">X</button>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<div class="row">
|
||||
<div class="col-10"></div>
|
||||
<div class="col-2">
|
||||
<button class="btn mb-4 btn-sm btn-primary float-right btn-add-field-work" style="width: 100%;" onclick="addFormField('work'); return false;">+</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn btn-brand button-save" style="display: block; width: 100%;">Simpan</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="tab-pane @if(old('form') == 'wash') active @endif" id="wash" role="tabpanel">
|
||||
<form action="{{ route('transaction.store') }}" method="POST" id="washForm">
|
||||
@csrf
|
||||
<input type="hidden" name="form" value="wash">
|
||||
<input type="hidden" name="mechanic_id" value="{{ $mechanic->id }}">
|
||||
<input type="hidden" name="dealer_id" value="{{ $mechanic->dealer_id }}">
|
||||
<div class="form-group row">
|
||||
<div class="col-6">
|
||||
<input type="text" name="spk_no" class="form-control @if(old('form') == 'wash') @error('spk_no') is-invalid @enderror @endif" value="{{ old('spk_no') }}" placeholder="No. SPK">
|
||||
@if(old('form') == 'wash')
|
||||
@error('spk_no')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{!! $message !!}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<input type="text" name="police_number" class="form-control @if(old('form') == 'wash') @error('police_number') is-invalid @enderror @endif" value="{{ old('police_number') }}" placeholder="No. Polisi">
|
||||
@if(old('form') == 'wash')
|
||||
@error('police_number')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{!! $message !!}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-6">
|
||||
<select name="warranty" class="form-control @if(old('form') == 'wash') @error('warranty') is-invalid @enderror @endif">
|
||||
<option selected>Warranty</option>
|
||||
<option value="1" @if(old('form') == 'wash') @if(old('warranty') == 1) selected @endif @endif>Ya</option>
|
||||
<option value="0" @if(old('form') == 'wash') @if(old('warranty') == 0) selected @endif @endif>Tidak</option>
|
||||
</select>
|
||||
@error('warranty')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{!! $message !!}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<input type="text" id="date-wash" name="date" class="form-control @if(old('form') == 'wash') @error('date') is-invalid @enderror @endif" placeholder="Tanggal Pekerjaan">
|
||||
@if(old('form') == 'wash')
|
||||
@error('date')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{!! $message !!}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mt-4">
|
||||
<select name="user_sa_id" class="form-control @if(old('form') == 'wash') @error('user_sa_id') is-invalid @enderror @endif">
|
||||
<option selected>Service Advisor</option>
|
||||
@foreach ($user_sas as $user_sa)
|
||||
<option @if(old('form') == 'wash') @if($user_sa->id == old('user_sa_id')) selected @enderror @endif value="{{ $user_sa->id }}">{{ $user_sa->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
@if(old('form') == 'wash')
|
||||
@error('user_sa_id')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{!! $message !!}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
@endif
|
||||
</div>
|
||||
<input type="hidden" name="category" value="work">
|
||||
<div class="form-group">
|
||||
<label>Pekerjaan</label>
|
||||
<input type="text" class="form-control" disabled value="{{ $wash_work->name }}">
|
||||
<input type="hidden" class="form-control" name="work_id[]" value="{{ $wash_work->id }}">
|
||||
<input type="hidden" class="form-control" name="quantity[]" value="1">
|
||||
</div>
|
||||
<button class="btn btn-brand button-save" style="display: block; width: 100%;">Simpan</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--end::Portlet-->
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="ajax_work_url" value="{{ route('transaction.workcategory', ':id') }}">
|
||||
<input type="hidden" name="mechanic_id" value="{{ $mechanic->id }}">
|
||||
<input type="hidden" name="dealer_id" value="{{ $mechanic->dealer_id }}">
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('javascripts')
|
||||
<script>
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
}
|
||||
});
|
||||
|
||||
function logout(event){
|
||||
event.preventDefault();
|
||||
Swal.fire({
|
||||
title: 'Logout?',
|
||||
text: "Anda akan keluar dari sistem!",
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#d33',
|
||||
cancelButtonColor: '#dedede',
|
||||
confirmButtonText: 'Logout'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
$('#logout-form').submit();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function addFormField(form) {
|
||||
var id = $(`.${form}_field_counter`).val();
|
||||
id = parseInt(id) + 1;
|
||||
$(`
|
||||
<div class="form-group row" id="${form}_field${id}">
|
||||
<div class="col-6">
|
||||
<select name="${form}_work_id[]" id="${form}_work${id}" class="form-control">
|
||||
<option selected disabled>Pekerjaan</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<input type="number" class="form-control" name="${form}_quantity[]" placeholder="Qty">
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<button class="btn btn-danger" onclick="removeFormField('${form}', ${id})" style="width: 100%; opacity: 1;" id="remove${id}">X</button>
|
||||
</div>
|
||||
</div>
|
||||
`).insertBefore($(".btn-add-field-"+form).parent().parent());
|
||||
|
||||
let category_id = 1;
|
||||
if(form == 'wash') {
|
||||
category_id = 1;
|
||||
}else if(form == 'work') {
|
||||
category_id = 3;
|
||||
}
|
||||
|
||||
let ajax_work_url = $("input[name='ajax_work_url']").val()
|
||||
ajax_work_url = ajax_work_url.replace(':id', category_id);
|
||||
getWork(ajax_work_url, form, id)
|
||||
|
||||
if(id > 1) {
|
||||
$(".work-btn-remove").removeAttr('disabled')
|
||||
$(".work-btn-remove").removeClass("disabled")
|
||||
$(".work-btn-remove").css("opacity", "1")
|
||||
}
|
||||
|
||||
$(`.${form}_field_counter`).val(id);
|
||||
}
|
||||
|
||||
function removeFormField(form, id) {
|
||||
var attr = $(".work-btn-remove").attr('disabled');
|
||||
var id = $(`.${form}_field_counter`).val();
|
||||
if (typeof attr !== 'undefined' && attr !== false) {
|
||||
}else{
|
||||
id = parseInt(id) - 1;
|
||||
$(`.${form}_field_counter`).val(id);
|
||||
$(`#${form}_field${id}`).remove();
|
||||
}
|
||||
|
||||
|
||||
if(id < 2) {
|
||||
$(".work-btn-remove").attr("disabled", "disabled")
|
||||
$(".work-btn-remove").addClass("disabled")
|
||||
$(".work-btn-remove").css("opacity", "0.5")
|
||||
}
|
||||
}
|
||||
|
||||
function getWork(ajax_work_url, form, id) {
|
||||
$.get(ajax_work_url, function(res) {
|
||||
$.each(res.data, function (i, item) {
|
||||
$(`#${form}_work${id}`).append($('<option>', {
|
||||
value: item.id,
|
||||
text : item.name
|
||||
}));
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
$("#workForm").submit(function(e) {
|
||||
$(".button-save").attr("disabled");
|
||||
$(".button-save").addClass("disabled");
|
||||
return true;
|
||||
})
|
||||
|
||||
$("#washForm").submit(function(e) {
|
||||
$(".button-save").attr("disabled");
|
||||
$(".button-save").addClass("disabled");
|
||||
return true;
|
||||
})
|
||||
|
||||
$("#date-work").datepicker()
|
||||
$("#date-wash").datepicker()
|
||||
|
||||
function createTransaction(form) {
|
||||
let work_ids;
|
||||
if(form == 'work') {
|
||||
work_ids = $(`select[name='${form}_work_id[]']`).map(function (idx, elem) {
|
||||
return $(elem).val();
|
||||
}).get();
|
||||
}
|
||||
|
||||
if(form == 'wash') {
|
||||
work_ids = $(`input[name='${form}_work_id[]']`).map(function (idx, elem) {
|
||||
return $(elem).val();
|
||||
}).get();
|
||||
}
|
||||
|
||||
let quantities = $(`input[name='${form}_quantity[]']`).map(function (idx, elem) {
|
||||
return $(elem).val();
|
||||
}).get();
|
||||
|
||||
let datas = [];
|
||||
for(let i = 0; i < work_ids.length; i++) {
|
||||
const data = {
|
||||
user_id : $("input[name='mechanic_id']").val(),
|
||||
dealer_id : $("input[name='dealer_id']").val(),
|
||||
form : form,
|
||||
work_id : work_ids[i],
|
||||
qty : quantities[i],
|
||||
spk : $(`input[name='${form}_spk_no']`).val(),
|
||||
police_number : $(`input[name='${form}_police_number']`).val(),
|
||||
qtys : $(`input[name='${form}_quantity']`).val(),
|
||||
warranty : $(`select[name='${form}_warranty']`).val(),
|
||||
user_sa_id : $(`select[name='${form}_user_sa_id']`).val(),
|
||||
date : $(`input[name='${form}_date']`).val(),
|
||||
}
|
||||
datas.push(data)
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: $(`#${form}Form`).attr("action"),
|
||||
type: "POST",
|
||||
data: {
|
||||
data : datas
|
||||
},
|
||||
success: function(res) {
|
||||
document.location.reload()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
400
resources/views/transaction/lists.blade.php
Normal file
400
resources/views/transaction/lists.blade.php
Normal file
@@ -0,0 +1,400 @@
|
||||
@extends('layouts.frontapp')
|
||||
@section('content')
|
||||
<div class="mobile-container">
|
||||
<div class="container">
|
||||
<div class="row mb-4 mt-4">
|
||||
<div class="col-4 my-auto">
|
||||
<a href="{{ route('transaction') }}" class="mt-4 btn btn-danger"><i class="fa fa-chevron-left"></i> Kembali</a>
|
||||
</div>
|
||||
<div class="col-8">
|
||||
{{-- <h5 class="text-center mt-4">Cipta Kreasi Baru</h5> --}}
|
||||
<a href="/"><img src="{{ asset('logo-ckb.png') }}" style="width: 100%" alt="LOGO CKB"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="kt-portlet">
|
||||
<div class="kt-portlet__head">
|
||||
<h5 class="mt-4">Laporan Harian</h5>
|
||||
</div>
|
||||
<div class="kt-portlet__body">
|
||||
<form action="{{ route('transaction.lists') }}" method="GET">
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<label>Tgl Awal</label>
|
||||
<input type="date" name="date_start" id="date_start" value="{{ $date_start }}" class="form-control">
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<label>Tgl Akhir</label>
|
||||
<input type="date" name="date_end" id="date_end" value="{{ $date_end }}" class="form-control">
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<button type="submit" class="btn btn-success mt-3 btn-block">Cari</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<p><button id="share" type="button" class="btn btn-info btn-block mt-4">Bagikan Data Hari Ini</button></p>
|
||||
<p class="result"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
{{-- <div class="table-responsive">
|
||||
<table class="table table-striped" id="kt-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Tanggal</th>
|
||||
<th>SPK</th>
|
||||
<th>SA</th>
|
||||
<th>No. Polisi</th>
|
||||
<th>Warranty</th>
|
||||
<th>Kategori</th>
|
||||
<th>Pekerjaan</th>
|
||||
<th>Qty</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($transaction_dealers as $transaction)
|
||||
<tr>
|
||||
<td>{{ date('d/m/Y', strtotime($transaction->date)) }}</td>
|
||||
<td>{{ $transaction->spk }}</td>
|
||||
<td>{{ $transaction->sa_name }}</td>
|
||||
<td>{{ $transaction->police_number }}</td>
|
||||
<td>{{ $transaction->warranty == 1 ? 'Ya' : 'Tidak' }}</td>
|
||||
<td>{{ $transaction->category_name }}</td>
|
||||
<td>{{ $transaction->workname }}</td>
|
||||
<td>{{ $transaction->qty }}</td>
|
||||
<td>
|
||||
@if ($transaction->status == 1)
|
||||
<span class="badge badge-success">Closed</span>
|
||||
@else
|
||||
<button class="btn btn-sm btn-warning btn-bold" data-action="{{ route('transaction.update', $transaction->transaction_id) }}" data-url="{{ route('transaction.edit', $transaction->transaction_id) }}" onclick="editTransaction({{ $transaction->transaction_id }})" id="editTransaction{{ $transaction->transaction_id }}">Edit</button>
|
||||
<br><br>
|
||||
<a class="btn btn-danger btn-sm btn-bold" href="{{ route('transaction.destroy', $transaction->transaction_id) }}"
|
||||
onclick="event.preventDefault();
|
||||
document.getElementById('destroy-form').submit();">
|
||||
{{ __('Hapus') }}
|
||||
</a>
|
||||
|
||||
<form id="destroy-form" action="{{ route('transaction.destroy', $transaction->transaction_id) }}" method="POST" class="d-none">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
</form>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div> --}}
|
||||
@foreach ($transaction_dealers as $transaction)
|
||||
<div class="col-12">
|
||||
<div class="kt-portlet kt-portlet--mobile">
|
||||
<div class="kt-portlet__body">
|
||||
<div class="row">
|
||||
<div class="col-6 text-left">
|
||||
<b class="font-weight-bold text-info">{{ $transaction->spk }}</b>
|
||||
</div>
|
||||
<div class="col-6 text-right text-danger">
|
||||
<small>{{ $transaction->warranty == 1 ? 'Ada' : 'Tidak Ada' }}</small><br>
|
||||
<b class="font-weight-bold">Warranty</b>
|
||||
</div>
|
||||
</div><br>
|
||||
<div class="row">
|
||||
<div class="col-6 text-left text-dark">
|
||||
<b class="font-weight-bold">{{ $transaction->sa_name }}</b><br>
|
||||
<span class="kt-shape-font-color-4 text-dark">{{ $transaction->police_number }}</span>
|
||||
</div>
|
||||
<div class="col-6 text-right">
|
||||
<b class="font-weight-bold text-primary">{{ $transaction->workname }}</b><br>
|
||||
<b class="font-weight-bold text-dark">x{{ $transaction->qty }}</b>
|
||||
</div>
|
||||
</div>
|
||||
<div class="kt-portlet__foot text-right mt-4" style="background: none !important; padding-right: 0 !important; padding-left: 0 !important; padding-bottom: 0; margin-bottom: 0;">
|
||||
@if ($transaction->status == 1)
|
||||
<span class="badge badge-success">Closed</span>
|
||||
@else
|
||||
<button class="btn btn-sm btn-pill btn-outline-warning btn-bold" data-action="{{ route('transaction.update', $transaction->transaction_id) }}" data-url="{{ route('transaction.edit', $transaction->transaction_id) }}" onclick="editTransaction({{ $transaction->transaction_id }})" id="editTransaction{{ $transaction->transaction_id }}">Edit</button>
|
||||
<a class="btn btn-pill btn-outline-danger btn-sm btn-bold" href="{{ route('transaction.destroy', $transaction->transaction_id) }}"
|
||||
onclick="event.preventDefault();
|
||||
document.getElementById('destroy-form').submit();">
|
||||
{{ __('Hapus') }}
|
||||
</a>
|
||||
|
||||
<form id="destroy-form" action="{{ route('transaction.destroy', $transaction->transaction_id) }}" method="POST" class="d-none">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
</form>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{-- <div class="col-12 mb-3">
|
||||
<div class="card card-body">
|
||||
<div class="row">
|
||||
<div class="col-6 text-left">
|
||||
<b>{{ date('d/m/Y', strtotime($transaction->date)) }}</b>
|
||||
</div>
|
||||
<div class="col-6 text-right">
|
||||
<p>{{ $transaction->spk }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-4">
|
||||
<div class="col">
|
||||
<h5>{{ $transaction->workname }} | {{ $transaction->police_number }}</h5>
|
||||
<b>{{ $transaction->sa_name }}</b><br>
|
||||
<span>Warranty : <b>{{ $transaction->warranty == 1 ? 'YA' : 'TIDAK' }}</b></span>
|
||||
</div>
|
||||
<div class="col text-right">
|
||||
<h3 class="font-weight-bold mb-4">1</h3>
|
||||
@if ($transaction->status == 1)
|
||||
<span class="badge badge-success">Closed</span>
|
||||
@else
|
||||
<button class="btn btn-sm btn-warning btn-bold" data-action="{{ route('transaction.update', $transaction->transaction_id) }}" data-url="{{ route('transaction.edit', $transaction->transaction_id) }}" onclick="editTransaction({{ $transaction->transaction_id }})" id="editTransaction{{ $transaction->transaction_id }}">Edit</button>
|
||||
<a class="btn btn-danger btn-sm btn-bold" href="{{ route('transaction.destroy', $transaction->transaction_id) }}"
|
||||
onclick="event.preventDefault();
|
||||
document.getElementById('destroy-form').submit();">
|
||||
{{ __('Hapus') }}
|
||||
</a>
|
||||
|
||||
<form id="destroy-form" action="{{ route('transaction.destroy', $transaction->transaction_id) }}" method="POST" class="d-none">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
</form>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> --}}
|
||||
@endforeach
|
||||
<div class="col-12">
|
||||
{{ $transaction_dealers->appends(request()->except('page'))->links("vendor/pagination/bootstrap-4")}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!--begin::Modal-->
|
||||
<div class="modal fade" id="transactionModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<form id="transactionForm" data-form="store" class="kt-form">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="modalHeading"></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
@csrf
|
||||
@method('PUT')
|
||||
<div class="kt-portlet__body">
|
||||
<div class="form-group">
|
||||
<label>SPK</label>
|
||||
<input type="text" class="form-control" id="spk" name="spk" placeholder="SPK" value="" autocomplete="off" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Tanggal</label>
|
||||
<input type="date" class="form-control" id="date" name="date" placeholder="Tanggal" value="" autocomplete="off" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>No. Polisi</label>
|
||||
<input type="text" class="form-control" id="police_number" name="police_number" placeholder="No. Polisi" value="" autocomplete="off" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Pekerjaan</label>
|
||||
<select name="work_id" id="work_id" class="form-control">
|
||||
@foreach ($works as $work)
|
||||
<option value="{{ $work->id }}">{{ $work->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Qty</label>
|
||||
<input type="number" class="form-control" id="qty" name="qty" placeholder="Qty" value="" autocomplete="off" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Warranty</label>
|
||||
<select name="warranty" id="warranty" class="form-control">
|
||||
<option value="1">Ya</option>
|
||||
<option value="0">Tidak</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Service Advisor</label>
|
||||
<select name="sa_id" id="sa_id" class="form-control">
|
||||
@foreach ($sas as $sa)
|
||||
<option value="{{ $sa->id }}">{{ $sa->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Batal</button>
|
||||
<button type="submit" class="btn btn-primary" id="saveBtn" value="create">Simpan</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!--end::Modal-->
|
||||
|
||||
<div id="shareThis" style="display: none;">
|
||||
@php
|
||||
$string = "*[Laporan Harian Mekanik ]*\n";
|
||||
$string .= "*". Auth::user()->dealer->name ."*\n";
|
||||
$string .= "*". $transaction_mechanics['today_date'] ."*\n\n\n";
|
||||
foreach ($transaction_mechanics['data'] as $shortname => $trx) {
|
||||
$string .= $shortname."\n";
|
||||
$total_qty = 0;
|
||||
foreach ($trx['data'] as $item) {
|
||||
$total_qty += explode(':', $item)[1];
|
||||
$string .= $item."\n";
|
||||
}
|
||||
$string .= "*TOTAL".$total_qty."*\n\n";
|
||||
|
||||
$string .= $trx['total_title'];
|
||||
foreach ($trx['total_body'] as $total) {
|
||||
$string .= $total;
|
||||
}
|
||||
|
||||
$string .= $trx['total_total']."\n\n";
|
||||
}
|
||||
@endphp
|
||||
{!! $string !!}
|
||||
</div>
|
||||
|
||||
{{-- <div class="row">
|
||||
<div class="col-lg-5" style="width: 100%; text-align: center;">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3>Transaksi</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="#">
|
||||
<div class="form-group">
|
||||
<label for="#">User</label>
|
||||
<select name="#" id="#" class="form-control">
|
||||
<option value="1" selected>User 1</option>
|
||||
<option value="2">User 2</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="#">SPK</label>
|
||||
<input type="text" class="form-control" placeholder="SPK" name="spk">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="#">No. Polisi</label>
|
||||
<input type="text" class="form-control" placeholder="No. Polisi" name="nopol">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="#">Garansi</label>
|
||||
<input type="text" class="form-control" placeholder="Garansi" name="guarantee">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="#">Kategori Pekerjaan</label>
|
||||
<select name="#" id="#" class="form-control">
|
||||
<option value="1" selected>Cuci</option>
|
||||
<option value="2">Kategori 2</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="#">Pekerjaan</label>
|
||||
<select name="#" id="#" class="form-control">
|
||||
<option value="1" selected>Cuci</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="#">Qty</label>
|
||||
<input type="number" class="form-control" placeholder="Quantity" name="quantity">
|
||||
</div>
|
||||
<button class="btn btn-primary">Simpan Perubahan</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-7">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3></h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> --}}
|
||||
@endsection
|
||||
|
||||
@section('javascripts')
|
||||
<script>
|
||||
$("#kt-table").DataTable()
|
||||
|
||||
const shareData = {
|
||||
title: 'Dealer',
|
||||
text: $("#shareThis").html()
|
||||
}
|
||||
|
||||
const btn = $('#share');
|
||||
const resultPara = $('.result');
|
||||
// Share must be triggered by "user activation"
|
||||
btn.click(async function() {
|
||||
try {
|
||||
await navigator.share(shareData)
|
||||
console.log('Dealer shared successfully')
|
||||
} catch(err) {
|
||||
console.log('Error: ' + err)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
function editTransaction(id) {
|
||||
let form_action = $("#editTransaction"+id).attr("data-action")
|
||||
let edit_url = $("#editTransaction"+id).attr("data-url")
|
||||
$("#transactionModal").modal("show")
|
||||
$("#transactionForm").attr('action', form_action)
|
||||
$.get(edit_url, function(res) {
|
||||
$("#transactionForm select[name='sa_id'] option[value='"+ res.data.user_sa_id +"']").prop('selected', true);
|
||||
$("#transactionForm select[name='work_id'] option[value='"+ res.data.work_id +"']").prop('selected', true);
|
||||
$("#transactionForm select[name='dealer_id'] option[value='"+ res.data.dealer_id +"']").prop('selected', true);
|
||||
$("#transactionForm select[name='warranty'] option[value='"+ res.data.warranty +"']").prop('selected', true);
|
||||
$("#transactionForm input[name='spk']").val(res.data.spk)
|
||||
var d = new Date(res.data.date);
|
||||
var day = ("0" + d.getDate()).slice(-2);
|
||||
var month = ("0" + (d.getMonth() + 1)).slice(-2);
|
||||
|
||||
var date = d.getFullYear()+"-"+(month)+"-"+(day) ;
|
||||
$("#transactionForm input[name='date']").val(date)
|
||||
$("#transactionForm input[name='police_number']").val(res.data.police_number)
|
||||
$("#transactionForm input[name='qty']").val(res.data.qty)
|
||||
})
|
||||
}
|
||||
|
||||
$("#transactionForm").submit(function(e) {
|
||||
e.preventDefault();
|
||||
$.ajax({
|
||||
url: $('#transactionForm').attr("action"),
|
||||
type: 'POST',
|
||||
data: $('#transactionForm').serialize(),
|
||||
success: function(res) {
|
||||
$("#transactionModal").modal("hide")
|
||||
$('#transactionForm').trigger("reset")
|
||||
if(res.status == 200) {
|
||||
Swal.fire(
|
||||
'Ubah Data',
|
||||
'Data berhasil diubah'
|
||||
).then((result) => {
|
||||
document.location.reload()
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
307
resources/views/transaction/lists.blade.php.old
Normal file
307
resources/views/transaction/lists.blade.php.old
Normal file
@@ -0,0 +1,307 @@
|
||||
@extends('layouts.frontapp')
|
||||
|
||||
@section('content')
|
||||
<div class="mobile-container">
|
||||
<div class="container">
|
||||
<div class="kt-portlet" style="background: none; box-shadow: none;margin-bottom: -10px;">
|
||||
<div class="kt-portlet__body">
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<h5 class="mt-4">Laporan Harian</h5>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<h4 class="text-center mt-4">Cipta Kreasi Baru</h4>
|
||||
</div>
|
||||
<div class="col-4 text-right">
|
||||
<a href="{{ route('transaction') }}" class="float-right mt-4">Kembali</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="kt-portlet" style="background: none; box-shadow: none;">
|
||||
<div class="kt-portlet__body">
|
||||
<form action="{{ route('transaction.lists') }}" method="GET">
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<label>Tgl Awal</label>
|
||||
<input type="date" name="date_start" id="date_start" class="form-control">
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<label>Tgl Akhir</label>
|
||||
<input type="date" name="date_end" id="date_end" class="form-control">
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<button type="submit" class="btn btn-success mt-3 btn-block">Cari</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<p><button id="share" type="button" class="btn btn-info btn-block mt-4">Bagikan</button></p>
|
||||
<p class="result"></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped" id="kt-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Tanggal</th>
|
||||
<th>SPK</th>
|
||||
<th>SA</th>
|
||||
<th>No. Polisi</th>
|
||||
<th>Warranty</th>
|
||||
<th>Kategori</th>
|
||||
<th>Pekerjaan</th>
|
||||
<th>Qty</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($transaction_dealers as $transaction)
|
||||
<tr>
|
||||
<td>{{ date('d/m/Y', strtotime($transaction->date)) }}</td>
|
||||
<td>{{ $transaction->spk }}</td>
|
||||
<td>{{ $transaction->sa_name }}</td>
|
||||
<td>{{ $transaction->police_number }}</td>
|
||||
<td>{{ $transaction->warranty == 1 ? 'Ya' : 'Tidak' }}</td>
|
||||
<td>{{ $transaction->category_name }}</td>
|
||||
<td>{{ $transaction->workname }}</td>
|
||||
<td>{{ $transaction->qty }}</td>
|
||||
<td>
|
||||
@if ($transaction->status == 1)
|
||||
<span class="badge badge-success">Closed</span>
|
||||
@else
|
||||
<button class="btn btn-sm btn-warning btn-bold" data-action="{{ route('transaction.update', $transaction->transaction_id) }}" data-url="{{ route('transaction.edit', $transaction->transaction_id) }}" onclick="editTransaction({{ $transaction->transaction_id }})" id="editTransaction{{ $transaction->transaction_id }}">Edit</button>
|
||||
<br><br>
|
||||
<a class="btn btn-danger btn-sm btn-bold" href="{{ route('transaction.destroy', $transaction->transaction_id) }}"
|
||||
onclick="event.preventDefault();
|
||||
document.getElementById('destroy-form').submit();">
|
||||
{{ __('Hapus') }}
|
||||
</a>
|
||||
|
||||
<form id="destroy-form" action="{{ route('transaction.destroy', $transaction->transaction_id) }}" method="POST" class="d-none">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
</form>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!--begin::Modal-->
|
||||
<div class="modal fade" id="transactionModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<form id="transactionForm" data-form="store" class="kt-form">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="modalHeading"></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
@csrf
|
||||
@method('PUT')
|
||||
<div class="kt-portlet__body">
|
||||
<div class="form-group">
|
||||
<label>SPK</label>
|
||||
<input type="text" class="form-control" id="spk" name="spk" placeholder="SPK" value="" autocomplete="off" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Tanggal</label>
|
||||
<input type="date" class="form-control" id="date" name="date" placeholder="Tanggal" value="" autocomplete="off" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>No. Polisi</label>
|
||||
<input type="text" class="form-control" id="police_number" name="police_number" placeholder="No. Polisi" value="" autocomplete="off" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Pekerjaan</label>
|
||||
<select name="work_id" id="work_id" class="form-control">
|
||||
@foreach ($works as $work)
|
||||
<option value="{{ $work->id }}">{{ $work->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Qty</label>
|
||||
<input type="number" class="form-control" id="qty" name="qty" placeholder="Qty" value="" autocomplete="off" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Warranty</label>
|
||||
<select name="warranty" id="warranty" class="form-control">
|
||||
<option value="1">Ya</option>
|
||||
<option value="0">Tidak</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Service Advisor</label>
|
||||
<select name="sa_id" id="sa_id" class="form-control">
|
||||
@foreach ($sas as $sa)
|
||||
<option value="{{ $sa->id }}">{{ $sa->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Batal</button>
|
||||
<button type="submit" class="btn btn-primary" id="saveBtn" value="create">Simpan</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!--end::Modal-->
|
||||
|
||||
<div id="shareThis" style="display: none;">
|
||||
{{ $mechanic->dealer_name }}
|
||||
{{ $mechanic->name }}
|
||||
@foreach ($transaction_mechanics as $date => $trxm)
|
||||
@foreach ($trxm as $item)
|
||||
{{ date('d/m/Y', strtotime($date)) }}/{{ $item['shortname'] }} : {{ $item['qty'] }}
|
||||
@endforeach
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
{{-- <div class="row">
|
||||
<div class="col-lg-5" style="width: 100%; text-align: center;">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3>Transaksi</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="#">
|
||||
<div class="form-group">
|
||||
<label for="#">User</label>
|
||||
<select name="#" id="#" class="form-control">
|
||||
<option value="1" selected>User 1</option>
|
||||
<option value="2">User 2</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="#">SPK</label>
|
||||
<input type="text" class="form-control" placeholder="SPK" name="spk">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="#">No. Polisi</label>
|
||||
<input type="text" class="form-control" placeholder="No. Polisi" name="nopol">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="#">Garansi</label>
|
||||
<input type="text" class="form-control" placeholder="Garansi" name="guarantee">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="#">Kategori Pekerjaan</label>
|
||||
<select name="#" id="#" class="form-control">
|
||||
<option value="1" selected>Cuci</option>
|
||||
<option value="2">Kategori 2</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="#">Pekerjaan</label>
|
||||
<select name="#" id="#" class="form-control">
|
||||
<option value="1" selected>Cuci</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="#">Qty</label>
|
||||
<input type="number" class="form-control" placeholder="Quantity" name="quantity">
|
||||
</div>
|
||||
<button class="btn btn-primary">Simpan Perubahan</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-7">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3></h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> --}}
|
||||
@endsection
|
||||
|
||||
@section('javascripts')
|
||||
<script>
|
||||
|
||||
$("#kt-table").DataTable()
|
||||
|
||||
const shareData = {
|
||||
title: 'Dealer',
|
||||
text: $("#shareThis").html()
|
||||
}
|
||||
|
||||
const btn = $('#share');
|
||||
const resultPara = $('.result');
|
||||
// Share must be triggered by "user activation"
|
||||
btn.click(async function() {
|
||||
try {
|
||||
await navigator.share(shareData)
|
||||
console.log('Dealer shared successfully')
|
||||
} catch(err) {
|
||||
console.log('Error: ' + err)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
function editTransaction(id) {
|
||||
let form_action = $("#editTransaction"+id).attr("data-action")
|
||||
let edit_url = $("#editTransaction"+id).attr("data-url")
|
||||
$("#transactionModal").modal("show")
|
||||
$("#transactionForm").attr('action', form_action)
|
||||
$.get(edit_url, function(res) {
|
||||
$("#transactionForm select[name='sa_id'] option[value='"+ res.data.user_sa_id +"']").prop('selected', true);
|
||||
$("#transactionForm select[name='work_id'] option[value='"+ res.data.work_id +"']").prop('selected', true);
|
||||
$("#transactionForm select[name='dealer_id'] option[value='"+ res.data.dealer_id +"']").prop('selected', true);
|
||||
$("#transactionForm select[name='warranty'] option[value='"+ res.data.warranty +"']").prop('selected', true);
|
||||
$("#transactionForm input[name='spk']").val(res.data.spk)
|
||||
var d = new Date(res.data.date);
|
||||
var day = ("0" + d.getDate()).slice(-2);
|
||||
var month = ("0" + (d.getMonth() + 1)).slice(-2);
|
||||
|
||||
var date = d.getFullYear()+"-"+(month)+"-"+(day) ;
|
||||
$("#transactionForm input[name='date']").val(date)
|
||||
$("#transactionForm input[name='police_number']").val(res.data.police_number)
|
||||
$("#transactionForm input[name='qty']").val(res.data.qty)
|
||||
})
|
||||
}
|
||||
|
||||
$("#transactionForm").submit(function(e) {
|
||||
e.preventDefault();
|
||||
$.ajax({
|
||||
url: $('#transactionForm').attr("action"),
|
||||
type: 'POST',
|
||||
data: $('#transactionForm').serialize(),
|
||||
success: function(res) {
|
||||
$("#transactionModal").modal("hide")
|
||||
$('#transactionForm').trigger("reset")
|
||||
if(res.status == 200) {
|
||||
Swal.fire(
|
||||
'Ubah Data',
|
||||
'Data berhasil diubah'
|
||||
).then((result) => {
|
||||
document.location.reload()
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
372
resources/views/transaction/recap.blade.php
Normal file
372
resources/views/transaction/recap.blade.php
Normal file
@@ -0,0 +1,372 @@
|
||||
@extends('layouts.frontapp')
|
||||
@section('styles')
|
||||
<style>
|
||||
.nav-link-tab {
|
||||
font-weight: bold !important;
|
||||
}
|
||||
|
||||
.nav-link-tab.active {
|
||||
font-weight: normal !important;
|
||||
}
|
||||
|
||||
.dataTables_wrapper .dataTable td, .dataTables_wrapper .dataTable th {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
/* tr th:nth-child(1) {
|
||||
z-index: 99999;
|
||||
} */
|
||||
|
||||
</style>
|
||||
@endsection
|
||||
@section('content')
|
||||
<div class="mobile-container">
|
||||
<div class="container">
|
||||
<div class="row mb-4 mt-4">
|
||||
<div class="col-4 my-auto">
|
||||
<a href="{{ route('transaction') }}" class="mt-4 btn btn-danger"><i class="fa fa-chevron-left"></i> Kembali</a>
|
||||
</div>
|
||||
<div class="col-8">
|
||||
{{-- <h5 class="text-center mt-4">Cipta Kreasi Baru</h5> --}}
|
||||
<a href=""><img src="{{ asset('logo-ckb.png') }}" style="width: 100%" alt="LOGO CKB"></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="kt-portlet kt-portlet--mobile" id="kt_blockui_datatable">
|
||||
<div class="kt-portlet__head">
|
||||
<h5 class="mt-4">Laporan Rekap</h5>
|
||||
</div>
|
||||
<div class="kt-portlet__body">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<form action="{{ route('transaction.recap') }}" method="GET">
|
||||
<div class="row">
|
||||
<div class="col-5">
|
||||
<label>Bulan</label>
|
||||
<select name="month" id="month" class="form-control">
|
||||
<option value="01" @if($month == '01') selected @endif>Januari</option>
|
||||
<option value="02" @if($month == '02') selected @endif>Februari</option>
|
||||
<option value="03" @if($month == '03') selected @endif>Maret</option>
|
||||
<option value="04" @if($month == '04') selected @endif>April</option>
|
||||
<option value="05" @if($month == '05') selected @endif>Mei</option>
|
||||
<option value="06" @if($month == '06') selected @endif>Juni</option>
|
||||
<option value="07" @if($month == '07') selected @endif>Juli</option>
|
||||
<option value="08" @if($month == '08') selected @endif>Agustus</option>
|
||||
<option value="09" @if($month == '09') selected @endif>September</option>
|
||||
<option value="10" @if($month == '10') selected @endif>Oktober</option>
|
||||
<option value="11" @if($month == '11') selected @endif>November</option>
|
||||
<option value="12" @if($month == '12') selected @endif>Desember</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-5 col-12">
|
||||
<label for="year">Tahun</label>
|
||||
<input type="number" class="form-control" name="year" id="year" value="{{ $year }}">
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<br>
|
||||
<button type="submit" class="btn btn-success mt-2 btn-block">Cari</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<p><button id="share" type="button" class="btn btn-info btn-block mt-4">Bagikan Data Bulan Ini</button></p>
|
||||
<p class="result"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="kt-portlet kt-portlet--mobile" id="kt_blockui_datatable">
|
||||
<div class="kt-portlet__head kt-portlet__head--lg">
|
||||
<div class="kt-portlet__head-label">
|
||||
<h3 class="kt-portlet__head-title">
|
||||
Rekap per tanggal {{ $dealer->name }}
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="kt-portlet__body">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="table-responsive">
|
||||
<!--begin: Datatable -->
|
||||
<table class="table" id="kt_table_date">
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan="2" style="width: 18%; z-index: 99;">Tanggal</th>
|
||||
<th colspan="{{ $works_count }}" class="text-center">Pekerjaan</th>
|
||||
</tr>
|
||||
<tr>
|
||||
@foreach ($works as $work)
|
||||
<th>{{ $work->name }}</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if (count($month_trxs))
|
||||
@foreach ($month_trxs as $trx)
|
||||
<tr>
|
||||
<td>{{ $trx['date'] }}</td>
|
||||
@foreach ($trx['works'] as $item)
|
||||
<td>{{ $item['qty'] }}</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<tr>
|
||||
<td colspan="3" class="text-center">Tidak Ada Data</td>
|
||||
</tr>
|
||||
@endif
|
||||
{{-- <tr>
|
||||
<td>Pt B</td>
|
||||
<td>2</td>
|
||||
<td>9</td>
|
||||
<td>9</td>
|
||||
<td><a href="#" class="btn btn-info btn-sm">Detail</a></td>
|
||||
</tr> --}}
|
||||
</tbody>
|
||||
<tfoot style="background: rgba(93, 120, 255, .2) !important;">
|
||||
<tr>
|
||||
<th style="background: rgba(93, 120, 255, .2) !important;">
|
||||
<p>Total Bulan Ini</p><hr>
|
||||
<p>Total Bulan Kemarin</p>
|
||||
</th>
|
||||
@foreach ($totals as $total)
|
||||
<th style="background: rgba(93, 120, 255, .2) !important;">
|
||||
<p>{{ $total['now'] }} @if($total['now'] > $total['prev']) <i class="ml-3 fa fa-caret-up text-success"></i> @else <i class="ml-3 fa fa-caret-down text-danger"></i> @endif</p><hr>
|
||||
<p>{{ $total['prev'] }}</p>
|
||||
</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<!--end: Datatable -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="kt-portlet kt-portlet--mobile" id="kt_blockui_datatable">
|
||||
<div class="kt-portlet__head kt-portlet__head--lg">
|
||||
<div class="kt-portlet__head-label">
|
||||
<h3 class="kt-portlet__head-title">
|
||||
Rekap per SA {{ $dealer->name }}
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="kt-portlet__body">
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link nav-link-tab btn-primary text-light active" data-toggle="tab" href="#kt_tabs_1_2"><i class="flaticon2-pie-chart-4 text-light"></i> Diagram</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link nav-link-tab btn-primary text-light" data-toggle="tab" href="#" data-target="#kt_tabs_1_1"><i class="flaticon-squares-1 text-light"></i> Tabel</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="kt_tabs_1_2" role="tabpanel">
|
||||
<div><canvas id="sa-chart"></canvas></div>
|
||||
</div>
|
||||
<div class="tab-pane" id="kt_tabs_1_1" role="tabpanel">
|
||||
<!--begin: Datatable -->
|
||||
<div class="table-responsive">
|
||||
<table class="table" id="kt_table_dealer">
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan="2" style="z-index: 99;">SA</th>
|
||||
<th colspan="{{ $works_count }}" class="text-center">Pekerjaan</th>
|
||||
</tr>
|
||||
<tr>
|
||||
@foreach ($works as $work)
|
||||
<th>{{ $work->name }}</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if (count($trxs))
|
||||
@foreach ($trxs as $trx)
|
||||
<tr>
|
||||
<td>{{ $trx['sa_name'] }}</td>
|
||||
@foreach ($trx['works'] as $item)
|
||||
<td>{{ $item['qty'] }}</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<tr>
|
||||
<td colspan="3" class="text-center">Tidak Ada Data</td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!--end: Datatable -->
|
||||
{{-- <div class="table-responsive">
|
||||
</div> --}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<textarea id="shareThis" style="display: none;">
|
||||
@php
|
||||
$string = "\n*[Laporan SA ". $dealer->name ." ]*\n";
|
||||
$string .= "*[".$share['today_date']." ]*\n\n";
|
||||
$sum_today_trx = 0;
|
||||
|
||||
foreach ($share['today_trxs'] as $trx) {
|
||||
$string .= $trx->name.":".$trx->qty;
|
||||
$sum_today_trx += $trx->qty;
|
||||
}
|
||||
|
||||
$string .= "\n";
|
||||
$string .= "*TOTAL : ".$sum_today_trx." Unit*\n\n";
|
||||
$string .= "*[PERIODE 1 - ". $share['today_date'] ."]*\n\n";
|
||||
|
||||
$sum_this_month_trx = 0;
|
||||
foreach ($share['this_month_trxs'] as $trx) {
|
||||
$string .= $trx->name ." : ". $trx->qty ." Unit\n";
|
||||
$sum_this_month_trx += $trx->qty;
|
||||
}
|
||||
$string .= "\n\n*TOTAL : ".$sum_this_month_trx." Unit*"
|
||||
@endphp
|
||||
|
||||
{!! $string !!}
|
||||
</textarea>
|
||||
|
||||
@endsection
|
||||
@section('javascripts')
|
||||
<script>
|
||||
const shareData = {
|
||||
title: 'Dealer',
|
||||
text: $("#shareThis").val().replaceAll("\\n", "\n")
|
||||
}
|
||||
|
||||
const btn = $('#share');
|
||||
const resultPara = $('.result');
|
||||
// Share must be triggered by "user activation"
|
||||
btn.click(async function() {
|
||||
console.log($("#shareThis").val())
|
||||
try {
|
||||
await navigator.share(shareData)
|
||||
console.log('Dealer shared successfully')
|
||||
} catch(err) {
|
||||
console.log('Error: ' + err)
|
||||
}
|
||||
})
|
||||
|
||||
$("#kt_table_date").DataTable({
|
||||
paging: false,
|
||||
// scrollY: "true",
|
||||
// scrollX: true,
|
||||
// scrollCollapse: true,
|
||||
fixedColumns: {
|
||||
left: 1
|
||||
}
|
||||
})
|
||||
|
||||
$("#kt_table_dealer").DataTable({
|
||||
paging: false,
|
||||
// scrollY: "300px",
|
||||
// scrollX: true,
|
||||
// scrollCollapse: true,
|
||||
fixedColumns: {
|
||||
left: 1
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
function random_rgba(alpha) {
|
||||
var o = Math.round, r = Math.random, s = 255;
|
||||
return 'rgba(' + o(r()*s) + ',' + o(r()*s) + ',' + o(r()*s) + ','+ alpha +')';
|
||||
}
|
||||
|
||||
let labels = JSON.parse('{{ $sa_names }}'.replace(/("\;)/g,"\""));
|
||||
let labels2 = []
|
||||
labels.forEach(function(label) {
|
||||
if (/\s/.test(label)) {
|
||||
labels2.push(label.split(" "))
|
||||
}else{
|
||||
labels2.push(label)
|
||||
}
|
||||
})
|
||||
|
||||
const trx_data = JSON.parse('{{ $trx_data }}'.replace(/("\;)/g,"\""));
|
||||
let trxs = []
|
||||
trx_data.forEach(trx => {
|
||||
let data = {
|
||||
label : trx['work_name'],
|
||||
data: trx[['qty']],
|
||||
fill: false,
|
||||
backgroundColor: random_rgba(0.2),
|
||||
borderColor: random_rgba(1),
|
||||
borderWidth: 1
|
||||
}
|
||||
|
||||
trxs.push(data)
|
||||
});
|
||||
|
||||
const data = {
|
||||
labels: labels2,
|
||||
datasets: trxs
|
||||
};
|
||||
|
||||
if(labels2.length && trxs.length) {
|
||||
new Chart($("#sa-chart"), {
|
||||
type: 'bar',
|
||||
data: data,
|
||||
plugins: [ChartDataLabels],
|
||||
options: {
|
||||
indexAxis: 'y',
|
||||
maintainAspectRatio: false,
|
||||
scales: {
|
||||
x: {
|
||||
position: 'top',
|
||||
}
|
||||
},
|
||||
plugins: {
|
||||
legend: {
|
||||
display: true,
|
||||
labels: {
|
||||
color: 'rgb(255, 99, 132)'
|
||||
},
|
||||
position: 'top'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
$("#sa-chart").parent().height($("#sa-chart").parent().height() + 500)
|
||||
}else{
|
||||
$("#sa-chart").parent().append(`
|
||||
<div class="alert" role="alert">
|
||||
<div class="alert-text">
|
||||
<h4 class="alert-heading">Data Kosong!</h4>
|
||||
<p>Belum ada data pekerjaan masuk</p>
|
||||
<hr>
|
||||
</div>
|
||||
</div>
|
||||
`)
|
||||
$("#sa-chart").parent().css('height', '100%')
|
||||
$("#sa-chart").remove()
|
||||
}
|
||||
|
||||
$(".nav-link-tab.active").removeClass('btn-primary')
|
||||
$(".nav-link-tab.active").removeClass('text-light')
|
||||
$(".nav-link-tab.active i").toggleClass('text-light')
|
||||
$(".nav-link-tab").parent().click(function() {
|
||||
$(".nav-link-tab").toggleClass('btn-primary')
|
||||
$(".nav-link-tab").toggleClass('text-light')
|
||||
$(".nav-link-tab i").toggleClass('text-light')
|
||||
})
|
||||
</script>
|
||||
@endsection
|
||||
168
resources/views/transaction/recap_old.blade.php
Normal file
168
resources/views/transaction/recap_old.blade.php
Normal file
@@ -0,0 +1,168 @@
|
||||
@extends('layouts.frontapp')
|
||||
|
||||
@section('content')
|
||||
<div class="mobile-container">
|
||||
<div class="container">
|
||||
<div class="kt-portlet" style="background: none; box-shadow: none;margin-bottom: -10px;">
|
||||
<div class="kt-portlet__body">
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<h5 class="text-left mt-4">Laporan Rekap</h5>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<h4 class="text-center mt-4">Cipta Kreasi Baru</h4>
|
||||
</div>
|
||||
<div class="col-4 text-right">
|
||||
<a href="{{ route('transaction') }}" class="float-right mt-4">Kembali</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="kt-portlet kt-portlet--mobile" id="kt_blockui_datatable">
|
||||
<div class="kt-portlet__head kt-portlet__head--lg">
|
||||
<div class="kt-portlet__head-label">
|
||||
<h3 class="kt-portlet__head-title">
|
||||
Rekap per tanggal {{ $dealer->name }}
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="kt-portlet__body">
|
||||
<form action="{{ route('transaction.recap') }}" method="GET">
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<label>Tgl Awal</label>
|
||||
<input type="date" name="date_start" id="date_start" class="form-control">
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<label>Tgl Akhir</label>
|
||||
<input type="date" name="date_end" id="date_end" class="form-control">
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<button type="submit" class="btn btn-success mt-3 btn-block">Cari</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<p><button id="share" type="button" class="btn btn-info btn-block mt-4">Bagikan</button></p>
|
||||
<p class="result"></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="table-responsive">
|
||||
<!--begin: Datatable -->
|
||||
<table class="table table-striped table-bordered table-hover table-checkable" id="kt_table_date">
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan="2">Tanggal</th>
|
||||
<th colspan="{{ $works_count }}" class="text-center">Pekerjaan</th>
|
||||
</tr>
|
||||
<tr>
|
||||
@foreach ($works as $work)
|
||||
<th>{{ $work->name }}</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($trxs as $date => $trx)
|
||||
<tr>
|
||||
<td>{{ date('d/m/Y', strtotime($date)) }}</td>
|
||||
@foreach ($trx['works'] as $item)
|
||||
<td>{{ $item['qty'] }}</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
@endforeach
|
||||
{{-- <tr>
|
||||
<td>Pt B</td>
|
||||
<td>2</td>
|
||||
<td>9</td>
|
||||
<td>9</td>
|
||||
<td><a href="#" class="btn btn-info btn-sm">Detail</a></td>
|
||||
</tr> --}}
|
||||
</tbody>
|
||||
</table>
|
||||
<!--end: Datatable -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="kt-portlet kt-portlet--mobile" id="kt_blockui_datatable">
|
||||
<div class="kt-portlet__head kt-portlet__head--lg">
|
||||
<div class="kt-portlet__head-label">
|
||||
<h3 class="kt-portlet__head-title">
|
||||
Rekap per SA {{ $dealer->name }}
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="kt-portlet__body">
|
||||
<div class="table-responsive">
|
||||
<!--begin: Datatable -->
|
||||
<table class="table table-striped table-bordered table-hover table-checkable" id="kt_table_dealer">
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan="2">SA</th>
|
||||
<th colspan="{{ $works_count }}" class="text-center">Pekerjaan</th>
|
||||
</tr>
|
||||
<tr>
|
||||
@foreach ($works as $work)
|
||||
<th>{{ $work->name }}</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($dealer_trxs as $sa => $trx)
|
||||
<tr>
|
||||
<td>{{ $sa }}</td>
|
||||
@foreach ($trx['works'] as $item)
|
||||
<td>{{ $item['qty'] }}</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<!--end: Datatable -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="shareThis" style="display: none;">
|
||||
{{ $mechanic->dealer_name }}
|
||||
{{ $mechanic->name }}
|
||||
@foreach ($sharedw as $date => $trxm)
|
||||
@foreach ($trxm as $item)
|
||||
{{ date('d/m/Y', strtotime($date)) }}/{{ $item['shortname'] }} : {{ $item['qty'] }}
|
||||
@endforeach
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
@section('javascripts')
|
||||
<script>
|
||||
const shareData = {
|
||||
title: 'Dealer',
|
||||
text: $("#shareThis").html()
|
||||
}
|
||||
|
||||
const btn = $('#share');
|
||||
const resultPara = $('.result');
|
||||
// Share must be triggered by "user activation"
|
||||
btn.click(async function() {
|
||||
try {
|
||||
await navigator.share(shareData)
|
||||
console.log('Dealer shared successfully')
|
||||
} catch(err) {
|
||||
console.log('Error: ' + err)
|
||||
}
|
||||
})
|
||||
|
||||
$("#kt_table_date").DataTable()
|
||||
$("#kt_table_dealer").DataTable()
|
||||
</script>
|
||||
@endsection
|
||||
46
resources/views/vendor/pagination/bootstrap-4.blade.php
vendored
Normal file
46
resources/views/vendor/pagination/bootstrap-4.blade.php
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
@if ($paginator->hasPages())
|
||||
<nav>
|
||||
<ul class="pagination">
|
||||
{{-- Previous Page Link --}}
|
||||
@if ($paginator->onFirstPage())
|
||||
<li class="page-item disabled" aria-disabled="true" aria-label="@lang('pagination.previous')">
|
||||
<span class="page-link" aria-hidden="true"><i class="fa fa-chevron-left" style="font-size: 12px;"></i></span>
|
||||
</li>
|
||||
@else
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="{{ $paginator->previousPageUrl() }}" rel="prev" aria-label="@lang('pagination.previous')"><i class="fa fa-chevron-left" style="font-size: 12px;"></i> Prev</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
{{-- Pagination Elements --}}
|
||||
@foreach ($elements as $element)
|
||||
{{-- "Three Dots" Separator --}}
|
||||
@if (is_string($element))
|
||||
<li class="page-item disabled" aria-disabled="true"><span class="page-link">{{ $element }}</span></li>
|
||||
@endif
|
||||
|
||||
{{-- Array Of Links --}}
|
||||
@if (is_array($element))
|
||||
@foreach ($element as $page => $url)
|
||||
@if ($page == $paginator->currentPage())
|
||||
<li class="page-item active" aria-current="page"><span class="page-link">{{ $page }}</span></li>
|
||||
@else
|
||||
<li class="page-item"><a class="page-link" href="{{ $url }}">{{ $page }}</a></li>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
{{-- Next Page Link --}}
|
||||
@if ($paginator->hasMorePages())
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="{{ $paginator->nextPageUrl() }}" rel="next" aria-label="@lang('pagination.next')">Next <i class="fa fa-chevron-right" style="font-size: 10px"></i></a>
|
||||
</li>
|
||||
@else
|
||||
<li class="page-item disabled" aria-disabled="true" aria-label="@lang('pagination.next')">
|
||||
<span class="page-link" aria-hidden="true"><i class="fa fa-chevron-right" style="font-size: 10px"></i></span>
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
</nav>
|
||||
@endif
|
||||
46
resources/views/vendor/pagination/default.blade.php
vendored
Normal file
46
resources/views/vendor/pagination/default.blade.php
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
@if ($paginator->hasPages())
|
||||
<nav>
|
||||
<ul class="pagination">
|
||||
{{-- Previous Page Link --}}
|
||||
@if ($paginator->onFirstPage())
|
||||
<li class="disabled" aria-disabled="true" aria-label="@lang('pagination.previous')">
|
||||
<span aria-hidden="true">‹</span>
|
||||
</li>
|
||||
@else
|
||||
<li>
|
||||
<a href="{{ $paginator->previousPageUrl() }}" rel="prev" aria-label="@lang('pagination.previous')">‹</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
{{-- Pagination Elements --}}
|
||||
@foreach ($elements as $element)
|
||||
{{-- "Three Dots" Separator --}}
|
||||
@if (is_string($element))
|
||||
<li class="disabled" aria-disabled="true"><span>{{ $element }}</span></li>
|
||||
@endif
|
||||
|
||||
{{-- Array Of Links --}}
|
||||
@if (is_array($element))
|
||||
@foreach ($element as $page => $url)
|
||||
@if ($page == $paginator->currentPage())
|
||||
<li class="active" aria-current="page"><span>{{ $page }}</span></li>
|
||||
@else
|
||||
<li><a href="{{ $url }}">{{ $page }}</a></li>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
{{-- Next Page Link --}}
|
||||
@if ($paginator->hasMorePages())
|
||||
<li>
|
||||
<a href="{{ $paginator->nextPageUrl() }}" rel="next" aria-label="@lang('pagination.next')">›</a>
|
||||
</li>
|
||||
@else
|
||||
<li class="disabled" aria-disabled="true" aria-label="@lang('pagination.next')">
|
||||
<span aria-hidden="true">›</span>
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
</nav>
|
||||
@endif
|
||||
36
resources/views/vendor/pagination/semantic-ui.blade.php
vendored
Normal file
36
resources/views/vendor/pagination/semantic-ui.blade.php
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
@if ($paginator->hasPages())
|
||||
<div class="ui pagination menu" role="navigation">
|
||||
{{-- Previous Page Link --}}
|
||||
@if ($paginator->onFirstPage())
|
||||
<a class="icon item disabled" aria-disabled="true" aria-label="@lang('pagination.previous')"> <i class="left chevron icon"></i> </a>
|
||||
@else
|
||||
<a class="icon item" href="{{ $paginator->previousPageUrl() }}" rel="prev" aria-label="@lang('pagination.previous')"> <i class="left chevron icon"></i> </a>
|
||||
@endif
|
||||
|
||||
{{-- Pagination Elements --}}
|
||||
@foreach ($elements as $element)
|
||||
{{-- "Three Dots" Separator --}}
|
||||
@if (is_string($element))
|
||||
<a class="icon item disabled" aria-disabled="true">{{ $element }}</a>
|
||||
@endif
|
||||
|
||||
{{-- Array Of Links --}}
|
||||
@if (is_array($element))
|
||||
@foreach ($element as $page => $url)
|
||||
@if ($page == $paginator->currentPage())
|
||||
<a class="item active" href="{{ $url }}" aria-current="page">{{ $page }}</a>
|
||||
@else
|
||||
<a class="item" href="{{ $url }}">{{ $page }}</a>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
{{-- Next Page Link --}}
|
||||
@if ($paginator->hasMorePages())
|
||||
<a class="icon item" href="{{ $paginator->nextPageUrl() }}" rel="next" aria-label="@lang('pagination.next')"> <i class="right chevron icon"></i> </a>
|
||||
@else
|
||||
<a class="icon item disabled" aria-disabled="true" aria-label="@lang('pagination.next')"> <i class="right chevron icon"></i> </a>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
27
resources/views/vendor/pagination/simple-bootstrap-4.blade.php
vendored
Normal file
27
resources/views/vendor/pagination/simple-bootstrap-4.blade.php
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
@if ($paginator->hasPages())
|
||||
<nav>
|
||||
<ul class="pagination">
|
||||
{{-- Previous Page Link --}}
|
||||
@if ($paginator->onFirstPage())
|
||||
<li class="page-item disabled" aria-disabled="true">
|
||||
<span class="page-link">@lang('pagination.previous')</span>
|
||||
</li>
|
||||
@else
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="{{ $paginator->previousPageUrl() }}" rel="prev">@lang('pagination.previous')</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
{{-- Next Page Link --}}
|
||||
@if ($paginator->hasMorePages())
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="{{ $paginator->nextPageUrl() }}" rel="next">@lang('pagination.next')</a>
|
||||
</li>
|
||||
@else
|
||||
<li class="page-item disabled" aria-disabled="true">
|
||||
<span class="page-link">@lang('pagination.next')</span>
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
</nav>
|
||||
@endif
|
||||
19
resources/views/vendor/pagination/simple-default.blade.php
vendored
Normal file
19
resources/views/vendor/pagination/simple-default.blade.php
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
@if ($paginator->hasPages())
|
||||
<nav>
|
||||
<ul class="pagination">
|
||||
{{-- Previous Page Link --}}
|
||||
@if ($paginator->onFirstPage())
|
||||
<li class="disabled" aria-disabled="true"><span>@lang('pagination.previous')</span></li>
|
||||
@else
|
||||
<li><a href="{{ $paginator->previousPageUrl() }}" rel="prev">@lang('pagination.previous')</a></li>
|
||||
@endif
|
||||
|
||||
{{-- Next Page Link --}}
|
||||
@if ($paginator->hasMorePages())
|
||||
<li><a href="{{ $paginator->nextPageUrl() }}" rel="next">@lang('pagination.next')</a></li>
|
||||
@else
|
||||
<li class="disabled" aria-disabled="true"><span>@lang('pagination.next')</span></li>
|
||||
@endif
|
||||
</ul>
|
||||
</nav>
|
||||
@endif
|
||||
25
resources/views/vendor/pagination/simple-tailwind.blade.php
vendored
Normal file
25
resources/views/vendor/pagination/simple-tailwind.blade.php
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
@if ($paginator->hasPages())
|
||||
<nav role="navigation" aria-label="Pagination Navigation" class="flex justify-between">
|
||||
{{-- Previous Page Link --}}
|
||||
@if ($paginator->onFirstPage())
|
||||
<span class="relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5 rounded-md">
|
||||
{!! __('pagination.previous') !!}
|
||||
</span>
|
||||
@else
|
||||
<a href="{{ $paginator->previousPageUrl() }}" rel="prev" class="relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 leading-5 rounded-md hover:text-gray-500 focus:outline-none focus:ring ring-gray-300 focus:border-blue-300 active:bg-gray-100 active:text-gray-700 transition ease-in-out duration-150">
|
||||
{!! __('pagination.previous') !!}
|
||||
</a>
|
||||
@endif
|
||||
|
||||
{{-- Next Page Link --}}
|
||||
@if ($paginator->hasMorePages())
|
||||
<a href="{{ $paginator->nextPageUrl() }}" rel="next" class="relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 leading-5 rounded-md hover:text-gray-500 focus:outline-none focus:ring ring-gray-300 focus:border-blue-300 active:bg-gray-100 active:text-gray-700 transition ease-in-out duration-150">
|
||||
{!! __('pagination.next') !!}
|
||||
</a>
|
||||
@else
|
||||
<span class="relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5 rounded-md">
|
||||
{!! __('pagination.next') !!}
|
||||
</span>
|
||||
@endif
|
||||
</nav>
|
||||
@endif
|
||||
106
resources/views/vendor/pagination/tailwind.blade.php
vendored
Normal file
106
resources/views/vendor/pagination/tailwind.blade.php
vendored
Normal file
@@ -0,0 +1,106 @@
|
||||
@if ($paginator->hasPages())
|
||||
<nav role="navigation" aria-label="{{ __('Pagination Navigation') }}" class="flex items-center justify-between">
|
||||
<div class="flex justify-between flex-1 sm:hidden">
|
||||
@if ($paginator->onFirstPage())
|
||||
<span class="relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5 rounded-md">
|
||||
{!! __('pagination.previous') !!}
|
||||
</span>
|
||||
@else
|
||||
<a href="{{ $paginator->previousPageUrl() }}" class="relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 leading-5 rounded-md hover:text-gray-500 focus:outline-none focus:ring ring-gray-300 focus:border-blue-300 active:bg-gray-100 active:text-gray-700 transition ease-in-out duration-150">
|
||||
{!! __('pagination.previous') !!}
|
||||
</a>
|
||||
@endif
|
||||
|
||||
@if ($paginator->hasMorePages())
|
||||
<a href="{{ $paginator->nextPageUrl() }}" class="relative inline-flex items-center px-4 py-2 ml-3 text-sm font-medium text-gray-700 bg-white border border-gray-300 leading-5 rounded-md hover:text-gray-500 focus:outline-none focus:ring ring-gray-300 focus:border-blue-300 active:bg-gray-100 active:text-gray-700 transition ease-in-out duration-150">
|
||||
{!! __('pagination.next') !!}
|
||||
</a>
|
||||
@else
|
||||
<span class="relative inline-flex items-center px-4 py-2 ml-3 text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5 rounded-md">
|
||||
{!! __('pagination.next') !!}
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="hidden sm:flex-1 sm:flex sm:items-center sm:justify-between">
|
||||
<div>
|
||||
<p class="text-sm text-gray-700 leading-5">
|
||||
{!! __('Showing') !!}
|
||||
@if ($paginator->firstItem())
|
||||
<span class="font-medium">{{ $paginator->firstItem() }}</span>
|
||||
{!! __('to') !!}
|
||||
<span class="font-medium">{{ $paginator->lastItem() }}</span>
|
||||
@else
|
||||
{{ $paginator->count() }}
|
||||
@endif
|
||||
{!! __('of') !!}
|
||||
<span class="font-medium">{{ $paginator->total() }}</span>
|
||||
{!! __('results') !!}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span class="relative z-0 inline-flex shadow-sm rounded-md">
|
||||
{{-- Previous Page Link --}}
|
||||
@if ($paginator->onFirstPage())
|
||||
<span aria-disabled="true" aria-label="{{ __('pagination.previous') }}">
|
||||
<span class="relative inline-flex items-center px-2 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default rounded-l-md leading-5" aria-hidden="true">
|
||||
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
|
||||
<path fill-rule="evenodd" d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z" clip-rule="evenodd" />
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
@else
|
||||
<a href="{{ $paginator->previousPageUrl() }}" rel="prev" class="relative inline-flex items-center px-2 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 rounded-l-md leading-5 hover:text-gray-400 focus:z-10 focus:outline-none focus:ring ring-gray-300 focus:border-blue-300 active:bg-gray-100 active:text-gray-500 transition ease-in-out duration-150" aria-label="{{ __('pagination.previous') }}">
|
||||
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
|
||||
<path fill-rule="evenodd" d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z" clip-rule="evenodd" />
|
||||
</svg>
|
||||
</a>
|
||||
@endif
|
||||
|
||||
{{-- Pagination Elements --}}
|
||||
@foreach ($elements as $element)
|
||||
{{-- "Three Dots" Separator --}}
|
||||
@if (is_string($element))
|
||||
<span aria-disabled="true">
|
||||
<span class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-700 bg-white border border-gray-300 cursor-default leading-5">{{ $element }}</span>
|
||||
</span>
|
||||
@endif
|
||||
|
||||
{{-- Array Of Links --}}
|
||||
@if (is_array($element))
|
||||
@foreach ($element as $page => $url)
|
||||
@if ($page == $paginator->currentPage())
|
||||
<span aria-current="page">
|
||||
<span class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5">{{ $page }}</span>
|
||||
</span>
|
||||
@else
|
||||
<a href="{{ $url }}" class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-700 bg-white border border-gray-300 leading-5 hover:text-gray-500 focus:z-10 focus:outline-none focus:ring ring-gray-300 focus:border-blue-300 active:bg-gray-100 active:text-gray-700 transition ease-in-out duration-150" aria-label="{{ __('Go to page :page', ['page' => $page]) }}">
|
||||
{{ $page }}
|
||||
</a>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
{{-- Next Page Link --}}
|
||||
@if ($paginator->hasMorePages())
|
||||
<a href="{{ $paginator->nextPageUrl() }}" rel="next" class="relative inline-flex items-center px-2 py-2 -ml-px text-sm font-medium text-gray-500 bg-white border border-gray-300 rounded-r-md leading-5 hover:text-gray-400 focus:z-10 focus:outline-none focus:ring ring-gray-300 focus:border-blue-300 active:bg-gray-100 active:text-gray-500 transition ease-in-out duration-150" aria-label="{{ __('pagination.next') }}">
|
||||
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
|
||||
<path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd" />
|
||||
</svg>
|
||||
</a>
|
||||
@else
|
||||
<span aria-disabled="true" aria-label="{{ __('pagination.next') }}">
|
||||
<span class="relative inline-flex items-center px-2 py-2 -ml-px text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default rounded-r-md leading-5" aria-hidden="true">
|
||||
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
|
||||
<path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd" />
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
@endif
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@endif
|
||||
119
resources/views/welcome.blade.php
Normal file
119
resources/views/welcome.blade.php
Normal file
@@ -0,0 +1,119 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<!-- begin::Head -->
|
||||
|
||||
<head>
|
||||
<!--begin::Base Path (base relative path for assets of this page) -->
|
||||
<base href="../../../../">
|
||||
<!--end::Base Path -->
|
||||
<meta charset="utf-8" />
|
||||
|
||||
<title>POS | Login</title>
|
||||
<meta name="description" content="Login page example">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="base-url" content="{{ url('/') }}">
|
||||
|
||||
<!--begin::Fonts -->
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700|Roboto:300,400,500,600,700">
|
||||
<!--end::Fonts -->
|
||||
|
||||
<!--begin::Page Custom Styles(used by this page) -->
|
||||
<link href="{{ url('assets/css/demo1/pages/login/login-3.css') }}" rel="stylesheet" type="text/css" />
|
||||
<!--end::Page Custom Styles -->
|
||||
|
||||
<!--begin::Global Theme Styles(used by all pages) -->
|
||||
<link href="{{ url('assets/css/app.bundle.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
<!--end::Global Theme Styles -->
|
||||
|
||||
<link rel="shortcut icon" href="{{ url('assets/media/logos/bengkel.ico') }}" />
|
||||
</head>
|
||||
<!-- end::Head -->
|
||||
|
||||
<!-- begin::Body -->
|
||||
|
||||
<body class="kt-quick-panel--right kt-demo-panel--right kt-offcanvas-panel--right kt-header--fixed kt-header-mobile--fixed kt-subheader--enabled kt-subheader--fixed kt-subheader--solid kt-aside--enabled kt-aside--fixed kt-page--loading">
|
||||
|
||||
|
||||
<!-- begin:: Page -->
|
||||
<div class="kt-grid kt-grid--ver kt-grid--root">
|
||||
<div class="kt-grid kt-grid--hor kt-grid--root kt-login kt-login--v3 kt-login--signin" id="kt_login">
|
||||
<div class="kt-grid__item kt-grid__item--fluid kt-grid kt-grid--hor" style="background-image: url('{{ url('assets/media/bg/bg-3.jpg') }}');">
|
||||
<div class="kt-grid__item kt-grid__item--fluid kt-login__wrapper">
|
||||
<div class="kt-login__container">
|
||||
<div class="kt-login__logo kt-margin-b-0">
|
||||
<a href="#">
|
||||
<img src="{{ url('assets/media/logos/bengkel-logo.png') }}" width="128">
|
||||
</a>
|
||||
</div>
|
||||
<div class="kt-login__signin">
|
||||
<div class="kt-login__head">
|
||||
<h3 class="kt-login__title">Sign In</h3>
|
||||
</div>
|
||||
<form method="POST" class="kt-form" action="" novalidate="novalidate" id="kt_login_form">
|
||||
@csrf
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" placeholder="Username" name="username" autocomplete="off">
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="password" placeholder="Password" name="password">
|
||||
</div>
|
||||
<div class="row kt-login__extra">
|
||||
<div class="col kt-align-right">
|
||||
@if (Route::has('password.request'))
|
||||
<a href="{{ route('password.request') }}" id="kt_login_forgot" class="kt-login__link">
|
||||
{{ __('Forgot your password?') }}
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="kt-login__actions">
|
||||
<button id="kt_login_signin_submit" class="btn btn-brand btn-elevate kt-login__btn-primary">{{ __('Login') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="kt-login__account">
|
||||
<a href="" class="kt-login__account-link">Sign In To Admin</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- end:: Page -->
|
||||
|
||||
|
||||
<!-- begin::Global Config(global config for global JS sciprts) -->
|
||||
<script>
|
||||
var KTAppOptions = {
|
||||
"colors": {
|
||||
"state": {
|
||||
"brand": "#5d78ff",
|
||||
"dark": "#282a3c",
|
||||
"light": "#ffffff",
|
||||
"primary": "#5867dd",
|
||||
"success": "#34bfa3",
|
||||
"info": "#36a3f7",
|
||||
"warning": "#ffb822",
|
||||
"danger": "#fd3995"
|
||||
},
|
||||
"base": {
|
||||
"label": ["#c5cbe3", "#a1a8c3", "#3d4465", "#3e4466"],
|
||||
"shape": ["#f0f3ff", "#d9dffa", "#afb4d4", "#646c9a"]
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<!-- end::Global Config -->
|
||||
|
||||
<!--begin::Global Theme Bundle(used by all pages) -->
|
||||
<script src="{{ url('assets/js/app.bundle.min.js') }}" type="text/javascript"></script>
|
||||
<!--end::Global Theme Bundle -->
|
||||
|
||||
<!--begin::Page Scripts(used by this page) -->
|
||||
<script src="{{ url('assets/js/demo1/pages/login/login-general.js') }}" type="text/javascript"></script>
|
||||
<!--end::Page Scripts -->
|
||||
</body>
|
||||
<!-- end::Body -->
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user