Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
b14a553
feat(icon): Add directory icon
jon-nfc Sep 9, 2025
a04255a
fix(layout): dont begin rendering detail page until data is available
jon-nfc Sep 11, 2025
1350a22
fix(layout): dont begin rendering detail notes tab unless ob notes tab
jon-nfc Sep 11, 2025
c496add
fix(component): when loading table, dont fetch data if loader data pa…
jon-nfc Sep 11, 2025
3345552
fix(component): Dont begin to render tables until data available
jon-nfc Sep 11, 2025
7b772d9
fix(component): when handling menu click, get element within handler
jon-nfc Sep 11, 2025
7ed2b66
feat(component): Add icon Employee
jon-nfc Oct 11, 2025
a639cad
feat(component): Add icon Human Resources
jon-nfc Oct 11, 2025
40dd924
feat(component): Add icon Customer
jon-nfc Oct 11, 2025
f6b03c0
fix(component): dont show reply box unless the comment is a thread
jon-nfc Oct 18, 2025
896e326
fix(component): Correct row vertical alignment for dependent tickets
jon-nfc Nov 18, 2025
0e9c81b
feat(component): Add Delete Icon so users can remove dependent tickets
jon-nfc Nov 18, 2025
896997f
feat(base): For the delete icon, set cursor to pointer to denote link
jon-nfc Nov 18, 2025
6af489f
feat(component): Add Delete Icon so users can remove objects linked t…
jon-nfc Nov 18, 2025
f6434b0
feat(base): update dep js-yaml 4.1.0 -> 4.1.1
jon-nfc Nov 19, 2025
6aa1f0f
feat(layout): set detail layout document title to metadata.name
jon-nfc Nov 23, 2025
6719d3e
feat(layout): set list layout document title to metadata.name
jon-nfc Nov 23, 2025
a54718e
fix(component): use value attr instead of children
jon-nfc Nov 23, 2025
1e7338f
refactor(component): use a tickets urls._self
jon-nfc Nov 23, 2025
7e6ef5e
chore(component): Sections css set with `flex-grow: 0`
jon-nfc Nov 23, 2025
89a568b
feat(layout): set ticket layout document title to metadata.name
jon-nfc Nov 23, 2025
ad3e590
feat(layout): When loading ticket comments, check comment type to loa…
jon-nfc Nov 23, 2025
2f3b944
chore(hook): add a param as temp flag for apiFetch
jon-nfc Nov 23, 2025
ab04c7a
feat(component): When loading a ticket comment that has no metdata, f…
jon-nfc Nov 23, 2025
b912fb9
refactor(component): Update TicketCommentForm and TicketComment
jon-nfc Nov 23, 2025
6a29029
refactor(layout): Update Ticket
jon-nfc Nov 23, 2025
77361d0
refactor(component): Update RelatedTicket
jon-nfc Nov 23, 2025
a2a6755
chore(style): prevent overlap in ticket sidebar
jon-nfc Nov 23, 2025
5e4c22c
fix(component): Correctly set ticket sections that should not grow
jon-nfc Nov 23, 2025
f83f3c5
fix(style): Dont wrap text inside a badge
jon-nfc Nov 23, 2025
fb8f206
refactor: use same code for ticket comment threads
jon-nfc Nov 25, 2025
5ae129d
refactor(component): Dont fetch comments in comment component
jon-nfc Nov 27, 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
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions src/components/IconLoader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ import ITOps from "./icons/itops";
import Tenant from "./icons/Tenant";
import Role from "./icons/Role";
import User from "./icons/User";
import DirectoryIcon from "./icons/Directory";
import Employee from "./icons/Employee";
import Customer from "./icons/Customer";
import HumanResources from "./icons/HumanResources";


