From 522f093f06f304ec486b5d482f51a471b159e001 Mon Sep 17 00:00:00 2001 From: digvijay26 Date: Wed, 12 May 2021 14:26:01 +0530 Subject: [PATCH] outro module added --- config/index.js | 2 +- src/components/Profile.vue | 118 +++++++++++++++++++++++++++++++++++++++++++-- src/main.js | 2 +- 3 files changed, 115 insertions(+), 7 deletions(-) diff --git a/config/index.js b/config/index.js index 7250ea9..5c20dfa 100644 --- a/config/index.js +++ b/config/index.js @@ -14,7 +14,7 @@ module.exports = { // Various Dev Server settings host: 'localhost', // can be overwritten by process.env.HOST - port: 1500, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined + port: 8081, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined autoOpenBrowser: false, errorOverlay: true, notifyOnErrors: true, diff --git a/src/components/Profile.vue b/src/components/Profile.vue index 5a89dc4..6007cb9 100644 --- a/src/components/Profile.vue +++ b/src/components/Profile.vue @@ -112,6 +112,22 @@ + +
+
+
+ + +
+
+
@@ -317,6 +333,22 @@
+
+
+
+ + +
+
+
+
@@ -480,7 +512,7 @@
@@ -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({ -- 2.0.0