Add and fix nominee profile photo uploads
- Run artisan migrate to add column photo in nominee table - npm run development/watch
This commit is contained in:
committed by
nurafrinaalimi16
parent
8bde7a0544
commit
1d892b064e
@@ -51,10 +51,10 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(nominee,i) in data.nominees" v-if="nominee.position_id==position.id">
|
||||
<td><img
|
||||
<td><img
|
||||
@click="view(i)"
|
||||
:src="data.storageURL+nominee.image"
|
||||
class="thumbnail"
|
||||
:src="createBase64ImageUrl(nominee.photo)"
|
||||
class="thumbnail"
|
||||
style="height: 60px;width: 60px;" />
|
||||
</td>
|
||||
<td>{{ nominee.name }}</td>
|
||||
@@ -124,7 +124,7 @@ export default{
|
||||
|
||||
getNominee: function (id) {
|
||||
let nominees = this.data.nominees;
|
||||
for (var i in nominees)
|
||||
for (var i in nominees)
|
||||
if (nominees[i]['id']==id) return nominees[i].name;
|
||||
return '';
|
||||
},
|
||||
@@ -132,7 +132,12 @@ export default{
|
||||
view: function (index) {
|
||||
this.x = this.data.nominees[index];
|
||||
this.util.showModal('#nominee-information-modal');
|
||||
}
|
||||
},
|
||||
|
||||
createBase64ImageUrl: function(base64ImageData) {
|
||||
return "data:image/png;base64," + base64ImageData;
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
computed: {
|
||||
|
||||
Reference in New Issue
Block a user