Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dcarfixers
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
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
Tobin
dcarfixers
Commits
a831ad8a
Commit
a831ad8a
authored
Dec 10, 2018
by
Tobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
daily commit 10-12-2018
parent
0dd5561b
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
403 additions
and
95 deletions
+403
-95
Customer.php
application/controllers/Customer.php
+13
-22
Issue.php
application/controllers/Issue.php
+72
-1
Settings.php
application/controllers/Settings.php
+0
-1
Vehicle.php
application/controllers/Vehicle.php
+44
-0
Issue_model.php
application/models/Issue_model.php
+18
-4
Settings_model.php
application/models/Settings_model.php
+0
-1
add-customer-user.php
application/views/Customer/add-customer-user.php
+86
-24
list-customer-users.php
application/views/Customer/list-customer-users.php
+9
-2
issueMapping.php
application/views/Issue/issueMapping.php
+5
-5
viewMappedIssues.php
application/views/Issue/viewMappedIssues.php
+9
-3
viewSettings.php
application/views/Settings/viewSettings.php
+18
-3
left-menu.php
application/views/Templates/left-menu.php
+25
-27
custom-style.css
assets/css/custom-style.css
+9
-0
custom-script.js
assets/js/custom-script.js
+95
-2
No files found.
application/controllers/Customer.php
View file @
a831ad8a
...
...
@@ -20,11 +20,11 @@ class Customer extends CI_Controller {
public
function
addCustomerUser
(){
$template
[
'page'
]
=
'Customer/add-customer-user'
;
$template
[
'pTitle'
]
=
"Add New
Patient
"
;
$template
[
'pDescription'
]
=
"Create New
Patient
"
;
$template
[
'pTitle'
]
=
"Add New
Customer
"
;
$template
[
'pDescription'
]
=
"Create New
Customer
"
;
$template
[
'menu'
]
=
"
Patient
Management"
;
$template
[
'smenu'
]
=
"Add
Patient
"
;
$template
[
'menu'
]
=
"
Customer
Management"
;
$template
[
'smenu'
]
=
"Add
Customer
"
;
$this
->
load
->
view
(
'template'
,
$template
);
}
...
...
@@ -78,7 +78,6 @@ class Customer extends CI_Controller {
$err
=
1
;
$errMsg
=
'Provide Profile Picture'
;
}
$_POST
[
'age'
]
=
''
;
$_POST
[
'profile_image'
]
=
''
;
if
(
$err
==
0
){
$config
=
set_upload_service
(
"assets/uploads/services"
);
...
...
@@ -93,11 +92,11 @@ class Customer extends CI_Controller {
$_POST
[
'profile_image'
]
=
$config
[
'upload_path'
]
.
"/"
.
$upload_data
[
'file_name'
];
}
$_POST
[
'age'
]
=
$this
->
calculateAge
(
$_POST
[
'date_of_birth'
]);
if
(
$_POST
[
'age'
]
<
0
){
$err
=
1
;
$errMsg
=
'Provide a valid date of birth'
;
}
//
$_POST['age'] = $this->calculateAge($_POST['date_of_birth']);
//
if($_POST['age'] < 0){
//
$err = 1;
//
$errMsg = 'Provide a valid date of birth';
//
}
}
if
(
$err
==
1
){
$flashMsg
[
'message'
]
=
$errMsg
;
...
...
@@ -168,11 +167,11 @@ class Customer extends CI_Controller {
$template
[
'page'
]
=
'Customer/add-customer-user'
;
$template
[
'menu'
]
=
"
Patient
Management"
;
$template
[
'smenu'
]
=
"Edit
Patient
"
;
$template
[
'menu'
]
=
"
Customer
Management"
;
$template
[
'smenu'
]
=
"Edit
Customer
"
;
$template
[
'pDescription'
]
=
"Edit
Patient
Details"
;
$template
[
'pTitle'
]
=
"Edit
Patient
"
;
$template
[
'pDescription'
]
=
"Edit
Customer
Details"
;
$template
[
'pTitle'
]
=
"Edit
Customer
"
;
$template
[
'customer_id'
]
=
$customer_id
;
$customer_id
=
decode_param
(
$customer_id
);
...
...
@@ -220,14 +219,6 @@ class Customer extends CI_Controller {
$errMsg
=
'Provide an Address'
;
}
if
(
$err
==
0
){
$_POST
[
'age'
]
=
$this
->
calculateAge
(
$_POST
[
'date_of_birth'
]);
if
(
$_POST
[
'age'
]
<
0
){
$err
=
1
;
$errMsg
=
'Provide a valid date of birth'
;
}
}
if
(
$err
==
1
){
$flashMsg
[
'message'
]
=
$errMsg
;
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
...
...
application/controllers/Issue.php
View file @
a831ad8a
...
...
@@ -78,7 +78,7 @@ class Issue extends CI_Controller {
}
}
public
function
editIssue
(
$issue_id
){
public
function
editIssue
(
$issue_id
=
''
){
$flashMsg
=
array
(
'message'
=>
'Something went wrong, please try again..!'
,
'class'
=>
'error'
);
if
(
empty
(
$issue_id
)
||
!
is_numeric
(
$issue_id
=
decode_param
(
$issue_id
))){
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
...
...
@@ -231,5 +231,75 @@ class Issue extends CI_Controller {
}
redirect
(
base_url
(
'Issue/viewMappedIssues/'
.
encode_param
(
$mechanic_id
)));
}
public
function
editMechanicIssues
(
$mechanic_id
=
''
,
$issue_id
=
''
){
$flashMsg
=
array
(
'message'
=>
'Something went wrong, please try again..!'
,
'class'
=>
'error'
);
if
(
empty
(
$issue_id
)
||
!
is_numeric
(
$issue_id
=
decode_param
(
$issue_id
))
||
empty
(
$mechanic_id
)
||
!
is_numeric
(
$mechanic_id
=
decode_param
(
$mechanic_id
))){
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
base_url
(
'Issue/viewMappedIssues'
));
}
$template
[
'page'
]
=
'Issue/issueMapping'
;
$template
[
'menu'
]
=
'Issue Management'
;
$template
[
'smenu'
]
=
'Edit Mechanic Issue'
;
$template
[
'pTitle'
]
=
"Edit Mechanic Issue Management"
;
$template
[
'pDescription'
]
=
"Update Custom Mechanic Issue Data"
;
$template
[
'issue_id'
]
=
$issue_id
;
$template
[
'mechanic_id'
]
=
$mechanic_id
;
$template
[
'issue_data'
]
=
$this
->
Issue_model
->
getIssue
(
''
,
1
);
$template
[
'mechanicIssueData'
]
=
$this
->
Issue_model
->
getMechanicIssues
(
$mechanic_id
,
$issue_id
);
if
(
empty
(
$template
[
'mechanicIssueData'
])){
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
base_url
(
'Issue/viewMappedIssues/'
.
encode_param
(
$mechanic_id
)));
}
$this
->
load
->
view
(
'template'
,
$template
);
}
public
function
updateMechIssue
(
$mechanic_id
=
''
,
$issue_id
=
''
){
$err
=
0
;
$errMsg
=
''
;
$flashMsg
=
array
(
'message'
=>
'Something went wrong, please try again..!'
,
'class'
=>
'error'
);
if
(
empty
(
$issue_id
)
||
!
is_numeric
(
$issue_id
=
decode_param
(
$issue_id
))
||
empty
(
$mechanic_id
)
||
!
is_numeric
(
$mechanic_id
=
decode_param
(
$mechanic_id
))){
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
base_url
(
'Issue/viewMappedIssues/'
.
encode_param
(
$mechanic_id
)));
}
$url
=
base_url
(
'Issue/editMechanicIssues/'
.
encode_param
(
$mechanic_id
)
.
'/'
.
encode_param
(
$issue_id
));
if
(
!
isset
(
$_POST
)
||
empty
(
$_POST
)){
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
$url
);
}
if
(
$err
==
0
&&
(
!
isset
(
$_POST
[
'issue_id'
])
||
empty
(
$_POST
[
'issue_id'
]))){
$err
=
1
;
$errMsg
=
'Choose as Issue'
;
}
else
if
(
$err
==
0
&&
(
!
isset
(
$_POST
[
'service_fee'
])
||
empty
(
$_POST
[
'service_fee'
]))){
$err
=
1
;
$errMsg
=
'Provide a Service Cost'
;
}
else
if
(
$err
==
0
&&
(
!
isset
(
$_POST
[
'issue_description'
])
||
empty
(
$_POST
[
'issue_description'
]))){
$err
=
1
;
$errMsg
=
'Provide a Brief Discription About Service'
;
}
if
(
$err
==
1
){
$flashMsg
[
'message'
]
=
$errMsg
;
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
$url
);
}
$status
=
$this
->
Issue_model
->
updateMechIssue
(
$mechanic_id
,
$issue_id
,
$_POST
);
if
(
$status
==
1
){
$flashMsg
=
array
(
'message'
=>
'Successfully Updated..!'
,
'class'
=>
'success'
);
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
base_url
(
'Issue/viewMappedIssues/'
.
encode_param
(
$mechanic_id
)));
}
else
{
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
$url
);
}
}
}
?>
\ No newline at end of file
application/controllers/Settings.php
View file @
a831ad8a
...
...
@@ -40,7 +40,6 @@ class Settings extends CI_Controller {
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
base_url
(
'Settings'
));
}
if
(
isset
(
$_FILES
[
'site_logo'
])
&&
!
empty
(
$_FILES
[
'site_logo'
])){
$config
=
set_upload_service
(
"assets/uploads/services"
);
$this
->
load
->
library
(
'upload'
);
...
...
application/controllers/Vehicle.php
0 → 100644
View file @
a831ad8a
<?php
defined
(
'BASEPATH'
)
OR
exit
(
'No direct script access allowed'
);
class
Vechicle
extends
CI_Controller
{
public
function
__construct
()
{
parent
::
__construct
();
date_default_timezone_set
(
"Asia/Kolkata"
);
// $this->load->model('Vechicle_model');
if
(
!
$this
->
session
->
userdata
(
'logged_in'
))
{
redirect
(
base_url
());
}
}
public
function
vechicleSearch
(){
pr
(
$_POST
);
$return_arr
=
array
(
'status'
=>
'0'
);
if
(
!
isset
(
$_POST
)
||
empty
(
$_POST
)
||
!
isset
(
$_POST
[
'searchType'
])
||
empty
(
$_POST
[
'searchType'
])){
echo
json_encode
(
$return_arr
);
exit
;
}
$searchType
=
$_POST
[
'searchType'
];
if
(
$searchType
==
1
&&
isset
(
$_POST
[
'vehYear'
])
&&
!
empty
(
$_POST
[
'vehYear'
])
&&
isset
(
$_POST
[
'vehModel'
])
&&
!
empty
(
$_POST
[
'vehModel'
])
&&
isset
(
$_POST
[
'vehMaker'
])
&&
!
empty
(
$_POST
[
'vehMaker'
])){
$return_arr
[
'status'
]
=
1
;
$return_arr
[
'customer_data'
]
=
$customer_data
;
}
else
if
(
$searchType
==
2
&&
isset
(
$_POST
[
'vehVin'
])
&&
!
empty
(
$_POST
[
'vehVin'
])){
$return_arr
[
'status'
]
=
1
;
$return_arr
[
'customer_data'
]
=
$customer_data
;
}
echo
json_encode
(
$return_arr
);
exit
;
}
}
?>
\ No newline at end of file
application/models/Issue_model.php
View file @
a831ad8a
...
...
@@ -50,22 +50,25 @@ class Issue_model extends CI_Model {
return
(
$status
)
?
1
:
0
;
}
function
getMechanicIssues
(
$mechanic_id
=
''
){
function
getMechanicIssues
(
$mechanic_id
=
''
,
$iisue_id
=
''
,
$view_all
=
0
){
if
(
empty
(
$mechanic_id
)){
return
0
;
}
$view
=
(
$view_all
==
0
)
?
'0,1'
:
'1'
;
$cond
=
(
!
empty
(
$issue_id
))
?
" AND ISSUE.issue_id = '
$issue_id
' "
:
""
;
$sql
=
"SELECT ISSUE.*,MECH.*,M_ISSUE.*
FROM mechanic_issues AS M_ISSUE
INNER JOIN issues AS ISSUE ON (ISSUE.issue_id = M_ISSUE.issue_id)
INNER JOIN mechanic AS MECH ON (MECH.mechanic_id = M_ISSUE.mechanic_id)
INNER JOIN admin_users AS ADMIN ON (ADMIN.id = MECH.mechanic_id)
WHERE M_ISSUE.mechanic_id='
$mechanic_id
'
AND ISSUE.status IN (0,1)
AND
ADMIN.status IN (0,1) AND M_ISSUE
.status IN (0,1)"
;
WHERE M_ISSUE.mechanic_id='
$mechanic_id
'
$cond
AND
ISSUE.status IN (
$view
) AND M_ISSUE.status IN (
$view
) AND ADMIN
.status IN (0,1)"
;
$result
=
$this
->
db
->
query
(
$sql
);
if
(
empty
(
$result
))
return
;
return
$result
->
result
();
return
(
!
empty
(
$mechanic_id
)
&&
!
empty
(
$iisue_id
))
?
$result
->
row
()
:
$result
->
result
();
}
function
changeMappedIssueStatus
(
$mechanic_id
=
''
,
$issue_id
=
''
,
$status
=
'0'
){
...
...
@@ -78,5 +81,15 @@ class Issue_model extends CI_Model {
return
$status
;
}
function
updateMechIssue
(
$mechanic_id
=
''
,
$issue_id
=
''
,
$issueMechData
=
array
()){
if
(
empty
(
$mechanic_id
)
||
empty
(
$issue_id
)
||
empty
(
$issueMechData
)){
return
0
;
}
$status
=
$this
->
db
->
update
(
'mechanic_issues'
,
$issueMechData
,
array
(
'mechanic_id'
=>
$mechanic_id
,
'issue_id'
=>
$issue_id
));
return
(
$status
)
?
1
:
0
;
}
}
?>
\ No newline at end of file
application/models/Settings_model.php
View file @
a831ad8a
...
...
@@ -20,7 +20,6 @@ class Settings_model extends CI_Model {
public
function
update_settings
(
$data
){
$result
=
$this
->
db
->
update
(
'setting'
,
$data
);
return
$result
;
}
...
...
application/views/Customer/add-customer-user.php
View file @
a831ad8a
...
...
@@ -30,22 +30,22 @@
<div
class=
"box-header with-border"
>
<h3
class=
"box-title"
>
Personal Details
</h3>
</div>
<
form
role=
"form"
action=
"
<?=
base_url
(
$redirectUrl
)
?>
"
method=
"post"
class=
"validate"
data-parsley-validate=
""
enctype=
"multipart/form-data
"
>
<
div
class=
"box-body
"
>
<
div
class=
"box-body
"
>
<
form
id=
"createCustomerForm"
role=
"form"
action=
"
<?=
base_url
(
$redirectUrl
)
?>
"
method=
"post"
class=
"validate"
data-parsley-validate=
""
enctype=
"multipart/form-data
"
>
<div
class=
"col-md-12"
>
<div
class=
"col-md-6"
>
<div
class=
"form-group has-feedback"
>
<label>
First Name
</label>
<input
type=
"text"
class=
"form-control required"
data-parsley-trigger=
"change"
data-parsley-minlength=
"2"
data-parsley-pattern=
"^[a-zA-Z\ . ! @ # $ % ^ & * () + = , \/]+$"
required=
""
name=
"first_name"
placeholder=
"Enter
Patient
First Name"
required=
""
name=
"first_name"
placeholder=
"Enter First Name"
value=
"
<?=
(
isset
(
$customer_data
)
&&
isset
(
$customer_data
->
first_name
))
?
$customer_data
->
first_name
:
''
?>
"
>
<span
class=
"glyphicon form-control-feedback"
></span>
</div>
<div
class=
"form-group has-feedback"
>
<label>
Email
</label>
<input
type=
"email"
class=
"form-control required"
data-parsley-trigger=
"change"
data-parsley-minlength=
"2"
required=
""
name=
"email"
placeholder=
"Enter
Patient
Email"
data-parsley-minlength=
"2"
required=
""
name=
"email"
placeholder=
"Enter Email"
value=
"
<?=
(
isset
(
$customer_data
)
&&
isset
(
$customer_data
->
email
))
?
$customer_data
->
email
:
''
?>
"
>
<span
class=
"glyphicon form-control-feedback"
></span>
</div>
...
...
@@ -61,7 +61,7 @@
<div
class=
"form-group has-feedback"
>
<label>
Address
</label>
<textarea
class=
"form-control required"
data-parsley-trigger=
"change"
data-parsley-minlength=
"2"
required=
""
name=
"address"
placeholder=
"Enter
Patient
Address"
>
<?=
(
isset
(
$customer_data
)
&&
isset
(
$customer_data
->
address
))
?
trim
(
$customer_data
->
address
)
:
''
?>
</textarea>
data-parsley-minlength=
"2"
required=
""
name=
"address"
placeholder=
"Enter Address"
>
<?=
(
isset
(
$customer_data
)
&&
isset
(
$customer_data
->
address
))
?
trim
(
$customer_data
->
address
)
:
''
?>
</textarea>
<span
class=
"glyphicon form-control-feedback"
></span>
</div>
</div>
...
...
@@ -69,19 +69,19 @@
<div
class=
"form-group has-feedback"
>
<label>
Last Name
</label>
<input
type=
"text"
class=
"form-control required"
data-parsley-trigger=
"change"
data-parsley-minlength=
"2"
data-parsley-pattern=
"^[a-zA-Z\ . ! @ # $ % ^ & * () + = , \/]+$"
required=
""
name=
"last_name"
placeholder=
"Enter
Patient
Last Name"
data-parsley-minlength=
"2"
data-parsley-pattern=
"^[a-zA-Z\ . ! @ # $ % ^ & * () + = , \/]+$"
required=
""
name=
"last_name"
placeholder=
"Enter Last Name"
value=
"
<?=
(
isset
(
$customer_data
)
&&
isset
(
$customer_data
->
last_name
))
?
$customer_data
->
last_name
:
''
?>
"
>
<span
class=
"glyphicon form-control-feedback"
></span>
</div>
<div
class=
"form-group has-feedback"
>
<label>
Phone
</label>
<input
type=
"number"
class=
"form-control required"
data-parsley-trigger=
"change"
data-parsley-minlength=
"2"
required=
""
name=
"phone"
placeholder=
"Enter P
atient P
hone"
data-parsley-minlength=
"2"
required=
""
name=
"phone"
placeholder=
"Enter Phone"
value=
"
<?=
(
isset
(
$customer_data
)
&&
isset
(
$customer_data
->
phone
))
?
$customer_data
->
phone
:
''
?>
"
>
<span
class=
"glyphicon form-control-feedback"
></span>
</div>
<div
class=
"form-group"
>
<label
for=
"exampleInputEmail1"
>
Profile Picture
</label>
<label>
Profile Picture
</label>
<div
class=
"col-md-12"
>
<div
class=
"col-md-3"
>
<img
id=
"profile_image"
src=
"
<?=
(
isset
(
$customer_data
)
&&
isset
(
$customer_data
->
profile_image
))
?
base_url
(
$customer_data
->
profile_image
)
:
''
?>
"
onerror=
"this.src='
<?=
base_url
(
"assets/images/user_avatar.jpg"
)
?>
'"
height=
"75"
width=
"75"
/>
...
...
@@ -95,32 +95,94 @@
</div>
</div>
</div>
<!-- Vehicle Details START -->
<br>
<div
class=
"box-header with-border"
>
<h3
class=
"box-title"
>
Vehicle Details
</h3>
</div>
<br>
<div
class=
"col-md-12"
>
<div
class=
"col-md-6"
>
<div
class=
"form-group has-feedback"
>
<label>
First Name
</label>
<input
type=
"text"
class=
"form-control required"
data-parsley-trigger=
"change"
data-parsley-minlength=
"2"
data-parsley-pattern=
"^[a-zA-Z\ . ! @ # $ % ^ & * () + = , \/]+$"
required=
""
name=
"first_name"
placeholder=
"Enter Patient First Name"
value=
"
<?=
(
isset
(
$customer_data
)
&&
isset
(
$customer_data
->
first_name
))
?
$customer_data
->
first_name
:
''
?>
"
>
<span
class=
"glyphicon form-control-feedback"
></span>
</div>
<div
class=
"col-md-3"
>
<label>
<input
type=
"radio"
name=
"search_key_type"
value=
'1'
checked
>
<span
class=
"padAll-20"
>
Vechile Details
</span>
</label>
</div>
<div
class=
"col-md-9"
>
<label>
<input
type=
"radio"
name=
"search_key_type"
value=
'2'
>
<span
class=
"padAll-20"
>
VIN Number
</span>
</label>
</div>
</div>
<div
class=
"col-md-12"
>
<div
class=
"box-footer"
>
<div
style=
"text-align: center;"
>
<button
type=
"submit"
class=
"btn btn-primary"
>
Submit
</button>
</form>
<form
name=
"vechile_add"
data-parsley-validate=
""
required
>
<!-- Search Box START -->
<div
class=
"col-md-12 padAll-20"
>
<div
class=
"col-md-8"
>
<!-- Vehicle Details Search START -->
<div
id=
"searchTyp_1"
>
<div
class=
"col-md-12"
>
<div
class=
"col-md-12"
>
<label>
Vehicle Model
</label>
<input
type=
"text"
class=
"form-control required"
name=
"vehModel"
placeholder=
"Enter Vehicle Model"
required=
""
>
</div>
</div>
<div
class=
"col-md-12 padTop10"
>
<div
class=
"col-md-6"
>
<label>
Vehicle Maker
</label>
<input
type=
"text"
class=
"form-control required"
name=
"vehMaker"
placeholder=
"Enter Vehicle Maker"
required
>
</div>
<div
class=
"col-md-6"
>
<label>
Year of Manufactured
</label>
<select
name=
"vehYear"
class=
"form-control required"
data-parsley-trigger=
"change"
required=
""
>
<option
selected
disabled
value=
""
>
Choose Vehicle Purchase Year
</option>
<?php
for
(
$year
=
date
(
'Y'
);
$year
>=
1950
;
$year
--
){
$cond
=
(
isset
(
$vehicle_data
)
&&
isset
(
$vehicle_data
->
model
)
&&
!
empty
(
$vehicle_data
->
model
)
&&
$vehicle_data
->
model
==
$year
)
?
'selected'
:
''
;
echo
'<option '
.
$cond
.
' value="'
.
$year
.
'">'
.
$year
.
'</option>'
;
}
?>
</select>
</div>
</div>
</div>
</div>
<!-- Vehicle Details Search END -->
<!-- Vehicle Vin Search START -->
<div
id=
"searchTyp_2"
class=
"hide"
>
<div
class=
"col-md-12"
>
<div
class=
"col-md-12"
>
<label>
Vehicle VIN Number
</label>
<input
type=
"text"
class=
"form-control"
name=
"vehVin"
placeholder=
"Enter Vehicle VIN Number"
>
</div>
</div>
</div>
<!-- Vehicle Vin Search END -->
</div>
<!-- Search Box END -->
<div
class=
"col-md-4"
>
<button
id=
"searchVechile"
type=
"submit"
class=
"btn btn-info"
style=
"margin-top:22px;"
>
Search
</button>
</div>
</div>
</form>
<!-- Vehicle Details END -->
</form>
<div
class=
"col-md-12"
>
<div
class=
"box-footer"
>
<div
style=
"text-align: center;"
>
<button
id=
"createCustomerSubmit"
type=
"submit"
class=
"btn btn-primary"
>
Submit
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
application/views/Customer/list-customer-users.php
View file @
a831ad8a
...
...
@@ -23,6 +23,13 @@
</div>
<div
class=
"col-xs-12"
>
<div
class=
"box box-warning"
>
<div
class=
"box-header with-border"
>
<div
class=
"col-md-6"
><h3
class=
"box-title"
>
Customers List
</h3></div>
<div
class=
"col-md-6"
align=
"right"
>
<a
class=
"btn btn-sm btn-primary"
href=
"
<?=
base_url
(
'Customer/addCustomerUser'
)
?>
"
>
Add New Customer
</a>
<a
class=
"btn btn-sm btn-primary"
href=
"
<?=
base_url
()
?>
"
>
Back
</a>
</div>
</div>
<div
class=
"box-body"
>
<table
id=
"driverTable"
class=
"table table-bordered table-striped datatable "
>
<thead>
...
...
@@ -31,7 +38,7 @@
<th
width=
"150px;"
>
Name
</th>
<th
width=
"100px;"
>
Phone
</th>
<th
width=
"150px;"
>
Email ID
</th>
<th
width=
"
50px;"
>
Age
</th>
<th
width=
"
150px;"
>
Address
</th>
<th
width=
"150px;"
>
Date Of Birth
</th>
<th
width=
"50px;"
>
Status
</th>
<th
width=
"500px;"
>
Action
</th>
...
...
@@ -47,7 +54,7 @@
<td
class=
"center"
>
<?=
$customer
->
first_name
.
' '
.
$customer
->
last_name
?>
</th>
<td
class=
"center"
>
<?=
$customer
->
phone
?>
</th>
<td
class=
"center"
>
<?=
$customer
->
email
?>
</th>
<td
class=
"center"
>
<?=
$customer
->
a
ge
?>
</th>
<td
class=
"center"
>
<?=
$customer
->
a
ddress
?>
</th>
<td
class=
"center"
>
<?=
$customer
->
date_of_birth
?>
</th>
<td
class=
"center"
>
<?=
(
$customer
->
status
==
'1'
)
?
'Active'
:
'Inactive'
?>
</td>
<td
class=
"center"
>
...
...
application/views/Issue/issueMapping.php
View file @
a831ad8a
...
...
@@ -14,7 +14,7 @@
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<?php
$url
=
(
!
isset
(
$mech
IssueId
)
||
empty
(
$mechIssueId
))
?
'Issue/createMechIssue'
:
'Issue/updateMechIssue/'
.
$mechIssueId
;
$url
=
(
!
isset
(
$mech
anic_id
)
||
empty
(
$mechanic_id
)
||!
isset
(
$issue_id
)
||
empty
(
$issue_id
))
?
'Issue/createMechIssue'
:
'Issue/updateMechIssue/'
.
encode_param
(
$mechanic_id
)
.
'/'
.
encode_param
(
$issue_id
)
;
if
(
$this
->
session
->
flashdata
(
'message'
))
{
$flashdata
=
$this
->
session
->
flashdata
(
'message'
);
?>
<div
class=
"alert alert-
<?=
$flashdata
[
'class'
]
?>
"
>
...
...
@@ -37,7 +37,7 @@
<?php
if
(
!
empty
(
$issue_data
)){
foreach
(
$issue_data
as
$issue
)
{
$select
=
(
isset
(
$issue
->
issue_id
)
&&
$issue
->
issue_id
!=
$issue
->
issue_id
)
$select
=
(
isset
(
$issue
->
issue_id
)
&&
$issue
->
issue_id
==
$
issue_id
)
?
' selected '
:
''
;
echo
'<option '
.
$select
.
' value="'
.
$issue
->
issue_id
.
'">'
.
$issue
->
issue
.
'</option>'
;
}
...
...
@@ -47,7 +47,7 @@
<div
class=
"form-group"
>
<label>
Custom Service Fee
</label>
<input
type=
"text"
class=
"form-control required"
data-parsley-trigger=
"change"
data-parsley-minlength=
"2"
data-parsley-pattern=
"^[0-9\ , . \/]+$"
required=
""
name=
"service_fee"
placeholder=
"Custom Service Fee"
value=
"
<?=
(
isset
(
$
customer_data
)
&&
isset
(
$customer_data
->
service_fee
))
?
$customer_d
ata
->
service_fee
:
''
?>
"
>
data-parsley-minlength=
"2"
data-parsley-pattern=
"^[0-9\ , . \/]+$"
required=
""
name=
"service_fee"
placeholder=
"Custom Service Fee"
value=
"
<?=
(
isset
(
$
mechanicIssueData
)
&&
isset
(
$mechanicIssueData
->
service_fee
))
?
$mechanicIssueD
ata
->
service_fee
:
''
?>
"
>
<span
class=
"glyphicon form-control-feedback"
></span>
</div>
</div>
...
...
@@ -55,7 +55,7 @@
<div
class=
"form-group"
>
<label>
Custom Repair Description
</label>
<textarea
class=
"form-control required"
data-parsley-trigger=
"change"
data-parsley-minlength=
"2"
required=
""
name=
"issue_description"
style=
"height: 80px;"
placeholder=
"Custom Repair Description"
>
<?=
(
isset
(
$
issue_data
)
&&
isset
(
$issue_data
->
issue_description
))
?
trim
(
$issue_d
ata
->
issue_description
)
:
''
?>
</textarea>
data-parsley-minlength=
"2"
required=
""
name=
"issue_description"
style=
"height: 80px;"
placeholder=
"Custom Repair Description"
>
<?=
(
isset
(
$
mechanicIssueData
)
&&
isset
(
$mechanicIssueData
->
issue_description
))
?
trim
(
$mechanicIssueD
ata
->
issue_description
)
:
''
?>
</textarea>
<span
class=
"glyphicon form-control-feedback"
></span>
</div>
</div>
...
...
@@ -64,7 +64,7 @@
<div
class=
"col-md-12"
>
<div
class=
"box-footer textCenterAlign"
>
<button
type=
"submit"
class=
"btn btn-primary"
>
Submit
</button>
<a
href=
"
<?=
base_url
(
'Issue/view
Issues'
)
?>
"
class=
"btn btn-primary"
>
Cancel
</a>
<a
href=
"
<?=
base_url
(
'Issue/view
MappedIssues/'
.
encode_param
(
$mechanic_id
)
)
?>
"
class=
"btn btn-primary"
>
Cancel
</a>
</div>
</div>
</form>
...
...
application/views/Issue/viewMappedIssues.php
View file @
a831ad8a
...
...
@@ -26,7 +26,13 @@
<div
class=
"col-sm-12"
>
<div
class=
"box box-warning"
>
<div
class=
"box-header with-border"
>
<h3
class=
"box-title"
>
Mapped Issues Management
</h3>
<div
class=
"col-md-6"
>
<h3
class=
"box-title"
>
Mapped Issues Management
</h3>
</div>
<div
class=
"col-md-6"
align=
"right"
>
<a
class=
"btn btn-sm btn-primary"
href=
"
<?=
base_url
(
'Issue/addIssue'
)
?>
"
>
Add New General Issue
</a>
<a
class=
"btn btn-sm btn-primary"
href=
"
<?=
base_url
()
?>
"
>
Back
</a>
</div>
</div>
<div
class=
"box-body"
>
<form
id=
"chooseMechForm"
role=
"form"
action=
"
<?=
base_url
(
'Issue/viewMappedIssues'
)
?>
"
...
...
@@ -86,11 +92,11 @@
<th
class=
"center"
>
<?=
(
$customData
->
status
==
1
)
?
'Active'
:
'De-activate'
?>
</th>
<td
class=
"center"
>
<a
class=
"btn btn-sm btn-primary"
href=
"
<?=
base_url
(
'Issue/edit
Issue/'
.
encode_param
(
$customData
->
issue_id
)
)
?>
"
>
href=
"
<?=
base_url
(
'Issue/edit
MechanicIssues/'
.
encode_param
(
$customData
->
mechanic_id
)
.
'/'
.
encode_param
(
$customData
->
issue_id
)
.
'/2'
)
?>
"
>
<i
class=
"fa fa-fw fa-trash"
></i>
Edit
</a>
<a
class=
"btn btn-sm btn-danger"
href=
"
<?=
base_url
(
"Issue/change
Status/"
.
encode_param
(
$customData
->
issue_id
))
.
"/2"
?>
"
href=
"
<?=
base_url
(
"Issue/change
MappedIssueStatus/"
.
encode_param
(
$customData
->
mechanic_id
)
.
"/"
.
encode_param
(
$customData
->
issue_id
)
.
"/2"
)
?>
"
onClick=
"return doconfirm()"
>
<i
class=
"fa fa-fw fa-trash"
></i>
Delete
</a>
...
...
application/views/Settings/viewSettings.php
View file @
a831ad8a
...
...
@@ -23,9 +23,14 @@
</div>
<div
class=
"col-md-12"
>
<div
class=
"box box-warning"
>
<div
class=
"box-header with-border"
>
<h3
class=
"box-title"
>
Edit Driver Details
</h3>
</div>
<div
class=
"box-header with-border"
>
<div
class=
"col-md-6"
>
<h3
class=
"box-title"
>
Edit Basic Site Details
</h3>
</div>
<div
class=
"col-md-6"
align=
"right"
>
<a
class=
"btn btn-sm btn-primary"
href=
"
<?=
base_url
()
?>
"
>
Back
</a>
</div>
</div>
<form
method=
"post"
class=
"validate"
role=
"form"
action=
"
<?=
base_url
()
.
'Settings/change_settings'
?>
"
enctype=
"multipart/form-data"
data-parsley-validate=
""
>
<div
class=
"box-body"
>
<div
class=
"row"
>
...
...
@@ -86,6 +91,16 @@
<input
type=
"text"
name=
"google_api_key"
class=
"form-control required"
placeholder=
"Enter Google API"
value=
"
<?=
$data
[
'google_api_key'
]
?>
"
>
</div>
</div>
<div
class=
"row"
>
<div
class=
"form-group col-xs-4"
>
<label>
Vin Audit URL
</label>
<input
type=
"text"
name=
"vin_audit_url"
class=
"form-control required"
placeholder=
"Enter Vin Audit URL"
value=
"
<?=
$data
[
'vin_audit_url'
]
?>
"
>
</div>
<div
class=
"form-group col-xs-3"
>
<label>
Vin Audit API
</label>
<input
type=
"text"
name=
"vin_audit_api"
class=
"form-control required"
placeholder=
"Enter Vin Audit API"
value=
"
<?=
$data
[
'vin_audit_api'
]
?>
"
>
</div>
</div>
</div>
<div
class=
"box-footer"
style=
"padding-left:46%"
>
<button
type=
"submit"
class=
"btn btn-info"
>
Update
</button>
...
...
application/views/Templates/left-menu.php
View file @
a831ad8a
...
...
@@ -56,15 +56,15 @@
</li>
<?php
}
?>
<li>
<a
href=
"
<?=
base_url
(
'Issue/view
Mapped
Issues'
)
?>
"
>
<a
href=
"
<?=
base_url
(
'Issue/viewIssues'
)
?>
"
>
<i
class=
"fa fa-circle-o text-aqua"
></i>
Manage
Mapped
Issues
Manage
General
Issues
</a>
</li>
<li>
<a
href=
"
<?=
base_url
(
'Issue/viewIssues'
)
?>
"
>
<a
href=
"
<?=
base_url
(
'Issue/view
Mapped
Issues'
)
?>
"
>
<i
class=
"fa fa-circle-o text-aqua"
></i>
Manage
Common
Issues
Manage
Mechanic
Issues
</a>
</li>
</ul>
...
...
@@ -91,29 +91,27 @@
</li>
</ul>
</li>
<?php
}
?>
<li
class=
"treeview"
>
<a
href=
"#"
>
<i
class=
"fa fa-bars"
aria-hidden=
"true"
></i>
<span>
Customer Management
</span>
<i
class=
"fa fa-angle-left pull-right"
></i>
</a>
<ul
class=
"treeview-menu"
>
<li>
<a
href=
"
<?=
base_url
(
'Customer/addCustomerUser'
)
?>
"
>
<i
class=
"fa fa-circle-o text-aqua"
></i>
Add Customer
</a>
</li>
<li>
<a
href=
"
<?=
base_url
(
'Customer/listCustomerUsers'
)
?>
"
>
<i
class=
"fa fa-circle-o text-aqua"
></i>
View Customers
</a>
</li>
</ul>
</li>
<?php
if
(
$this
->
session
->
userdata
[
'user_type'
]
==
1
){
?>
<li
class=
"treeview"
>
<a
href=
"#"
>
<i
class=
"fa fa-bars"
aria-hidden=
"true"
></i>
<span>
Customer Management
</span>
<i
class=
"fa fa-angle-left pull-right"
></i>
</a>
<ul
class=
"treeview-menu"
>
<li>
<a
href=
"
<?=
base_url
(
'Customer/addCustomerUser'
)
?>
"
>
<i
class=
"fa fa-circle-o text-aqua"
></i>
Add Customer
</a>
</li>
<li>
<a
href=
"
<?=
base_url
(
'Customer/listCustomerUsers'
)
?>
"
>
<i
class=
"fa fa-circle-o text-aqua"
></i>
View Customers
</a>
</li>
</ul>
</li>
<li><a
href=
"
<?=
base_url
(
'Settings'
)
?>
"
>
<i
class=
"fa fa-wrench"
aria-hidden=
"true"
>
</i><span>
Settings
</span></a>
...
...
assets/css/custom-style.css
View file @
a831ad8a
...
...
@@ -334,4 +334,12 @@
.textCenterAlign
{
text-align
:
center
;
}
.padAll-20
{
padding
:
10px
;
}
.padAll-20
{
padding
:
20px
;
}
\ No newline at end of file
assets/js/custom-script.js
View file @
a831ad8a
...
...
@@ -232,4 +232,97 @@ jQuery('[id="viewMechanic"]').on('click',function() {
function
changeMechanic
(){
jQuery
(
'[id="chooseMechForm"]'
).
submit
();
}
\ No newline at end of file
}
jQuery
(
'[name="search_key_type"]'
).
on
(
'change'
,
function
()
{
var
searchTypId
=
jQuery
(
this
).
val
();
if
(
searchTypId
==
''
||
searchTypId
==
null
||
searchTypId
==
'null'
||
searchTypId
==
undefined
||
searchTypId
==
'undefined'
){
return
false
;
}
jQuery
(
'[id^="searchTyp_"]'
).
addClass
(
'hide'
);
jQuery
(
'[id="searchTyp_'
+
searchTypId
+
'"]'
).
removeClass
(
'hide'
);
jQuery
(
'[id^="searchTyp_"]'
).
find
(
'input'
).
each
(
function
(
index
,
element
)
{
jQuery
(
this
).
val
(
''
);
jQuery
(
this
).
removeAttr
(
'required'
);
jQuery
(
this
).
removeClass
(
'required'
);
});
jQuery
(
'[id="searchTyp_'
+
searchTypId
+
'"]'
).
find
(
'input'
).
each
(
function
(
index
,
element
)
{
jQuery
(
this
).
attr
(
'required'
,
''
);
jQuery
(
this
).
addClass
(
'required'
);
});
});
jQuery
(
'[id="createCustomerSubmit"]'
).
on
(
'click'
,
function
()
{
jQuery
(
'[id="createCustomerForm"]'
).
submit
();
});
jQuery
(
'[id="searchVechile"]'
).
on
(
'click'
,
function
()
{
event
.
preventDefault
();
var
searchTypId
=
jQuery
(
'[name="search_key_type"]'
).
val
(),
passArr
=
{
'searchType'
:
''
,
'vehModel'
:
''
,
'vehMaker'
:
''
,
'vehYear'
:
''
,
'vehVin'
:
''
};
if
(
searchTypId
==
''
||
searchTypId
==
null
||
searchTypId
==
'null'
||
searchTypId
==
undefined
||
searchTypId
==
'undefined'
){
modalTrigger
(
'Vechile Search Failed'
,
'Vechile Search Failed Failed. Provide proper data and try again..!'
);
return
false
;
}
var
vehVin
=
jQuery
(
'[name="vehVin"]'
).
val
(),
vehYear
=
jQuery
(
'[name="vehYear"]'
).
val
(),
vehModel
=
jQuery
(
'[name="vehModel"]'
).
val
(),
vehMaker
=
jQuery
(
'[name="vehMaker"]'
).
val
();
if
((
searchTypId
==
1
&&
(
vehYear
==
''
||
vehYear
==
null
||
vehYear
==
'null'
||
vehYear
==
undefined
||
vehYear
==
'undefined'
||
vehModel
==
''
||
vehModel
==
null
||
vehModel
==
'null'
||
vehModel
==
undefined
||
vehModel
==
'undefined'
||
vehMaker
==
''
||
vehMaker
==
null
||
vehMaker
==
'null'
||
vehMaker
==
undefined
||
vehMaker
==
'undefined'
)
)
||
(
searchTypId
==
2
&&
(
vehVin
==
''
||
vehVin
==
null
||
vehVin
==
'null'
||
vehVin
==
undefined
||
vehVin
==
'undefined'
)
)
){
modalTrigger
(
'Vechile Search Failed'
,
'Vechile Search Failed Failed. Provide proper data and try again..!'
);
return
false
;
}
passArr
.
vehVin
=
vehVin
;
passArr
.
vehYear
=
vehYear
;
passArr
.
vehModel
=
vehModel
;
passArr
.
vehMaker
=
vehMaker
;
passArr
.
searchType
=
searchTypId
;
jQuery
.
ajax
({
url
:
base_url
+
"Vehicle/vechicleSearch"
,
type
:
'POST'
,
data
:
passArr
,
success
:
function
(
resp
){
if
(
resp
==
''
||
resp
==
undefined
||
resp
==
'undefined'
||
resp
==
null
||
resp
==
'null'
){
remModalLoader
();
jQuery
(
'[id="modal_content"]'
).
html
(
'Something went wrong, please try again later...!'
);
return
false
;
}
var
resp_data
=
jQuery
.
parseJSON
(
resp
);
if
(
resp_data
[
'status'
]
!=
'1'
){
remModalLoader
();
jQuery
(
'[id="modal_content"]'
).
html
(
'Something went wrong, please try again later...!'
);
return
false
;
}
var
mechanic_data
=
resp_data
[
'data'
];
jQuery
.
each
(
mechanic_data
,
function
(
index
,
value
)
{
if
(
value
==
''
||
value
==
null
||
value
==
undefined
||
value
==
'null'
||
value
==
'undefined'
){
mechanic_data
[
index
]
=
' -- '
;
}
});
remModalLoader
();
},
fail
:
function
(
xhr
,
textStatus
,
errorThrown
){
remModalLoader
();
jQuery
(
'[id="modal_content"]'
).
html
(
'Something went wrong, please try again later...!'
);
},
error
:
function
(
ajaxContext
)
{
remModalLoader
();
jQuery
(
'[id="modal_content"]'
).
html
(
'Something went wrong, please try again later...!'
);
}
});
});
\ No newline at end of file
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