Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'Aggregating' state #2315

Merged
merged 1 commit into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ESSArch_Core/frontend/static/frontend/lang/en/ip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export default ($translateProvider: ng.translate.ITranslateProvider) => {
ACCESS_WORKAREA: 'Workspace access',
ACCESS_WORKSPACE: 'Workspace access',
ADVANCED_FILTERS_ON: 'Advanced filter active',
AGGREGATING: 'Aggregating',
ARCHIVAL_INSTITUTION: 'Archival Institution',
ARCHIVAL_INSTITUTION_DESC: 'Archival institution',
ARCHIVIST_ORGANIZATION: 'Archivist organization',
Expand Down
1 change: 1 addition & 0 deletions ESSArch_Core/frontend/static/frontend/lang/sv/ip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export default ($translateProvider: ng.translate.ITranslateProvider) => {
ACCESS_WORKAREA: 'Arbetsyta åtkomst',
ACCESS_WORKSPACE: 'Arbetsyta åtkomst',
ADVANCED_FILTERS_ON: 'Avancerad filtrering aktiv',
AGGREGATING: 'Aggregerar',
ARCHIVAL_INSTITUTION: 'Arkivinstitution',
ARCHIVAL_INSTITUTION_DESC: 'Arkivinstitution',
ARCHIVIST_ORGANIZATION: 'Arkivorganisation',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export default class IpApprovalCtrl {
constructor($scope, $controller, $rootScope, $translate, ContextMenuBase) {
const vm = this;
const ipSortString = ['Received', 'Preserving'];
const ipSortString = ['Aggregating', 'Received', 'Preserving'];
$controller('BaseCtrl', {$scope: $scope, vm: vm, ipSortString: ipSortString, params: {}});

//Request form data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,26 @@ <h4 ng-if="vm.record.type">{{vm.record.type.name}}</h4>
</button>
</div>
</div>
<div class="detail-field pt-base" ng-if="vm.record.information_package">
<div
class="detail-field pt-base"
ng-if="vm.record.information_package && vm.record.information_package.state == 'Preserved'"
>
<label> {{'INFORMATION_PACKAGE' | translate}}:&nbsp; </label>
<a ui-sref="home.access.accessIp({id: vm.record.information_package.id})">
{{vm.record.information_package.label ? vm.record.information_package.label :
vm.record.information_package.object_identifier_value}}
</a>
</div>
<div
class="detail-field pt-base"
ng-if="vm.record.information_package && ['Aggregating', 'Received', 'Preserving'].includes(vm.record.information_package.state)"
>
<label> {{'INFORMATION_PACKAGE' | translate}}:&nbsp; </label>
<a ui-sref="home.ingest.ipApproval({id: vm.record.information_package.id})">
{{vm.record.information_package.label ? vm.record.information_package.label :
vm.record.information_package.object_identifier_value}}
</a>
</div>
<div ng-if="vm.record.appraisal_job">
<result-field
label="{{'ARCHIVE_MAINTENANCE.APPRAISAL_JOB' | translate}}"
Expand Down
2 changes: 1 addition & 1 deletion ESSArch_Core/tags/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ class Meta(LocationSerializer.Meta):
class TagVersionInformationPackageSerializer(serializers.ModelSerializer):
class Meta:
model = InformationPackage
fields = ('id', 'object_identifier_value', 'label',)
fields = ('id', 'object_identifier_value', 'label', 'state')


class TagVersionNestedSerializer(serializers.ModelSerializer):
Expand Down
3 changes: 2 additions & 1 deletion ESSArch_Core/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,8 @@ def UpdateIPStatus(self, status, prev=None):
t.save()
ip.state = status
ip.save()
ip_state_dict = {'Creating': gettext('Creating'),
ip_state_dict = {'Aggregating': gettext('Aggregating'),
'Creating': gettext('Creating'),
'Created': gettext('Created'),
'Transforming': gettext('Transforming'),
'Transformed': gettext('Transformed'),
Expand Down
Loading