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

modularized functions and changed to SPA #1

Merged
merged 22 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
f28132e
splitting into components
katrina-cityofdetroit Jun 13, 2024
1e3770d
moving code to components
katrina-cityofdetroit Jun 13, 2024
fead6ce
updated page state
katrina-cityofdetroit Jun 13, 2024
453c209
updated page state
katrina-cityofdetroit Jun 13, 2024
1fe7adc
fixed switch in init.js
katrina-cityofdetroit Jun 13, 2024
e4e916c
fixed default page
katrina-cityofdetroit Jun 13, 2024
42da8a3
updated welcome main.js
katrina-cityofdetroit Jun 13, 2024
73a4374
first 3 pages roughly working after refactoring
katrina-cityofdetroit Jun 14, 2024
89e11c6
added form and modal components with custom fns
katrina-cityofdetroit Jun 17, 2024
afb16d1
updated form
katrina-cityofdetroit Jun 17, 2024
45de04f
basic table construction for page 2
katrina-cityofdetroit Jun 17, 2024
cf5e71e
added table css and show/hide/clear fns
katrina-cityofdetroit Jun 17, 2024
30ffa45
modularized more, but need to fix nav button functions
katrina-cityofdetroit Jun 17, 2024
7846a5a
fixed naV BUTTONS. added some sample json data.
katrina-cityofdetroit Jun 18, 2024
e098043
added table functionality; more links to welcome page
katrina-cityofdetroit Jun 18, 2024
4eef5c4
getting through personnel modularization
katrina-cityofdetroit Jun 18, 2024
27150c4
edited personnel page
katrina-cityofdetroit Jun 18, 2024
16ce22d
editing json path
katrina-cityofdetroit Jun 20, 2024
64cb585
deleting extraneous files
katrina-cityofdetroit Jun 20, 2024
3a491a4
got the edit rows to work for personnel
katrina-cityofdetroit Jun 20, 2024
5f44387
started implementing service dropdown
katrina-cityofdetroit Jun 20, 2024
0bb4077
fixed new inits bug; expanded personnel table
katrina-cityofdetroit Jun 21, 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
File renamed without changes.
File renamed without changes.
13 changes: 13 additions & 0 deletions archive/start_from_save_main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
document.addEventListener('DOMContentLoaded', function () {

// If starting over, reset storage
document.getElementById('start-over-btn').addEventListener('click', function(event){
localStorage.setItem("employeeTableData", "");
});

// Show start from saved data button only if there is saved data
if (localStorage.getItem("employeeTableData")) {
document.getElementById('load-saved-data-btn').style.display = "block"
}

});
24 changes: 0 additions & 24 deletions css/02_new_initiatives.css

This file was deleted.

3 changes: 0 additions & 3 deletions css/03_revenue.css

This file was deleted.

28 changes: 0 additions & 28 deletions css/04_personnel.css

This file was deleted.

69 changes: 5 additions & 64 deletions css/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,63 +19,25 @@

/* Every page */

h1 {
text-align: center;
}

h2 {
color: var(--citygreen);
text-align: center;
}
/* start by hiding everything */
#welcome-page{display: none;}
#prompt-div{display: none;}

body {
margin-top: 20px;
margin: 10px;
}

/* Button styling */

.btn {
cursor:pointer;
cursor: pointer;
padding: 10px;
margin-top: 5px;
border-radius: 10px;
background-color: gray;
color: white;
}

/* Sidebar */

#sidebar {
background-color: lightgrey;
/* min-height: 100vh; Full height of viewport */
}

#supp-total {
color: var(--yellow);
}

/* Table generics */

.table-container {
margin-top: 20px;
}

thead > tr > th {
text-align: left;
}

th {
background-color: var(--lightGray);
}

tr {
border-width: 2px;
}

tr td {
border-bottom: 1px solid black;
}

/* Action buttons */

.action-btns {
Expand All @@ -98,28 +60,7 @@ tr td {
.btn-delete {background-color: var(--orange);}
.btn-supplemental { background-color: var(--yellow);}
.btn-carryover {background-color: var(--green);}
.btn-add { background-color: var(--spiritgreen);}

/* Go to next page */

.new-row{
margin: 20px;
text-align: center;
}
.next-button-row {
text-align: right;
}
.btn-next, .btn-last {
background-color: var(--blue);
}
.btn-next:hover, .btn-last:hover {
background-color: var(--yellow);
}

/* textbox width in table */
input {
width: 100%;
}

.error-message {
color: red;
Expand Down
26 changes: 26 additions & 0 deletions data/law_dept_sample/personnel_data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[
{
"Job Name": "Deputy Counsel",
"Account String": "1000-29320-320010",
"Current FTEs (FY25)": 1,
"Baseline FTEs": 0,
"Supplemental FTEs": 0,
"Current Average Salary": "150000"
},
{
"Job Name": "Legal Secretary",
"Account String": "1000-29320-320010",
"Current FTEs (FY25)": 5,
"Baseline FTEs": 0,
"Supplemental FTEs": 0,
"Current Average Salary": "55000"
},
{
"Job Name": "Assistant Counsel",
"Account String": "1000-29320-320010",
"Current FTEs (FY25)": 10,
"Baseline FTEs": 0,
"Supplemental FTEs": 0,
"Current Average Salary": "80000"
}
]
10 changes: 10 additions & 0 deletions data/law_dept_sample/services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[
{ "id" : "",
"name" : "Select"},
{ "id" : "Appeals",
"name" : "Appeals"},
{ "id" : "FOIA",
"name" : "FOIA" },
{ "id" : "Lobbying",
"name" : "Lobbying"}
]
39 changes: 39 additions & 0 deletions data/law_dept_sample/strings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"1000" : {
"label" : "General Fund",
"appropriations" : {
"29320" : {
"label" : "Efficient and Innovative Operations Support",
"cost centers" : {
"320010" : { "label" : "Law Administration" },
"321111" : { "label" : "Law Department Grants" }
}
}
}
},

"2119" : {
"label" : "FY2020 MIDC Grant",
"appropriations" : {
"21206" : {
"label" : "2023 Michigan Indigent Defense Commission",
"cost centers" : {
"320010" : { "label" : "Law Administration" },
"321111" : { "label" : "Law Department Grants" }
}
}
}
},

"2490" : {
"label" : "Construction Code Fund",
"appropriations" : {
"25130" : {
"label" : "BSEED Safe Buildings",
"cost centers" : {
"320010" : { "label" : "Law Administration" }
}
}
}
}
}
Loading