new view
This commit is contained in:
@@ -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