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

Dev min #19

Open
wants to merge 36 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
0c6b8a3
merlin/hourly: remove option choose in rate, add open_project router,…
Jul 6, 2020
9c9835a
merlin/hourly: update open project model
Jul 6, 2020
6477292
merlin/hourly: test project open
Jul 6, 2020
ad6e42f
merlin/hourly: add sub_data
Jul 6, 2020
fe4365f
merlin/hourly: add sub_data test
Jul 6, 2020
598ee78
merlin/hourly: rollback router
Jul 6, 2020
26dda77
merlin/hourly: backup new dev cycles and project router
Jul 7, 2020
a949f73
merlin/hourly: update tracking and change Chinese to English
Jul 7, 2020
2c7dc47
syhu/hourly: add: _model: 'account' usage
Jul 8, 2020
2999908
merlin/hourly: commit open project
Jul 8, 2020
c4ab7a2
merlin/hourly: salary sheet demo
Jul 8, 2020
8d75a2d
merlin/hourly: create analysic view
Jul 13, 2020
83850f0
merlin/hourly: set permission for each roie
Jul 13, 2020
3c59b15
add postcss config, fix: scalra, flexform versions to be stable
Jul 22, 2020
bf103ad
add: postcss.config
Jul 22, 2020
6805251
sotatek/hourly: [Hourly] Modify different tab menu for each roles
Jul 23, 2020
843d266
sotatek/hourly: [Model] query data from models with option.form method
Jul 28, 2020
140fde6
Create new UI for dev cycles.
Jul 29, 2020
fe152b8
Merge pull request #4 from oliwave/dev
Jul 30, 2020
87c03d0
Modify admin and dev showing list
Jul 30, 2020
8a676e5
Merge branch 'dev' of https://github.com/imonology/hourly into dev
Jul 30, 2020
a9fb1fa
sotatek/hourly: [Tron] debug list project show role, update drop down…
Jul 31, 2020
52b1190
Make salary_filter UI
Aug 3, 2020
28eb3be
Fix the conflict when merge.
Aug 3, 2020
48b1f38
Merge pull request #5 from oliwave/dev
Aug 4, 2020
d365d30
Update the salary calculation part.
Aug 4, 2020
702021b
Merge pull request #6 from oliwave/dev
Aug 4, 2020
da6c6cb
[Tron] refactor data query logic
Aug 4, 2020
1a0c068
Merge branch 'dev' of https://github.com/imonology/hourly into dev
Aug 4, 2020
bec605b
sotatek/hourly: [Tron] refactor data query logic
Aug 4, 2020
4e45585
sotatek/hourly: [Tron] refactor salary_filter and salart_list
Aug 7, 2020
7c3daf8
sotatek/hourly: [Tron] refactor salary_filter filter by project
Aug 10, 2020
15014ed
last changes by Tron
Dec 8, 2021
d648fd9
fix: organization display
Dec 15, 2021
999dcc2
conflict solved
Debojyoti1915001 Dec 15, 2021
082f3f7
update scalra-flexform
Debojyoti1915001 Dec 18, 2021
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
merlin/hourly: create analysic view
  • Loading branch information
ImonCloud committed Jul 13, 2020
commit 8d75a2dce6ec4d11800b21f4bc384eb857d49ad2
8 changes: 4 additions & 4 deletions api/_role.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
module.exports = [
{
name: 'admin',
label: '管理員',
label: 'admin',
},
{
name: 'client',
label: '使用者',
label: 'client',
default: true,
},
{
name: 'PM',
label: 'PM',
name: 'pm',
label: 'pm',
},
{
name: 'developer',
Expand Down
19 changes: 18 additions & 1 deletion lobby/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,8 @@ module.exports = function (app) {
];
res.send(menu);
});



