-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1722 from DFE-Digital/verification-lops
LoPS verification journey
- Loading branch information
Showing
66 changed files
with
1,006 additions
and
549 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# frozen_string_literal: true | ||
|
||
class AssessorInterface::RequestableRequestForm | ||
include ActiveModel::Model | ||
include ActiveModel::Attributes | ||
|
||
attr_accessor :requestable, :user, :application_form, :assessment | ||
validates :requestable, :user, presence: true | ||
|
||
attribute :passed, :boolean | ||
validates :passed, inclusion: [true, false] | ||
|
||
delegate :application_form, :assessment, to: :requestable | ||
|
||
def save | ||
return false if invalid? | ||
|
||
if passed && !requestable.requested? | ||
RequestRequestable.call(requestable:, user:) | ||
end | ||
|
||
true | ||
end | ||
end |
20 changes: 20 additions & 0 deletions
20
app/forms/assessor_interface/requestable_verify_failed_form.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# frozen_string_literal: true | ||
|
||
class AssessorInterface::RequestableVerifyFailedForm | ||
include ActiveModel::Model | ||
include ActiveModel::Attributes | ||
|
||
attr_accessor :requestable, :user | ||
validates :requestable, :user, presence: true | ||
|
||
attribute :note, :string | ||
validates :note, presence: true | ||
|
||
def save | ||
return false if invalid? | ||
|
||
VerifyRequestable.call(requestable:, user:, passed: false, note:) | ||
|
||
true | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.