const icon_components = {
Expand All @@ -79,22 +83,26 @@ const icon_components = {
config_group: ConfigManagementIcon,
config_management: ConfigManagementIcon,
copy: CopyIcon,
customer: Customer,
device_status_bad: InventoryStatusBadIcon,
device_status_ok: InventoryStatusOkIcon,
device_status_unk: InventoryStatusUknIcon,
device_status_warn: InventoryStatusWarnIcon,
devops: CodeIcon,
directory: DirectoryIcon,
documentation: Documentation,
reply: ReplyIcon,
delete: DeleteIcon,
device: DeviceIcon,
edit: EditIcon,
employee: Employee,
feature_flag: FeatureFlag,
git: Git,
github: GitHub,
gitlab: GitLab,
help: HelpIcon,
history: HistoryIcon,
human_resources: HumanResources,
information: InformationIcon,
kb: InformationIcon,
itam: ItamIcon,
Expand Down
5 changes: 3 additions & 2 deletions src/components/InlineFields.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -360,10 +360,11 @@ export const InlineFieldAction = async ({ request, params }) => {

const update = await apiFetch(
document.location.pathname,

null,
request.method,
form_data
form_data,
false,
false
)
.then(data => {

Expand Down
85 changes: 38 additions & 47 deletions src/components/Table.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const Table = ({

const API_SPLIT = String('api/v2')

const [loaded, setPageLoaded] = useState(false)
const [loaded, setPageLoaded] = useState(loader_data ? true : false)

const [metadata, setMetaData] = useState(null);

Expand All @@ -54,7 +54,6 @@ const Table = ({

useEffect(() => {

setPageLoaded(false)
setMetaData(loader_metadata)
setTableData(loader_data)
setPageNumberValue(1)
Expand Down Expand Up @@ -84,7 +83,6 @@ const Table = ({
}
}

setPageLoaded(true)

}, [
// loader_metadata,
Expand All @@ -94,8 +92,6 @@ const Table = ({

useEffect(() =>{

setPageLoaded(false)

let url = null

if( page !== 0 ) {
Expand All @@ -108,59 +104,58 @@ const Table = ({

}

apiFetch( url )
.then((result) => {
if( loaded === false || page !== 0 ) {
apiFetch( url )
.then((result) => {

if( result.status == 200 ) {

if( result.status == 200 ) {
if( result.api_metadata !== null ) {

if( result.api_metadata !== null ) {
setMetaData(result.api_metadata)

}

setTableData(result.api_page_data)

setMetaData(result.api_metadata)

}

setTableData(result.api_page_data)
if( Array(result.api_metadata.table_fields).length < 2 ) {

if( Array(result.api_metadata.table_fields).length < 2 ) {
console.error("Missing Table Fields")

console.error("Missing Table Fields")
}

}
if( SetContentHeaderIcon ) {

if( SetContentHeaderIcon ) {
SetContentHeaderIcon(
<>
{result.api_metadata['documentation'] &&
<Link to={result.api_metadata['documentation']} target="_new">
<IconLoader
name='help'
/>
</Link>
}
</>
)
}

SetContentHeaderIcon(
<>
{result.api_metadata['documentation'] &&
<Link to={result.api_metadata['documentation']} target="_new">
<IconLoader
name='help'
/>
</Link>
}
</>
)
}
if( callback ) {

if( callback ) {
callback(result.api_metadata.name)

callback(result.api_metadata.name)
}

}
if( page !== 0 ) {

setPageNumberValue(page)

if( page !== 0 ) {

setPageNumberValue(page)
}

setPageLoaded(true)
}

setPageLoaded(true)

}

})

)
}
}, [
page,
]);
Expand Down Expand Up @@ -199,9 +194,7 @@ const Table = ({

return (
<>
{ loaded &&
<>
{ metadata &&
{ loaded && (metadata && table_data) &&
<div>
{ metadata.allowed_methods.includes('POST') && (<Link to={String(metadata.urls.self).split(API_SPLIT)[1] + "/add"}><button className="common-field form">Add</button></Link>)}
<table>
Expand Down Expand Up @@ -502,8 +495,6 @@ const Table = ({
</div>
}
</>
}
</>
);
}

Expand Down
4 changes: 2 additions & 2 deletions src/components/form/Menu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,13 @@ const Menu = ({
const dropDownMenuId = useId();
const dropDownMenuItemsId = useId();

const dropDownMenu = document.getElementById(dropDownMenuId)

document.onclick = (e) => {
handleMenuClose(e)
}


const handleMenuClose = (e) => {
const dropDownMenu = document.getElementById(dropDownMenuId)

e.stopPropagation()

Expand All @@ -46,6 +45,7 @@ const Menu = ({


const handleMenuToggle = (e) => {
const dropDownMenu = document.getElementById(dropDownMenuId)

e.stopPropagation()

Expand Down
5 changes: 3 additions & 2 deletions src/components/form/Textarea.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,9 @@ const TextArea = ({
}

}}

>{value}</textarea>

value={value}
></textarea>
</>
)

Expand Down
14 changes: 14 additions & 0 deletions src/components/icons/Customer.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const Customer = ({
width = '20px',
height = '20px',
fill = '#FFF'
}) => {

return (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" width={ width } height={ height } fill={ fill }>
<path d="M480-480q-66 0-113-47t-47-113q0-66 47-113t113-47q66 0 113 47t47 113q0 66-47 113t-113 47ZM160-160v-112q0-34 17.5-62.5T224-378q62-31 126-46.5T480-440q66 0 130 15.5T736-378q29 15 46.5 43.5T800-272v112H160Zm80-80h480v-32q0-11-5.5-20T700-306q-54-27-109-40.5T480-360q-56 0-111 13.5T260-306q-9 5-14.5 14t-5.5 20v32Zm240-320q33 0 56.5-23.5T560-640q0-33-23.5-56.5T480-720q-33 0-56.5 23.5T400-640q0 33 23.5 56.5T480-560Zm0-80Zm0 400Z"/>
</svg>
);
}

export default Customer;
14 changes: 14 additions & 0 deletions src/components/icons/Directory.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const DirectoryIcon = ({
width = '20px',
height = '20px',
fill = '#FFF'
}) => {

return (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" width={ width } height={ height } fill={ fill }>
<path d="M440.5-500Q378-500 334-544.06 290-588.13 290-650q0-63 44.06-106.5Q378.13-800 440-800q63 0 106.5 43.5t43.5 106q0 62.5-43.5 106.5t-106 44Zm-.5-60q38 0 64-26.44T530-650q0-38-26-64t-63.5-26q-37.5 0-64 26T350-650.5q0 37.5 26.44 64T440-560ZM898-20 758-160q-23 17-47.5 23.5t-50.07 6.5q-71.01 0-120.72-49.62Q490-229.24 490-300.12t49.62-120.38q49.62-49.5 120.5-49.5t120.38 49.71Q830-370.58 830-299.57q0 25.57-6.5 50.07T800-202L940-62l-42 42ZM660-190q47 0 78.5-31.5T770-300q0-47-31.5-78.5T660-410q-47 0-78.5 31.5T550-300q0 47 31.5 78.5T660-190Zm-540 30v-94q0-37 17.5-63t50.5-43q47-23 122.5-43.5T464-419q-8 13-15 28.5T438-360q-78-1-136 18.5T212-306q-14 8-23 21.5t-9 30.5v34h258q11 17 20 31.5t20 28.5H120Zm320-490Zm-2 430Z"/>
</svg>
);
}

export default DirectoryIcon
14 changes: 14 additions & 0 deletions src/components/icons/Employee.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const Employee = ({
width = '20px',
height = '20px',
fill = '#FFF'
}) => {

return (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" width={ width } height={ height } fill={ fill }>
<path d="M480-480q-66 0-113-47t-47-113q0-66 47-113t113-47q66 0 113 47t47 113q0 66-47 113t-113 47ZM160-160v-112q0-34 17-62.5t47-43.5q60-30 124.5-46T480-440q67 0 131.5 16T736-378q30 15 47 43.5t17 62.5v112H160Zm320-400q33 0 56.5-23.5T560-640q0-33-23.5-56.5T480-720q-33 0-56.5 23.5T400-640q0 33 23.5 56.5T480-560Zm160 228v92h80v-32q0-11-5-20t-15-14q-14-8-29.5-14.5T640-332Zm-240-21v53h160v-53q-20-4-40-5.5t-40-1.5q-20 0-40 1.5t-40 5.5ZM240-240h80v-92q-15 5-30.5 11.5T260-306q-10 5-15 14t-5 20v32Zm400 0H320h320ZM480-640Z"/>
</svg>
);
}

export default Employee;
14 changes: 14 additions & 0 deletions src/components/icons/HumanResources.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const HumanResources = ({
width = '20px',
height = '20px',
fill = '#FFF'
}) => {

return (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" width={ width } height={ height } fill={ fill }>
<path d="M40-160v-112q0-34 17.5-62.5T104-378q62-31 126-46.5T360-440q66 0 130 15.5T616-378q29 15 46.5 43.5T680-272v112H40Zm720 0v-120q0-44-24.5-84.5T666-434q51 6 96 20.5t84 35.5q36 20 55 44.5t19 53.5v120H760ZM360-480q-66 0-113-47t-47-113q0-66 47-113t113-47q66 0 113 47t47 113q0 66-47 113t-113 47Zm400-160q0 66-47 113t-113 47q-11 0-28-2.5t-28-5.5q27-32 41.5-71t14.5-81q0-42-14.5-81T544-792q14-5 28-6.5t28-1.5q66 0 113 47t47 113ZM120-240h480v-32q0-11-5.5-20T580-306q-54-27-109-40.5T360-360q-56 0-111 13.5T140-306q-9 5-14.5 14t-5.5 20v32Zm240-320q33 0 56.5-23.5T440-640q0-33-23.5-56.5T360-720q-33 0-56.5 23.5T280-640q0 33 23.5 56.5T360-560Zm0 320Zm0-400Z"/>
</svg>
);
}

export default HumanResources;
Loading
Loading