Commit 8c9baba4 authored by Lê Bảo Hồng Đức's avatar Lê Bảo Hồng Đức

fix siteInformation

parent 67165167
......@@ -125,6 +125,8 @@ const orvalConfig = async () => {
'NewsPageConfig',
'Video',
'NewsletterSubscription',
'SiteInformation',
'Logo',
],
},
},
......
This diff is collapsed.
This diff is collapsed.
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export interface Banner {
id?: string;
banner_name?: string;
display_order?: number;
status?: string;
file_id?: string;
created_at?: string;
created_by?: string;
updated_at?: string;
updated_by?: string;
display_time?: number;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export interface BannerMutate {
banner_name?: string;
display_order?: number;
status?: string;
file_id?: string;
display_time?: number;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template
* Coded by Meu TEAM
* OpenAPI spec version: 1.0.0
*/
import type { ApiResponse } from './apiResponse';
import type { DeleteLogoId200AllOf } from './deleteLogoId200AllOf';
export type DeleteLogoId200 = ApiResponse & DeleteLogoId200AllOf;
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template
* Coded by Meu TEAM
* OpenAPI spec version: 1.0.0
*/
export type DeleteLogoId200AllOf = {
responseData?: boolean;
};
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { FiltersParameter } from './filtersParameter';
import type { SortFieldParameter } from './sortFieldParameter';
import type { SortOrderParameter } from './sortOrderParameter';
import type { PageParameter } from './pageParameter';
import type { PageSizeParameter } from './pageSizeParameter';
export type GetApiV10NewsletterSubscriptionParams = {
/**
* filter, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
*/
filters?: FiltersParameter;
/**
* sortField, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
*/
sortField?: SortFieldParameter;
/**
* sort order, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
*/
sortOrder?: SortOrderParameter;
/**
* page, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
* @minimum 1
*/
page?: PageParameter;
/**
* pageSize, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
* @minimum 1
*/
pageSize?: PageSizeParameter;
};
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { ApiResponse } from './apiResponse';
import type { GetApiV10SiteInformation200AllOf } from './getApiV10SiteInformation200AllOf';
export type GetApiV10SiteInformation200 = ApiResponse & GetApiV10SiteInformation200AllOf;
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { SiteInformationData } from './siteInformationData';
export type GetApiV10SiteInformation200AllOf = {
responseData?: SiteInformationData;
};
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { FiltersParameter } from './filtersParameter';
import type { SortFieldParameter } from './sortFieldParameter';
import type { SortOrderParameter } from './sortOrderParameter';
import type { PageParameter } from './pageParameter';
import type { PageSizeParameter } from './pageSizeParameter';
export type GetApiV10SiteInformationParams = {
/**
* filter, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
*/
filters?: FiltersParameter;
/**
* sortField, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
*/
sortField?: SortFieldParameter;
/**
* sort order, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
*/
sortOrder?: SortOrderParameter;
/**
* page, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
* @minimum 1
*/
page?: PageParameter;
/**
* pageSize, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
* @minimum 1
*/
pageSize?: PageSizeParameter;
};
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { ApiResponse } from './apiResponse';
import type { GetApiV10VideoId200AllOf } from './getApiV10VideoId200AllOf';
export type GetApiV10VideoId200 = ApiResponse & GetApiV10VideoId200AllOf;
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { Video } from './video';
export type GetApiV10VideoId200AllOf = {
responseData?: Video;
};
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { FiltersParameter } from './filtersParameter';
import type { SortFieldParameter } from './sortFieldParameter';
import type { SortOrderParameter } from './sortOrderParameter';
import type { PageParameter } from './pageParameter';
import type { PageSizeParameter } from './pageSizeParameter';
export type GetApiV10VideoParams = {
/**
* filter, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
*/
filters?: FiltersParameter;
/**
* sortField, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
*/
sortField?: SortFieldParameter;
/**
* sort order, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
*/
sortOrder?: SortOrderParameter;
/**
* page, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
* @minimum 1
*/
page?: PageParameter;
/**
* pageSize, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
* @minimum 1
*/
pageSize?: PageSizeParameter;
};
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template
* Coded by Meu TEAM
* OpenAPI spec version: 1.0.0
*/
import type { ApiResponse } from './apiResponse';
import type { GetLogoId200AllOf } from './getLogoId200AllOf';
export type GetLogoId200 = ApiResponse & GetLogoId200AllOf;
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template
* Coded by Meu TEAM
* OpenAPI spec version: 1.0.0
*/
import type { Logo } from './logo';
export type GetLogoId200AllOf = {
responseData?: Logo;
};
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template
* Coded by Meu TEAM
* OpenAPI spec version: 1.0.0
*/
import type { FiltersParameter } from './filtersParameter';
import type { SortFieldParameter } from './sortFieldParameter';
import type { SortOrderParameter } from './sortOrderParameter';
import type { PageParameter } from './pageParameter';
import type { PageSizeParameter } from './pageSizeParameter';
export type GetLogoParams = {
/**
* filter, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
*/
filters?: FiltersParameter;
/**
* sortField, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
*/
sortField?: SortFieldParameter;
/**
* sort order, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
*/
sortOrder?: SortOrderParameter;
/**
* page, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
* @minimum 1
*/
page?: PageParameter;
/**
* pageSize, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
* @minimum 1
*/
pageSize?: PageSizeParameter;
};
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template
* Coded by Meu TEAM
* OpenAPI spec version: 1.0.0
*/
import type { ApiResponse } from './apiResponse';
import type { GetSiteInformation200AllOf } from './getSiteInformation200AllOf';
export type GetSiteInformation200 = ApiResponse & GetSiteInformation200AllOf;
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template
* Coded by Meu TEAM
* OpenAPI spec version: 1.0.0
*/
import type { SiteInformationData } from './siteInformationData';
export type GetSiteInformation200AllOf = {
responseData?: SiteInformationData;
};
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template
* Coded by Meu TEAM
* OpenAPI spec version: 1.0.0
*/
import type { FiltersParameter } from './filtersParameter';
import type { SortFieldParameter } from './sortFieldParameter';
import type { SortOrderParameter } from './sortOrderParameter';
import type { PageParameter } from './pageParameter';
import type { PageSizeParameter } from './pageSizeParameter';
export type GetSiteInformationParams = {
/**
* filter, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
*/
filters?: FiltersParameter;
/**
* sortField, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
*/
sortField?: SortFieldParameter;
/**
* sort order, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
*/
sortOrder?: SortOrderParameter;
/**
* page, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
* @minimum 1
*/
page?: PageParameter;
/**
* pageSize, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
* @minimum 1
*/
pageSize?: PageSizeParameter;
};
......@@ -16,6 +16,8 @@ export * from './badRequestResponseError';
export * from './badRequestResponseErrorMessage';
export * from './badRequestResponseResponseData';
export * from './badRequestResponseViolationItem';
export * from './banner';
export * from './bannerMutate';
export * from './business';
export * from './businessCreate';
export * from './businessDeleteResponse';
......@@ -51,6 +53,8 @@ export * from './deleteContactId200AllOf';
export * from './deleteEventsLinkParams';
export * from './deleteEventsParams';
export * from './deleteFilesBody';
export * from './deleteLogoId200';
export * from './deleteLogoId200AllOf';
export * from './deleteMembershipFeeParams';
export * from './deleteNewsParams';
export * from './deleteNotificationsParams';
......@@ -93,7 +97,14 @@ export * from './getApiV10CategoryParams';
export * from './getApiV10ContactId200';
export * from './getApiV10ContactId200AllOf';
export * from './getApiV10ContactParams';
export * from './getApiV10NewsletterSubscriptionParams';
export * from './getApiV10PageConfigParams';
export * from './getApiV10SiteInformation200';
export * from './getApiV10SiteInformation200AllOf';
export * from './getApiV10SiteInformationParams';
export * from './getApiV10VideoId200';
export * from './getApiV10VideoId200AllOf';
export * from './getApiV10VideoParams';
export * from './getApprovalParams';
export * from './getCategoryId200';
export * from './getCategoryId200AllOf';
......@@ -109,6 +120,9 @@ export * from './getEventsMyEventsParams';
export * from './getEventsParams';
export * from './getEventsSlugSlugParams';
export * from './getFooterParams';
export * from './getLogoId200';
export * from './getLogoId200AllOf';
export * from './getLogoParams';
export * from './getMembershipFeeParams';
export * from './getMembershipFeePrintParams';
export * from './getNewsAdminParams';
......@@ -136,6 +150,9 @@ export * from './getProductsParams';
export * from './getScheduleGetMyScheduleParams';
export * from './getScheduleGetScheduledTimeByEventEventIdParams';
export * from './getScheduleManageMyScheduleParams';
export * from './getSiteInformation200';
export * from './getSiteInformation200AllOf';
export * from './getSiteInformationParams';
export * from './getStatisticMemberByMonthParams';
export * from './getStatisticMembershipFeeByMonthParams';
export * from './getStatisticSiteAccessParams';
......@@ -219,6 +236,10 @@ export * from './pageConfigTag';
export * from './pageConfigTagMutate';
export * from './pageParameter';
export * from './pageSizeParameter';
export * from './patchApiV10NewsletterSubscriptionId200';
export * from './patchApiV10NewsletterSubscriptionId200AllOf';
export * from './patchApiV10VideoId200';
export * from './patchApiV10VideoId200AllOf';
export * from './patchNewsletterSubscriptionId200';
export * from './patchNewsletterSubscriptionId200AllOf';
export * from './patchVideoId200';
......@@ -239,7 +260,11 @@ export * from './postApiV10Category200';
export * from './postApiV10Category200AllOf';
export * from './postApiV10Contact200';
export * from './postApiV10Contact200AllOf';
export * from './postApiV10NewsletterSubscription200';
export * from './postApiV10NewsletterSubscription200AllOf';
export * from './postApiV10PageConfigBody';
export * from './postApiV10Video200';
export * from './postApiV10Video200AllOf';
export * from './postAuthForgotPasswordBody';
export * from './postCategory';
export * from './postCategory200';
......@@ -253,6 +278,8 @@ export * from './postContentStructure';
export * from './postEventsIdExportJoinedOrgsMode';
export * from './postEventsIdExportJoinedOrgsParams';
export * from './postFilesBody';
export * from './postLogo200';
export * from './postLogo200AllOf';
export * from './postMembershipFeeCreateAccountsAndFeesBody';
export * from './postMembershipFeeCreateAccountsAndFeesBodyOrganizationsItem';
export * from './postMembershipFeeSendUpdateReminderBody';
......@@ -283,6 +310,8 @@ export * from './putApiV10CategoryId200AllOf';
export * from './putApiV10ContactId200';
export * from './putApiV10ContactId200AllOf';
export * from './putApiV10PageConfigIdBody';
export * from './putApiV10SiteInformation200';
export * from './putApiV10SiteInformation200AllOf';
export * from './putAuthAssignBusinessInterestBody';
export * from './putAuthUpdatePasswordBody';
export * from './putCategoryId200';
......@@ -293,6 +322,8 @@ export * from './putContactId200AllOf';
export * from './putEventsLinkParams';
export * from './putEventsParams';
export * from './putFooterParams';
export * from './putLogoId200';
export * from './putLogoId200AllOf';
export * from './putMembershipFeeParams';
export * from './putNewsPageConfigCategoryIdBody';
export * from './putNotificationsMarkAsReadParams';
......@@ -305,6 +336,8 @@ export * from './putOrganizationsParams';
export * from './putPageConfigIdBody';
export * from './putPermisionFunctionParams';
export * from './putProductsParams';
export * from './putSiteInformation200';
export * from './putSiteInformation200AllOf';
export * from './putUserDepartmentParams';
export * from './putUserHistoryParams';
export * from './refreshToken';
......@@ -329,14 +362,20 @@ export * from './rolePermissionMutate';
export * from './roleUpdate';
export * from './schemaMigration';
export * from './schemaMigrationMutate';
export * from './sequelizemeta';
export * from './sequelizemetaMutate';
export * from './siteInformation';
export * from './siteInformationBranch';
export * from './siteInformationBranchMutate';
export * from './siteInformationData';
export * from './siteInformationDataLogo';
export * from './siteInformationLinkSocials';
export * from './siteInformationMutate';
export * from './siteInformationMutateLinkSocials';
export * from './siteInformationResponse';
export * from './siteInformationResponseAllOf';
export * from './siteInformationSocialLink';
export * from './siteInformationSocialMutate';
export * from './siteInformationUpdateBody';
export * from './sortFieldParameter';
export * from './sortOrderParameter';
......
......@@ -5,15 +5,14 @@
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { LogoFile } from './logoFile';
export interface Logo {
id: string;
/** @maxLength 255 */
logo_name: string;
/** @nullable */
description?: string | null;
file_id: LogoFile;
logo_url?: string | null;
file_id: string;
created_at: string;
/** @nullable */
created_by?: string | null;
......
......@@ -10,6 +10,6 @@ export interface LogoCreate {
/** @maxLength 255 */
logo_name: string;
/** @nullable */
description?: string | null;
logo_url?: string | null;
file_id: string;
}
......@@ -10,6 +10,6 @@ export interface LogoUpdate {
/** @maxLength 255 */
logo_name?: string;
/** @nullable */
description?: string | null;
logo_url?: string | null;
file_id?: string;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { ApiResponse } from './apiResponse';
import type { PatchApiV10NewsletterSubscriptionId200AllOf } from './patchApiV10NewsletterSubscriptionId200AllOf';
export type PatchApiV10NewsletterSubscriptionId200 = ApiResponse & PatchApiV10NewsletterSubscriptionId200AllOf;
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { NewsletterSubscription } from './newsletterSubscription';
export type PatchApiV10NewsletterSubscriptionId200AllOf = {
responseData?: NewsletterSubscription;
};
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { ApiResponse } from './apiResponse';
import type { PatchApiV10VideoId200AllOf } from './patchApiV10VideoId200AllOf';
export type PatchApiV10VideoId200 = ApiResponse & PatchApiV10VideoId200AllOf;
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { Video } from './video';
export type PatchApiV10VideoId200AllOf = {
responseData?: Video;
};
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { ApiResponse } from './apiResponse';
import type { PostApiV10NewsletterSubscription200AllOf } from './postApiV10NewsletterSubscription200AllOf';
export type PostApiV10NewsletterSubscription200 = ApiResponse & PostApiV10NewsletterSubscription200AllOf;
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { NewsletterSubscription } from './newsletterSubscription';
export type PostApiV10NewsletterSubscription200AllOf = {
responseData?: NewsletterSubscription;
};
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { ApiResponse } from './apiResponse';
import type { PostApiV10Video200AllOf } from './postApiV10Video200AllOf';
export type PostApiV10Video200 = ApiResponse & PostApiV10Video200AllOf;
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { Video } from './video';
export type PostApiV10Video200AllOf = {
responseData?: Video;
};
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template
* Coded by Meu TEAM
* OpenAPI spec version: 1.0.0
*/
import type { ApiResponse } from './apiResponse';
import type { PostLogo200AllOf } from './postLogo200AllOf';
export type PostLogo200 = ApiResponse & PostLogo200AllOf;
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template
* Coded by Meu TEAM
* OpenAPI spec version: 1.0.0
*/
import type { Logo } from './logo';
export type PostLogo200AllOf = {
responseData?: Logo;
};
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { ApiResponse } from './apiResponse';
import type { PutApiV10SiteInformation200AllOf } from './putApiV10SiteInformation200AllOf';
export type PutApiV10SiteInformation200 = ApiResponse & PutApiV10SiteInformation200AllOf;
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { SiteInformationData } from './siteInformationData';
export type PutApiV10SiteInformation200AllOf = {
responseData?: SiteInformationData;
};
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template
* Coded by Meu TEAM
* OpenAPI spec version: 1.0.0
*/
import type { ApiResponse } from './apiResponse';
import type { PutLogoId200AllOf } from './putLogoId200AllOf';
export type PutLogoId200 = ApiResponse & PutLogoId200AllOf;
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template
* Coded by Meu TEAM
* OpenAPI spec version: 1.0.0
*/
import type { Logo } from './logo';
export type PutLogoId200AllOf = {
responseData?: Logo;
};
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template
* Coded by Meu TEAM
* OpenAPI spec version: 1.0.0
*/
import type { ApiResponse } from './apiResponse';
import type { PutSiteInformation200AllOf } from './putSiteInformation200AllOf';
export type PutSiteInformation200 = ApiResponse & PutSiteInformation200AllOf;
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template
* Coded by Meu TEAM
* OpenAPI spec version: 1.0.0
*/
import type { SiteInformationData } from './siteInformationData';
export type PutSiteInformation200AllOf = {
responseData?: SiteInformationData;
};
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export interface Sequelizemeta {
name?: string;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export interface SequelizemetaMutate {
name?: string;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template
* Coded by Meu TEAM
* OpenAPI spec version: 1.0.0
*/
export interface SiteInformationBranch {
id?: string;
/** @nullable */
branch_name?: string | null;
/** @nullable */
hotline?: string | null;
/** @nullable */
telephone?: string | null;
/** @nullable */
email?: string | null;
/** @nullable */
address?: string | null;
/** @nullable */
fax?: string | null;
/** @nullable */
googlemap_link?: string | null;
sort_order?: number;
is_active?: boolean;
created_at?: string;
/** @nullable */
created_by?: string | null;
updated_at?: string;
/** @nullable */
updated_by?: string | null;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template
* Coded by Meu TEAM
* OpenAPI spec version: 1.0.0
*/
export interface SiteInformationBranchMutate {
/** @nullable */
branch_name?: string | null;
/** @nullable */
hotline?: string | null;
/** @nullable */
email?: string | null;
/** @nullable */
address?: string | null;
/** @nullable */
fax?: string | null;
/** @nullable */
googlemap_link?: string | null;
sort_order?: number;
is_active?: boolean;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* Backend Template
* Coded by Meu TEAM
* OpenAPI spec version: 1.0.0
*/
import type { SiteInformationDataLogo } from './siteInformationDataLogo';
import type { SiteInformationSocialLink } from './siteInformationSocialLink';
import type { SiteInformationBranch } from './siteInformationBranch';
export interface SiteInformationData {
id?: string;
code?: string;
/** @nullable */
website_name?: string | null;
/** @nullable */
website_link?: string | null;
/** @nullable */
logo?: SiteInformationDataLogo;
/** @nullable */
telephone?: string | null;
/** @nullable */
email?: string | null;
......@@ -19,6 +27,8 @@ export interface SiteInformationData {
/** @nullable */
working_hours?: string | null;
link_socials?: SiteInformationSocialLink[];
branches?: SiteInformationBranch[];
socials?: SiteInformationSocialLink[];
created_at?: string;
/** @nullable */
created_by?: string | null;
......
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template
* Coded by Meu TEAM
* OpenAPI spec version: 1.0.0
*/
import type { Logo } from './logo';
/**
* @nullable
*/
export type SiteInformationDataLogo = Logo | null;
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* Backend Template
* Coded by Meu TEAM
* OpenAPI spec version: 1.0.0
*/
import type { ApiResponse } from './apiResponse';
......
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* Backend Template
* Coded by Meu TEAM
* OpenAPI spec version: 1.0.0
*/
import type { SiteInformationData } from './siteInformationData';
......
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* Backend Template
* Coded by Meu TEAM
* OpenAPI spec version: 1.0.0
*/
export interface SiteInformationSocialLink {
id: string;
/** Social platform key (lowercase recommended) */
platform: string;
/** Display label for the social platform */
label: string;
/** Public URL to the social page */
url: string;
/**
* Public URL to the social page
* @nullable
*/
url?: string | null;
/** Icon key used by FE to render correct icon */
icon_key: string;
/** Whether this social link is active */
is_active: boolean;
/** Display order */
sort_order: number;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template
* Coded by Meu TEAM
* OpenAPI spec version: 1.0.0
*/
export interface SiteInformationSocialMutate {
/** @nullable */
url?: string | null;
sort_order?: number;
is_active?: boolean;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* Backend Template
* Coded by Meu TEAM
* OpenAPI spec version: 1.0.0
*/
import type { SiteInformationSocialLink } from './siteInformationSocialLink';
......@@ -11,6 +11,10 @@ export interface SiteInformationUpdateBody {
/** @nullable */
telephone?: string | null;
/** @nullable */
website_name?: string | null;
/** @nullable */
website_link?: string | null;
/** @nullable */
email?: string | null;
/** @nullable */
address?: string | null;
......
This diff is collapsed.
......@@ -29,6 +29,8 @@ export interface BaseConfigBranchItem {
email: string;
fax: string;
mapsEmbedUrl: string;
sortOrder: number;
isVisible: boolean;
}
export interface BaseConfigSocialItem {
......@@ -56,6 +58,8 @@ export const EMPTY_BASE_CONFIG_BRANCH: BaseConfigBranchItem = {
email: "",
fax: "",
mapsEmbedUrl: "",
sortOrder: 1,
isVisible: true,
};
export const BASE_CONFIG_SOCIAL_SEED: BaseConfigSocialItem[] = [
......@@ -147,6 +151,8 @@ const BASE_CONFIG_SEED: BaseConfigData = {
email: "info@vccinews.vn",
fax: "028 3932 5789",
mapsEmbedUrl: "https://maps.google.com/?q=171+Vo+Thi+Sau+Quan+3+TPHCM",
sortOrder: 1,
isVisible: true,
},
{
id: "base-branch-002",
......@@ -156,6 +162,8 @@ const BASE_CONFIG_SEED: BaseConfigData = {
email: "hanoi@vccinews.vn",
fax: "024 3574 2020",
mapsEmbedUrl: "https://maps.google.com/?q=9+Dao+Duy+Anh+Dong+Da+Ha+Noi",
sortOrder: 2,
isVisible: true,
},
],
};
......@@ -201,6 +209,8 @@ export function readBaseConfig(): BaseConfigData {
email: parsed.contactInfo.email || "",
fax: parsed.contactInfo.fax || "",
mapsEmbedUrl: parsed.contactInfo.mapsEmbedUrl || "",
sortOrder: 1,
isVisible: true,
},
]
: BASE_CONFIG_SEED.branches;
......@@ -253,13 +263,21 @@ export function readBaseConfig(): BaseConfigData {
})
: BASE_CONFIG_SOCIAL_SEED.map((item) => ({ ...item })),
branches: Array.isArray(parsed.branches)
? parsed.branches.map((item) => ({
? parsed.branches.map((item, index) => ({
...EMPTY_BASE_CONFIG_BRANCH,
...item,
fax:
typeof (item as BaseConfigBranchItem & { fax?: string }).fax === "string"
? (item as BaseConfigBranchItem & { fax?: string }).fax ?? ""
: "",
sortOrder:
typeof (item as BaseConfigBranchItem & { sortOrder?: number }).sortOrder === "number"
? (item as BaseConfigBranchItem & { sortOrder?: number }).sortOrder ?? index + 1
: index + 1,
isVisible:
typeof (item as BaseConfigBranchItem & { isVisible?: boolean }).isVisible === "boolean"
? (item as BaseConfigBranchItem & { isVisible?: boolean }).isVisible
: true,
}))
: fallbackBranchFromLegacyContact,
};
......@@ -291,3 +309,10 @@ export function sortBaseConfigSocials(items: BaseConfigSocialItem[]) {
return first.label.localeCompare(second.label, "vi");
});
}
export function sortBaseConfigBranches(items: BaseConfigBranchItem[]) {
return [...items].sort((first, second) => {
if (first.sortOrder !== second.sortOrder) return first.sortOrder - second.sortOrder;
return first.branchName.localeCompare(second.branchName, "vi");
});
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment