Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/account/feature-admin/src/lib/forms/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ export class EventForm extends FormGroup<TypedForm<Event>> {
}),
city: new FormControl(),
cover: new FormControl(),
date: new FormControl('', {
nonNullable: true,
validators: [Validators.required],
}),
// date: new FormControl('', {
// nonNullable: true,
// validators: [Validators.required],
// }),
time: new FormControl('', {
nonNullable: true,
validators: [Validators.required],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
@for (album of data(); track album.id) {
<a
mat-list-item
[routerLink]="['/', 'albuns', { outlets: { right: [album.id] } }]"
[routerLink]="['/', 'albuns', album.id]"
>
<devmx-icon matListItemIcon name="photo" />
<div matListItemTitle>{{ album.title }}</div>
Expand Down
8 changes: 4 additions & 4 deletions packages/event/data-source/src/lib/dtos/create-event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ export class CreateEventDto implements CreateEvent {
@ApiPropertyOptional()
date: Date;

@IsString()
@IsOptional()
@ApiPropertyOptional()
time: string;
// @IsString()
// @IsOptional()
// @ApiPropertyOptional()
// time: string;

@IsString()
@IsOptional()
Expand Down
4 changes: 2 additions & 2 deletions packages/event/data-source/src/lib/dtos/created-event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ export class CreatedEventDto {
@Type(() => Date)
date: Date;

@ApiProperty()
time: string;
// @ApiProperty()
// time: string;

@ApiProperty()
cover: string;
Expand Down
4 changes: 2 additions & 2 deletions packages/event/data-source/src/lib/dtos/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ export class EventDto {
@Type(() => Date)
date: Date;

@ApiProperty()
time: string;
// @ApiProperty()
// time: string;

@ApiProperty()
cover: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
gap: 2em;
display: flex;
flex-direction: column;
background-color: white;

h1 {
margin: 0;
Expand Down Expand Up @@ -48,6 +49,10 @@
}

.event-page-content {
flex: 1;
display: flex;
flex-direction: column;

position: relative;

.rsvp-button {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { filter, map } from 'rxjs';
`,
styles: `
:host {
flex: 1;
display: flex;
flex-direction: column;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
</mat-list-item>

<mat-list-item>
<devmx-icon matListItemIcon name="alarm-clock-alert" />
<div matListItemTitle>{{event.time }}h</div>
<devmx-icon matListItemIcon name="calendar" />
<div matListItemTitle>{{event.date | date: 'shortDate' }}</div>
</mat-list-item>

<mat-list-item>
<devmx-icon matListItemIcon name="calendar" />
<div matListItemTitle>{{event.date | date }}</div>
<devmx-icon matListItemIcon name="alarm-clock-alert" />
<div matListItemTitle>{{event.date | date: 'shortTime' }}h</div>
</mat-list-item>

@if (event.address) {
Expand All @@ -41,6 +41,24 @@
}
</mat-list>

@if (eventFacade.page$ | async; as page) {
<mat-card-content class="event-card-buttons">
<devmx-calendar-button [data]="page" text="Definir lembrete" />

@if ((page.format | showEventAddress) && page.address) {
<devmx-maps-button [data]="page" text="Ver no mapa" />
}

<!-- -->

@if ((page.format | showEventLink) && page.link) {
<devmx-youtube-button [data]="page" text="Assistir" />
}

<devmx-whats-app-button [data]="page" text="Compartilhar" />
</mat-card-content>
}

<mat-card-content>
<devmx-markdown-view [content]="event.description" />
</mat-card-content>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
margin-bottom: 0;
}
}

&-buttons {
gap: 1em;
display: flex;
flex-flow: row wrap;
}
}

.rsvp-button {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ChangeDetectionStrategy, Component, inject } from '@angular/core';
import { RSVPButtonComponent, RSVPForm } from '@devmx/event-ui-shared';
import { RSVPButtonComponent, RSVPForm, ShowEventAddressPipe, ShowEventLinkPipe } from '@devmx/event-ui-shared';
import { MarkdownViewComponent } from '@devmx/shared-ui-global/markdown';
import { AuthenticationFacade } from '@devmx/account-data-access';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
Expand All @@ -11,10 +11,16 @@ import { MatCardModule } from '@angular/material/card';
import { MatListModule } from '@angular/material/list';
import { combineLatest, filter, map, tap } from 'rxjs';
import { AsyncPipe, DatePipe } from '@angular/common';
import { RSVPFacade } from '@devmx/event-data-access';
import { EventFacade, RSVPFacade } from '@devmx/event-data-access';
import { ReactiveFormsModule } from '@angular/forms';
import { PhotoPipe } from '@devmx/shared-ui-global';
import { EventFormatPipe } from '../../pipes';
import {
MapsButtonComponent,
YoutubeButtonComponent,
WhatsAppButtonComponent,
CalendarButtonComponent,
} from '@devmx/shared-ui-global/button';

@Component({
selector: 'devmx-event-details',
Expand All @@ -25,12 +31,18 @@ import { EventFormatPipe } from '../../pipes';
RouterModule,
ReactiveFormsModule,
RSVPButtonComponent,
CalendarButtonComponent,
YoutubeButtonComponent,
WhatsAppButtonComponent,
MapsButtonComponent,
MatCardModule,
MatListModule,
MatButtonModule,
IconComponent,
EventFormatPipe,
MarkdownViewComponent,
ShowEventAddressPipe,
ShowEventLinkPipe,
PhotoPipe,
AsyncPipe,
DatePipe,
Expand All @@ -43,6 +55,8 @@ export class EventDetailsContainer {

authFacade = inject(AuthenticationFacade);

eventFacade = inject(EventFacade)

rsvpFacade = inject(RSVPFacade);

event$ = this.route.data.pipe(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</mat-card-header>

<mat-list>
@if (event.date && event.time) {
@if (event.date) {
<mat-list-item>
<devmx-icon matListItemIcon name="transport/flag-pin" />
<div matListItemTitle>{{ event.format | eventFormat }}</div>
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/api-interfaces/src/lib/entities/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export interface Event {

date?: Date;

time?: string;
// time?: string;

duration?: DurationTime;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<a mat-raised-button [href]="link()" target="_blank" rel="noopener,noreferrer">
<devmx-icon matPreffix name="calendar" size="22" />
<span>Adicionar ao calendário</span>
<span>{{text()}}</span>
</a>
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
:host {
min-width: 202px;
min-width: 180px;
display: inline-flex;

a[href] {
width: 100%;
padding-left: 0.8em;
padding-right: 0.8em;
padding-left: 0.6em;
padding-right: 0.6em;
border-radius: 8px;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import {
export class CalendarButtonComponent implements AfterViewInit {
data = input.required<EventPage>();

text = input('Adicionar ao calendário');

link = signal('');

ngAfterViewInit() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<a mat-raised-button [href]="link()" target="_blank" rel="noopener,noreferrer">
<devmx-icon matPreffix name="transport/map-pin" size="22" />
<span>Abrir com Google Maps</span>
<span>{{text()}}</span>
</a>
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
:host {
min-width: 202px;
min-width: 180px;
display: inline-flex;

a[href] {
width: 100%;
padding-left: 0.8em;
padding-right: 0.8em;
padding-left: 0.6em;
padding-right: 0.6em;
border-radius: 8px;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import {
export class MapsButtonComponent implements AfterViewInit {
data = input.required<EventPage>();

text = input('Abrir com Google Maps');

platform = inject(Platform);

link = signal('');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<a mat-raised-button [href]="link()" target="_blank" rel="noopener,noreferrer">
<devmx-icon matPreffix name="social/whatsapp" size="24" />
<span>Enviar no WhatsApp</span>
<span>{{text()}}</span>
</a>
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
:host {
min-width: 202px;
min-width: 180px;
display: inline-flex;

a[href] {
width: 100%;
padding-left: 0.8em;
padding-right: 0.8em;
padding-left: 0.6em;
padding-right: 0.6em;
border-radius: 8px;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import {
export class WhatsAppButtonComponent implements AfterViewInit {
data = input.required<EventPage>();

text = input('Enviar no WhatsApp');

platform = inject(Platform);

link = signal('');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<a mat-raised-button [href]="link()" target="_blank" rel="noopener,noreferrer">
<devmx-icon matPreffix name="social/youtube" size="22" />
<span>Abrir com YouTube</span>
<span>{{text()}}</span>
</a>
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
:host {
min-width: 202px;
min-width: 180px;
display: inline-flex;

a[href] {
width: 100%;
padding-left: 0.8em;
padding-right: 0.8em;
padding-left: 0.6em;
padding-right: 0.6em;
border-radius: 8px;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import {
export class YoutubeButtonComponent implements AfterViewInit {
data = input.required<EventPage>();

text = input('Abrir com YouTube')

platform = inject(Platform);

link = signal('');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
display: flex;
flex-direction: column;
max-width: 1280px;
width: calc(100% - 2em);
// height: calc(100dvh - 64px);
height: 100%;
overflow: auto;
Expand Down
Loading