Skip to content
This repository was archived by the owner on Mar 29, 2023. It is now read-only.

Commit 5b8ab26

Browse files
committed
feat: release 2.4.0
1 parent 1f683e0 commit 5b8ab26

35 files changed

Lines changed: 1640 additions & 239 deletions

File tree

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module.exports = {
44
node: true,
55
},
66
extends: ['plugin:vue/essential', 'eslint:recommended'],
7-
plugins: ["prettier"],
7+
plugins: ['prettier'],
88
rules: {
99
'prettier/prettier': 'error',
1010
'no-console': 'off',

.gitlab-ci.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
build_test:
2+
image: node:lts-alpine
3+
stage: test
4+
before_script:
5+
- cp app/etc/env.production.js app/etc/env.js
6+
- cp app/etc/modules.production.json app/etc/modules.config.json
7+
script:
8+
- npm install
9+
- npm run compile
10+
- npm run build
11+
112
demo_deploy:
213
image: alpine
314
stage: deploy
@@ -28,11 +39,12 @@ live_deploy:
2839
- ssh $CI_USER@$CI_HOST 'cd cattr/core-vue-application && git pull'
2940
- ssh $CI_USER@$CI_HOST 'source .zshrc && cd cattr/core-vue-application && npm install'
3041
- ssh $CI_USER@$CI_HOST 'source .zshrc && cd cattr/core-vue-application && npm run compile'
31-
- ssh $CI_USER@$CI_HOST 'cd cattr/core-vue-application && git clean -Xf output/*'
3242
- ssh $CI_USER@$CI_HOST 'source .zshrc && cd cattr/core-vue-application && npm run build'
43+
- ssh $CI_USER@$CI_HOST 'test -f cattr/core-vue-application/dist/index.html || exit 1'
44+
- ssh $CI_USER@$CI_HOST 'cd cattr/core-vue-application && git clean -Xf output/*'
3345
- ssh $CI_USER@$CI_HOST 'cp -rf cattr/core-vue-application/dist/* cattr/core-vue-application/output'
3446
- ssh $CI_USER@$CI_HOST 'cd cattr/core-vue-application && git clean -Xf dist'
35-
- ssh $CI_USER@$CI_HOST 'cd cattr/core-vue-application && sentry-cli releases deploys "$(cat package.json | grep version | grep -o ":.*" | grep -o "\".*\"" | sed 's/"//g')" new -e "production"'
47+
- ssh $CI_USER@$CI_HOST 'cd cattr/core-vue-application && sentry-cli releases deploys `cat package.json | grep version | grep -o ":.*" | grep -o "\".*\"" | sed "s/\"//g"` new -e "production"'
3648

3749
staging_deploy:
3850
image: alpine
@@ -50,10 +62,10 @@ staging_deploy:
5062
- ssh $STAGING_USER@$STAGING_HOST 'cp -f frontend/app/etc/env.staging.js frontend/app/etc/env.js'
5163
- ssh $STAGING_USER@$STAGING_HOST 'cp -f frontend/app/etc/modules.staging.json frontend/app/etc/modules.config.json'
5264
- ssh $STAGING_USER@$STAGING_HOST 'source .zshrc && cd frontend && npm install'
53-
- ssh $STAGING_USER@$STAGING_HOST 'source .zshrc && cd frontend && npx run compile'
54-
- ssh $STAGING_USER@$STAGING_HOST 'source .zshrc && cd frontend && npx run build'
65+
- ssh $STAGING_USER@$STAGING_HOST 'source .zshrc && cd frontend && npm run compile'
66+
- ssh $STAGING_USER@$STAGING_HOST 'source .zshrc && cd frontend && npm run build'
5567
- ssh $STAGING_USER@$STAGING_HOST 'test -f frontend/dist/index.html || exit 1'
5668
- ssh $STAGING_USER@$STAGING_HOST 'cd frontend && git clean -Xf output/*'
5769
- ssh $STAGING_USER@$STAGING_HOST 'cp -rf frontend/dist/* frontend/output'
5870
- ssh $STAGING_USER@$STAGING_HOST 'cd frontend && git clean -Xf dist'
59-
- ssh $STAGING_USER@$STAGING_HOST 'cd frontend && sentry-cli releases deploys "$(cat package.json | grep version | grep -o ':.*' | grep -o '\".*\"' | sed 's/\"//g')" new -e "staging"'
71+
- ssh $STAGING_USER@$STAGING_HOST 'cd frontend && sentry-cli releases deploys `cat package.json | grep version | grep -o ":.*" | grep -o "\".*\"" | sed "s/\"//g"` new -e "staging"'

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ npm install
77
88
# Copy frontend configuration file
99
cp app/etc/env.production.js app/etc/env.js
10+
cp app/etc/modules.production.json app/etc/modules.config.json
1011
1112
# Adjust parameters in env.js (API_URL at least)
1213
nano app/etc/env.js

app/core/components/UserSelect.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@
182182
this.isLoading = false;
183183
184184
if (!localStorage.getItem(localStorageKey)) {
185-
this.userIDs = this.users.map(user => user.id);
185+
this.userIDs = this.users.filter(user => user.active).map(user => user.id);
186186
localStorage.setItem(localStorageKey, JSON.stringify(this.userIDs));
187187
}
188188
@@ -198,11 +198,9 @@
198198
this.$emit('change', this.userIDs);
199199
}
200200
},
201-
202201
beforeDestroy() {
203202
window.removeEventListener('click', this.hidePopup);
204203
},
205-
206204
computed: {
207205
activeUsers() {
208206
return this.users.filter(user => user.active);

app/core/i18n/locales/en.json

Lines changed: 57 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@
103103
"status": "Status",
104104
"email": "E-mail",
105105
"user": "User",
106+
"users": "Users",
106107
"active": "Active",
107108
"change_password": "Change password",
108109
"screenshot": "Screenshot",
@@ -131,8 +132,9 @@
131132
"send_invite": "Send invite",
132133
"selected": "Selected",
133134
"total": "Total",
135+
"total_time": "Total time",
134136
"total_spent": "Total Spent Time",
135-
"workers": "Workers",
137+
"time": "Time",
136138
"statuses": {
137139
"any": "Any",
138140
"active": "Active",
@@ -151,7 +153,8 @@
151153
"client": "Client"
152154
},
153155
"work_time": "Working Hours",
154-
"notice": "Notice"
156+
"notice": "Notice",
157+
"report": "Report"
155158
},
156159
"filter": {
157160
"enter-single": "Enter {0}",
@@ -173,6 +176,8 @@
173176
"page_not_found": "Looks like the page you're looking for doesn't exist :(",
174177
"page_forbidden": "Access forbidden",
175178
"field_is_required": "This field is required",
179+
"something_went_wrong": "Что то пошло не так",
180+
"error": "Ошибка",
176181
"vulnerable_version": "You are using a vulnerable version of the app, please update to the latest available version",
177182
"update_version": "A new version is available"
178183
},
@@ -203,5 +208,55 @@
203208
"these_emails": "These emails:",
204209
"already_exists": "is already exists",
205210
"already_sent": "to these addresses is already sent"
211+
},
212+
"notification": {
213+
"record": {
214+
"save": {
215+
"success": {
216+
"title": "Success",
217+
"message": "Record was saved successfully"
218+
}
219+
},
220+
"delete": {
221+
"confirmation": {
222+
"title": "Delete record?",
223+
"message": "Are you sure you want delete record?"
224+
},
225+
"success": {
226+
"title": "Success",
227+
"message": "Record was successfully deleted"
228+
}
229+
}
230+
},
231+
"settings": {
232+
"save": {
233+
"success": {
234+
"title": "Success",
235+
"message": "Settings were saved successfully"
236+
}
237+
}
238+
},
239+
"screenshot": {
240+
"save": {
241+
"success": {
242+
"title": "Success",
243+
"message": "Screenshots was saved successfully"
244+
},
245+
"error": {
246+
"title": "Error",
247+
"message": "Failed to save these screenshots"
248+
}
249+
},
250+
"delete": {
251+
"success": {
252+
"title": "Success",
253+
"message": "Screenshots was successfully deleted"
254+
},
255+
"error": {
256+
"title": "Error",
257+
"message": "Failed to remove these screenshots"
258+
}
259+
}
260+
}
206261
}
207262
}