app.get('/api/get_info', (req, res, next) => {
let controller = new SR.Flexform.controller('info');
const found_account = l_checkLogin(req).account;
Expand Down Expand Up @@ -429,4 +430,20 @@ module.exports = function (app) {
}
res.send(controller);
});
app.get('/analysis', function (req, res) {
// var login = l_checkLogin(req);
// if (!login.account)
// return res.redirect('/');

var para = {
// login: login,
language: l_lang,
// role: l_accounts[login.account].control.groups[0],
// admin: l_accounts[login.account].control.groups.includes('administrator'),
// account: login.account
};

res.render('test_analysis',para);
});

};
98 changes: 98 additions & 0 deletions views/analysis.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<% layout('template/common') %>
<% block('title').append('<title>時數統計</title>') %>
<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="/web/moment.min.js"></script>
<style>
.week {
color: #000 !important;
}
.warning {
color: red !important;
}
#warning_area {
margin-bottom: 3rem;
padding: 1rem;
border: 1px solid orangered;
border-radius: 10px;
font-size: 1.8rem;
width: 100%;
background: linear-gradient(rgba(255, 255, 255, 0.05),rgba(255, 255, 255, 0.05)),#1E2832;
}
#warning_title {
padding-bottom: 0.5rem;
}
.unconfirmed_title {
font-weight:bold;
width: 50%;
display: inline-block;
text-align: right;
}
.unconfirmed_hours {
color: coral;
width: 50%;
text-align: left;
display: inline-block;
}
</style>
<section id="three" class="wrapper style2 special">
<div class="inner">
<header class="major narrow">
<h2>時數統計</h2>
</header>
<div>
<ul class="pagination">
<li class="active tab-type" data-type="provider">
<a href="#" aria-label="Previous">
<span aria-hidden="true">依開發者</span>
</a>
</li>
<li class="tab-type" data-type="project">
<a href="#" aria-label="Previous">
<span aria-hidden="true">依專案</span>
</a>
</li>
<li class="tab-type" data-type="pay_settlement">
<a href="#" aria-label="Previous">
<span aria-hidden="true">薪資結算</span>
</a>
</li>
</ul>
</div>
<h3 id="warning_title" class="hide warning">重要</h3>
<div id="warning_area" class="hide">
</div>
<div>
<input type="radio" id="choice_week" class="select_type" name="select_type" value="choice_week">
<label for="choice_week">選擇週次</label>
<input type="radio" id="choice_month" class="select_type" name="select_type" value="choice_month">
<label for="choice_month">選擇月份</label>
</div>


<div id="week_area">
<input type="week" class="week" id="select_week">
</div>
<div id="month_area">
<select class="year" style="display: inline; width: 150px"></select>
<select class="month" style="display: inline; width: 150px"></select>
</div>
<div id="select_company">
<br>
選擇公司:
<select class="company" style="display: inline; width: 150px"></select>
</div>
<div style="padding-top: 25px">
<div class="hourList"></div>
<div class="Logs hide" style="margin-bottom: 20px">
<h4 class="Logs__title"></h4>
<div class="Logs__content"></div>
</div>
<ul class="actions">
<li><a class="button special" href="javascript:window.history.back();">回上一頁</a></li>
<li><a class="button special" href="/main">回主畫面</a></li>
</ul>
</div>
</div>
</section>
<script></script>
96 changes: 96 additions & 0 deletions views/test_analysis.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<% layout('template/common') %>
<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<style>
.week {
color: #000 !important;
}
.warning {
color: red !important;
}
#warning_area {
margin-bottom: 3rem;
padding: 1rem;
border: 1px solid orangered;
border-radius: 10px;
font-size: 1.8rem;
width: 100%;
background: linear-gradient(rgba(255, 255, 255, 0.05),rgba(255, 255, 255, 0.05)),#1E2832;
}
#warning_title {
padding-bottom: 0.5rem;
}
.unconfirmed_title {
font-weight:bold;
width: 50%;
display: inline-block;
text-align: right;
}
.unconfirmed_hours {
color: coral;
width: 50%;
text-align: left;
display: inline-block;
}
</style>
<section id="three" class="wrapper style2 special">
<div class="inner">
<header class="major narrow">
<h2>時數統計</h2>
</header>
<div>
<ul class="pagination">
<li class="active tab-type" data-type="provider">
<a href="#" aria-label="Previous">
<span aria-hidden="true">依開發者</span>
</a>
</li>
<li class="tab-type" data-type="project">
<a href="#" aria-label="Previous">
<span aria-hidden="true">依專案</span>
</a>
</li>
<li class="tab-type" data-type="pay_settlement">
<a href="#" aria-label="Previous">
<span aria-hidden="true">薪資結算</span>
</a>
</li>
</ul>
</div>
<h3 id="warning_title" class="hide warning">重要</h3>
<div id="warning_area" class="hide">
</div>
<div>
<input type="radio" id="choice_week" class="select_type" name="select_type" value="choice_week">
<label for="choice_week">選擇週次</label>
<input type="radio" id="choice_month" class="select_type" name="select_type" value="choice_month">
<label for="choice_month">選擇月份</label>
</div>


<div id="week_area">
<input type="week" class="week" id="select_week">
</div>
<div id="month_area">
<select class="year" style="display: inline; width: 150px"></select>
<select class="month" style="display: inline; width: 150px"></select>
</div>
<div id="select_company">
<br>
選擇公司:
<select class="company" style="display: inline; width: 150px"></select>
</div>
<div style="padding-top: 25px">
<div class="hourList"></div>
<div class="Logs hide" style="margin-bottom: 20px">
<h4 class="Logs__title"></h4>
<div class="Logs__content"></div>
</div>
<ul class="actions">
<li><a class="button special" href="javascript:window.history.back();">回上一頁</a></li>
<li><a class="button special" href="/main">回主畫面</a></li>
</ul>
</div>
</div>
</section>
<script></script>