#329526 Hide the ability to edit the group of an already created event. Fix typo in user groups section. Change app name according to UX decision. Fix arrow not visible in finalize event screen when more than 1 votes for a date.
This commit is contained in:
Родитель
44303b22b1
Коммит
a039f000d4
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">TeamUP</string>
|
||||
<string name="title_activity_kimera">TeamUP</string>
|
||||
<string name="app_name">Team UP</string>
|
||||
<string name="title_activity_kimera">Team UP</string>
|
||||
</resources>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">TeamUP</string>
|
||||
<string name="title_activity_kimera">TeamUP</string>
|
||||
<string name="app_name">Team UP</string>
|
||||
<string name="title_activity_kimera">Team UP</string>
|
||||
</resources>
|
||||
|
|
|
@ -73,3 +73,7 @@ TextView {
|
|||
border-bottom-width: 1;
|
||||
min-height: 30;
|
||||
}
|
||||
|
||||
.group .field.readonly {
|
||||
border-bottom-width: 0;
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ export class EditableEventComponent implements OnInit{
|
|||
currentUser: User;
|
||||
selectedGroup: Group;
|
||||
|
||||
private _isEdit: boolean = false;
|
||||
isEdit: boolean = false;
|
||||
|
||||
constructor(
|
||||
private _groupsService: GroupsService,
|
||||
|
@ -34,7 +34,7 @@ export class EditableEventComponent implements OnInit{
|
|||
if (typeof this.event.OpenForRegistration !== 'boolean') {
|
||||
this.event.OpenForRegistration = true;
|
||||
}
|
||||
this._isEdit = this.event.Id !== undefined; // must be before prefilling group
|
||||
this.isEdit = this.event.Id !== undefined; // must be before prefilling group
|
||||
if (this.userGroups.length === 1) {
|
||||
this.event.GroupId = this.userGroups[0].Id;
|
||||
}
|
||||
|
@ -57,6 +57,10 @@ export class EditableEventComponent implements OnInit{
|
|||
}
|
||||
|
||||
onSelectGroup() {
|
||||
if (this.isEdit) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._openGroupModal()
|
||||
.then((selectedIndex: number) => {
|
||||
if (selectedIndex > -1) {
|
||||
|
@ -89,7 +93,7 @@ export class EditableEventComponent implements OnInit{
|
|||
private _validateDateOption(date: Date) {
|
||||
if (this._isDuplicateDate(date)) {
|
||||
return 'Date already added';
|
||||
} else if (!this._isEdit && date <= new Date()) {
|
||||
} else if (!this.isEdit && date <= new Date()) {
|
||||
return 'Date is in the past';
|
||||
}
|
||||
}
|
||||
|
@ -109,7 +113,7 @@ export class EditableEventComponent implements OnInit{
|
|||
|
||||
private _openDateModal() {
|
||||
let ctx = {
|
||||
isEdit: this._isEdit,
|
||||
isEdit: this.isEdit,
|
||||
validator: this._validateDateOption.bind(this)
|
||||
};
|
||||
return this._openModal(ctx, DateTimePickerModalComponent);
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
<StackLayout class="input-field group with-popup">
|
||||
<Label class="label" text="Group"></Label>
|
||||
<Label class="field" (tap)="onSelectGroup()" [text]="getSelectedGroupName()"></Label>
|
||||
<Label class="field" (tap)="onSelectGroup()" [class.readonly]="isEdit" [text]="getSelectedGroupName()"></Label>
|
||||
</StackLayout>
|
||||
|
||||
<StackLayout class="input-field">
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
margin: 0;
|
||||
font-size: 14;
|
||||
color: #9c9c9c;
|
||||
width: 70;
|
||||
width: 80;
|
||||
}
|
||||
|
||||
.count .if {
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<Label col="1" row="0" class="date" [text]="dateInfo.date | date:dateFormat"></Label>
|
||||
<DockLayout col="2" row="0" orientation="horizontal" class="count">
|
||||
<Label dock="left" [text]="getCountText(dateInfo.count)" (tap)="listVoters(dateInfo)"></Label>
|
||||
<Label dock="right" *ngIf="dateInfo.count > 0" class="if" text="d" horizontalAlignment="right"></Label>
|
||||
<Label dock="right" *ngIf="dateInfo && dateInfo.count > 0" class="if" text="d" horizontalAlignment="right"></Label>
|
||||
</DockLayout>
|
||||
</GridLayout>
|
||||
</StackLayout>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<StackLayout *tabItem="{ title: 'My Groups' }" class="tab-item">
|
||||
<StackLayout class="tab-items-wrapper" [ngClass]="{ 'no-groups': userGroups && !userGroups.length }">
|
||||
<ActivityIndicator [busy]="!userGroups && selectedIndex === 0" [visibility]="userGroups ? 'collapse' : 'visible'" horizontalAlignment="center" verticalAlignment="center"></ActivityIndicator>
|
||||
<group-list *ngIf="userGroups && userGroups.length" [groups]="userGroups" [areUserGroups]="true" [hasMore]="hasMoreUserGroups" (onGroupTap)="selectGroup($event)" (scrolledToBottom)="loadMoresUserGroups()"></group-list>
|
||||
<group-list *ngIf="userGroups && userGroups.length" [groups]="userGroups" [areUserGroups]="true" [hasMore]="hasMoreUserGroups" (onGroupTap)="selectGroup($event)" (scrolledToBottom)="loadMoreUserGroups()"></group-list>
|
||||
<StackLayout *ngIf="userGroups && !userGroups.length" class="no-items">
|
||||
<Label class="if" text="n"></Label>
|
||||
<Label text="It's time to join a group!" [textWrap]="true" class="title"></Label>
|
||||
|
|
Загрузка…
Ссылка в новой задаче