Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let app = new Vue({
- el: '#app',
- data: {
- stage: 'start',
- inspection: null,
- stagesData: {
- inspection : {
- currentUser : null,
- },
- },
- },
- methods : {
- retrieveUser: function (params) {
- this.stagesData.inspection.currentUser = this.stagesData.list.users.shift();
- this.stagesData.inspection.currentUser.link = `link here`;
- this.stagesData.inspection.currentUser.products = [];
- $.ajax({
- type: "get",
- url: "/api/utilities/check/inspection/users/products",
- data: {
- uid: this.stagesData.inspection.currentUser.partner.uid,
- },
- success: function (response) {
- let products = JSON.parse(response);
- products.forEach(function (item) {
- app.stagesData.inspection.currentUser.products.push(item);
- })
- }
- });
- }
- },
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement