diff --git a/src/app/app.config.ts b/src/app/app.config.ts index cb1270e..e75614a 100644 --- a/src/app/app.config.ts +++ b/src/app/app.config.ts @@ -4,8 +4,5 @@ import { provideRouter } from '@angular/router'; import { routes } from './app.routes'; export const appConfig: ApplicationConfig = { - providers: [ - provideBrowserGlobalErrorListeners(), - provideRouter(routes) - ] + providers: [provideBrowserGlobalErrorListeners(), provideRouter(routes)], }; diff --git a/src/app/app.routes.ts b/src/app/app.routes.ts index 5ecb554..4f140ef 100644 --- a/src/app/app.routes.ts +++ b/src/app/app.routes.ts @@ -7,16 +7,16 @@ export const routes: Routes = [ { path: '', component: TaskList, - title: 'Главная страница' + title: 'Главная страница', }, { path: 'details/:id', component: TaskDetails, - title: 'Подробно' + title: 'Подробно', }, { path: 'new', component: TaskNew, - title: 'Новая' - } + title: 'Новая', + }, ]; diff --git a/src/app/features/tasks/task-list.ts b/src/app/features/tasks/task-list.ts index c11e388..fbefc3b 100644 --- a/src/app/features/tasks/task-list.ts +++ b/src/app/features/tasks/task-list.ts @@ -16,7 +16,7 @@ import { lucideCircleX, lucideSquarePlus } from '@ng-icons/lucide';
@@ -64,7 +64,7 @@ import { lucideCircleX, lucideSquarePlus } from '@ng-icons/lucide'; display: inline-flex; align-items: center; justify-content: center; - margin-left: .5em; + margin-left: 0.5em; } } diff --git a/src/app/features/tasks/task-new.ts b/src/app/features/tasks/task-new.ts index 96bea8e..abe6961 100644 --- a/src/app/features/tasks/task-new.ts +++ b/src/app/features/tasks/task-new.ts @@ -5,32 +5,30 @@ import { Router } from '@angular/router'; @Component({ selector: 'ksk-crm-task-new', - imports: [ - ReactiveFormsModule - ], + imports: [ReactiveFormsModule], template: `
- +
- +
- +
- +
`, styles: ` - form{ + form { max-width: 400px; margin: 0 auto; text-align: right; @@ -38,7 +36,7 @@ import { Router } from '@angular/router'; .form-field { margin-bottom: 10px; } - button{ + button { padding: 5px; } `, @@ -52,15 +50,15 @@ export class TaskNew { city: new FormControl(''), streetAddress: new FormControl(''), numberPhone: new FormControl(''), - }) + }); - async submitForm(){ + async submitForm() { const createdTask = await this.taskService.createTask({ - name: this.formGroup.value.name ?? "", - city: this.formGroup.value.city ?? "", - streetAddress: this.formGroup.value.streetAddress ?? "", - numberPhone: this.formGroup.value.numberPhone ?? "", - }) + name: this.formGroup.value.name ?? '', + city: this.formGroup.value.city ?? '', + streetAddress: this.formGroup.value.streetAddress ?? '', + numberPhone: this.formGroup.value.numberPhone ?? '', + }); this.formGroup.reset(); await this.router.navigate(['details', createdTask.id]); diff --git a/src/app/features/tasks/task-service.ts b/src/app/features/tasks/task-service.ts index 706e6b9..9c535ef 100644 --- a/src/app/features/tasks/task-service.ts +++ b/src/app/features/tasks/task-service.ts @@ -1,7 +1,7 @@ import { Service } from '@angular/core'; import { Task } from './task'; -import PocketBase from 'pocketbase' -import { environment } from '../../../environments/environment' +import PocketBase from 'pocketbase'; +import { environment } from '../../../environments/environment'; @Service() export class TaskService { diff --git a/src/environments/environment.development.ts b/src/environments/environment.development.ts index 8647343..a12e40b 100644 --- a/src/environments/environment.development.ts +++ b/src/environments/environment.development.ts @@ -1,4 +1,4 @@ export const environment = { production: false, - apiUrl: "http://10.1.1.40:8090", + apiUrl: 'http://10.1.1.40:8090', }; diff --git a/src/index.html b/src/index.html index ce787d1..46db72a 100644 --- a/src/index.html +++ b/src/index.html @@ -9,6 +9,6 @@ - + diff --git a/src/main.ts b/src/main.ts index 5df75f9..190f341 100644 --- a/src/main.ts +++ b/src/main.ts @@ -2,5 +2,4 @@ import { bootstrapApplication } from '@angular/platform-browser'; import { appConfig } from './app/app.config'; import { App } from './app/app'; -bootstrapApplication(App, appConfig) - .catch((err) => console.error(err)); +bootstrapApplication(App, appConfig).catch((err) => console.error(err));