Skip to content

Commit

Permalink
Merge pull request #436 from intersective/golive/2.4
Browse files Browse the repository at this point in the history
Prerelease 2.4
  • Loading branch information
shawnm0705 authored Jul 25, 2024
2 parents acb67f6 + 98ab31f commit c0faefa
Show file tree
Hide file tree
Showing 76 changed files with 2,868 additions and 43 deletions.
4 changes: 3 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
"parserOptions": {
"project": [
"tsconfig.json",
"e2e/tsconfig.json"
"src/tsconfig.app.json",
"src/tsconfig.spec.json",
"e2e/tsconfig.e2e.json"
],
"createDefaultProgram": true
},
Expand Down
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,4 @@ npm-debug.log*
/.vscode
/coverage
/dist
/node_modules
/platforms
/plugins
/www
/node_modules
26 changes: 24 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,30 @@

## Requirements

- Ionic 4
- Angular 7
- Ionic 7
- Angular 15

## Development

1. To run this project locally, start with `demo:true` (in environment.ts)
1. Go to `https://localhost:4202/auth/demo` (the SSL must not be omitted) to get authorised locally
1. Ignore the `.localsegment` error during compilation (it's for devops purpose)
1. Start coding!

### Sandbox API environment (option 1)

1. Copy the "me" object from the localStorage from our app or core-admin
1. Paste it in your running local cutie-app's localStorage with the same key ("me")
1. There is no content in the root "/"
1. relative-url must be added after the `https://localhost:4202/` in order to see the content that you expect to see
1. For example, `https://localhost:4202/overview-only` will redirect you to *overview-only* route.
1. You would not redirected and will get stuck in `https://localhost:4202` when there is no relative URL appended.

### Sandbox API environment (option 2)

1. Follow this URL format: https://localhost:4202/?redirect=overview-only&jwt={OUR-APP-APIKEY}
1. Get the APIKEY from the already authorised app user localStorage or HTTP header and replace {OUR-APP-APIKEY} with the obtained APIKEY
1. You'll be redirect to the specified "redirect" destination.

## Installation

Expand Down
4 changes: 3 additions & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,8 @@
"@angular-eslint/schematics",
"@ionic/angular-toolkit",
"@angular-eslint/schematics"
]
],
"analytics": false
},
"schematics": {
"@ionic/angular-toolkit:component": {
Expand All @@ -288,3 +289,4 @@
}
}
}

99 changes: 99 additions & 0 deletions package-lock.json

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

4 changes: 4 additions & 0 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ const routes: Routes = [
path: 'templates',
loadChildren: () => import('./template-library/template-library.module').then(m => m.TemplateLibraryModule)
},
{
path: 'metrics',
loadChildren: () => import('./metrics/metrics.module').then(m => m.MetricsModule)
},
// {
// path: 'onboarding',
// loadChildren: './onboarding/onboarding.module#OnboardingModule'
Expand Down
6 changes: 3 additions & 3 deletions src/app/auth/auth.component.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<ion-content color="light">
<ng-container [ngSwitch]="redirect">
<ng-container *ngSwitchCase="'overview-only'">
<app-overview skeletonOnly="true"></app-overview>
<app-overview [skeletonOnly]="true"></app-overview>
</ng-container>

<ng-container *ngSwitchCase="'chat-only'">
<app-chat skeletonOnly="true"></app-chat>
<app-chat [skeletonOnly]="true"></app-chat>
</ng-container>

<ng-container *ngSwitchCase="'progress-only'">
<app-progress skeletonOnly="true"></app-progress>
<app-progress [skeletonOnly]="true"></app-progress>
</ng-container>

<ng-container *ngSwitchDefault>
Expand Down
6 changes: 6 additions & 0 deletions src/app/auth/auth.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ export class AuthComponent implements OnInit {
case 'overview-only':
this.router.navigate(['overview-only']);
break;
case 'institution-metrics':
this.router.navigate(['metrics', 'institution']);
break;
case 'experience-metrics':
this.router.navigate(['metrics', 'experience']);
break;
default:
this.router.navigate(['dashboard']);
break;
Expand Down
2 changes: 1 addition & 1 deletion src/app/chat/chat-room/chat-room.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
<!-- File preview -->
<ion-col size="10" size-lg="6" class="ion-no-padding ion-text-center" *ngIf="!attachment.mimetype || !attachment.mimetype.includes('image') && !attachment.mimetype.includes('video')">
<div class="file-preview">
<ion-item lines="none" class="general-attachment" (click)="previewFile(message.fileObject)">
<ion-item lines="none" class="general-attachment" (click)="previewFile(attachment)">
<ion-ripple-effect></ion-ripple-effect>
<ion-icon name="document" slot="start"></ion-icon>
<ion-label color="black">
Expand Down
5 changes: 4 additions & 1 deletion src/app/chat/chat.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ export interface Message {
message: string;
created: string;
file: string;
fileObject?: object;
fileObject?: {
filename: string;
mimetype: string;
};
preview?: string;
noAvatar?: boolean;
channelUuid?: string;
Expand Down
10 changes: 7 additions & 3 deletions src/app/components/chart/chart.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Component, OnInit, Input } from '@angular/core';
import { Color, ScaleType } from '@swimlane/ngx-charts';
import * as shape from 'd3-shape';

@Component({
Expand All @@ -13,12 +14,15 @@ export class ChartComponent {
@Input() xAxisTicks: any[];
@Input() yAxisTicks: any[];
@Input() legendTitle: string;
@Input() yScaleMax: string;
@Input() yScaleMax: number;
curve = shape.curveBasis;
colorScheme = {
colorScheme: Color = {
name: '',
domain: [
'#2bbfd4'
]
],
selectable: null,
group: ScaleType.Ordinal,
};
constructor() { }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<ion-col size="7" class="container-body">
<ng-container *ngIf="progress.submitted">
<ion-label [ngClass]="{'warning': progress.overdue}"
*ngIf="progress.status !== 'not started' || progress.status !== 'in progress' else submittedTmp">
*ngIf="progress.status !== 'not started' && progress.status !== 'in progress' else submittedTmp">
{{ progress.submitted }}
</ion-label>
<ng-template #submittedTmp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
[limit]="limit"
[offset]="offset"
[count]="count"
externalPaging=true
externalSorting=true
[externalPaging]=true
[externalSorting]=true
[loadingIndicator]="loading"
(sort)="sort($event)"
class="material"
Expand Down
4 changes: 2 additions & 2 deletions src/app/message/message.component.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<app-navbar
[title]="title"
hasBack=true
hasSend=true
[hasBack]=true
[hasSend]=true
(back)="back()"
(send)="send()"
></app-navbar>
Expand Down
Loading

0 comments on commit c0faefa

Please sign in to comment.