-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* wip new shop * wip new shop * wip new shop * bootstrap icons * category ui * shop ui * pacifistaplus container composant * upgraded shop ui * text p+ * category responsive * basket handle css * wip cart * wip cart * cart done * done shop page * wip checkout * wip checkout paypal and credit card * payment paypal done * payment paypal cb done * payment paypal cb done
- Loading branch information
Showing
81 changed files
with
1,594 additions
and
421 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
19 changes: 19 additions & 0 deletions
19
src/app/components/inputs/input-number/input-number.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,19 @@ | ||
<label [for]="id" class="form-label">{{ label }}</label> | ||
<input | ||
type="number" | ||
class="form-control" | ||
inputmode="numeric" | ||
[placeholder]="placeholder" | ||
[(ngModel)]="number" | ||
[id]="id" | ||
[value]="number ?? ''" | ||
[required]="required" | ||
(input)="onInput()" | ||
[ngClass]="{ | ||
'is-invalid': formSent && inputErrors.length > 0, | ||
'is-valid': formSent && inputErrors.length === 0 | ||
}" | ||
> | ||
<div *ngFor="let error of inputErrors" class="invalid-feedback"> | ||
{{ error }} | ||
</div> |
Empty file.
23 changes: 23 additions & 0 deletions
23
src/app/components/inputs/input-number/input-number.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 {InputNumberComponent} from './input-number.component'; | ||
|
||
describe('InputNumberComponent', () => { | ||
let component: InputNumberComponent; | ||
let fixture: ComponentFixture<InputNumberComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [InputNumberComponent] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(InputNumberComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
30 changes: 30 additions & 0 deletions
30
src/app/components/inputs/input-number/input-number.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,30 @@ | ||
import {Component, EventEmitter, Input, Output} from '@angular/core'; | ||
import {NgClass, NgForOf} from "@angular/common"; | ||
import {FormsModule, ReactiveFormsModule} from "@angular/forms"; | ||
|
||
@Component({ | ||
selector: 'app-input-number', | ||
standalone: true, | ||
imports: [ | ||
NgForOf, | ||
ReactiveFormsModule, | ||
FormsModule, | ||
NgClass | ||
], | ||
templateUrl: './input-number.component.html', | ||
styleUrl: './input-number.component.scss' | ||
}) | ||
export class InputNumberComponent { | ||
@Input() label: string = 'Number'; | ||
@Input() placeholder: string = 'Hint'; | ||
@Input() id: string = 'validationNumber'; | ||
@Input() number?: number; | ||
@Input() required: boolean = true; | ||
@Input() formSent: boolean = false; | ||
@Input() inputErrors: string[] = []; | ||
@Output() numberChange = new EventEmitter<number>(); | ||
|
||
onInput() { | ||
this.numberChange.emit(this.number); | ||
} | ||
} |
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
Oops, something went wrong.