Skip to content

Commit

Permalink
Merge branch 'main' into 378-send-refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Sep 10, 2024
2 parents f40e7ab + ee39c08 commit 6f4c365
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 52 deletions.
34 changes: 34 additions & 0 deletions app/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,38 +225,72 @@ class BorrowerStatus(StrEnum):


class MessageType(StrEnum):
#: Message the borrower to accept or decline the invitation.
#:
#: PENDING (:typer:`python-m-app-fetch-awards`)
BORROWER_INVITATION = "BORROWER_INVITATION"
#: Remind the borrower to accept or decline the invitation.
#:
#: PENDING (:typer:`python-m-app-send-reminders`)
BORROWER_PENDING_APPLICATION_REMINDER = "BORROWER_PENDING_APPLICATION_REMINDER"
#: Remind the borrower to submit the application.
#:
#: ACCEPTED (:typer:`python-m-app-send-reminders`)
BORROWER_PENDING_SUBMIT_REMINDER = "BORROWER_PENDING_SUBMIT_REMINDER"
#: Confirm receipt of the application.
#:
#: ACCEPTED → SUBMITTED (``/applications/submit``)
SUBMISSION_COMPLETED = "SUBMISSION_COMPLETED"
#: Notify the administrators about a new application.
#:
#: Unused, but the corresponding message is sent by ``/applications/submit`` :issue:`330`
NEW_APPLICATION_OCP = "NEW_APPLICATION_OCP"
#: Notify the lender about a new application.
#:
#: Unused, but the corresponding message is sent by ``/applications/submit`` :issue:`330`
NEW_APPLICATION_FI = "NEW_APPLICATION_FI"
#: Request documents from the borrower.
#:
#: STARTED → INFORMATION_REQUESTED (``/applications/email-sme/{id}``)
FI_MESSAGE = "FI_MESSAGE"
#: Notify the lender about the requested documents.
#:
#: INFORMATION_REQUESTED → STARTED (``/applications/complete-information-request``)
BORROWER_DOCUMENT_UPDATED = "BORROWER_DOCUMENT_UPDATED"
#: Notify the borrower that the application is rejected.
#:
#: STARTED → REJECTED (``/applications/{id}/reject-application``)
REJECTED_APPLICATION = "REJECTED_APPLICATION"
#: Notify the borrower that the application is pre-approved.
#:
#: STARTED → APPROVED (``/applications/{id}/approve-application``)
APPROVED_APPLICATION = "APPROVED_APPLICATION"
#: Request a contract from the borrower.
#:
#: Unused
CONTRACT_UPLOAD_REQUEST = "CONTRACT_UPLOAD_REQUEST"
#: Confirm receipt of the requested contract.
#:
#: APPROVED → CONTRACT_UPLOADED (``/applications/confirm-upload-contract``)
CONTRACT_UPLOAD_CONFIRMATION = "CONTRACT_UPLOAD_CONFIRMATION"
#: Notify the lender about the requested contract.
#:
#: APPROVED → CONTRACT_UPLOADED (``/applications/confirm-upload-contract``)
CONTRACT_UPLOAD_CONFIRMATION_TO_FI = "CONTRACT_UPLOAD_CONFIRMATION_TO_FI"
#: Notify the borrower that the application is completed.
#:
#: CONTRACT_UPLOADED → COMPLETED (``/applications/{id}/complete-application``)
CREDIT_DISBURSED = "CREDIT_DISBURSED"
#: Remind the administrators about overdue applications.
#:
#: STARTED | CONTRACT_UPLOADED (:typer:`python-m-app-sla-overdue-applications`)
OVERDUE_APPLICATION = "OVERDUE_APPLICATION"
#: Send the borrower a URL to continue the copied application.
#:
#: ACCEPTED (``/applications/find-alternative-credit-option``)
APPLICATION_COPIED = "APPLICATION_COPIED"
#: Verify the borrower's new email address.
#:
#: Any (``/applications/change-email``)
EMAIL_CHANGE_CONFIRMATION = "EMAIL_CHANGE_CONFIRMATION"

Expand Down
24 changes: 9 additions & 15 deletions email_templates/aws_main_es.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,12 @@
background: #fff;
"
>
<div style="border-radius: 20px;
width: 600px;
height: 370px;
<img style="border-radius: 20px;
flex-shrink: 0;
background: url('https://cdn.credere.open-contracting.org/credere-header.png')
lightgray 0px 0px / 100% 100% no-repeat;
background: lightgray 0px 0px / 100% 100% no-repeat;
"
></div>
src="https://cdn.credere.open-contracting.org/credere-header.png"
>
<div style="padding: 10px"></div>

