Skip to content

Commit

Permalink
- Composer update
Browse files Browse the repository at this point in the history
- Composer install yajra/laravel-datatables-fractal and yajra/laravel-datatables-oracle
- Remove unnecessary stisla asset
- Change login bg image
- Create datatables view component
  • Loading branch information
ianriizky committed Jan 28, 2022
1 parent 3e78ef5 commit cf42e0b
Show file tree
Hide file tree
Showing 34 changed files with 406 additions and 122 deletions.
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
"guzzlehttp/guzzle": "^7.0.1",
"laravel/framework": "^8.65",
"laravel/sanctum": "^2.11",
"laravel/tinker": "^2.5"
"laravel/tinker": "^2.5",
"yajra/laravel-datatables-fractal": "^1.6",
"yajra/laravel-datatables-oracle": "~9.0"
},
"require-dev": {
"facade/ignition": "^2.5",
Expand Down
455 changes: 335 additions & 120 deletions composer.lock

Large diffs are not rendered by default.

Binary file removed public/img/stisla/avatar/avatar-1.png
Binary file not shown.
Binary file removed public/img/stisla/avatar/avatar-2.png
Binary file not shown.
Binary file removed public/img/stisla/avatar/avatar-3.png
Binary file not shown.
Binary file removed public/img/stisla/avatar/avatar-4.png
Binary file not shown.
Binary file removed public/img/stisla/avatar/avatar-5.png
Binary file not shown.
Binary file removed public/img/stisla/products/product-1-50.png
Binary file not shown.
Binary file removed public/img/stisla/products/product-1.jpg
Binary file not shown.
Binary file removed public/img/stisla/products/product-2-50.png
Binary file not shown.
Binary file removed public/img/stisla/products/product-2.jpg
Binary file not shown.
Binary file removed public/img/stisla/products/product-3-50.png
Binary file not shown.
Binary file removed public/img/stisla/products/product-3.jpg
Binary file not shown.
Binary file removed public/img/stisla/products/product-4-50.png
Binary file not shown.
Binary file removed public/img/stisla/products/product-4.jpg
Binary file not shown.
Binary file removed public/img/stisla/products/product-5-50.png
Binary file not shown.
Binary file removed public/img/stisla/products/product-5.jpg
Binary file not shown.
1 change: 0 additions & 1 deletion public/img/stisla/stisla-fill.svg

This file was deleted.

Binary file modified public/img/unsplash/login-bg.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<i class="fa fa-chevron-left"></i> <span>{{ __('Go back') }}</span>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<i class="fa fa-trash"></i> <span>{{ __('Delete') }}</span>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<i class="fa fa-info-circle"></i> <span>{{ __('Details') }}</span>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<i class="fa fa-edit"></i> <span>{{ __('Edit') }}</span>
5 changes: 5 additions & 0 deletions resources/views/components/datatables/button-group.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div class="btn-group">
@foreach ($elements as $element)
{!! $element !!}
@endforeach
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<button type="button" class="btn btn-icon btn-success btn-sm" title="row detail control" @isset($url) data-url="{{ $url }}" @endisset>
<i class="fa fa-plus-circle" id="icon-show"></i>
<i class="fa fa-minus-circle d-none" id="icon-hide"></i>
</button>
7 changes: 7 additions & 0 deletions resources/views/components/datatables/checkbox-all.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<div class="text-center">
<div class="custom-checkbox custom-control">
<input type="checkbox" id="checkbox-all" class="custom-control-input" data-checkboxes="mygroup" data-checkbox-role="dad">

<label for="checkbox-all" class="custom-control-label">&nbsp;</label>
</div>
</div>
10 changes: 10 additions & 0 deletions resources/views/components/datatables/checkbox-delete.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<button type="submit"
id="checkbox-delete-all"
class="btn btn-danger"
formaction="{{ $url }}"
name="_method"
value="DELETE"
onclick="return confirm('{{ __('Are you sure you want to delete this data?') }}')"
disabled>
<i class="fa fa-trash-alt"></i> <span>{{ __('Delete Selected') }}</span>
</button>
5 changes: 5 additions & 0 deletions resources/views/components/datatables/checkbox.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div class="custom-checkbox custom-control text-center">
<input type="checkbox" name="{{ ($name ?? 'checkbox[]') }}" id="{{ ($id ?? 'checkbox_' . $value) }}" value="{{ $value }}" data-checkboxes="mygroup" class="custom-control-input checkbox-selected">

<label for="{{ ($id ?? 'checkbox_' . $value) }}" class="custom-control-label">&nbsp;</label>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
const datatable_language_url = '{{ asset(sprintf('node_modules/datatables.net-plugins/i18n/%s.json', App::getLocale())) }}';
7 changes: 7 additions & 0 deletions resources/views/components/datatables/link-back.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{!!
view('components.datatables.link', [
'url' => $url,
'name' => view('components.datatables.button-back'),
'class' => 'btn btn-secondary',
])->render()
!!}
8 changes: 8 additions & 0 deletions resources/views/components/datatables/link-destroy.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<a href="{{ $url }}" class="btn btn-danger" onclick="event.preventDefault(); if (confirm('{{ __('Are you sure you want to delete this data?') }}')) this.querySelector('form').submit();">
@include('components.datatables.button-delete')

<form action="{{ $url }}" method="post">
@csrf
@method('DELETE')
</form>
</a>
7 changes: 7 additions & 0 deletions resources/views/components/datatables/link-edit.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{!!
view('components.datatables.link', [
'url' => $url,
'name' => view('components.datatables.button-edit'),
'class' => 'btn btn-warning',
])->render()
!!}
7 changes: 7 additions & 0 deletions resources/views/components/datatables/link-show.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{!!
view('components.datatables.link', [
'url' => $url,
'name' => view('components.datatables.button-detail'),
'class' => 'btn btn-info',
])->render()
!!}
3 changes: 3 additions & 0 deletions resources/views/components/datatables/link.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@php $is_new_tab ??= false @endphp

<a href="{{ $url }}" @isset($class) class="{{ $class }}" @endisset @if ($is_new_tab) target="_blank" @endif>{!! $name !!}</a>

0 comments on commit cf42e0b

Please sign in to comment.