Skip to content

Commit

Permalink
Merge pull request #1430 from younginnovations/1409-limit-document-li…
Browse files Browse the repository at this point in the history
…nk-category-codelists-for-organisation-vs-activity-data

Review: 1409-limit-document-link-category-codelists-for-organisation-vs-activity-data
  • Loading branch information
Sanilblank authored Apr 16, 2024
2 parents ea14730 + b66a99d commit 4c5ccb0
Show file tree
Hide file tree
Showing 15 changed files with 248,397 additions and 167 deletions.
1 change: 1 addition & 0 deletions app/Console/Commands/SetAppDataJsonCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ public function handle(): void
'Organization' => [
'Country.json',
'Currency.json',
'DocumentCategory.json',
'Language.json',
'OrganisationElements.json',
'OrganisationElementsGroup.json',
Expand Down
191,065 changes: 191,064 additions & 1 deletion app/Exports/XlsExportTemplate/activity_options.json

Large diffs are not rendered by default.

24,498 changes: 24,497 additions & 1 deletion app/Exports/XlsExportTemplate/indicator_options.json

Large diffs are not rendered by default.

11,434 changes: 11,433 additions & 1 deletion app/Exports/XlsExportTemplate/period_options.json

Large diffs are not rendered by default.

21,232 changes: 21,231 additions & 1 deletion app/Exports/XlsExportTemplate/result_options.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public function getWarningForDocumentCategory($formFields, $formIndex): array
$rules[sprintf('%s.category', $formIndex)] = 'unique_category';

foreach ($formFields as $documentCategoryIndex => $documentCategory) {
$rules[sprintf('%s.category.%s.code', $formIndex, $documentCategoryIndex)] = sprintf('nullable|in:%s', implode(',', array_keys(getCodeList('DocumentCategory', 'Activity'))));
$rules[sprintf('%s.category.%s.code', $formIndex, $documentCategoryIndex)] = sprintf('nullable|in:%s', implode(',', array_keys(getCodeList('DocumentCategory', 'Organization'))));
}

return $rules;
Expand Down
2 changes: 1 addition & 1 deletion app/IATI/Data/organizationElementJsonSchema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1449,7 +1449,7 @@
"label": "code",
"type": "select",
"multiSelect": false,
"choices": "Activity/DocumentCategory.json",
"choices": "Organization/DocumentCategory.json",
"placeholder": "Select code",
"required": true,
"criteria": "mandatory",
Expand Down
2 changes: 1 addition & 1 deletion app/IATI/Services/Organization/OrganizationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public function getOrganizationTypes(): array
return [
'budgetType' => getCodeList('BudgetStatus', 'Activity', false),
'languages' => getCodeList('Language', 'Organization', false),
'documentCategory' => getCodeList('DocumentCategory', 'Activity', false),
'documentCategory' => getCodeList('DocumentCategory', 'Organization', false),
'organizationType' => getCodeList('OrganizationType', 'Organization', false),
'country' => getCodeList('Country', 'Organization', false),
'regionVocabulary' => getCodeList('RegionVocabulary', 'Activity', false),
Expand Down
144 changes: 0 additions & 144 deletions public/AppData/Data/Activity/DocumentCategory.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,150 +99,6 @@
"language": "en",
"category-description": "The document is relevant to a specific activity",
"category-name": "Activity Level"
},
{
"category": "B",
"code": "B01",
"name": "Annual report",
"language": "en",
"category-description": "The document is relevant to the organisation as a whole",
"category-name": "Organisation Level"
},
{
"category": "B",
"code": "B02",
"name": "Institutional Strategy paper",
"language": "en",
"category-description": "The document is relevant to the organisation as a whole",
"category-name": "Organisation Level"
},
{
"category": "B",
"code": "B03",
"name": "Country strategy paper",
"language": "en",
"category-description": "The document is relevant to the organisation as a whole",
"category-name": "Organisation Level"
},
{
"category": "B",
"code": "B04",
"name": "Aid Allocation Policy",
"language": "en",
"category-description": "The document is relevant to the organisation as a whole",
"category-name": "Organisation Level"
},
{
"category": "B",
"code": "B05",
"name": "Procurement Policy and Procedure",
"language": "en",
"category-description": "The document is relevant to the organisation as a whole",
"category-name": "Organisation Level"
},
{
"category": "B",
"code": "B06",
"name": "Institutional Audit Report",
"language": "en",
"category-description": "The document is relevant to the organisation as a whole",
"category-name": "Organisation Level"
},
{
"category": "B",
"code": "B07",
"name": "Country Audit Report",
"language": "en",
"category-description": "The document is relevant to the organisation as a whole",
"category-name": "Organisation Level"
},
{
"category": "B",
"code": "B08",
"name": "Exclusions Policy",
"language": "en",
"category-description": "The document is relevant to the organisation as a whole",
"category-name": "Organisation Level"
},
{
"category": "B",
"code": "B09",
"name": "Institutional Evaluation Report",
"language": "en",
"category-description": "The document is relevant to the organisation as a whole",
"category-name": "Organisation Level"
},
{
"category": "B",
"code": "B10",
"name": "Country Evaluation Report",
"language": "en",
"category-description": "The document is relevant to the organisation as a whole",
"category-name": "Organisation Level"
},
{
"category": "B",
"code": "B11",
"name": "Sector strategy",
"language": "en",
"category-description": "The document is relevant to the organisation as a whole",
"category-name": "Organisation Level"
},
{
"category": "B",
"code": "B12",
"name": "Thematic strategy",
"language": "en",
"category-description": "The document is relevant to the organisation as a whole",
"category-name": "Organisation Level"
},
{
"category": "B",
"code": "B13",
"name": "Country-level Memorandum of Understanding",
"language": "en",
"category-description": "The document is relevant to the organisation as a whole",
"category-name": "Organisation Level"
},
{
"category": "B",
"code": "B14",
"name": "Evaluations policy",
"language": "en",
"category-description": "The document is relevant to the organisation as a whole",
"category-name": "Organisation Level"
},
{
"category": "B",
"code": "B15",
"name": "General Terms and Conditions",
"language": "en",
"category-description": "The document is relevant to the organisation as a whole",
"category-name": "Organisation Level"
},
{
"category": "B",
"code": "B16",
"name": "Organisation web page",
"language": "en",
"category-description": "The document is relevant to the organisation as a whole",
"category-name": "Organisation Level"
},
{
"category": "B",
"code": "B17",
"name": "Country/Region web page",
"language": "en",
"category-description": "The document is relevant to the organisation as a whole",
"category-name": "Organisation Level"
},
{
"category": "B",
"code": "B18",
"name": "Sector web page",
"language": "en",
"category-description": "The document is relevant to the organisation as a whole",
"category-name": "Organisation Level"
}
]
}
152 changes: 152 additions & 0 deletions public/AppData/Data/Organization/DocumentCategory.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
{
"date-last-modified": "2017-07-03T16:29:56.558027+00:00",
"version": "",
"name": "DocumentCategory",
"xml:lang": "en",
"DocumentCategory": [
{
"category": "B",
"code": "B01",
"name": "Annual report",
"language": "en",
"category-description": "The document is relevant to the organisation as a whole",
"category-name": "Organisation Level"
},
{
"category": "B",
"code": "B02",
"name": "Institutional Strategy paper",
"language": "en",
"category-description": "The document is relevant to the organisation as a whole",
"category-name": "Organisation Level"
},
{
"category": "B",
"code": "B03",
"name": "Country strategy paper",
"language": "en",
"category-description": "The document is relevant to the organisation as a whole",
"category-name": "Organisation Level"
},
{
"category": "B",
"code": "B04",
"name": "Aid Allocation Policy",
"language": "en",
"category-description": "The document is relevant to the organisation as a whole",
"category-name": "Organisation Level"
},
{
"category": "B",
"code": "B05",
"name": "Procurement Policy and Procedure",
"language": "en",
"category-description": "The document is relevant to the organisation as a whole",
"category-name": "Organisation Level"
},
{
"category": "B",
"code": "B06",
"name": "Institutional Audit Report",
"language": "en",
"category-description": "The document is relevant to the organisation as a whole",
"category-name": "Organisation Level"
},
{
"category": "B",
"code": "B07",
"name": "Country Audit Report",
"language": "en",
"category-description": "The document is relevant to the organisation as a whole",
"category-name": "Organisation Level"
},
{
"category": "B",
"code": "B08",
"name": "Exclusions Policy",
"language": "en",
"category-description": "The document is relevant to the organisation as a whole",
"category-name": "Organisation Level"
},
{
"category": "B",
"code": "B09",
"name": "Institutional Evaluation Report",
"language": "en",
"category-description": "The document is relevant to the organisation as a whole",
"category-name": "Organisation Level"
},
{
"category": "B",
"code": "B10",
"name": "Country Evaluation Report",
"language": "en",
"category-description": "The document is relevant to the organisation as a whole",
"category-name": "Organisation Level"
},
{
"category": "B",
"code": "B11",
"name": "Sector strategy",
"language": "en",
"category-description": "The document is relevant to the organisation as a whole",
"category-name": "Organisation Level"
},
{
"category": "B",
"code": "B12",
"name": "Thematic strategy",
"language": "en",
"category-description": "The document is relevant to the organisation as a whole",
"category-name": "Organisation Level"
},
{
"category": "B",
"code": "B13",
"name": "Country-level Memorandum of Understanding",
"language": "en",
"category-description": "The document is relevant to the organisation as a whole",
"category-name": "Organisation Level"
},
{
"category": "B",
"code": "B14",
"name": "Evaluations policy",
"language": "en",
"category-description": "The document is relevant to the organisation as a whole",
"category-name": "Organisation Level"
},
{
"category": "B",
"code": "B15",
"name": "General Terms and Conditions",
"language": "en",
"category-description": "The document is relevant to the organisation as a whole",
"category-name": "Organisation Level"
},
{
"category": "B",
"code": "B16",
"name": "Organisation web page",
"language": "en",
"category-description": "The document is relevant to the organisation as a whole",
"category-name": "Organisation Level"
},
{
"category": "B",
"code": "B17",
"name": "Country/Region web page",
"language": "en",
"category-description": "The document is relevant to the organisation as a whole",
"category-name": "Organisation Level"
},
{
"category": "B",
"code": "B18",
"name": "Sector web page",
"language": "en",
"category-description": "The document is relevant to the organisation as a whole",
"category-name": "Organisation Level"
}
]
}
Binary file modified public/files/Templates/ActivityXLS.xlsx
Binary file not shown.
Binary file modified public/files/Templates/IndicatorXLS.xlsx
Binary file not shown.
Binary file modified public/files/Templates/PeriodXLS.xlsx
Binary file not shown.
Binary file modified public/files/Templates/ResultXLS.xlsx
Binary file not shown.
32 changes: 16 additions & 16 deletions resources/assets/sass/component/_input.scss
Original file line number Diff line number Diff line change
Expand Up @@ -256,41 +256,41 @@ label {
}

select.select2.default-value-indicator
+ .select2
.selection
.select2-selection:not(:focus) {
+ .select2
.selection
.select2-selection:not(:focus) {
border: 2px solid #3f9a7c;
background-color: #3f9a7c15;
}

select.select2.default-value-indicator
+ .select2
.selection
.select2-selection:not(:focus) {
+ .select2
.selection
.select2-selection:not(:focus) {
border: 2px solid #3f9a7c;
background-color: #3f9a7c15;
}

select.select2.default-value-indicator
+ .select2
.selection
.select2-selection
.select2-selection__placeholder {
+ .select2
.selection
.select2-selection
.select2-selection__placeholder {
color: var(--bluecoral-50);
}

select.select2.default-value-indicator
+ .select2.select2-container--open
.selection
.select2-selection {
+ .select2.select2-container--open
.selection
.select2-selection {
border: 1px solid #a6b5ba;
background-color: transparent;
}

select.select2.default-value-indicator
+ .select2
.selection
.select2-selection.select2-selection--clearable {
+ .select2
.selection
.select2-selection.select2-selection--clearable {
border: 1px solid #a6b5ba;
background-color: transparent;
}
Expand Down

0 comments on commit 4c5ccb0

Please sign in to comment.