mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
added xlsx js for excel
This commit is contained in:
@@ -110,11 +110,12 @@ async function paginate(model, req, {
|
||||
const attributes = modelToAttributes(model, { exclude: excludeAttributes, jsonbSchemas, context });
|
||||
const ALLOWED_FIELDS = attributes.map((a) => a.field);
|
||||
const computedFieldKeys = computedAttributes.map((c) => c.key);
|
||||
const dateFieldKeys = attributes.filter((a) => a.type === 'date').map((a) => a.field);
|
||||
|
||||
// Sequelize aliases the main model's table with the model's name by default
|
||||
// (e.g. `FROM "users" AS "User"`) — needed to qualify Sequelize.col()
|
||||
// references so they don't collide with same-named columns on joined tables.
|
||||
const { where, order } = buildQuery(filters, sort, ALLOWED_FIELDS, computedFieldKeys, model.name);
|
||||
const { where, order } = buildQuery(filters, sort, ALLOWED_FIELDS, computedFieldKeys, model.name, dateFieldKeys);
|
||||
|
||||
// Build attribute includes: jsonb + audit subqueries + any extra from findOptions
|
||||
const baseIncludes = jsonbAttr ? [jsonbAttr] : [];
|
||||
|
||||
Reference in New Issue
Block a user