// Do not allow saving the currently selected worker configuration if said configuration is archived
!this.selectedConfiguration?.archived
!this.selectedConfiguration?.archived&&
// Do not allow saving while the configuration creation form is active
!this.configCreate
},
canToggleArchive (){
// This cannot check that the user has enough rights on the worker or the repository, because the API does not provide that anywhere.
...
...
@@ -177,7 +179,9 @@ export default {
}
},
saveButtonTitle (){
if (this.canSave)return'Select this configuration'
if (this.canSave&&this.selectedConfigurationId)return'Select this configuration.'
if (!this.selectedConfigurationId&&this.configurationId)return`Remove configuration ${this.workerConfigurations[this.workerId][this.configurationId].name}.`
if (this.configCreate)return'Create the new configuration first, or select an existing configuration to use.'
if (this.loading)return'Loading…'
if (this.selectedConfiguration?.archived)return'An archived configuration cannot be selected in a process.'