-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dev 156 file names #86
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { Task } from "@core/interfaces/boards/board/task.interface"; | ||
import { GroupInfo } from "@core/interfaces/boards/board/group_info.interface"; | ||
import { GroupInfo } from "@interfaces/boards/board/group-info.interface"; | ||
|
||
export type TaskGrouper<T> = (ungrouped: Task[]) => GroupInfo<T>[]; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<button (click)="click()" [class.bg-corn-primary-900]="selected" class="flex items-center justify-right py-2 space-x-2 w-full p-2 rounded-[4px]" | ||
mat-basic-button> | ||
<ng-icon [name]="iconName"></ng-icon> | ||
<ng-icon [class.text-black]="selected" [name]="iconName"></ng-icon> | ||
<span [class.text-black]="selected">{{ label }}</span> | ||
</button> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,23 @@ | ||
<h1>Timeline</h1> | ||
<div class="text-4xl font-thin p-5">Timeline</div> | ||
|
||
<div class="bg-dark-color-settings-main-background p-4 mr-[24px] rounded shadow font-light"> | ||
<div class="flex justify-between items-center mb-4"> | ||
<button class="flex items-center p-2 bg-corn-primary-500 text-black rounded hover:bg-corn-primary-600" (click)="prevMonth()"> | ||
<ng-icon name="matArrowBack"></ng-icon> | ||
</button> | ||
<h2 class="text-2xl">{{ currentMonth | date: 'MMMM yyyy' }}</h2> | ||
<button class="flex items-center p-2 bg-corn-primary-500 text-black rounded hover:bg-corn-primary-600" (click)="nextMonth()"> | ||
<ng-icon name="matArrowForward"></ng-icon> | ||
</button> | ||
</div> | ||
<div class="grid grid-cols-7 gap-2"> | ||
<div *ngFor="let day of days" class="text-center font-bold tracking-wider text-corn-primary-500">{{ day }}</div> | ||
</div> | ||
<div class="grid grid-cols-7 gap-1"> | ||
<ng-container *ngFor="let week of weeks"> | ||
<div *ngFor="let date of week.days"> | ||
<div class="text-center bg-dark-color-settings-grey-bg">{{ date.day }}</div> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. tu to samo |
||
</div> | ||
</ng-container> | ||
</div> | ||
</div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,80 @@ | ||
import { Component } from '@angular/core'; | ||
import { Component, OnInit } from '@angular/core'; | ||
import { DatePipe, NgForOf } from "@angular/common"; | ||
import { CommonModule } from '@angular/common'; | ||
import { MatIcon} from "@angular/material/icon"; | ||
import { NgIcon, provideIcons } from "@ng-icons/core"; | ||
import { matArrowBack, matArrowForward } from "@ng-icons/material-icons/baseline"; | ||
|
||
interface Week { | ||
days: Day[] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. przenieść interfejsy do @interfaces/boards/timeline |
||
} | ||
|
||
interface Day { | ||
day: number | undefined, | ||
month: number | ||
} | ||
|
||
@Component({ | ||
selector: 'app-timeline', | ||
standalone: true, | ||
imports: [], | ||
imports: [ | ||
DatePipe, | ||
NgForOf, | ||
CommonModule, | ||
MatIcon, | ||
NgIcon, | ||
], | ||
templateUrl: './timeline.component.html', | ||
viewProviders: [provideIcons({ | ||
matArrowForward, | ||
matArrowBack, | ||
})] | ||
}) | ||
export class TimelineComponent { | ||
currentMonth: Date = new Date(); | ||
days: string[] = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; | ||
weeks: Week[] = []; | ||
|
||
constructor() { } | ||
|
||
ngOnInit(): void { | ||
this.generateCalendar(); | ||
} | ||
generateCalendar(): void { | ||
const startDate = new Date(this.currentMonth.getFullYear(), this.currentMonth.getMonth(), 1); | ||
const endDate = new Date(this.currentMonth.getFullYear(), this.currentMonth.getMonth() + 1, 0); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. dodaj typowanie zmiennych |
||
const numDays = endDate.getDate(); | ||
const startDay = startDate.getDay(); | ||
|
||
let dateCounter = 1; | ||
for (let i = 0; i < 6; i++) { | ||
const week : Week = { | ||
days: [] | ||
}; | ||
for (let j = 0; j < 7; j++) { | ||
if ((i === 0 && j < startDay) || dateCounter > numDays) { | ||
week.days.push({ day: undefined, month: -1 }); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ten warunek jest średnio czytelny nie wiem co on oznacza zamknij go w prywatną metodę typu boolean aby było zrozumiałe |
||
} else { | ||
week.days.push({ day: dateCounter, month: this.currentMonth.getMonth() + 1 }); | ||
dateCounter++; | ||
} | ||
} | ||
this.weeks.push(week); | ||
} | ||
} | ||
|
||
prevMonth(): void { | ||
this.currentMonth = new Date(this.currentMonth.getFullYear(), this.currentMonth.getMonth() - 1); | ||
this.resetCalendar(); | ||
} | ||
|
||
nextMonth(): void { | ||
this.currentMonth = new Date(this.currentMonth.getFullYear(), this.currentMonth.getMonth() + 1); | ||
this.resetCalendar(); | ||
} | ||
|
||
resetCalendar(): void { | ||
this.weeks = []; | ||
this.generateCalendar(); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
FROM nginx:1.25.3-alpine3.18 | ||
|
||
COPY ./nginx.conf /etc/nginx/nginx.conf | ||
COPY ./proxy_pass_corn_frontend.conf.template /etc/nginx/templates/proxy_pass_corn_frontend.conf.template | ||
COPY ./proxy-pass-corn-frontend.conf.template /etc/nginx/templates/proxy-pass-corn-frontend.conf.template | ||
|
||
EXPOSE 4200 | ||
EXPOSE 8080 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@for pozwala pominąć *ngFor i ng-container