Skip to content

Commit 6c0807c

Browse files
committed
chore: cleanup
Signed-off-by: Jakob Steiner <jakob.steiner@glasskube.eu>
1 parent 7c061ec commit 6c0807c

File tree

2 files changed

+1
-46
lines changed

2 files changed

+1
-46
lines changed

frontend/ui/src/app/components/customer-organizations/customer-organizations.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
</td>
8989
<td class="px-4 py-3 font-medium text-gray-900 whitespace-nowrap dark:text-white">
9090
<button
91-
class="flex gap-1 py-2 px-3 flex items-center text-sm font-medium text-center text-gray-900 focus:outline-none bg-white rounded-lg border border-gray-200 hover:bg-gray-100 hover:text-primary-700 focus:z-10 focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700"
91+
class="flex gap-1 items-center py-2 px-3 text-sm font-medium text-center text-gray-900 focus:outline-none bg-white rounded-lg border border-gray-200 hover:bg-gray-100 hover:text-primary-700 focus:z-10 focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700"
9292
type="button"
9393
cdkOverlayOrigin
9494
#dropdownTriggerButton

frontend/ui/src/app/components/customer-organizations/customer-organizations.component.ts

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import {
1313
faEdit,
1414
faMagnifyingGlass,
1515
faPlus,
16-
faRotate,
1716
faTrash,
1817
faXmark,
1918
} from '@fortawesome/free-solid-svg-icons';
@@ -57,7 +56,6 @@ export class CustomerOrganizationsComponent {
5756
protected readonly faXmark = faXmark;
5857
protected readonly faCircleExclamation = faCircleExclamation;
5958
protected readonly faEdit = faEdit;
60-
protected readonly faRotate = faRotate;
6159
protected readonly faChevronDown = faChevronDown;
6260

6361
private readonly customerOrganizationsService = inject(CustomerOrganizationsService);
@@ -213,49 +211,6 @@ export class CustomerOrganizationsComponent {
213211
});
214212
}
215213

216-
protected async removeFeature(customer: CustomerOrganization, feature: CustomerOrganizationFeature): Promise<void> {
217-
const updatedFeatures = customer.features.filter((f) => f !== feature);
218-
try {
219-
await firstValueFrom(
220-
this.customerOrganizationsService.updateCustomerOrganization(customer.id, {
221-
name: customer.name,
222-
imageId: customer.imageId,
223-
features: updatedFeatures,
224-
})
225-
);
226-
this.toast.success(`Feature "${this.getFeatureLabel(feature)}" removed successfully`);
227-
this.refresh$.next();
228-
} catch (e) {
229-
const msg = getFormDisplayedError(e);
230-
if (msg) {
231-
this.toast.error(msg);
232-
}
233-
}
234-
}
235-
236-
protected async restoreAllFeatures(customer: CustomerOrganization): Promise<void> {
237-
try {
238-
await firstValueFrom(
239-
this.customerOrganizationsService.updateCustomerOrganization(customer.id, {
240-
name: customer.name,
241-
imageId: customer.imageId,
242-
features: [...this.allCustomerFeatures],
243-
})
244-
);
245-
this.toast.success('All features restored successfully');
246-
this.refresh$.next();
247-
} catch (e) {
248-
const msg = getFormDisplayedError(e);
249-
if (msg) {
250-
this.toast.error(msg);
251-
}
252-
}
253-
}
254-
255-
protected hasAllFeatures(customer: CustomerOrganization): boolean {
256-
return customer.features.length === this.allCustomerFeatures.length;
257-
}
258-
259214
protected getFeatureLabel(feature: CustomerOrganizationFeature): string {
260215
switch (feature) {
261216
case 'deployment_targets':

0 commit comments

Comments
 (0)