Skip to content

Commit

Permalink
susulan prettier blade (#873)
Browse files Browse the repository at this point in the history
  • Loading branch information
totoprayogo1916 authored Sep 25, 2023
1 parent b530c7e commit 1ac428f
Show file tree
Hide file tree
Showing 11 changed files with 173 additions and 170 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/blade-prettier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,27 @@ name: Blade Prettier
on:
pull_request:
branches:
- dev
- master
- 'dev'
- 'master'
- 'bug-fix'
paths:
- '.github/workflows/blade-prettier.yml'
- 'resources/views/**'
- 'package.json'
- 'package-lock.json'

jobs:
prettier:
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
# Check if contains [ci skip] will be skip github action
permissions:
# Allow ad-m/github-push-action to push commit to branch gh-pages
contents: write
if: (github.repository == 'OpenSID/OpenDK')
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: Install dependency
run: npm install

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"scripts": {
"prettier-blade": "prettier --write resources/**/*.blade.php"
"prettier-blade": "prettier resources/views/{**,**/**,**/**/**}.blade.php --write"
},
"devDependencies": {
"@shufo/prettier-plugin-blade": "^1.11.1",
Expand Down
3 changes: 1 addition & 2 deletions resources/views/data/data_umum/form_edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@
<div class="col-md-7">
{!! Form::number('luas_wilayah', $luas_wilayah, [
'placeholder' => '0',
'class' => 'form-control
luas_wilayah',
'class' => 'form-control luas_wilayah',
'required',
'style' => 'text-align:right;',
'placeholder' => 'Luas Wilayah Kecamatan',
Expand Down
176 changes: 87 additions & 89 deletions resources/views/data/profil/edit.blade.php
Original file line number Diff line number Diff line change
@@ -1,123 +1,121 @@
@extends('layouts.dashboard_template')

@section('content')
<section class="content-header">
<h1>
{{ $page_title ?? "Page Title" }}
<small>{{ $page_description ?? '' }}</small>
</h1>
<ol class="breadcrumb">
<li><a href="{{ route('dashboard') }}"><i class="fa fa-dashboard"></i> Dashboard</a></li>
<li class="active">Profil</li>
</ol>
</section>

<section class="content container-fluid">

@include( 'partials.flash_message' )
<div class="box box-primary">

@if (count($errors) > 0)
<div class="alert alert-danger">
<strong>Ups!</strong> Ada beberapa masalah dengan masukan Anda.<br><br>
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
<section class="content-header">
<h1>
{{ $page_title ?? 'Page Title' }}
<small>{{ $page_description ?? '' }}</small>
</h1>
<ol class="breadcrumb">
<li><a href="{{ route('dashboard') }}"><i class="fa fa-dashboard"></i> Dashboard</a></li>
<li class="active">Profil</li>
</ol>
</section>

<section class="content container-fluid">

@include('partials.flash_message')

<div class="box box-primary">

@if (count($errors) > 0)
<div class="alert alert-danger">
<strong>Ups!</strong> Ada beberapa masalah dengan masukan Anda.<br><br>
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>

</div>

@endif
</div>
@endif

<!-- form start -->
{!! Form::model($profil, [ 'route' => ['data.profil.update', $profil->id], 'method' => 'put','id' => 'form-profil', 'class' => 'form-horizontal form-label-left', 'files'=>true] ) !!}
<!-- form start -->
{!! Form::model($profil, ['route' => ['data.profil.update', $profil->id], 'method' => 'put', 'id' => 'form-profil', 'class' => 'form-horizontal form-label-left', 'files' => true]) !!}

<div class="box-body">
<div class="box-body">

@include( 'flash::message' )
@include('data.profil.form_edit')
@include('flash::message')
@include('data.profil.form_edit')

</div>
<!-- /.box-body -->
<div class="box-footer">
<div class="pull-center">
<div class="control-group">
<a href="{{ route('data.profil.index') }}">
<button type="button" class="btn btn-default btn-sm"><i class="fa fa-refresh"></i>&nbsp; Batal</button>
</a>
<button type="submit" class="btn btn-primary btn-sm"><i class="fa fa-save"></i>&nbsp; Simpan</button>
</div>
<!-- /.box-body -->
<div class="box-footer">
<div class="pull-center">
<div class="control-group">
<a href="{{ route('data.profil.index') }}">
<button type="button" class="btn btn-default btn-sm"><i class="fa fa-refresh"></i>&nbsp; Batal</button>
</a>
<button type="submit" class="btn btn-primary btn-sm"><i class="fa fa-save"></i>&nbsp; Simpan</button>
</div>
</div>
</div>
</div>
{!! Form::close() !!}
{!! Form::close() !!}

</div>
</section>
</div>
</section>
@endsection

@include(('partials.asset_select2'))
@include('partials.asset_select2')
@include('partials.tinymce_min')
@include('partials.asset_inputmask')

@push('scripts')
@include('partials.profil_select2')
{!! JsValidator::formRequest('App\Http\Requests\ProfilRequest', '#form-profil') !!}
<script>
@include('partials.profil_select2')
{!! JsValidator::formRequest('App\Http\Requests\ProfilRequest', '#form-profil') !!}
<script>
$('#kabupaten_offline').inputmask('99.99');
$('#kecamatan_offline').inputmask('99.99.99');
$('#kabupaten_offline').inputmask('99.99');
$('#kecamatan_offline').inputmask('99.99.99');
$(function() {
$(function () {
function readURL(input) {
if (input.files && input.files[0]) {
var reader = new FileReader();
function readURL(input) {
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function(e) {
$('#showgambar').attr('src', e.target.result);
}
reader.onload = function (e) {
$('#showgambar').attr('src', e.target.result);
reader.readAsDataURL(input.files[0]);
}
reader.readAsDataURL(input.files[0]);
}
}
function readURL2(input) {
if (input.files && input.files[0]) {
var reader = new FileReader();
function readURL2(input) {
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function (e) {
$('#showgambar2').attr('src', e.target.result);
}
reader.onload = function(e) {
$('#showgambar2').attr('src', e.target.result);
}
reader.readAsDataURL(input.files[0]);
reader.readAsDataURL(input.files[0]);
}
}
}
function readURL3(input) {
if (input.files && input.files[0]) {
var reader = new FileReader();
function readURL3(input) {
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function (e) {
$('#showgambar3').attr('src', e.target.result);
}
reader.onload = function(e) {
$('#showgambar3').attr('src', e.target.result);
}
reader.readAsDataURL(input.files[0]);
reader.readAsDataURL(input.files[0]);
}
}
}
$("#file_struktur").change(function () {
readURL(this);
});
$("#foto_kepala_wilayah").change(function () {
readURL2(this);
});
$("#file_struktur").change(function() {
readURL(this);
});
$("#foto_kepala_wilayah").change(function() {
readURL2(this);
});
$("#file_logo").change(function () {
readURL3(this);
$("#file_logo").change(function() {
readURL3(this);
});
});
});
</script>
@endpush
</script>
@endpush
Loading

0 comments on commit 1ac428f

Please sign in to comment.