<div id="content">{{CONTENT}}</div>
Expand All @@ -42,7 +40,6 @@
<div
style="
color: #1e1e1e;
font-family: Arial;
font-size: 14px;
font-style: normal;
font-weight: 700;
Expand All @@ -55,14 +52,12 @@
</td>
<td>
<img
src="{{IMAGES_BASE_URL}}/strive_logo_lockup_horizontal_positive.png" style="width: 100px;
height: 25px;"
src="{{IMAGES_BASE_URL}}/strive_logo_lockup_horizontal_positive.png"
>
</td>
</tr>
</table>
<div style="color: #757575;
font-family: Arial;
font-size: 11px;
font-style: normal;
font-weight: 400;
Expand Down Expand Up @@ -94,30 +89,29 @@
<tr>
<td>
<a href="https://twitter.com/opencontracting">
<img src="{{IMAGES_BASE_URL}}/twiterlogo.png" style="width: 24px; height: 24px;">
<img src="{{IMAGES_BASE_URL}}/twiterlogo.png">
</a>
</td>
<td>
<a href="https://www.facebook.com/OpenContracting/">
<img src="{{IMAGES_BASE_URL}}/facebook.png" style="width: 24px; height: 24px;">
<img src="{{IMAGES_BASE_URL}}/facebook.png">
</a>
</td>
<td>
<a href="{{FRONTEND_URL}}">
<img src="{{IMAGES_BASE_URL}}/link.png" style="width: 24px; height: 24px;">
<img src="{{IMAGES_BASE_URL}}/link.png">
</a>
</td>
</tr>
</table>
<p style="color: #A2A2A6;
text-align: center;
font-family: Arial;
font-size: 9px;
font-style: normal;
font-weight: 400;
line-height: 150%; /* 13.5px */
letter-spacing: -0.099px;
width: 567px;">
width: 567px;">
Copyright 2023 Open Contracting Partnership. All rights reserved.
</p>
</div>
Expand Down
49 changes: 12 additions & 37 deletions email_templates/borrower_invitation.es.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<div style="width: 568px; left: 16px;">
<div>
<p
style="
color: #1c1c1e;
font-size: 18px;
font-family: Arial;
font-weight: 700;
line-height: 27px;
"
Expand All @@ -13,7 +12,6 @@
style="
color: #1c1c1e;
font-size: 14px;
font-family: Arial;
font-weight: 700;
line-height: 24px;
word-wrap: break-word;
Expand Down Expand Up @@ -42,19 +40,16 @@

<p>¿Te interesa?, haz click en el siguiente link para conocer más:</p>

<div style="text-align: center">
<div style="text-align: center; padding: 10px;">
<div
style="
display: inline-flex;
padding: 8px 24px;
align-items: center;
align-content: space-between;
column-gap: 8px;
flex-shrink: 0;
flex-wrap: wrap;
border-radius: 4px;
border-radius: 100px;
background: #d6e100;
font-weight: bold;
margin-left: auto;
margin-right: auto;
width: 50%;
"
>

Expand Down Expand Up @@ -91,25 +86,19 @@
<img
src="https://cdn.credere.open-contracting.org/credere-oscar-200h.png"
style="
width: 60px;
height: 60px;
background: #d9d9d9;
border-radius: 9999px;
"
/>
</td>
<td></td>
<td
style="
width: 212px;
height: 60px;
"

>
<span
style="
color: #1e1e1e;
font-size: 12px;
font-family: Arial;
font-weight: 700;
word-wrap: break-word;
"
Expand All @@ -118,11 +107,11 @@
style="
color: #1e1e1e;
font-size: 12px;
font-family: Arial;
font-weight: 400;
text-align: center;
word-wrap: break-word;
"
>Gerente de Credere y Director de Open Contracting Partnership
>Gerente de Credere y de Open Contracting Partnership
para Latinoamérica</span
>
</td>
Expand All @@ -132,10 +121,9 @@
</div>
</div>
<div id="media" style="padding-bottom: 50px">
<div style="width: 100%;
<div style="
color: #1e1e1e;
font-size: 16px;
font-family: Arial;
font-weight: 700;
line-height: 24px;
padding-bottom: 10px;
Expand Down Expand Up @@ -167,7 +155,6 @@
style="
flex-shrink: 0;
color: #bfbfc1;
font-family: Roboto;
font-size: 8px;
font-style: normal;
font-weight: 500;
Expand All @@ -181,7 +168,6 @@
style="
color: #272a51;
font-size: 12px;
font-family: Roboto;
font-weight: 500;
word-wrap: break-word;
"
Expand All @@ -192,7 +178,6 @@
<div
style="
color: #86868b;
font-family: Roboto;
font-size: 10px;
font-style: normal;
font-weight: 400;
Expand All @@ -209,8 +194,6 @@
<img
src="https://cdn.credere.open-contracting.org/new1.png"
style="
width: 132px;
height: 136px;
flex-shrink: 0;
border-radius: 4px;
"
Expand Down Expand Up @@ -239,11 +222,9 @@
>
<div
style="
width: 87.911px;
height: 8.176px;
flex-shrink: 0;
color: #bfbfc1;
font-family: Roboto;
font-size: 8px;
font-style: normal;
font-weight: 500;
Expand All @@ -255,10 +236,8 @@
</div>
<div
style="
width: 136px;
color: #272a51;
font-size: 12px;
font-family: Roboto;
font-weight: 500;
word-wrap: break-word;
"
Expand All @@ -267,13 +246,11 @@
</div>
<div
style="
width: 136px;
color: #86868b;
font-family: Roboto;
font-size: 10px;
font-style: normal;
font-weight: 400;
line-height: 120%; /* 12px */
line-height: 120%;
"
>
Credere, empresa que ayuda a acceder a productos financieros,
Expand All @@ -287,8 +264,6 @@
<img
src="https://cdn.credere.open-contracting.org/news2.png"
style="
width: 132px;
height: 136px;
flex-shrink: 0;
border-radius: 4px;
"
Expand Down

0 comments on commit 6f4c365

Please sign in to comment.