Enhance Form Visibility Logic and UI Components
- Updated the `getIsClosedAttribute` method in `Form.php` to include a check for the form's visibility status, ensuring that forms marked as 'closed' are accurately reflected in their state. - Modified `QuillyEditor.vue` to import additional Quill patches for improved functionality. - Changed the alert color from yellow to amber in `OpenCompleteForm.vue` for better visual consistency. - Refactored the form status display in `OpenCompleteForm.vue` and `show.vue` to utilize the new `FormStatusBadges` component, streamlining the UI and improving maintainability. - Enhanced the `FormEditorNavbar.vue` to include icons for better user experience and clarity. These changes aim to improve the accuracy of form visibility handling and enhance the overall user interface across various components.
This commit is contained in:
@@ -223,7 +223,7 @@ class Form extends Model implements CachableAttributes
|
||||
|
||||
public function getIsClosedAttribute()
|
||||
{
|
||||
return $this->closes_at && now()->gt($this->closes_at);
|
||||
return $this->visibility === 'closed' || ($this->closes_at && now()->gt($this->closes_at));
|
||||
}
|
||||
|
||||
public function getFormPendingSubmissionKeyAttribute()
|
||||
|
||||
Reference in New Issue
Block a user