Commit 9f4ec7a188dc069ca6aadfe82fca503282886831

Authored by Digvijay Singh
1 parent 3eecadbdf2
Exists in admin

url changed

config/dev.env.js
1 'use strict' 1 'use strict'
2 const merge = require('webpack-merge') 2 const merge = require('webpack-merge')
3 const prodEnv = require('./prod.env') 3 const prodEnv = require('./prod.env')
4 4
5 module.exports = merge(prodEnv, { 5 module.exports = merge(prodEnv, {
6 NODE_ENV: '"development"', 6 NODE_ENV: '"development"',
7 // APIurl: '"https://cors-anywhere.herokuapp.com/https://www.gigsfor.me/_functions"', 7 // APIurl: '"https://cors-anywhere.herokuapp.com/https://www.gigsfor.me/_functions"',
8 // APIurl: '"https://stg-api.gigsfor.me/api"', 8 // APIurl: '"https://stg-api.gigsfor.me/api"',
9 APIurl: '"https://stg-api.gigsfor.me/api"', 9 APIurl: '"https://stg-api.gigsfor.me/api"',
10 siteUrl: '"http://134.209.156.59:8082"', 10 siteUrl: '"http://134.209.156.59:8081"',
11 imageUrl: '"https://stg-api.gigsfor.me/"', 11 imageUrl: '"https://stg-api.gigsfor.me/"',
12 fileUploadKey: '"AYqgvDoo4RyBC0STV6og2z"', 12 fileUploadKey: '"AYqgvDoo4RyBC0STV6og2z"',
13 landbotUrl: '"https://landbot.io/u/H-347617-SIJESECF8DSSQ06L/index.html"', 13 landbotUrl: '"https://landbot.io/u/H-347617-SIJESECF8DSSQ06L/index.html"',
14 courseId1: '"5e4b77e8f77376502a616cd2"', 14 courseId1: '"5e4b77e8f77376502a616cd2"',
15 courseId2: '"5e4b77f5f77376502a616cd9"', 15 courseId2: '"5e4b77f5f77376502a616cd9"',
16 courseId3: '"5e4b76155d6509dfec06e109"' 16 courseId3: '"5e4b76155d6509dfec06e109"'
17 }) 17 })
1 'use strict' 1 'use strict'
2 // Template version: 1.3.1 2 // Template version: 1.3.1
3 // see http://vuejs-templates.github.io/webpack for documentation. 3 // see http://vuejs-templates.github.io/webpack for documentation.
4 4
5 const path = require('path') 5 const path = require('path')
6 6
7 module.exports = { 7 module.exports = {
8 dev: { 8 dev: {
9 9
10 // Paths 10 // Paths
11 assetsSubDirectory: 'static', 11 assetsSubDirectory: 'static',
12 assetsPublicPath: '/', 12 assetsPublicPath: '/',
13 proxyTable: {}, 13 proxyTable: {},
14 14
15 // Various Dev Server settings 15 // Various Dev Server settings
16 host: '134.209.156.59', // can be overwritten by process.env.HOST 16 host: '134.209.156.59', // can be overwritten by process.env.HOST
17 port: 8082, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined 17 port: 8081, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
18 autoOpenBrowser: false, 18 autoOpenBrowser: false,
19 errorOverlay: true, 19 errorOverlay: true,
20 notifyOnErrors: true, 20 notifyOnErrors: true,
21 poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions- 21 poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
22 22
23 // Use Eslint Loader? 23 // Use Eslint Loader?
24 // If true, your code will be linted during bundling and 24 // If true, your code will be linted during bundling and
25 // linting errors and warnings will be shown in the console. 25 // linting errors and warnings will be shown in the console.
26 useEslint: false, 26 useEslint: false,
27 // If true, eslint errors and warnings will also be shown in the error overlay 27 // If true, eslint errors and warnings will also be shown in the error overlay
28 // in the browser. 28 // in the browser.
29 showEslintErrorsInOverlay: false, 29 showEslintErrorsInOverlay: false,
30 30
31 /** 31 /**
32 * Source Maps 32 * Source Maps
33 */ 33 */
34 34
35 // https://webpack.js.org/configuration/devtool/#development 35 // https://webpack.js.org/configuration/devtool/#development
36 devtool: 'cheap-module-eval-source-map', 36 devtool: 'cheap-module-eval-source-map',
37 37
38 // If you have problems debugging vue-files in devtools, 38 // If you have problems debugging vue-files in devtools,
39 // set this to false - it *may* help 39 // set this to false - it *may* help
40 // https://vue-loader.vuejs.org/en/options.html#cachebusting 40 // https://vue-loader.vuejs.org/en/options.html#cachebusting
41 cacheBusting: true, 41 cacheBusting: true,
42 42
43 cssSourceMap: true 43 cssSourceMap: true
44 }, 44 },
45 45
46 build: { 46 build: {
47 // Template for index.html 47 // Template for index.html
48 index: path.resolve(__dirname, '../dist/index.html'), 48 index: path.resolve(__dirname, '../dist/index.html'),
49 49
50 // Paths 50 // Paths
51 assetsRoot: path.resolve(__dirname, '../dist'), 51 assetsRoot: path.resolve(__dirname, '../dist'),
52 assetsSubDirectory: 'static', 52 assetsSubDirectory: 'static',
53 assetsPublicPath: '/', 53 assetsPublicPath: '/',
54 54
55 /** 55 /**
56 * Source Maps 56 * Source Maps
57 */ 57 */
58 58
59 productionSourceMap: true, 59 productionSourceMap: true,
60 // https://webpack.js.org/configuration/devtool/#production 60 // https://webpack.js.org/configuration/devtool/#production
61 devtool: '#source-map', 61 devtool: '#source-map',
62 62
63 // Gzip off by default as many popular static hosts such as 63 // Gzip off by default as many popular static hosts such as
64 // Surge or Netlify already gzip all static assets for you. 64 // Surge or Netlify already gzip all static assets for you.
65 // Before setting to `true`, make sure to: 65 // Before setting to `true`, make sure to:
66 // npm install --save-dev compression-webpack-plugin 66 // npm install --save-dev compression-webpack-plugin
67 productionGzip: false, 67 productionGzip: false,
68 productionGzipExtensions: ['js', 'css'], 68 productionGzipExtensions: ['js', 'css'],
69 69
70 // Run the build command with an extra argument to 70 // Run the build command with an extra argument to
71 // View the bundle analyzer report after build finishes: 71 // View the bundle analyzer report after build finishes:
72 // `npm run build --report` 72 // `npm run build --report`
73 // Set to `true` or `false` to always turn it on or off 73 // Set to `true` or `false` to always turn it on or off
74 bundleAnalyzerReport: process.env.npm_config_report 74 bundleAnalyzerReport: process.env.npm_config_report
75 } 75 }
76 } 76 }
77 77
src/components/Profile.vue
1 <template> 1 <template>
2 <main class="landing-page"> 2 <main class="landing-page">
3 <!-- profile --> 3 <!-- profile -->
4 <div class="popup-wrp" style="display: none"> 4 <div class="popup-wrp" style="display: none">
5 <div class="overlay" @click="hideDialog"></div> 5 <div class="overlay" @click="hideDialog"></div>
6 <div 6 <div
7 class="popup-set" 7 class="popup-set"
8 id="add-profile" 8 id="add-profile"
9 style="display: none; width: 700px" 9 style="display: none; width: 700px"
10 > 10 >
11 <!-- header --> 11 <!-- header -->
12 <div class="popup-body"> 12 <div class="popup-body">
13 <form class="popup-forms"> 13 <form class="popup-forms">
14 <div class="row"> 14 <div class="row">
15 <!-- input --> 15 <!-- input -->
16 <img :src="templateImage" /> 16 <img :src="templateImage" />
17 <!-- input --> 17 <!-- input -->
18 18
19 <!-- input --> 19 <!-- input -->
20 20
21 <!-- input --> 21 <!-- input -->
22 <!-- <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4"> 22 <!-- <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
23 <div class="form-group floating-label"> 23 <div class="form-group floating-label">
24 <select class="form-group"> 24 <select class="form-group">
25 <option @click="addSocialLink">Add another</option> 25 <option @click="addSocialLink">Add another</option>
26 </select> 26 </select>
27 <span class="select-arrow" 27 <span class="select-arrow"
28 ><img src="../assets/images/chevron-down.svg" 28 ><img src="../assets/images/chevron-down.svg"
29 /></span> 29 /></span>
30 </div> 30 </div>
31 </div> --> 31 </div> -->
32 <!-- input --> 32 <!-- input -->
33 </div> 33 </div>
34 </form> 34 </form>
35 </div> 35 </div>
36 <div class="clearfix"></div> 36 <div class="clearfix"></div>
37 </div> 37 </div>
38 <!-- add profile --> 38 <!-- add profile -->
39 </div> 39 </div>
40 <!-- profile --> 40 <!-- profile -->
41 <!-- profile --> 41 <!-- profile -->
42 <div class="container-fluid inner-wrp" style="background: transparent"> 42 <div class="container-fluid inner-wrp" style="background: transparent">
43 <nav class="navbar navbar-expand-sm spotLight-nav"> 43 <nav class="navbar navbar-expand-sm spotLight-nav">
44 <a class="navbar-brand" href="#" 44 <a class="navbar-brand" href="#"
45 ><img src="../assets/images/logo.png" 45 ><img src="../assets/images/logo.png"
46 /></a> 46 /></a>
47 <button 47 <button
48 class="navbar-toggler" 48 class="navbar-toggler"
49 type="button" 49 type="button"
50 data-toggle="collapse" 50 data-toggle="collapse"
51 data-target="#navbarsExample03" 51 data-target="#navbarsExample03"
52 aria-controls="navbarsExample03" 52 aria-controls="navbarsExample03"
53 aria-expanded="false" 53 aria-expanded="false"
54 aria-label="Toggle navigation" 54 aria-label="Toggle navigation"
55 > 55 >
56 <span class="navbar-toggler-icon"></span> 56 <span class="navbar-toggler-icon"></span>
57 <span class="navbar-toggler-icon"></span> 57 <span class="navbar-toggler-icon"></span>
58 <span class="navbar-toggler-icon"></span> 58 <span class="navbar-toggler-icon"></span>
59 </button> 59 </button>
60 60
61 <div class="collapse navbar-collapse" id="navbarsExample03"> 61 <div class="collapse navbar-collapse" id="navbarsExample03">
62 <ul class="navbar-nav mr-auto"> 62 <ul class="navbar-nav mr-auto">
63 <li class="nav-item active"> 63 <li class="nav-item active">
64 <a 64 <a
65 class="nav-link" 65 class="nav-link"
66 style="cursor: pointer" 66 style="cursor: pointer"
67 @click="listPage('/casestudy')" 67 @click="listPage('/casestudy')"
68 >Case Study List</a 68 >Case Study List</a
69 > 69 >
70 </li> 70 </li>
71 <li class="nav-item active"> 71 <li class="nav-item active">
72 <a 72 <a
73 class="nav-link" 73 class="nav-link"
74 style="cursor: pointer" 74 style="cursor: pointer"
75 @click="listPage('/insight')" 75 @click="listPage('/insight')"
76 >Create Insight</a 76 >Create Insight</a
77 > 77 >
78 </li> 78 </li>
79 </ul> 79 </ul>
80 </div> 80 </div>
81 <div class=""> 81 <div class="">
82 <a href="javascript:void(0);" @click="logout">Log Out </a> 82 <a href="javascript:void(0);" @click="logout">Log Out </a>
83 </div> 83 </div>
84 </nav> 84 </nav>
85 <!-- menu wrapper --> 85 <!-- menu wrapper -->
86 <div class="row profile-tab-spc-top"> 86 <div class="row profile-tab-spc-top">
87 <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4"> 87 <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
88 <div class="user-profile"> 88 <div class="user-profile">
89 <div class="form-group floating-label"> 89 <div class="form-group floating-label">
90 <select 90 <select
91 class="form-control" 91 class="form-control"
92 v-model="userData" 92 v-model="userData"
93 v-on:change="selectUser(userData)" 93 v-on:change="selectUser(userData)"
94 :disabled="editMode" 94 :disabled="editMode"
95 > 95 >
96 <option value="null">Select User</option> 96 <option value="null">Select User</option>
97 <option v-for="(user, i) in userList" :key="i" :value="i"> 97 <option v-for="(user, i) in userList" :key="i" :value="i">
98 {{ user.name }} ({{ user.email }}) 98 {{ user.name }} ({{ user.email }})
99 </option> 99 </option>
100 </select> 100 </select>
101 </div> 101 </div>
102 </div> 102 </div>
103 </div> 103 </div>
104 </div> 104 </div>
105 105
106 <div class="row"> 106 <div class="row">
107 <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4"> 107 <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
108 <ul class="navbar-nav mr-auto"> 108 <ul class="navbar-nav mr-auto">
109 <li class="nav-item active"> 109 <li class="nav-item active">
110 <h5 class="nav-link">Intro Screen Record</h5> 110 <h5 class="nav-link">Intro Screen Record</h5>
111 </li> 111 </li>
112 </ul> 112 </ul>
113 </div> 113 </div>
114 </div> 114 </div>
115 <!-- 1st row --> 115 <!-- 1st row -->
116 <div class="row"> 116 <div class="row">
117 <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4"> 117 <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
118 <div class="form-group floating-label"> 118 <div class="form-group floating-label">
119 <label for="lname" class="lname">Case Study Name</label> 119 <label for="lname" class="lname">Case Study Name</label>
120 <input 120 <input
121 type="text" 121 type="text"
122 class="form-control" 122 class="form-control"
123 value="" 123 value=""
124 placeholder=" " 124 placeholder=" "
125 v-model="caseStudy.caseStudyDetails.intro.name" 125 v-model="caseStudy.caseStudyDetails.intro.name"
126 /> 126 />
127 </div> 127 </div>
128 </div> 128 </div>
129 <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4"> 129 <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
130 <div class="form-group floating-label"> 130 <div class="form-group floating-label">
131 <label for="lname" class="lname">App Name</label> 131 <label for="lname" class="lname">App Name</label>
132 <input 132 <input
133 type="text" 133 type="text"
134 class="form-control" 134 class="form-control"
135 value="" 135 value=""
136 placeholder=" " 136 placeholder=" "
137 v-model="caseStudy.caseStudyDetails.intro.app" 137 v-model="caseStudy.caseStudyDetails.intro.app"
138 /> 138 />
139 </div> 139 </div>
140 </div> 140 </div>
141 <!-- <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4"> 141 <!-- <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
142 <div class="form-group floating-label"> 142 <div class="form-group floating-label">
143 <label for="lname" class="lname">Focus</label> 143 <label for="lname" class="lname">Focus</label>
144 <input 144 <input
145 type="text" 145 type="text"
146 class="form-control" 146 class="form-control"
147 value="" 147 value=""
148 placeholder=" " 148 placeholder=" "
149 v-model="caseStudy.caseStudyDetails.intro.focus" 149 v-model="caseStudy.caseStudyDetails.intro.focus"
150 /> 150 />
151 </div> 151 </div>
152 </div> --> 152 </div> -->
153 153
154 <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4"> 154 <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
155 <div class="form-group floating-label"> 155 <div class="form-group floating-label">
156 <label for="lname" class="lname"> App logo</label> 156 <label for="lname" class="lname"> App logo</label>
157 <img 157 <img
158 v-if="caseStudy.caseStudyDetails.intro.logoURL" 158 v-if="caseStudy.caseStudyDetails.intro.logoURL"
159 style="width: 40px; height: 40px" 159 style="width: 40px; height: 40px"
160 :src="caseStudy.caseStudyDetails.intro.logoURL" 160 :src="caseStudy.caseStudyDetails.intro.logoURL"
161 /> 161 />
162 <input 162 <input
163 @change="createImage('logo')" 163 @change="createImage('logo')"
164 type="file" 164 type="file"
165 name="photso" 165 name="photso"
166 id="logo" 166 id="logo"
167 accept="image/*" 167 accept="image/*"
168 /> 168 />
169 </div> 169 </div>
170 </div> 170 </div>
171 </div> 171 </div>
172 <!-- 1st row end --> 172 <!-- 1st row end -->
173 173
174 <!-- 2nd row --> 174 <!-- 2nd row -->
175 <div class="row"> 175 <div class="row">
176 <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4"> 176 <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
177 <div class="form-group floating-label"> 177 <div class="form-group floating-label">
178 <label for="lname" class="lname">Case Study Type</label> 178 <label for="lname" class="lname">Case Study Type</label>
179 <select 179 <select
180 class="form-control" 180 class="form-control"
181 v-model="caseStudy.caseStudyDetails.intro.type" 181 v-model="caseStudy.caseStudyDetails.intro.type"
182 > 182 >
183 <option value="null">Select Case Type</option> 183 <option value="null">Select Case Type</option>
184 <option value="Retake">Retake</option> 184 <option value="Retake">Retake</option>
185 <option value="Behind-the-scenes">Behind-the-scenes</option> 185 <option value="Behind-the-scenes">Behind-the-scenes</option>
186 <option value="Critique">Critique</option> 186 <option value="Critique">Critique</option>
187 <option value="Juxtapose">Juxtapose</option> 187 <option value="Juxtapose">Juxtapose</option>
188 </select> 188 </select>
189 </div> 189 </div>
190 </div> 190 </div>
191 <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4"> 191 <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
192 <div class="form-group floating-label"> 192 <div class="form-group floating-label">
193 <label for="lname" class="lname">Platform</label> 193 <label for="lname" class="lname">Platform</label>
194 <!-- <input 194 <!-- <input
195 type="text" 195 type="text"
196 class="form-control" 196 class="form-control"
197 value="" 197 value=""
198 placeholder=" " 198 placeholder=" "
199 v-model="caseStudy.caseStudyDetails.intro.platForm" 199 v-model="caseStudy.caseStudyDetails.intro.platForm"
200 /> --> 200 /> -->
201 <select 201 <select
202 class="form-control" 202 class="form-control"
203 v-model="selectPlatform" 203 v-model="selectPlatform"
204 @change="addInsight('platform')" 204 @change="addInsight('platform')"
205 > 205 >
206 <option value="null">Select Insight Tag</option> 206 <option value="null">Select Insight Tag</option>
207 <option value="Ios">Ios</option> 207 <option value="Ios">Ios</option>
208 <option value="Web">Web</option> 208 <option value="Web">Web</option>
209 <option value="Android">Android</option> 209 <option value="Android">Android</option>
210 </select> 210 </select>
211 </div> 211 </div>
212 </div> 212 </div>
213 <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4"> 213 <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
214 <div class="form-group floating-label"> 214 <div class="form-group floating-label">
215 <label for="lname" class="lname"></label> 215 <label for="lname" class="lname"></label>
216 <label for="lname" class="lname"></label> 216 <label for="lname" class="lname"></label>
217 <ul class="interests"> 217 <ul class="interests">
218 <!-- v-for="(interest, i) in caseStudy.caseStudyDetails 218 <!-- v-for="(interest, i) in caseStudy.caseStudyDetails
219 .insightTags" 219 .insightTags"
220 :key="i" --> 220 :key="i" -->
221 221
222 <li v-if="caseStudy.caseStudyDetails.intro.platForm"> 222 <li v-if="caseStudy.caseStudyDetails.intro.platForm">
223 <span>{{ caseStudy.caseStudyDetails.intro.platForm }}</span> 223 <span>{{ caseStudy.caseStudyDetails.intro.platForm }}</span>
224 <a 224 <a
225 href="javascript:void(0);" 225 href="javascript:void(0);"
226 @click="removeInsight(0, 'platform')" 226 @click="removeInsight(0, 'platform')"
227 class="cat-minus" 227 class="cat-minus"
228 ><img src="../assets/images/minus.svg" 228 ><img src="../assets/images/minus.svg"
229 /></a> 229 /></a>
230 </li> 230 </li>
231 </ul> 231 </ul>
232 </div> 232 </div>
233 </div> 233 </div>
234 </div> 234 </div>
235 <!-- 2nd row --> 235 <!-- 2nd row -->
236 <!-- 3rd row -->` 236 <!-- 3rd row -->`
237 <div class="row"> 237 <div class="row">
238 <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4"> 238 <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
239 <div class="form-group floating-label"> 239 <div class="form-group floating-label">
240 <label for="lname" class="lname"></label> 240 <label for="lname" class="lname"></label>
241 <ul class="interests"> 241 <ul class="interests">
242 <li> 242 <li>
243 <input 243 <input
244 class="" 244 class=""
245 placeholder="Add Focus Areas" 245 placeholder="Add Focus Areas"
246 v-model="focusName" 246 v-model="focusName"
247 v-on:keyup.enter="addInsight('focus')" 247 v-on:keyup.enter="addInsight('focus')"
248 /> 248 />
249 <a href="javascript:void(0);" @click="addInsight('focus')" 249 <a href="javascript:void(0);" @click="addInsight('focus')"
250 ><img src="../assets/images/plus-circle.svg" 250 ><img src="../assets/images/plus-circle.svg"
251 /></a> 251 /></a>
252 </li> 252 </li>
253 253
254 <li 254 <li
255 v-for="(interest, i) in caseStudy.caseStudyDetails.focusAreas" 255 v-for="(interest, i) in caseStudy.caseStudyDetails.focusAreas"
256 :key="i" 256 :key="i"
257 > 257 >
258 <span>{{ interest }}</span> 258 <span>{{ interest }}</span>
259 <a 259 <a
260 href="javascript:void(0);" 260 href="javascript:void(0);"
261 @click="removeInsight(i, 'focus')" 261 @click="removeInsight(i, 'focus')"
262 class="cat-minus" 262 class="cat-minus"
263 ><img src="../assets/images/minus.svg" 263 ><img src="../assets/images/minus.svg"
264 /></a> 264 /></a>
265 </li> 265 </li>
266 </ul> 266 </ul>
267 </div> 267 </div>
268 </div> 268 </div>
269 269
270 <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4"> 270 <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
271 <div class="form-group floating-label"> 271 <div class="form-group floating-label">
272 <label for="lname" class="lname">Select Insight Tags</label> 272 <label for="lname" class="lname">Select Insight Tags</label>
273 <select 273 <select
274 class="form-control" 274 class="form-control"
275 v-model="insightName" 275 v-model="insightName"
276 @change="addInsight('insight')" 276 @change="addInsight('insight')"
277 > 277 >
278 <option value="null">Select Insight Tag</option> 278 <option value="null">Select Insight Tag</option>
279 <option value="Design">Design</option> 279 <option value="Design">Design</option>
280 <option value="Product">Product</option> 280 <option value="Product">Product</option>
281 <option value="Marketing">Marketing</option> 281 <option value="Marketing">Marketing</option>
282 <option value="Pricing">Pricing</option> 282 <option value="Pricing">Pricing</option>
283 <option value="Psychology">Psychology</option> 283 <option value="Psychology">Psychology</option>
284 </select> 284 </select>
285 </div> 285 </div>
286 </div> 286 </div>
287 <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4"> 287 <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
288 <div class="form-group floating-label"> 288 <div class="form-group floating-label">
289 <label for="lname" class="lname"></label> 289 <label for="lname" class="lname"></label>
290 <ul class="interests"> 290 <ul class="interests">
291 <li 291 <li
292 v-for="(interest, i) in caseStudy.caseStudyDetails.insightTags" 292 v-for="(interest, i) in caseStudy.caseStudyDetails.insightTags"
293 :key="i" 293 :key="i"
294 > 294 >
295 <span>{{ interest }}</span> 295 <span>{{ interest }}</span>
296 <a 296 <a
297 href="javascript:void(0);" 297 href="javascript:void(0);"
298 @click="removeInsight(i, 'insight')" 298 @click="removeInsight(i, 'insight')"
299 class="cat-minus" 299 class="cat-minus"
300 ><img src="../assets/images/minus.svg" 300 ><img src="../assets/images/minus.svg"
301 /></a> 301 /></a>
302 </li> 302 </li>
303 </ul> 303 </ul>
304 </div> 304 </div>
305 </div> 305 </div>
306 </div> 306 </div>
307 <!-- 3rd row end --> 307 <!-- 3rd row end -->
308 308
309 <!-- outdor --> 309 <!-- outdor -->
310 <div class="row profile-tab-spc-top"> 310 <div class="row profile-tab-spc-top">
311 <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4"> 311 <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
312 <ul class="navbar-nav mr-auto"> 312 <ul class="navbar-nav mr-auto">
313 <li class="nav-item active"> 313 <li class="nav-item active">
314 <h5 class="nav-link">Outro Screen Record</h5> 314 <h5 class="nav-link">Outro Screen Record</h5>
315 </li> 315 </li>
316 </ul> 316 </ul>
317 </div> 317 </div>
318 </div> 318 </div>
319 319
320 <!-- 1st row --> 320 <!-- 1st row -->
321 <div class="row"> 321 <div class="row">
322 <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4"> 322 <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
323 <div class="form-group floating-label"> 323 <div class="form-group floating-label">
324 <label for="lname" class="lname">Designer Name</label> 324 <label for="lname" class="lname">Designer Name</label>
325 <input 325 <input
326 type="text" 326 type="text"
327 class="form-control" 327 class="form-control"
328 value="" 328 value=""
329 placeholder=" " 329 placeholder=" "
330 v-model="caseStudy.caseStudyDetails.outro.designer" 330 v-model="caseStudy.caseStudyDetails.outro.designer"
331 /> 331 />
332 </div> 332 </div>
333 </div> 333 </div>
334 334
335 <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4"> 335 <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
336 <div class="form-group floating-label"> 336 <div class="form-group floating-label">
337 <label for="lname" class="lname">Illustrations Name</label> 337 <label for="lname" class="lname">Illustrations Name</label>
338 <input 338 <input
339 type="text" 339 type="text"
340 class="form-control" 340 class="form-control"
341 value="" 341 value=""
342 placeholder=" " 342 placeholder=" "
343 v-model="caseStudy.caseStudyDetails.outro.illustrations" 343 v-model="caseStudy.caseStudyDetails.outro.illustrations"
344 /> 344 />
345 </div> 345 </div>
346 </div> 346 </div>
347 347
348 <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4"> 348 <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
349 <div class="form-group floating-label"> 349 <div class="form-group floating-label">
350 <label for="lname" class="lname"> Author Image</label> 350 <label for="lname" class="lname"> Author Image</label>
351 <img 351 <img
352 v-if="caseStudy.caseStudyDetails.outro.authorImage[0]" 352 v-if="caseStudy.caseStudyDetails.outro.authorImage[0]"
353 style="width: 40px; height: 40px" 353 style="width: 40px; height: 40px"
354 :src="caseStudy.caseStudyDetails.outro.authorImage[0]" 354 :src="caseStudy.caseStudyDetails.outro.authorImage[0]"
355 /> 355 />
356 <input 356 <input
357 @change="createImage('outdor')" 357 @change="createImage('outdor')"
358 type="file" 358 type="file"
359 name="photos" 359 name="photos"
360 id="outdor" 360 id="outdor"
361 accept="image/*" 361 accept="image/*"
362 /> 362 />
363 </div> 363 </div>
364 </div> 364 </div>
365 </div> 365 </div>
366 <!-- 1st row --> 366 <!-- 1st row -->
367 <!-- outdoor ends --> 367 <!-- outdoor ends -->
368 368
369 <!-- outdor --> 369 <!-- outdor -->
370 <div class="row profile-tab-spc-top"> 370 <div class="row profile-tab-spc-top">
371 <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4"> 371 <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
372 <ul class="navbar-nav mr-auto"> 372 <ul class="navbar-nav mr-auto">
373 <li class="nav-item active"> 373 <li class="nav-item active">
374 <h5 class="nav-link">Add SLides</h5> 374 <h5 class="nav-link">Add SLides</h5>
375 </li> 375 </li>
376 </ul> 376 </ul>
377 </div> 377 </div>
378 </div> 378 </div>
379 379
380 <!-- case study slides--> 380 <!-- case study slides-->
381 <div 381 <div
382 class="row profile-tab-spc-top" 382 class="row profile-tab-spc-top"
383 v-for="(slide, i) in caseStudy.slides" 383 v-for="(slide, i) in caseStudy.slides"
384 :key="i" 384 :key="i"
385 > 385 >
386 <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4"> 386 <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
387 <ul class="navbar-nav mr-auto"> 387 <ul class="navbar-nav mr-auto">
388 <li class="nav-item active"> 388 <li class="nav-item active">
389 <p class="nav-link"> 389 <p class="nav-link">
390 <b>Screen {{ i + 1 }}</b> 390 <b>Screen {{ i + 1 }}</b>
391 <a 391 <a
392 style="cursor: pointer; color: red; font-size: 0.8rem" 392 style="cursor: pointer; color: red; font-size: 0.8rem"
393 @click="removeSlide(i)" 393 @click="removeSlide(i)"
394 > 394 >
395 Remove</a 395 Remove</a
396 > 396 >
397 <a 397 <a
398 style="cursor: pointer; color: blue; font-size: 0.8rem" 398 style="cursor: pointer; color: blue; font-size: 0.8rem"
399 @click="addProfileDialog(slide)" 399 @click="addProfileDialog(slide)"
400 > 400 >
401 View</a 401 View</a
402 > 402 >
403 </p> 403 </p>
404 </li> 404 </li>
405 <li class="nav-item active" v-if="slide.insight"> 405 <li class="nav-item active" v-if="slide.insight">
406 <div class="form-group floating-label"> 406 <div class="form-group floating-label">
407 <label for="lname" class="lname">Insight</label> 407 <label for="lname" class="lname">Insight</label>
408 <select 408 <select
409 class="form-control" 409 class="form-control"
410 v-model="insightId" 410 v-model="insightId"
411 v-on:change="insightSelected(slide)" 411 v-on:change="insightSelected(slide)"
412 > 412 >
413 <option value="null">Select Insight</option> 413 <option value="null">Select Insight</option>
414 <option 414 <option
415 v-for="(insight, i) in insightList" 415 v-for="(insight, i) in insightList"
416 :key="i" 416 :key="i"
417 :value="insight._id" 417 :value="insight._id"
418 > 418 >
419 {{ insight.title }} 419 {{ insight.title }}
420 </option> 420 </option>
421 </select> 421 </select>
422 </div> 422 </div>
423 </li> 423 </li>
424 </ul> 424 </ul>
425 </div> 425 </div>
426 426
427 <div class="row"> 427 <div class="row">
428 <div 428 <div
429 class="col-sm-4 col-md-4 col-lg-4 col-xl-4" 429 class="col-sm-4 col-md-4 col-lg-4 col-xl-4"
430 v-for="(field, j) in slide.metaData.fields" 430 v-for="(field, j) in slide.metaData.fields"
431 :key="j" 431 :key="j"
432 > 432 >
433 <div 433 <div
434 class="form-group floating-label" 434 class="form-group floating-label"
435 v-if="field.fieldType == 'text'" 435 v-if="field.fieldType == 'text'"
436 > 436 >
437 <label for="lname" class="lname">{{ field.displayName }}</label> 437 <label for="lname" class="lname">{{ field.displayName }}</label>
438 <input 438 <input
439 type="text" 439 type="text"
440 class="form-control" 440 class="form-control"
441 value="" 441 value=""
442 placeholder=" " 442 placeholder=" "
443 v-model="field.fieldValue" 443 v-model="field.fieldValue"
444 /> 444 />
445 </div> 445 </div>
446 <div
447 class="form-group floating-label"
448 v-if="field.fieldType == 'Number'"
449 >
450 <label for="lname" class="lname">{{ field.displayName }}</label>
451 <input
452 type="text"
453 class="form-control"
454 value=""
455 placeholder=" "
456 v-model="field.fieldValue"
457 />
458 </div>
446 459
447 <div 460 <div
448 class="form-group floating-label" 461 class="form-group floating-label"
449 v-if="field.fieldType == 'image'" 462 v-if="field.fieldType == 'image'"
450 > 463 >
451 <label for="lname" class="lname"> {{ field.displayName }}</label> 464 <label for="lname" class="lname"> {{ field.displayName }}</label>
452 <img 465 <img
453 v-if="field.fieldValue" 466 v-if="field.fieldValue"
454 style="width: 40px; height: 40px" 467 style="width: 40px; height: 40px"
455 :src="field.fieldValue" 468 :src="field.fieldValue"
456 /> 469 />
457 <input 470 <input
458 @change="fieldcreateImage(i, j)" 471 @change="fieldcreateImage(i, j)"
459 type="file" 472 type="file"
460 name="photo" 473 name="photo"
461 :id="i + '' + j" 474 :id="i + '' + j"
462 accept="image/*" 475 accept="image/*"
463 /> 476 />
464 </div> 477 </div>
465 </div> 478 </div>
466 </div> 479 </div>
467 480
468 <div class="row"> 481 <div class="row">
469 <div 482 <div
470 class="col-sm-4 col-md-4 col-lg-4 col-xl-4" 483 class="col-sm-4 col-md-4 col-lg-4 col-xl-4"
471 v-for="(cum, j) in slide.metaData.comments" 484 v-for="(cum, j) in slide.metaData.comments"
472 :key="j" 485 :key="j"
473 > 486 >
474 <div class="form-group floating-label"> 487 <div class="form-group floating-label">
475 <label for="lname" class="lname">Comment Box {{ j + 1 }}</label> 488 <label for="lname" class="lname">Comment Box {{ j + 1 }}</label>
476 <input 489 <input
477 type="text" 490 type="text"
478 class="form-control" 491 class="form-control"
479 value="" 492 value=""
480 placeholder=" " 493 placeholder=" "
481 v-model="cum.comment" 494 v-model="cum.comment"
482 v-on:blur="updateComment(cum)" 495 v-on:blur="updateComment(cum)"
483 /> 496 />
484 </div> 497 </div>
485 </div> 498 </div>
486 </div> 499 </div>
487 </div> 500 </div>
488 501
489 <!-- 1st row --> 502 <!-- 1st row -->
490 <div class="row"> 503 <div class="row">
491 <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4"> 504 <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
492 <div class="form-group floating-label"> 505 <div class="form-group floating-label">
493 <label for="lname" class="lname">Slides Name</label> 506 <label for="lname" class="lname">Slides Name</label>
494 <select 507 <select
495 class="form-control" 508 class="form-control"
496 v-model="slideId" 509 v-model="slideId"
497 v-on:change="slideSelected(slideId)" 510 v-on:change="slideSelected(slideId)"
498 > 511 >
499 <option value="null">Select Slide</option> 512 <option value="null">Select Slide</option>
500 <option v-for="(template, i) in templateList" :key="i" :value="i"> 513 <option v-for="(template, i) in templateList" :key="i" :value="i">
501 {{ template.name }} 514 {{ template.name }}
502 </option> 515 </option>
503 </select> 516 </select>
504 </div> 517 </div>
505 </div> 518 </div>
506 </div> 519 </div>
507 <!-- 1st row --> 520 <!-- 1st row -->
508 521
509 <!-- 1st row end --> 522 <!-- 1st row end -->
510 <!-- case study ends --> 523 <!-- case study ends -->
511 <div class="clearfix"></div> 524 <div class="clearfix"></div>
512 525
513 <!-- users land image --> 526 <!-- users land image -->
514 <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4"> 527 <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
515 <div class="form-layout signup-frm-spc"> 528 <div class="form-layout signup-frm-spc">
516 <form> 529 <form>
517 <a 530 <a
518 href="javascript:void(0);" 531 href="javascript:void(0);"
519 class="btn btn-lg sb-button" 532 class="btn btn-lg sb-button"
520 type="submit" 533 type="submit"
521 @click="submit" 534 @click="submit"
522 > 535 >
523 <img src="../assets/images/key.svg" /> submit 536 <img src="../assets/images/key.svg" /> submit
524 </a> 537 </a>
525 </form> 538 </form>
526 </div> 539 </div>
527 </div> 540 </div>
528 541
529 <!-- data wrp --> 542 <!-- data wrp -->
530 <!-- body wrapper --> 543 <!-- body wrapper -->
531 </div> 544 </div>
532 </main> 545 </main>
533 </template> 546 </template>
534 547
535 <script> 548 <script>
536 import Vue from "vue"; 549 import Vue from "vue";
537 import router from "../router"; 550 import router from "../router";
538 import $ from "jquery"; 551 import $ from "jquery";
539 import axios from "axios"; 552 import axios from "axios";
540 553
541 export default { 554 export default {
542 name: "Profile", 555 name: "Profile",
543 556
544 data() { 557 data() {
545 return { 558 return {
546 object: null, 559 object: null,
547 loggedinFlag: false, 560 loggedinFlag: false,
548 templateImage: null, 561 templateImage: null,
549 caseId: null, 562 caseId: null,
550 editMode: false, 563 editMode: false,
551 userData: null, 564 userData: null,
552 usertoken: null, 565 usertoken: null,
553 insightName: null, 566 insightName: null,
554 focusName: null, 567 focusName: null,
555 slideId: null, 568 slideId: null,
556 userList: [], 569 userList: [],
557 templateList: [], 570 templateList: [],
558 insightList: [], 571 insightList: [],
559 insightId: null, 572 insightId: null,
560 caseStudy: { 573 caseStudy: {
561 caseStudyDetails: { 574 caseStudyDetails: {
562 userId: [], 575 userId: [],
563 intro: { 576 intro: {
564 name: null, 577 name: null,
565 logoURL: null, 578 logoURL: null,
566 app: null, 579 app: null,
567 type: null, 580 type: null,
568 readTime: null, 581 readTime: null,
569 platForm: null, 582 platForm: null,
570 authors: [], 583 authors: [],
571 }, 584 },
572 outro: { 585 outro: {
573 authorImage: [], 586 authorImage: [],
574 authors: [], 587 authors: [],
575 designer: null, 588 designer: null,
576 illustrations: null, 589 illustrations: null,
577 }, 590 },
578 insightTags: [], 591 insightTags: [],
579 focusAreas: [], 592 focusAreas: [],
580 }, 593 },
581 slides: [], 594 slides: [],
582 }, 595 },
583 selectPlatform: "", 596 selectPlatform: "",
584 }; 597 };
585 }, 598 },
586 mounted() { 599 mounted() {
587 if (this.$route.fullPath.split("?").length == 2) { 600 if (this.$route.fullPath.split("?").length == 2) {
588 this.editMode = true; 601 this.editMode = true;
589 this.caseId = this.$route.fullPath.split("?")[1]; 602 this.caseId = this.$route.fullPath.split("?")[1];
590 var introData = localStorage.getItem("spotlight_caseStudy" + this.caseId); 603 var introData = localStorage.getItem("spotlight_caseStudy" + this.caseId);
591 if (introData) { 604 if (introData) {
592 introData = JSON.parse(introData); 605 introData = JSON.parse(introData);
593 console.log("introData", introData); 606 console.log("introData", introData);
594 if (introData.intro.focus) { 607 if (introData.intro.focus) {
595 delete introData.intro.focus; 608 delete introData.intro.focus;
596 } 609 }
597 this.caseStudy.caseStudyDetails.intro = introData.intro; 610 this.caseStudy.caseStudyDetails.intro = introData.intro;
598 this.caseStudy.caseStudyDetails.userId = introData.userId; 611 this.caseStudy.caseStudyDetails.userId = introData.userId;
599 this.caseStudy.caseStudyDetails.outro = introData.outro; 612 this.caseStudy.caseStudyDetails.outro = introData.outro;
600 this.caseStudy.caseStudyDetails.insightTags = introData.insightTags; 613 this.caseStudy.caseStudyDetails.insightTags = introData.insightTags;
601 this.caseStudy.caseStudyDetails.focusAreas = introData.focusAreas; 614 this.caseStudy.caseStudyDetails.focusAreas = introData.focusAreas;
602 this.selectPlatform = introData.intro.platForm; 615 this.selectPlatform = introData.intro.platForm;
603 console.log("this.selectPlatform", this.selectPlatform); 616 console.log("this.selectPlatform", this.selectPlatform);
604 } 617 }
605 } 618 }
606 var userdata = localStorage.getItem("spotlight_usertoken"); 619 var userdata = localStorage.getItem("spotlight_usertoken");
607 if (userdata) { 620 if (userdata) {
608 userdata = JSON.parse(userdata); 621 userdata = JSON.parse(userdata);
609 this.usertoken = userdata.token; 622 this.usertoken = userdata.token;
610 this.getUserList(); 623 this.getUserList();
611 this.getTemplateList(); 624 this.getTemplateList();
612 this.getInsightList(); 625 this.getInsightList();
613 } 626 }
614 }, 627 },
615 methods: { 628 methods: {
616 selectUser(i) { 629 selectUser(i) {
617 this.userList[i]; 630 this.userList[i];
618 this.caseStudy.caseStudyDetails.intro.authors.push(this.userList[i].name); 631 this.caseStudy.caseStudyDetails.intro.authors.push(this.userList[i].name);
619 this.caseStudy.caseStudyDetails.outro.authors.push(this.userList[i].name); 632 this.caseStudy.caseStudyDetails.outro.authors.push(this.userList[i].name);
620 this.caseStudy.caseStudyDetails.userId.push(this.userList[i]._id); 633 this.caseStudy.caseStudyDetails.userId.push(this.userList[i]._id);
621 console.log("-", this.caseStudy); 634 console.log("-", this.caseStudy);
622 }, 635 },
623 636
624 logout() { 637 logout() {
625 this.$router.push("/"); 638 this.$router.push("/");
626 }, 639 },
627 addInsight(type) { 640 addInsight(type) {
628 if (type == "focus") { 641 if (type == "focus") {
629 this.caseStudy.caseStudyDetails.focusAreas.push(this.focusName); 642 this.caseStudy.caseStudyDetails.focusAreas.push(this.focusName);
630 this.focusName = null; 643 this.focusName = null;
631 } else if (type == "insight") { 644 } else if (type == "insight") {
632 this.caseStudy.caseStudyDetails.insightTags.push(this.insightName); 645 this.caseStudy.caseStudyDetails.insightTags.push(this.insightName);
633 this.insightName = null; 646 this.insightName = null;
634 } else if (type == "platform") { 647 } else if (type == "platform") {
635 this.caseStudy.caseStudyDetails.intro.platForm = this.selectPlatform; 648 this.caseStudy.caseStudyDetails.intro.platForm = this.selectPlatform;
636 // this.selectPlatform = null; 649 // this.selectPlatform = null;
637 } 650 }
638 }, 651 },
639 removeInsight(i, type) { 652 removeInsight(i, type) {
640 if (type == "focus") { 653 if (type == "focus") {
641 this.caseStudy.caseStudyDetails.focusAreas.splice(i, 1); 654 this.caseStudy.caseStudyDetails.focusAreas.splice(i, 1);
642 } else if (type == "insight") { 655 } else if (type == "insight") {
643 this.caseStudy.caseStudyDetails.insightTags.splice(i, 1); 656 this.caseStudy.caseStudyDetails.insightTags.splice(i, 1);
644 } else if (type == "platform") { 657 } else if (type == "platform") {
645 this.caseStudy.caseStudyDetails.intro.platForm = ""; 658 this.caseStudy.caseStudyDetails.intro.platForm = "";
646 this.selectPlatform = null; 659 this.selectPlatform = null;
647 } 660 }
648 }, 661 },
649 662
650 async slideSelected(i) { 663 async slideSelected(i) {
651 console.log("id is", this.templateList[i]); 664 console.log("id is", this.templateList[i]);
652 this.object = JSON.parse(JSON.stringify(this.templateList[i])); 665 this.object = JSON.parse(JSON.stringify(this.templateList[i]));
653 666
654 // var keys = Object.keys(this.templateList[i]); 667 // var keys = Object.keys(this.templateList[i]);
655 // keys.forEach(element => { 668 // keys.forEach(element => {
656 // obj[element] = this.templateList[i][element]; 669 // obj[element] = this.templateList[i][element];
657 // }); 670 // });
658 671
659 console.log("obj", this.object); 672 console.log("obj", this.object);
660 // slideMetadata = await this.getMeatda(this.templateList[i]._id); 673 // slideMetadata = await this.getMeatda(this.templateList[i]._id);
661 this.slideId = null; 674 this.slideId = null;
662 // this.templateList[i].metaData = slideMetadata.metaData; 675 // this.templateList[i].metaData = slideMetadata.metaData;
663 this.caseStudy.slides.push(this.object); 676 this.caseStudy.slides.push(this.object);
664 this.templateList[i].metaData.fields.forEach((fields_) => { 677 this.templateList[i].metaData.fields.forEach((fields_) => {
665 fields_.fieldValue == null; 678 fields_.fieldValue == null;
666 }); 679 });
667 if (this.templateList[i].metaData.comments) { 680 if (this.templateList[i].metaData.comments) {
668 this.templateList[i].metaData.comments.forEach((coments_) => { 681 this.templateList[i].metaData.comments.forEach((coments_) => {
669 coments_.comment == null; 682 coments_.comment == null;
670 }); 683 });
671 } 684 }
672 console.log("this.caseStudy.slides", this.caseStudy.slides); 685 console.log("this.caseStudy.slides", this.caseStudy.slides);
673 }, 686 },
674 async insightSelected(data) { 687 async insightSelected(data) {
675 // this.caseStudy.slides.push(this.templateList[i]); 688 // this.caseStudy.slides.push(this.templateList[i]);
676 689
677 console.log("data", data); 690 console.log("data", data);
678 data.insightId = this.insightId; 691 data.insightId = this.insightId;
679 // this.insightId = null; 692 // this.insightId = null;
680 }, 693 },
681 694
682 removeSlide(i) { 695 removeSlide(i) {
683 this.caseStudy.slides.splice(i, 1); 696 this.caseStudy.slides.splice(i, 1);
684 }, 697 },
685 698
686 createImage(type) { 699 createImage(type) {
687 var that = this; 700 var that = this;
688 console.log(document.getElementById(type)); 701 console.log(document.getElementById(type));
689 var file = document.getElementById(type).files[0]; 702 var file = document.getElementById(type).files[0];
690 console.log("file", file); 703 console.log("file", file);
691 var reader = new FileReader(); 704 var reader = new FileReader();
692 reader.onload = function (e) { 705 reader.onload = function (e) {
693 console.log("e.target.result ", e.target.result); 706 console.log("e.target.result ", e.target.result);
694 that.uploadImage(type, e.target.result); 707 that.uploadImage(type, e.target.result);
695 }; 708 };
696 reader.onerror = function (error) { 709 reader.onerror = function (error) {
697 alert(error); 710 alert(error);
698 }; 711 };
699 if (file) { 712 if (file) {
700 reader.readAsDataURL(file); 713 reader.readAsDataURL(file);
701 } 714 }
702 }, 715 },
703 uploadImage(type, base64) { 716 uploadImage(type, base64) {
704 console.log("type", type); 717 console.log("type", type);
705 var obj = { 718 var obj = {
706 image: base64, 719 image: base64,
707 }; 720 };
708 axios 721 axios
709 .post("/superAdmin/uploadImage", obj, { 722 .post("/superAdmin/uploadImage", obj, {
710 headers: { 723 headers: {
711 Authorization: "Bearer " + this.usertoken, 724 Authorization: "Bearer " + this.usertoken,
712 }, 725 },
713 }) 726 })
714 .then((response) => { 727 .then((response) => {
715 if (type == "logo") { 728 if (type == "logo") {
716 setTimeout( 729 setTimeout(
717 () => 730 () =>
718 (this.caseStudy.caseStudyDetails.intro.logoURL = 731 (this.caseStudy.caseStudyDetails.intro.logoURL =
719 response.data.data), 732 response.data.data),
720 99 733 99
721 ); 734 );
722 } else if (type == "outdor") { 735 } else if (type == "outdor") {
723 this.caseStudy.caseStudyDetails.outro.authorImage = []; 736 this.caseStudy.caseStudyDetails.outro.authorImage = [];
724 setTimeout( 737 setTimeout(
725 () => 738 () =>
726 this.caseStudy.caseStudyDetails.outro.authorImage.push( 739 this.caseStudy.caseStudyDetails.outro.authorImage.push(
727 response.data.data 740 response.data.data
728 ), 741 ),
729 99 742 99
730 ); 743 );
731 } 744 }
732 745
733 console.log(response.data.data); 746 console.log(response.data.data);
734 console.log(this.caseStudy); 747 console.log(this.caseStudy);
735 }) 748 })
736 .catch((error) => { 749 .catch((error) => {
737 if (error.response) { 750 if (error.response) {
738 this.$toaster.error(error.response.data.message); 751 this.$toaster.error(error.response.data.message);
739 } 752 }
740 }); 753 });
741 }, 754 },
742 755
743 fieldcreateImage(i, j) { 756 fieldcreateImage(i, j) {
744 console.log("i", i); 757 console.log("i", i);
745 console.log("j", j); 758 console.log("j", j);
746 var that = this; 759 var that = this;
747 var id = i + "" + j; 760 var id = i + "" + j;
748 console.log(document.getElementById(id)); 761 console.log(document.getElementById(id));
749 var file = document.getElementById(id).files[0]; 762 var file = document.getElementById(id).files[0];
750 // var file = document.querySelector("input[type=file]").files[0]; 763 // var file = document.querySelector("input[type=file]").files[0];
751 console.log("file", file); 764 console.log("file", file);
752 var reader = new FileReader(); 765 var reader = new FileReader();
753 reader.onload = function (e) { 766 reader.onload = function (e) {
754 // console.log("e.target.result ",e.target.result ) 767 // console.log("e.target.result ",e.target.result )
755 that.fielduploadImage(i, j, e.target.result); 768 that.fielduploadImage(i, j, e.target.result);
756 }; 769 };
757 reader.onerror = function (error) { 770 reader.onerror = function (error) {
758 alert(error); 771 alert(error);
759 }; 772 };
760 if (file) { 773 if (file) {
761 reader.readAsDataURL(file); 774 reader.readAsDataURL(file);
762 } 775 }
763 }, 776 },
764 fielduploadImage(i, j, base64) { 777 fielduploadImage(i, j, base64) {
765 var obj = { 778 var obj = {
766 image: base64, 779 image: base64,
767 }; 780 };
768 axios 781 axios
769 .post("/superAdmin/uploadImage", obj, { 782 .post("/superAdmin/uploadImage", obj, {
770 headers: { 783 headers: {
771 Authorization: "Bearer " + this.usertoken, 784 Authorization: "Bearer " + this.usertoken,
772 }, 785 },
773 }) 786 })
774 .then((response) => { 787 .then((response) => {
775 setTimeout( 788 setTimeout(
776 () => 789 () =>
777 (this.caseStudy.slides[i].metaData.fields[j].fieldValue = 790 (this.caseStudy.slides[i].metaData.fields[j].fieldValue =
778 response.data.data), 791 response.data.data),
779 10 792 10
780 ); 793 );
781 794
782 console.log(response.data.data); 795 console.log(response.data.data);
783 console.log(this.caseStudy); 796 console.log(this.caseStudy);
784 }) 797 })
785 .catch((error) => { 798 .catch((error) => {
786 if (error.response) { 799 if (error.response) {
787 this.$toaster.error(error.response.data.message); 800 this.$toaster.error(error.response.data.message);
788 } 801 }
789 }); 802 });
790 }, 803 },
791 804
792 getUserList() { 805 getUserList() {
793 axios 806 axios
794 .get("/superAdmin/users", { 807 .get("/superAdmin/users", {
795 headers: { 808 headers: {
796 Authorization: "Bearer " + this.usertoken, 809 Authorization: "Bearer " + this.usertoken,
797 }, 810 },
798 }) 811 })
799 .then((response) => { 812 .then((response) => {
800 response.data.data.forEach((element) => { 813 response.data.data.forEach((element) => {
801 if (element.name) { 814 if (element.name) {
802 this.userList.push(element); 815 this.userList.push(element);
803 } 816 }
804 }); 817 });
805 console.log("response", this.userList); 818 console.log("response", this.userList);
806 }) 819 })
807 .catch((error) => console.log(error)); 820 .catch((error) => console.log(error));
808 }, 821 },
809 822
810 getTemplateList() { 823 getTemplateList() {
811 axios 824 axios
812 .get("/superAdmin/templates", { 825 .get("/superAdmin/templates", {
813 headers: { 826 headers: {
814 Authorization: "Bearer " + this.usertoken, 827 Authorization: "Bearer " + this.usertoken,
815 }, 828 },
816 }) 829 })
817 .then((response) => { 830 .then((response) => {
818 response.data.data.forEach((temp) => { 831 response.data.data.forEach((temp) => {
819 if ( 832 if (
820 temp._id != "INTRO_oqkdMOVDrwRptsdWJ6Ye" && 833 temp._id != "INTRO_oqkdMOVDrwRptsdWJ6Ye" &&
821 temp._id != "OUTRO_oqkdMOVDrwRptsdWJ6Ye" 834 temp._id != "OUTRO_oqkdMOVDrwRptsdWJ6Ye"
822 ) { 835 ) {
823 if (temp.bounceBoard) { 836 if (temp.bounceBoard) {
824 for (var i = 0; i < temp.commentBox; i++) { 837 for (var i = 0; i < temp.commentBox; i++) {
825 temp.metaData.comments.push({ 838 temp.metaData.comments.push({
826 userId: null, 839 userId: null,
827 slideId: null, 840 slideId: null,
828 caseStudyId: null, 841 caseStudyId: null,
829 comment: null, 842 comment: null,
830 }); 843 });
831 } 844 }
832 } 845 }
833 this.templateList.push(temp); 846 this.templateList.push(temp);
834 } 847 }
835 }); 848 });
836 if (this.editMode) { 849 if (this.editMode) {
837 this.getSLideData(); 850 this.getSLideData();
838 } 851 }
839 console.log("templates", this.templateList); 852 console.log("templates", this.templateList);
840 }) 853 })
841 .catch((error) => console.log(error)); 854 .catch((error) => console.log(error));
842 }, 855 },
843 getInsightList() { 856 getInsightList() {
844 axios 857 axios
845 .get("/superAdmin/insight", { 858 .get("/superAdmin/insight", {
846 headers: { 859 headers: {
847 Authorization: "Bearer " + this.usertoken, 860 Authorization: "Bearer " + this.usertoken,
848 }, 861 },
849 }) 862 })
850 .then((response) => { 863 .then((response) => {
851 this.insightList = response.data.data; 864 this.insightList = response.data.data;
852 865
853 console.log("insight", response.data.data); 866 console.log("insight", response.data.data);
854 }) 867 })
855 .catch((error) => console.log(error)); 868 .catch((error) => console.log(error));
856 }, 869 },
857 870
858 getSLideData() { 871 getSLideData() {
859 axios 872 axios
860 .get("/superAdmin/caseStudySlides?caseStudyId=" + this.caseId, { 873 .get("/superAdmin/caseStudySlides?caseStudyId=" + this.caseId, {
861 headers: { 874 headers: {
862 Authorization: "Bearer " + this.usertoken, 875 Authorization: "Bearer " + this.usertoken,
863 }, 876 },
864 }) 877 })
865 .then((response) => { 878 .then((response) => {
866 var finalArray = []; 879 var finalArray = [];
867 console.log("1"); 880 console.log("1");
868 response.data.data.forEach((template_) => { 881 response.data.data.forEach((template_) => {
869 console.log("template_", template_); 882 console.log("template_", template_);
870 var keys = []; 883 var keys = [];
871 var i = this.templateList.findIndex( 884 var i = this.templateList.findIndex(
872 (temp_) => temp_._id == template_.templateId 885 (temp_) => temp_._id == template_.templateId
873 ); 886 );
874 var obj = { 887 var obj = {
875 _id: this.templateList[i]._id, 888 _id: this.templateList[i]._id,
876 bounceBoard: this.templateList[i].bounceBoard, 889 bounceBoard: this.templateList[i].bounceBoard,
877 insight: this.templateList[i].insight, 890 insight: this.templateList[i].insight,
878 slideId: template_._id, 891 slideId: template_._id,
879 // commentBox: this.templateList[i].commentBox, 892 // commentBox: this.templateList[i].commentBox,
880 metaData: { 893 metaData: {
881 fields: [], 894 fields: [],
882 comments: [], 895 comments: [],
883 }, 896 },
884 }; 897 };
885 console.log("2"); 898 console.log("2");
886 899
887 if (this.templateList[i].bounceBoard) { 900 if (this.templateList[i].bounceBoard) {
888 obj.commentBox = this.templateList[i].commentBox; 901 obj.commentBox = this.templateList[i].commentBox;
889 obj.metaData.comments = template_.comments; 902 obj.metaData.comments = template_.comments;
890 } 903 }
891 if (this.templateList[i].insight) { 904 if (this.templateList[i].insight) {
892 obj.insightId = template_.insightId; 905 obj.insightId = template_.insightId;
893 } 906 }
894 var fieldArray = []; 907 var fieldArray = [];
895 console.log("3"); 908 console.log("3");
896 909
897 this.templateList[i].metaData.fields.forEach((element) => { 910 this.templateList[i].metaData.fields.forEach((element) => {
898 var fieldobj = { 911 var fieldobj = {
899 fieldName: element.fieldName, 912 fieldName: element.fieldName,
900 displayName: element.displayName, 913 displayName: element.displayName,
901 fieldValue: template_.metaData[element.fieldName], 914 fieldValue: template_.metaData[element.fieldName],
902 fieldType: element.fieldType, 915 fieldType: element.fieldType,
903 }; 916 };
904 obj.metaData.fields.push(fieldobj); 917 obj.metaData.fields.push(fieldobj);
905 }); 918 });
906 console.log("4"); 919 console.log("4");
907 920
908 finalArray.push(obj); 921 finalArray.push(obj);
909 if(template_.insight){ 922 if(template_.insight){
910 this.insightId = template_.insight._id; 923 this.insightId = template_.insight._id;
911 } 924 }
912 }); 925 });
913 console.log("5"); 926 console.log("5");
914 927
915 this.caseStudy.slides = finalArray; 928 this.caseStudy.slides = finalArray;
916 console.log("----", finalArray); 929 console.log("----", finalArray);
917 console.log(this.templateList, "getSLideData==>"); 930 console.log(this.templateList, "getSLideData==>");
918 }) 931 })
919 .catch((error) => console.log(error)); 932 .catch((error) => console.log(error));
920 }, 933 },
921 934
922 submit() { 935 submit() {
923 const latest = Object.create(this.caseStudy); 936 const latest = Object.create(this.caseStudy);
924 937
925 var slidArray = []; 938 var slidArray = [];
926 latest.slides.forEach((slides) => { 939 latest.slides.forEach((slides) => {
927 console.log("slides", slides); 940 console.log("slides", slides);
928 var slideData = {}; 941 var slideData = {};
929 slideData.templateId = slides._id; 942 slideData.templateId = slides._id;
930 slideData.bounceBoard = slides.bounceBoard; 943 slideData.bounceBoard = slides.bounceBoard;
931 slideData.insight = slides.insight; 944 slideData.insight = slides.insight;
932 if (slides.slideId) { 945 if (slides.slideId) {
933 slideData.slideId = slides.slideId; 946 slideData.slideId = slides.slideId;
934 } 947 }
935 if (slides.insightId) { 948 if (slides.insightId) {
936 slideData.insightId = slides.insightId; 949 slideData.insightId = slides.insightId;
937 } 950 }
938 if (slides.metaData.comments && slides.metaData.comments.length > 0) { 951 if (slides.metaData.comments && slides.metaData.comments.length > 0) {
939 slideData.comments = slides.metaData.comments; 952 slideData.comments = slides.metaData.comments;
940 // this.getSLideData(); 953 // this.getSLideData();
941 } 954 }
942 // var comments = []; 955 // var comments = [];
943 // if (slides.bounceBoard) { 956 // if (slides.bounceBoard) {
944 // slides.metaData.comments.forEach((element) => { 957 // slides.metaData.comments.forEach((element) => {
945 // comments.push(element.comment); 958 // comments.push(element.comment);
946 // }); 959 // });
947 // slideData.comments = comments; 960 // slideData.comments = comments;
948 // } 961 // }
949 962
950 slides.metaData.fields.forEach((fields_) => { 963 slides.metaData.fields.forEach((fields_) => {
951 slideData[fields_.fieldName] = fields_.fieldValue; 964 slideData[fields_.fieldName] = fields_.fieldValue;
952 }); 965 });
953 slidArray.push(slideData); 966 slidArray.push(slideData);
954 // delete slides.metaData.fields; 967 // delete slides.metaData.fields;
955 }); 968 });
956 969
957 console.log("slideData", slidArray); 970 console.log("slideData", slidArray);
958 if (this.editMode) { 971 if (this.editMode) {
959 this.updateProfile(slidArray); 972 this.updateProfile(slidArray);
960 } else { 973 } else {
961 this.saveProfile(slidArray); 974 this.saveProfile(slidArray);
962 } 975 }
963 }, 976 },
964 updateComment(cmnt) { 977 updateComment(cmnt) {
965 if (!cmnt._id) { 978 if (!cmnt._id) {
966 return; 979 return;
967 } 980 }
968 console.log("cmnts", cmnt); 981 console.log("cmnts", cmnt);
969 var obj = { 982 var obj = {
970 slideId: cmnt.slideId, 983 slideId: cmnt.slideId,
971 commentId: cmnt._id, 984 commentId: cmnt._id,
972 comment: cmnt.comment, 985 comment: cmnt.comment,
973 }; 986 };
974 axios 987 axios
975 .put("/superAdmin/comment", obj, { 988 .put("/superAdmin/comment", obj, {
976 headers: { 989 headers: {
977 Authorization: "Bearer " + this.usertoken, 990 Authorization: "Bearer " + this.usertoken,
978 }, 991 },
979 }) 992 })
980 .then((response) => { 993 .then((response) => {
981 console.log(response); 994 console.log(response);
982 }) 995 })
983 .catch((error) => {}); 996 .catch((error) => {});
984 }, 997 },
985 998
986 saveProfile(slides) { 999 saveProfile(slides) {
987 var obj = {}; 1000 var obj = {};
988 obj.caseStudyDetails = this.caseStudy.caseStudyDetails; 1001 obj.caseStudyDetails = this.caseStudy.caseStudyDetails;
989 obj.caseStudyDetails.intro.readTime = Math.round( 1002 obj.caseStudyDetails.intro.readTime = Math.round(
990 slides.length / 3 1003 slides.length / 3
991 ).toString(); 1004 ).toString();
992 obj.slides = slides; 1005 obj.slides = slides;
993 axios 1006 axios
994 .post("/superAdmin/caseStudy", obj, { 1007 .post("/superAdmin/caseStudy", obj, {
995 headers: { 1008 headers: {
996 Authorization: "Bearer " + this.usertoken, 1009 Authorization: "Bearer " + this.usertoken,
997 }, 1010 },
998 }) 1011 })
999 .then((response) => { 1012 .then((response) => {
1000 // this.userData = response.data.data; 1013 // this.userData = response.data.data;
1001 this.$toaster.success("Case Study Created"); 1014 this.$toaster.success("Case Study Created");
1002 this.$router.go(this.$router.currentRoute); 1015 this.$router.go(this.$router.currentRoute);
1003 1016
1004 console.log(response); 1017 console.log(response);
1005 }) 1018 })
1006 .catch((error) => { 1019 .catch((error) => {
1007 if (error.response) { 1020 if (error.response) {
1008 this.$toaster.error(error.response.data.message); 1021 this.$toaster.error(error.response.data.message);
1009 } 1022 }
1010 }); 1023 });
1011 }, 1024 },
1012 1025
1013 updateProfile(slides) { 1026 updateProfile(slides) {
1014 var obj = {}; 1027 var obj = {};
1015 (obj.caseStudyId = this.caseId), 1028 (obj.caseStudyId = this.caseId),
1016 (obj.caseStudyDetails = this.caseStudy.caseStudyDetails); 1029 (obj.caseStudyDetails = this.caseStudy.caseStudyDetails);
1017 obj.caseStudyDetails.intro.readTime = Math.round( 1030 obj.caseStudyDetails.intro.readTime = Math.round(
1018 slides.length / 3 1031 slides.length / 3
1019 ).toString(); 1032 ).toString();
1020 obj.slides = slides; 1033 obj.slides = slides;
1021 delete obj.caseStudyDetails.intro.focus; 1034 delete obj.caseStudyDetails.intro.focus;
1022 axios 1035 axios
1023 .put("/superAdmin/caseStudy", obj, { 1036 .put("/superAdmin/caseStudy", obj, {
1024 headers: { 1037 headers: {
1025 Authorization: "Bearer " + this.usertoken, 1038 Authorization: "Bearer " + this.usertoken,
1026 }, 1039 },
1027 }) 1040 })
1028 .then((response) => { 1041 .then((response) => {
1029 // this.userData = response.data.data; 1042 // this.userData = response.data.data;
1030 this.$toaster.success("Case Study Updated"); 1043 this.$toaster.success("Case Study Updated");
1031 this.$router.go(this.$router.currentRoute); 1044 this.$router.go(this.$router.currentRoute);
1032 1045
1033 console.log(response); 1046 console.log(response);
1034 }) 1047 })
1035 .catch((error) => { 1048 .catch((error) => {
1036 if (error.response) { 1049 if (error.response) {
1037 this.$toaster.error(error.response.data.message); 1050 this.$toaster.error(error.response.data.message);
1038 } 1051 }
1039 }); 1052 });
1040 }, 1053 },
1041 listPage(url) { 1054 listPage(url) {
1042 this.$router.push(url); 1055 this.$router.push(url);
1043 }, 1056 },
1044 1057
1045 addProfileDialog(slide) { 1058 addProfileDialog(slide) {
1046 console.log("slide", slide); 1059 console.log("slide", slide);
1047 this.templateImage = slide.templateImage; 1060 this.templateImage = slide.templateImage;
1048 $(".inner-wrp").addClass("body-blur"); 1061 $(".inner-wrp").addClass("body-blur");
1049 $("#add-social-links").hide(); 1062 $("#add-social-links").hide();
1050 $(".popup-wrp, #add-profile").show(); 1063 $(".popup-wrp, #add-profile").show();
1051 }, 1064 },
1052 1065
1053 closeDialog() { 1066 closeDialog() {
1054 this.templateImage = null; 1067 this.templateImage = null;
1055 $(".popup-wrp").hide(); 1068 $(".popup-wrp").hide();
1056 $(".inner-wrp").removeClass("body-blur"); 1069 $(".inner-wrp").removeClass("body-blur");
1057 // this.saveProfile(); 1070 // this.saveProfile();
1058 }, 1071 },
1059 hideDialog() { 1072 hideDialog() {
1060 this.templateImage = null; 1073 this.templateImage = null;
1061 $(".popup-wrp").hide(); 1074 $(".popup-wrp").hide();
1062 $(".inner-wrp").removeClass("body-blur"); 1075 $(".inner-wrp").removeClass("body-blur");
1063 }, 1076 },
1064 1077
1065 async getMeatda(tempId) { 1078 async getMeatda(tempId) {
1066 var obj = [ 1079 var obj = [
1067 { 1080 {
1068 tempId: "T1_RoeMG8130Xko1DvhC3Ou", 1081 tempId: "T1_RoeMG8130Xko1DvhC3Ou",
1069 metaData: { 1082 metaData: {
1070 fields: [ 1083 fields: [
1071 { 1084 {
1072 fieldName: "authorImage", 1085 fieldName: "authorImage",
1073 displayName: "Author Image", 1086 displayName: "Author Image",
1074 fieldValue: null, 1087 fieldValue: null,
1075 fieldType: "image", 1088 fieldType: "image",
1076 }, 1089 },
1077 { 1090 {
1078 fieldName: "mobileImage", 1091 fieldName: "mobileImage",
1079 displayName: "Mobile Image", 1092 displayName: "Mobile Image",
1080 fieldValue: null, 1093 fieldValue: null,
1081 fieldType: "image", 1094 fieldType: "image",
1082 }, 1095 },
1083 { 1096 {
1084 fieldName: "textBox", 1097 fieldName: "textBox",
1085 displayName: "Text Box", 1098 displayName: "Text Box",
1086 fieldValue: null, 1099 fieldValue: null,
1087 fieldType: "text", 1100 fieldType: "text",
1088 }, 1101 },
1089 ], 1102 ],
1090 }, 1103 },
1091 }, 1104 },
1092 { 1105 {
1093 tempId: "T2_ROsUOEy3vxsRAiQ72XdI", 1106 tempId: "T2_ROsUOEy3vxsRAiQ72XdI",
1094 metaData: { 1107 metaData: {
1095 fields: [ 1108 fields: [
1096 { 1109 {
1097 fieldName: "authorImage", 1110 fieldName: "authorImage",
1098 displayName: "Author Image", 1111 displayName: "Author Image",
1099 fieldValue: null, 1112 fieldValue: null,
1100 fieldType: "image", 1113 fieldType: "image",
1101 }, 1114 },
1102 ], 1115 ],
1103 comments: [{ comment: null }, { comment: null }, { comment: null }], 1116 comments: [{ comment: null }, { comment: null }, { comment: null }],
1104 }, 1117 },
1105 }, 1118 },
1106 { 1119 {
1107 tempId: "T3_cqNIf7tuqL4jyON63dA7", 1120 tempId: "T3_cqNIf7tuqL4jyON63dA7",
1108 metaData: { 1121 metaData: {
1109 fields: [ 1122 fields: [
1110 { 1123 {
1111 fieldName: "authorImage", 1124 fieldName: "authorImage",
1112 displayName: "Author Image", 1125 displayName: "Author Image",
1113 fieldValue: null, 1126 fieldValue: null,
1114 fieldType: "image", 1127 fieldType: "image",
1115 }, 1128 },
1116 { 1129 {
1117 fieldName: "mobileImage", 1130 fieldName: "mobileImage",
1118 displayName: "Mobile Image", 1131 displayName: "Mobile Image",
1119 fieldValue: null, 1132 fieldValue: null,
1120 fieldType: "image", 1133 fieldType: "image",
1121 }, 1134 },
1122 ], 1135 ],
1123 comments: [ 1136 comments: [
1124 { comment: null }, 1137 { comment: null },
1125 { comment: null }, 1138 { comment: null },
1126 { comment: null }, 1139 { comment: null },
1127 { comment: null }, 1140 { comment: null },
1128 ], 1141 ],
1129 }, 1142 },
1130 }, 1143 },
1131 ]; 1144 ];
1132 var i = obj.findIndex((obj_) => obj_.tempId == tempId); 1145 var i = obj.findIndex((obj_) => obj_.tempId == tempId);
1133 return obj[i]; 1146 return obj[i];
1134 }, 1147 },
1135 }, 1148 },
1136 }; 1149 };
1137 </script> 1150 </script>
1138 1151
1 // The Vue build version to load with the `import` command 1 // The Vue build version to load with the `import` command
2 // (runtime-only or standalone) has been set in webpack.base.conf with an alias. 2 // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
3 import Vue from 'vue' 3 import Vue from 'vue'
4 // Add this line 4 // Add this line
5 import App from './App' 5 import App from './App'
6 import router from './router' 6 import router from './router'
7 import axios from 'axios' 7 import axios from 'axios'
8 8
9 // Import the Auth0 configuration 9 // Import the Auth0 configuration
10 import { domain, clientId } from "../auth_config.json" 10 import { domain, clientId } from "../auth_config.json"
11 11
12 // Import the plugin here 12 // Import the plugin here
13 import { Auth0Plugin } from "./auth" 13 import { Auth0Plugin } from "./auth"
14 import Vuelidate from 'vuelidate' 14 import Vuelidate from 'vuelidate'
15 import moment from 'moment' 15 import moment from 'moment'
16 import Toaster from 'v-toaster' 16 import Toaster from 'v-toaster'
17 import 'v-toaster/dist/v-toaster.css' 17 import 'v-toaster/dist/v-toaster.css'
18 18
19 // You need a specific loader for CSS files like https://github.com/webpack/css-loader 19 // You need a specific loader for CSS files like https://github.com/webpack/css-loader
20 20
21 // optional set default imeout, the default is 10000 (10 seconds). 21 // optional set default imeout, the default is 10000 (10 seconds).
22 Vue.use(Toaster, {timeout: 5000}) 22 Vue.use(Toaster, {timeout: 5000})
23 Vue.use(Vuelidate) 23 Vue.use(Vuelidate)
24 // Install the authentication plugin here 24 // Install the authentication plugin here
25 Vue.use(Auth0Plugin, { 25 Vue.use(Auth0Plugin, {
26 domain, 26 domain,
27 clientId, 27 clientId,
28 redirect: false, 28 redirect: false,
29 onRedirectCallback: appState => { 29 onRedirectCallback: appState => {
30 router.push( 30 router.push(
31 appState && appState.targetUrl ? 31 appState && appState.targetUrl ?
32 appState.targetUrl : 32 appState.targetUrl :
33 window.location.pathname 33 window.location.pathname
34 ); 34 );
35 } 35 }
36 }); 36 });
37 37
38 Vue.config.productionTip = false 38 Vue.config.productionTip = false
39 // https://api.productgrowth.org/pg 39 // https://api.productgrowth.org/pg
40 // http://174.138.121.70:3006/pg 40 // http://174.138.121.70:3006/pg
41 // http://174.138.121.70:3006/pd 41 // http://174.138.121.70:3006/pd
42 Vue.prototype.moment = moment 42 Vue.prototype.moment = moment
43 axios.defaults.baseURL = 'http://174.138.121.70:3006/pg' 43 axios.defaults.baseURL = 'https://api.productgrowth.org/pg'
44 44
45 /* eslint-disable no-new */ 45 /* eslint-disable no-new */
46 new Vue({ 46 new Vue({
47 el: '#app', 47 el: '#app',
48 router, 48 router,
49 components: { App }, 49 components: { App },
50 template: '<App/>' 50 template: '<App/>'
51 }) 51 })