Skip to content
Snippets Groups Projects
Commit 6fdfea94 authored by Ricky Kennedy's avatar Ricky Kennedy
Browse files

add admin selection card

parent 45740daf
3 merge requests!18Asik asik,!17Merge feature-visualisasi into develop,!15New admin panel
Pipeline #13167 failed with stage
...@@ -8,13 +8,38 @@ ...@@ -8,13 +8,38 @@
{{"Admin : " + data.current_item.admin_name}} {{"Admin : " + data.current_item.admin_name}}
</h3> </h3>
</b-row> </b-row>
<b-row v-if="showCard">
<b-card >
<small><b>Mohon pilih Admin dari daftar di bawah ini:</b></small>
<b-form-select
v-model="selected"
:options="options"
size="sm"
/>
<b-button
@click="assignAdmin(row)"
variant="primary"
size="sm"
class="float-right mt-2 ml-2"
>
Pilih Admin
</b-button>
<b-button
v-on:click="changeShowCardState()"
size="sm"
class="float-right mt-2"
>
Batalkan
</b-button>
</b-card>
</b-row>
<b-row class="my-2" align-h="end"> <b-row class="my-2" align-h="end">
<b-col <b-col
v-if="data.current_item.admin_name === '--'" v-if="data.current_item.admin_name === '--'"
cols="auto" cols="auto"
> >
<b-button <b-button
v-on:click="switchToggleDetails(row)" v-on:click="changeShowCardState()"
variant="success" variant="success"
size="sm" size="sm"
> >
...@@ -26,14 +51,14 @@ ...@@ -26,14 +51,14 @@
cols="auto" cols="auto"
> >
<b-button <b-button
@click="switchToggleDetails(row)" v-on:click="changeShowCardState()"
variant="primary" variant="primary"
size="sm" size="sm"
> >
Ubah Admin Ubah Admin
</b-button> </b-button>
<b-button <b-button
@click="clearButtonHandler(row)" v-on:click="clearButtonHandler(row)"
variant="danger" variant="danger"
size="sm" size="sm"
> >
...@@ -51,6 +76,7 @@ ...@@ -51,6 +76,7 @@
</b-button> </b-button>
</b-col> </b-col>
</b-row> </b-row>
<b-row align-h='center' v-if="seen" class=" justify-content-center overflow-auto"> <b-row align-h='center' v-if="seen" class=" justify-content-center overflow-auto">
<b-table <b-table
hover hover
...@@ -131,6 +157,13 @@ export default { ...@@ -131,6 +157,13 @@ export default {
return { return {
seen : false, seen : false,
isBusy : false, isBusy : false,
showCard : false,
options: [
{ value: '0', text: 'Rifo Ahmad Genadi' },
{ value: '1', text: 'David Timothy Panjaitan' },
{ value: '2', text: 'William Rukmansa' },
{ value: '3', text: 'Ricky Kennedy' }
],
} }
}, },
computed: { computed: {
...@@ -166,15 +199,8 @@ export default { ...@@ -166,15 +199,8 @@ export default {
return 'table-success' return 'table-success'
}, },
switchToggleDetails : function(newRow) { changeShowCardState : function() {
if (this.currentRow) { this.showCard = !this.showCard;
this.currentRow.toggleDetails()
}
if (newRow) {
newRow.toggleDetails()
}
this.currentRow = newRow
this.selected = null
} }
}, },
...@@ -201,5 +227,8 @@ export default { ...@@ -201,5 +227,8 @@ export default {
padding : 0px 5px; padding : 0px 5px;
} }
.card {
width: 100%;
}
</style> </style>
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment