Add beginning of a project management system to placeholders

This commit is contained in:
Alex Cabal 2024-12-14 19:03:04 -06:00
parent e56de4b19d
commit adfe07aad9
42 changed files with 717 additions and 118 deletions

View file

@ -39,6 +39,18 @@ if($verbose){
try{
$ebook->CreateOrUpdate();
// If there was an `EbookPlaceholder` for this ebook, delete it.
if($ebook->EbookPlaceholder !== null){
$ebook->EbookPlaceholder->Delete();
}
// If there was a `Project` for this ebook, mark it as completed.
if($ebook->ProjectInProgress !== null){
$ebook->ProjectInProgress->Status = Enums\ProjectStatusType::Completed;
$ebook->ProjectInProgress->Ended = NOW;
$ebook->ProjectInProgress->Save();
}
}
catch(Exceptions\ValidationException $validationException){
$exceptions = $validationException->Exceptions;