Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
3569bce
add complex teams widget
nh758 Sep 9, 2024
1e4f0e2
add options for node name and top node selection
nh758 Sep 10, 2024
dc09c40
add drag & drop setting
nh758 Sep 10, 2024
91ee738
add setting fields for inactive, canInactivate
nh758 Oct 3, 2024
1f0abaa
[wip] initial Netsuite object definitions
Hiro-Nakamura Oct 11, 2024
e3540da
Add node content and display
Oct 15, 2024
976c208
Merge nh branch
Oct 17, 2024
6b338d4
[wip] initial connection declarations
Hiro-Nakamura Oct 18, 2024
aa0e664
add properties to color team node by strategy
nh758 Oct 11, 2024
39e2a88
[wip] modify existing Object workspace add connect field to work with…
Hiro-Nakamura Oct 22, 2024
f5ac003
Merge commit 'c2b2d8ad01c3b8d42ce68801e712bb668a07153f' into jh/Netsuite
Hiro-Nakamura Oct 22, 2024
4dcfdb2
The option for content to update exist data/create new data
Oct 28, 2024
e85f863
Merge nh/teams-chart and fix conflict
Oct 29, 2024
c7b0919
Merge commit 'c32801477e557ca42685178807b49f25c0d71172' into jh/Netsuite
Hiro-Nakamura Oct 30, 2024
3f042ec
[wip] capturing information about many:many connections
Hiro-Nakamura Nov 3, 2024
cd8e54e
[wip] additional info for many:many connections
Hiro-Nakamura Nov 6, 2024
88a6094
Merge branch 'master' into guy/team-widget
Nov 6, 2024
7606753
Data panel settings and group title settings
Nov 13, 2024
eaf5cee
Merge commit '53b99e50531c7186a65c6c10186f8751305d4174' into jh/Netsuite
Hiro-Nakamura Nov 18, 2024
ee3beb5
Merge commit 'aa0e664bb433588ecfe3796232cbea1e00e7d56b' into jh/Netsuite
Hiro-Nakamura Nov 18, 2024
6d2a437
Merge pull request #271 from digi-serve/guy/team-widget
nh758 Nov 18, 2024
9f3d00e
Merge branch 'nh/teams-chart' into jh/Netsuite
nh758 Nov 18, 2024
e134f7a
[wip] enable labels on api objects, fill out missing many:many inform…
Hiro-Nakamura Nov 20, 2024
5b14f56
Merge branch 'master' into jh/Netsuite
nh758 Feb 19, 2025
a35f9c7
remove orgchart view (moved to plugin)
nh758 Feb 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/rootPages/Designer/editors/EditorManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
import _ABViewDefault from "./views/_ABViewDefault";

