Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Teams Complex Widget #565

Open
wants to merge 140 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
140 commits
Select commit Hold shift + click to select a range
5d68620
add complex team widget and display multiple levels
nh758 Sep 9, 2024
ca634dc
use new settings to display node name and select top
nh758 Sep 10, 2024
2b0f411
add drag & drop editting
nh758 Sep 10, 2024
a14c734
wip styling
nh758 Sep 11, 2024
85670b2
add new teams
nh758 Sep 25, 2024
3a8f21c
add ability to edit teams
nh758 Sep 27, 2024
6453843
add ability to delete teams
nh758 Sep 27, 2024
7b82d5e
move actions to buttons on the team node
nh758 Sep 30, 2024
e857438
add unit tests
nh758 Oct 3, 2024
2bf6e85
update core
nh758 Oct 4, 2024
963d6b4
[wip] initial Netsuite object definitions
Hiro-Nakamura Oct 11, 2024
772201b
Add node content and display
Oct 15, 2024
a17fb78
Merge nh branch
Oct 15, 2024
d1c025e
[wip] base netsuite objects perform CRUD operations
Hiro-Nakamura Oct 16, 2024
de000a0
Merge commit '4f5b6008026dfd181d29b5be260488a035ff08ff' into jh/Netsuite
Hiro-Nakamura Oct 16, 2024
e4941d3
[wip] make sure API objects don't trigger DB migrations
Hiro-Nakamura Oct 18, 2024
2c07c2f
fix edit checkbox field in grid
nh758 Oct 7, 2024
c2d247a
style node by startegy & edit strategy
nh758 Oct 21, 2024
de74242
update core
nh758 Oct 21, 2024
1f2a182
update tests to cover strategy color
nh758 Oct 21, 2024
5bffd41
[fix] reference the PK() instead of hardcoding a `uuid` lookup value
Hiro-Nakamura Oct 22, 2024
e3a06ba
add team filtering options
nh758 Oct 23, 2024
b6e443e
test the team filter
nh758 Oct 24, 2024
4d743fe
apply strategy style on add/edit team
nh758 Oct 24, 2024
f333d0a
fix unit tests
nh758 Oct 25, 2024
b75d027
WIP
Oct 28, 2024
8125d05
Merge nh/teams-chart and fix conflict
Oct 29, 2024
36b1e0e
Fix the dropToCreate bug
Oct 29, 2024
d9adbc3
Merge commit 'aacbbda43f1d36c545d9b84eea6b8a09d0f524f4' into jh/Netsuite
Hiro-Nakamura Oct 30, 2024
f9a5d46
WIP
Oct 30, 2024
5e7b0a4
Merge commit '3d69e541f3c26b6472b95f0c7bca4f95ae49c25c' into jh/Netsuite
Hiro-Nakamura Oct 31, 2024
e5e7fa2
Merge commit 'fc32f2415ad5ec6ff78aedd18025ea3a342970e0' into jh/Netsuite
Hiro-Nakamura Nov 1, 2024
9b0d982
[wip] Netsuite objects respond to an Object Info request
Hiro-Nakamura Nov 3, 2024
c53c588
[fix] comparison between old and new values to be reduced to PKs
Hiro-Nakamura Nov 3, 2024
d0cc8d2
[sync] with core
Hiro-Nakamura Nov 3, 2024
27c1592
Merge commit 'de3008cae837f227f554fbb9facc70223722335b' into jh/Netsuite
Hiro-Nakamura Nov 6, 2024
2d16b4b
Merge master
Nov 6, 2024
183c447
Drag and drop content
Nov 18, 2024
e9c4068
Merge commit '27037015d1270c1c57dee0002477fee4b0dbe8f4' into jh/Netsuite
Hiro-Nakamura Nov 18, 2024
8a53b7d
Merge commit 'f333d0aa5440f035d5c9435666ebe77c775f717e' into jh/Netsuite
Hiro-Nakamura Nov 18, 2024
1cb989d
Merge pull request #583 from digi-serve/guy/team-widget
nh758 Nov 18, 2024
5efe68a
Merge branch 'nh/teams-chart' into jh/Netsuite
nh758 Nov 18, 2024
feaf532
Team Widget can edit assignments
Nov 19, 2024
f291eee
Fix not declared param bug
Nov 19, 2024
4f82b22
Fix the compared value bug
Nov 19, 2024
c7d7ea2
Merge commit '90c3d2063e62737d9f4e23fa85982035d668aaaf' into jh/Netsuite
Hiro-Nakamura Nov 20, 2024
38d286a
Merge pull request #586 from digi-serve/guy/team-widget
guyyoo Nov 20, 2024
f25ad89
Fix extra rendering node bug and prevent droping nodes in content area
Nov 21, 2024
9547b7f
Merge pull request #588 from digi-serve/guy/team-widget
guyyoo Nov 21, 2024
12beedf
update core
nh758 Nov 21, 2024
972024a
Merge pull request #584 from digi-serve/jh/Netsuite
nh758 Nov 21, 2024
2464b5a
fix data types to match real data
nh758 Nov 22, 2024
2534ea9
work on chart loading performance
nh758 Nov 22, 2024
5c5085c
Merge pull request #589 from digi-serve/nh/team-fixes
nh758 Nov 22, 2024
e3a6dab
[WIP] Content filter
Nov 25, 2024
5a7afde
Merge latest nh/teams-chart
Nov 25, 2024
278e43c
Fix dropping content data
Nov 25, 2024
d74b55c
Fix typo
Nov 25, 2024
266249f
Merge pull request #590 from digi-serve/guy/team-widget
guyyoo Nov 25, 2024
766aa7c
Merge branch 'master' into nh/teams-chart
nh758 Nov 26, 2024
92b6b3d
Data pannel displayed by object label reference
Nov 26, 2024
c2b0622
Merge branch 'nh/teams-chart' into guy/team-widget
Nov 26, 2024
4406b9d
Adjust list's item position
Nov 26, 2024
1528b17
add entity and attach to creates
nh758 Nov 26, 2024
e8342f0
Content filter and fix the collapse team node bug
Nov 27, 2024
80e419a
Merge branch 'nh/teams-chart' into guy/team-widget
Nov 27, 2024
96bd860
Mapping data and types
Nov 28, 2024
e4d7ef7
Merge pull request #593 from digi-serve/guy/team-widget
guyyoo Nov 28, 2024
3add1c2
Add start date and end date fields
Dec 3, 2024
779e36e
Merge pull request #595 from digi-serve/guy/team-widget
guyyoo Dec 3, 2024
900d34d
UI improvements
Dec 4, 2024
c9a56f5
fix strategy on add/edit team
nh758 Nov 27, 2024
86035de
fix can inactivate logic
nh758 Nov 28, 2024
eab25a5
Merge pull request #596 from digi-serve/guy/team-widget
guyyoo Dec 4, 2024
b1c8011
Fix label and fix limit edit form's fields
Dec 6, 2024
683f1a6
Fix the edit assignment issue
Dec 9, 2024
68b9eac
Merge pull request #597 from digi-serve/guy/team-widget
guyyoo Dec 9, 2024
27f457a
fix only show sstrategies from the selected entity
nh758 Dec 6, 2024
6cf49d0
style edit team form to match widget
nh758 Dec 6, 2024
0461163
disable team edit/add submit until form is valid
nh758 Dec 6, 2024
1077b13
use sub strategy code for strategy label
nh758 Dec 9, 2024
002fc24
fix filter by strategy and cleanup filter ui
nh758 Dec 9, 2024
a67cd54
Still get undefined columns
Dec 9, 2024
b8700c3
Merge pull request #600 from digi-serve/guy/team-widget
guyyoo Dec 9, 2024
3fd6143
add loading ui
nh758 Dec 11, 2024
ec09d1b
prevent uncessary call to cursorChange when populating
nh758 Dec 11, 2024
04fd164
drop moves assingment without chart refresh
nh758 Dec 12, 2024
b52c56e
move content ui to it's own function
nh758 Dec 12, 2024
81865fe
drag from sidebar doesn not refresh the whole chart
nh758 Dec 13, 2024
b18f2fd
Hardcode date end filter includes null value
Dec 13, 2024
12cf5e6
Sort fields on the editing assignment page
Dec 15, 2024
99c53d2
New hiding popup logic
Dec 17, 2024
f11e2ab
Change Submit to Save
Dec 17, 2024
c73b16a
Fix missing popup logic
Dec 17, 2024
212fb43
Hardcode date start filter includes NOT NULL values
Dec 17, 2024
c7a0c0b
PK could be a string of a number
Dec 17, 2024
34a7a24
Fix team UI layouts
Dec 18, 2024
b8304a6
reduce requests to load content data
nh758 Dec 18, 2024
82bf263
Merge pull request #603 from digi-serve/guy/team-widget
guyyoo Dec 18, 2024
4bbbe63
Disable the zoom feature
Dec 20, 2024
ec633bd
Merge nh/teams-chart
Dec 20, 2024
571fd18
Merge nh/teams-performance, fix data update and date type bugs
Dec 23, 2024
e3959ff
Fix connection field rendering in content form
Dec 23, 2024
2d074dc
Close popup method, the drop from panel bug, hardcode for the employe…
Dec 23, 2024
6b3e0f8
Save position when chart is refreshed
Dec 24, 2024
83ddc34
Sort and update the panel after update
Dec 24, 2024
f118d5a
Fix styles
Dec 24, 2024
cb64885
Add confirm popup for changing content form data
Dec 24, 2024
b989584
Fix bug the chart does not load sometimes
Dec 24, 2024
4df800b
Merge pull request #606 from digi-serve/guy/team-widget
guyyoo Dec 24, 2024
257292b
Merge pull request #605 from digi-serve/nh/teams-performance
guyyoo Dec 24, 2024
0538d1f
Fix bug typo and some performance improvements
Dec 24, 2024
09aca4f
Merge pull request #607 from digi-serve/guy/team-widget
guyyoo Dec 24, 2024
e5461ee
Paging and optimizing the data panel load
Dec 26, 2024
53ca533
Improving performance and refreshing data panels
Jan 2, 2025
107c9ba
Fix css
Jan 2, 2025
f6ee1b6
Merge pull request #608 from digi-serve/guy/team-widget
guyyoo Jan 2, 2025
19901c8
Optimize and fix paging bugs, the entity cursor
Jan 3, 2025
7f386f6
Optimize render and refresh and the changing cursor
Jan 5, 2025
10d3b5b
Merge branch 'master' into nh/teams-chart
nh758 Jan 6, 2025
5fbf453
Merge branch 'master' into nh/teams-chart
nh758 Jan 6, 2025
b19c891
Refactor the filter feature
Jan 6, 2025
f411292
Merge pull request #611 from digi-serve/guy/team-widget
guyyoo Jan 7, 2025
3a7fb09
apply styles to the data panel
nh758 Jan 8, 2025
6767c64
resize widget when screen changes
nh758 Jan 8, 2025
b8abc55
fix populating filter complex ui with in query filters
nh758 Jan 8, 2025
f14fbe3
fix populating filter complex ui with in query filters
nh758 Jan 8, 2025
a5bc9aa
Merge branch 'master' into nh/teams-panel-style
nh758 Jan 8, 2025
f506bf7
Merge pull request #612 from digi-serve/nh/teams-panel-style
nh758 Jan 8, 2025
45fb608
Fix the typo bug, End Date validation, form type convertion and warni…
Jan 8, 2025
f791e82
Merge pull request #614 from digi-serve/guy/team-widget
guyyoo Jan 9, 2025
df70f49
Fix the new data panel list render bugs
Jan 9, 2025
08e15a6
Merge pull request #616 from digi-serve/guy/team-widget
guyyoo Jan 9, 2025
efea240
Hide inactive data
Jan 9, 2025
b8517e7
Merge pull request #617 from digi-serve/guy/team-widget
guyyoo Jan 9, 2025
9062cbd
Fix empty chartData error, Change data panel filter by tab label -> t…
Jan 9, 2025
a200f5b
Hot fix for lost data DC
Jan 9, 2025
5a42636
Merge pull request #618 from digi-serve/guy/team-widget
guyyoo Jan 9, 2025
2c979aa
sort drop down by label and allow type to filter
nh758 Jan 9, 2025
3378540
Merge pull request #619 from digi-serve/nh/data-select-sort
nh758 Jan 10, 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
Prev Previous commit
Next Next commit
add drag & drop editting
  • Loading branch information
