mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 21:49:25 +08:00
fix(data-vi): issue where getting timezone from context (#5743)
* fix(data-vi): issue where getting timezone from context * fix: test
This commit is contained in:
parent
6bd5b9b54c
commit
9f255eba89
@ -71,7 +71,6 @@ describe('formatter', () => {
|
|||||||
const ctx = {
|
const ctx = {
|
||||||
app,
|
app,
|
||||||
db,
|
db,
|
||||||
timezone: '+05:30',
|
|
||||||
action: {
|
action: {
|
||||||
params: {
|
params: {
|
||||||
values: {
|
values: {
|
||||||
@ -85,6 +84,7 @@ describe('formatter', () => {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
get: () => '+05:30',
|
||||||
} as any;
|
} as any;
|
||||||
const queryParser = createQueryParser(db);
|
const queryParser = createQueryParser(db);
|
||||||
await compose([parseFieldAndAssociations, queryParser.parse(), queryData])(ctx, async () => {});
|
await compose([parseFieldAndAssociations, queryParser.parse(), queryData])(ctx, async () => {});
|
||||||
@ -112,7 +112,7 @@ describe('formatter', () => {
|
|||||||
const ctx = {
|
const ctx = {
|
||||||
app,
|
app,
|
||||||
db,
|
db,
|
||||||
timezone: '+05:30',
|
get: () => '+05:30',
|
||||||
action: {
|
action: {
|
||||||
params: {
|
params: {
|
||||||
values: {
|
values: {
|
||||||
@ -153,7 +153,7 @@ describe('formatter', () => {
|
|||||||
const ctx = {
|
const ctx = {
|
||||||
app,
|
app,
|
||||||
db,
|
db,
|
||||||
timezone: '+05:30',
|
get: () => '+05:30',
|
||||||
action: {
|
action: {
|
||||||
params: {
|
params: {
|
||||||
values: {
|
values: {
|
||||||
@ -202,7 +202,7 @@ describe('formatter', () => {
|
|||||||
const ctx = {
|
const ctx = {
|
||||||
app,
|
app,
|
||||||
db,
|
db,
|
||||||
timezone: '+05:30',
|
get: () => '+05:30',
|
||||||
action: {
|
action: {
|
||||||
params: {
|
params: {
|
||||||
values: {
|
values: {
|
||||||
@ -250,7 +250,7 @@ describe('formatter', () => {
|
|||||||
const ctx = {
|
const ctx = {
|
||||||
app,
|
app,
|
||||||
db,
|
db,
|
||||||
timezone: '+05:30',
|
get: () => '+05:30',
|
||||||
action: {
|
action: {
|
||||||
params: {
|
params: {
|
||||||
values: {
|
values: {
|
||||||
|
@ -97,7 +97,7 @@ export class QueryParser {
|
|||||||
attributes: dimensionAttributes,
|
attributes: dimensionAttributes,
|
||||||
group,
|
group,
|
||||||
fieldMap: dimensionFieldMap,
|
fieldMap: dimensionFieldMap,
|
||||||
} = this.parseDimensions(ctx, dimensions, hasAgg, ctx.timezone);
|
} = this.parseDimensions(ctx, dimensions, hasAgg, ctx.get?.('x-timezone'));
|
||||||
const order = this.parseOrders(ctx, orders, hasAgg);
|
const order = this.parseOrders(ctx, orders, hasAgg);
|
||||||
|
|
||||||
ctx.action.params.values = {
|
ctx.action.params.values = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user