export default function (AB) {
export default function(AB) {
const Editors = [];
// {array}
// All the ABField Component Inerfaces available.
Expand Down Expand Up @@ -34,7 +34,6 @@ export default function (AB) {
require("./views/ABViewLabel"),
require("./views/ABViewLayout"),
require("./views/ABViewMenu"),
require("./views/ABViewOrgChart"),
require("./views/ABViewPage"),
require("./views/ABViewPDFImporter"),
require("./views/ABViewPivot"),
Expand All @@ -59,7 +58,7 @@ export default function (AB) {
* A filter for limiting which editor you want.
* @return [{ClassUI(Editor1)}, {ClassUI(Editor2)}, ...]
*/
editors: function (f = () => true) {
editors: function(f = () => true) {
return Editors.filter(f);
},
};
Expand Down
53 changes: 0 additions & 53 deletions src/rootPages/Designer/editors/views/ABViewOrgChart.js

This file was deleted.

11 changes: 5 additions & 6 deletions src/rootPages/Designer/properties/PropertyManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import ABView from "./views/ABView";

var PropertyMgr = null;

export default function (AB) {
export default function(AB) {
if (!PropertyMgr) {
var Fields = [];
// {array}
Expand Down Expand Up @@ -110,7 +110,6 @@ export default function (AB) {
require("./views/ABViewLayout"),
require("./views/ABViewList"),
require("./views/ABViewMenu"),
require("./views/ABViewOrgChart"),
require("./views/ABViewPage"),
require("./views/ABViewPDFImporter"),
require("./views/ABViewPivot"),
Expand Down Expand Up @@ -161,19 +160,19 @@ export default function (AB) {
* A filter for limiting which fields you want.
* @return [{ClassUI(Field1)}, {ClassUI(Field2)}, ...]
*/
fields: function (f = () => true) {
fields: function(f = () => true) {
return Fields.filter(f);
},

processElements: function (f = () => true) {
processElements: function(f = () => true) {
return Processes.filter(f);
},

views: function (v = () => true) {
views: function(v = () => true) {
return Views.filter(v);
},

mobileViews: function (v = () => true) {
mobileViews: function(v = () => true) {
return MobileViews.filter(v);
},
};
Expand Down
107 changes: 105 additions & 2 deletions src/rootPages/Designer/properties/dataFields/ABFieldConnect.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ export default function (AB) {
indexField: "",
indexField2: "",

netsuite_one: "",
netsuiteOneLabel: "",
netsuiteOneColumn: "",

netsuite_many: "",

connectDataPopup: "",
});
}
Expand Down Expand Up @@ -237,6 +243,37 @@ export default function (AB) {
},
},
},
{
view: "layout",
id: ids.netsuite_one,
hidden: true,
cols: [
{
id: ids.netsuiteOneLabel,
view: "label",
label: L(" <b>[Select object]</b>'s field"),
width: 300,
},
{
id: ids.netsuiteOneColumn,
name: "netsuiteOneColumn",
disallowEdit: true,
view: "richselect",
// value: FC.defaultValues().linkViaType,
// width: 200,
fillspace: true,
options: [],
on: {
// onChange: (newV, oldV) => {
// this.selectLinkViaType(newV, oldV);
// },
onAfterRender: function () {
ABField.CYPRESS_REF(this);
},
},
},
],
},
]);
}

Expand Down Expand Up @@ -295,6 +332,7 @@ export default function (AB) {
$fieldLink2.refresh();

this.updateCustomIndex();
this.checkNetsuiteObjects();
}

show() {
Expand Down Expand Up @@ -387,13 +425,19 @@ export default function (AB) {
const options = [];
// if an ABApplication is set then load in the related objects
const application = this.CurrentApplication;

// if this is a Netsuite Object, just gather other Netsuite Objs
let objFilter = () => true;
if (this.CurrentObject.isNetsuite) {
objFilter = (o) => o.isNetsuite;
}
if (application) {
application.objectsIncluded().forEach((o) => {
application.objectsIncluded(objFilter).forEach((o) => {
options.push({ id: o.id, value: o.label });
});
} else {
// else load in all the ABObjects
this.AB.objects().forEach((o) => {
this.AB.objects(objFilter).forEach((o) => {
options.push({ id: o.id, value: o.label });
});
}
Expand Down Expand Up @@ -449,6 +493,7 @@ export default function (AB) {
$field.refresh();

this.updateCustomIndex();
this.checkNetsuiteObjects();
}

selectObjectTo(newValue, oldValue) {
Expand All @@ -474,6 +519,8 @@ export default function (AB) {
$$(ids.link2).show();

this.updateCustomIndex();

this.checkNetsuiteObjects();
}

updateCustomIndex() {
Expand Down Expand Up @@ -578,6 +625,62 @@ export default function (AB) {

this.checkCustomFK();
}

async checkNetsuiteObjects() {
let ids = this.ids;
if (!this.CurrentObject.isNetsuite) {
$$(ids.netsuite_one)?.hide();
$$(ids.netsuite_many)?.hide();
return;
}

let linkType = $$(ids.linkType).getValue();
let linkViaType = $$(ids.linkViaType).getValue();

if (linkType == "one") {
await this.updateNetsuiteOneUI(this.CurrentObject);
$$(ids.netsuite_one)?.show();
$$(ids.netsuite_many)?.hide();
} else if (linkViaType == "one") {
// fill label and Drop list with object in Droplist
let objID = $$(ids.linkObject).getValue();
let connObj = this.AB.objectByID(objID);
if (!connObj) return;
await this.updateNetsuiteOneUI(connObj);
$$(ids.netsuite_one)?.show();
$$(ids.netsuite_many)?.hide();
} else {
// this is many:many
$$(ids.netsuite_one)?.hide();
$$(ids.netsuite_many)?.show();
}
}

async updateNetsuiteOneUI(object) {
let ids = this.ids;

// fill label and Drop list with Current Object
$$(ids.netsuiteOneLabel).setValue(
L(" <b>{0}</b>'s field", [object.label])
);

let result = await this.AB.Network.get({
url: `/netsuite/table/${object.tableName}`,
params: {
credentials: JSON.stringify(object.credentials),
},
});
let fields = result.filter((r) => r.type == "object");
let options = fields.map((f) => {
return {
id: f.column,
value: f.column,
};
});

$$(ids.netsuiteOneColumn).define("options", options);
$$(ids.netsuiteOneColumn).refresh();
}
}

return ABFieldConnectProperty;
Expand Down
Loading
Loading