fix skit2

This commit is contained in:
hafifierahman
2022-04-12 11:01:15 +08:00
parent a7c2ac0983
commit 7122f5f8c8
5 changed files with 73 additions and 32 deletions
+10 -4
View File
@@ -87,14 +87,19 @@ class KelulusanController extends Controller
public function updatePB(Request $request)
{
$imageName = time().'.'.$request->image->extension();
$request->image->move(public_path('storage\kelulusanpb'), $imageName);
$data = base64_encode($request->image->get());
// $data = base64_encode(file_get_contents($request->file('image')));
$updatelulus = Http::put(config('api.url') . '/admin/permohonan/updatepb',[
// $request->image->move(public_path('storage\kelulusanpb'), $imageName);
$updatelulus = Http::accept('application/'.$request->image->extension())->post(config('api.url') . '/admin/permohonan/updatepb',[
'amaun_lulus' => $request->amaun_lulus,
'kelulusan' => $request->kelulusan,
'kelulusanpbimage' => $imageName,
// 'kelulusanpbimage' => $imageName,
'komen' => '',
'dataimage' => $data,
'imagename' => $imageName,
'imagetype' => $request->image->extension(),
'mohonid' => $request->mohonid
])->json();
@@ -107,6 +112,7 @@ class KelulusanController extends Controller
public function download(Request $request)
{
return Storage::download('public/kelulusanpb/'.$request->image);
}
}
+30 -17
View File
@@ -116,9 +116,10 @@ export default {
cancelButtonText: 'Batal',
allowOutsideClick: false
})
await this.axios.post('/mintasemulakelulusan', {
await this.axios.get('/mintasemulakelulusan', {
params: {
passsemula: katalaluan
}
}).then(response => {
if (response.data === 0) {
boolkatalaluan = 0;
@@ -177,8 +178,10 @@ export default {
allowOutsideClick: false
})
await this.axios.post('/mintasemulakelulusan', {
await this.axios.get('/mintasemulakelulusan', {
params: {
passsemula: katalaluan
}
}).then(response => {
if (response.data === 0) {
boolkatalaluan = 0;
@@ -188,9 +191,8 @@ export default {
});
if (boolkatalaluan == 1) {
const {
value: komen
} = await this.$swal({
await this.$swal({
title: 'Masukkan Komen',
input: 'text',
inputPlaceholder: 'Komen',
@@ -198,18 +200,29 @@ export default {
showCancelButton: true,
cancelButtonText: 'Batal',
allowOutsideClick: false
}).then((result) => {
if (result.isConfirmed) {
return this.axios.post('/api/check/kelulusan/operasi', {
norujukan: noruj,
komenkelulusan: result.value,
kodcaw: kcaw,
namaoperasi: this.$attrs['namaoperasi'],
teller: tel,
siri: sir,
pembatalan: "batal"
}).then((response) =>{
if(response.data == 1)
{
this.getKelulusanList(1)
}
});
} else if (result.isDenied) {
Swal.fire('Changes are not saved', '', 'info')
}
})
return this.axios.post('/api/check/kelulusan/operasi', {
norujukan: noruj,
komenkelulusan: komen,
kodcaw: kcaw,
namaoperasi: this.$attrs['namaoperasi'],
teller: tel,
siri: sir,
pembatalan: "batal"
});
}
},
+1 -1
View File
@@ -469,7 +469,7 @@ export default {
})
if (katalaluan !== undefined)
await this.axios.get('/mintasemulakelulusan', {
await this.axios.post('/mintasemulakelulusan', {
params: {
passsemula: katalaluan
}
+31 -9
View File
@@ -32,6 +32,20 @@
</label>
<input v-model.trim="$v.noresit.$model" type="text" class="mr-2 bg-white appearance-none border-2 border-gray-400 rounded w-full py-2 px-4 text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-blue-500 border-black" />
<div class="text-red-500 text-xs italic" v-if="!$v.noresit.required">Field is required</div>
<label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2 mt-3">
Jenis Cash-In-Transit(CIT)
</label>
<select v-model.trim="$v.selectedjeniscit.$model" class="w-full p-2 rounded-md border bg-white border-gray-400 focus:outline-none rounded-md focus:ring-1 ring-cyan-500 uppercase">
<option value="CIT">Cash Diambil oleh CIT</option>
<option value="TT">tellygraphic transfer oleh PC</option>
</select>
<label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2 mt-3">
Nama Syarikat Cash-In-Transit(CIT)
</label>
<input v-model.trim="$v.namacit.$model" type="text" class="mr-2 bg-white appearance-none border-2 border-gray-400 rounded w-full py-2 px-4 text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-blue-500 border-black" />
<div class="text-red-500 text-xs italic" v-if="!$v.noresit.required">Field is required</div>
</div>
<!--footer-->
<div class="flex items-center justify-end p-6 border-t border-solid border-blueGray-200 rounded-b">
@@ -79,7 +93,9 @@ export default {
showModal: false,
mohonid: 0,
selectedbank: 'Sila Pilih Bank',
selectedjeniscit: 'Sila Pilih Jenis Transfer',
noresit: 0,
namacit: '',
jenisbank: {}
}
},
@@ -101,6 +117,8 @@ export default {
kelulusan: 'Lulus',
jenisbank: this.selectedbank,
noresit: this.noresit,
namacit: this.namacit,
jeniscit: this.selectedjeniscit,
mohonid: this.mohonid
}).then(response => {
@@ -117,16 +135,20 @@ export default {
});
}
},
validations: {
selectedbank: {
required,
minLength: minLength(4)
},
noresit: {
required,
minLength: minLength(4)
}
validations: {
selectedbank: {
required
},
noresit: {
required
},
namacit: {
required
},
selectedjeniscit: {
required
}
}
}
</script>
+1 -1
View File
@@ -97,7 +97,7 @@ Route::get('/resit/tambahpinjam/{id}',['as'=>'resit.tambahpinjam','uses'=>'App\H
Route::get('/resit/tebusautotawarruq/{id}',['as'=>'resit.autotawarruq','uses'=>'App\Http\Controllers\ResitController@resitautotawarruq']);
//Katalaluan
Route::post('/mintasemulakelulusan','App\Http\Controllers\PermohonanController@MintaKelulusan');
Route::get('/mintasemulakelulusan','App\Http\Controllers\PermohonanController@MintaKelulusan');
//Permohonan Wang
Route::get('/permohonan',['as'=>'permohonan.index','uses'=>'App\Http\Controllers\PermohonanController@index']);