From 92dce584511ee4484704d52d8231efb1b15f7e12 Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Tue, 31 Jan 2023 17:52:49 +0300 Subject: [PATCH] refac: move common utils and interfaces to shared lib --- src/app/contacts/ContactForm/ports.ts | 2 +- src/app/contacts/ContactsTable/AudienceContactsTable.vue | 2 +- src/app/contacts/ContactsTable/ports.ts | 4 ++-- src/app/files/FilesTable/FilesTable.vue | 2 +- src/app/files/FilesTable/ports.ts | 2 +- src/app/lists/ListForm/ports.ts | 2 +- src/app/lists/ListsSelect/ports.ts | 2 +- src/app/lists/ListsTable/ports.ts | 2 +- src/domain/entities/contact.ts | 2 +- src/domain/entities/file.ts | 2 +- src/domain/entities/list.ts | 2 +- src/infra/api/contact.ts | 2 +- src/infra/api/file.ts | 2 +- src/infra/api/list.ts | 2 +- src/infra/api/template.ts | 3 --- src/{domain/common => shared/lib}/entity.ts | 0 src/{app/common => shared/lib}/ports.ts | 2 +- src/shared/lib/utils/date.ts | 7 +++++++ src/{utils.ts => shared/lib/utils/promise.ts} | 8 -------- 19 files changed, 23 insertions(+), 27 deletions(-) rename src/{domain/common => shared/lib}/entity.ts (100%) rename src/{app/common => shared/lib}/ports.ts (79%) create mode 100644 src/shared/lib/utils/date.ts rename src/{utils.ts => shared/lib/utils/promise.ts} (53%) diff --git a/src/app/contacts/ContactForm/ports.ts b/src/app/contacts/ContactForm/ports.ts index 66a494f..359f34d 100644 --- a/src/app/contacts/ContactForm/ports.ts +++ b/src/app/contacts/ContactForm/ports.ts @@ -1,5 +1,5 @@ -import type { BaseCreateApiPort } from "@/app/common/ports"; import type { Contact } from "@/domain/entities/contact"; +import type { BaseCreateApiPort } from "@/shared/lib/ports"; export interface ContactFormApiCreateProps { email: string; diff --git a/src/app/contacts/ContactsTable/AudienceContactsTable.vue b/src/app/contacts/ContactsTable/AudienceContactsTable.vue index b02c7a9..5f572cc 100644 --- a/src/app/contacts/ContactsTable/AudienceContactsTable.vue +++ b/src/app/contacts/ContactsTable/AudienceContactsTable.vue @@ -1,6 +1,6 @@