Skip to content

Commit

Permalink
G2P-2344 Past submission list_View button added
Browse files Browse the repository at this point in the history
  • Loading branch information
RamakrishnaVellala committed May 15, 2024
1 parent 39fe1d8 commit 3988749
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
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
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

0 comments on commit 3988749

Please sign in to comment.