Add Mode.addPointToGroup
parent
2ea676fcdd
commit
9725b00d4b
|
@ -142,4 +142,5 @@ export enum Mode {
|
|||
moveTo = "moveTo",
|
||||
createPoint = "createPoint",
|
||||
templateView = "templateView",
|
||||
addPointToGroup = "addPointToGroup"
|
||||
}
|
||||
|
|
|
@ -289,6 +289,10 @@ export const transformForQuadrant =
|
|||
export const getMode = (): Mode => {
|
||||
const pathArray = getPathArray();
|
||||
if (pathArray) {
|
||||
console.log(JSON.stringify(pathArray));
|
||||
if ((pathArray[3] === "groups") && pathArray[4]) {
|
||||
return Mode.addPointToGroup;
|
||||
}
|
||||
if (pathArray[6] === "add") { return Mode.clickToAdd; }
|
||||
if (!isNaN(parseInt(pathArray.slice(-1)[0]))) { return Mode.editPlant; }
|
||||
if (pathArray[5] === "edit") { return Mode.editPlant; }
|
||||
|
|
|
@ -133,7 +133,9 @@ export class GroupDetail extends React.Component<GroupDetailProps, State> {
|
|||
<h5>{t("GROUP NAME")}</h5>
|
||||
<input defaultValue={this.name} />
|
||||
<h5>{t("GROUP MEMBERS ({{count}})", { count: this.icons.length })}</h5>
|
||||
{this.icons}
|
||||
<div>
|
||||
{this.icons}
|
||||
</div>
|
||||
<DeleteButton
|
||||
dispatch={this.props.dispatch}
|
||||
uuid={group.uuid}
|
||||
|
|
|
@ -60,7 +60,6 @@ function route<T, U>(info: UnboundRouteConfig<T, U>) {
|
|||
try {
|
||||
const comp = (await info.getModule())[info.key];
|
||||
if (info.children) {
|
||||
console.log(x.params);
|
||||
const child = (await info.getChild())[info.childKey];
|
||||
callback(comp, child, info);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue