FastAPI backend (Python 3.11, MSSQL ODBC for SambaPOS, Azure DI OCR),
kitchen_db on central PG. React/TS/Vite frontend with navy sidebar layout.
Backend: auth.py (APP_SLUG=kitchen, SimpleNamespace — archive routes use
.kitchen_id/.is_admin without modification), main.py (51 migrations, scheduler,
internal router for KDS bookings feed), api/internal.py, full archive API
(31 routers: invoices, recipes, menus, sambapos, resos, newbook, disputes,
purchase_orders, etc.), models, migrations, OCR pipeline.
kitchen_id pinned to 1 (B1 — single hotel).
Frontend: AuthGate (app=kitchen, token shim for archive compat — B5b pending),
Layout (navy sidebar, 6 sections, Lucide icons, teal --app-primary),
App.tsx (Outlet pattern, UploadApp outside Layout), index.css (full :root block).
strict: false — archive components have type issues; build clean.
Note: 45 archive components call fetch('/api/...') without /kitchen/ prefix
(B5b). Runtime 404s; deferred until after initial testing.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
105 lines
No EOL
4.7 KiB
JavaScript
105 lines
No EOL
4.7 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.parsePathForBorderStroke = exports.parsePathForBorderDoubleInner = exports.parsePathForBorderDoubleOuter = exports.parsePathForBorder = void 0;
|
|
var bezier_curve_1 = require("./bezier-curve");
|
|
var parsePathForBorder = function (curves, borderSide) {
|
|
switch (borderSide) {
|
|
case 0:
|
|
return createPathFromCurves(curves.topLeftBorderBox, curves.topLeftPaddingBox, curves.topRightBorderBox, curves.topRightPaddingBox);
|
|
case 1:
|
|
return createPathFromCurves(curves.topRightBorderBox, curves.topRightPaddingBox, curves.bottomRightBorderBox, curves.bottomRightPaddingBox);
|
|
case 2:
|
|
return createPathFromCurves(curves.bottomRightBorderBox, curves.bottomRightPaddingBox, curves.bottomLeftBorderBox, curves.bottomLeftPaddingBox);
|
|
case 3:
|
|
default:
|
|
return createPathFromCurves(curves.bottomLeftBorderBox, curves.bottomLeftPaddingBox, curves.topLeftBorderBox, curves.topLeftPaddingBox);
|
|
}
|
|
};
|
|
exports.parsePathForBorder = parsePathForBorder;
|
|
var parsePathForBorderDoubleOuter = function (curves, borderSide) {
|
|
switch (borderSide) {
|
|
case 0:
|
|
return createPathFromCurves(curves.topLeftBorderBox, curves.topLeftBorderDoubleOuterBox, curves.topRightBorderBox, curves.topRightBorderDoubleOuterBox);
|
|
case 1:
|
|
return createPathFromCurves(curves.topRightBorderBox, curves.topRightBorderDoubleOuterBox, curves.bottomRightBorderBox, curves.bottomRightBorderDoubleOuterBox);
|
|
case 2:
|
|
return createPathFromCurves(curves.bottomRightBorderBox, curves.bottomRightBorderDoubleOuterBox, curves.bottomLeftBorderBox, curves.bottomLeftBorderDoubleOuterBox);
|
|
case 3:
|
|
default:
|
|
return createPathFromCurves(curves.bottomLeftBorderBox, curves.bottomLeftBorderDoubleOuterBox, curves.topLeftBorderBox, curves.topLeftBorderDoubleOuterBox);
|
|
}
|
|
};
|
|
exports.parsePathForBorderDoubleOuter = parsePathForBorderDoubleOuter;
|
|
var parsePathForBorderDoubleInner = function (curves, borderSide) {
|
|
switch (borderSide) {
|
|
case 0:
|
|
return createPathFromCurves(curves.topLeftBorderDoubleInnerBox, curves.topLeftPaddingBox, curves.topRightBorderDoubleInnerBox, curves.topRightPaddingBox);
|
|
case 1:
|
|
return createPathFromCurves(curves.topRightBorderDoubleInnerBox, curves.topRightPaddingBox, curves.bottomRightBorderDoubleInnerBox, curves.bottomRightPaddingBox);
|
|
case 2:
|
|
return createPathFromCurves(curves.bottomRightBorderDoubleInnerBox, curves.bottomRightPaddingBox, curves.bottomLeftBorderDoubleInnerBox, curves.bottomLeftPaddingBox);
|
|
case 3:
|
|
default:
|
|
return createPathFromCurves(curves.bottomLeftBorderDoubleInnerBox, curves.bottomLeftPaddingBox, curves.topLeftBorderDoubleInnerBox, curves.topLeftPaddingBox);
|
|
}
|
|
};
|
|
exports.parsePathForBorderDoubleInner = parsePathForBorderDoubleInner;
|
|
var parsePathForBorderStroke = function (curves, borderSide) {
|
|
switch (borderSide) {
|
|
case 0:
|
|
return createStrokePathFromCurves(curves.topLeftBorderStroke, curves.topRightBorderStroke);
|
|
case 1:
|
|
return createStrokePathFromCurves(curves.topRightBorderStroke, curves.bottomRightBorderStroke);
|
|
case 2:
|
|
return createStrokePathFromCurves(curves.bottomRightBorderStroke, curves.bottomLeftBorderStroke);
|
|
case 3:
|
|
default:
|
|
return createStrokePathFromCurves(curves.bottomLeftBorderStroke, curves.topLeftBorderStroke);
|
|
}
|
|
};
|
|
exports.parsePathForBorderStroke = parsePathForBorderStroke;
|
|
var createStrokePathFromCurves = function (outer1, outer2) {
|
|
var path = [];
|
|
if (bezier_curve_1.isBezierCurve(outer1)) {
|
|
path.push(outer1.subdivide(0.5, false));
|
|
}
|
|
else {
|
|
path.push(outer1);
|
|
}
|
|
if (bezier_curve_1.isBezierCurve(outer2)) {
|
|
path.push(outer2.subdivide(0.5, true));
|
|
}
|
|
else {
|
|
path.push(outer2);
|
|
}
|
|
return path;
|
|
};
|
|
var createPathFromCurves = function (outer1, inner1, outer2, inner2) {
|
|
var path = [];
|
|
if (bezier_curve_1.isBezierCurve(outer1)) {
|
|
path.push(outer1.subdivide(0.5, false));
|
|
}
|
|
else {
|
|
path.push(outer1);
|
|
}
|
|
if (bezier_curve_1.isBezierCurve(outer2)) {
|
|
path.push(outer2.subdivide(0.5, true));
|
|
}
|
|
else {
|
|
path.push(outer2);
|
|
}
|
|
if (bezier_curve_1.isBezierCurve(inner2)) {
|
|
path.push(inner2.subdivide(0.5, true).reverse());
|
|
}
|
|
else {
|
|
path.push(inner2);
|
|
}
|
|
if (bezier_curve_1.isBezierCurve(inner1)) {
|
|
path.push(inner1.subdivide(0.5, false).reverse());
|
|
}
|
|
else {
|
|
path.push(inner1);
|
|
}
|
|
return path;
|
|
};
|
|
//# sourceMappingURL=border.js.map
|