Skip to content
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

Closed
wants to merge 3 commits into from
Closed
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
4 changes: 2 additions & 2 deletions corn-frontend/src/app/app.routes.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Routes } from '@angular/router';
import { BoardsPaths } from '@core/enum/BoardsPaths';
import { RouterPaths } from "@core/enum/RouterPaths";
import { BoardsPaths } from '@core/enum/boards-paths';
import { RouterPaths } from "@core/enum/router-paths";

export const routes: Routes = [
{
Expand Down
2 changes: 1 addition & 1 deletion corn-frontend/src/app/core/guards/auth.guard.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { CanActivateFn, Router } from '@angular/router';
import { inject } from "@angular/core";
import { KeycloakService } from "keycloak-angular";
import { RouterPaths } from "@core/enum/RouterPaths";
import { RouterPaths } from "@core/enum/router-paths";

export const authGuard: CanActivateFn = (route, state) => {
const keycloakService: KeycloakService = inject(KeycloakService);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BacklogItem } from "@interfaces/boards/backlog/backlog.item";
import { BacklogItem } from "@interfaces/boards/backlog/backlog-item";

export interface BacklogItemList {
backlogItemResponseList: BacklogItem[],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BacklogItemStatus } from "@core/enum/BacklogItemStatus";
import { BacklogItemType } from "@core/enum/BacklogItemType";
import { BacklogItemStatus } from "@core/enum/backlog-item-status";
import { BacklogItemType } from "@core/enum/backlog-item-type";
import { User } from "@interfaces/boards/user";

export interface BacklogItem {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Injectable } from "@angular/core";
import { HttpClient } from "@angular/common/http";
import { Observable } from "rxjs";
import { BacklogItem } from "@interfaces/boards/backlog/backlog.item";
import { BacklogItem } from "@interfaces/boards/backlog/backlog-item";
import { environment } from "@environments/environment";
import { ApiUrl } from "@core/enum/api-url";
import { BacklogItemType } from "@core/enum/BacklogItemType";
import { BacklogItemList } from "@interfaces/boards/backlog/backlog.item.list";
import { BacklogItemType } from "@core/enum/backlog-item-type";
import { BacklogItemList } from "@interfaces/boards/backlog/backlog-item-list";

@Injectable({
providedIn: 'root'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SliceDescriptorDataHolder } from "@core/interfaces/boards/board/slice/slice_descriptor_data_holder.interface";
import { SliceDescriptorDataHolder } from "@interfaces/boards/board/slice/slice-descriptor-data-holder.interface";
import { Task } from "@core/interfaces/boards/board/task.interface";

export class SliceDescriptor<T> implements SliceDescriptorDataHolder {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { Injectable, Input } from '@angular/core';
import { SliceDescriptor } from './slice_descriptor';
import { SliceDescriptor } from './slice-descriptor';
import { BoardModelService } from '../model.service';
import { Task } from '@core/interfaces/boards/board/task.interface';
import { TaskGrouper } from '@core/types/board/boards/TaskGrouper';
import { TaskChangedGroupEvent } from '@core/interfaces/boards/board/task_changed_group_event.interface';
import { TaskChangedColumnEvent } from '@core/interfaces/boards/board/task_changed_column_event.interface';
import { SliceInfo } from '@core/interfaces/boards/board/slice/slice_info.interface';
import { TaskMovedByDnDEvent } from '@core/interfaces/boards/board/task_moved_by_dnd_event.interface';
import { TaskGrouper } from '@core/types/board/boards/task-grouper';
import { TaskChangedGroupEvent } from '@interfaces/boards/board/task-changed-group-event.interface';
import { TaskChangedColumnEvent } from '@interfaces/boards/board/task-changed-column-event.interface';
import { SliceInfo } from '@interfaces/boards/board/slice/slice-info.interface';
import { TaskMovedByDnDEvent } from '@interfaces/boards/board/task-moved-by-dnd-event.interface';

@Injectable()
export class SlicesModelService<T> {
Expand Down
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
Expand Up @@ -19,7 +19,7 @@ import {
MatSelectChange,
MatSelectTrigger
} from "@angular/material/select";
import { BacklogItemType } from "@core/enum/BacklogItemType";
import { BacklogItemType } from "@core/enum/backlog-item-type";
import { MatTooltip } from "@angular/material/tooltip";
import { NgIcon, provideIcons } from "@ng-icons/core";
import { bootstrapBugFill } from "@ng-icons/bootstrap-icons";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import {
MatRowDef,
MatTable,
} from "@angular/material/table";
import { BacklogItem } from '@interfaces/boards/backlog/backlog.item';
import { BacklogItem } from '@interfaces/boards/backlog/backlog-item';
import { NgIcon, provideIcons } from "@ng-icons/core";
import { matDelete, matTask } from "@ng-icons/material-icons/baseline";
import { BacklogItemStatus } from "@core/enum/BacklogItemStatus";
import { BacklogItemType } from "@core/enum/BacklogItemType";
import { BacklogItemStatus } from "@core/enum/backlog-item-status";
import { BacklogItemType } from "@core/enum/backlog-item-type";
import { MatFormField, MatLabel, MatOption, MatSelect } from "@angular/material/select";
import { NgClass, NgForOf } from "@angular/common";
import { UserAvatarComponent } from "@pages/utils/user-avatar/user-avatar.component";
Expand Down
16 changes: 8 additions & 8 deletions corn-frontend/src/app/pages/boards/board/board.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ import { CommonModule } from '@angular/common';
import { MatInputModule } from '@angular/material/input';
import { MatButtonModule } from '@angular/material/button';
import { MatMenuModule } from '@angular/material/menu';
import { SlicesModelService } from '@core/services/boards/board/slice/slices_model.service';
import { SlicesModelService } from '@core/services/boards/board/slice/slices-model.service';
import { SliceService } from '@core/services/boards/board/slice/slice.service';
import { SliceComponent } from './slice/slice.component';
import { BoardModelService } from '@core/services/boards/board/model.service';
import { MatIconModule } from '@angular/material/icon';
import { ASSIGNEES, TASKS } from './placeholder_data';
import { ASSIGNEES, TASKS } from './placeholder-data';
import { Task } from '@core/interfaces/boards/board/task.interface';
import { Assignee } from '@core/interfaces/boards/board/assignee.interface';
import { TaskGrouping } from '@core/enum/boards/board/TaskGrouping';
import { ColumnSetLayout } from './layout/column_set_layout.component';
import { GroupingMetadata } from '@core/types/board/boards/GroupingMetadata';
import { TaskGrouper } from '@core/types/board/boards/TaskGrouper';
import { TaskChangedGroupEvent } from '@core/interfaces/boards/board/task_changed_group_event.interface';
import { TaskChangedColumnEvent } from '@core/interfaces/boards/board/task_changed_column_event.interface';
import { TaskGrouping } from '@core/enum/boards/board/task-grouping';
import { ColumnSetLayout } from './layout/column-set-layout.component';
import { GroupingMetadata } from '@core/types/board/boards/grouping-metadata';
import { TaskGrouper } from '@core/types/board/boards/task-grouper';
import { TaskChangedGroupEvent } from '@interfaces/boards/board/task-changed-group-event.interface';
import { TaskChangedColumnEvent } from '@interfaces/boards/board/task-changed-column-event.interface';
import { Hideable } from '@core/interfaces/boards/board/hideable.interface';

@Component({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { Task } from '@core/interfaces/boards/board/task.interface';
MatButtonModule,
MatDividerModule,
],
templateUrl: './change_assignee_menu.component.html',
templateUrl: './change-assignee-menu.component.html',
})
export class ChangeAssigneeMenuComponent {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component } from '@angular/core';
import { ColumnLayout } from './column_set.component';
import { ColumnLayout } from './column-set.component';

@Component({
selector: 'columnset',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { AfterViewInit, Component, Input, OnDestroy, ViewChild } from '@angular/core';
import { CommonModule } from '@angular/common';
import { TaskListComponent } from '../task_list/task_list.component';
import { TaskListComponent } from '@pages/boards/board/task-list/task-list.component';
import { SliceService } from '@core/services/boards/board/slice/slice.service';
import { SliceDescriptor } from '@core/services/boards/board/slice/slice_descriptor';
import { SlicesModelService } from '@core/services/boards/board/slice/slices_model.service';
import { SliceDescriptor } from '@core/services/boards/board/slice/slice-descriptor';
import { SlicesModelService } from '@core/services/boards/board/slice/slices-model.service';
import { CdkDropList } from '@angular/cdk/drag-drop';
import { ColumnSetLayout } from '../layout/column_set_layout.component';
import { ColumnSetLayout } from '../layout/column-set-layout.component';

@Component({
selector: 'slice',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Component, Input } from '@angular/core';
import { MatCardModule } from '@angular/material/card';
import { ChangeAssigneeMenuComponent } from '../change_assignee_menu/change_assignee_menu.component';
import { ChangeAssigneeMenuComponent } from '@pages/boards/board/change-assignee-menu/change-assignee-menu.component';
import { Task } from '@core/interfaces/boards/board/task.interface';

@Component({
Expand All @@ -10,7 +10,7 @@ import { Task } from '@core/interfaces/boards/board/task.interface';
MatCardModule,
ChangeAssigneeMenuComponent,
],
templateUrl: './task_card.component.html',
templateUrl: './task-card.component.html',
})
export class TaskCardComponent {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Component, EventEmitter, Input, Output, ViewChild } from '@angular/core';
import { CdkDrag, CdkDragDrop, CdkDropList, } from '@angular/cdk/drag-drop';
import { CommonModule } from '@angular/common';
import { TaskCardComponent } from '../task_card/task_card.component';
import { TaskCardComponent } from '@pages/boards/board/task-card/task-card.component';
import { Task } from '@core/interfaces/boards/board/task.interface';
import { TaskMovedByDnDEvent } from '@core/interfaces/boards/board/task_moved_by_dnd_event.interface';
import { TaskMovedByDnDEvent } from '@interfaces/boards/board/task-moved-by-dnd-event.interface';

@Component({
selector: 'tasklist',
Expand All @@ -14,7 +14,7 @@ import { TaskMovedByDnDEvent } from '@core/interfaces/boards/board/task_moved_by
CdkDrag,
TaskCardComponent,
],
templateUrl: './task_list.component.html',
templateUrl: './task-list.component.html',
})
export class TaskListComponent {

Expand Down
4 changes: 2 additions & 2 deletions corn-frontend/src/app/pages/boards/boards.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import { UserinfoComponent } from '@pages/boards/userinfo/userinfo.component';
import { KeycloakService } from 'keycloak-angular';
import { KeycloakProfile } from 'keycloak-js';
import { MatMenuModule, MatMenuTrigger } from '@angular/material/menu';
import { RouterPaths } from '@core/enum/RouterPaths';
import { BoardsPaths } from '@core/enum/BoardsPaths';
import { RouterPaths } from '@core/enum/router-paths';
import { BoardsPaths } from '@core/enum/boards-paths';

@Component({
selector: 'app-boards',
Expand Down
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">
Copy link
Owner

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

<div class="text-center bg-dark-color-settings-grey-bg">{{ date.day }}</div>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tu to samo

</div>
</ng-container>
</div>
</div>
74 changes: 72 additions & 2 deletions corn-frontend/src/app/pages/boards/timeline/timeline.component.ts
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[]
Copy link
Owner

Choose a reason for hiding this comment

The 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);
Copy link
Owner

Choose a reason for hiding this comment

The 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 });
Copy link
Owner

Choose a reason for hiding this comment

The 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();
}
}
4 changes: 2 additions & 2 deletions corn-frontend/src/app/pages/home/home.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@

<span class="flex-auto"></span>

<button mat-fab extended class="flex items-center m-1.5 h-10 p-3.5 border-2 border-corn-primary-300 rounded-3xl
<button class="flex items-center m-1.5 h-10 p-3.5 border-2 border-corn-primary-300 rounded-3xl
bg-dark-color-settings-container-background text-corn-primary-300 font-light" aria-label="Login" (click)="login()">
<mat-icon class="mr-2">login</mat-icon>
Login
</button>

<button mat-fab extended class="flex items-center m-1.5 h-10 p-3.5 border-2 border-corn-primary-300 rounded-3xl
<button class="flex items-center m-1.5 h-10 p-3.5 border-2 border-corn-primary-300 rounded-3xl
bg-corn-primary-300 text-dark-color-settings-container-background font-light" aria-label="Register" (click)="register()">
<mat-icon class="mr-2">app_registration</mat-icon>
Register
Expand Down
2 changes: 1 addition & 1 deletion corn-frontend/src/app/pages/home/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Feature } from "@core/interfaces/home/feature.interface";
import { KeycloakService } from 'keycloak-angular';
import { CommonModule, NgOptimizedImage } from '@angular/common';
import { Router } from '@angular/router';
import { RouterPaths } from "@core/enum/RouterPaths";
import { RouterPaths } from "@core/enum/router-paths";

@Component({
selector: 'app-home',
Expand Down
1 change: 1 addition & 0 deletions corn-frontend/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export const theme = {
'main-background': '#1f1f1e',
'container-background': '#292627',
'font': '#ffffff',
'grey-bg': '#303030',
},
},
width: {
Expand Down
2 changes: 1 addition & 1 deletion nginx/Dockerfile.dev
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
4 changes: 2 additions & 2 deletions nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ http {

# Frontend
location / {
include /etc/nginx/conf.d/proxy_pass_corn_frontend.conf;
include /etc/nginx/conf.d/proxy-pass-corn-frontend.conf;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
Expand All @@ -42,7 +42,7 @@ http {

# Angular Dev
location /ng-cli-ws {
include /etc/nginx/conf.d/proxy_pass_corn_frontend.conf;
include /etc/nginx/conf.d/proxy-pass-corn-frontend.conf;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
Expand Down
Loading