@burh/nuxt-core 1.1.13 → 1.1.15

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.
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <base-header class="app-header" :type="'white'">
3
- <div class="row justify-content-between app__header">
3
+ <div :class="headerClass">
4
4
  <div
5
5
  :class="{ 'images__container': users.length }"
6
6
  class="col-8 my-auto header__container"
@@ -104,10 +104,18 @@ export default {
104
104
  ElDropdownMenu: DropdownMenu,
105
105
  ElDropdownItem: DropdownItem,
106
106
  },
107
+ computed: {
108
+ headerClass() {
109
+ const baseClass = 'justify-content-between app__header';
110
+ const regex = /\/admissao\/\d+\/\d+/;
111
+ return regex.test(this.currentPath) ? baseClass : `row ${baseClass}`;
112
+ },
113
+ },
107
114
  data(){
108
115
  return{
109
116
  default: '',
110
- activeUserId: null
117
+ activeUserId: null,
118
+ currentPath: ''
111
119
  };
112
120
  },
113
121
  props:{
@@ -161,6 +169,9 @@ export default {
161
169
  this.$emit('active-user', null);
162
170
  }
163
171
  }
172
+ },
173
+ mounted() {
174
+ this.currentPath = window.location.pathname;
164
175
  }
165
176
  };
166
177
  </script>
@@ -1,232 +1,234 @@
1
1
  <template>
2
- <div class="list-simple">
3
- <!-- faz as coisas aqui -->
4
- <div class="text-center">
5
- <h3>Oportunidades abertas recentemente</h3>
6
- <h6>Alinhados a estratégia de investir nos melhores profissionais para o alto desempenho das equipes e excelência em nosso processos voltados ao Sucesso de Nossos Clientes, é com grande satisfação que lhe convidamos a fazer parte do time {{companyName}}.</h6>
7
- </div>
8
- <hr />
9
- <div class="row">
10
- <div class="col-12 col-lg-4">
11
- <base-input>
12
- <el-select
13
- v-model="selects.city"
14
- filterable
15
- clearable
16
- placeholder="Filtrar cidade"
17
- class="select-primary">
18
- <el-option v-for="option in cities"
19
- :key="option.label"
20
- :label="option.label"
21
- :value="option.value">
22
- </el-option>
23
- </el-select>
24
- </base-input>
25
- </div>
26
- <div class="col-12 col-lg-4">
27
- <base-input placeholder="Nome da vaga" v-model="selects.jobName"></base-input>
28
- </div>
29
- <div class="col-12 col-lg-4">
30
- <base-input>
31
- <el-select
32
- v-model="selects.hiringType"
33
- filterable
34
- clearable=""
35
- placeholder="Tipo de contratação"
36
- class="select-primary">
37
- <el-option v-for="option in hiringTypes"
38
- :key="option.label"
39
- :label="option.label"
40
- :value="option.value">
41
- </el-option>
42
- </el-select>
43
- </base-input>
44
- </div>
45
- </div>
46
- <table class="table table--card">
47
- <thead>
48
- <tr>
49
- <th width="40%">Nome da Vaga</th>
50
- <th width="20%">Cidade</th>
51
- <th width="20%">Tipo de Contratação</th>
52
- <th width="20%">Ações</th>
53
- </tr>
54
- </thead>
55
- <tr class="" v-for="job in getJobsFiltered()" @click="redirectToJob(job)" v-bind:key="job.job_id" >
56
- <td class="job-name">
57
- <div class="mobile-content">
58
- <span class="avatar avatar-xl rounded-circle table-icon">
59
- <img alt="Laponia Veiculos" :src="companyLogo">
60
- </span>
61
- <ul class="list-inline">
62
- <!-- <li class="list-inline-item" v-on:click.prevent="callSaveJob(job.job_id)"><font-awesome-icon :icon="[!fullHeart ? 'far' : 'fas', 'heart']" class="mr-2"/></li> -->
63
- <li class="list-inline-item" v-on:click.prevent="callShareJob(job.job_id)"><font-awesome-icon :icon="['fas', 'share']" class="mr-0"/></li>
64
- </ul>
65
- <div class="text-uppercase">{{companyName}}</div>
66
- </div>
67
- <span>{{job.title}} </span>
2
+ <div class="list-simple">
3
+ <!-- faz as coisas aqui -->
4
+ <div class="text-center">
5
+ <h3>Oportunidades abertas recentemente</h3>
6
+ <h6>Alinhados a estratégia de investir nos melhores profissionais para o alto desempenho das equipes e excelência em nosso processos voltados ao Sucesso de Nossos Clientes, é com grande satisfação que lhe convidamos a fazer parte do time {{companyName}}.</h6>
7
+ </div>
8
+ <hr />
9
+ <div class="row">
10
+ <div class="col-12 col-lg-4">
11
+ <base-input>
12
+ <el-select
13
+ v-model="selects.city"
14
+ filterable
15
+ clearable
16
+ placeholder="Filtrar cidade"
17
+ class="select-primary">
18
+ <el-option v-for="option in cities"
19
+ :key="option.label"
20
+ :label="option.label"
21
+ :value="option.value">
22
+ </el-option>
23
+ </el-select>
24
+ </base-input>
25
+ </div>
26
+ <div class="col-12 col-lg-4">
27
+ <base-input placeholder="Nome da vaga" v-model="selects.jobName"></base-input>
28
+ </div>
29
+ <div class="col-12 col-lg-4">
30
+ <base-input>
31
+ <el-select
32
+ v-model="selects.hiringType"
33
+ filterable
34
+ clearable=""
35
+ placeholder="Tipo de contratação"
36
+ class="select-primary">
37
+ <el-option v-for="option in hiringTypes"
38
+ :key="option.label"
39
+ :label="option.label"
40
+ :value="option.value">
41
+ </el-option>
42
+ </el-select>
43
+ </base-input>
44
+ </div>
45
+ </div>
46
+ <table class="table table--card">
47
+ <thead>
48
+ <tr>
49
+ <th width="40%">Nome da Vaga</th>
50
+ <th width="20%">Cidade</th>
51
+ <th width="20%">Tipo de Contratação</th>
52
+ <th width="20%">Ações</th>
53
+ </tr>
54
+ </thead>
55
+ <tr class="" v-for="job in getJobsFiltered()" @click="redirectToJob(job)" v-bind:key="job.job_id" >
56
+ <td class="job-name">
57
+ <div class="mobile-content">
58
+ <span class="avatar avatar-xl rounded-circle table-icon">
59
+ <img alt="Laponia Veiculos" :src="companyLogo">
60
+ </span>
61
+ <ul class="list-inline">
62
+ <!-- <li class="list-inline-item" v-on:click.prevent="callSaveJob(job.job_id)"><font-awesome-icon :icon="[!fullHeart ? 'far' : 'fas', 'heart']" class="mr-2"/></li> -->
63
+ <li class="list-inline-item" v-on:click.prevent="callShareJob(job.job_id)"><font-awesome-icon :icon="['fas', 'share']" class="mr-0"/></li>
64
+ </ul>
65
+ <div class="text-uppercase">{{companyName}}</div>
66
+ </div>
67
+ <span>{{job.title}} </span>
68
68
  &nbsp;
