From c15f7371d48bd298cc05a2fa9ddd963ac9dd58ce Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Wed, 11 Mar 2026 22:01:23 +0000 Subject: [PATCH] 1.0.0.1 --- backend/src/db/api/courier_profiles.js | 4 +- backend/src/db/api/file.js | 4 +- backend/src/db/api/merchant_profiles.js | 4 +- backend/src/db/api/product_categories.js | 2 +- backend/src/db/api/products.js | 2 +- backend/src/db/api/stores.js | 2 +- backend/src/db/api/support_tickets.js | 2 +- backend/src/db/api/users.js | 2 +- backend/src/db/models/courier_profiles.js | 4 +- backend/src/db/models/file.js | 6 +-- backend/src/db/models/merchant_profiles.js | 4 +- backend/src/db/models/product_categories.js | 2 +- backend/src/db/models/products.js | 2 +- backend/src/db/models/stores.js | 2 +- backend/src/db/models/support_tickets.js | 2 +- backend/src/db/models/users.js | 2 +- frontend/public/locales/en-US/common.json | 52 +++++++++++++++++++++ 17 files changed, 75 insertions(+), 23 deletions(-) create mode 100644 frontend/public/locales/en-US/common.json diff --git a/backend/src/db/api/courier_profiles.js b/backend/src/db/api/courier_profiles.js index c72c775..02945bd 100644 --- a/backend/src/db/api/courier_profiles.js +++ b/backend/src/db/api/courier_profiles.js @@ -461,12 +461,12 @@ module.exports = class Courier_profilesDBApi { { - model: db.file, + model: db.files, as: 'verification_files', }, { - model: db.file, + model: db.files, as: 'profile_images', }, diff --git a/backend/src/db/api/file.js b/backend/src/db/api/file.js index f4f7121..9d00c5a 100644 --- a/backend/src/db/api/file.js +++ b/backend/src/db/api/file.js @@ -36,7 +36,7 @@ module.exports = class FileDBApi { ); for (const file of inexistentFiles) { - await db.file.create( + await db.files.create( { belongsTo: relation.belongsTo, belongsToColumn: relation.belongsToColumn, @@ -62,7 +62,7 @@ module.exports = class FileDBApi { ) { const transaction = (options && options.transaction) || undefined; - const filesToDelete = await db.file.findAll({ + const filesToDelete = await db.files.findAll({ where: { belongsTo: relation.belongsTo, belongsToId: relation.belongsToId, diff --git a/backend/src/db/api/merchant_profiles.js b/backend/src/db/api/merchant_profiles.js index 2bf4be2..eaa703a 100644 --- a/backend/src/db/api/merchant_profiles.js +++ b/backend/src/db/api/merchant_profiles.js @@ -456,12 +456,12 @@ module.exports = class Merchant_profilesDBApi { { - model: db.file, + model: db.files, as: 'logo_images', }, { - model: db.file, + model: db.files, as: 'banner_images', }, diff --git a/backend/src/db/api/product_categories.js b/backend/src/db/api/product_categories.js index 06d2429..3be75aa 100644 --- a/backend/src/db/api/product_categories.js +++ b/backend/src/db/api/product_categories.js @@ -367,7 +367,7 @@ module.exports = class Product_categoriesDBApi { { - model: db.file, + model: db.files, as: 'category_images', }, diff --git a/backend/src/db/api/products.js b/backend/src/db/api/products.js index 62d4d88..17cf603 100644 --- a/backend/src/db/api/products.js +++ b/backend/src/db/api/products.js @@ -460,7 +460,7 @@ module.exports = class ProductsDBApi { { - model: db.file, + model: db.files, as: 'product_images', }, diff --git a/backend/src/db/api/stores.js b/backend/src/db/api/stores.js index d4b194a..897db48 100644 --- a/backend/src/db/api/stores.js +++ b/backend/src/db/api/stores.js @@ -498,7 +498,7 @@ module.exports = class StoresDBApi { { - model: db.file, + model: db.files, as: 'store_images', }, diff --git a/backend/src/db/api/support_tickets.js b/backend/src/db/api/support_tickets.js index 7a85d85..102a928 100644 --- a/backend/src/db/api/support_tickets.js +++ b/backend/src/db/api/support_tickets.js @@ -448,7 +448,7 @@ module.exports = class Support_ticketsDBApi { { - model: db.file, + model: db.files, as: 'attachment_files', }, diff --git a/backend/src/db/api/users.js b/backend/src/db/api/users.js index 5af8049..61cd823 100644 --- a/backend/src/db/api/users.js +++ b/backend/src/db/api/users.js @@ -577,7 +577,7 @@ module.exports = class UsersDBApi { { - model: db.file, + model: db.files, as: 'avatar', }, diff --git a/backend/src/db/models/courier_profiles.js b/backend/src/db/models/courier_profiles.js index b2f0d63..c207a54 100644 --- a/backend/src/db/models/courier_profiles.js +++ b/backend/src/db/models/courier_profiles.js @@ -163,7 +163,7 @@ rating_count: { - db.courier_profiles.hasMany(db.file, { + db.courier_profiles.hasMany(db.files, { as: 'verification_files', foreignKey: 'belongsToId', constraints: false, @@ -173,7 +173,7 @@ rating_count: { }, }); - db.courier_profiles.hasMany(db.file, { + db.courier_profiles.hasMany(db.files, { as: 'profile_images', foreignKey: 'belongsToId', constraints: false, diff --git a/backend/src/db/models/file.js b/backend/src/db/models/file.js index 7703bb6..d7eeb68 100644 --- a/backend/src/db/models/file.js +++ b/backend/src/db/models/file.js @@ -1,6 +1,6 @@ module.exports = function(sequelize, DataTypes) { const file = sequelize.define( - 'file', + 'files', { id: { type: DataTypes.UUID, @@ -40,11 +40,11 @@ module.exports = function(sequelize, DataTypes) { ); file.associate = (db) => { - db.file.belongsTo(db.users, { + db.files.belongsTo(db.users, { as: 'createdBy', }); - db.file.belongsTo(db.users, { + db.files.belongsTo(db.users, { as: 'updatedBy', }); }; diff --git a/backend/src/db/models/merchant_profiles.js b/backend/src/db/models/merchant_profiles.js index 447160d..e657592 100644 --- a/backend/src/db/models/merchant_profiles.js +++ b/backend/src/db/models/merchant_profiles.js @@ -171,7 +171,7 @@ status: { - db.merchant_profiles.hasMany(db.file, { + db.merchant_profiles.hasMany(db.files, { as: 'logo_images', foreignKey: 'belongsToId', constraints: false, @@ -181,7 +181,7 @@ status: { }, }); - db.merchant_profiles.hasMany(db.file, { + db.merchant_profiles.hasMany(db.files, { as: 'banner_images', foreignKey: 'belongsToId', constraints: false, diff --git a/backend/src/db/models/product_categories.js b/backend/src/db/models/product_categories.js index 28adf79..bab8f32 100644 --- a/backend/src/db/models/product_categories.js +++ b/backend/src/db/models/product_categories.js @@ -119,7 +119,7 @@ is_active: { - db.product_categories.hasMany(db.file, { + db.product_categories.hasMany(db.files, { as: 'category_images', foreignKey: 'belongsToId', constraints: false, diff --git a/backend/src/db/models/products.js b/backend/src/db/models/products.js index d08fbaa..e3cab1f 100644 --- a/backend/src/db/models/products.js +++ b/backend/src/db/models/products.js @@ -166,7 +166,7 @@ is_featured: { - db.products.hasMany(db.file, { + db.products.hasMany(db.files, { as: 'product_images', foreignKey: 'belongsToId', constraints: false, diff --git a/backend/src/db/models/stores.js b/backend/src/db/models/stores.js index 49b0e78..3eb2134 100644 --- a/backend/src/db/models/stores.js +++ b/backend/src/db/models/stores.js @@ -219,7 +219,7 @@ closed_at: { - db.stores.hasMany(db.file, { + db.stores.hasMany(db.files, { as: 'store_images', foreignKey: 'belongsToId', constraints: false, diff --git a/backend/src/db/models/support_tickets.js b/backend/src/db/models/support_tickets.js index 2589dac..5964187 100644 --- a/backend/src/db/models/support_tickets.js +++ b/backend/src/db/models/support_tickets.js @@ -195,7 +195,7 @@ resolved_at: { - db.support_tickets.hasMany(db.file, { + db.support_tickets.hasMany(db.files, { as: 'attachment_files', foreignKey: 'belongsToId', constraints: false, diff --git a/backend/src/db/models/users.js b/backend/src/db/models/users.js index 14467e6..b45b342 100644 --- a/backend/src/db/models/users.js +++ b/backend/src/db/models/users.js @@ -276,7 +276,7 @@ provider: { - db.users.hasMany(db.file, { + db.users.hasMany(db.files, { as: 'avatar', foreignKey: 'belongsToId', constraints: false, diff --git a/frontend/public/locales/en-US/common.json b/frontend/public/locales/en-US/common.json new file mode 100644 index 0000000..8d45685 --- /dev/null +++ b/frontend/public/locales/en-US/common.json @@ -0,0 +1,52 @@ +{ + "pages": { + "dashboard": { + "pageTitle": "Dashboard", + "overview": "Overview", + "loadingWidgets": "Loading widgets...", + "loading": "Loading..." + }, + "login": { + "pageTitle": "Login", + + "form": { + "loginLabel": "Login", + "loginHelp": "Please enter your login", + "passwordLabel": "Password", + "passwordHelp": "Please enter your password", + "remember": "Remember", + "forgotPassword": "Forgot password?", + "loginButton": "Login", + "loading": "Loading...", + "noAccountYet": "Don’t have an account yet?", + "newAccount": "New Account" + }, + + "pexels": { + "photoCredit": "Photo by {{photographer}} on Pexels", + "videoCredit": "Video by {{name}} on Pexels", + "videoUnsupported": "Your browser does not support the video tag." + }, + + "footer": { + "copyright": "© {{year}} {{title}}. All rights reserved", + "privacy": "Privacy Policy" + } + } + }, + "components": { + "widgetCreator": { + "title": "Create Chart or Widget", + "helpText": "Describe your new widget or chart in natural language. For example: \"Number of admin users\" OR \"red chart with number of closed contracts grouped by month\"", + "settingsTitle": "Widget Creator Settings", + "settingsDescription": "What role are we showing and creating widgets for?", + "doneButton": "Done", + "loading": "Loading..." + }, + "search": { + "placeholder": "Search", + "required": "Required", + "minLength": "Minimum length: {{count}} characters" + } + } +}