new view
This commit is contained in:
@@ -119,6 +119,11 @@ class Reports
|
||||
return $return;
|
||||
}
|
||||
|
||||
public function isDone(): bool
|
||||
{
|
||||
return $this->isReportsTodo(ReportTodoEnum::COMPLETE);
|
||||
}
|
||||
|
||||
public function countTodoReports(): int
|
||||
{
|
||||
$count = 0;
|
||||
@@ -171,11 +176,6 @@ class Reports
|
||||
$this->numberOfReport = $numberOfReport;
|
||||
}
|
||||
|
||||
public function isDone(): bool
|
||||
{
|
||||
return $this->isDone;
|
||||
}
|
||||
|
||||
public function setDone(bool $isDone): static
|
||||
{
|
||||
$this->isDone = $isDone;
|
||||
|
||||
@@ -8,6 +8,7 @@ enum ReportStatus: int {
|
||||
|
||||
public function checkboxColor() : string
|
||||
{
|
||||
return 'primary';
|
||||
return match ($this)
|
||||
{
|
||||
ReportStatus::INSERT => 'primary',
|
||||
@@ -19,8 +20,8 @@ enum ReportStatus: int {
|
||||
{
|
||||
return match ($this)
|
||||
{
|
||||
ReportStatus::INSERT => 'light',
|
||||
ReportStatus::WORKING => 'warning',
|
||||
ReportStatus::INSERT => 'info',
|
||||
ReportStatus::WORKING => 'primary',
|
||||
ReportStatus::COMPLETE => 'success',
|
||||
};
|
||||
}
|
||||
@@ -29,8 +30,7 @@ enum ReportStatus: int {
|
||||
{
|
||||
return match ($this)
|
||||
{
|
||||
ReportStatus::WORKING, ReportStatus::INSERT => 'dark',
|
||||
ReportStatus::COMPLETE => 'white',
|
||||
ReportStatus::WORKING, ReportStatus::INSERT, ReportStatus::COMPLETE => 'dark',
|
||||
};
|
||||
}
|
||||
|
||||
@@ -38,8 +38,7 @@ enum ReportStatus: int {
|
||||
{
|
||||
return match ($this)
|
||||
{
|
||||
ReportStatus::WORKING, ReportStatus::INSERT => 'dark',
|
||||
ReportStatus::COMPLETE => 'light',
|
||||
ReportStatus::WORKING, ReportStatus::INSERT, ReportStatus::COMPLETE => 'dark',
|
||||
};
|
||||
}
|
||||
|
||||
@@ -52,6 +51,16 @@ enum ReportStatus: int {
|
||||
};
|
||||
}
|
||||
|
||||
public function takeBadgeBg(): string
|
||||
{
|
||||
return 'info';
|
||||
return match ($this) {
|
||||
ReportStatus::INSERT => 'info',
|
||||
ReportStatus::WORKING => 'primary',
|
||||
ReportStatus::COMPLETE => 'info'
|
||||
};
|
||||
}
|
||||
|
||||
public function next() : ?ReportStatus
|
||||
{
|
||||
return ReportStatus::tryFrom($this->value+1);
|
||||
|
||||
Reference in New Issue
Block a user