diff --git a/src/app/TranslateHandlers.ts b/src/app/TranslateHandlers.ts
index 60499e09f..6012f4edd 100644
--- a/src/app/TranslateHandlers.ts
+++ b/src/app/TranslateHandlers.ts
@@ -39,9 +39,14 @@ export class JSONPointerCompiler extends TranslateCompiler {
}
if (typeof currentTranslations[key] === 'string') {
if (currentTranslations[key].includes("@:")) {
-
let replacementProperty = this.getDescendantPropertyValue(masterLanguageFile, currentTranslations[key].substring(2));
let i = 0;
+
+ if (!replacementProperty) {
+ //Incase invalid referer or missing translation
+ console.error('Missing translation: ', currentTranslations[key])
+ }
+
while (replacementProperty.includes("@:")) {
i++;
const tryProp = replacementProperty;
@@ -52,7 +57,11 @@ export class JSONPointerCompiler extends TranslateCompiler {
break
};
}
- currentTranslations[key] = replacementProperty;
+ if (replacementProperty) {
+ currentTranslations[key] = replacementProperty;
+ } else {
+ currentTranslations[key] = currentTranslations[key];
+ }
}
}
});
diff --git a/src/app/account/components/password-forgot-form/password-forgot-form.component.html b/src/app/account/components/password-forgot-form/password-forgot-form.component.html
index 0ebbf19c0..9cb0c1839 100644
--- a/src/app/account/components/password-forgot-form/password-forgot-form.component.html
+++ b/src/app/account/components/password-forgot-form/password-forgot-form.component.html
@@ -1,7 +1,10 @@
@@ -29,8 +29,8 @@
@@ -43,8 +43,8 @@
diff --git a/src/app/core/components/help/imgs/icon_bubble_close.svg b/src/app/core/components/help/imgs/icon_bubble_close.svg
deleted file mode 100644
index bf650643a..000000000
--- a/src/app/core/components/help/imgs/icon_bubble_close.svg
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
\ No newline at end of file
diff --git a/src/app/core/components/help/imgs/icon_bubble_help.svg b/src/app/core/components/help/imgs/icon_bubble_help.svg
deleted file mode 100644
index 5ad990eca..000000000
--- a/src/app/core/components/help/imgs/icon_bubble_help.svg
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
diff --git a/src/app/core/components/language-select/language-select.component.html b/src/app/core/components/language-select/language-select.component.html
index c32bdca89..1846bf1b6 100644
--- a/src/app/core/components/language-select/language-select.component.html
+++ b/src/app/core/components/language-select/language-select.component.html
@@ -33,43 +33,3 @@
-
diff --git a/src/app/group/components/group-add-topics/group-add-topics.component.html b/src/app/group/components/group-add-topics/group-add-topics.component.html
index a648f213c..bf3a4a365 100644
--- a/src/app/group/components/group-add-topics/group-add-topics.component.html
+++ b/src/app/group/components/group-add-topics/group-add-topics.component.html
@@ -182,12 +182,12 @@
d="M19.1552 13.2702L18.1734 13.0801L18.0352 13.7937L18.6714 14.1453L19.1552 13.2702ZM20.7701 14.1629L20.2863 15.0381L20.2902 15.0402L20.7701 14.1629ZM19.1552 10.7226L18.6714 9.84741L18.0352 10.1991L18.1734 10.9127L19.1552 10.7226ZM20.7701 9.82985L20.2902 8.95252L20.2863 8.95467L20.7701 9.82985ZM20.9786 9.32178L21.9339 9.02611L21.9317 9.01909L21.9294 9.01209L20.9786 9.32178ZM18.905 5.88873L19.6254 5.19517L19.6234 5.19315L18.905 5.88873ZM18.3439 5.80527L18.8277 6.68045L18.8315 6.67836L18.3439 5.80527ZM16.8175 6.64907L16.1482 7.39203L16.6776 7.86902L17.3013 7.52425L16.8175 6.64907ZM14.4241 5.21827H13.4241V5.92276L14.0875 6.15991L14.4241 5.21827ZM14.0678 3.21778L13.8586 4.19567L13.8633 4.19665L14.0678 3.21778ZM9.92811 3.21778L10.1326 4.19666L10.1373 4.19564L9.92811 3.21778ZM9.57176 5.21974L9.90896 6.16117L10.5718 5.92378V5.21974L9.57176 5.21974ZM7.17851 6.65266L6.69383 7.52735L7.31831 7.87338L7.84839 7.39513L7.17851 6.65266ZM5.65576 5.80889L6.14044 4.93419L6.13567 4.93158L5.65576 5.80889ZM5.09471 5.89236L5.81385 6.58731L5.82147 6.57925L5.09471 5.89236ZM3.02108 9.32541L3.97104 9.63781L3.97217 9.63432L3.02108 9.32541ZM3.22958 9.83348L3.71339 8.95829L3.7095 8.95616L3.22958 9.83348ZM4.84451 10.7262L5.82627 10.9163L5.96444 10.2027L5.32831 9.85104L4.84451 10.7262ZM4.84451 13.2738L5.32831 14.149L5.96444 13.7973L5.82627 13.0837L4.84451 13.2738ZM3.22958 14.1665L3.7095 15.0438L3.71338 15.0417L3.22958 14.1665ZM3.02108 14.6746L2.06579 14.9703L2.06797 14.9773L2.07025 14.9843L3.02108 14.6746ZM5.09471 18.1076L4.37431 18.8012L4.37626 18.8032L5.09471 18.1076ZM5.65576 18.1911L5.17195 17.3159L5.16821 17.318L5.65576 18.1911ZM7.17987 17.3486L7.84956 16.6059L7.32007 16.1284L6.69607 16.4734L7.17987 17.3486ZM9.57555 18.7816H10.5756V18.0772L9.91222 17.84L9.57555 18.7816ZM9.9319 20.7822L10.1411 19.8043L10.1364 19.8034L9.9319 20.7822ZM14.0716 20.7822L13.8671 19.8033L13.8623 19.8044L14.0716 20.7822ZM14.4279 18.7804L14.0908 17.8389L13.4279 18.0763V18.7804H14.4279ZM16.8214 17.3474L17.3052 16.4722L16.6811 16.1272L16.1516 16.6049L16.8214 17.3474ZM18.3477 18.1911L17.8639 19.0663L17.8678 19.0684L18.3477 18.1911ZM18.9088 18.1076L18.1896 17.4127L18.182 17.4208L18.9088 18.1076ZM20.9824 14.6746L21.9335 14.9835L21.9391 14.9661L21.9441 14.9486L20.9824 14.6746ZM18.6714 14.1453L20.2863 15.0381L21.2539 13.2877L19.639 12.395L18.6714 14.1453ZM18.1734 10.9127C18.3121 11.629 18.3121 12.3637 18.1734 13.0801L20.1369 13.4602C20.3243 12.4928 20.3243 11.5 20.1369 10.5325L18.1734 10.9127ZM20.2863 8.95467L18.6714 9.84741L19.639 11.5978L21.2539 10.705L20.2863 8.95467ZM20.0233 9.61746C19.9429 9.35777 20.06 9.07846 20.2902 8.95253L21.25 10.7072C21.8517 10.378 22.1356 9.67773 21.9339 9.02611L20.0233 9.61746ZM18.1846 6.5823C19.0203 7.45037 19.6556 8.48897 20.0278 9.63148L21.9294 9.01209C21.46 7.57074 20.6623 6.27225 19.6254 5.19517L18.1846 6.5823ZM18.8315 6.67836C18.613 6.80035 18.3541 6.75735 18.1865 6.58431L19.6234 5.19315C19.1678 4.72253 18.4387 4.60696 17.8564 4.93217L18.8315 6.67836ZM17.3013 7.52425L18.8277 6.68044L17.8601 4.93009L16.3337 5.77389L17.3013 7.52425ZM14.0875 6.15991C14.8549 6.43422 15.5532 6.85606 16.1482 7.39203L17.4868 5.90611C16.7016 5.19868 15.778 4.6403 14.7607 4.27663L14.0875 6.15991ZM13.4241 3.64237V5.21827H15.4241V3.64237H13.4241ZM13.8633 4.19665C13.6328 4.14851 13.4241 3.93719 13.4241 3.64237H15.4241C15.4241 2.9411 14.9197 2.37414 14.2722 2.2389L13.8633 4.19665ZM10.1373 4.19564C11.3259 3.94134 12.6087 3.9283 13.8586 4.19566L14.2769 2.23989C12.7444 1.91209 11.1764 1.92808 9.71889 2.23991L10.1373 4.19564ZM10.5718 3.64237C10.5718 3.93719 10.3631 4.1485 10.1326 4.19665L9.72366 2.2389C9.07614 2.37414 8.57176 2.94111 8.57176 3.64237L10.5718 3.64237ZM10.5718 5.21974V3.64237L8.57176 3.64237V5.21974L10.5718 5.21974ZM7.84839 7.39513C8.44315 6.85851 9.14152 6.43605 9.90896 6.16117L9.23457 4.27831C8.21716 4.64272 7.29364 5.20192 6.50863 5.91019L7.84839 7.39513ZM5.17109 6.68359L6.69383 7.52735L7.66318 5.77796L6.14043 4.9342L5.17109 6.68359ZM5.82147 6.57925C5.6407 6.77051 5.37251 6.79379 5.17585 6.68621L6.13567 4.93158C5.5675 4.62078 4.83682 4.70937 4.36794 5.20548L5.82147 6.57925ZM3.97217 9.63432C4.34436 8.48842 4.97939 7.45073 5.8138 6.58727L4.37561 5.19745C3.33732 6.27189 2.53939 7.57129 2.06999 9.0165L3.97217 9.63432ZM3.7095 8.95616C3.92506 9.07408 4.06481 9.35267 3.97103 9.63781L2.07113 9.01301C1.84847 9.69009 2.16259 10.3896 2.74967 10.7108L3.7095 8.95616ZM5.32831 9.85104L3.71338 8.9583L2.74578 10.7087L4.3607 11.6014L5.32831 9.85104ZM5.82627 13.0837C5.68758 12.3673 5.68758 11.6327 5.82627 10.9163L3.86274 10.5361C3.67542 11.5036 3.67542 12.4964 3.86274 13.4639L5.82627 13.0837ZM3.71338 15.0417L5.32831 14.149L4.3607 12.3986L2.74578 13.2913L3.71338 15.0417ZM3.97637 14.3789C4.05675 14.6386 3.93969 14.9179 3.7095 15.0438L2.74967 13.2892C2.14796 13.6184 1.86411 14.3186 2.06579 14.9703L3.97637 14.3789ZM5.8151 17.4141C4.97936 16.546 4.34404 15.5074 3.97192 14.3649L2.07025 14.9843C2.5397 16.4256 3.33735 17.7241 4.37431 18.8012L5.8151 17.4141ZM5.16821 17.318C5.38666 17.196 5.64562 17.239 5.81315 17.4121L4.37626 18.8032C4.8319 19.2738 5.56093 19.3894 6.14331 19.0642L5.16821 17.318ZM6.69607 16.4734L5.17196 17.3159L6.13956 19.0663L7.66367 18.2237L6.69607 16.4734ZM9.91222 17.84C9.14401 17.5653 8.44492 17.1428 7.84956 16.6059L6.51018 18.0912C7.29597 18.7998 8.22044 19.3591 9.23889 19.7232L9.91222 17.84ZM10.5756 20.3576V18.7816H8.57555V20.3576H10.5756ZM10.1364 19.8034C10.3669 19.8515 10.5756 20.0628 10.5756 20.3576H8.57555C8.57555 21.0589 9.07993 21.6259 9.72745 21.7611L10.1364 19.8034ZM13.8623 19.8044C12.6738 20.0587 11.391 20.0717 10.1411 19.8043L9.72274 21.7601C11.2553 22.0879 12.8233 22.0719 14.2808 21.7601L13.8623 19.8044ZM13.4279 20.3576C13.4279 20.0628 13.6366 19.8515 13.8671 19.8034L14.276 21.7611C14.9235 21.6259 15.4279 21.0589 15.4279 20.3576L13.4279 20.3576ZM13.4279 18.7804L13.4279 20.3576L15.4279 20.3576L15.4279 18.7804H13.4279ZM16.1516 16.6049C15.5567 17.1416 14.8583 17.5641 14.0908 17.8389L14.7651 19.7218C15.7826 19.3574 16.7062 18.7982 17.4913 18.0899L16.1516 16.6049ZM18.8315 17.3159L17.3052 16.4722L16.3376 18.2226L17.8639 19.0663L18.8315 17.3159ZM18.182 17.4208C18.3628 17.2295 18.631 17.2062 18.8276 17.3138L17.8678 19.0684C18.436 19.3792 19.1666 19.2906 19.6355 18.7945L18.182 17.4208ZM20.0313 14.3657C19.6591 15.5116 19.0241 16.5493 18.1897 17.4127L19.6279 18.8025C20.6661 17.7281 21.4641 16.4287 21.9335 14.9835L20.0313 14.3657ZM20.2902 15.0402C20.0546 14.9114 19.9532 14.6375 20.0206 14.4006L21.9441 14.9486C22.1253 14.3125 21.857 13.6176 21.25 13.2856L20.2902 15.0402ZM13.7 12C13.7 12.9389 12.9389 13.7 12 13.7V15.7C14.0435 15.7 15.7 14.0435 15.7 12H13.7ZM12 10.3C12.9389 10.3 13.7 11.0611 13.7 12H15.7C15.7 9.95655 14.0435 8.3 12 8.3L12 10.3ZM10.3 12C10.3 11.0611 11.0611 10.3 12 10.3L12 8.3C9.95655 8.3 8.3 9.95655 8.3 12L10.3 12ZM12 13.7C11.0611 13.7 10.3 12.9389 10.3 12L8.3 12C8.3 14.0435 9.95655 15.7 12 15.7V13.7Z"
fill="#1168A8" />
-
+
diff --git a/src/app/group/components/group-create/group-create.component.html b/src/app/group/components/group-create/group-create.component.html
index e5181de02..1bb8416e2 100644
--- a/src/app/group/components/group-create/group-create.component.html
+++ b/src/app/group/components/group-create/group-create.component.html
@@ -81,8 +81,7 @@
-
-
- {{language.value}}
+
+ {{country.name}}
@@ -291,9 +290,9 @@
-
- {{language.value}}
+
+ {{language.name}}
diff --git a/src/app/group/components/group-create/group-create.component.ts b/src/app/group/components/group-create/group-create.component.ts
index 1b347db2b..a9e65d3a0 100644
--- a/src/app/group/components/group-create/group-create.component.ts
+++ b/src/app/group/components/group-create/group-create.component.ts
@@ -13,6 +13,8 @@ import { GroupMemberTopicService } from 'src/app/services/group-member-topic.ser
import { NotificationService } from 'src/app/services/notification.service';
import { GroupInviteUserService } from 'src/app/services/group-invite-user.service';
import { AppService } from 'src/app/services/app.service';
+import { countries } from 'src/app/services/country.service';
+import { languages } from 'src/app/services/language.service';
@Component({
selector: 'group-create-component',
@@ -22,7 +24,8 @@ import { AppService } from 'src/app/services/app.service';
export class GroupCreateComponent implements OnInit {
@ViewChild('imageUpload') fileInput?: ElementRef;
- languages$: { [key: string]: any } = this.config.get('language').list;
+ countries = countries;
+ languages = languages;
group: Group = {
name: '',
description: '',
diff --git a/src/app/group/components/group-invitation/group-invitation.component.html b/src/app/group/components/group-invitation/group-invitation.component.html
index 23ffa98a3..e4e406276 100644
--- a/src/app/group/components/group-invitation/group-invitation.component.html
+++ b/src/app/group/components/group-invitation/group-invitation.component.html
@@ -1,4 +1,92 @@
-
+
+
+
+
+
+
+
+
+
+
+
{{invite.group.name}}
+
+
+
+
{{invite.creator.name}}
+
+
+
+
+
{{invite.user.email}}
+
+
+
+
{{'TXT_GROUP_LEVELS_' + invite.level | uppercase | translate}}
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/app/group/components/group-invitation/group-invitation.component.scss b/src/app/group/components/group-invitation/group-invitation.component.scss
index e69de29bb..c142b776d 100644
--- a/src/app/group/components/group-invitation/group-invitation.component.scss
+++ b/src/app/group/components/group-invitation/group-invitation.component.scss
@@ -0,0 +1,24 @@
+
+#group_image_wrap {
+ display: flex;
+ max-width: 40px;
+ align-items: top;
+
+ .group_circle {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ width: 40px;
+ height: 40px;
+ border-radius: 40px;
+ background-color: var(--color-surface-contrast);
+ }
+
+ img {
+ width: 40px;
+ height: 40px;
+ border-radius: 40px;
+ aspect-ratio: 1;
+ object-fit: cover;
+ }
+}
\ No newline at end of file
diff --git a/src/app/group/components/group-invite-user/group-invite-user.component.html b/src/app/group/components/group-invite-user/group-invite-user.component.html
deleted file mode 100644
index 250603995..000000000
--- a/src/app/group/components/group-invite-user/group-invite-user.component.html
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{invite.user.email}} {{invite.user.phoneNumber}}
-
-
- •
-
-
-
-
-
-
-
-
-
-
-
- {{'TXT_TOPIC_LEVELS_' + invite.level | uppercase | translate}}
-
-
-
diff --git a/src/app/group/components/group-invite-user/group-invite-user.component.scss b/src/app/group/components/group-invite-user/group-invite-user.component.scss
deleted file mode 100644
index 28bbb21c5..000000000
--- a/src/app/group/components/group-invite-user/group-invite-user.component.scss
+++ /dev/null
@@ -1,3 +0,0 @@
-.dropdown {
- min-width: 160px;
-}
diff --git a/src/app/group/components/group-invite-user/group-invite-user.component.spec.ts b/src/app/group/components/group-invite-user/group-invite-user.component.spec.ts
deleted file mode 100644
index 10662eb82..000000000
--- a/src/app/group/components/group-invite-user/group-invite-user.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { GroupInviteUserComponent } from './group-invite-user.component';
-
-describe('GroupInviteUserComponent', () => {
- let component: GroupInviteUserComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ GroupInviteUserComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(GroupInviteUserComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/src/app/group/components/group-invite-user/group-invite-user.component.ts b/src/app/group/components/group-invite-user/group-invite-user.component.ts
deleted file mode 100644
index d4a08ce7e..000000000
--- a/src/app/group/components/group-invite-user/group-invite-user.component.ts
+++ /dev/null
@@ -1,58 +0,0 @@
-import { Component, OnInit, Input } from '@angular/core';
-import { MatDialog } from '@angular/material/dialog';
-import { forkJoin, take } from 'rxjs';
-import { Group } from 'src/app/interfaces/group';
-import { GroupInviteUserService } from 'src/app/services/group-invite-user.service';
-import { GroupService } from 'src/app/services/group.service';
-import { TopicMemberInviteDeleteComponent } from 'src/app/topic/components/topic-member-invite-delete/topic-member-invite-delete.component';
-@Component({
- selector: 'group-invite-user',
- templateUrl: './group-invite-user.component.html',
- styleUrls: ['./group-invite-user.component.scss']
-})
-export class GroupInviteUserComponent implements OnInit {
- @Input() invite?: any;
- @Input() group: Group | any;
- @Input() fields?: any;
-
- constructor(private dialog: MatDialog, private GroupService: GroupService, private GroupInviteUserService: GroupInviteUserService) { }
-
- ngOnInit(): void {
- }
- now() {
- return new Date();
- }
- canUpdate() {
- return this.GroupService.canUpdate(this.group);
- }
- doDeleteInviteUser() {
- const deleteDialog = this.dialog
- .open(TopicMemberInviteDeleteComponent, {
- data: {
- user: this.invite.user
- }
- });
- deleteDialog.afterClosed().subscribe((isAll) => {
- const promisesToResolve = {};
- // Delete all
- if (isAll === 'all') {
- this.GroupInviteUserService.items$.pipe(take(1))
- .subscribe((invites) => {
- invites.forEach((invite: any) => {
- if (invite.user.id === this.invite.user.id) {
- promisesToResolve[invite.id] = this.GroupInviteUserService.delete(invite);
- }
- });
-
- forkJoin(promisesToResolve)
- .pipe(take(1))
- .subscribe((res: any) => {
- this.GroupInviteUserService.reset();
- })
- })
- } else if (isAll === '1') { // Delete single
- this.GroupInviteUserService.delete(this.invite).pipe(take(1)).subscribe(res => this.GroupInviteUserService.reset());
- }
- })
- };
-}
diff --git a/src/app/group/components/group-join/group-join.component.html b/src/app/group/components/group-join/group-join.component.html
new file mode 100644
index 000000000..a935f3401
--- /dev/null
+++ b/src/app/group/components/group-join/group-join.component.html
@@ -0,0 +1,73 @@
+
+
\ No newline at end of file
diff --git a/src/app/group/components/group-join/group-join.component.scss b/src/app/group/components/group-join/group-join.component.scss
new file mode 100644
index 000000000..5ec430fbe
--- /dev/null
+++ b/src/app/group/components/group-join/group-join.component.scss
@@ -0,0 +1,29 @@
+@use "mixins";
+
+.dialog {
+ max-width: 560px;
+}
+
+#group_image_wrap {
+ display: flex;
+ max-width: 40px;
+ align-items: top;
+
+ .group_circle {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ width: 40px;
+ height: 40px;
+ border-radius: 40px;
+ background-color: var(--color-surface-contrast);
+ }
+
+ img {
+ width: 40px;
+ height: 40px;
+ border-radius: 40px;
+ aspect-ratio: 1;
+ object-fit: cover;
+ }
+}
\ No newline at end of file
diff --git a/src/app/group/components/group-join/group-join.component.ts b/src/app/group/components/group-join/group-join.component.ts
index b73d3ab9f..3f6281ce5 100644
--- a/src/app/group/components/group-join/group-join.component.ts
+++ b/src/app/group/components/group-join/group-join.component.ts
@@ -1,41 +1,74 @@
-import { Component, OnInit } from '@angular/core';
+import { Component, OnInit, Inject } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { of, switchMap, take } from 'rxjs';
import { GroupJoinService } from 'src/app/services/group-join.service';
import { LocationService } from 'src/app/services/location.service';
+import { Group } from 'src/app/interfaces/group';
+import { MatDialog, MAT_DIALOG_DATA } from '@angular/material/dialog';
@Component({
selector: 'app-group-join',
- template: '',
+ templateUrl: './group-join.component.html',
+ styleUrls: ['./group-join.component.scss']
})
export class GroupJoinComponent implements OnInit {
-
- constructor(router: Router, route: ActivatedRoute, Location: LocationService, GroupJoinService: GroupJoinService) {
- route.params.pipe(
- switchMap((params: any) => {
- return GroupJoinService
- .join(params['token'])
- }),
- take(1)
- ).subscribe({
- next: (group) => {
- router.navigate(['/my/groups', group.id]);
- },
- error: (res) => {
- const status = res.status;
- if (status.code === 40100) { // Unauthorized
- const currentUrl = Location.currentUrl();
- router.navigate(['/account/login'], { queryParams: { redirectSuccess: currentUrl } });
- } else if (status.code === 40001) { // Matching token not found.
- router.navigate(['/']);
- } else {
- router.navigate(['/404']);
- }
- }
- })
+ group: Group;
+ constructor(private router: Router, @Inject(MAT_DIALOG_DATA) data: any, private Location: LocationService, private GroupJoinService: GroupJoinService) {
+ this.group = data.group;
}
ngOnInit(): void {
}
}
+
+@Component({
+ selector: 'app-group-join',
+ template: ''
+})
+export class GroupTokenJoinComponent {
+ token: string = '';
+ constructor(router: Router, dialog: MatDialog, route: ActivatedRoute, Location: LocationService, GroupJoinService: GroupJoinService) {
+ route.params.pipe(
+ switchMap((params: any) => {
+ this.token = params['token'];
+ return GroupJoinService.get(params['token'])
+ }),take(1))
+ .subscribe({
+ next: (group) => {
+ const joinDialog = dialog.open(GroupJoinComponent, {
+ data: {
+ group: group,
+ token: this.token
+ }
+ });
+
+ joinDialog.afterClosed().subscribe((confirm) => {
+ if (confirm === true) {
+ GroupJoinService.join(this.token).pipe(
+ take(1)
+ ).subscribe({
+ next: (group) => {
+ router.navigate(['/my/groups', group.id]);
+ },
+ error: (res) => {
+ const status = res.status;
+ if (status.code === 40100) { // Unauthorized
+ const currentUrl = Location.currentUrl();
+ router.navigate(['/account/login'], { queryParams: { redirectSuccess: currentUrl } });
+ } else if (status.code === 40001) { // Matching token not found.
+ router.navigate(['/']);
+ } else {
+ router.navigate(['/404']);
+ }
+ }
+ })
+ }
+ });
+ },
+ error: (err) => {
+ console.error("Group join error", err);
+ }
+ });
+ }
+}
\ No newline at end of file
diff --git a/src/app/group/components/group-member-topic/group-member-topic.component.html b/src/app/group/components/group-member-topic/group-member-topic.component.html
deleted file mode 100644
index 67c34a882..000000000
--- a/src/app/group/components/group-member-topic/group-member-topic.component.html
+++ /dev/null
@@ -1,68 +0,0 @@
-
- {{topic.title}}
-
-
- {{topic.members.users.count}}
-
-
-
-
{{'TXT_TOPIC_LEVELS_' + (topic.permission.levelGroup || topic.level) | uppercase | translate}}
-
-
-
-
- {{'TXT_TOPIC_LEVELS_' + level.value | uppercase | translate}}
-
-
-
-
diff --git a/src/app/group/components/group-member-topic/group-member-topic.component.scss b/src/app/group/components/group-member-topic/group-member-topic.component.scss
deleted file mode 100644
index 21893a386..000000000
--- a/src/app/group/components/group-member-topic/group-member-topic.component.scss
+++ /dev/null
@@ -1,6 +0,0 @@
-.member_topic_wrap {
- display: flex;
- width: 100%;
- align-items: center;
- justify-content: space-between;
-}
diff --git a/src/app/group/components/group-member-topic/group-member-topic.component.spec.ts b/src/app/group/components/group-member-topic/group-member-topic.component.spec.ts
deleted file mode 100644
index d7fbda31d..000000000
--- a/src/app/group/components/group-member-topic/group-member-topic.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { GroupMemberTopicComponent } from './group-member-topic.component';
-
-describe('GroupMemberTopicComponent', () => {
- let component: GroupMemberTopicComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ GroupMemberTopicComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(GroupMemberTopicComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/src/app/group/components/group-member-topic/group-member-topic.component.ts b/src/app/group/components/group-member-topic/group-member-topic.component.ts
deleted file mode 100644
index 4b5fced9d..000000000
--- a/src/app/group/components/group-member-topic/group-member-topic.component.ts
+++ /dev/null
@@ -1,88 +0,0 @@
-import { Component, OnInit, Input } from '@angular/core';
-import { MatDialog } from '@angular/material/dialog';
-import { take } from 'rxjs/operators';
-
-import { GroupMemberTopicService } from 'src/app/services/group-member-topic.service';
-import { TopicService } from 'src/app/services/topic.service';
-import { GroupService } from 'src/app/services/group.service';
-import { Group } from 'src/app/interfaces/group';
-import { Topic } from 'src/app/interfaces/topic';
-import { ConfirmDialogComponent } from 'src/app/shared/components/confirm-dialog/confirm-dialog.component';
-import { TranslateService } from '@ngx-translate/core';
-
-@Component({
- selector: 'group-member-topic',
- templateUrl: './group-member-topic.component.html',
- styleUrls: ['./group-member-topic.component.scss']
-})
-export class GroupMemberTopicComponent implements OnInit {
-
- @Input() topic?: any;
- @Input() canUpdate?: any;
- @Input() group?: Group;
- @Input() fields?: any;
-
- wWidth = window.innerWidth;
- constructor(private dialog: MatDialog, public GroupMemberTopic: GroupMemberTopicService, public TopicService: TopicService, public GroupService: GroupService, public translate: TranslateService) { }
-
- ngOnInit(): void {
- console.log(!this.topic.permission.levelGroup)
- if (!this.topic.permission.levelGroup) {
- console.log(this.GroupMemberTopic.LEVELS.read)
- this.topic.permission.levelGroup = this.GroupMemberTopic.LEVELS.read;
- }
- }
-
- isVisibleField(field: string) {
- return this.fields?.indexOf(field) > -1
- }
-
- doUpdateMemberTopic(level: string) {
- const topic = this.topic;
- const group = this.group;
- if (topic && topic?.permission.levelGroup !== level) {
- const oldLevel = topic?.permission.levelGroup;
- topic.permission.levelGroup = level;
- topic['level'] = level;
- if (group?.id) {
- this.GroupMemberTopic
- .update({ groupId: group?.id, topicId: topic.id }, topic)
- .pipe(
- take(1)
- ).subscribe((res) => {
- topic.permission.levelGroup = oldLevel;
- })
- }
- }
- }
- doDeleteMemberTopic() {
-
- const deleteDialog = this.dialog.open(ConfirmDialogComponent, {
- data: {
- heading: 'MODALS.GROUP_MEMBER_TOPIC_DELETE_CONFIRM_HEADING',
- title: 'MODALS.GROUP_MEMBER_TOPIC_DELETE_CONFIRM_HEADING',
- points: ['MODALS.GROUP_MEMBER_TOPIC_DELETE_CONFIRM_TXT_ARE_YOU_SURE'],
- confirmBtn: 'MODALS.GROUP_MEMBER_TOPIC_DELETE_CONFIRM_BTN_YES',
- closeBtn: 'MODALS.GROUP_MEMBER_TOPIC_DELETE_CONFIRM_BTN_NO'
- }
- });
-
- deleteDialog.afterClosed().subscribe(result => {
- if (result === true) {
- this.GroupMemberTopic
- .delete({
- topicId: this.topic.id,
- groupId: this.group?.id
- }).pipe(take(1)).subscribe({
- next: () => {
- this.GroupMemberTopic.reset();
- this.GroupService.reloadGroup();
- },
- error: (err) => {
- console.error(err)
- }
- })
- }
- });
- };
-}
diff --git a/src/app/group/components/group-member-user/group-member-user.component.html b/src/app/group/components/group-member-user/group-member-user.component.html
index 812afd0c9..7d689b0e6 100644
--- a/src/app/group/components/group-member-user/group-member-user.component.html
+++ b/src/app/group/components/group-member-user/group-member-user.component.html
@@ -12,7 +12,7 @@
{{member.email}} {{member.phoneNumber}}
@@ -43,7 +43,7 @@
diff --git a/src/app/group/group-routing.module.ts b/src/app/group/group-routing.module.ts
index c0a14f088..49a42828d 100644
--- a/src/app/group/group-routing.module.ts
+++ b/src/app/group/group-routing.module.ts
@@ -1,11 +1,11 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
-import { GroupJoinComponent } from './components/group-join/group-join.component';
+import { GroupTokenJoinComponent } from './components/group-join/group-join.component';
import { GroupInvitationDialogComponent } from './components/group-invitation/group-invitation.component';
import { GroupComponent } from './group.component';
const routes: Routes = [
- {path: 'join/:token', component: GroupJoinComponent},
+ {path: 'join/:token', component: GroupTokenJoinComponent},
{path: ':groupId/invites/users/:inviteId', component: GroupInvitationDialogComponent},
{
path: '', children: [
diff --git a/src/app/group/group.component.ts b/src/app/group/group.component.ts
index 2795ee737..373f79a7d 100644
--- a/src/app/group/group.component.ts
+++ b/src/app/group/group.component.ts
@@ -18,6 +18,7 @@ import { TranslateService } from '@ngx-translate/core';
import { trigger, state, style } from '@angular/animations';
import { Topic } from '../interfaces/topic';
import { User } from '../interfaces/user';
+import { GroupJoinComponent } from './components/group-join/group-join.component';
@Component({
selector: 'group',
templateUrl: './group.component.html',
@@ -228,15 +229,9 @@ export class GroupComponent implements OnInit {
}
joinGroup(group: Group) {
- const joinDialog = this.dialog.open(ConfirmDialogComponent, {
+ const joinDialog = this.dialog.open(GroupJoinComponent, {
data: {
- level: 'info',
- heading: 'MODALS.GROUP_JOIN_CONFIRM_HEADING',
- title: 'MODALS.GROUP_JOIN_CONFIRM_TXT_ARE_YOU_SURE',
- description: 'MODALS.GROUP_JOIN_CONFIRM_TXT_DESC',
- points: ['MODALS.GROUP_JOIN_CONFIRM_TXT_POINT1', 'MODALS.GROUP_JOIN_CONFIRM_TXT_POINT2', 'MODALS.GROUP_JOIN_CONFIRM_TXT_POINT3'],
- confirmBtn: 'MODALS.GROUP_JOIN_CONFIRM_BTN_YES',
- closeBtn: 'MODALS.GROUP_JOIN_CONFIRM_BTN_NO'
+ group: group
}
})/*.openConfirm({
template: '/views/modals/group_join_confirm.html',
diff --git a/src/app/my-topics/my-topics.component.html b/src/app/my-topics/my-topics.component.html
index 466b2f8c3..024ad1ae1 100644
--- a/src/app/my-topics/my-topics.component.html
+++ b/src/app/my-topics/my-topics.component.html
@@ -21,9 +21,12 @@
- {{'TXT_TOPIC_STATUS_' + topicFilters.status | uppercase | translate}}
- {{'VIEWS.MY_TOPICS.FILTERS.TOPICS_PINNED' | translate}}
- {{'VIEWS.MY_TOPICS.FILTERS.TOPICS_MODERATED' | translate}}
+
+ {{'TXT_TOPIC_STATUS_' + topicFilters.status | uppercase | translate}}
+ {{'VIEWS.MY_TOPICS.FILTERS.TOPICS_PINNED' |
+ translate}}
+ {{'VIEWS.MY_TOPICS.FILTERS.TOPICS_MODERATED' |
+ translate}}
@@ -255,7 +268,8 @@
-
+
@@ -264,4 +278,4 @@
-
+
\ No newline at end of file
diff --git a/src/app/public-topics/components/topics/topics.component.html b/src/app/public-topics/components/topics/topics.component.html
index 9d710a853..2b7c518fe 100644
--- a/src/app/public-topics/components/topics/topics.component.html
+++ b/src/app/public-topics/components/topics/topics.component.html
@@ -150,10 +150,10 @@
d="M14.1922 15.6064C13.0236 16.4816 11.5723 17 10 17C6.13401 17 3 13.866 3 10C3 6.13401 6.13401 3 10 3C13.866 3 17 6.13401 17 10C17 11.5723 16.4816 13.0236 15.6064 14.1922L19.7071 18.2929C20.0976 18.6834 20.0976 19.3166 19.7071 19.7071C19.3166 20.0976 18.6834 20.0976 18.2929 19.7071L14.1922 15.6064ZM15 10C15 12.7614 12.7614 15 10 15C7.23858 15 5 12.7614 5 10C5 7.23858 7.23858 5 10 5C12.7614 5 15 7.23858 15 10Z"
fill="#727C84" />
-
-
+
+
-
diff --git a/src/app/services/group-join.service.ts b/src/app/services/group-join.service.ts
index b0953c7c0..9fdd70cd6 100644
--- a/src/app/services/group-join.service.ts
+++ b/src/app/services/group-join.service.ts
@@ -14,6 +14,13 @@ export class GroupJoinService {
constructor(private Location: LocationService, private http: HttpClient, private Notification: NotificationService) { }
+ get(token: string) {
+ const path = this.Location.getAbsoluteUrlApi('/api/groups/join/:token', { token });
+ return this.http.get(path, { withCredentials: true, responseType: 'json', observe: 'body' }).pipe(
+ map(res => res.data)
+ );
+ }
+
join(token: string) {
const path = this.Location.getAbsoluteUrlApi('/api/groups/join/:token', { token });
return this.http.post(path, {}, { withCredentials: true, responseType: 'json', observe: 'body' }).pipe(
diff --git a/src/app/shared/components/activities-button/activities-button.component.html b/src/app/shared/components/activities-button/activities-button.component.html
index eb3a37aad..48eaa6b1c 100644
--- a/src/app/shared/components/activities-button/activities-button.component.html
+++ b/src/app/shared/components/activities-button/activities-button.component.html
@@ -1,6 +1,8 @@