🎨 prettier
This commit is contained in:
parent
e8c9fe86f2
commit
d6a5d65d88
@ -8,12 +8,12 @@
|
|||||||
</p-floatlabel>
|
</p-floatlabel>
|
||||||
<div class="absolute right-2 top-1/2 -translate-y-1/2">
|
<div class="absolute right-2 top-1/2 -translate-y-1/2">
|
||||||
@if (gmapsLoading) {
|
@if (gmapsLoading) {
|
||||||
<svg viewBox="25 25 50 50">
|
<svg viewBox="25 25 50 50">
|
||||||
<circle r="20" cy="50" cx="50"></circle>
|
<circle r="20" cy="50" cx="50"></circle>
|
||||||
</svg>
|
</svg>
|
||||||
} @else {
|
} @else {
|
||||||
<p-button icon="pi pi-sparkles" variant="text" [disabled]="!placeForm.get('name')!.value" pTooltip="Complete using GMaps API"
|
<p-button icon="pi pi-sparkles" variant="text" [disabled]="!placeForm.get('name')!.value"
|
||||||
(click)="gmapsSearchText()" />
|
pTooltip="Complete using GMaps API" (click)="gmapsSearchText()" />
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -16,38 +16,38 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
svg {
|
svg {
|
||||||
width: 2rem;
|
width: 2rem;
|
||||||
animation: loading-rotate 1.5s linear infinite;
|
animation: loading-rotate 1.5s linear infinite;
|
||||||
}
|
}
|
||||||
|
|
||||||
circle {
|
circle {
|
||||||
fill: none;
|
fill: none;
|
||||||
stroke: #4f46e5;
|
stroke: #4f46e5;
|
||||||
stroke-width: 2;
|
stroke-width: 2;
|
||||||
stroke-dasharray: 1, 200;
|
stroke-dasharray: 1, 200;
|
||||||
stroke-dashoffset: 0;
|
stroke-dashoffset: 0;
|
||||||
stroke-linecap: round;
|
stroke-linecap: round;
|
||||||
animation: loading-dash 1.5s ease-in-out infinite;
|
animation: loading-dash 1.5s ease-in-out infinite;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes loading-rotate {
|
@keyframes loading-rotate {
|
||||||
100% {
|
100% {
|
||||||
transform: rotate(360deg);
|
transform: rotate(360deg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes loading-dash {
|
@keyframes loading-dash {
|
||||||
0% {
|
0% {
|
||||||
stroke-dasharray: 1, 200;
|
stroke-dasharray: 1, 200;
|
||||||
stroke-dashoffset: 0;
|
stroke-dashoffset: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
50% {
|
50% {
|
||||||
stroke-dasharray: 90, 200;
|
stroke-dasharray: 90, 200;
|
||||||
stroke-dashoffset: -35px;
|
stroke-dashoffset: -35px;
|
||||||
}
|
}
|
||||||
|
|
||||||
100% {
|
100% {
|
||||||
stroke-dashoffset: -125px;
|
stroke-dashoffset: -125px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -213,12 +213,12 @@ export class PlaceCreateModalComponent {
|
|||||||
this.gmapsLoading = false;
|
this.gmapsLoading = false;
|
||||||
if (r.category) {
|
if (r.category) {
|
||||||
this.categories$?.pipe(take(1)).subscribe({
|
this.categories$?.pipe(take(1)).subscribe({
|
||||||
next: categories => {
|
next: (categories) => {
|
||||||
const category: Category | undefined = categories.find(c => c.name == r.category);
|
const category: Category | undefined = categories.find((c) => c.name == r.category);
|
||||||
if (!category) return;
|
if (!category) return;
|
||||||
this.placeForm.get('category')?.setValue(category.id);
|
this.placeForm.get('category')?.setValue(category.id);
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -235,7 +235,7 @@ export class PlaceCreateModalComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (results.length == 1) {
|
if (results.length == 1) {
|
||||||
this.gmapsToForm(results[0])
|
this.gmapsToForm(results[0]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -54,7 +54,7 @@ export const Interceptor = (req: HttpRequest<unknown>, next: HttpHandlerFn): Obs
|
|||||||
const errDetails = ERROR_CONFIG[err.status];
|
const errDetails = ERROR_CONFIG[err.status];
|
||||||
if (errDetails) {
|
if (errDetails) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
let msg = ""
|
let msg = '';
|
||||||
msg = err.message || errDetails.detail;
|
msg = err.message || errDetails.detail;
|
||||||
if (!Array.isArray(err.error?.detail)) {
|
if (!Array.isArray(err.error?.detail)) {
|
||||||
msg = err.error.detail;
|
msg = err.error.detail;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user