app/core/i18n/locales/ru.json

Lines changed: 57 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@
103103
"status": "Статус",
104104
"email": "E-mail",
105105
"user": "Пользователь",
106+
"users": "Пользователи",
106107
"active": "Активен",
107108
"change_password": "Сменить пароль",
108109
"screenshot": "Скриншот",
@@ -131,8 +132,9 @@
131132
"send_invite": "Отправить приглашение",
132133
"selected": "Выбрано",
133134
"total": "Всего",
135+
"total_time": "Общее время",
134136
"total_spent": "Потраченное время",
135-
"workers": "Работники",
137+
"time": "Время",
136138
"statuses": {
137139
"any": "Все",
138140
"active": "Активен",
@@ -151,7 +153,8 @@
151153
"client": "Клиент"
152154
},
153155
"work_time": "Продолжительность рабочего дня",
154-
"notice": "Предупреждение"
156+
"notice": "Предупреждение",
157+
"report": "Отчет"
155158
},
156159
"filter": {
157160
"enter-single": "Введите {0}",
@@ -173,6 +176,8 @@
173176
"page_not_found": "Похоже, что страница, которую вы ищете, не существует :(",
174177
"page_forbidden": "Страница не доступна",
175178
"field_is_required": "Это поле обязательно для заполнения",
179+
"something_went_wrong": "Что то пошло не так",
180+
"error": "Ошибка",
176181
"vulnerable_version": "Вы используете уязвимую версию приложения, пожалуйста, обновитесь до последней доступной версии",
177182
"update_version": "Доступна новая версия"
178183
},
@@ -190,5 +195,55 @@
190195
"user_interval_screenshot": "Интервал создания скриншотов в минутах",
191196
"color_intervals": "Позволяет задать цвета для интервалов рабочего дня с 0 до 100 процентов",
192197
"work_time": "Минимальная продолжительность рабочего дня"
198+
},
199+
"notification": {
200+
"record": {
201+
"save": {
202+
"success": {
203+
"title": "Успешно",
204+
"message": "Запись была успешно сохранена"
205+
}
206+
},
207+
"delete": {
208+
"confirmation": {
209+
"title": "Удалить запись?",
210+
"message": "Вы уверены, что хотите удалить запись?"
211+
},
212+
"success": {
213+
"title": "Успешно",
214+
"message": "Запись была успешно удалена"
215+
}
216+
}
217+
},
218+
"settings": {
219+
"save": {
220+
"success": {
221+
"title": "Успешно",
222+
"message": "Настройки успешно сохранены"
223+
}
224+
}
225+
},
226+
"screenshot": {
227+
"save": {
228+
"success": {
229+
"title": "Успешно",
230+
"message": "Скриншот(-ы) успешно сохранен(-ы)"
231+
},
232+
"error": {
233+
"title": "Ошибка",
234+
"message": "Не удалось сохранить скриншот(-ы)"
235+
}
236+
},
237+
"delete": {
238+
"success": {
239+
"title": "Успешно",
240+
"message": "Скриншот(-ы) успешно удален(-ы)"
241+
},
242+
"error": {
243+
"title": "Ошибка",
244+
"message": "Не удалось удалить скриншот(-ы)"
245+
}
246+
}
247+
}
193248
}
194249
}

