Skip to content

Commit

Permalink
Update 7.0.1
Browse files Browse the repository at this point in the history
- Perbaikan laman beranda di login Administrator
- Perbaikan laman sinkronisasi nilai Dapodik
- Perbaikan akses waka kurikulum
- Penambahan form input token Dapodik di laman Pengaturan Umum
  • Loading branch information
eraporsmk committed Sep 28, 2023
1 parent 034269d commit 91941f1
Show file tree
Hide file tree
Showing 17 changed files with 268 additions and 18 deletions.
13 changes: 13 additions & 0 deletions app/Http/Controllers/ApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public function index(){
$query->whereIn('tingkat', [11, 12, 13]);
})->select('rombongan_belajar_id', 'nama')->get(),
'rombel_4_tahun' => $plucked->all(),
'token_dapodik' => get_setting('token_dapodik', request()->sekolah_id, request()->semester_id),
'logo_sekolah' => $sekolah->logo_sekolah,
'periode' => substr(request()->semester_id, -1),
'sekolah' => $sekolah,
Expand Down Expand Up @@ -133,6 +134,18 @@ public function update(Request $request){
} else {
Rombel_empat_tahun::where('sekolah_id', $request->sekolah_id)->where('semester_id', $request->semester_aktif)->delete();
}
if($request->token_dapodik){
Setting::updateOrCreate(
[
'key' => 'token_dapodik',
'sekolah_id' => request()->sekolah_id,
'semester_id' => request()->semester_id,
],
[
'value' => request()->token_dapodik,
]
);
}
if($request->photo){
$sekolah = Sekolah::find($request->sekolah_id);
if (!File::isDirectory(storage_path('app/public/images'))) {
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/AuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ private function loggedUser($user){
$waka = [
[
'action' => 'read',
'subject' => 'Wali'
'subject' => 'Waka'
],
[
'action' => 'read',
Expand Down
1 change: 0 additions & 1 deletion app/Http/Controllers/DashboardController.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ private function dashboard_admin(){
'app_version' => get_setting('app_version'),
'db_version' => get_setting('db_version'),
'status_penilaian' => ($status_penilaian && $status_penilaian->status) ? TRUE: FALSE,
'status' => $status_penilaian->status,
],
];
return $data;
Expand Down
19 changes: 19 additions & 0 deletions app/Http/Controllers/SinkronisasiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -573,4 +573,23 @@ public function kirim_nilai(){
];
return response()->json($data);
}
public function get_matev_rapor(){
$data = Matev_rapor::withWhereHas('pembelajaran', function($query){
$query->where('semester_id', request()->semester_id);
$query->where('sekolah_id', request()->sekolah_id);
$query->with(['guru' => function($query){
$query->select('guru_id', 'nama');
}]);
})->orderBy(request()->sortby, request()->sortbydesc)
->orderBy('rombongan_belajar_id', request()->sortbydesc)
->when(request()->q, function($query){
$query->where('nm_mata_evaluasi', 'ILIKE', '%' . request()->q . '%');
$query->orWhereHas('pembelajaran', function($query){
$query->whereHas('guru', function($query){
$query->where('nama', 'ILIKE', '%' . request()->q . '%');
});
});
})->paginate(request()->per_page);
return response()->json(['status' => 'success', 'data' => $data]);
}
}
2 changes: 1 addition & 1 deletion app_version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.0.0
7.0.1
2 changes: 1 addition & 1 deletion public/js/app.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion public/js/chunks/22.6610bf1c943a79b731d4.js

This file was deleted.

1 change: 1 addition & 0 deletions public/js/chunks/22.784119ea075d76bd64a3.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions public/js/chunks/27.3c49b06d4801651c5014.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion public/js/chunks/28.94435f74b09cf2bdff71.js

This file was deleted.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"/js/app.js": "/js/app.js?id=b13ae92e83e4d15e452f",
"/js/app.js": "/js/app.js?id=3554a8c6a5a9a70daa7e",
"/css/core.css": "/css/core.css?id=65f126eee3a4ceb07f1f",
"/css/loader.css": "/css/loader.css?id=343ab61d41d27d1f12ce"
}
6 changes: 6 additions & 0 deletions resources/js/src/views/pengaturan/Umum.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@
</template>
</v-select>
</b-form-group>
<b-form-group label="Token Web Services Dapodik" label-for="token">
<b-form-input v-model="form.token_dapodik" placeholder="Token Web Services Dapodik"></b-form-input>
</b-form-group>
</b-col>
</b-row>
</b-col>
Expand Down Expand Up @@ -99,6 +102,7 @@ export default {
zona: '',
kepala_sekolah: '',
rombel_4_tahun: [],
token_dapodik: '',
file: null,
},
feedback: {
Expand Down Expand Up @@ -169,6 +173,7 @@ export default {
this.form.zona = getData.zona
this.form.kepala_sekolah = getData.kepala_sekolah
this.form.rombel_4_tahun = getData.rombel_4_tahun
this.form.token_dapodik = getData.token_dapodik
this.data_guru = getData.data_guru
this.data_rombel = getData.data_rombel
this.semester = getData.semester
Expand All @@ -191,6 +196,7 @@ export default {
data.append('zona', (this.form.zona) ? this.form.zona : '')
data.append('kepala_sekolah', (this.form.kepala_sekolah) ? this.form.kepala_sekolah : '')
data.append('rombel_4_tahun', JSON.stringify(this.form.rombel_4_tahun))
data.append('token_dapodik', (this.form.token_dapodik) ? this.form.token_dapodik : '')
this.$http.post('/setting/update', data).then(response => {
this.loading = false
let data = response.data
Expand Down
104 changes: 98 additions & 6 deletions resources/js/src/views/sinkronisasi/Dapodik.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@
<b-tabs justified>
<b-tab title="Rombongan Belajar">
<b-card-text>
<datatable-rombel :form="form" />
<rombel-dapodik :form="form" />
</b-card-text>
</b-tab>
<b-tab title="Mata Evaluasi Rapor" @click="getMatev">
<b-card-text>Tab contents 2</b-card-text>
<matev-rapor :form="form" :loading="loading" :isBusy="false" :items="items" :fields="fields" :meta="meta" @per_page="handlePerPage" @pagination="handlePagination" @search="handleSearch" @sort="handleSort" />
</b-tab>
<b-tab title="Rekapitulasi" @click="getRekap">
<!--b-tab title="Rekapitulasi" @click="getRekap">
<b-card-text>
<b-table-simple bordered responsive>
<b-thead>
Expand All @@ -66,7 +66,7 @@
</b-tbody>
</b-table-simple>
</b-card-text>
</b-tab>
</b-tab-->
</b-tabs>
</template>
</div>
Expand All @@ -76,9 +76,12 @@

<script>
import { BCard, BCardBody, BCardText, BSpinner, BRow, BCol, BOverlay, BForm, BFormGroup, BFormInput, BButton, BAlert, BTabs, BTab, BTableSimple, BThead, BTbody, BTfoot, BTr, BTh, BTd } from 'bootstrap-vue'
import DatatableRombel from './datatables/Rombel.vue'
import RombelDapodik from './datatables/RombelDapodik.vue'
import MatevRapor from './datatables/MatevRapor.vue'
export default {
components: {
RombelDapodik,
MatevRapor,
BCard,
BCardBody,
BSpinner,
Expand All @@ -100,11 +103,11 @@ export default {
BTr,
BTh,
BTd,
DatatableRombel,
},
data() {
return {
isBusy: true,
isBusyMatev: true,
loading: false,
lengkap: false,
form: {
Expand All @@ -120,6 +123,44 @@ export default {
url_dapodik_state: null,
token_dapodik_feedback: '',
token_dapodik_state: null,
items: [],
fields: [
{
key: 'nm_mata_evaluasi',
label: 'Mata Pelajaran',
sortable: true,
thClass: 'text-center',
},
{
key: 'guru',
label: 'Guru Mapel',
sortable: false,
thClass: 'text-center',
},
{
key: 'no_urut',
label: 'Nomor Urut',
sortable: false,
thClass: 'text-center',
tdClass: 'text-center',
},
{
key: 'status',
label: 'Status',
sortable: false,
thClass: 'text-center',
tdClass: 'text-center'
},
],
isBusy: true,
loading: false,
meta: {},
current_page: 1,
per_page: 10,
search: '',
sortBy: 'mata_pelajaran_id',
sortByDesc: false,
sortDesc: false,
}
},
created() {
Expand All @@ -141,6 +182,37 @@ export default {
this.form.token_dapodik = getData.token_dapodik
})
},
getMatevRapor(){
this.loading = true
let current_page = this.current_page
this.$http.get('/sinkronisasi/get-matev-rapor', {
params: {
user_id: this.form.user_id,
sekolah_id: this.form.sekolah_id,
semester_id: this.form.semester_id,
periode_aktif: this.form.periode_aktif,
page: current_page,
per_page: this.per_page,
q: this.search,
sortby: this.sortBy,
sortbydesc: this.sortByDesc ? 'DESC' : 'ASC'
}
}).then(response => {
let getData = response.data.data
this.isBusyMatev = false
this.loading = false
this.items = getData.data
this.meta = {
total: getData.total,
current_page: getData.current_page,
per_page: getData.per_page,
from: getData.from,
to: getData.to,
role_id: this.role_id,
roles: response.data.roles,
}
})
},
handleSubmit(){
this.loading = true
this.$http.post('/sinkronisasi/cek-koneksi', this.form).then(response => {
Expand Down Expand Up @@ -168,10 +240,30 @@ export default {
},
getMatev(){
console.log('getMatev');
this.getMatevRapor()
},
getRekap(){
console.log('getRekap');
},
handlePerPage(val) {
this.per_page = val
this.getMatevRapor()
},
handlePagination(val) {
this.current_page = val
this.getMatevRapor()
},
handleSearch(val) {
this.search = val
this.getMatevRapor()
},
handleSort(val) {
if (val.sortBy) {
this.sortBy = val.sortBy
this.sortByDesc = val.sortDesc
this.getMatevRapor()
}
},
},
}
</script>
Expand Down
116 changes: 116 additions & 0 deletions resources/js/src/views/sinkronisasi/datatables/MatevRapor.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
<template>
<div>
<b-row>
<b-col md="4" class="mb-2">
<v-select v-model="meta.per_page" :options="[10, 25, 50, 100]" @input="loadPerPage" :clearable="false" :searchable="false"></v-select>
</b-col>
<b-col md="4" offset-md="4">
<b-form-input @input="search" placeholder="Cari data..."></b-form-input>
</b-col>
</b-row>
<b-overlay :show="loading" rounded opacity="0.6" size="lg" spinner-variant="warning">
<b-table responsive bordered striped :items="items" :fields="fields" :sort-by.sync="sortBy" :sort-desc.sync="sortDesc" show-empty :busy="isBusy">
<template #empty="scope">
<p class="text-center">Tidak ada data untuk ditampilkan</p>
</template>
<template #table-busy>
<div class="text-center text-danger my-2">
<b-spinner class="align-middle"></b-spinner>
<strong>Loading...</strong>
</div>
</template>
<template v-slot:cell(guru)="row">
{{row.item.pembelajaran.guru.nama_lengkap}}
</template>
<template v-slot:cell(status)="row">
<b-badge variant="success" v-if="row.item.status">Terkirim</b-badge>
<b-badge variant="danger" v-else>Belum Terkirim</b-badge>
</template>
</b-table>
</b-overlay>
<b-row class="mt-2">
<b-col md="6">
<p>Menampilkan {{ (meta.from) ? meta.from : 0 }} sampai {{ meta.to }} dari {{ meta.total }} entri</p>
</b-col>
<b-col md="6">
<b-pagination v-model="meta.current_page" :total-rows="meta.total" :per-page="meta.per_page" align="right" @change="changePage" aria-controls="dw-datatable"></b-pagination>
</b-col>
</b-row>
</div>
</template>

<script>
import _ from 'lodash'
import { BRow, BCol, BFormInput, BTable, BSpinner, BPagination, BButton, BOverlay, BBadge } from 'bootstrap-vue'
import vSelect from 'vue-select'
export default {
components: {
BRow,
BCol,
BFormInput,
BTable,
BSpinner,
BPagination,
BButton,
BOverlay,
vSelect,
BBadge,
},
props: {
items: {
type: Array,
required: true
},
fields: {
type: Array,
required: true
},
meta: {
required: true
},
isBusy: {
type: Boolean,
default: () => true,
},
loading: {
type: Boolean,
default: () => false,
},
form: {
type: Object,
required: true
},
},
data() {
return {
sortBy: null,
sortDesc: false,
}
},
watch: {
sortBy(val) {
this.$emit('sort', {
sortBy: this.sortBy,
sortDesc: this.sortDesc
})
},
sortDesc(val) {
this.$emit('sort', {
sortBy: this.sortBy,
sortDesc: this.sortDesc
})
}
},
methods: {
loadPerPage(val) {
this.$emit('per_page', this.meta.per_page)
},
changePage(val) {
this.$emit('pagination', val)
},
search: _.debounce(function (e) {
this.$emit('search', e)
}, 500),
},
}
</script>
Loading

0 comments on commit 91941f1

Please sign in to comment.