todos fixed

This commit is contained in:
Dennis Eichhorn 2023-10-12 22:49:20 +00:00
parent af74e90226
commit a61e5e39fe
4 changed files with 16 additions and 16 deletions

View File

@ -61,7 +61,7 @@ final class ApiAttributeController extends Controller
return;
}
$type = ClientAttributeTypeMapper::get()->where('id', (int) $request->getData('type'))->execute();
$type = ClientAttributeTypeMapper::get()->with('defaults')->where('id', (int) $request->getData('type'))->execute();
$attribute = $this->createAttributeFromRequest($request, $type);
$this->createModel($request->header->account, $attribute, ClientAttributeMapper::class, 'attribute', $request->getOrigin());
$this->createStandardCreateResponse($request, $response, $attribute);
@ -359,7 +359,7 @@ final class ApiAttributeController extends Controller
}
/** @var AttributeType $old */
$old = ClientAttributeTypeMapper::get()->where('id', (int) $request->getData('id'))->execute();
$old = ClientAttributeTypeMapper::get()->with('defaults')->where('id', (int) $request->getData('id'))->execute();
$new = $this->updateAttributeTypeFromRequest($request, clone $old);
$this->updateModel($request->header->account, $old, $new, ClientAttributeTypeMapper::class, 'client_attribute_type', $request->getOrigin());
@ -391,7 +391,7 @@ final class ApiAttributeController extends Controller
}
/** @var AttributeType $clientAttributeType */
$clientAttributeType = ClientAttributeTypeMapper::get()->where('id', (int) $request->getData('id'))->execute();
$clientAttributeType = ClientAttributeTypeMapper::get()->with('defaults')->where('id', (int) $request->getData('id'))->execute();
$this->deleteModel($request->header->account, $clientAttributeType, ClientAttributeTypeMapper::class, 'client_attribute_type', $request->getOrigin());
$this->createStandardDeleteResponse($request, $response, $clientAttributeType);
}

View File

@ -145,10 +145,10 @@ final class ApiController extends Controller
&& $validate['vat'] === 'A'
&& $validate['name'] === 'A'
&& $validate['city'] === 'A')
|| $validate['status'] !== 0 // Api out of order -> accept it -> @todo: test it during invoice creation
|| $validate['status'] !== 0 // Api out of order -> accept it -> test it during invoice creation
) {
/** @var \Modules\Attribute\Models\AttributeType $type */
$type = ClientAttributeTypeMapper::get()->where('name', 'vat_id')->execute();
$type = ClientAttributeTypeMapper::get()->with('defaults')->where('name', 'vat_id')->execute();
$internalRequest = new HttpRequest(new HttpUri(''));
$internalResponse = new HttpResponse();

View File

@ -13,7 +13,7 @@
declare(strict_types=1);
return ['Navigation' => [
'Client' => 'Klient',
'Client' => 'Kunde',
'Region' => 'Region',
'SalesRep' => 'VerkäufeRep',
]];

View File

@ -78,15 +78,15 @@ return ['ClientManagement' => [
'LostCustomers' => 'Verlorene Kunden',
'MRR' => 'Mrr.',
'MTDSales' => 'MTD-Verkäufe.',
'Map' => '',
'Margin' => 'Rand',
'Map' => 'KArte',
'Margin' => 'Marge',
'Messages' => 'Mitteilungen',
'Modified' => 'Geändert',
'Modules' => 'Module',
'Name' => 'Name',
'Name1' => 'Name1.',
'Name2' => 'Name2.',
'Name3' => 'Name3.',
'Name1' => 'Name1',
'Name2' => 'Name2',
'Name3' => 'Name3',
'Net' => 'Netz',
'NewCustomers' => 'Neue Kunden',
'Notes' => 'Anmerkungen',
@ -100,21 +100,21 @@ return ['ClientManagement' => [
'Postal' => 'Post',
'Price' => 'Preis',
'Prices' => 'Preise',
'Private' => 'Privatgelände',
'Private' => 'Privat',
'Productgroup' => 'Produktgruppe',
'Profile' => 'Profil',
'Profit' => 'Profit',
'Purchase' => 'Kaufen',
'Quantity' => 'Menge',
'RecentInvoices' => 'Jüngste Rechnungen',
'RecentInvoices' => 'Neuste Rechnungen',
'Region' => 'Region',
'Rep' => 'Vertriebler',
'Retention' => 'Kundenbindung',
'Sales' => 'Der Umsatz',
'Sales' => 'Umsatz',
'Segment' => 'Segment',
'Segments' => 'Segmente',
'Subtype' => 'Untertyp',
'Support' => 'Unterstützung',
'Support' => 'Support',
'Tags' => 'Stichworte',
'Title' => 'Titel',
'Total' => 'Gesamt',
@ -125,5 +125,5 @@ return ['ClientManagement' => [
'Website' => 'Webseite',
'Wire' => 'Kabel',
'YTDSales' => 'Ytd Sales.',
'Zip' => 'Reißverschluss',
'Zip' => 'Postleitzahl',
]];