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

chore: initial work #1

Open
wants to merge 153 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
153 commits
Select commit Hold shift + click to select a range
b3e34f0
chore: initial project setup
jon-nfc Sep 26, 2024
a51d723
feat: Add exception class
jon-nfc Sep 26, 2024
99bd1dd
feat(layout): Add detail layout
jon-nfc Sep 26, 2024
bff6e98
feat(layout): Add list layout
jon-nfc Sep 26, 2024
5949280
feat(layout): Add root layout
jon-nfc Sep 26, 2024
6187e38
feat(component): Add detail layout section and column
jon-nfc Sep 26, 2024
a759228
feat(component): Add page footer
jon-nfc Sep 26, 2024
1a70df6
feat(component): Add page header
jon-nfc Sep 26, 2024
b521fd2
feat(component): Add page navbar
jon-nfc Sep 26, 2024
650ba19
feat(component): Add details layout navtabs
jon-nfc Sep 26, 2024
eb03025
feat(layout): Initial Error Page
jon-nfc Sep 26, 2024
00b3398
feat(component): Add form field select
jon-nfc Sep 26, 2024
a23bd5d
feat(component): Add form field slider
jon-nfc Sep 26, 2024
36e464b
feat(component): Add form field text area
jon-nfc Sep 26, 2024
50b68b6
feat(component): Add field text
jon-nfc Sep 26, 2024
3c0fc86
feat(component): Add Icon Task
jon-nfc Sep 26, 2024
4401ec8
feat(component): Add Icon assistance
jon-nfc Sep 26, 2024
b2ae654
feat(component): Add Icon device
jon-nfc Sep 26, 2024
a317ede
feat(component): Add Icon edit
jon-nfc Sep 26, 2024
f7555d6
feat(component): Add Icon itam
jon-nfc Sep 26, 2024
727d194
feat(component): Add Icon menu
jon-nfc Sep 26, 2024
a6b8fa7
feat(component): Add Icon nav down
jon-nfc Sep 26, 2024
edec078
feat(component): Add Icon nav right
jon-nfc Sep 26, 2024
0cc49e8
feat(component): Add Icon organization
jon-nfc Sep 26, 2024
f007e14
feat(component): Add Icon reply
jon-nfc Sep 26, 2024
0ce7e14
feat(component): Add Icon software
jon-nfc Sep 26, 2024
c4ed5a8
feat(component): Add Ticket Icon notification
jon-nfc Sep 26, 2024
2429fde
feat(component): Add Ticket status Icon
jon-nfc Sep 26, 2024
1e0c50b
feat(component): Add Icon Loader
jon-nfc Sep 26, 2024
f17981f
feat(layout): Initial Ticket Page
jon-nfc Sep 26, 2024
5700054
feat(component): Add ticket comment
jon-nfc Sep 26, 2024
454879c
feat(component): Add badge button/icon
jon-nfc Sep 26, 2024
0f9a94c
feat: Add base routes with error handler
jon-nfc Sep 26, 2024
dd4867c
feat(layout): Initial Create Page
jon-nfc Sep 26, 2024
7f4aeb7
feat(styles): Initial stylesheet
jon-nfc Sep 26, 2024
3c3a573
feat(function): Django DRF auto field data
jon-nfc Sep 26, 2024
3df7290
feat(function): Render Markdown text
jon-nfc Sep 26, 2024
5c802ac
docs: add skeleton
jon-nfc Sep 27, 2024
2ea0cab
docs(specification): Add URL specification
jon-nfc Sep 27, 2024
06e4402
feat(hook): Add getCookie to get a local session cookie by name
jon-nfc Sep 28, 2024
98954d4
feat(function): Add relationship field type to fieldData
jon-nfc Sep 28, 2024
923202e
refactor(componend): adjust anchor tags to Link component
jon-nfc Sep 28, 2024
52a0727
feat(hook): Add apiFetch to collect data from api
jon-nfc Sep 28, 2024
04323c8
feat(component): Add navigation double left icon
jon-nfc Sep 28, 2024
ee1e258
feat(component): Add icon to nav tabs
jon-nfc Sep 28, 2024
60eed6f
feat(component): Table added as component
jon-nfc Sep 28, 2024
7711d37
feat(component): Functional Table pagination footer
jon-nfc Sep 28, 2024
ff896d1
feat(component): Enable TextField to display naked field
jon-nfc Sep 28, 2024
164099a
feat(component): Add page number input field for manual page selectio…
jon-nfc Sep 28, 2024
3e96df9
docs(component): Add JSDoc for Table
jon-nfc Sep 28, 2024
9c1cba9
docs: Update URL spec with required patterns for navigation
jon-nfc Sep 28, 2024
42bb933
chore(component): remove console log of data from doublecolumn
jon-nfc Sep 29, 2024
6d25098
feat(function): Add JSON field formatting to FieldData
jon-nfc Sep 29, 2024
a653d33
feat(function): Add full width option to rendered markdown field
jon-nfc Sep 29, 2024
20682e8
feat(component): Add Single Column for layout
jon-nfc Sep 29, 2024
ff1b62d
feat(layout): Add Single Column to Detail
jon-nfc Sep 29, 2024
1afcb25
fix(component): Dont attempt to load table unless both data and meta …
jon-nfc Sep 29, 2024
8354579
feat(layout): Add table layout to Detail Section
jon-nfc Sep 29, 2024
82e510d
ci: add github initiala
jon-nfc Sep 30, 2024
8a4b4db
fix(function): Ensure for field data that relationship and serializer…
jon-nfc Sep 30, 2024
ed898c5
feat(function): Add model edit functionality
jon-nfc Oct 3, 2024
afc2ca4
feat(function): Add model form for add/edit
jon-nfc Oct 3, 2024
c60baac
refactor(component): Only show edit button on details tab of detail view
jon-nfc Oct 3, 2024
6ec3aaf
feat(component): Add "add" button to table
jon-nfc Oct 3, 2024
391a4e4
feat(component): Add onChange and value to select field
jon-nfc Oct 3, 2024
56a5abd
feat(component): Add onChange and value to slider field
jon-nfc Oct 3, 2024
048cc06
feat(component): Add onChange and value to textarea field
jon-nfc Oct 3, 2024
fe1f0f9
feat(component): Add onChange and value to text field
jon-nfc Oct 3, 2024
7635ace
feat(hooks): Enable the posting of data for apiFetch
jon-nfc Oct 3, 2024
0af4e05
fix(hooks): Always return the cookie value for getCookie
jon-nfc Oct 3, 2024
4731413
feat(component): Dynamic add button for table
jon-nfc Oct 3, 2024
e707007
feat(component): Dynamic edit button for section
jon-nfc Oct 3, 2024
e47625d
feat: Adding of sub-models
jon-nfc Oct 3, 2024
71ccbea
fix(hook): dont return body during apiFetch if HTTP/204
jon-nfc Oct 3, 2024
8aef0bd
feat(layout): Add HTTP/DELETE support to ModelForm
jon-nfc Oct 3, 2024
8b6bea9
chore: add common git-sub-modules
jon-nfc Oct 3, 2024
93d7544
chore: correct linting
jon-nfc Oct 3, 2024
2c24d89
feat(component): Add Support for initial field value
jon-nfc Oct 3, 2024
8ef31b2
feat(layout): ModelForm support for adding child-model
jon-nfc Oct 4, 2024
f67e9ba
feat(component): Add link icon
jon-nfc Oct 4, 2024
99c57f8
feat(component): add background colour support to badge
jon-nfc Oct 4, 2024
37e74e2
feat(component): add external links to details tab first section
jon-nfc Oct 4, 2024
8f04ae7
feat: Add package nunjucks for jinja rendering
jon-nfc Oct 4, 2024
f7f2c46
fix(layout): On page_data change re-fetch metadata
jon-nfc Oct 4, 2024
ec79f07
feat(component): Add action add icon
jon-nfc Oct 4, 2024
17c211d
feat(component): Add action install icon
jon-nfc Oct 4, 2024
fc10db7
feat(component): Add action remove icon
jon-nfc Oct 4, 2024
fe4626e
feat(component): add style class support to badge
jon-nfc Oct 4, 2024
4be44b6
feat(function): add badge field support
jon-nfc Oct 4, 2024
83b2378
feat: add submodel action
jon-nfc Oct 4, 2024
ae1b8f5
feat(component): Add icon inventory status bad
jon-nfc Oct 5, 2024
443a19b
feat(component): Add icon inventory status ok
jon-nfc Oct 5, 2024
95da07e
feat(component): Add icon inventory status unknown
jon-nfc Oct 5, 2024
32501a8
feat(component): Add icon inventory status warning
jon-nfc Oct 5, 2024
8869ab2
feat(function): add icon field support
jon-nfc Oct 5, 2024
0d1c4ad
feat(Layout): Update so ticket layout works
jon-nfc Oct 5, 2024
d00607f
refactor(layout): migrate ticket comments request to django api
jon-nfc Oct 6, 2024
9365383
feat(component): Add icon ticket status Accepted
jon-nfc Oct 6, 2024
17e898c
feat(component): Add icon ticket status approvals
jon-nfc Oct 6, 2024
721d0a1
feat(component): Add icon ticket status assigned
jon-nfc Oct 6, 2024
66540d1
feat(component): Add icon ticket status assigned planning
jon-nfc Oct 6, 2024
94dd09f
feat(component): Add icon ticket status closed
jon-nfc Oct 6, 2024
3c15048
feat(component): Add icon ticket status evaluation
jon-nfc Oct 6, 2024
e601a24
feat(component): Add icon ticket status invalid
jon-nfc Oct 6, 2024
b014d42
feat(component): Add icon ticket status new/draft
jon-nfc Oct 6, 2024
21ea352
feat(component): Add icon ticket status pending
jon-nfc Oct 6, 2024
1c81af4
feat(component): Add icon ticket status solved
jon-nfc Oct 6, 2024
1ac7eea
feat(component): Add icon ticket status testing
jon-nfc Oct 6, 2024
b102024
feat(function): add support for badge fields that have no url
jon-nfc Oct 6, 2024
5c741db
refactor(layout): Use field data to fetch status badge
jon-nfc Oct 6, 2024
996d52b
refactor(layout): Ticket comments so they work with DRF
jon-nfc Oct 6, 2024
eb6102b
refactor(component): add ID to textfield
jon-nfc Oct 6, 2024
2eb5751
refactor(component): add ID to fields
jon-nfc Oct 6, 2024
bec4361
feat(ticket): Add initial ticket comment form
jon-nfc Oct 6, 2024
e3eed8d
feat(component): Add form button
jon-nfc Oct 8, 2024
eec6f87
feat(component): Add comment reply/create form
jon-nfc Oct 8, 2024
f856ad1
feat(layout): Add priority field to ticket
jon-nfc Oct 8, 2024
9b76dfd
feat(layout): Add duration field to ticket
jon-nfc Oct 8, 2024
997eb4b
feat(layout): Add set colour of heading to match ticket colour
jon-nfc Oct 8, 2024
7a239a5
feat(layout): Addfield ticket number to metadata header
jon-nfc Oct 8, 2024
9707ed9
feat(layout): Set content heading to match ticket title
jon-nfc Oct 8, 2024
2753a89
feat(component): Add handler for button click
jon-nfc Oct 8, 2024
51ce469
feat(layout): Add ticket creation details to header
jon-nfc Oct 8, 2024
cc6cad9
feat(component): Add ticket linked items
jon-nfc Oct 8, 2024
bea97d5
feat(component): Add Ticket Icon Related Blocked
jon-nfc Oct 8, 2024
4bf75f9
feat(component): Add Ticket Icon Related Blocks
jon-nfc Oct 8, 2024
b43eeee
feat(component): Add Ticket Icon Related
jon-nfc Oct 8, 2024
9847c66
refactor(component): Linked items to be a markdown field
jon-nfc Oct 8, 2024
e9ea0b0
refactor(component): Add Related tickets
jon-nfc Oct 8, 2024
b6854d9
refactor(layout): Add conversion of ticket and comment duration
jon-nfc Oct 8, 2024
92877c9
refactor(layout): Add model note form and tab
jon-nfc Oct 10, 2024
4462118
refactor(layout): Model note form creation of forms
jon-nfc Oct 10, 2024
64347d8
feat(component): Pass icon name to icon to use as css class name for …
jon-nfc Oct 10, 2024
59bc783
feat(component): Add Icon delete
jon-nfc Oct 10, 2024
9b2b4f4
feat(component): Add Icon help
jon-nfc Oct 10, 2024
958e34c
feat(layout): Add ability to pass content header Icon
jon-nfc Oct 10, 2024
328ab1b
feat(component): Add Icon history
jon-nfc Oct 10, 2024
6116d85
feat(layout): Add ability to pass content header Icon from all layouts
jon-nfc Oct 10, 2024
aa8799c
refactor: Add metadata dynamic loading of method key
jon-nfc Oct 10, 2024
5e07fc9
feat(layout): Add rendering of history icon for detail
jon-nfc Oct 10, 2024
28e7b16
feat(layout): Add history layour
jon-nfc Oct 10, 2024
3d11972
feat(component): Add automagic collabsible row if detected
jon-nfc Oct 10, 2024
ebe1381
fix(component): Dont show collapsible field expander if there are no …
jon-nfc Oct 10, 2024
af1f6ed
feat(component): Add class to nav down icon
jon-nfc Oct 10, 2024
1e36510
feat(function): Add support for nested fields
jon-nfc Oct 10, 2024
d9f618e
fix(style): correct icon size for table expandable row
jon-nfc Oct 10, 2024
9c54545
feat(layour): Add documentation content header icon if url present
jon-nfc Oct 10, 2024
0f598f2
feat(component): Add card page component
jon-nfc Oct 11, 2024
d20739e
fix(layout): Add error handling to detail if metadata missing
jon-nfc Oct 11, 2024
948de7b
feat(layout): Add settings layout
jon-nfc Oct 11, 2024
420b7e0
fix(layout): Dont show comments on tickets if no metadata exists
jon-nfc Oct 11, 2024
0b7cddb
feat(component): Add 401 login redirect
jon-nfc Oct 11, 2024
3bbdca7
refactor: metadata path change `metadata.actions.<method>` -> `metada…
jon-nfc Oct 12, 2024
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
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
BROWSER=none
39 changes: 39 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
### :books: Summary
<!-- your summary here emojis ref: https://github.com/yodamad/gitlab-emoji -->



### :link: Links / References
<!--

using a list as any links to other references or links as required. if relevant, describe the link/reference

Include any issues or related merge requests. Note: dependent MR's also to be added to "Merge request dependencies"

-->



### :construction_worker: Tasks

- [ ] Add your tasks here if required (delete)

<!-- dont remove tasks below strike through including the checkbox by enclosing in double tidle '~~' -->

- [ ] :firecracker: Contains breaking-change Any Breaking change(s)?

_Breaking Change must also be notated in the commit that introduces it and in [Conventional Commit Format](https://www.conventionalcommits.org/en/v1.0.0/)._

- [ ] :notebook: Release notes updated

- [ ] :blue_book: Documentation written

_All features to be documented within the correct section(s). Administration, Development and/or User_

- [ ] :checkered_flag: Milestone assigned

- [ ] :test_tube: [Unit Test(s) Written](https://nofusscomputing.com/projects/centurion_erp/development/testing/)

_ensure test coverage delta is not less than zero_

- [ ] :page_facing_up: Roadmap updated
96 changes: 96 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
---

name: 'CI'


on:
push:
branches:
- '**'
tags:
- '*'

env:
GIT_SYNC_URL: "https://${{ secrets.GITLAB_USERNAME_ROBOT }}:${{ secrets.GITLAB_TOKEN_ROBOT }}@gitlab.com/nofusscomputing/projects/centurion_erp_ui.git"

jobs:


# docker:
# name: 'Docker'
# uses: nofusscomputing/action_docker/.github/workflows/docker.yaml@development
# with:
# DOCKER_BUILD_IMAGE_NAME: "nofusscomputing/centurion-erp"
# DOCKER_PUBLISH_REGISTRY: "docker.io"
# DOCKER_PUBLISH_IMAGE_NAME: "nofusscomputing/centurion-erp"
# secrets:
# DOCKER_PUBLISH_USERNAME: ${{ secrets.NFC_DOCKERHUB_USERNAME }}
# DOCKER_PUBLISH_PASSWORD: ${{ secrets.NFC_DOCKERHUB_TOKEN }}


mkdocs:
name: 'MKDocs'
permissions:
pull-requests: write
contents: write
statuses: write
checks: write
actions: write
uses: nofusscomputing/action_mkdocs/.github/workflows/reusable_mkdocs.yaml@development



gitlab-mirror:
if: ${{ github.repository == 'nofusscomputing/centurion_erp_ui' }}
runs-on: ubuntu-latest
steps:

- name: Checks
shell: bash
run: |
if [ "0${{ env.GIT_SYNC_URL }}" == "0" ]; then

echo "[ERROR] you must define variable GIT_SYNC_URL for mirroring this repository.";

exit 1;

fi


- name: clone
shell: bash
run: |

git clone --mirror https://github.com/${{ github.repository }} repo;

ls -la repo/


- name: add remote
shell: bash
run: |

cd repo;

echo "**************************************** - git remote -v";

git remote -v;

echo "****************************************";

git remote add destination $GIT_SYNC_URL;


- name: push branches
shell: bash
run: |

cd repo;

echo "**************************************** - git branch";

git branch;

echo "****************************************";

git push destination --mirror || true;
14 changes: 14 additions & 0 deletions .github/workflows/pull-requests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---

name: Pull Requests


on:
pull_request: {}


jobs:

pull-request:
name: pull-request
uses: nofusscomputing/action_pull_requests/.github/workflows/pull-requests.yaml@development
37 changes: 37 additions & 0 deletions .github/workflows/triage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

---

name: Triage


on:
issues:
types:
- opened
- reopened
- transferred
- milestoned
- demilestoned
- closed
- assigned
pull_request:
types:
- opened
- edited
- assigned
- reopened
- closed



jobs:


project:
name: Project
uses: nofusscomputing/action_project/.github/workflows/project.yaml@development
with:
PROJECT_URL: https://github.com/orgs/nofusscomputing/projects/3
secrets:
WORKFLOW_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}

25 changes: 25 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

**.tmp.*
8 changes: 8 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[submodule "website-template"]
path = website-template
url = https://gitlab.com/nofusscomputing/infrastructure/website-template.git
branch = development
[submodule "gitlab-ci"]
path = gitlab-ci
url = https://gitlab.com/nofusscomputing/projects/gitlab-ci.git
branch = development
7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"recommendations": [
"orta.vscode-jest",
"eg2.vscode-npm-script",
"burkeholland.simple-react-snippets"
]
}
20 changes: 20 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [

{
"type": "chrome",
"request": "launch",
"name": "React",
"url": "http://127.0.0.1:3000/",
"webRoot": "${workspaceFolder}/src",
"trace": true,
"runtimeArgs": [
"--enable-chrome-browser-cloud-management"
]
}
]
}
Empty file added docs/articles/index.md
Empty file.
Empty file added docs/contact.md
Empty file.
Empty file added docs/index.md
Empty file.
Empty file added docs/operations/index.md
Empty file.
Empty file.
Empty file.
33 changes: 33 additions & 0 deletions docs/projects/centurion_erp/user_interface/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: User Interface
description: Documentation home for Centurion ERP User Interface by No Fuss Computing
date: 2024-09-27
template: project.html
about: https://gitlab.com/nofusscomputing/infrastructure/configuration-management/centurion_erp
---

<span style="text-align: center;">

![Project Status - Active](https://img.shields.io/badge/Project%20Status-Active-green?logo=github&style=plastic)

</span>

This User Interface is for use with Centurion ERP. The intent of this documentation is to detail the ins and outs of it's design, requirements and on further development.

Centurion ERP is built using the Django framework. This enables quick development. This framework comes with the DJango Rest Framwork (DRF) which is a Full Rest API Implementation.

The user interface will be built using the React Framework. This also enables quick development and offers in addition the features of the Javascript language for UI features.


## Goal / Intent

> Seperate the UI from the backend
>
> Create a UI that as much as possible, obtains what is required from the backend for it to automagically create the UI. This information should then be used to create the user interface without requiring additional development work within the UI for to display any new backend features.


## Design Specifications

- [URLs](./url.md)

- Views / Layouts
81 changes: 81 additions & 0 deletions docs/projects/centurion_erp/user_interface/url.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
title: URLs
description: URL Design specification for Centurion ERP by No Fuss Computing
date: 2024-09-27
template: project.html
about: https://gitlab.com/nofusscomputing/infrastructure/configuration-management/centurion_erp
---

This specification is to detail the URL path requirements for Centurion ERP development.


## Details

The following URL patterns are required for navigation:

- `/<module>/<model>`

- `/<module>/<model>/<primary key>`

- ~~`/<module>/<model>/<common pk>/<child_model>`~~

- ~~`/<module>/<model>/<common pk>/<child_model>/<primary key>`~~

- `/<module>/<common model name>/<model>`

- `/<module>/<common model name>/<model><primary key>`


- ~~`/<module>/<common model name>/<model>/<common pk>/<child_model>`~~

- ~~`/<module>/<common model name>/<model>/<common pk>/<child_model>/<primary key>`~~

The url path pattern will be used by both the end user facing URL and the API URL for accessing the backend.

URL path patterens will be in format:

``` text

/<module>/<model>/<primary key>

```

sub-path names are as follows:

- `<module>` is the module the url falls under

- `<model>` is the Django model name

- `<primary key>` is the Primary key of an individual item.

Example of a device url: `/itam/device[/<int:pk>]`.

The above url path pattern does not work for common models that are accross different modules. As such, for common models, the parh patter is as follows:

``` text

/<module>/<common model name>/<model>/<primary key>

```

sub-path names for common models are as follows:

- `<module>` No change

- `<common model name>` the common model name, this will be the Django model name

- `<model>` The sub-model name. i.e. the name that differantiates it from the common model name.

Example for a request ticket: `/assistance/ticket/request[/<int:pk>]` .


## Requirements

These Requirements are to be read as a **must** be done unless otherwise stated. URL requirements are as follows:

- All characters are lowercase

- space characters are replaced with underscore `_`

- Back-end and API access to have `/api` prefixed to the path.

Empty file added docs/projects/index.md
Empty file.
Loading
Loading