= {
newEntry: newEntry,
duplicates: updateModels,
status: updateModels.length ? 'error' : 'new',
errors: updateModels.length ? ['Duplicates'] : []
};
+ if (!entry.newEntry.title) {
+ this.setError(entry, 'Title');
+ }
+ if (!entry.newEntry.text) {
+ this.setError(entry, 'Title');
+ }
+ return entry;
}
/**
diff --git a/client/src/app/site/users/components/user-list/user-list.component.html b/client/src/app/site/users/components/user-list/user-list.component.html
index eb0c4dfde..7be562b9b 100644
--- a/client/src/app/site/users/components/user-list/user-list.component.html
+++ b/client/src/app/site/users/components/user-list/user-list.component.html
@@ -53,7 +53,9 @@
people
- {{ user.groups }}
+ {{ group.getTitle() | translate }},
+
diff --git a/client/src/app/site/users/services/user-filter-list.service.ts b/client/src/app/site/users/services/user-filter-list.service.ts
index b8720daa5..82b7e75e0 100644
--- a/client/src/app/site/users/services/user-filter-list.service.ts
+++ b/client/src/app/site/users/services/user-filter-list.service.ts
@@ -6,6 +6,7 @@ import { User } from 'app/shared/models/users/user';
import { ViewUser } from '../models/view-user';
import { GroupRepositoryService } from 'app/core/repositories/users/group-repository.service';
import { UserRepositoryService } from 'app/core/repositories/users/user-repository.service';
+import { TranslateService } from '@ngx-translate/core';
@Injectable({
providedIn: 'root'
@@ -16,7 +17,7 @@ export class UserFilterListService extends BaseFilterListService
private userGroupFilterOptions = {
isActive: false,
property: 'groups_id',
- label: 'User Group',
+ label: 'Groups',
options: []
};
@@ -29,21 +30,30 @@ export class UserFilterListService extends BaseFilterListService
},
{
property: 'is_active',
- label: 'Active',
+ label: this.translate.instant('Active'),
isActive: false,
- options: [{ condition: true, label: 'Is active' }, { condition: false, label: 'Is not active' }]
+ options: [
+ { condition: true, label: 'Is active' },
+ { condition: false, label: this.translate.instant('Is not active') }
+ ]
},
{
property: 'is_committee',
- label: 'Committee',
+ label: this.translate.instant('Committee'),
isActive: false,
- options: [{ condition: true, label: 'Is a committee' }, { condition: false, label: 'Is not a committee' }]
+ options: [
+ { condition: true, label: 'Is a committee' },
+ { condition: false, label: this.translate.instant('Is not a committee') }
+ ]
},
{
property: 'is_last_email_send',
label: 'Last email send',
isActive: false,
- options: [{ condition: true, label: 'Got an email' }, { condition: false, label: "Didn't get an email" }]
+ options: [
+ { condition: true, label: this.translate.instant('Got an email') },
+ { condition: false, label: this.translate.instant("Didn't get an email") }
+ ]
}
];
@@ -55,7 +65,21 @@ export class UserFilterListService extends BaseFilterListService
return [this.userGroupFilterOptions].concat(this.staticFilterOptions);
}
- public constructor(store: StorageService, private groupRepo: GroupRepositoryService, repo: UserRepositoryService) {
+ /**
+ * Contructor. Subscribes to incoming group definitions.
+ *
+ * @param store
+ * @param groupRepo
+ * @param repo
+ * @param translate marking some translations that are unique here
+ *
+ */
+ public constructor(
+ store: StorageService,
+ private groupRepo: GroupRepositoryService,
+ repo: UserRepositoryService,
+ private translate: TranslateService
+ ) {
super(store, repo);
this.subscribeGroups();
}
diff --git a/client/src/app/site/users/services/user-sort-list.service.ts b/client/src/app/site/users/services/user-sort-list.service.ts
index b86c55110..0fafcbf57 100644
--- a/client/src/app/site/users/services/user-sort-list.service.ts
+++ b/client/src/app/site/users/services/user-sort-list.service.ts
@@ -18,8 +18,8 @@ export class UserSortListService extends BaseSortListService {
{ property: 'last_name', label: 'Surname' },
{ property: 'is_present', label: 'Presence' },
{ property: 'is_active', label: 'Is active' },
- { property: 'is_committee', label: 'Is Committee' },
- { property: 'number', label: 'Number' },
+ { property: 'is_committee', label: 'Is committee' },
+ { property: 'number', label: 'Participant number' },
{ property: 'structure_level', label: 'Structure level' },
{ property: 'comment' }
// TODO email send?