Skip to content

Commit

Permalink
adding weekly stats to reselling search
Browse files Browse the repository at this point in the history
  • Loading branch information
cohenaj194 committed Sep 22, 2024
1 parent 3037c7a commit cf27a68
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 4 deletions.
54 changes: 53 additions & 1 deletion app/components/FFXIVResults/FullScan/Results.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,27 @@ const cvsFileList: Array<{ title: string; value: keyof ResponseType }> = [
{ title: 'Lowest Price Stack Size', value: 'stack_size' },
{ title: 'Lowest Price Last Update Time', value: 'update_time' },
{ title: 'Universalis Link', value: 'url' },
{ title: 'NPC Vendor Info', value: 'npc_vendor_info' }
{ title: 'NPC Vendor Info', value: 'npc_vendor_info' },
{ title: 'Region Weekly Median NQ', value: 'regionWeeklyMedianNQ' },
{ title: 'Region Weekly Average NQ', value: 'regionWeeklyAverageNQ' },
{
title: 'Region Weekly Sales Amount NQ',
value: 'regionWeeklySalesAmountNQ'
},
{
title: 'Region Weekly Quantity Sold NQ',
value: 'regionWeeklyQuantitySoldNQ'
},
{ title: 'Region Weekly Median HQ', value: 'regionWeeklyMedianHQ' },
{ title: 'Region Weekly Average HQ', value: 'regionWeeklyAverageHQ' },
{
title: 'Region Weekly Sales Amount HQ',
value: 'regionWeeklySalesAmountHQ'
},
{
title: 'Region Weekly Quantity Sold HQ',
value: 'regionWeeklyQuantitySoldHQ'
}
]

const fuzzyFilter: FilterFn<any> = (row, columnId, value, addMeta) => {
Expand Down Expand Up @@ -200,6 +220,38 @@ const Results = ({ rows }: ResultTableProps) => {
cell: (info) => (
<ItemDataLink link={'/queries/item-data/' + info.getValue()} />
)
}),
columnHelper.accessor('regionWeeklyMedianNQ', {
header: 'Region Weekly Median NQ',
cell: (info) => info.getValue().toLocaleString()
}),
columnHelper.accessor('regionWeeklyAverageNQ', {
header: 'Region Weekly Average NQ',
cell: (info) => info.getValue().toLocaleString()
}),
columnHelper.accessor('regionWeeklySalesAmountNQ', {
header: 'Region Weekly Sales Amount NQ',
cell: (info) => info.getValue().toLocaleString()
}),
columnHelper.accessor('regionWeeklyQuantitySoldNQ', {
header: 'Region Weekly Quantity Sold NQ',
cell: (info) => info.getValue().toLocaleString()
}),
columnHelper.accessor('regionWeeklyMedianHQ', {
header: 'Region Weekly Median HQ',
cell: (info) => info.getValue().toLocaleString()
}),
columnHelper.accessor('regionWeeklyAverageHQ', {
header: 'Region Weekly Average HQ',
cell: (info) => info.getValue().toLocaleString()
}),
columnHelper.accessor('regionWeeklySalesAmountHQ', {
header: 'Region Weekly Sales Amount HQ',
cell: (info) => info.getValue().toLocaleString()
}),
columnHelper.accessor('regionWeeklyQuantitySoldHQ', {
header: 'Region Weekly Quantity Sold HQ',
cell: (info) => info.getValue().toLocaleString()
})
]

Expand Down
10 changes: 9 additions & 1 deletion app/redux/localStorage/ffScanOrderHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,15 @@ export const defaultSortOrder = [
'profit_raw_percent',
'stack_size',
'update_time',
'home_update_time'
'home_update_time',
'regionWeeklyMedianNQ',
'regionWeeklyAverageNQ',
'regionWeeklySalesAmountNQ',
'regionWeeklyQuantitySoldNQ',
'regionWeeklyMedianHQ',
'regionWeeklyAverageHQ',
'regionWeeklySalesAmountHQ',
'regionWeeklyQuantitySoldHQ'
]