69
- <badge tag="span" type="primary" class="bg-lighter" v-if="job.handicapped == 1">
70
- <font-awesome-icon :icon="['fas', 'wheelchair']" class=""/>
71
- </badge>
72
- </td>
73
- <td class="job-city">{{job.address.city_name}}</td>
74
- <td class="job-type">{{hiringType(job.type_hiring)}}
75
- <div class="mobile-content">
76
- <badge rounded tag="span" type="primary" class="bg-lighter">{{ fromNow(job.starting_date) }}</badge>
77
- </div>
78
- </td>
79
- <td class="text-right"><a :href="baseUrl + '/' +job.link" target="_blank" class="btn btn-outline-default">Ver vaga</a></td>
80
- </tr>
81
-
82
- <tr v-if="getJobsFiltered().length <= 0">
83
- <td colspan="4" class="text-center">Nenhuma vaga encontrada</td>
84
- </tr>
85
- </table>
86
- <share-modal
87
- :show="modals"
88
- :url="jobLinkShare"
89
- />
90
- <slot></slot>
91
- </div>
69
+ <badge tag="span" type="primary" class="bg-lighter" v-if="job.handicapped == 1">
70
+ <font-awesome-icon :icon="['fas', 'wheelchair']" class=""/>
71
+ </badge>
72
+ </td>
73
+ <td class="job-city">{{job.address.city_name}}</td>
74
+ <td class="job-type">{{hiringType(job.type_hiring)}}
75
+ <div class="mobile-content">
76
+ <badge rounded tag="span" type="primary" class="bg-lighter">{{ fromNow(job.starting_date) }}</badge>
77
+ </div>
78
+ </td>
79
+ <td class="text-right"><a :href="baseUrl + '/' +job.link" target="_blank" class="btn btn-outline-default">Ver vaga</a></td>
80
+ </tr>
81
+
82
+ <tr v-if="getJobsFiltered().length <= 0">
83
+ <td colspan="4" class="text-center">Nenhuma vaga encontrada</td>
84
+ </tr>
85
+ </table>
86
+ <share-modal
87
+ :show="modals"
88
+ :url="jobLinkShare"
89
+ />
90
+ <slot></slot>
91
+ </div>
92
92
  </template>
