Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

self service portal bugs G2P-2344 ,G2P-1899 rectified #106

Merged
merged 2 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions g2p_self_service_portal/controllers/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ def self_service_all_submissions(self, _id):
{
"applied_on": detail.create_date.strftime("%d-%b-%Y"),
"application_id": detail.application_id,
"program_id": program.id,
"status": detail.state
if detail.program_membership_id.state not in ("duplicated", "not_eligible")
else detail.program_membership_id.state,
Expand Down Expand Up @@ -494,6 +495,7 @@ def self_service_form_submit(self, _id, **kwargs):
)
def self_service_form_details(self, _id, **kwargs):
self.self_service_check_roles("REGISTRANT")
application_id = request.params.get("application_id", None)

program = request.env["g2p.program"].sudo().browse(_id)
current_partner = request.env.user.partner_id
Expand All @@ -509,6 +511,8 @@ def self_service_form_details(self, _id, **kwargs):
)
.sorted("create_date", reverse=True)
)
if application_id:
program_reg_info = program_reg_info.sudo().search([("application_id", "=", application_id)])

if len(program_reg_info) > 1:
program_reg_info = program_reg_info[0]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
id="exampleModalLongTitle"
>Discard applicaton?</h5>
</div>
<div class="modal-body">
<div class="modal-body overflow-hidden">
<p>
The entered data will not be saved.
Are you sure you want to discard the form?
Expand Down
16 changes: 16 additions & 0 deletions g2p_self_service_portal/views/g2p_self_service_submission_info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
<th>Application ID</th>
<th>Applied on</th>
<th>Status <i class="fa fa-sort" /></th>
<th>Actions</th>
</tr>
</thead>
<tbody>
Expand Down Expand Up @@ -116,6 +117,21 @@
</button>
</t>
</td>
<td>
<t>
<a
t-attf-href="/selfservice/submitted/{{value['program_id']}}?application_id={{value['application_id']}}"
>
<button
string="View"
type="object"
class="view-button"
>
View
</button>
</a>
</t>
</td>
</tr>
</t>
</tbody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
</div>
</div>
<div class="card-footer" style="padding: 20px;">
<a
<a
href="/selfservice/home"
class="btn btn-outline-primary mb-3 w-100 btn-block"
>
Expand Down
Loading