Skip to content

Commit

Permalink
Release/v3.6.0 (#189)
Browse files Browse the repository at this point in the history
* Revert adding azure-monitor-opentelemetry==1.0.0b13 to resolve No module named azure.monitor issue

* updated empty value type (#141)

* Feature/160752/stages phases (#142)

* add new column - feature key phases_stages

* create a mapping between phases and stages

* updated styles to work on all browsers (#143)

* feat/Add azure-monitor-opentelemetry to requirements

* feat/Add configure_azure_monitor to settings.py

* chore/Remove configure_azure_monitor and implement older approach to identify compatibility

* chore/Remove opentelemetry from settings.py

* chore/Code cleanup

* Dev 157615 160826 162116 163295 163762 164563 (#144)

* Adding env.var applicationsightsConnectionSrting for BE

* Feature/163742/enable ootb monitoring capabilities (#135)

* feat/Add azure-monitor-opentelemetry to requirements

* feat/Add opentelemetry to application settings

* chore/Change env from dev to tst

* chore/Rollback env from tst to dev

* Feature/157615/allow retrieval of all initiatives published and unpublished from api revision (#136)

* feat/Add published query parameter to the get_queryset

- if we do not provide an additional query parameter, then the default behavior will remain the same and the endpoint will return only the published ones.
- If we provide the additional query parameter published=0, then the endpoint will return only the unpublished ones.
- If we provide the additional query parameter published=1, then the endpoint will return both the unpublished and published ones.

* feat/Change published-unpublished to match new criteria

- Change get_queryset method to its original status, but removing the unpublished.
- Add logic to support published/unpublished parameters.

* chore/Refactor publised-unpublished cases in a more pythonic way

* Feature/163295/add swimlanes at phase board (#137)

* table with new story features

* code refactoring

* removed overflow-x from el-select-tags (#138)

* hide square logo and change menu height (#139)

* Feature/160826/group innovation portfolio solution details section (#140)

* solutions edit/create new Innovation Portfolios group, portfolios table key bug fix

* updated solution view with new Innovation portfolios card section

* Revert adding azure-monitor-opentelemetry==1.0.0b13 to resolve No module named azure.monitor issue

* updated empty value type (#141)

* Feature/160752/stages phases (#142)

* add new column - feature key phases_stages

* create a mapping between phases and stages

* updated styles to work on all browsers (#143)

* feat/Add azure-monitor-opentelemetry to requirements

* feat/Add configure_azure_monitor to settings.py

* chore/Remove configure_azure_monitor and implement older approach to identify compatibility

* chore/Remove opentelemetry from settings.py

* chore/Code cleanup

* chore/Rollback phases stages

- Rollback dbd9139 add new column - feature key phases_stages
- Rollback d665c3f create a mapping between phases and stages

Remove additions for item 160752 to move selected items to tst environment

---------

Co-authored-by: Diogenis Petropoulos <diogenis,petropoulos@sword-group.com>
Co-authored-by: ladeniva2 <122989825+ladeniva2@users.noreply.github.com>
Co-authored-by: Alexa-Laf <131444412+Alexa-Laf@users.noreply.github.com>

* Feature/163742/enable ootb monitoring capabilities (#146)

* feat/Add azure-monitor-opentelemetry to requirements

* feat/Add opentelemetry to application settings

* chore/Change env from dev to tst

* chore/Rollback env from tst to dev

* feat/Add internal_ips to fetch the pod internal ip

* chore/Rename azure folder to azure_services

* chore/Remove reduntant import from settings

* chore/Change configure_azure_monitor signature to include named argument

* feat/Change userprofile list to autocomplete field (#145)

- Add list with autocomplete search bar in the edit technology platform admin page.
- Add name as the search bar option.

* rename stage_name and phase_name to stage_label and phase_label (#147)

* feature/161336/initiatives-by-stage-board  added stage table and table switch (#148)

* feat/Switch nextLink to deltaLink mechanism

* feat/Add get and save last delta link mechanism

* chore/Refactor delta link generation and store method

- Add new DeltaLink model to let Django handle the table creation/update mechanism.
- Change get_last_delta_link and save_delta_link to follow the same pattern.

* Feature/refactor aad user fetch and update mechanism (#149)

* feat/Switch nextLink to deltaLink mechanism

* feat/Add get and save last delta link mechanism

* chore/Refactor delta link generation and store method

- Add new DeltaLink model to let Django handle the table creation/update mechanism.
- Change get_last_delta_link and save_delta_link to follow the same pattern.

* chore/Add migration file for deltalink

* chore/Add log statements to debug deltalink response

* chore/Remove redundant log statements

* chore/Refactor deltalinks and logger

- Refactor delta links to accept more than one page.
- Change azure logger from info to warning level to unclutter the django logs

* Revert commits 2ed8b75 to 46a5dcf

* Bugfix/163402/dashboarding system error (#150)

* problem_statements and portfolios are now lists containing only unique ids

* created a django management command to update the problematic solution logs (may and june 2023)

* fixed error in comment

* custom management command will now be run on deployment

* updated to fix problematic entries in all solution log rows

* Merge dev to tst (#152)

* Adding env.var applicationsightsConnectionSrting for BE

* Feature/163742/enable ootb monitoring capabilities (#135)

* feat/Add azure-monitor-opentelemetry to requirements

* feat/Add opentelemetry to application settings

* chore/Change env from dev to tst

* chore/Rollback env from tst to dev

* Feature/157615/allow retrieval of all initiatives published and unpublished from api revision (#136)

* feat/Add published query parameter to the get_queryset

- if we do not provide an additional query parameter, then the default behavior will remain the same and the endpoint will return only the published ones.
- If we provide the additional query parameter published=0, then the endpoint will return only the unpublished ones.
- If we provide the additional query parameter published=1, then the endpoint will return both the unpublished and published ones.

* feat/Change published-unpublished to match new criteria

- Change get_queryset method to its original status, but removing the unpublished.
- Add logic to support published/unpublished parameters.

* chore/Refactor publised-unpublished cases in a more pythonic way

* Feature/163295/add swimlanes at phase board (#137)

* table with new story features

* code refactoring

* removed overflow-x from el-select-tags (#138)

* hide square logo and change menu height (#139)

* Feature/160826/group innovation portfolio solution details section (#140)

* solutions edit/create new Innovation Portfolios group, portfolios table key bug fix

* updated solution view with new Innovation portfolios card section

* Revert adding azure-monitor-opentelemetry==1.0.0b13 to resolve No module named azure.monitor issue

* updated empty value type (#141)

* Feature/160752/stages phases (#142)

* add new column - feature key phases_stages

* create a mapping between phases and stages

* updated styles to work on all browsers (#143)

* feat/Add azure-monitor-opentelemetry to requirements

* feat/Add configure_azure_monitor to settings.py

* chore/Remove configure_azure_monitor and implement older approach to identify compatibility

* chore/Remove opentelemetry from settings.py

* chore/Code cleanup

* Feature/163742/enable ootb monitoring capabilities (#146)

* feat/Add azure-monitor-opentelemetry to requirements

* feat/Add opentelemetry to application settings

* chore/Change env from dev to tst

* chore/Rollback env from tst to dev

* feat/Add internal_ips to fetch the pod internal ip

* chore/Rename azure folder to azure_services

* chore/Remove reduntant import from settings

* chore/Change configure_azure_monitor signature to include named argument

* feat/Change userprofile list to autocomplete field (#145)

- Add list with autocomplete search bar in the edit technology platform admin page.
- Add name as the search bar option.

* rename stage_name and phase_name to stage_label and phase_label (#147)

* feature/161336/initiatives-by-stage-board  added stage table and table switch (#148)

* feat/Switch nextLink to deltaLink mechanism

* feat/Add get and save last delta link mechanism

* chore/Refactor delta link generation and store method

- Add new DeltaLink model to let Django handle the table creation/update mechanism.
- Change get_last_delta_link and save_delta_link to follow the same pattern.

* Feature/refactor aad user fetch and update mechanism (#149)

* feat/Switch nextLink to deltaLink mechanism

* feat/Add get and save last delta link mechanism

* chore/Refactor delta link generation and store method

- Add new DeltaLink model to let Django handle the table creation/update mechanism.
- Change get_last_delta_link and save_delta_link to follow the same pattern.

* chore/Add migration file for deltalink

* chore/Add log statements to debug deltalink response

* chore/Remove redundant log statements

* chore/Refactor deltalinks and logger

- Refactor delta links to accept more than one page.
- Change azure logger from info to warning level to unclutter the django logs

* Revert commits 2ed8b75 to 46a5dcf

---------

Co-authored-by: Diogenis Petropoulos <diogenis,petropoulos@sword-group.com>
Co-authored-by: ladeniva2 <122989825+ladeniva2@users.noreply.github.com>
Co-authored-by: Alexa-Laf <131444412+Alexa-Laf@users.noreply.github.com>

* feat/Add delta to graph url

* chore/Remove redundant logging statements

* Rollback to pre-deltaLink mechanism

* chore/Remove redundant files

* Merge dev to tst (#154)

* Adding env.var applicationsightsConnectionSrting for BE

* Feature/163742/enable ootb monitoring capabilities (#135)

* feat/Add azure-monitor-opentelemetry to requirements

* feat/Add opentelemetry to application settings

* chore/Change env from dev to tst

* chore/Rollback env from tst to dev

* Feature/157615/allow retrieval of all initiatives published and unpublished from api revision (#136)

* feat/Add published query parameter to the get_queryset

- if we do not provide an additional query parameter, then the default behavior will remain the same and the endpoint will return only the published ones.
- If we provide the additional query parameter published=0, then the endpoint will return only the unpublished ones.
- If we provide the additional query parameter published=1, then the endpoint will return both the unpublished and published ones.

* feat/Change published-unpublished to match new criteria

- Change get_queryset method to its original status, but removing the unpublished.
- Add logic to support published/unpublished parameters.

* chore/Refactor publised-unpublished cases in a more pythonic way

* Feature/163295/add swimlanes at phase board (#137)

* table with new story features

* code refactoring

* removed overflow-x from el-select-tags (#138)

* hide square logo and change menu height (#139)

* Feature/160826/group innovation portfolio solution details section (#140)

* solutions edit/create new Innovation Portfolios group, portfolios table key bug fix

* updated solution view with new Innovation portfolios card section

* Revert adding azure-monitor-opentelemetry==1.0.0b13 to resolve No module named azure.monitor issue

* updated empty value type (#141)

* Feature/160752/stages phases (#142)

* add new column - feature key phases_stages

* create a mapping between phases and stages

* updated styles to work on all browsers (#143)

* feat/Add azure-monitor-opentelemetry to requirements

* feat/Add configure_azure_monitor to settings.py

* chore/Remove configure_azure_monitor and implement older approach to identify compatibility

* chore/Remove opentelemetry from settings.py

* chore/Code cleanup

* Feature/163742/enable ootb monitoring capabilities (#146)

* feat/Add azure-monitor-opentelemetry to requirements

* feat/Add opentelemetry to application settings

* chore/Change env from dev to tst

* chore/Rollback env from tst to dev

* feat/Add internal_ips to fetch the pod internal ip

* chore/Rename azure folder to azure_services

* chore/Remove reduntant import from settings

* chore/Change configure_azure_monitor signature to include named argument

* feat/Change userprofile list to autocomplete field (#145)

- Add list with autocomplete search bar in the edit technology platform admin page.
- Add name as the search bar option.

* rename stage_name and phase_name to stage_label and phase_label (#147)

* feature/161336/initiatives-by-stage-board  added stage table and table switch (#148)

* feat/Switch nextLink to deltaLink mechanism

* feat/Add get and save last delta link mechanism

* chore/Refactor delta link generation and store method

- Add new DeltaLink model to let Django handle the table creation/update mechanism.
- Change get_last_delta_link and save_delta_link to follow the same pattern.

* Feature/refactor aad user fetch and update mechanism (#149)

* feat/Switch nextLink to deltaLink mechanism

* feat/Add get and save last delta link mechanism

* chore/Refactor delta link generation and store method

- Add new DeltaLink model to let Django handle the table creation/update mechanism.
- Change get_last_delta_link and save_delta_link to follow the same pattern.

* chore/Add migration file for deltalink

* chore/Add log statements to debug deltalink response

* chore/Remove redundant log statements

* chore/Refactor deltalinks and logger

- Refactor delta links to accept more than one page.
- Change azure logger from info to warning level to unclutter the django logs

* Revert commits 2ed8b75 to 46a5dcf

* Bugfix/163402/dashboarding system error (#150)

* problem_statements and portfolios are now lists containing only unique ids

* created a django management command to update the problematic solution logs (may and june 2023)

* fixed error in comment

* custom management command will now be run on deployment

* updated to fix problematic entries in all solution log rows

* feat/Add delta to graph url

* chore/Remove redundant logging statements

* Rollback to pre-deltaLink mechanism

* chore/Remove redundant files

---------

Co-authored-by: Diogenis Petropoulos <diogenis,petropoulos@sword-group.com>
Co-authored-by: ladeniva2 <122989825+ladeniva2@users.noreply.github.com>
Co-authored-by: Alexa-Laf <131444412+Alexa-Laf@users.noreply.github.com>
Co-authored-by: mgaliatsatou <122973661+mgaliatsatou@users.noreply.github.com>

* Performance optimization (#156)

* load users optimization

* performance improvements for inventory list page

* inventory load fix

* performance improvement by reordering api calls and asyncronicity

* removed sentry lib, removed unused unicef logo

* update node 12 to 14 in containers and fron 10 to 14 as compilation in babel

* lazy loading images

---------

Co-authored-by: ladeniva2 <122989825+ladeniva2@users.noreply.github.com>

* Merge dev to tst (#157)

* Revert adding azure-monitor-opentelemetry==1.0.0b13 to resolve No module named azure.monitor issue

* updated empty value type (#141)

* Feature/160752/stages phases (#142)

* add new column - feature key phases_stages

* create a mapping between phases and stages

* updated styles to work on all browsers (#143)

* feat/Add azure-monitor-opentelemetry to requirements

* feat/Add configure_azure_monitor to settings.py

* chore/Remove configure_azure_monitor and implement older approach to identify compatibility

* chore/Remove opentelemetry from settings.py

* chore/Code cleanup

* Feature/163742/enable ootb monitoring capabilities (#146)

* feat/Add azure-monitor-opentelemetry to requirements

* feat/Add opentelemetry to application settings

* chore/Change env from dev to tst

* chore/Rollback env from tst to dev

* feat/Add internal_ips to fetch the pod internal ip

* chore/Rename azure folder to azure_services

* chore/Remove reduntant import from settings

* chore/Change configure_azure_monitor signature to include named argument

* feat/Change userprofile list to autocomplete field (#145)

- Add list with autocomplete search bar in the edit technology platform admin page.
- Add name as the search bar option.

* rename stage_name and phase_name to stage_label and phase_label (#147)

* feature/161336/initiatives-by-stage-board  added stage table and table switch (#148)

* feat/Switch nextLink to deltaLink mechanism

* feat/Add get and save last delta link mechanism

* chore/Refactor delta link generation and store method

- Add new DeltaLink model to let Django handle the table creation/update mechanism.
- Change get_last_delta_link and save_delta_link to follow the same pattern.

* Feature/refactor aad user fetch and update mechanism (#149)

* feat/Switch nextLink to deltaLink mechanism

* feat/Add get and save last delta link mechanism

* chore/Refactor delta link generation and store method

- Add new DeltaLink model to let Django handle the table creation/update mechanism.
- Change get_last_delta_link and save_delta_link to follow the same pattern.

* chore/Add migration file for deltalink

* chore/Add log statements to debug deltalink response

* chore/Remove redundant log statements

* chore/Refactor deltalinks and logger

- Refactor delta links to accept more than one page.
- Change azure logger from info to warning level to unclutter the django logs

* Revert commits 2ed8b75 to 46a5dcf

* Bugfix/163402/dashboarding system error (#150)

* problem_statements and portfolios are now lists containing only unique ids

* created a django management command to update the problematic solution logs (may and june 2023)

* fixed error in comment

* custom management command will now be run on deployment

* updated to fix problematic entries in all solution log rows

* feat/Add delta to graph url

* chore/Remove redundant logging statements

* Rollback to pre-deltaLink mechanism

* chore/Remove redundant files

* Performance optimization (#156)

* load users optimization

* performance improvements for inventory list page

* inventory load fix

* performance improvement by reordering api calls and asyncronicity

* removed sentry lib, removed unused unicef logo

* update node 12 to 14 in containers and fron 10 to 14 as compilation in babel

* lazy loading images

---------

Co-authored-by: ladeniva2 <122989825+ladeniva2@users.noreply.github.com>

---------

Co-authored-by: ladeniva2 <122989825+ladeniva2@users.noreply.github.com>
Co-authored-by: Alexa-Laf <131444412+Alexa-Laf@users.noreply.github.com>
Co-authored-by: mgaliatsatou <122973661+mgaliatsatou@users.noreply.github.com>

* add autocomplete field managers (#159)

* add autocomplete field managers (#159) (#160)

* chore/Remove DeltaLink model

* Merge dev to tst (#163)

* add autocomplete field managers (#159)

* chore/Remove DeltaLink model

---------

Co-authored-by: Alexa-Laf <131444412+Alexa-Laf@users.noreply.github.com>

* Added country inventory link button on homepage (#164)

* added height select switch, made table height expandable (#165)

* add job title and section to export files (#162)

* Bugfix/163755/country link inventory (#166)

* added dynamic country id to link, added data-test id

* removed 's country ending as it may be not appropriate for some countries

* Feature/165200/select sectors appear phase stage board (#167)

* added selection dropdown for sectors

* dropdown count fix

* replace section name to department (#168)

* link changed from button to link (#169)

* changed project data fallback for projectBar and breadcrumps (#170)

* id correction (#171)

* users list timing loading fix and data refresh for initiatives (#172)

* users list timing loading fix and data refresh for initiatives

* added data reset on loadProject if no data exist

* updated button ui and added text to link (#177)

* Merge dev to tst (#179)

* add autocomplete field managers (#159)

* chore/Remove DeltaLink model

* Added country inventory link button on homepage (#164)

* added height select switch, made table height expandable (#165)

* add job title and section to export files (#162)

* Bugfix/163755/country link inventory (#166)

* added dynamic country id to link, added data-test id

* removed 's country ending as it may be not appropriate for some countries

* Feature/165200/select sectors appear phase stage board (#167)

* added selection dropdown for sectors

* dropdown count fix

* replace section name to department (#168)

* link changed from button to link (#169)

* changed project data fallback for projectBar and breadcrumps (#170)

* id correction (#171)

* users list timing loading fix and data refresh for initiatives (#172)

* users list timing loading fix and data refresh for initiatives

* added data reset on loadProject if no data exist

* updated button ui and added text to link (#177)

---------

Co-authored-by: Alexa-Laf <131444412+Alexa-Laf@users.noreply.github.com>
Co-authored-by: ladeniva2 <122989825+ladeniva2@users.noreply.github.com>

* UI changes

* update version to 3.6.0

---------

Co-authored-by: gkalomalos <georgios.kalomalos@sword-group.com>
Co-authored-by: Alexa-Laf <131444412+Alexa-Laf@users.noreply.github.com>
Co-authored-by: gkalomalos <123368636+gkalomalos@users.noreply.github.com>
Co-authored-by: Diogenis Petropoulos <diogenis,petropoulos@sword-group.com>
Co-authored-by: mgaliatsatou <122973661+mgaliatsatou@users.noreply.github.com>
  • Loading branch information
6 people authored Jul 25, 2023
1 parent 143f0fb commit af76a65
Show file tree
Hide file tree
Showing 11 changed files with 305 additions and 61 deletions.
2 changes: 1 addition & 1 deletion django/.env.dev
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ SIMPLE_FEEDBACK_SEND_TO='invent@unicef.org'
API_MAINTAINER=MLSWORDATHINVENT@sword-group.com
EMAIL_VALIDATOR_REGEX='(unicef.org|pulilab.com)$'
ENABLE_API_REGISTRATION=True
DEPLOY_VERSION="3.3.1"
DEPLOY_VERSION="3.6.0"
POSTGRES_USER=devinventusr@pgsql-10-reserved-invent-db-devstg
DATABASE_HOST=pgsql-10-reserved-invent-db-devstg.database.windows.net
DATABASE_NAME=inventdb_dev
2 changes: 1 addition & 1 deletion django/.env.local
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ SIMPLE_FEEDBACK_SEND_TO='invent@unicef.org'
API_MAINTAINER=MLSWORDATHINVENT@sword-group.com
EMAIL_VALIDATOR_REGEX='(unicef.org|pulilab.com)$'
ENABLE_API_REGISTRATION=True
DEPLOY_VERSION="3.3.1"
DEPLOY_VERSION="3.6.0"
POSTGRES_USER=postgres
DATABASE_HOST=postgres-postgresql
DATABASE_NAME=postgres
2 changes: 1 addition & 1 deletion django/.env.tst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ SIMPLE_FEEDBACK_SEND_TO='invent@unicef.org'
API_MAINTAINER=MLSWORDATHINVENT@sword-group.com
EMAIL_VALIDATOR_REGEX='(unicef.org|pulilab.com)$'
ENABLE_API_REGISTRATION=True
DEPLOY_VERSION="3.3.1"
DEPLOY_VERSION="3.6.0"
POSTGRES_USER=tstinventusr@pgsql-10-reserved-invent-db-devstg
DATABASE_HOST=pgsql-10-reserved-invent-db-devstg.database.windows.net
DATABASE_NAME=inventdb_tst
2 changes: 1 addition & 1 deletion django/.env.uat
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ SIMPLE_FEEDBACK_SEND_TO='invent@unicef.org'
API_MAINTAINER=MLSWORDATHINVENT@sword-group.com
EMAIL_VALIDATOR_REGEX='(unicef.org|pulilab.com)$'
ENABLE_API_REGISTRATION=True
DEPLOY_VERSION="3.3.1"
DEPLOY_VERSION="3.6.0"
POSTGRES_USER=uatinventusr@pgsql-10-reserved-invent-db-devstg
DATABASE_HOST=pgsql-10-reserved-invent-db-devstg.database.windows.net
DATABASE_NAME=inventdb_uat
28 changes: 21 additions & 7 deletions django/core/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ class UserResource(resources.ModelResource): # pragma: no cover
- Country
- Donor
- Language
- job title
- section (= department)
"""
# Stats
last_login = Field(column_name=_('Last login date'))
Expand All @@ -44,22 +46,26 @@ class UserResource(resources.ModelResource): # pragma: no cover
country = Field(column_name=_('Country'))
donor = Field(column_name=_('Donor'))
language = Field(column_name=_('Language'))
initiatives_where_team_member = Field(column_name=_('Initiatives where team member'))
initiatives_where_team_member = Field(
column_name=_('Initiatives where team member'))
initiatives_where_viewer = Field(column_name=_('Initiatives where viewer'))
initiatives_where_invent_focal_point = Field(column_name=_('Initiatives where INVENT focal point'))
initiatives_where_invent_focal_point = Field(
column_name=_('Initiatives where INVENT focal point'))
favorited_initiatives = Field(column_name=_('Favorited initiatives'))
job_title = Field(column_name=_('Job title'))
department = Field(column_name=_('Department'))

class Meta:
model = User
fields = ('id', 'name', 'email', 'account_type', 'organization', 'country', 'donor', 'groups', 'language',
'last_login', 'date_joined', 'is_active', 'is_staff', 'is_superuser', 'is_gpo',
'initiatives_where_team_member', 'initiatives_where_viewer',
'initiatives_where_invent_focal_point', 'favorited_initiatives')
'initiatives_where_invent_focal_point', 'favorited_initiatives', 'job_title', 'department')
export_order = ('id', 'name', 'email', 'account_type', 'organization', 'country', 'donor', 'groups',
'language', 'last_login', 'date_joined', 'is_active',
'is_staff', 'is_superuser', 'is_gpo',
'is_staff', 'is_superuser', 'is_gpo',
'initiatives_where_team_member', 'initiatives_where_viewer',
'initiatives_where_invent_focal_point', 'favorited_initiatives')
'initiatives_where_invent_focal_point', 'favorited_initiatives', 'job_title', 'department')

def dehydrate_favorited_initiatives(self, user: User):
favorite_count = Project.objects.filter(favorited_by=user.userprofile).count() \
Expand All @@ -68,7 +74,8 @@ def dehydrate_favorited_initiatives(self, user: User):
return favorite_count

def dehydrate_initiatives_where_invent_focal_point(self, user: User):
focal_point_counter = user.userprofile.manager_of.all().count() if hasattr(user, 'userprofile') else 0
focal_point_counter = user.userprofile.manager_of.all(
).count() if hasattr(user, 'userprofile') else 0
return focal_point_counter

def dehydrate_initiatives_where_viewer(self, user: User):
Expand All @@ -78,7 +85,8 @@ def dehydrate_initiatives_where_viewer(self, user: User):
return viewer_counter

def dehydrate_initiatives_where_team_member(self, user: User):
team_at_counter = Project.objects.filter(team=user.userprofile).count() if hasattr(user, 'userprofile') else 0
team_at_counter = Project.objects.filter(
team=user.userprofile).count() if hasattr(user, 'userprofile') else 0
return team_at_counter

def dehydrate_last_login(self, user: User):
Expand Down Expand Up @@ -121,3 +129,9 @@ def dehydrate_donor(self, user: User):

def dehydrate_language(self, user: User):
return user.userprofile.language if hasattr(user, 'userprofile') else 'None'

def dehydrate_job_title(self, user: User):
return user.userprofile.job_title if hasattr(user, 'userprofile') and user.userprofile.job_title else 'None'

def dehydrate_department(self, user: User):
return user.userprofile.department if hasattr(user, 'userprofile') and user.userprofile.department else 'None'
1 change: 0 additions & 1 deletion django/startup_actions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ django-admin makemessages -l fr
django-admin makemessages -l pt
python manage.py compilemessages
python manage.py migrate
python manage.py restore_modified_projects # TODO: remove from prd once this fix is deployed
gunicorn tiip.wsgi:application -w 2 -b :8000 --reload --timeout 120
3 changes: 3 additions & 0 deletions frontend/assets/style/variables.less
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,6 @@
@icon-tiip-health: '\e91f';
@icon-tiip-nutrition: '\e920';
@icon-tiip-education: '\e921';

/* Homepage */
@leftHomepageIndentation: 40px;
2 changes: 1 addition & 1 deletion frontend/components/BreadCrumb.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default {
'organisation-portfolio-innovation-solutions-id-edit': this.$gettext('Edit solution'),
'organisation-portfolio-innovation-solutions-create': this.$gettext('Create new solution'),
'organisation-portfolio-management': this.$gettext('Portfolio Manager'),
'organisation-initiatives': this.$gettext('My initiatives'),
'organisation-initiatives': this.$gettext('Initiatives'),
'organisation-portfolio-management-new': this.$gettext('New portfolio'),
'organisation-portfolio-management-id-edit': this.$gettext('Edit portfolio'),
'organisation-initiatives-create': this.$gettext('New Initiative'),
Expand Down
48 changes: 32 additions & 16 deletions frontend/components/landing/CountryFlagInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,29 @@
<div class="flag-info">
<el-col class="CountryHolder">
<el-row type="flex">
<el-col class="CountryHolder">
<div class="Separator" />
</el-col>
<el-col class="CountryHolder">
<img :src="countryFlag" alt="country flag" class="CountryFlag" loading="lazy" />
</el-col>
<el-col>
<div class="country-text">
<div class="CountryName">{{ landingData.name }}</div>
<div class="CountryName">
{{ landingData.name }}
<span><img :src="countryFlag" alt="country flag" class="CountryFlag" loading="lazy" /></span>
</div>
<p>
<translate>
Welcome to country view. This view is scoped to show all initiatives of the chosen country.
</translate>
</p>
<nuxt-link
data-test="country-inventory-link"
:to="
localePath({
name: 'organisation-inventory-list',
params: this.landingData.code,
query: { ...this.$route.query, country: this.landingData.id },
})
"
>
<translate>See this country's initiatives in the inventory</translate>
</nuxt-link>
</div>
</el-col>
</el-row>
Expand All @@ -41,40 +50,47 @@ export default {
}
</script>

<style lang="less">
<style lang="less" scoped>
@import '~assets/style/variables.less';
@import '~assets/style/mixins.less';
.flag-info {
height: 100px;
width: inherit;
margin: 12px;
padding: 8px 36px 8px 220px;
margin: 12px auto;
padding: 8px 36px 8px @leftHomepageIndentation;
display: flex;
align-items: start;
justify-content: start;
.CountryHolder {
display: flex;
align-items: center;
width: fit-content;
.CountryFlag {
height: 84px;
margin-right: 6px;
padding: 5px 0;
position: relative;
top: 2px;
height: 22px;
margin-left: 6px;
}
.country-text {
display: flex;
height: 100%;
flex-direction: column;
padding-left: 24px;
a {
color: @colorBrandPrimary;
line-height: 6px;
padding-bottom: 12px;
}
.CountryName {
margin-top: auto;
font-size: @fontSizeLarge;
font-weight: 700;
color: @colorTextPrimary;
line-height: 24px;
}
}
}
Expand Down
Loading

0 comments on commit af76a65

Please sign in to comment.