app/core/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ import i18n from './i18n';
1818
import './vee-validate';
1919
import VueLazyload from 'vue-lazyload';
2020

21-
if (process.env.NODE_ENV !== 'development' && process.env.VUE_APP_SENTRY_DSN) {
21+
if (
22+
process.env.NODE_ENV !== 'development' &&
23+
'VUE_APP_SENTRY_DSN' in process.env &&
24+
process.env.VUE_APP_SENTRY_DSN !== 'undefined'
25+
) {
2226
Sentry.init({
2327
release: process.env.VUE_APP_VERSION,
2428
environment: process.env.NODE_ENV,

app/core/views/Auth/ResetPassword.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@
200200
.catch(({ response }) => {
201201
this.$Notify({
202202
title: 'Error',
203-
message: response.data.message || 'Something went wrong',
203+
message: response.data.message || this.$t('message.something_went_wrong'),
204204
type: 'error',
205205
});
206206
})
@@ -245,7 +245,7 @@
245245
.catch(({ response }) => {
246246
this.$Notify({
247247
title: 'Error',
248-
message: response.data.message || 'Something went wrong',
248+
message: response.data.message || this.$t('message.something_went_wrong'),
249249
type: 'error',
250250
});
251251
})

app/core/views/Crud/EditView.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@
200200
:key="index"
201201
:parent="this"
202202
></component>
203-
<at-button type="primary" :disabled="invalid" :loading="isSubmitBtnDisabled" @click="submit">{{
203+
<at-button type="primary" :disabled="invalid || isLoading" :loading="isLoading" @click="submit">{{
204204
$t('control.save')
205205
}}</at-button>
206206
</validation-observer>
@@ -242,7 +242,7 @@
242242
editRouteName: pageData.editRouteName || '',
243243
},
244244
245-
isSubmitBtnDisabled: false,
245+
isLoading: false,
246246
isDataLoading: false,
247247
afterSubmitCallback: meta.afterSubmitCallback,
248248
};
@@ -300,16 +300,16 @@
300300
return;
301301
}
302302
303-
this.isSubmitBtnDisabled = true;
303+
this.isLoading = true;
304304
try {
305305
const data = (await this.service.save(this.values, this.pageData.type === 'new')).data;
306306
this.$Notify({
307307
type: 'success',
308-
title: 'Information Saved',
309-
message: 'View saved successfully',
308+
title: this.$t('notification.record.save.success.title'),
309+
message: this.$t('notification.record.save.success.message'),
310310
});
311311
312-
this.isSubmitBtnDisabled = false;
312+
this.isLoading = false;
313313
314314
if (this.afterSubmitCallback) {
315315
this.afterSubmitCallback();
@@ -320,7 +320,7 @@
320320
});
321321
}
322322
} catch ({ response }) {
323-
this.isSubmitBtnDisabled = false;
323+
this.isLoading = false;
324324
this.$refs.form.setErrors(response.data.info);
325325
}
326326
},

0 commit comments

Comments
 (0)