nh758 committed Sep 10, 2024
commit 2b0f4113a8ac7496dde77c6fac02484b352cc53d
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,15 @@ module.exports = class ABViewOrgChartTeamsComponent extends ABViewComponent {
async displayOrgChart() {
const baseView = this.view;
const chartData = this.AB.cloneDeep(this.chartData);
const draggable = baseView.settings.draggable == 1;

const orgchart = new this.OrgChart({
data: chartData,
direction: baseView.settings.direction,
// depth: baseView.settings.depth,
pan: baseView.settings.pan,
zoom: baseView.settings.zoom,
pan: baseView.settings.pan == 1,
zoom: baseView.settings.zoom == 1,
draggable,
// visibleLevel: baseView.settings.visibleLevel,

exportButton: baseView.settings.export,
Expand All @@ -93,6 +95,26 @@ module.exports = class ABViewOrgChartTeamsComponent extends ABViewComponent {
nodeContent: "description",
});

if (draggable) {
// On drop update the parent (dropZone) of the node
orgchart.addEventListener("nodedropped.orgchart", (event) => {
const dragNode = JSON.parse(
event.detail.draggedNode.dataset.source
);
const dropNode = JSON.parse(event.detail.dropZone.dataset.source);
const dragRecord = dragNode._rawData;
const dropID = dropNode._rawData.id;

const linkField = this.getSettingField("teamLink");
const parent = this.AB.definitionByID(
linkField.settings.linkColumn
);
dragRecord[parent.columnName] = dropID;

this.datacollection.model.update(dragRecord.id, dragRecord);
});
}

const chartDom = document.querySelector(`#${this.ids.chartDom}`);
if (chartDom) {
chartDom.textContent = "";
Expand Down Expand Up @@ -120,13 +142,8 @@ module.exports = class ABViewOrgChartTeamsComponent extends ABViewComponent {
}
if (!topNode) return null;

const teamLink = this.AB.definitionByID(
view.settings.teamLink
)?.columnName;

const teamName = this.AB.definitionByID(
view.settings.teamName
)?.columnName;
const teamLink = this.getSettingField("teamLink").columnName;
const teamName = this.getSettingField("teamName").columnName;

const chartData = this.chartData;
chartData.name = topNode[teamName] ?? "";
Expand Down Expand Up @@ -164,6 +181,15 @@ module.exports = class ABViewOrgChartTeamsComponent extends ABViewComponent {
return this._chartData;
}

/**
* Get the ABField from settings
* @param {string} setting key in this.view.settings - should be an id for an
* ABField
*/
getSettingField(setting) {
return this.AB.definitionByID(this.view.settings[setting]);
}

_setColor() {
const view = this.view;
let doms = document.querySelectorAll(`org-chart`);
Expand Down
Loading