Merged in afiqhamzah/feat/add-mix-api-url-env-ref-webpack (pull request #16)

Afiqhamzah/feat/add mix api url env ref webpack
This commit is contained in:
Afiq Hamzah
2024-01-02 11:55:57 +00:00
6 changed files with 42 additions and 38 deletions
+2 -2
View File
@@ -49,5 +49,5 @@ PUSHER_APP_SECRET=421b61fb5a8ecce477a6
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
# MIX_API_URL=apiujrah.arrahn
MIX_API_URL=api.arrahn
# MIX_API_URL=http://api.arrahn
MIX_API_URL=http://apiujrah.arrahn
+3 -3
View File
@@ -126,21 +126,21 @@ Vue.use(require('vue-pusher'), {
}
});
Vue.prototype.$api1 = process.env.MIX_API_URL
Vue.prototype.$api1 = process.env.MIX_API_URL + '/';
Vue.prototype.$username = document.querySelector("meta[name='user_name']").getAttribute('content');
Vue.prototype.$userroles = document.querySelector("meta[name='user_roles']").getAttribute('content');
let initial = 'KB2';
let initialhostname = process.env.MIX_API_URL;
let initialhostname = process.env.MIX_API_URL + '/';
let initialtahun = new Date().getFullYear();
const store = new Vuex.Store({
state: {
$kodcaw: 'KB2',
$hostname: process.env.MIX_API_URL,
$hostname: process.env.MIX_API_URL + '/',
$tahun: new Date().getFullYear()
},
plugins: [createPersistedState()],
+2 -2
View File
@@ -24,7 +24,7 @@
<link href="{{ asset('css/all.min.css') }}" rel="stylesheet">
<!-- Scripts -->
<script src="{{ asset('js/app.js') }}" defer></script>
<script src="{{asset(mix('js/app.js')), true}}" defer></script>
<!-- Fonts -->
<link rel="dns-prefetch" href="//fonts.gstatic.com">
@@ -155,7 +155,7 @@
</cawangan-component>
<div class="mx-auto">
<a class="text-yellow-200 rounded bg-gray-400 px-6 py-3 font-bold mr-4 uppercase sm:invisible lg:visible xl:visible">
{{Auth::user()->roles}} : {{Auth::user()->name}}
{{Auth::user()->roles}} : {{Auth::user()->name}}
</a>
</div>
@@ -13,9 +13,9 @@
<link href="{{ asset('css/all.min.css') }}" rel="stylesheet">
<!-- Scripts -->
<script src="{{ asset('js/app.js') }}" defer></script>
<script src="{{asset(mix(‘js/app.js’), true)}}" defer></script>
<!-- Fonts -->
<link rel="dns-prefetch" href="//fonts.gstatic.com">
@@ -29,13 +29,13 @@
<div class="mb-2">
<div class="w-full flex flex-col justify-end items-end text-right">
<div class="ml-2">
<b>{{ $fullname }}</b>
<p class="text-xs">{{ $cawangan_detail['namacaw'] }}</p>
<p class="text-xs">{{ $cawangan_detail['alamat1'] }}</p>
<p class="text-xs">{{ $cawangan_detail['alamat2'] }}</p>
<div class="flex justify-end">
<p class="text-xs mr-2">No Tel : {{ $cawangan_detail['notel'] }}</p>
<p class="text-xs">No Faks : {{ $cawangan_detail['nofaks'] }}</p>
@@ -85,7 +85,7 @@
<b class="text-xs border border-black pl-1 text-center bg-gray-300 font-bold"> PENYEDIA PERMOHONAN</b>
</div>
</div>
<div class="flex mb-2">
<div class="ml-2 w-1/2 flex flex-col justify-end">
@@ -106,7 +106,7 @@
<div class="flex">
<p class="text-xs text-center w-2/3">Tarikh</p>
<p class="text-xs w-1/3 border border-gray-400 text-right">
@php
@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $permohonan['tarikh_permohonan']);
$formattedweddingdate = $myDateTime->format('d-m-Y');
echo($formattedweddingdate)
@@ -135,7 +135,7 @@
<div class="flex">
<p class="text-xs w-full">Tarikh mohon</p>
<p class="text-xs w-2/3 border border-gray-400 text-right">
@php
@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $permohonan['tarikh_permohonan']);
$formattedweddingdate = $myDateTime->format('d-m-Y');
echo($formattedweddingdate)
@@ -201,14 +201,14 @@
<div class="flex">
<p class="text-xs text-center w-2/3">Tarikh</p>
<p class="text-xs w-1/3 border border-gray-400 text-right">
@php
@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $permohonan['tarikh_permohonan']);
$formattedweddingdate = $myDateTime->format('d-m-Y');
echo($formattedweddingdate)
@endphp
</p>
</div>
</div>
</div>
@else
@@ -219,13 +219,13 @@
<div class="flex">
<p class="text-xs w-full">Tarikh mohon</p>
<p class="text-xs w-2/3 border border-gray-400 text-right">
</p>
</div>
<div class="flex">
<p class="text-xs w-full">Baki Peti Besi</p>
<p class="text-xs w-2/3 border border-gray-400 text-right">
</p>
</div>
@endif
@@ -265,7 +265,7 @@
<input type="checkbox" class="form-checkbox h-4 w-4">
<span class="text-xs ml-1">Cash In Transit (CIT)</span>
</label>
</div>
</div>
</div>
@else
<div class="flex">
@@ -275,7 +275,7 @@
<div class="flex">
<p class="text-xs w-full">Tarikh bank-in ke PKB</p>
<p class="text-xs w-2/3 border border-gray-400 text-right">
@php
@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $permohonan['tarikh_permohonan']);
$formattedweddingdate = $myDateTime->format('d-m-Y');
echo($formattedweddingdate)
@@ -303,7 +303,7 @@
</div>
<div class="ml-2 w-1/2 flex flex-col">
<b class="text-xs border border-black pl-1">Disahkan oleh</b>
<p class="h-8"></p>
<div class="flex">
{{-- <p class="text-xs w-full text-right italic">{{ $permohonan['nama_operasi'] }}</p> --}}
@@ -319,7 +319,7 @@
<div class="flex">
<p class="text-xs text-center w-2/3">Tarikh</p>
<p class="text-xs w-1/3 border border-gray-400 text-right">
@php
@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $permohonan['tarikh_pengesahanoperasi']);
$formattedweddingdate = $myDateTime->format('d-m-Y');
echo($formattedweddingdate)
@@ -365,7 +365,7 @@
<div class="flex">
<p class="text-xs text-center w-2/3">Tarikh</p>
<p class="text-xs w-1/3 border border-gray-400 text-right">
@php
@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $permohonan['tarikh_pengesahanakaun']);
$formattedweddingdate = $myDateTime->format('d-m-Y');
echo($formattedweddingdate)
@@ -394,7 +394,7 @@
</div>
<div class="ml-2 w-1/2 flex flex-col">
<p class="h-8"></p>
<div class="flex">
<div class="w-2/3"></div>
@@ -415,7 +415,7 @@
<div class="flex">
<p class="text-xs text-center w-2/3">Tarikh</p>
<p class="text-xs w-1/3 border border-gray-400 text-right">
@php
@php
if($permohonan['tarikh_diluluskan'] !== null)
{
$myDateTime = DateTime::createFromFormat('Y-m-d', $permohonan['tarikh_diluluskan']);
@@ -436,15 +436,15 @@
<div class="flex">
<p class="text-xs w-full">Pengesahan penerima wang oleh</p>
<p class="text-xs w-2/3 border border-gray-400 text-right">
{{ ($permohonan['nama_penerima'] !== null) ? $permohonan['nama_penerima'] : '' }}
</p>
</div>
<div class="flex">
<p class="text-xs w-full">Tarikh serahan</p>
<p class="text-xs w-2/3 border border-gray-400 text-right">
@php
@php
if($permohonan['tarikh_terima'] !== null)
{
@@ -464,11 +464,11 @@
{
$jumlah = floatval($permohonan['baki_petibesi']) + floatval($permohonan['jumlah_diluluskan']);
echo 'RM ' . number_format($jumlah,2);
}
}
@endphp
</p>
</div>
{{-- <p class="text-xs">NO KP : 970403-03-5003</p> --}}
</div>
@@ -486,7 +486,7 @@
<div class="flex">
<p class="text-xs w-full">Tarikh kemasukan</p>
<p class="text-xs w-2/3 border border-gray-400 text-right">
@php
@php
if($permohonan['tarikh_terima'] !== null)
{
@@ -494,7 +494,7 @@
$formattedweddingdate = $myDateTime->format('d-m-Y');
echo($formattedweddingdate);
}
@endphp
</p>
</div>
@@ -512,4 +512,4 @@
// window.onfocus=function(){ window.close();}
</script>
</body>
</html>
</html>
@@ -13,9 +13,9 @@
<link href="{{ asset('css/all.min.css') }}" rel="stylesheet">
<!-- Scripts -->
<script src="{{ asset('js/app.js') }}" defer></script>
<script src="{{asset(mix(‘js/app.js’), true)}}" defer></script>
<!-- Fonts -->
<link rel="dns-prefetch" href="//fonts.gstatic.com">
@@ -76,7 +76,7 @@
@if($permohonan['jenismohon'] === 'permohonanwang')
<h4 class="ml-2 text-lg font-bold underline">PERMOHONAN WANG</h4>
@else
@else
<h4 class="ml-2 text-lg font-bold underline">BAYARAN BALIK</h4>
@endif
@@ -93,7 +93,7 @@
<tr>
<td class="border-2 border-black p-2">Tarikh Mohon</td>
<td class="border-2 border-black p-2 text-right">
@php
@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $permohonan['tarikh_permohonan']);
$formattedweddingdate = $myDateTime->format('d-m-Y');
echo($formattedweddingdate)
@@ -155,4 +155,4 @@
// window.onfocus=function(){ window.close();}
</script>
</body>
</html>
</html>
+4
View File
@@ -16,3 +16,7 @@ mix.js('resources/js/app.js', 'public/js')
.postCss("resources/css/app.css", "public/css", [
require("tailwindcss"),
]);
if( mix.inProduction() ){
mix.version()
}