Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mytime
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Narendar Vakiti
mytime
Commits
45ae3461
Commit
45ae3461
authored
Aug 08, 2018
by
Manikanta SKPB Duppanapudi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New validation as per requirement
parent
df3921de
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
18 deletions
+29
-18
ProjectController.js
src/main/webapp/WEB-INF/controllers/ProjectController.js
+29
-18
No files found.
src/main/webapp/WEB-INF/controllers/ProjectController.js
View file @
45ae3461
...
...
@@ -352,26 +352,37 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
return
obj
;
};
var
today
=
new
Date
();
$scope
.
addTab
=
function
()
{
if
(
$scope
.
isSecondTab
===
false
){
$scope
.
templateTitle
=
"Add"
;
$scope
.
employeeRole
=
undefined
;
$scope
.
empBillableStatus
=
undefined
;
$scope
.
newBillingStartDate
=
undefined
;
$scope
.
employeeShift
=
undefined
;
$scope
.
employeeModel
=
{};
$
(
'.md-datepicker-input'
)[
0
].
value
=
null
;
$
(
'.md-datepicker-input'
)[
1
].
value
=
null
;
$
(
'.md-datepicker-input'
)[
2
].
value
=
null
;
$scope
.
startDate
=
(
dataToPass
.
projectStartDate
==
null
)
?
null
:
new
Date
(
dataToPass
.
projectStartDate
);
$scope
.
endDate
=
(
dataToPass
.
projectStartDate
==
null
)
?
null
:
new
Date
(
dataToPass
.
projectEndDate
);
document
.
getElementsByClassName
(
"md-tab"
)[
1
].
style
.
visibility
=
"visible"
;
document
.
getElementsByClassName
(
"md-tab"
)[
2
].
style
.
visibility
=
"hidden"
;
$scope
.
isSecondTab
=
true
;
$scope
.
selectedTab
=
1
;
$scope
.
searchTerm
=
""
;
if
(
!
(
new
Date
(
dataToPass
.
projectEndDate
)
>
today
)
){
$mdDialog
.
show
(
$mdDialog
.
alert
({
skipHide
:
true
,
title
:
"Attention"
,
textContent
:
'Employee cannot be add to completed Project'
,
ok
:
'ok'
}));
}
else
{
if
(
$scope
.
isSecondTab
===
false
){
$scope
.
templateTitle
=
"Add"
;
$scope
.
employeeRole
=
undefined
;
$scope
.
empBillableStatus
=
undefined
;
$scope
.
newBillingStartDate
=
undefined
;
$scope
.
employeeShift
=
undefined
;
$scope
.
employeeModel
=
{};
$
(
'.md-datepicker-input'
)[
0
].
value
=
null
;
$
(
'.md-datepicker-input'
)[
1
].
value
=
null
;
$
(
'.md-datepicker-input'
)[
2
].
value
=
null
;
$scope
.
startDate
=
(
dataToPass
.
projectStartDate
==
null
)
?
null
:
new
Date
(
dataToPass
.
projectStartDate
);
$scope
.
endDate
=
(
dataToPass
.
projectStartDate
==
null
)
?
null
:
new
Date
(
dataToPass
.
projectEndDate
);
document
.
getElementsByClassName
(
"md-tab"
)[
1
].
style
.
visibility
=
"visible"
;
document
.
getElementsByClassName
(
"md-tab"
)[
2
].
style
.
visibility
=
"hidden"
;
$scope
.
isSecondTab
=
true
;
$scope
.
selectedTab
=
1
;
$scope
.
searchTerm
=
""
;
}
}
};
var
removeTab
=
function
(
action
)
{
if
(
action
==
"Add"
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment