Skip to content

Commit

Permalink
Merge pull request #1777 from DSD-DBS/rename-t4c-instance
Browse files Browse the repository at this point in the history
feat: Allow renaming of T4C instances in the frontend
  • Loading branch information
MoritzWeber0 authored Sep 10, 2024
2 parents f6d0b49 + 09c11d3 commit 5828c47
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 7 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ import { T4CInstanceSettingsComponent } from '../t4c-instance-settings/t4c-insta
@Component({
selector: 'app-edit-t4c-instance',
templateUrl: './edit-t4c-instance.component.html',
styleUrls: ['./edit-t4c-instance.component.css'],
standalone: true,
imports: [
NgIf,
Expand Down Expand Up @@ -152,7 +151,6 @@ export class EditT4CInstanceComponent implements OnInit, OnDestroy {
enableEditing(): void {
this.editing = true;
this.form.enable();
this.form.controls.name.disable();

this.form.controls.password.patchValue('');
this.form.controls.password.removeValidators(Validators.required);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const AddInstance: Story = {
args: {},
};

export const ModifyExistingInstance: Story = {
export const ExistingInstance: Story = {
args: {
existing: true,
capellaVersions: [mockToolVersion],
Expand All @@ -42,3 +42,45 @@ export const ModifyExistingInstance: Story = {
}),
],
};

export const EditExistingInstance: Story = {
args: {
existing: true,
editing: true,
capellaVersions: [mockToolVersion],
},
decorators: [
moduleMetadata({
providers: [
{
provide: T4CInstanceWrapperService,
useFactory: () =>
new MockT4CInstanceWrapperService(mockT4CInstance, [
mockT4CInstance,
]),
},
],
}),
],
};

export const ArchivedInstance: Story = {
args: {
existing: true,
isArchived: true,
capellaVersions: [mockToolVersion],
},
decorators: [
moduleMetadata({
providers: [
{
provide: T4CInstanceWrapperService,
useFactory: () =>
new MockT4CInstanceWrapperService(mockT4CInstance, [
mockT4CInstance,
]),
},
],
}),
],
};

0 comments on commit 5828c47

Please sign in to comment.