mirror of
https://github.com/Karaka-Management/oms-Editor.git
synced 2026-02-11 07:58:40 +00:00
update
This commit is contained in:
parent
e8f196fe12
commit
1ac9e10a9f
|
|
@ -149,7 +149,7 @@ final class Installer extends InstallerAbstract
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @var \Modules\Editor\Models\EditorDocType $type */
|
/** @var \phpOMS\Localization\BaseStringL11nType $type */
|
||||||
$type = $responseData['response'];
|
$type = $responseData['response'];
|
||||||
$id = $type->id;
|
$id = $type->id;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -261,7 +261,7 @@ final class ApiDocTypeController extends Controller
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @var \Modules\Editor\Models\EditorDocType $contractType */
|
/** @var BaseStringL11nType $contractType */
|
||||||
$contractType = EditorDocTypeMapper::get()->where('id', (int) $request->getData('id'))->execute();
|
$contractType = EditorDocTypeMapper::get()->where('id', (int) $request->getData('id'))->execute();
|
||||||
$this->deleteModel($request->header->account, $contractType, EditorDocTypeMapper::class, 'contract_type', $request->getOrigin());
|
$this->deleteModel($request->header->account, $contractType, EditorDocTypeMapper::class, 'contract_type', $request->getOrigin());
|
||||||
$this->createStandardDeleteResponse($request, $response, $contractType);
|
$this->createStandardDeleteResponse($request, $response, $contractType);
|
||||||
|
|
@ -377,7 +377,7 @@ final class ApiDocTypeController extends Controller
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @var \Modules\Editor\Models\EditorDocTypeL11n $contractTypeL11n */
|
/** @var BaseStringL11n $contractTypeL11n */
|
||||||
$contractTypeL11n = EditorDocTypeL11nMapper::get()->where('id', (int) $request->getData('id'))->execute();
|
$contractTypeL11n = EditorDocTypeL11nMapper::get()->where('id', (int) $request->getData('id'))->execute();
|
||||||
$this->deleteModel($request->header->account, $contractTypeL11n, EditorDocTypeL11nMapper::class, 'contract_type_l11n', $request->getOrigin());
|
$this->deleteModel($request->header->account, $contractTypeL11n, EditorDocTypeL11nMapper::class, 'contract_type_l11n', $request->getOrigin());
|
||||||
$this->createStandardDeleteResponse($request, $response, $contractTypeL11n);
|
$this->createStandardDeleteResponse($request, $response, $contractTypeL11n);
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ class EditorDoc implements \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* Type.
|
* Type.
|
||||||
*
|
*
|
||||||
* @var null|EditorDocType
|
* @var null|BaseStringL11nType
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public ?BaseStringL11nType $type = null;
|
public ?BaseStringL11nType $type = null;
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ trait EditorDocListTrait
|
||||||
{
|
{
|
||||||
$notes = [];
|
$notes = [];
|
||||||
foreach ($this->notes as $note) {
|
foreach ($this->notes as $note) {
|
||||||
if ($note->type?->name === $type) {
|
if ($note->type?->title === $type) {
|
||||||
$notes[] = $note;
|
$notes[] = $note;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -107,7 +107,7 @@ trait EditorDocListTrait
|
||||||
public function hasEditorDocTypeName(string $type) : bool
|
public function hasEditorDocTypeName(string $type) : bool
|
||||||
{
|
{
|
||||||
foreach ($this->notes as $note) {
|
foreach ($this->notes as $note) {
|
||||||
if ($note->type?->name === $type) {
|
if ($note->type?->title === $type) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user