export const getFFScanSortOrderInLocalStorage = (): Array<string> => {
Expand Down
19 changes: 17 additions & 2 deletions app/utils/items/wowItems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2500,6 +2500,7 @@ export const wowItemsMap: Record<string, string> = {
'3771': 'Wild Hog Shank',
'3775': 'Empty Poison Vial',
'3776': 'Crippling Poison',
'3777': 'Lethargy Root',
'3778': 'Taut Compound Bow',
'3779': 'Hefty War Axe',
'3780': 'Long-Barreled Musket',
Expand Down Expand Up @@ -28751,8 +28752,10 @@ export const wowItemsMap: Record<string, string> = {
'220373': 'Perfect Versatile Diamond',
'220380': 'Immature Spiderling',
'220438': 'Root-Staff Splinter',
'220439': 'Half-Eaten Fish',
'220441': 'Hardened Pearl',
'220442': 'Weighty Shovel',
'220443': 'Desecrated Arathi Tinderbox',
'220444': 'Gnawed Spine',
'220448': 'Cerulean Orb',
'220484': 'Bowl of Pulsing Goo',
Expand Down Expand Up @@ -29058,6 +29061,7 @@ export const wowItemsMap: Record<string, string> = {
'222744': 'Cinder Nectar',
'222745': 'Pep-In-Your-Step',
'222747': 'Rockslide Shake',
'222748': 'Sticky Sweet Treat',
'222749': 'Melted Candlebar',
'222784': 'Hearty Chippy Tea',
'222789': 'Spool of Duskthread --- Quality 1',
Expand Down Expand Up @@ -29100,8 +29104,9 @@ export const wowItemsMap: Record<string, string> = {
'222868': 'Dawnthread Lining --- Quality 1',
'222869': 'Dawnthread Lining --- Quality 2',
'222870': 'Dawnthread Lining --- Quality 3',
'222872': 'Duskthread Lining',
'222873': 'Duskthread Lining',
'222871': 'Duskthread Lining --- Quality 1',
'222872': 'Duskthread Lining --- Quality 2',
'222873': 'Duskthread Lining --- Quality 3',
'222876': 'Gritty Polishing Cloth --- Quality 1',
'222877': 'Gritty Polishing Cloth --- Quality 2',
'222878': 'Gritty Polishing Cloth --- Quality 3',
Expand Down Expand Up @@ -29615,6 +29620,15 @@ export const wowItemsMap: Record<string, string> = {
'225679': 'Design: Enduring Bloodstone',
'225680': 'Design: Cognitive Bloodstone',
'225681': 'Design: Determined Bloodstone',
'225720': "Web Acolyte's Hood",
'225721': 'Prime Slime Slippers',
'225722': 'Adorned Lynxborne Pauldrons',
'225723': "Venom Stalker's Strap",
'225724': "Shrillwing Hunter's Prey",
'225725': "Lurking Marauder's Binding",
'225727': "Captured Earthen's Ironhorns",
'225728': "Acidic Attendant's Loop",
'225744': "Heritage Militia's Stompers",
'225752': 'Dornogal Defender',
'225753': "Dornogal Guard's Splitter",
'225754': "Dornogal Guard's Hammer",
Expand Down Expand Up @@ -29835,6 +29849,7 @@ export const wowItemsMap: Record<string, string> = {
'228430': 'Mucky Rock',
'228431': 'Rock Buddy',
'228452': 'Deepest, Darkest Black Ink',
'228453': 'Extra Large Bag of Popped Pebbles',
'228454': "Collector's Commemorative Proscenium Playbill",
'228455': 'Bolt of Bouldercloth',
'228456': 'Bouldercloth',
Expand Down

0 comments on commit cf27a68

Please sign in to comment.