Fix excel export for dual banner name

This commit is contained in:
Made Baruna 2022-01-15 20:42:11 +07:00
parent 68ef8e2f0d
commit 9db67a5f81
2 changed files with 4 additions and 1 deletions

View file

@ -2,6 +2,7 @@ import { Workbook } from 'exceljs';
import dayjs from 'dayjs';
import { banners } from '../data/banners';
import { bannersDual } from '../data/bannersDual';
import { getTimeOffset } from '../stores/server';
import { process } from './wish';
@ -170,7 +171,7 @@ async function addWishHistory(workbook) {
pull.pity,
pull.at,
groupCount,
pull.banner.name,
pull.code === '400' ? bannersDual[pull.banner.fullName][1].name : pull.banner.name,
]);
const bgColor = pull.striped ? 'ffeeeeee' : 'ffffffff';

View file

@ -64,11 +64,13 @@ export async function process(id) {
const start = dayjs(e.start, 'YYYY-MM-DD HH:mm:ss').subtract(diff, 'hour');
const end = dayjs(e.end, 'YYYY-MM-DD HH:mm:ss');
const image = `/images/banners/${e.name} ${e.image}.png`;
const fullName = `${e.name} ${e.image}`;
return {
...e,
start: start.unix(),
end: end.unix(),
fullName,
image,
total: 0,
legendary: [],