33 lines
815 B
JavaScript
33 lines
815 B
JavaScript
( async function(){
|
|
|
|
|
|
let app = new Vue({
|
|
el : '#finishedItemApp',
|
|
data : {
|
|
card : {},
|
|
items : [],
|
|
},
|
|
methods : {
|
|
onJobCardSelect : function( id, card ){
|
|
this.card = card;
|
|
$.ajax({
|
|
url: `/ctp/rest/job-cards/${id}/items`,
|
|
method: 'GET',
|
|
contentType: 'application/json',
|
|
dataType: 'json',
|
|
success: ( data ) =>{
|
|
this.items = data;
|
|
},
|
|
error: function (err) {
|
|
console.log(err)
|
|
}
|
|
});
|
|
|
|
}
|
|
|
|
},
|
|
mounted : function () {
|
|
}
|
|
})
|
|
|
|
})(jQuery); |