@burh/nuxt-core 1.0.423 → 1.0.424
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/burh-ds/Cards/BaseCard.vue +7 -26
- package/components/burh-ds/Curriculum/UserCurriculum/UserCvLeftSide.vue +3 -1
- package/components/burh-ds/Curriculum/UserCurriculum/index.vue +2 -2
- package/components/burh-ds/Filters/FilterWithDropdown.vue +10 -2
- package/components/burh-ds/Headings/AppHeader.vue +10 -23
- package/components/burh-ds/Img/ImageWithFallback.vue +75 -0
- package/components/burh-ds/Inputs/SearchInput.vue +1 -1
- package/environment.js +221 -221
- package/package.json +1 -1
- package/plugins/dashboard/globalComponents.js +7 -5
|
@@ -24,11 +24,12 @@
|
|
|
24
24
|
</div>
|
|
25
25
|
|
|
26
26
|
<div class="recruitment__user__card__content">
|
|
27
|
-
<
|
|
28
|
-
:src="
|
|
27
|
+
<image-with-fallback
|
|
28
|
+
:src="avatar"
|
|
29
29
|
:alt="name"
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
:fallbackText="name"
|
|
31
|
+
fallbackSize="1024x1024"
|
|
32
|
+
/>
|
|
32
33
|
|
|
33
34
|
<slot name="card-content" />
|
|
34
35
|
</div>
|
|
@@ -69,26 +70,6 @@ export default {
|
|
|
69
70
|
hasCover: true
|
|
70
71
|
};
|
|
71
72
|
},
|
|
72
|
-
methods: {
|
|
73
|
-
getImageFallback(img, name) {
|
|
74
|
-
img.target.src = this.getNameInitials(name);
|
|
75
|
-
},
|
|
76
|
-
getNameInitials(name, last_name) {
|
|
77
|
-
const avatarUrl = process.env.routes.avatar;
|
|
78
|
-
|
|
79
|
-
let userAvatarName;
|
|
80
|
-
|
|
81
|
-
if (name && last_name) {
|
|
82
|
-
userAvatarName = `${name.toUpperCase().charAt(0)}${last_name.toUpperCase().charAt(0)}`;
|
|
83
|
-
} else if (name && !last_name) {
|
|
84
|
-
userAvatarName = name.slice(0, 1).toUpperCase();
|
|
85
|
-
} else {
|
|
86
|
-
userAvatarName = 'BURH';
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
return avatarUrl.replace(':size', '64x64').replace(':initials', userAvatarName);
|
|
90
|
-
},
|
|
91
|
-
},
|
|
92
73
|
mounted() {
|
|
93
74
|
!this.cover && (this.hasCover = false);
|
|
94
75
|
}
|
|
@@ -193,9 +174,9 @@ export default {
|
|
|
193
174
|
display: flex;
|
|
194
175
|
align-items: center;
|
|
195
176
|
justify-content: center;
|
|
196
|
-
padding-bottom:
|
|
177
|
+
padding-bottom: 30px;
|
|
197
178
|
span {
|
|
198
|
-
font-size:
|
|
179
|
+
font-size: 1rem;
|
|
199
180
|
font-weight: 500;
|
|
200
181
|
margin: 0 10px;
|
|
201
182
|
color: #AEB6BE;
|
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
<div class="bg-white content-left">
|
|
3
3
|
<div class="profile w-100 text-center">
|
|
4
4
|
<div class="avatar">
|
|
5
|
-
<
|
|
5
|
+
<image-with-fallback
|
|
6
6
|
v-if="userData.urlAvatar"
|
|
7
7
|
:src="userData.urlAvatar"
|
|
8
8
|
:alt="userData.name"
|
|
9
|
+
:fallbackText="userData.name"
|
|
10
|
+
fallbackSize="1024x1024"
|
|
9
11
|
/>
|
|
10
12
|
<div v-else class=".">
|
|
11
13
|
{{ userData.name }}
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
>
|
|
9
9
|
<template>
|
|
10
10
|
<div class="row d-flex justify-content-between mx-0 user-pdf">
|
|
11
|
-
<img v-if="!isLoading
|
|
12
|
-
<div v-
|
|
11
|
+
<img v-if="!isLoading && coverPhoto" :src="coverPhoto" alt="" class="img__color" onerror="this.src = ''" />
|
|
12
|
+
<div v-else class="no-cover-photo"></div>
|
|
13
13
|
<slot name="content"></slot>
|
|
14
14
|
</div>
|
|
15
15
|
<slot></slot>
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
<button
|
|
14
14
|
class="filter__item"
|
|
15
15
|
:class="{'filter__item--active': isDropdownOpen || isActive}"
|
|
16
|
+
:disabled="disabled"
|
|
16
17
|
@click="handleFilterClick()"
|
|
17
18
|
>
|
|
18
19
|
<div
|
|
@@ -55,7 +56,11 @@ export default {
|
|
|
55
56
|
status: {
|
|
56
57
|
type: String,
|
|
57
58
|
default: ''
|
|
58
|
-
}
|
|
59
|
+
},
|
|
60
|
+
disabled: {
|
|
61
|
+
type: Boolean,
|
|
62
|
+
default: false
|
|
63
|
+
},
|
|
59
64
|
},
|
|
60
65
|
data() {
|
|
61
66
|
return {
|
|
@@ -203,12 +208,15 @@ export default {
|
|
|
203
208
|
color: #5865F2;
|
|
204
209
|
}
|
|
205
210
|
}
|
|
206
|
-
&:not(.filter__item--active):hover {
|
|
211
|
+
&:not(.filter__item--active):not(:disabled):hover {
|
|
207
212
|
background: rgba(174, 182, 190, 0.2);
|
|
208
213
|
p {
|
|
209
214
|
color: #1D364B;
|
|
210
215
|
}
|
|
211
216
|
}
|
|
217
|
+
&:not(.filter__item--active):disabled {
|
|
218
|
+
background: #E9ECEF!important;;
|
|
219
|
+
}
|
|
212
220
|
p {
|
|
213
221
|
margin: 0;
|
|
214
222
|
font-weight: 400;
|
|
@@ -23,12 +23,13 @@
|
|
|
23
23
|
class="user__avatar"
|
|
24
24
|
:class="{ 'user__avatar--active': activeUserId === user.id }"
|
|
25
25
|
>
|
|
26
|
-
<
|
|
27
|
-
@click="setActiveUser(user.id)"
|
|
28
|
-
:src="
|
|
26
|
+
<image-with-fallback
|
|
27
|
+
@click.native="setActiveUser(user.id)"
|
|
28
|
+
:src="user.avatar"
|
|
29
29
|
:alt="user.name"
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
:fallbackText="user.name"
|
|
31
|
+
:fallbackBackground="avatarColor"
|
|
32
|
+
/>
|
|
32
33
|
</el-tooltip>
|
|
33
34
|
</div>
|
|
34
35
|
</div>
|
|
@@ -89,6 +90,10 @@ export default {
|
|
|
89
90
|
backClickAction: {
|
|
90
91
|
type: Function || null,
|
|
91
92
|
default: null
|
|
93
|
+
},
|
|
94
|
+
avatarColor: {
|
|
95
|
+
type: String,
|
|
96
|
+
default: '5865f2'
|
|
92
97
|
}
|
|
93
98
|
},
|
|
94
99
|
methods: {
|
|
@@ -99,24 +104,6 @@ export default {
|
|
|
99
104
|
this.backClickAction();
|
|
100
105
|
}
|
|
101
106
|
},
|
|
102
|
-
getImageFallback(img, name) {
|
|
103
|
-
img.target.src = this.getNameInitials(name);
|
|
104
|
-
},
|
|
105
|
-
getNameInitials(name, last_name) {
|
|
106
|
-
const avatarUrl = process.env.routes.avatar;
|
|
107
|
-
|
|
108
|
-
let userAvatarName;
|
|
109
|
-
|
|
110
|
-
if (name && last_name) {
|
|
111
|
-
userAvatarName = `${name.toUpperCase().charAt(0)}${last_name.toUpperCase().charAt(0)}`;
|
|
112
|
-
} else if (name && !last_name) {
|
|
113
|
-
userAvatarName = name.slice(0, 1).toUpperCase();
|
|
114
|
-
} else {
|
|
115
|
-
userAvatarName = 'BURH';
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
return avatarUrl.replace(':size', '64x64').replace(':initials', userAvatarName);
|
|
119
|
-
},
|
|
120
107
|
setActiveUser(userId) {
|
|
121
108
|
if (this.activeUserId !== userId) {
|
|
122
109
|
this.activeUserId = userId;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<img
|
|
3
|
+
:src="(this.src) ? this.src : getNameInitials()"
|
|
4
|
+
:alt="this.alt"
|
|
5
|
+
@error="img => getImageFallback(img)"
|
|
6
|
+
>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
export default {
|
|
11
|
+
name: 'image-with-fallback',
|
|
12
|
+
props: {
|
|
13
|
+
src: {
|
|
14
|
+
type: String,
|
|
15
|
+
required: true
|
|
16
|
+
},
|
|
17
|
+
alt: {
|
|
18
|
+
type: String,
|
|
19
|
+
required: true
|
|
20
|
+
},
|
|
21
|
+
randomColor: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: false
|
|
24
|
+
},
|
|
25
|
+
fallbackBackground: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: '5865f2'
|
|
28
|
+
},
|
|
29
|
+
fallbackColor: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: 'ffffff'
|
|
32
|
+
},
|
|
33
|
+
fallbackSize: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: '512x512'
|
|
36
|
+
},
|
|
37
|
+
fallbackText: {
|
|
38
|
+
type: String,
|
|
39
|
+
required: true
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
methods: {
|
|
43
|
+
getAvatarUrl() {
|
|
44
|
+
let size = this.fallbackSize;
|
|
45
|
+
let background = this.fallbackBackground;
|
|
46
|
+
let color = this.fallbackColor;
|
|
47
|
+
let text = this.getNameInitials();
|
|
48
|
+
|
|
49
|
+
const colors = ['5865F2', '9D35FC', 'FF539D', 'FF7D7E', 'FFCF02', '00b388'];
|
|
50
|
+
|
|
51
|
+
this.randomColor && (background = colors[Math.floor(Math.random() * (colors.length - 1))]);
|
|
52
|
+
|
|
53
|
+
return `https://via.placeholder.com/${size}/${background}/${color}?text=${text}`;
|
|
54
|
+
},
|
|
55
|
+
getImageFallback(img) {
|
|
56
|
+
img.target.src = this.getAvatarUrl();
|
|
57
|
+
},
|
|
58
|
+
getNameInitials() {
|
|
59
|
+
let userAvatarName;
|
|
60
|
+
|
|
61
|
+
if (this.fallbackText) {
|
|
62
|
+
userAvatarName = this.fallbackText.slice(0, 1).toUpperCase();
|
|
63
|
+
} else {
|
|
64
|
+
userAvatarName = 'BURH';
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return userAvatarName;
|
|
68
|
+
},
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
</script>
|
|
72
|
+
|
|
73
|
+
<style lang="scss" scoped>
|
|
74
|
+
|
|
75
|
+
</style>
|
package/environment.js
CHANGED
|
@@ -1,221 +1,221 @@
|
|
|
1
|
-
/* eslint-disable no-prototype-builtins */
|
|
2
|
-
/* eslint-disable no-mixed-spaces-and-tabs */
|
|
3
|
-
const readEnv = require('read-env');
|
|
4
|
-
let envName =
|
|
5
|
-
process.env.NODE_ENV != null ? process.env.NODE_ENV.trim() : 'development';
|
|
6
|
-
|
|
7
|
-
let extendEnv = null;
|
|
8
|
-
|
|
9
|
-
try {
|
|
10
|
-
if (envName === 'production' && process.env.AWS_DEPLOY) {
|
|
11
|
-
extendEnv = readEnv.default();
|
|
12
|
-
} else {
|
|
13
|
-
extendEnv = require(`./${envName}.env.js`);
|
|
14
|
-
}
|
|
15
|
-
} catch (error) {
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function env() {
|
|
20
|
-
let baseApiUrl = extendEnv.hasOwnProperty('baseApiUrl')
|
|
21
|
-
? extendEnv.baseApiUrl
|
|
22
|
-
: 'https://api.burh.com.br';
|
|
23
|
-
// let baseApiUrl = 'https://api.burh.com.br';
|
|
24
|
-
let baseAppUrl = extendEnv.hasOwnProperty('baseAppUrl')
|
|
25
|
-
? extendEnv.baseAppUrl
|
|
26
|
-
: 'https://burh.com.br';
|
|
27
|
-
|
|
28
|
-
let login = {
|
|
29
|
-
client_id: '0da602245cab3ef63abbbf2d4cc27b60',
|
|
30
|
-
client_secret: '08f80b8735900567bc15c0c8a124b144',
|
|
31
|
-
key: null
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
// Routes for company test
|
|
35
|
-
let apiRoutesTest = {
|
|
36
|
-
verifyTest: `${baseApiUrl}/company/test/verify/:id`,
|
|
37
|
-
startTest: `${baseApiUrl}/company/test/start/:id`,
|
|
38
|
-
loadTest: `${baseApiUrl}/company/test/load/:id`,
|
|
39
|
-
answerTest: `${baseApiUrl}/company/test/answer/:id`,
|
|
40
|
-
answerAnnexTest: `${baseApiUrl}/company/test/answer/:testId/question/:questionId`,
|
|
41
|
-
finishTest: `${baseApiUrl}/company/test/finish/:id`
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
// Extended company test routes (can be null)
|
|
45
|
-
let extendTest =
|
|
46
|
-
extendEnv.hasOwnProperty('routes') &&
|
|
47
|
-
extendEnv.routes.hasOwnProperty('api') &&
|
|
48
|
-
extendEnv.routes.api.hasOwnProperty('test')
|
|
49
|
-
? extendEnv.routes.api.test
|
|
50
|
-
: {};
|
|
51
|
-
|
|
52
|
-
let apiRoutesFeed = {
|
|
53
|
-
suggestedJobs: `${baseApiUrl}/nb/user/feed/jobs/suggested/:city`,
|
|
54
|
-
suggestedPopularJobs: `${baseApiUrl}/nb/user/feed/jobs/suggested/popular/:city`,
|
|
55
|
-
featuredCompanies: `${baseApiUrl}/nb/user/feed/featured/companies`
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
// Extended company feed routes (can be null)
|
|
59
|
-
let extendFeed =
|
|
60
|
-
extendEnv.hasOwnProperty('routes') &&
|
|
61
|
-
extendEnv.routes.hasOwnProperty('api') &&
|
|
62
|
-
extendEnv.routes.api.hasOwnProperty('feed')
|
|
63
|
-
? extendEnv.routes.api.feed
|
|
64
|
-
: {};
|
|
65
|
-
|
|
66
|
-
// Routes for company career
|
|
67
|
-
let apiCareerRoutes = {
|
|
68
|
-
getCompanyOverview: `${baseApiUrl}/report/:companyId/report/overview/60`,
|
|
69
|
-
getJobs: `${baseApiUrl}/company/career/jobs/:companyId`,
|
|
70
|
-
getCompanyInfo: `${baseApiUrl}/company/career/:slug`
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
// extended company career routes (can be null)
|
|
74
|
-
let extendCareer =
|
|
75
|
-
extendEnv.hasOwnProperty('routes') &&
|
|
76
|
-
extendEnv.routes.hasOwnProperty('api') &&
|
|
77
|
-
extendEnv.routes.api.hasOwnProperty('career')
|
|
78
|
-
? extendEnv.routes.api.career
|
|
79
|
-
: {};
|
|
80
|
-
|
|
81
|
-
// routes for user
|
|
82
|
-
let apiUserRoutes = {
|
|
83
|
-
applyToJob: `${baseApiUrl}/user/job/apply`,
|
|
84
|
-
getProfile: `${baseApiUrl}/nb/user/:userIdOrSlug`,
|
|
85
|
-
saveAvatar: `${baseApiUrl}/nb/user/avatar/:userId/:size`,
|
|
86
|
-
saveCover: `${baseApiUrl}/nb/user/cover/:userId/:size`,
|
|
87
|
-
updateName: `${baseApiUrl}/nb/user/profile/update/name`,
|
|
88
|
-
updateAbout: `${baseApiUrl}/nb/user/profile/update/about`,
|
|
89
|
-
updateEducation: `${baseApiUrl}/nb/user/profile/update/education`,
|
|
90
|
-
updateCourse: `${baseApiUrl}/nb/user/profile/update/course`,
|
|
91
|
-
updateExperience: `${baseApiUrl}/nb/user/profile/update/experience`,
|
|
92
|
-
updateOtherInformations: `${baseApiUrl}/nb/user/profile/update/other-informations`,
|
|
93
|
-
updateLanguageLevel: `${baseApiUrl}/nb/user/profile/update/language/:languageId/:languageLevel`,
|
|
94
|
-
deleteSkill: `${baseApiUrl}/nb/user/profile/delete/skill/:skillId`,
|
|
95
|
-
deleteCourse: `${baseApiUrl}/nb/user/profile/delete/course/:courseId`,
|
|
96
|
-
deleteExperience: `${baseApiUrl}/nb/user/profile/delete/experience/:experienceId`,
|
|
97
|
-
deleteEducation: `${baseApiUrl}/nb/user/profile/delete/education/:educationId`,
|
|
98
|
-
deleteLanguage: `${baseApiUrl}/nb/user/profile/delete/language/:languageId`,
|
|
99
|
-
addSkill: `${baseApiUrl}/nb/user/profile/add/skill/:name`,
|
|
100
|
-
addEducation: `${baseApiUrl}/nb/user/profile/add/education`,
|
|
101
|
-
addExperience: `${baseApiUrl}/nb/user/profile/add/experience`,
|
|
102
|
-
addCourse: `${baseApiUrl}/nb/user/profile/add/course`,
|
|
103
|
-
addLanguage: `${baseApiUrl}/nb/user/profile/add/language/:languageId/:languageLevel`,
|
|
104
|
-
getLanguages: `${baseApiUrl}/common/languages`,
|
|
105
|
-
setNotificationSettings: `${baseApiUrl}/user/account/notifications`,
|
|
106
|
-
getNotificationSettings: `${baseApiUrl}/user/account/notifications`,
|
|
107
|
-
setPrivacySettings: `${baseApiUrl}/user/privacy-settings`,
|
|
108
|
-
getPrivacySettings: `${baseApiUrl}/user/privacy-settings`,
|
|
109
|
-
changeEmail: `${baseApiUrl}/user/profile/email`,
|
|
110
|
-
changePassword: `${baseApiUrl}/user/account/password`,
|
|
111
|
-
getAccessLog: `${baseApiUrl}/user/log/access`,
|
|
112
|
-
disableAccount: `${baseApiUrl}/user/account`,
|
|
113
|
-
myBurhOverview: `${baseApiUrl}/nb/user/myburh`,
|
|
114
|
-
getCities: `${baseApiUrl}/common/location/cities/state/:regioncode`,
|
|
115
|
-
updateProfile: `${baseApiUrl}/user/profile/base`,
|
|
116
|
-
updateAdress: `${baseApiUrl}/user/profile/address`,
|
|
117
|
-
updateDesiredJob: `${baseApiUrl}/user/desired-job`,
|
|
118
|
-
getDesiredJob: `${baseApiUrl}/user/desired-job`,
|
|
119
|
-
updateWagePretension: `${baseApiUrl}/user/wage-pretension`,
|
|
120
|
-
getWagePretension: `${baseApiUrl}/user/wage-pretension`,
|
|
121
|
-
getAddressByZipcode: `${baseApiUrl}/common/location/zipcode/:zipcode`,
|
|
122
|
-
getProfilePdf: `${baseApiUrl}/company/:company_id/resume/user/:user_id/download/false`,
|
|
123
|
-
setOriginatedCompany: `${baseApiUrl}/user/account/setoriginatedcompany`,
|
|
124
|
-
followCompany: `${baseApiUrl}/user/follow`,
|
|
125
|
-
getIsUserFollowingCompany: `${baseApiUrl}/company/career/is-user-following/:companyId`,
|
|
126
|
-
updateUserLinks: `${baseApiUrl}/nb/user/profile/update/urls`,
|
|
127
|
-
isAppliedJob: `${baseApiUrl}/nb/user/job/applied/:jobId`,
|
|
128
|
-
removeUserAvatar: `${baseApiUrl}/nb/user/profile/delete/avatar`,
|
|
129
|
-
removeUserBanner: `${baseApiUrl}/nb/user/profile/delete/cover`,
|
|
130
|
-
saveJob: `${baseApiUrl}/nb/user/job/bookmark/:id`,
|
|
131
|
-
unSaveJob: `${baseApiUrl}/nb/user/job/remove-bookmark/:id`
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
// extended user routes (can be null)
|
|
135
|
-
let extendUser =
|
|
136
|
-
extendEnv.hasOwnProperty('routes') &&
|
|
137
|
-
extendEnv.routes.hasOwnProperty('api') &&
|
|
138
|
-
extendEnv.routes.api.hasOwnProperty('user')
|
|
139
|
-
? extendEnv.routes.api.user
|
|
140
|
-
: {};
|
|
141
|
-
|
|
142
|
-
// Routes for object `api`
|
|
143
|
-
// It will merge all api routes with extended routes if any
|
|
144
|
-
let apiRoutes = {
|
|
145
|
-
login: `${baseApiUrl}/login`,
|
|
146
|
-
loginFacebook: `${baseApiUrl}/login/facebook`,
|
|
147
|
-
logout: `${baseApiUrl}/logout`,
|
|
148
|
-
logLogout: `${baseApiUrl}/log/logout`,
|
|
149
|
-
signup: `${baseApiUrl}/signup`,
|
|
150
|
-
getUser: `${baseApiUrl}/user`,
|
|
151
|
-
forgotPassword: `${baseApiUrl}/password/forgot`,
|
|
152
|
-
verifyHash: `${baseApiUrl}/password/user/:hash`,
|
|
153
|
-
resetPassword: `${baseApiUrl}/password/reset`,
|
|
154
|
-
getCompany: '',
|
|
155
|
-
searchCities: `${baseApiUrl}/common/location/cities/:hash`,
|
|
156
|
-
searchSlug: `${baseApiUrl}/nb/search/slug/:slug`,
|
|
157
|
-
wait: `${baseApiUrl}/user/wait`,
|
|
158
|
-
checkZipcode: `${baseApiUrl}/location/zipcode/:zipcode`,
|
|
159
|
-
signupwithcompany: `${baseApiUrl}/singupwhitcompany`,
|
|
160
|
-
test: { ...apiRoutesTest, ...extendTest },
|
|
161
|
-
career: { ...apiCareerRoutes, ...extendCareer },
|
|
162
|
-
feed: { ...apiRoutesFeed, ...extendFeed },
|
|
163
|
-
user: { ...apiUserRoutes, ...extendUser }
|
|
164
|
-
};
|
|
165
|
-
|
|
166
|
-
// Remove test and career and user object from api
|
|
167
|
-
// It's necessary in case api object has extended routes as well
|
|
168
|
-
if (
|
|
169
|
-
extendEnv.hasOwnProperty('routes') &&
|
|
170
|
-
extendEnv.routes.hasOwnProperty('api')
|
|
171
|
-
) {
|
|
172
|
-
delete extendEnv.routes.api['test'];
|
|
173
|
-
delete extendEnv.routes.api['career'];
|
|
174
|
-
delete extendEnv.routes.api['user'];
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
// Extended api routes
|
|
178
|
-
let extendApiRoutes =
|
|
179
|
-
extendEnv.hasOwnProperty('routes') && extendEnv.routes.hasOwnProperty('api')
|
|
180
|
-
? extendEnv.routes.api
|
|
181
|
-
: {};
|
|
182
|
-
|
|
183
|
-
// Create routes object with merged api object
|
|
184
|
-
let routes = {
|
|
185
|
-
api: { ...apiRoutes, ...extendApiRoutes },
|
|
186
|
-
geo: 'https://ipinfo.io?token=' + extendEnv.ipAccessToken,
|
|
187
|
-
avatar: 'https://via.placeholder.com/:size/
|
|
188
|
-
};
|
|
189
|
-
|
|
190
|
-
// Remove api object from routes
|
|
191
|
-
// It's necessary in case routes object has extended routes other than api as well
|
|
192
|
-
if (
|
|
193
|
-
extendEnv.hasOwnProperty('routes') &&
|
|
194
|
-
extendEnv.routes.hasOwnProperty('api')
|
|
195
|
-
) {
|
|
196
|
-
delete extendEnv.routes['api'];
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
// Extended routes
|
|
200
|
-
let extendRoutes = extendEnv.hasOwnProperty('routes') ? extendEnv.routes : {};
|
|
201
|
-
|
|
202
|
-
let businessSubdomain = 'business';
|
|
203
|
-
|
|
204
|
-
// Create env object with api and any other information
|
|
205
|
-
// And merge any extended route other than api
|
|
206
|
-
let env = {
|
|
207
|
-
baseApiUrl: baseApiUrl,
|
|
208
|
-
baseAppUrl: baseAppUrl,
|
|
209
|
-
businessSubdomain: businessSubdomain,
|
|
210
|
-
login: login,
|
|
211
|
-
routes: { ...routes, ...extendRoutes }
|
|
212
|
-
};
|
|
213
|
-
|
|
214
|
-
// Remove routes object com extend env
|
|
215
|
-
delete extendEnv['routes'];
|
|
216
|
-
|
|
217
|
-
// Returns merged env object with any other variable rather than routes
|
|
218
|
-
return { ...extendEnv, ...env };
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
module.exports = env();
|
|
1
|
+
/* eslint-disable no-prototype-builtins */
|
|
2
|
+
/* eslint-disable no-mixed-spaces-and-tabs */
|
|
3
|
+
const readEnv = require('read-env');
|
|
4
|
+
let envName =
|
|
5
|
+
process.env.NODE_ENV != null ? process.env.NODE_ENV.trim() : 'development';
|
|
6
|
+
|
|
7
|
+
let extendEnv = null;
|
|
8
|
+
|
|
9
|
+
try {
|
|
10
|
+
if (envName === 'production' && process.env.AWS_DEPLOY) {
|
|
11
|
+
extendEnv = readEnv.default();
|
|
12
|
+
} else {
|
|
13
|
+
extendEnv = require(`./${envName}.env.js`);
|
|
14
|
+
}
|
|
15
|
+
} catch (error) {
|
|
16
|
+
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function env() {
|
|
20
|
+
let baseApiUrl = extendEnv.hasOwnProperty('baseApiUrl')
|
|
21
|
+
? extendEnv.baseApiUrl
|
|
22
|
+
: 'https://api.burh.com.br';
|
|
23
|
+
// let baseApiUrl = 'https://api.burh.com.br';
|
|
24
|
+
let baseAppUrl = extendEnv.hasOwnProperty('baseAppUrl')
|
|
25
|
+
? extendEnv.baseAppUrl
|
|
26
|
+
: 'https://burh.com.br';
|
|
27
|
+
|
|
28
|
+
let login = {
|
|
29
|
+
client_id: '0da602245cab3ef63abbbf2d4cc27b60',
|
|
30
|
+
client_secret: '08f80b8735900567bc15c0c8a124b144',
|
|
31
|
+
key: null
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
// Routes for company test
|
|
35
|
+
let apiRoutesTest = {
|
|
36
|
+
verifyTest: `${baseApiUrl}/company/test/verify/:id`,
|
|
37
|
+
startTest: `${baseApiUrl}/company/test/start/:id`,
|
|
38
|
+
loadTest: `${baseApiUrl}/company/test/load/:id`,
|
|
39
|
+
answerTest: `${baseApiUrl}/company/test/answer/:id`,
|
|
40
|
+
answerAnnexTest: `${baseApiUrl}/company/test/answer/:testId/question/:questionId`,
|
|
41
|
+
finishTest: `${baseApiUrl}/company/test/finish/:id`
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
// Extended company test routes (can be null)
|
|
45
|
+
let extendTest =
|
|
46
|
+
extendEnv.hasOwnProperty('routes') &&
|
|
47
|
+
extendEnv.routes.hasOwnProperty('api') &&
|
|
48
|
+
extendEnv.routes.api.hasOwnProperty('test')
|
|
49
|
+
? extendEnv.routes.api.test
|
|
50
|
+
: {};
|
|
51
|
+
|
|
52
|
+
let apiRoutesFeed = {
|
|
53
|
+
suggestedJobs: `${baseApiUrl}/nb/user/feed/jobs/suggested/:city`,
|
|
54
|
+
suggestedPopularJobs: `${baseApiUrl}/nb/user/feed/jobs/suggested/popular/:city`,
|
|
55
|
+
featuredCompanies: `${baseApiUrl}/nb/user/feed/featured/companies`
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
// Extended company feed routes (can be null)
|
|
59
|
+
let extendFeed =
|
|
60
|
+
extendEnv.hasOwnProperty('routes') &&
|
|
61
|
+
extendEnv.routes.hasOwnProperty('api') &&
|
|
62
|
+
extendEnv.routes.api.hasOwnProperty('feed')
|
|
63
|
+
? extendEnv.routes.api.feed
|
|
64
|
+
: {};
|
|
65
|
+
|
|
66
|
+
// Routes for company career
|
|
67
|
+
let apiCareerRoutes = {
|
|
68
|
+
getCompanyOverview: `${baseApiUrl}/report/:companyId/report/overview/60`,
|
|
69
|
+
getJobs: `${baseApiUrl}/company/career/jobs/:companyId`,
|
|
70
|
+
getCompanyInfo: `${baseApiUrl}/company/career/:slug`
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
// extended company career routes (can be null)
|
|
74
|
+
let extendCareer =
|
|
75
|
+
extendEnv.hasOwnProperty('routes') &&
|
|
76
|
+
extendEnv.routes.hasOwnProperty('api') &&
|
|
77
|
+
extendEnv.routes.api.hasOwnProperty('career')
|
|
78
|
+
? extendEnv.routes.api.career
|
|
79
|
+
: {};
|
|
80
|
+
|
|
81
|
+
// routes for user
|
|
82
|
+
let apiUserRoutes = {
|
|
83
|
+
applyToJob: `${baseApiUrl}/user/job/apply`,
|
|
84
|
+
getProfile: `${baseApiUrl}/nb/user/:userIdOrSlug`,
|
|
85
|
+
saveAvatar: `${baseApiUrl}/nb/user/avatar/:userId/:size`,
|
|
86
|
+
saveCover: `${baseApiUrl}/nb/user/cover/:userId/:size`,
|
|
87
|
+
updateName: `${baseApiUrl}/nb/user/profile/update/name`,
|
|
88
|
+
updateAbout: `${baseApiUrl}/nb/user/profile/update/about`,
|
|
89
|
+
updateEducation: `${baseApiUrl}/nb/user/profile/update/education`,
|
|
90
|
+
updateCourse: `${baseApiUrl}/nb/user/profile/update/course`,
|
|
91
|
+
updateExperience: `${baseApiUrl}/nb/user/profile/update/experience`,
|
|
92
|
+
updateOtherInformations: `${baseApiUrl}/nb/user/profile/update/other-informations`,
|
|
93
|
+
updateLanguageLevel: `${baseApiUrl}/nb/user/profile/update/language/:languageId/:languageLevel`,
|
|
94
|
+
deleteSkill: `${baseApiUrl}/nb/user/profile/delete/skill/:skillId`,
|
|
95
|
+
deleteCourse: `${baseApiUrl}/nb/user/profile/delete/course/:courseId`,
|
|
96
|
+
deleteExperience: `${baseApiUrl}/nb/user/profile/delete/experience/:experienceId`,
|
|
97
|
+
deleteEducation: `${baseApiUrl}/nb/user/profile/delete/education/:educationId`,
|
|
98
|
+
deleteLanguage: `${baseApiUrl}/nb/user/profile/delete/language/:languageId`,
|
|
99
|
+
addSkill: `${baseApiUrl}/nb/user/profile/add/skill/:name`,
|
|
100
|
+
addEducation: `${baseApiUrl}/nb/user/profile/add/education`,
|
|
101
|
+
addExperience: `${baseApiUrl}/nb/user/profile/add/experience`,
|
|
102
|
+
addCourse: `${baseApiUrl}/nb/user/profile/add/course`,
|
|
103
|
+
addLanguage: `${baseApiUrl}/nb/user/profile/add/language/:languageId/:languageLevel`,
|
|
104
|
+
getLanguages: `${baseApiUrl}/common/languages`,
|
|
105
|
+
setNotificationSettings: `${baseApiUrl}/user/account/notifications`,
|
|
106
|
+
getNotificationSettings: `${baseApiUrl}/user/account/notifications`,
|
|
107
|
+
setPrivacySettings: `${baseApiUrl}/user/privacy-settings`,
|
|
108
|
+
getPrivacySettings: `${baseApiUrl}/user/privacy-settings`,
|
|
109
|
+
changeEmail: `${baseApiUrl}/user/profile/email`,
|
|
110
|
+
changePassword: `${baseApiUrl}/user/account/password`,
|
|
111
|
+
getAccessLog: `${baseApiUrl}/user/log/access`,
|
|
112
|
+
disableAccount: `${baseApiUrl}/user/account`,
|
|
113
|
+
myBurhOverview: `${baseApiUrl}/nb/user/myburh`,
|
|
114
|
+
getCities: `${baseApiUrl}/common/location/cities/state/:regioncode`,
|
|
115
|
+
updateProfile: `${baseApiUrl}/user/profile/base`,
|
|
116
|
+
updateAdress: `${baseApiUrl}/user/profile/address`,
|
|
117
|
+
updateDesiredJob: `${baseApiUrl}/user/desired-job`,
|
|
118
|
+
getDesiredJob: `${baseApiUrl}/user/desired-job`,
|
|
119
|
+
updateWagePretension: `${baseApiUrl}/user/wage-pretension`,
|
|
120
|
+
getWagePretension: `${baseApiUrl}/user/wage-pretension`,
|
|
121
|
+
getAddressByZipcode: `${baseApiUrl}/common/location/zipcode/:zipcode`,
|
|
122
|
+
getProfilePdf: `${baseApiUrl}/company/:company_id/resume/user/:user_id/download/false`,
|
|
123
|
+
setOriginatedCompany: `${baseApiUrl}/user/account/setoriginatedcompany`,
|
|
124
|
+
followCompany: `${baseApiUrl}/user/follow`,
|
|
125
|
+
getIsUserFollowingCompany: `${baseApiUrl}/company/career/is-user-following/:companyId`,
|
|
126
|
+
updateUserLinks: `${baseApiUrl}/nb/user/profile/update/urls`,
|
|
127
|
+
isAppliedJob: `${baseApiUrl}/nb/user/job/applied/:jobId`,
|
|
128
|
+
removeUserAvatar: `${baseApiUrl}/nb/user/profile/delete/avatar`,
|
|
129
|
+
removeUserBanner: `${baseApiUrl}/nb/user/profile/delete/cover`,
|
|
130
|
+
saveJob: `${baseApiUrl}/nb/user/job/bookmark/:id`,
|
|
131
|
+
unSaveJob: `${baseApiUrl}/nb/user/job/remove-bookmark/:id`
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
// extended user routes (can be null)
|
|
135
|
+
let extendUser =
|
|
136
|
+
extendEnv.hasOwnProperty('routes') &&
|
|
137
|
+
extendEnv.routes.hasOwnProperty('api') &&
|
|
138
|
+
extendEnv.routes.api.hasOwnProperty('user')
|
|
139
|
+
? extendEnv.routes.api.user
|
|
140
|
+
: {};
|
|
141
|
+
|
|
142
|
+
// Routes for object `api`
|
|
143
|
+
// It will merge all api routes with extended routes if any
|
|
144
|
+
let apiRoutes = {
|
|
145
|
+
login: `${baseApiUrl}/login`,
|
|
146
|
+
loginFacebook: `${baseApiUrl}/login/facebook`,
|
|
147
|
+
logout: `${baseApiUrl}/logout`,
|
|
148
|
+
logLogout: `${baseApiUrl}/log/logout`,
|
|
149
|
+
signup: `${baseApiUrl}/signup`,
|
|
150
|
+
getUser: `${baseApiUrl}/user`,
|
|
151
|
+
forgotPassword: `${baseApiUrl}/password/forgot`,
|
|
152
|
+
verifyHash: `${baseApiUrl}/password/user/:hash`,
|
|
153
|
+
resetPassword: `${baseApiUrl}/password/reset`,
|
|
154
|
+
getCompany: '',
|
|
155
|
+
searchCities: `${baseApiUrl}/common/location/cities/:hash`,
|
|
156
|
+
searchSlug: `${baseApiUrl}/nb/search/slug/:slug`,
|
|
157
|
+
wait: `${baseApiUrl}/user/wait`,
|
|
158
|
+
checkZipcode: `${baseApiUrl}/location/zipcode/:zipcode`,
|
|
159
|
+
signupwithcompany: `${baseApiUrl}/singupwhitcompany`,
|
|
160
|
+
test: { ...apiRoutesTest, ...extendTest },
|
|
161
|
+
career: { ...apiCareerRoutes, ...extendCareer },
|
|
162
|
+
feed: { ...apiRoutesFeed, ...extendFeed },
|
|
163
|
+
user: { ...apiUserRoutes, ...extendUser }
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
// Remove test and career and user object from api
|
|
167
|
+
// It's necessary in case api object has extended routes as well
|
|
168
|
+
if (
|
|
169
|
+
extendEnv.hasOwnProperty('routes') &&
|
|
170
|
+
extendEnv.routes.hasOwnProperty('api')
|
|
171
|
+
) {
|
|
172
|
+
delete extendEnv.routes.api['test'];
|
|
173
|
+
delete extendEnv.routes.api['career'];
|
|
174
|
+
delete extendEnv.routes.api['user'];
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// Extended api routes
|
|
178
|
+
let extendApiRoutes =
|
|
179
|
+
extendEnv.hasOwnProperty('routes') && extendEnv.routes.hasOwnProperty('api')
|
|
180
|
+
? extendEnv.routes.api
|
|
181
|
+
: {};
|
|
182
|
+
|
|
183
|
+
// Create routes object with merged api object
|
|
184
|
+
let routes = {
|
|
185
|
+
api: { ...apiRoutes, ...extendApiRoutes },
|
|
186
|
+
geo: 'https://ipinfo.io?token=' + extendEnv.ipAccessToken,
|
|
187
|
+
avatar: 'https://via.placeholder.com/:size/5865f2/ffffff?text=:initials'
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
// Remove api object from routes
|
|
191
|
+
// It's necessary in case routes object has extended routes other than api as well
|
|
192
|
+
if (
|
|
193
|
+
extendEnv.hasOwnProperty('routes') &&
|
|
194
|
+
extendEnv.routes.hasOwnProperty('api')
|
|
195
|
+
) {
|
|
196
|
+
delete extendEnv.routes['api'];
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
// Extended routes
|
|
200
|
+
let extendRoutes = extendEnv.hasOwnProperty('routes') ? extendEnv.routes : {};
|
|
201
|
+
|
|
202
|
+
let businessSubdomain = 'business';
|
|
203
|
+
|
|
204
|
+
// Create env object with api and any other information
|
|
205
|
+
// And merge any extended route other than api
|
|
206
|
+
let env = {
|
|
207
|
+
baseApiUrl: baseApiUrl,
|
|
208
|
+
baseAppUrl: baseAppUrl,
|
|
209
|
+
businessSubdomain: businessSubdomain,
|
|
210
|
+
login: login,
|
|
211
|
+
routes: { ...routes, ...extendRoutes }
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
// Remove routes object com extend env
|
|
215
|
+
delete extendEnv['routes'];
|
|
216
|
+
|
|
217
|
+
// Returns merged env object with any other variable rather than routes
|
|
218
|
+
return { ...extendEnv, ...env };
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
module.exports = env();
|
package/package.json
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import Badge from '~/components/argon-core/Badge.vue';
|
|
2
|
-
import BaseAlert from
|
|
2
|
+
import BaseAlert from '~/components/argon-core/BaseAlert';
|
|
3
3
|
import BaseButton from '~/components/argon-core/BaseButton.vue';
|
|
4
4
|
import BaseCheckbox from '~/components/argon-core/Inputs/BaseCheckbox.vue';
|
|
5
5
|
import BaseDropdown from '~/components/argon-core/BaseDropdown.vue';
|
|
6
6
|
import BaseHeader from '~/components/argon-core/BaseHeader';
|
|
7
7
|
import BaseInput from '~/components/argon-core/Inputs/BaseInput.vue';
|
|
8
|
-
import BaseNav from
|
|
9
|
-
import BasePagination from
|
|
10
|
-
import BaseProgress from
|
|
11
|
-
import BaseRadio from
|
|
8
|
+
import BaseNav from '~/components/argon-core/Navbar/BaseNav';
|
|
9
|
+
import BasePagination from '~/components/argon-core/BasePagination';
|
|
10
|
+
import BaseProgress from '~/components/argon-core/BaseProgress';
|
|
11
|
+
import BaseRadio from '~/components/argon-core/Inputs/BaseRadio';
|
|
12
12
|
import BaseSwitch from '~/components/argon-core/BaseSwitch.vue';
|
|
13
13
|
import Card from '~/components/argon-core/Cards/Card.vue';
|
|
14
14
|
import Modal from '~/components/argon-core/Modal.vue';
|
|
15
15
|
import RouteBreadcrumb from '~/components/argon-core/Breadcrumb/RouteBreadcrumb';
|
|
16
16
|
import StatsCard from '~/components/argon-core/Cards/StatsCard.vue';
|
|
17
|
+
import ImageWithFallback from '@/components/burh-ds/Img/ImageWithFallback.vue';
|
|
17
18
|
import { Input, Tooltip, Popover } from 'element-ui';
|
|
18
19
|
import Vue from 'vue';
|
|
19
20
|
/**
|
|
@@ -36,6 +37,7 @@ Vue.component(Card.name, Card);
|
|
|
36
37
|
Vue.component(Modal.name, Modal);
|
|
37
38
|
Vue.component(StatsCard.name, StatsCard);
|
|
38
39
|
Vue.component(RouteBreadcrumb.name, RouteBreadcrumb);
|
|
40
|
+
Vue.component(ImageWithFallback.name, ImageWithFallback);
|
|
39
41
|
Vue.component(Input.name, Input);
|
|
40
42
|
Vue.use(Tooltip);
|
|
41
43
|
Vue.use(Popover);
|