Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Bagas Udi Sahsangka committed Nov 29, 2021
1 parent 4919e04 commit a91a669
Show file tree
Hide file tree
Showing 14 changed files with 97 additions and 23 deletions.
1 change: 1 addition & 0 deletions app/Models/Setting.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class Setting extends Model
'disable_plat_nomor',
'hapus_snapshot_dalam_hari',
'hapus_transaksi_dalam_hari',
'orientasi_kamera',
'id_pelanggan',
'server_address'
];
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AddCameraOrientationOnSetting extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('settings', function (Blueprint $table) {
$table->string('orientasi_kamera')->nullable();
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('settings', function (Blueprint $table) {
$table->dropColumn('orientasi_kamera');
});
}
}
29 changes: 23 additions & 6 deletions frontend/components/setting/General.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
{{ formErrors.plat_nomor_default[0] }}
</div>
</el-form-item>

<el-form-item
label="Jumlah Kendaraan Per Kartu"
:class="formErrors.jml_kendaraan_per_kartu ? 'is-error' : ''"
Expand All @@ -79,6 +80,27 @@
{{ formErrors.jml_kendaraan_per_kartu[0] }}
</div>
</el-form-item>

<el-form-item
label="Orientasi Kamera"
:class="formErrors.orientasi_kamera ? 'is-error' : ''"
>
<el-select
placeholder="Orientasi Kamera"
v-model="formModel.orientasi_kamera"
style="width: 100%"
>
<el-option
v-for="(l, i) in ['LANDSCAPE', 'POTRAIT']"
:key="i"
:value="l"
:label="l"
></el-option>
</el-select>
<div class="el-form-item__error" v-if="formErrors.orientasi_kamera">
{{ formErrors.orientasi_kamera[0] }}
</div>
</el-form-item>
</el-col>

