-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
825f09b
commit 0a127be
Showing
14 changed files
with
239 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.button-group-wrapper { | ||
display: flex; | ||
align-items: center; | ||
gap: 1rem; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
frontend/src/app/shared/order-button-group/order-button-group.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<div class="btn-group"> | ||
<button type="button" class="btn btn-light" (click)="onUp()"> | ||
<lc-icon | ||
[icon]="actionIcons.up" | ||
[title]="entityName ? 'Move ' + entityName + ' up' : 'Move up'" | ||
/> | ||
</button> | ||
<button type="button" class="btn btn-light" (click)="onDown()"> | ||
<lc-icon | ||
[icon]="actionIcons.down" | ||
[title]="entityName ? 'Move ' + entityName + ' down' : 'Move down'" | ||
/> | ||
</button> | ||
</div> |
Empty file.
23 changes: 23 additions & 0 deletions
23
frontend/src/app/shared/order-button-group/order-button-group.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { ComponentFixture, TestBed } from "@angular/core/testing"; | ||
|
||
import { OrderButtonGroupComponent } from "./order-button-group.component"; | ||
import { SharedTestingModule } from "@shared/shared-testing.module"; | ||
|
||
describe("OrderButtonGroupComponent", () => { | ||
let component: OrderButtonGroupComponent; | ||
let fixture: ComponentFixture<OrderButtonGroupComponent>; | ||
|
||
beforeEach(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [OrderButtonGroupComponent], | ||
imports: [SharedTestingModule], | ||
}); | ||
fixture = TestBed.createComponent(OrderButtonGroupComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it("should create", () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
24 changes: 24 additions & 0 deletions
24
frontend/src/app/shared/order-button-group/order-button-group.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { Component, EventEmitter, Input, Output } from "@angular/core"; | ||
import { actionIcons } from "@shared/icons"; | ||
|
||
export type OrderChange = "up" | "down"; | ||
|
||
@Component({ | ||
selector: "lc-order-button-group", | ||
templateUrl: "./order-button-group.component.html", | ||
styleUrls: ["./order-button-group.component.scss"], | ||
}) | ||
export class OrderButtonGroupComponent { | ||
@Input() entityName: string | null = null; | ||
@Output() changeOrder = new EventEmitter<OrderChange>(); | ||
|
||
public actionIcons = actionIcons; | ||
|
||
public onUp(): void { | ||
this.changeOrder.emit("up"); | ||
} | ||
|
||
public onDown(): void { | ||
this.changeOrder.emit("down"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters