Skip to content

Commit

Permalink
Merge branch '17.0-develop' of https://github.com/OpenG2P/openg2p-pro…
Browse files Browse the repository at this point in the history
…gram into 17.0-develop
  • Loading branch information
dibik96 committed Jun 11, 2024
2 parents cb2cde2 + bbb3670 commit 747de70
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 20 deletions.
7 changes: 3 additions & 4 deletions g2p_entitlement_differential/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@

/*
:Author: David Goodger ([email protected])
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Copyright: This stylesheet has been placed in the public domain.

Default cascading style sheet for the HTML output of Docutils.
Despite the name, some widely supported CSS2 features are used.

See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
Expand Down Expand Up @@ -275,7 +274,7 @@
margin-left: 2em ;
margin-right: 2em }

pre.code .ln { color: gray; } /* line numbers */
pre.code .ln { color: grey; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
Expand All @@ -301,7 +300,7 @@
span.pre {
white-space: pre }

span.problematic, pre.problematic {
span.problematic {
color: red }

span.section-subtitle {
Expand Down
7 changes: 3 additions & 4 deletions g2p_entitlement_voucher/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@

/*
:Author: David Goodger ([email protected])
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Copyright: This stylesheet has been placed in the public domain.

Default cascading style sheet for the HTML output of Docutils.
Despite the name, some widely supported CSS2 features are used.

See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
Expand Down Expand Up @@ -275,7 +274,7 @@
margin-left: 2em ;
margin-right: 2em }

pre.code .ln { color: gray; } /* line numbers */
pre.code .ln { color: grey; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
Expand All @@ -301,7 +300,7 @@
span.pre {
white-space: pre }

span.problematic, pre.problematic {
span.problematic {
color: red }

span.section-subtitle {
Expand Down
7 changes: 3 additions & 4 deletions g2p_payment_files/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@

/*
:Author: David Goodger ([email protected])
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Copyright: This stylesheet has been placed in the public domain.

Default cascading style sheet for the HTML output of Docutils.
Despite the name, some widely supported CSS2 features are used.

See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
Expand Down Expand Up @@ -275,7 +274,7 @@
margin-left: 2em ;
margin-right: 2em }

pre.code .ln { color: gray; } /* line numbers */
pre.code .ln { color: grey; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
Expand All @@ -301,7 +300,7 @@
span.pre {
white-space: pre }

span.problematic, pre.problematic {
span.problematic {
color: red }

span.section-subtitle {
Expand Down
5 changes: 0 additions & 5 deletions g2p_program_documents/i18n/g2p_program_documents.pot
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: g2p_program_documents
#: model:ir.model.fields,field_description:g2p_program_documents.field_storage_file__attachment_id
msgid "Attachment"
msgstr ""

#. module: g2p_program_documents
#: model:ir.model,name:g2p_program_documents.model_g2p_program_entitlement_manager_default
msgid "Default Entitlement Manager"
Expand Down
18 changes: 15 additions & 3 deletions g2p_program_registrant_info/static/src/js/g2p_additional_info.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,15 @@ export class G2PAdditionalInfoWidget extends TextField {
const val = this.props.record.data.program_registrant_info;

if (val) {
if ((!(val.charAt(0) === "{") && !(val.charAt(val.length - 1) === "}")) || !val) {
if (typeof val === "string") {
if (!(val.charAt(0) === "{" && val.charAt(val.length - 1) === "}")) {
this.state.noValue = true;
} else {
this.state.noValue = false;
}
} else if (typeof val === "object") {
this.state.noValue = false;
} else {
this.state.noValue = true;
}
} else {
Expand Down Expand Up @@ -77,7 +85,11 @@ export class G2PAdditionalInfoWidget extends TextField {
}

flattenJson(object) {
const jsonObject = JSON.parse(object);
// Const jsonObject = JSON.parse(object);
let jsonObject = object;
if (typeof object === "string") {
jsonObject = JSON.parse(object);
}
for (const key in jsonObject) {
if (!jsonObject[key]) continue;
if (
Expand All @@ -97,7 +109,7 @@ export class G2PAdditionalInfoWidget extends TextField {
}
jsonObject[key] = markup(documentFiles);
} else if (typeof jsonObject[key] === "object") {
jsonObject[key] = JSON.stringify(jsonObject[key]);
jsonObject[key] = this.flattenJson(jsonObject[key]);
}
}
return jsonObject;
Expand Down
3 changes: 3 additions & 0 deletions g2p_programs/views/registrant_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Part of OpenG2P. See LICENSE file for full copyright and licensing details.
<field name="name" />
<field name="ern" />
<field name="code" />
<field name="program_id" />
<field name="cycle_id" />
<field name="valid_from" />
<field name="valid_until" />
Expand Down Expand Up @@ -121,7 +122,9 @@ Part of OpenG2P. See LICENSE file for full copyright and licensing details.
class="btn-success"
/>
<field name="name" />
<field name="ern" />
<field name="code" />
<field name="program_id" />
<field name="cycle_id" />
<field name="valid_from" />
<field name="valid_until" />
Expand Down

0 comments on commit 747de70

Please sign in to comment.