@@ -580,12 +612,14 @@ export default {
type: null,
readTime: null,
platForm: null,
+ templateId: "intro-1",
authors: [],
},
outro: {
authorImage: [],
authors: [],
designer: null,
+ templateId: "outro-1",
illustrations: null,
},
insightTags: [],
@@ -623,9 +657,83 @@ export default {
this.getUserList();
this.getTemplateList();
this.getInsightList();
+ // this.demo();
}
},
methods: {
+ demo() {
+ var obj = {
+ responseMessage: "success",
+ callflowsDetails: {
+ metadata: {
+ "6f4f3ec8d8bd0d169a33cdeb49c005d4": {
+ name: "neeraj.sharma@viithiisys.com",
+ pvt_type: "faxbox",
+ },
+ "1968018a933a6ce069b583f2dfe0d91b": {
+ name: "Rohit Saini",
+ pvt_type: "user",
+ },
+ "48f409d64c69b52dbe114b86ee4579ea": {
+ name: "hello",
+ pvt_type: "device",
+ },
+ },
+ patterns: [],
+ numbers: ["+9876541023"],
+ id: "2360eb2f7dc04994382ab58fe48da46c",
+ ui_metadata: {
+ ui: "monster-ui",
+ origin: "callflows",
+ version: "4.3-139",
+ },
+ flow: {
+ data: {
+ dial_strategy: "simultaneous",
+ delay: 0,
+ can_call_self: false,
+ id: "48f409d64c69b52dbe114b86ee4579ea",
+ timeout: 20,
+ },
+ children: {
+ _: {
+ data: { id: "6f4f3ec8d8bd0d169a33cdeb49c005d4" },
+ children: {
+ _: {
+ data: {
+ owner_id: "1968018a933a6ce069b583f2dfe0d91b",
+ media: { fax_option: false },
+ },
+ children: {},
+ module: "receive_fax",
+ },
+ },
+ module: "faxbox",
+ },
+ },
+ module: "device",
+ },
+ },
+ };
+ var string = JSON.stringify(obj);
+ var count = string.match(/children/gi).length;
+ var array = [];
+ var name = [];
+ for (var i = 0; i < count - 1; i++) {
+ name = name + "children";
+ var value = JSON.parse(string);
+ // console.log("-1-",name);
+ console.log("-1-", value.callflowsDetails.flow[name]);
+ console.log("-2-", value.callflowsDetails.flow[name]["_"][name]);
+ console.log(
+ "-3-",
+ value.callflowsDetails.flow[name]["_"][name]["_"][name]
+ );
+ }
+ },
+ changeIntroScreen(){
+
+ },
selectUser(i) {
this.userList[i];
this.caseStudy.caseStudyDetails.intro.authors.push(this.userList[i].name);
@@ -895,7 +1003,7 @@ export default {
comments: [],
},
};
- console.log("2");
+ console.log("2");
if (this.templateList[i].bounceBoard) {
obj.commentBox = this.templateList[i].commentBox;
@@ -905,7 +1013,7 @@ export default {
obj.insightId = template_.insightId;
}
var fieldArray = [];
- console.log("3");
+ console.log("3");
this.templateList[i].metaData.fields.forEach((element) => {
var fieldobj = {
@@ -916,10 +1024,10 @@ export default {
};
obj.metaData.fields.push(fieldobj);
});
- console.log("4");
+ console.log("4");
finalArray.push(obj);
- if(template_.insight){
+ if (template_.insight) {
this.insightId = template_.insight._id;
}
});
diff --git a/src/main.js b/src/main.js
index 0ed1d87..41780a5 100644
--- a/src/main.js
+++ b/src/main.js
@@ -41,7 +41,7 @@ Vue.config.productionTip = false
// http://174.138.121.70:3006/pd
Vue.prototype.moment = moment
-axios.defaults.baseURL = 'http://174.138.121.70:3007/pg'
+axios.defaults.baseURL = 'http://0.0.0.0:3000/pg'
/* eslint-disable no-new */
new Vue({