|
@@ -228,20 +228,6 @@ class Appearance extends Page
|
228
|
228
|
}
|
229
|
229
|
}
|
230
|
230
|
|
231
|
|
- // If the primary color or font has changed, we need to update the associated models accent_color column.
|
232
|
|
- if (array_key_exists('primary_color', $diff) || array_key_exists('font', $diff)) {
|
233
|
|
- $primaryColorToHex = PrimaryColor::from($data['primary_color'])->getHexCode();
|
234
|
|
- $font = Font::from($data['font'])->value;
|
235
|
|
- $this->record->company->defaultBill()->update([
|
236
|
|
- 'accent_color' => $primaryColorToHex,
|
237
|
|
- 'font' => $font,
|
238
|
|
- ]);
|
239
|
|
- $this->record->company->defaultInvoice()->update([
|
240
|
|
- 'accent_color' => $primaryColorToHex,
|
241
|
|
- 'font' => $font,
|
242
|
|
- ]);
|
243
|
|
- }
|
244
|
|
-
|
245
|
231
|
$record->update($data);
|
246
|
232
|
|
247
|
233
|
return $record;
|