mirror of
https://github.com/exzork/gc-tools.git
synced 2024-11-21 14:48:33 +00:00
support new camelCase naming
This commit is contained in:
parent
a5bfdcc266
commit
13da38c55a
@ -80,12 +80,12 @@ export default function Artifacts() {
|
|||||||
|
|
||||||
const handleMainStatChange = (event: any, value: any) => {
|
const handleMainStatChange = (event: any, value: any) => {
|
||||||
if (value !== null) {
|
if (value !== null) {
|
||||||
setSelectedMainStat(value.Id);
|
setSelectedMainStat(value.id);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const getAffixIdByPropTypeAndPropValue = (propType: string, propValue: number) => {
|
const getAffixIdByPropTypeAndPropValue = (propType: string, propValue: number) => {
|
||||||
return reliquaryAffixes.filter((x) => x.PropType === propType && x.PropValue === propValue)[0].Id;
|
return reliquaryAffixes.filter((x) => x.propType === propType && x.propValue === propValue)[0].id;
|
||||||
};
|
};
|
||||||
|
|
||||||
const getListOfIdsByPropTypeAndRequestValue = (affixName: string, requestValue: number) => {
|
const getListOfIdsByPropTypeAndRequestValue = (affixName: string, requestValue: number) => {
|
||||||
@ -146,10 +146,10 @@ export default function Artifacts() {
|
|||||||
const getPropTypeValues = (affixes: IReliquaryAffix[]) => {
|
const getPropTypeValues = (affixes: IReliquaryAffix[]) => {
|
||||||
let propTypeValues: IPropTypeValues = {};
|
let propTypeValues: IPropTypeValues = {};
|
||||||
affixes.forEach(affix => {
|
affixes.forEach(affix => {
|
||||||
if (propTypeValues[affix.PropType] === undefined) {
|
if (propTypeValues[affix.propType] === undefined) {
|
||||||
propTypeValues[affix.PropType] = [];
|
propTypeValues[affix.propType] = [];
|
||||||
}
|
}
|
||||||
if (affix.PropValue > 0) propTypeValues[affix.PropType].push(affix.PropValue);
|
if (affix.propValue > 0) propTypeValues[affix.propType].push(affix.propValue);
|
||||||
});
|
});
|
||||||
return propTypeValues;
|
return propTypeValues;
|
||||||
};
|
};
|
||||||
@ -237,7 +237,7 @@ export default function Artifacts() {
|
|||||||
aria-label="Artifact Main Stats" id="ArtifactMainStats"
|
aria-label="Artifact Main Stats" id="ArtifactMainStats"
|
||||||
className="block w-full shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm border-gray-300 rounded-md"
|
className="block w-full shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm border-gray-300 rounded-md"
|
||||||
options={reliquaryMains}
|
options={reliquaryMains}
|
||||||
getOptionLabel={(option) => t(option.PropType)}
|
getOptionLabel={(option) => t(option.propType)}
|
||||||
onChange={handleMainStatChange}
|
onChange={handleMainStatChange}
|
||||||
renderInput={(params) => <TextField {...params} label="Main Stats"
|
renderInput={(params) => <TextField {...params} label="Main Stats"
|
||||||
variant="outlined"/>}
|
variant="outlined"/>}
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
export interface IReliquaryMain {
|
export interface IReliquaryMain {
|
||||||
Id: number;
|
id: number;
|
||||||
PropDepotId: number;
|
propDepotId: number;
|
||||||
PropType:string;
|
propType:string;
|
||||||
AffixName:string;
|
affixName:string;
|
||||||
}
|
}
|
||||||
export interface IReliquaryAffix {
|
export interface IReliquaryAffix {
|
||||||
Id: number;
|
id: number;
|
||||||
DepotId: number;
|
depotId: number;
|
||||||
GroupId: number;
|
groupId: number;
|
||||||
PropType:string;
|
propType:string;
|
||||||
PropValue:number;
|
propValue:number;
|
||||||
}
|
}
|
||||||
export default class ReliquaryDataProvider {
|
export default class ReliquaryDataProvider {
|
||||||
private static reliquaryMains:IReliquaryMain[] = [];
|
private static reliquaryMains:IReliquaryMain[] = [];
|
||||||
@ -25,7 +25,7 @@ export default class ReliquaryDataProvider {
|
|||||||
let json:IReliquaryMain[] = await data.json();
|
let json:IReliquaryMain[] = await data.json();
|
||||||
this.reliquaryMains = [];
|
this.reliquaryMains = [];
|
||||||
json.forEach(element => {
|
json.forEach(element => {
|
||||||
if (this.reliquaryMains.filter(x => x.PropType === element.PropType).length === 0)
|
if (this.reliquaryMains.filter(x => x.propType === element.propType).length === 0)
|
||||||
this.reliquaryMains.push(element)
|
this.reliquaryMains.push(element)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user