Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3d86f8706f | ||
|
|
30cbb60efe | ||
|
|
227f5b5f74 | ||
|
|
50974c7574 |
@@ -1 +1 @@
|
|||||||
__version__ = "15.1.1"
|
__version__ = "15.1.3"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "barker"
|
name = "barker"
|
||||||
version = "15.1.1"
|
version = "15.1.3"
|
||||||
description = "Point of Sale for a restaurant"
|
description = "Point of Sale for a restaurant"
|
||||||
requires-python = ">=3.14"
|
requires-python = ">=3.14"
|
||||||
authors = [{ name = "tanshu", email = "git@tanshu.com" }]
|
authors = [{ name = "tanshu", email = "git@tanshu.com" }]
|
||||||
|
|||||||
Generated
+1
-1
@@ -231,7 +231,7 @@ wheels = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "barker"
|
name = "barker"
|
||||||
version = "15.1.1"
|
version = "15.1.3"
|
||||||
source = { editable = "." }
|
source = { editable = "." }
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{ name = "aiohttp" },
|
{ name = "aiohttp" },
|
||||||
|
|||||||
+12
-5
@@ -32,7 +32,9 @@
|
|||||||
"input": "public"
|
"input": "public"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"styles": ["src/styles.sass"],
|
"styles": [
|
||||||
|
"src/styles.sass"
|
||||||
|
],
|
||||||
"allowedCommonJsDependencies": [
|
"allowedCommonJsDependencies": [
|
||||||
"typed-function",
|
"typed-function",
|
||||||
"javascript-natural-sort",
|
"javascript-natural-sort",
|
||||||
@@ -46,8 +48,8 @@
|
|||||||
"budgets": [
|
"budgets": [
|
||||||
{
|
{
|
||||||
"type": "initial",
|
"type": "initial",
|
||||||
"maximumWarning": "500kb",
|
"maximumWarning": "1000kb",
|
||||||
"maximumError": "1mb"
|
"maximumError": "2mb"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "anyComponentStyle",
|
"type": "anyComponentStyle",
|
||||||
@@ -86,14 +88,19 @@
|
|||||||
"lint": {
|
"lint": {
|
||||||
"builder": "@angular-eslint/builder:lint",
|
"builder": "@angular-eslint/builder:lint",
|
||||||
"options": {
|
"options": {
|
||||||
"lintFilePatterns": ["src/**/*.ts", "src/**/*.html"]
|
"lintFilePatterns": [
|
||||||
|
"src/**/*.ts",
|
||||||
|
"src/**/*.html"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"cli": {
|
"cli": {
|
||||||
"schematicCollections": ["@angular-eslint/schematics"],
|
"schematicCollections": [
|
||||||
|
"@angular-eslint/schematics"
|
||||||
|
],
|
||||||
"analytics": false
|
"analytics": false
|
||||||
},
|
},
|
||||||
"schematics": {
|
"schematics": {
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "bookie",
|
"name": "bookie",
|
||||||
"version": "15.1.1",
|
"version": "15.1.3",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"start": "ng serve",
|
"start": "ng serve",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
export const environment = {
|
export const environment = {
|
||||||
production: true,
|
production: true,
|
||||||
ACCESS_TOKEN_REFRESH_MINUTES: 10, // refresh token 10 minutes before expiry
|
ACCESS_TOKEN_REFRESH_MINUTES: 10, // refresh token 10 minutes before expiry
|
||||||
version: '15.1.1',
|
version: '15.1.3',
|
||||||
};
|
};
|
||||||
|
|
||||||
export const dateFormat = {
|
export const dateFormat = {
|
||||||
|
|||||||
@@ -1,63 +1,57 @@
|
|||||||
@if (customersResource.isLoading()) {
|
<h2 mat-dialog-title>Customer</h2>
|
||||||
<app-skeleton-loader type="card" [count]="1" />
|
<mat-dialog-content>
|
||||||
} @else if (customersResource.error()) {
|
<form class="flex-col">
|
||||||
<app-error-state (retryAction)="customersResource.reload()" />
|
<div class="row-container">
|
||||||
} @else {
|
<mat-form-field class="flex-auto">
|
||||||
<h2 mat-dialog-title>Customer</h2>
|
<mat-label>Phone</mat-label>
|
||||||
<mat-dialog-content>
|
<input
|
||||||
<form class="flex-col">
|
matInput
|
||||||
<div class="row-container">
|
type="text"
|
||||||
<mat-form-field class="flex-auto">
|
[formField]="form.phone"
|
||||||
<mat-label>Phone</mat-label>
|
[matAutocomplete]="auto"
|
||||||
<input
|
autocomplete="off"
|
||||||
matInput
|
cdkFocusInitial
|
||||||
type="text"
|
/>
|
||||||
[formField]="form.phone"
|
</mat-form-field>
|
||||||
[matAutocomplete]="auto"
|
<mat-autocomplete
|
||||||
autocomplete="off"
|
#auto="matAutocomplete"
|
||||||
cdkFocusInitial
|
autoActiveFirstOption
|
||||||
/>
|
[displayWith]="displayFn"
|
||||||
</mat-form-field>
|
(optionSelected)="selected($event)"
|
||||||
<mat-autocomplete
|
>
|
||||||
#auto="matAutocomplete"
|
@for (customer of customers(); track customer) {
|
||||||
autoActiveFirstOption
|
<mat-option [value]="customer">{{ customer.name }} - {{ customer.phone }}</mat-option>
|
||||||
[displayWith]="displayFn"
|
}
|
||||||
(optionSelected)="selected($event)"
|
</mat-autocomplete>
|
||||||
>
|
</div>
|
||||||
@for (customer of customers(); track customer) {
|
<div class="row-container">
|
||||||
<mat-option [value]="customer">{{ customer.name }} - {{ customer.phone }}</mat-option>
|
<mat-form-field class="flex-auto">
|
||||||
|
<mat-label>Name</mat-label>
|
||||||
|
<input matInput [value]="formModel().name" readonly />
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
<div class="row-container">
|
||||||
|
<mat-form-field class="flex-auto">
|
||||||
|
<mat-label>Address</mat-label>
|
||||||
|
<textarea matInput [value]="formModel().address" readonly> </textarea>
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
<div class="row-container">
|
||||||
|
<mat-checkbox [checked]="formModel().printInBill" [disabled]="true">Print in Bill?</mat-checkbox>
|
||||||
|
</div>
|
||||||
|
<p></p>
|
||||||
|
<div class="discounts">
|
||||||
|
<ul>
|
||||||
|
@for (r of formModel().discounts; track r.id) {
|
||||||
|
@if (r.discount > 0) {
|
||||||
|
<li>{{ r.name }} - {{ r.discount | percent: '1.2-2' }}</li>
|
||||||
}
|
}
|
||||||
</mat-autocomplete>
|
}
|
||||||
</div>
|
</ul>
|
||||||
<div class="row-container">
|
</div>
|
||||||
<mat-form-field class="flex-auto">
|
</form>
|
||||||
<mat-label>Name</mat-label>
|
</mat-dialog-content>
|
||||||
<input matInput [value]="formModel().name" readonly />
|
<mat-dialog-actions align="end">
|
||||||
</mat-form-field>
|
<button mat-button [mat-dialog-close]="false">Cancel</button>
|
||||||
</div>
|
<button type="button" mat-raised-button color="primary" (click)="save()">Select</button>
|
||||||
<div class="row-container">
|
</mat-dialog-actions>
|
||||||
<mat-form-field class="flex-auto">
|
|
||||||
<mat-label>Address</mat-label>
|
|
||||||
<textarea matInput [value]="formModel().address" readonly> </textarea>
|
|
||||||
</mat-form-field>
|
|
||||||
</div>
|
|
||||||
<div class="row-container">
|
|
||||||
<mat-checkbox [checked]="formModel().printInBill" [disabled]="true">Print in Bill?</mat-checkbox>
|
|
||||||
</div>
|
|
||||||
<p></p>
|
|
||||||
<div class="discounts">
|
|
||||||
<ul>
|
|
||||||
@for (r of formModel().discounts; track r.id) {
|
|
||||||
@if (r.discount > 0) {
|
|
||||||
<li>{{ r.name }} - {{ r.discount | percent: '1.2-2' }}</li>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</mat-dialog-content>
|
|
||||||
<mat-dialog-actions align="end">
|
|
||||||
<button mat-button [mat-dialog-close]="false">Cancel</button>
|
|
||||||
<button type="button" mat-raised-button color="primary" (click)="save()">Select</button>
|
|
||||||
</mat-dialog-actions>
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -13,8 +13,6 @@ import { MatInputModule } from '@angular/material/input';
|
|||||||
import { Customer } from '../../core/customer';
|
import { Customer } from '../../core/customer';
|
||||||
import { CustomerDiscount } from '../../core/customer-discount';
|
import { CustomerDiscount } from '../../core/customer-discount';
|
||||||
import { CustomerService } from '../../customers/customer.service';
|
import { CustomerService } from '../../customers/customer.service';
|
||||||
import { ErrorStateComponent } from '../../shared/error-state/error-state.component';
|
|
||||||
import { SkeletonLoaderComponent } from '../../shared/skeleton-loader/skeleton-loader.component';
|
|
||||||
|
|
||||||
export interface ChooseCustomerFormData {
|
export interface ChooseCustomerFormData {
|
||||||
id: string;
|
id: string;
|
||||||
@@ -40,8 +38,6 @@ export interface ChooseCustomerFormData {
|
|||||||
MatOptionModule,
|
MatOptionModule,
|
||||||
PercentPipe,
|
PercentPipe,
|
||||||
FormField,
|
FormField,
|
||||||
ErrorStateComponent,
|
|
||||||
SkeletonLoaderComponent,
|
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
export class ChooseCustomerComponent {
|
export class ChooseCustomerComponent {
|
||||||
@@ -66,7 +62,8 @@ export class ChooseCustomerComponent {
|
|||||||
form = form(this.formModel);
|
form = form(this.formModel);
|
||||||
|
|
||||||
phoneSignal = computed(() => {
|
phoneSignal = computed(() => {
|
||||||
return this.formModel().phone;
|
const p = this.formModel().phone;
|
||||||
|
return typeof p === 'string' ? p.trim() : null;
|
||||||
});
|
});
|
||||||
|
|
||||||
debouncedPhone = debounced(this.phoneSignal, 150);
|
debouncedPhone = debounced(this.phoneSignal, 150);
|
||||||
|
|||||||
@@ -16,4 +16,5 @@
|
|||||||
when: var_file is defined
|
when: var_file is defined
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
|
- printer
|
||||||
- frank
|
- frank
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
- name: Reload udev
|
||||||
|
ansible.builtin.shell: udevadm control --reload-rules && udevadm trigger --action=change
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
- name: Add udev rule for usb printer systemd tag
|
||||||
|
copy:
|
||||||
|
dest: /etc/udev/rules.d/99-usb-printers.rules
|
||||||
|
content: |
|
||||||
|
SUBSYSTEM=="usbmisc", KERNEL=="lp*", TAG+="systemd"
|
||||||
|
mode: "0644"
|
||||||
|
notify: Reload udev
|
||||||
Reference in New Issue
Block a user