93
93
  <script>
94
94
  import moment from 'moment';
95
95
  import 'moment/locale/pt-br';
96
96
  import { Select, Option } from 'element-ui';
97
- import ShareModal from "~/components/burh-ds/Modals/ShareModal.vue";
97
+ import ShareModal from '~/components/burh-ds/Modals/ShareModal.vue';
98
98
  import { userSaveJob } from '~/services/user';
99
99
 
100
100
  export default {
101
- name: "list-vagas",
102
- components: {
103
- [Select.name]: Select,
104
- [Option.name]: Option,
105
- ShareModal
106
- },
107
- props: {
108
- sm: Boolean,
109
- md: Boolean,
110
- img: String,
111
- bg: String,
112
- fullHeart: {
113
- type: Boolean,
114
- default: false
115
- },
116
- jobs: {
117
- type: Array,
118
- default: function() { return [] }
119
- },
120
- companyName: String,
121
- companyLogo: String
122
- },
123
- methods: {
124
- async callSaveJob(id) {
125
- this.childClickPrevent = true;
126
- let res = await userSaveJob(id);
127
-
128
- },
129
-
130
- callShareJob(jobId){
131
- this.childClickPrevent = true;
132
- this.jobLinkShare = process.env.baseAppUrl + '/vagas/' + jobId;
133
- this.modals.modal0 = true;
134
- },
135
-
136
- redirectToJob(job) {
137
- if(!this.childClickPrevent){
138
- if(window.innerWidth <= 768) {
139
- window.open(this.baseUrl + '/' + job.link);
140
- }
141
- }else{
142
- this.childClickPrevent = false;
143
- }
144
- },
145
- fromNow(date, format = "YYYY-MM-DD") {
146
- return moment(date, format).locale('pt-BR').fromNow()
147
- },
148
-
149
- hiringType(number) {
150
- if(number == 2) {
151
- return "CLT";
152
- } else if(number == 3) {
153
- return "CNPJ";
154
- } else if(number == 4) {
155
- return "Estágio";
156
- } else if(number == 5) {
157
- return 'RPA';
158
- } else if(number == 6) {
159
- return 'Temporário';
160
- } else {
161
- return '';
162
- }
163
- },
164
-
165
- getJobsFiltered() {
166
- return this.jobs.filter((job) => {
167
- let filterByJobName = (this.selects.jobName != null && this.selects.jobName != '');
168
- let filterByCityName = (this.selects.city != null && this.selects.city != '');
169
- let filterByHiringType = (this.selects.hiringType != null && this.selects.hiringType != '');
170
-
171
- let condition = (filterByCityName ? job.address.city_name == this.selects.city : true)
101
+ name: 'list-vagas',
102
+ components: {
103
+ [Select.name]: Select,
104
+ [Option.name]: Option,
105
+ ShareModal
106
+ },
107
+ props: {
108
+ sm: Boolean,
109
+ md: Boolean,
110
+ img: String,
111
+ bg: String,
112
+ fullHeart: {
113
+ type: Boolean,
114
+ default: false
115
+ },
116
+ jobs: {
117
+ type: Array,
118
+ default: function() { return []; }
119
+ },
120
+ companyName: String,
121
+ companyLogo: String
122
+ },
123
+ methods: {
124
+ async callSaveJob(id) {
125
+ this.childClickPrevent = true;
126
+ let res = await userSaveJob(id);
127
+
128
+ },
129
+
130
+ callShareJob(jobId){
131
+ this.childClickPrevent = true;
132
+ this.jobLinkShare = process.env.baseAppUrl + '/vagas/' + jobId;
133
+ this.modals.modal0 = true;
134
+ },
135
+
136
+ redirectToJob(job) {
137
+ if(!this.childClickPrevent){
138
+ if(window.innerWidth <= 768) {
139
+ window.open(this.baseUrl + '/' + job.link);
140
+ }
141
+ }else{
142
+ this.childClickPrevent = false;
143
+ }
144
+ },
145
+ fromNow(date, format = 'YYYY-MM-DD') {
146
+ return moment(date, format).locale('pt-BR').fromNow();
147
+ },
148
+
149
+ hiringType(number) {
150
+ if(number == 2) {
151
+ return 'CLT';
152
+ } else if(number == 3) {
153
+ return 'PJ';
154
+ } else if(number == 4) {
155
+ return 'Estágio';
156
+ } else if(number == 5) {
157
+ return 'RPA';
158
+ } else if(number == 6) {
159
+ return 'Temporário';
160
+ } else if(number == 8) {
161
+ return 'Outros';
162
+ } else {
163
+ return '';
164
+ }
165
+ },
166
+
167
+ getJobsFiltered() {
168
+ return this.jobs.filter((job) => {
169
+ let filterByJobName = (this.selects.jobName != null && this.selects.jobName != '');
170
+ let filterByCityName = (this.selects.city != null && this.selects.city != '');
171
+ let filterByHiringType = (this.selects.hiringType != null && this.selects.hiringType != '');
172
+
173
+ let condition = (filterByCityName ? job.address.city_name == this.selects.city : true)
172
174
  && (filterByJobName ? job.title.toLowerCase().indexOf(this.selects.jobName.toLowerCase()) > -1 : true)
173
- && (filterByHiringType ? job.type_hiring == this.selects.hiringType : true)
174
-
175
- return condition;
176
- });
177
- }
178
- },
179
- data() {
180
- return {
181
- baseUrl: process.env.baseAppUrl,
182
- selects: {
183
- simple: 'Badges',
184
- city: '',
185
- jobName: '',
186
- hiringType: ''
187
- },
188
- cities: [],
189
- hiringTypes: [],
190
- modals: {
191
- modal0: false
192
- },
193
- jobLinkShare: '',
194
- childClickPrevent: false
195
-
196
- }
197
- },
198
-
199
- mounted() {
200
- let cities = [];
201
-
202
- for(let job of this.jobs) {
203
- if(cities.filter((city) => {
204
- return city.value == job.address.city_name
205
- }).length <= 0) {
206
- cities.push({
207
- label: job.address.city_name,
208
- value: job.address.city_name
209
- })
210
- }
211
- }
212
-
213
- this.cities = cities;
214
-
215
- let hiringTypes = [];
216
-
217
- for(let job of this.jobs) {
218
- if(hiringTypes.filter((hp) => {
219
- return this.hiringType(hp.value) == this.hiringType(job.type_hiring)
220
- }).length <= 0) {
221
- hiringTypes.push({
222
- label: this.hiringType(job.type_hiring),
223
- value: job.type_hiring
224
- })
225
- }
226
- }
227
-
228
- this.hiringTypes = hiringTypes;
229
- }
175
+ && (filterByHiringType ? job.type_hiring == this.selects.hiringType : true);
176
+
177
+ return condition;
178
+ });
179
+ }
180
+ },
181
+ data() {
182
+ return {
183
+ baseUrl: process.env.baseAppUrl,
184
+ selects: {
185
+ simple: 'Badges',
186
+ city: '',
187
+ jobName: '',
188
+ hiringType: ''
189
+ },
190
+ cities: [],
191
+ hiringTypes: [],
192
+ modals: {
193
+ modal0: false
194
+ },
195
+ jobLinkShare: '',
196
+ childClickPrevent: false
197
+
198
+ };
199
+ },
200
+
201
+ mounted() {
202
+ let cities = [];
203
+
204
+ for(let job of this.jobs) {
205
+ if(cities.filter((city) => {
206
+ return city.value == job.address.city_name;
207
+ }).length <= 0) {
208
+ cities.push({
209
+ label: job.address.city_name,
210
+ value: job.address.city_name
211
+ });
212
+ }
213
+ }
214
+
215
+ this.cities = cities;
216
+
217
+ let hiringTypes = [];
218
+
219
+ for(let job of this.jobs) {
220
+ if(hiringTypes.filter((hp) => {
221
+ return this.hiringType(hp.value) == this.hiringType(job.type_hiring);
222
+ }).length <= 0) {
223
+ hiringTypes.push({
224
+ label: this.hiringType(job.type_hiring),
225
+ value: job.type_hiring
226
+ });
227
+ }
228
+ }
229
+
230
+ this.hiringTypes = hiringTypes;
231
+ }
230
232
  };
231
233
  </script>
232
234
  <style lang="scss">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burh/nuxt-core",
3
- "version": "1.1.13",
3
+ "version": "1.1.15",
4
4
  "description": "Design System and Components.",
5
5
  "author": "Burh",
6
6
  "private": false,