<el-col :span="12">
Expand Down Expand Up @@ -232,15 +254,10 @@ export default {
url: '/api/setting',
formErrors: {},
loading: false,
formModel: { ...this.$store.state.setting },
}
},
computed: {
formModel() {
return this.$store.state.setting
},
},
methods: {
save() {
this.loading = true
Expand Down
22 changes: 16 additions & 6 deletions frontend/components/transaction/DetailTransaksi.vue
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,24 @@
</tr>
</tbody>
</table>
<div v-if="trx.snapshots" class="flex-grow ml-3">
<img

<div
v-if="trx.snapshots"
:class="{
'ml-3': true,
'flex-grow': true,
flex: setting.orientasi_kamera == 'POTRAIT',
}"
style="width: 100%"
>
<div
class="mb-1"
style="width: 100%"
v-for="snapshot in trx.snapshots"
:key="snapshot.id"
:src="snapshot.url"
style="width: 500px"
class="mb-1"
/>
>
<img :src="s.url" style="width: 100%" />
</div>
</div>
</div>
</el-dialog>
Expand Down
21 changes: 14 additions & 7 deletions frontend/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,18 @@
</el-row>
</div>

<div class="ml-5">
<img
<div
:class="{ 'ml-5': true, flex: setting.orientasi_kamera == 'POTRAIT' }"
style="width: 100%"
>
<div
class="mb-1"
style="width: 100%"
v-for="s in snapshots"
:key="s.id"
:src="s.url"
class="mx-auto mb-1 border"
style="width: 100%"
/>
>
<img :src="s.url" style="width: 100%" />
</div>
</div>

<TransactionFormBukaManual
Expand Down Expand Up @@ -260,7 +264,10 @@ export default {
return {
formModel: { nomor_barcode: '', tarif: '', denda: '' },
formErrors: {},
snapshots: [],
snapshots: [
// { id: 1, url: 'https://via.placeholder.com/150' },
// { id: 2, url: 'https://via.placeholder.com/150' },
],
showManualOpenForm: false,
ws: null,
updateTarifInterval: null,
Expand Down
4 changes: 2 additions & 2 deletions public/200.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!doctype html>
<html lang="en" data-n-head="%7B%22lang%22:%7B%221%22:%22en%22%7D%7D">
<head>
<title>MITRATEKNIK PARKING SYSTEM</title><meta data-n-head="1" charset="utf-8"><meta data-n-head="1" name="viewport" content="width=device-width,initial-scale=1"><meta data-n-head="1" data-hid="description" name="description" content=""><meta data-n-head="1" name="format-detection" content="telephone=no"><link data-n-head="1" rel="icon" type="image/x-icon" href="/favicon.ico"><link rel="preload" href="/_nuxt/4b939cb.js" as="script"><link rel="preload" href="/_nuxt/7c030b3.js" as="script"><link rel="preload" href="/_nuxt/d81157b.js" as="script"><link rel="preload" href="/_nuxt/7e099dc.js" as="script">
<title>MITRATEKNIK PARKING SYSTEM</title><meta data-n-head="1" charset="utf-8"><meta data-n-head="1" name="viewport" content="width=device-width,initial-scale=1"><meta data-n-head="1" data-hid="description" name="description" content=""><meta data-n-head="1" name="format-detection" content="telephone=no"><link data-n-head="1" rel="icon" type="image/x-icon" href="/favicon.ico"><link rel="preload" href="/_nuxt/cea6095.js" as="script"><link rel="preload" href="/_nuxt/7c030b3.js" as="script"><link rel="preload" href="/_nuxt/d81157b.js" as="script"><link rel="preload" href="/_nuxt/7e099dc.js" as="script">
</head>
<body>
<div id="__nuxt"><style>#nuxt-loading{background:#fff;visibility:hidden;opacity:0;position:absolute;left:0;right:0;top:0;bottom:0;display:flex;justify-content:center;align-items:center;flex-direction:column;animation:nuxtLoadingIn 10s ease;-webkit-animation:nuxtLoadingIn 10s ease;animation-fill-mode:forwards;overflow:hidden}@keyframes nuxtLoadingIn{0%{visibility:hidden;opacity:0}20%{visibility:visible;opacity:0}100%{visibility:visible;opacity:1}}@-webkit-keyframes nuxtLoadingIn{0%{visibility:hidden;opacity:0}20%{visibility:visible;opacity:0}100%{visibility:visible;opacity:1}}#nuxt-loading>div,#nuxt-loading>div:after{border-radius:50%;width:5rem;height:5rem}#nuxt-loading>div{font-size:10px;position:relative;text-indent:-9999em;border:.5rem solid #f5f5f5;border-left:.5rem solid #000;-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0);-webkit-animation:nuxtLoading 1.1s infinite linear;animation:nuxtLoading 1.1s infinite linear}#nuxt-loading.error>div{border-left:.5rem solid #ff4500;animation-duration:5s}@-webkit-keyframes nuxtLoading{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes nuxtLoading{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}</style><script>window.addEventListener("error",function(){var e=document.getElementById("nuxt-loading");e&&(e.className+=" error")})</script><div id="nuxt-loading" aria-live="polite" role="status"><div>Loading...</div></div></div><script>window.__NUXT__={config:{_app:{basePath:"/",assetsPath:"/_nuxt/",cdnURL:null}}}</script>
<script src="/_nuxt/4b939cb.js"></script><script src="/_nuxt/7c030b3.js"></script><script src="/_nuxt/d81157b.js"></script><script src="/_nuxt/7e099dc.js"></script></body>
<script src="/_nuxt/cea6095.js"></script><script src="/_nuxt/7c030b3.js"></script><script src="/_nuxt/d81157b.js"></script><script src="/_nuxt/7e099dc.js"></script></body>
</html>
1 change: 1 addition & 0 deletions public/_nuxt/0b0ff0d.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions public/_nuxt/0b51e07.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions public/_nuxt/1676d67.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a91a669

Please sign in to comment.