feat: add default label template setting and apply it to print dialog selection
Build and Push Multi-Platform Images / build-and-push (push) Successful in 35s
Build and Push Multi-Platform Images / build-and-push (push) Successful in 35s
This commit is contained in:
@@ -28,4 +28,7 @@ export class UserSettings {
|
||||
|
||||
@Column({ type: 'text', nullable: true })
|
||||
MailSignatureHtml!: string | null;
|
||||
|
||||
@Column({ type: 'int', nullable: true })
|
||||
DefaultLabelTemplateId!: number | null;
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ export interface UserSettingsDto {
|
||||
smtpFrom: string | null;
|
||||
smtpFromName: string | null;
|
||||
mailSignatureHtml: string | null;
|
||||
defaultLabelTemplateId: number | null;
|
||||
}
|
||||
|
||||
@Injectable()
|
||||
@@ -78,6 +79,7 @@ export class UserSettingsService {
|
||||
smtpFrom?: string | null;
|
||||
smtpFromName?: string | null;
|
||||
mailSignatureHtml?: string | null;
|
||||
defaultLabelTemplateId?: number | null;
|
||||
},
|
||||
): Promise<UserSettingsDto> {
|
||||
let entity = await this.repo.findOne({ where: { UserId: userId } });
|
||||
@@ -95,6 +97,7 @@ export class UserSettingsService {
|
||||
if (data.smtpFrom !== undefined) entity.SmtpFrom = data.smtpFrom;
|
||||
if (data.smtpFromName !== undefined) entity.SmtpFromName = data.smtpFromName;
|
||||
if (data.mailSignatureHtml !== undefined) entity.MailSignatureHtml = data.mailSignatureHtml;
|
||||
if (data.defaultLabelTemplateId !== undefined) entity.DefaultLabelTemplateId = data.defaultLabelTemplateId;
|
||||
|
||||
await this.repo.save(entity);
|
||||
return this.toDto(entity);
|
||||
@@ -164,6 +167,7 @@ export class UserSettingsService {
|
||||
smtpFrom: entity?.SmtpFrom ?? null,
|
||||
smtpFromName: entity?.SmtpFromName ?? null,
|
||||
mailSignatureHtml: entity?.MailSignatureHtml ?? null,
|
||||
defaultLabelTemplateId: entity?.DefaultLabelTemplateId ?? null,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user