Skip to content

Commit

Permalink
Merge pull request #336 from intersective/prerelease
Browse files Browse the repository at this point in the history
Release 2.2.1.5
  • Loading branch information
shawnm0705 authored Oct 20, 2023
2 parents 5f3ed0b + 6250a54 commit a0b4e4a
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 12 deletions.
16 changes: 16 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/app/chat/chat-list/chat-list.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ export class ChatListComponent {
return;
}
this._initialise();
this._checkAndSubscribePusherChannels();
this._loadChatData();
}

Expand All @@ -75,6 +74,7 @@ export class ChatListComponent {
this._groupingChatChannels();
this.loadingChatList = false;
this.chatListReady.emit(this.announcementChatChannels.concat(this.groupChatChannels, this.directChatChannels));
this._checkAndSubscribePusherChannels();
});
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="ion-padding" [ngClass]="{'main-container': updateSuccess}">
<ng-container *ngIf="!updateSuccess; else messageCreated">
<p class="subtitle-2 popup-title">{{ reScheduled ? 'Modify Shedule' : 'Edit Message' }}</p>
<p class="subtitle-2 popup-title">{{ reScheduled ? 'Modify Schedule' : 'Edit Message' }}</p>

<p class="caption hint-message" *ngIf="reScheduled"><strong>{{ utils.browserTimezone() }} Timezone</strong></p>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<ion-label class="ion-text-wrap">
<p class="black subtitle-2 channel-title">Cohort Open Discussion</p>
<p class="caption grey-50">Add experience participants in one channel to boost your
comunity. <strong>All participants can send messages to this channel.</strong></p>
community. <strong>All participants can send messages to this channel.</strong></p>
</ion-label>
</ion-item>
</ion-list>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
<div class="form-container">

<p class="subtitle-2 popup-subtitle">Date</p>
<ion-input class="date-time-pickers" type="date" [(ngModel)]="selectedDate"></ion-input>
<ion-input class="date-time-pickers" type="date" [(ngModel)]="selectedDate" (ionChange)="validateDateTime()"></ion-input>


<p class="subtitle-2 popup-subtitle">Time</p>
<ion-input class="date-time-pickers" type="time" [(ngModel)]="selectedTime"></ion-input>
<ion-input class="date-time-pickers" type="time" [(ngModel)]="selectedTime" (ionChange)="validateDateTime()"></ion-input>

<p class="subtitle-2 popup-error" *ngIf="invalidDateTime">Selected date and time is not valid</p>

Expand All @@ -41,11 +41,11 @@
</ng-template>
</div>
<div class="message-popup-footer">
<ion-button tabindex="2" color="light" class="btn-cancle" (click)="close()" [disabled]="sending">
<ion-button tabindex="2" color="light" class="btn-cancel" (click)="close()" [disabled]="sending">
{{ createdMessage ? 'Close' : 'Cancel' }}
</ion-button>
<ion-button *ngIf="!createdMessage" tabindex="3" color="ocean" (click)="scheduleMessage()"
[disabled]="sending || !selectedDate || !selectedTime || !channelUuid">
[disabled]="sending || invalidDateTime || !channelUuid">
{{ sending ? 'sending..' : 'Schedule Message'}}
</ion-button>
</div>
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Component, OnInit, Input } from '@angular/core';
import { ModalController } from '@ionic/angular';
import * as moment from 'moment';

import { StorageService } from '@services/storage.service';
import { UtilsService } from '@services/utils.service';
Expand Down Expand Up @@ -43,10 +42,11 @@ export class ScheduleMessagePopupComponent implements OnInit {
}

private _initialise() {
const today = new Date();
this.uploading = false;
this.sending = false;
this.selectedDate = '';
this.selectedTime = '';
this.selectedDate = today.toLocaleDateString();
this.selectedTime = (today.getHours() < 10 ? '0' : '') + today.getHours() + ':00';
this.uploadedFile = null;
this.invalidDateTime = false;
this.createdMessage = null;
Expand All @@ -61,6 +61,10 @@ export class ScheduleMessagePopupComponent implements OnInit {
});
}

validateDateTime() {
this.invalidDateTime = !this.isValidDateTime(`${this.selectedDate} ${this.selectedTime}`);
}

scheduleMessage() {
if (!this.selectedDate || !this.selectedTime || !this.channelUuid) {
return;
Expand Down
2 changes: 1 addition & 1 deletion src/app/overview/overview.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ <h1>Experiences</h1>
</div>
<div class="title-bar-tools col-md-6">
<button class="btn btn-link" [disabled]="loadingExps" (click)="createReport()">Download data</button>
<button class="btn btn-primary btn-sm" style='border-radius: 20px; font-size: .8em;' (click)="goToLink('https://help.practera.com/en/articles/4820081-communicating-with-learners-and-experts')"><ion-icon size='small' name="help-circle-outline"></ion-icon><span>help</span></button>
<button class="btn btn-primary btn-sm" style='border-radius: 20px; font-size: .8em;' (click)="goToLink('https://practera.com/docs/the-experience-portal-explained-practera-2/')"><ion-icon size='small' name="help-circle-outline"></ion-icon><span>help</span></button>
</div>
</div>
</header>
Expand Down
2 changes: 1 addition & 1 deletion src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ ion-item.sc-ion-select-popover {
flex-direction: row;
flex-wrap: wrap;

.btn-cancle {
.btn-cancel {
&::part(native) {
border: 1px solid;
border-color: var(--practera-grey-25);
Expand Down

0 comments on commit a0b4e4a

Please sign in to comment.