feat(email-signature): add address toggles for Urban Switch and Studii de Teren
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
import type { CompanyId } from '@/core/auth/types';
|
||||
import type { SignatureConfig, SignatureColors, SignatureLayout, SignatureVariant } from '../types';
|
||||
import { COMPANY_BRANDING, BELETAGE_ADDRESSES } from '../services/company-branding';
|
||||
import { COMPANY_BRANDING, BELETAGE_ADDRESSES, US_ADDRESSES, SDT_ADDRESSES } from '../services/company-branding';
|
||||
import { Input } from '@/shared/components/ui/input';
|
||||
import { Label } from '@/shared/components/ui/label';
|
||||
import { Switch } from '@/shared/components/ui/switch';
|
||||
@@ -115,6 +115,44 @@ export function SignatureConfigurator({
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Address selector (for Urban Switch) */}
|
||||
{config.company === 'urban-switch' && onSetAddress && (
|
||||
<div>
|
||||
<Label>Adresă birou</Label>
|
||||
<Select
|
||||
value={!config.addressOverride || US_ADDRESSES.unirii.join('|') === config.addressOverride.join('|') ? 'unirii' : 'unirii'}
|
||||
onValueChange={(v) => {
|
||||
const key = v as keyof typeof US_ADDRESSES;
|
||||
onSetAddress(US_ADDRESSES[key]);
|
||||
}}
|
||||
>
|
||||
<SelectTrigger className="mt-1"><SelectValue /></SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="unirii">Str. Unirii, nr. 3</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Address selector (for Studii de Teren) */}
|
||||
{config.company === 'studii-de-teren' && onSetAddress && (
|
||||
<div>
|
||||
<Label>Adresă birou</Label>
|
||||
<Select
|
||||
value={!config.addressOverride || SDT_ADDRESSES.unirii.join('|') === config.addressOverride.join('|') ? 'unirii' : 'unirii'}
|
||||
onValueChange={(v) => {
|
||||
const key = v as keyof typeof SDT_ADDRESSES;
|
||||
onSetAddress(SDT_ADDRESSES[key]);
|
||||
}}
|
||||
>
|
||||
<SelectTrigger className="mt-1"><SelectValue /></SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="unirii">Str. Unirii, nr. 3</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<Separator />
|
||||
|
||||
{/* Personal data */}
|
||||
|
||||
@@ -40,6 +40,16 @@ export const BELETAGE_ADDRESSES: { unirii: string[]; christescu: string[] } = {
|
||||
christescu: [...ADDR_CHRISTESCU],
|
||||
};
|
||||
|
||||
/** Available address options for Urban Switch */
|
||||
export const US_ADDRESSES: { unirii: string[] } = {
|
||||
unirii: ['str. Unirii, nr. 3, ap. 26', 'Cluj-Napoca, Cluj 400417', 'România'],
|
||||
};
|
||||
|
||||
/** Available address options for Studii de Teren */
|
||||
export const SDT_ADDRESSES: { unirii: string[] } = {
|
||||
unirii: ['str. Unirii, nr. 3, ap. 26', 'Cluj-Napoca, Cluj 400417', 'românia'],
|
||||
};
|
||||
|
||||
export const COMPANY_BRANDING: Record<CompanyId, CompanyBranding> = {
|
||||
beletage: {
|
||||
id: 'beletage',
|
||||
|
||||
Reference in New Issue
Block a user