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
0f8c5e10
Commit
0f8c5e10
authored
Dec 19, 2018
by
Tobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
daily commit
parent
b6616424
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
286 additions
and
20 deletions
+286
-20
Issue.php
application/controllers/Issue.php
+95
-6
Issue_model.php
application/models/Issue_model.php
+39
-4
issueForm.php
application/views/Issue/issueForm.php
+0
-0
viewIssues.php
application/views/Issue/viewIssues.php
+14
-6
custom-style.css
assets/css/custom-style.css
+51
-2
custom-script.js
assets/js/custom-script.js
+87
-2
tobin_dcarfixers.sql
sql/tobin_dcarfixers.sql
+0
-0
No files found.
application/controllers/Issue.php
View file @
0f8c5e10
...
@@ -20,7 +20,7 @@ class Issue extends CI_Controller {
...
@@ -20,7 +20,7 @@ class Issue extends CI_Controller {
$template
[
'pTitle'
]
=
"Add Issue"
;
$template
[
'pTitle'
]
=
"Add Issue"
;
$template
[
'pDescription'
]
=
"Create New Issue"
;
$template
[
'pDescription'
]
=
"Create New Issue"
;
$template
[
'issue_data'
]
=
$this
->
Issue_model
->
getIssue
();
$template
[
'issue_data'
]
=
$this
->
Issue_model
->
getIssue
s
();
$this
->
load
->
view
(
'template'
,
$template
);
$this
->
load
->
view
(
'template'
,
$template
);
}
}
...
@@ -31,7 +31,7 @@ class Issue extends CI_Controller {
...
@@ -31,7 +31,7 @@ class Issue extends CI_Controller {
$template
[
'pTitle'
]
=
"View Issues"
;
$template
[
'pTitle'
]
=
"View Issues"
;
$template
[
'pDescription'
]
=
"View and Manage Issues"
;
$template
[
'pDescription'
]
=
"View and Manage Issues"
;
$template
[
'issue_data'
]
=
$this
->
Issue_model
->
getIssue
(
''
,
1
);
$template
[
'issue_data'
]
=
$this
->
Issue_model
->
getIssue
s
(
''
,
1
);
$this
->
load
->
view
(
'template'
,
$template
);
$this
->
load
->
view
(
'template'
,
$template
);
}
}
...
@@ -51,6 +51,7 @@ class Issue extends CI_Controller {
...
@@ -51,6 +51,7 @@ class Issue extends CI_Controller {
public
function
createIssue
(){
public
function
createIssue
(){
$err
=
0
;
$err
=
0
;
$errMsg
=
''
;
$errMsg
=
''
;
$this
->
load
->
library
(
'upload'
,
set_upload_service
(
"assets/uploads/services"
));
$flashMsg
=
array
(
'message'
=>
'Something went wrong, please try again..!'
,
'class'
=>
'error'
);
$flashMsg
=
array
(
'message'
=>
'Something went wrong, please try again..!'
,
'class'
=>
'error'
);
if
(
!
isset
(
$_POST
)
||
empty
(
$_POST
)){
if
(
!
isset
(
$_POST
)
||
empty
(
$_POST
)){
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
...
@@ -60,14 +61,84 @@ class Issue extends CI_Controller {
...
@@ -60,14 +61,84 @@ class Issue extends CI_Controller {
$err
=
1
;
$err
=
1
;
$errMsg
=
'Provide Issue Short Discription'
;
$errMsg
=
'Provide Issue Short Discription'
;
}
}
else
if
(
$err
==
0
&&
(
!
isset
(
$_FILES
[
'issue_image'
])
||
empty
(
$_FILES
[
'issue_image'
]))){
$err
=
1
;
$errMsg
=
'Provide Issue Icon'
;
}
else
if
(
$err
==
0
&&
(
empty
(
$_POST
[
'issue_category'
])
||
count
(
$_POST
[
'issue_category'
])
<=
0
)){
$err
=
1
;
$errMsg
=
'Provide Issue Category Type'
;
}
else
if
(
$err
==
0
&&
(
empty
(
$_POST
[
'default_description'
])
||
count
(
$_POST
[
'default_description'
])
<=
0
)){
$err
=
1
;
$errMsg
=
'Provide Issue Category Discription'
;
}
else
if
(
$err
==
0
&&
(
empty
(
$_POST
[
'default_service_fee'
])
||
count
(
$_POST
[
'default_service_fee'
])
<=
0
)){
$err
=
1
;
$errMsg
=
'Provide Issue Category Service Fee'
;
}
else
if
(
$err
==
0
&&
(
empty
(
$_FILES
[
'issue_cat_image'
])
||!
isset
(
$_FILES
[
'issue_cat_image'
][
'name'
])
||
count
(
$_FILES
[
'issue_cat_image'
][
'name'
])
<=
0
)){
$err
=
1
;
$errMsg
=
'Provide Issue Category Default Icon'
;
}
else
if
(
$err
==
0
&&
(
count
(
$_POST
[
'issue_category'
])
!=
count
(
$_POST
[
'default_description'
])
||
count
(
$_POST
[
'issue_category'
])
!=
count
(
$_POST
[
'default_service_fee'
])
||
count
(
$_POST
[
'issue_category'
])
!=
count
(
$_FILES
[
'issue_cat_image'
][
'name'
]))){
$err
=
1
;
}
$files
=
$_FILES
;
if
(
$err
==
0
){
$typ
=
0
;
$issueTyp
=
array
();
for
(
$typ
=
0
;
$typ
<
count
(
$_POST
[
'issue_category'
]);
$typ
++
)
{
if
(
!
isset
(
$_POST
[
'issue_category'
][
$typ
])
||
!
isset
(
$_POST
[
'default_description'
][
$typ
])
||
!
isset
(
$_POST
[
'default_service_fee'
][
$typ
])
||
!
isset
(
$_FILES
[
'issue_cat_image'
][
'name'
][
$typ
])){
$err
=
1
;
break
;
}
$_FILES
[
'file'
][
'name'
]
=
$files
[
'issue_cat_image'
][
'name'
][
$typ
];
$_FILES
[
'file'
][
'type'
]
=
$files
[
'issue_cat_image'
][
'type'
][
$typ
];
$_FILES
[
'file'
][
'size'
]
=
$files
[
'issue_cat_image'
][
'size'
][
$typ
];
$_FILES
[
'file'
][
'error'
]
=
$files
[
'issue_cat_image'
][
'error'
][
$typ
];
$_FILES
[
'file'
][
'tmp_name'
]
=
$files
[
'issue_cat_image'
][
'tmp_name'
][
$typ
];
if
(
!
$this
->
upload
->
do_upload
(
'file'
)){
$err
=
1
;
$errMsg
=
$this
->
upload
->
display_errors
();
break
;
}
$imgData
=
$this
->
upload
->
data
();
$image_name
=
"assets/uploads/services/"
.
$imgData
[
'file_name'
];
$issueTyp
[]
=
array
(
'issue_category'
=>
$_POST
[
'issue_category'
][
$typ
],
'issue_cat_image'
=>
$image_name
,
'status'
=>
'1'
,
'default_service_fee'
=>
$_POST
[
'default_service_fee'
][
$typ
],
'default_description'
=>
$_POST
[
'default_description'
][
$typ
]);
}
unset
(
$_POST
[
'issue_category'
]);
unset
(
$_POST
[
'default_service_fee'
]);
unset
(
$_POST
[
'default_description'
]);
if
(
$this
->
upload
->
do_upload
(
'issue_image'
)){
$imgData
=
$this
->
upload
->
data
();
$_POST
[
'issue_image'
]
=
"assets/uploads/services/"
.
$imgData
[
'file_name'
];
}
else
{
$err
=
1
;
$errMsg
=
$this
->
upload
->
display_errors
();
break
;
}
}
if
(
$err
==
1
){
if
(
$err
==
1
){
$flashMsg
[
'message'
]
=
$errMsg
;
$flashMsg
[
'message'
]
=
$errMsg
;
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
base_url
(
'Issue/addIssue'
));
redirect
(
base_url
(
'Issue/addIssue'
));
}
}
$status
=
$this
->
Issue_model
->
addIssue
(
$_POST
);
$status
=
$this
->
Issue_model
->
addIssue
(
$_POST
,
$issueTyp
);
if
(
$status
==
1
){
if
(
$status
==
1
){
$flashMsg
=
array
(
'message'
=>
'Successfully Updated Issue Details..!'
,
'class'
=>
'success'
);
$flashMsg
=
array
(
'message'
=>
'Successfully Updated Issue Details..!'
,
'class'
=>
'success'
);
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
...
@@ -92,7 +163,7 @@ class Issue extends CI_Controller {
...
@@ -92,7 +163,7 @@ class Issue extends CI_Controller {
$template
[
'pDescription'
]
=
"Update Issue Data"
;
$template
[
'pDescription'
]
=
"Update Issue Data"
;
$template
[
'issue_id'
]
=
encode_param
(
$issue_id
);
$template
[
'issue_id'
]
=
encode_param
(
$issue_id
);
$template
[
'issue_data'
]
=
$this
->
Issue_model
->
getIssue
(
$issue_id
,
1
);
$template
[
'issue_data'
]
=
$this
->
Issue_model
->
getIssue
Details
(
$issue_id
,
1
);
if
(
empty
(
$template
[
'issue_data'
])){
if
(
empty
(
$template
[
'issue_data'
])){
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
base_url
(
'Issue/viewIssues'
));
redirect
(
base_url
(
'Issue/viewIssues'
));
...
@@ -145,7 +216,7 @@ class Issue extends CI_Controller {
...
@@ -145,7 +216,7 @@ class Issue extends CI_Controller {
$template
[
'pTitle'
]
=
"Issue Mapping"
;
$template
[
'pTitle'
]
=
"Issue Mapping"
;
$template
[
'pDescription'
]
=
"Creating Couston Issues"
;
$template
[
'pDescription'
]
=
"Creating Couston Issues"
;
$template
[
'issue_data'
]
=
$this
->
Issue_model
->
getIssue
(
''
,
1
);
$template
[
'issue_data'
]
=
$this
->
Issue_model
->
getIssue
s
(
''
,
1
);
$template
[
'mechanic_id'
]
=
encode_param
(
$this
->
session
->
userdata
(
'id'
));
$template
[
'mechanic_id'
]
=
encode_param
(
$this
->
session
->
userdata
(
'id'
));
if
(
empty
(
$template
[
'issue_data'
])){
if
(
empty
(
$template
[
'issue_data'
])){
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
...
@@ -249,7 +320,7 @@ class Issue extends CI_Controller {
...
@@ -249,7 +320,7 @@ class Issue extends CI_Controller {
$template
[
'issue_id'
]
=
$issue_id
;
$template
[
'issue_id'
]
=
$issue_id
;
$template
[
'mechanic_id'
]
=
$mechanic_id
;
$template
[
'mechanic_id'
]
=
$mechanic_id
;
$template
[
'issue_data'
]
=
$this
->
Issue_model
->
getIssue
(
''
,
1
);
$template
[
'issue_data'
]
=
$this
->
Issue_model
->
getIssue
s
(
''
,
1
);
$template
[
'mechanicIssueData'
]
=
$this
->
Issue_model
->
getMechanicIssues
(
$mechanic_id
,
$issue_id
);
$template
[
'mechanicIssueData'
]
=
$this
->
Issue_model
->
getMechanicIssues
(
$mechanic_id
,
$issue_id
);
if
(
empty
(
$template
[
'mechanicIssueData'
])){
if
(
empty
(
$template
[
'mechanicIssueData'
])){
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
...
@@ -301,5 +372,22 @@ class Issue extends CI_Controller {
...
@@ -301,5 +372,22 @@ class Issue extends CI_Controller {
redirect
(
$url
);
redirect
(
$url
);
}
}
}
}
function
getIssueDetails
(){
$resArr
=
array
(
'status'
=>
0
);
if
(
!
isset
(
$_POST
)
||
empty
(
$_POST
)
||!
isset
(
$_POST
[
'issue_id'
])
||
empty
(
$_POST
[
'issue_id'
])
||
!
is_numeric
(
$issue_id
=
decode_param
(
$_POST
[
'issue_id'
]))){
echo
json_encode
(
$resArr
);
exit
;
}
$issue_data
=
$this
->
Issue_model
->
getIssueDetails
(
$issue_id
);
if
(
empty
(
$issue_data
)){
echo
json_encode
(
$resArr
);
exit
;
}
$resArr
[
'status'
]
=
1
;
$resArr
[
'data'
]
=
$issue_data
;
echo
json_encode
(
$resArr
);
exit
;
}
}
}
?>
?>
\ No newline at end of file
application/models/Issue_model.php
View file @
0f8c5e10
...
@@ -5,16 +5,24 @@ class Issue_model extends CI_Model {
...
@@ -5,16 +5,24 @@ class Issue_model extends CI_Model {
parent
::
_construct
();
parent
::
_construct
();
}
}
public
function
addIssue
(
$issue_data
=
array
()){
public
function
addIssue
(
$issue_data
=
array
()
,
$issueTyp
=
array
()
){
if
(
empty
(
$issue_data
)
){
if
(
empty
(
$issue_data
)
||
empty
(
$issueTyp
))
return
0
;
return
0
;
}
$status
=
$this
->
db
->
insert
(
'issues'
,
$issue_data
);
$status
=
$this
->
db
->
insert
(
'issues'
,
$issue_data
);
if
(
!
$status
)
return
0
;
$issue_id
=
$this
->
db
->
insert_id
();
foreach
(
$issueTyp
AS
$key
=>
$value
)
{
$issueTyp
[
$key
][
'issue_id'
]
=
$issue_id
;
}
$status
=
$this
->
db
->
insert_batch
(
'issues_category'
,
$issueTyp
);
return
(
$status
)
?
1
:
0
;
return
(
$status
)
?
1
:
0
;
}
}
function
getIssue
(
$issue_id
=
''
,
$view_all
=
0
){
function
getIssue
s
(
$issue_id
=
''
,
$view_all
=
0
){
$cond
=
(
$view_all
!=
0
)
?
' status IN (0,1) '
:
' status IN (1) '
;
$cond
=
(
$view_all
!=
0
)
?
' status IN (0,1) '
:
' status IN (1) '
;
$cond
.=
(
!
empty
(
$issue_id
))
?
" AND issue_id = '
$issue_id
'"
:
""
;
$cond
.=
(
!
empty
(
$issue_id
))
?
" AND issue_id = '
$issue_id
'"
:
""
;
...
@@ -25,6 +33,33 @@ class Issue_model extends CI_Model {
...
@@ -25,6 +33,33 @@ class Issue_model extends CI_Model {
return
(
empty
(
$issue_id
))
?
$result
->
result
()
:
$result
->
row
();
return
(
empty
(
$issue_id
))
?
$result
->
result
()
:
$result
->
row
();
}
}
function
getIssueDetails
(
$issue_id
=
''
,
$view_all
=
0
){
$cond
=
(
$view_all
!=
0
)
?
' status IN (0,1) '
:
' status IN (1) '
;
$cond
.=
(
!
empty
(
$issue_id
))
?
" AND issue_id = '
$issue_id
' "
:
""
;
$result
=
$this
->
db
->
query
(
"SELECT * FROM issues WHERE
$cond
"
);
if
(
empty
(
$result
)){
return
;
}
if
(
empty
(
$issue_id
)){
$issue_data
=
$result
->
result
();
foreach
(
$issue_data
AS
$key
=>
$issue
)
{
$result
=
$this
->
db
->
query
(
"SELECT * FROM issues_category
WHERE issue_id='
$issue->issue_id
' AND status='1'"
);
if
(
empty
(
$result
)){
return
;
}
$issue_data
[
$key
]
->
sub_issue
=
$result
->
result
();
}
}
else
{
$issue_data
=
$result
->
row
();
$result
=
$this
->
db
->
query
(
"SELECT * FROM issues_category
WHERE issue_id='
$issue_data->issue_id
' AND status='1'"
);
$issue_data
->
sub_issue
=
$result
->
result
();
}
return
$issue_data
;
}
function
changeStatus
(
$issue_id
=
''
,
$status
=
'0'
){
function
changeStatus
(
$issue_id
=
''
,
$status
=
'0'
){
if
(
empty
(
$issue_id
)){
if
(
empty
(
$issue_id
)){
return
0
;
return
0
;
...
...
application/views/Issue/issueForm.php
View file @
0f8c5e10
This diff is collapsed.
Click to expand it.
application/views/Issue/viewIssues.php
View file @
0f8c5e10
...
@@ -36,10 +36,11 @@
...
@@ -36,10 +36,11 @@
<table
id=
"mechanicUsers"
class=
"table table-bordered table-striped datatable "
>
<table
id=
"mechanicUsers"
class=
"table table-bordered table-striped datatable "
>
<thead>
<thead>
<tr>
<tr>
<th
class=
"50px"
>
ID
</th>
<th
class=
"hidden"
>
ID
</th>
<th
width=
"600px;"
>
Issue Shot Discription
</th>
<th
width=
"15%;"
>
Issue Icon
</th>
<th
width=
"100px;"
>
Status
</th>
<th
width=
"35%;"
>
Issue Category
</th>
<th
width=
"300px;"
>
Action
</th>
<th
width=
"10%;"
>
Status
</th>
<th
width=
"40%;"
>
Action
</th>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
...
@@ -47,14 +48,21 @@
...
@@ -47,14 +48,21 @@
if
(
!
empty
(
$issue_data
)){
if
(
!
empty
(
$issue_data
)){
foreach
(
$issue_data
as
$issue
)
{
?>
foreach
(
$issue_data
as
$issue
)
{
?>
<tr>
<tr>
<th
class=
"center"
>
<?=
$issue
->
issue_id
?>
</th>
<th
class=
"hidden"
>
<?=
$issue
->
issue_id
?>
</th>
<th
class=
"center"
>
<img
src=
"
<?=
base_url
(
$issue
->
issue_image
)
?>
"
onerror=
"this.src='
<?=
base_url
(
"assets/images/no_image.png"
)
?>
';"
height=
"50"
width=
"auto"
/>
</th>
<th
class=
"center"
>
<?=
$issue
->
issue
?>
</th>
<th
class=
"center"
>
<?=
$issue
->
issue
?>
</th>
<th
class=
"center"
>
<?=
(
$issue
->
status
==
1
)
?
'Active'
:
'De-activate'
?>
</th>
<th
class=
"center"
>
<?=
(
$issue
->
status
==
1
)
?
'Active'
:
'De-activate'
?>
</th>
<td
class=
"center"
>
<td
class=
"center"
>
<a
class=
"btn btn-sm btn-info cpoint"
onclick=
"viewIssueDetls('
<?=
encode_param
(
$issue
->
issue_id
)
?>
');"
>
<i
class=
"fa fa-fw fa-edit"
></i>
View Issue Sub Categories
</a>
<a
class=
"btn btn-sm btn-primary"
<a
class=
"btn btn-sm btn-primary"
href=
"
<?=
base_url
(
'Issue/editIssue/'
.
encode_param
(
$issue
->
issue_id
))
?>
"
>
href=
"
<?=
base_url
(
'Issue/editIssue/'
.
encode_param
(
$issue
->
issue_id
))
?>
"
>
<i
class=
"fa fa-fw fa-edit"
></i>
Edit
<i
class=
"fa fa-fw fa-edit"
></i>
Edit
</a>
</a>
<a
class=
"btn btn-sm btn-danger"
<a
class=
"btn btn-sm btn-danger"
href=
"
<?=
base_url
(
"Issue/changeStatus/"
.
encode_param
(
$issue
->
issue_id
))
.
"/2"
?>
"
href=
"
<?=
base_url
(
"Issue/changeStatus/"
.
encode_param
(
$issue
->
issue_id
))
.
"/2"
?>
"
onClick=
"return doconfirm()"
>
onClick=
"return doconfirm()"
>
...
...
assets/css/custom-style.css
View file @
0f8c5e10
...
@@ -316,6 +316,10 @@
...
@@ -316,6 +316,10 @@
padding-bottom
:
20px
!important
;
padding-bottom
:
20px
!important
;
}
}
.padBottom10
{
padding-bottom
:
10px
!important
;
}
.padTop10
{
.padTop10
{
padding-top
:
10px
!important
;
padding-top
:
10px
!important
;
}
}
...
@@ -344,6 +348,18 @@
...
@@ -344,6 +348,18 @@
padding-left
:
20px
!important
;
padding-left
:
20px
!important
;
}
}
.padLeft40
{
padding-left
:
40px
!important
;
}
.padLeft30
{
padding-left
:
30px
!important
;
}
.padLeft50
{
padding-left
:
50px
!important
;
}
.padUnset
{
.padUnset
{
padding-left
:
unset
!important
;
padding-left
:
unset
!important
;
}
}
...
@@ -393,4 +409,38 @@
...
@@ -393,4 +409,38 @@
.marginBottom-10
{
.marginBottom-10
{
margin-bottom
:
10px
;
margin-bottom
:
10px
;
}
}
\ No newline at end of file
.marginTop-8
{
margin-top
:
8px
;
}
.fav-add-icon
{
font-size
:
2em
;
color
:
#5a9f5a
;
}
.fav-rem-icon
{
font-size
:
2em
;
color
:
#c61a1a
;
}
.list_custom
{
width
:
100%
;
padding
:
0px
;
margin
:
0px
;
border-bottom
:
1px
solid
#e2e2e2
;
}
.list_custom
li
{
display
:
inline-block
;
text-align
:
left
;
padding-left
:
15px
;
}
.issue-box
{
vertical-align
:
top
;
margin-top
:
10px
!important
;
}
assets/js/custom-script.js
View file @
0f8c5e10
...
@@ -520,4 +520,89 @@ function searchAction(car_id, action, saved, name){
...
@@ -520,4 +520,89 @@ function searchAction(car_id, action, saved, name){
jQuery
(
'div'
).
on
(
'click'
,
'[id^="remove_saved_"]'
,
function
(
event
)
{
jQuery
(
'div'
).
on
(
'click'
,
'[id^="remove_saved_"]'
,
function
(
event
)
{
var
thisObj
=
jQuery
(
this
),
car_id
=
thisObj
.
attr
(
'car_id'
);
var
thisObj
=
jQuery
(
this
),
car_id
=
thisObj
.
attr
(
'car_id'
);
searchAction
(
car_id
,
'3'
,
'1'
,
''
);
searchAction
(
car_id
,
'3'
,
'1'
,
''
);
});
});
\ No newline at end of file
jQuery
(
'[id^="addSubIssue_"]'
).
on
(
'click'
,
function
(
event
)
{
var
thisObj
=
jQuery
(
this
),
count
=
thisObj
.
attr
(
'count'
),
html
=
jQuery
(
'[id="subIssueAdd"]'
).
html
();
if
(
count
==
''
||
count
==
null
||
count
==
'null'
||
count
==
undefined
||
count
==
'undefined'
||
html
==
''
||
html
==
null
||
html
==
'null'
||
html
==
undefined
||
html
==
'undefined'
){
return
false
;
}
count
=
parseInt
(
count
)
+
1
;
thisObj
.
attr
(
'count'
,
count
);
html
=
html
.
replace
(
/{:count}/g
,
count
);
jQuery
(
'[id="subIssueCntr"]'
).
append
(
'<div id="newSubIssue_'
+
count
+
'">'
+
html
+
'</div>'
);
});
function
remSubIssue
(
count
){
if
(
count
==
''
||
count
==
null
||
count
==
'null'
||
count
==
undefined
||
count
==
'undefined'
){
return
false
;
}
jQuery
(
'[id="newSubIssue_'
+
count
+
'"]'
).
remove
();
}
function
viewIssueDetls
(
issue_id
){
if
(
issue_id
==
''
||
issue_id
==
null
||
issue_id
==
'null'
||
issue_id
==
undefined
||
issue_id
==
'undefined'
){
return
false
;
}
var
head
=
''
,
body
=
''
,
msg
=
'Something went wrong, please try again later...!'
;
jQuery
(
'.modal-dialog'
).
css
(
'width'
,
'60%'
);
modalTrigger
(
'Issue Sub Types'
,
''
);
addModalLoader
();
jQuery
.
ajax
({
url
:
base_url
+
"Issue/getIssueDetails"
,
type
:
'POST'
,
data
:
{
'issue_id'
:
issue_id
},
success
:
function
(
resp
){
if
(
resp
==
''
||
resp
==
undefined
||
resp
==
'undefined'
||
resp
==
null
||
resp
==
'null'
){
remModalLoader
();
jQuery
(
'[id="modal_content"]'
).
html
(
msg
);
return
false
;
}
var
resp_data
=
jQuery
.
parseJSON
(
resp
);
if
(
resp_data
[
'status'
]
!=
'1'
||
(
resp_data
[
'status'
]
==
1
&&
resp_data
[
'data'
]
==
''
||
resp_data
[
'data'
]
==
null
||
resp_data
[
'data'
]
==
undefined
||
resp_data
[
'data'
]
==
'null'
||
resp_data
[
'data'
]
==
'undefined'
)){
remModalLoader
();
jQuery
(
'[id="modal_content"]'
).
html
(
msg
);
return
false
;
}
head
=
'<ul class="list_custom">'
+
'<li class="marginTop10" style="width:25%;"><label>Type</label></li>'
+
'<li class="marginTop10" style="width:40%;"><label>Description</label></li>'
+
'<li class="marginTop10" style="width:15%;"><label>Service Fee</label></li>'
+
'<li class="padBottom10 padLeft50"><label>Image</label></li>'
+
'</ul>'
;
jQuery
.
each
(
resp_data
[
'data'
][
'sub_issue'
],
function
(
index
,
value
)
{
console
.
log
(
value
);
body
+=
'<ul class="list_custom">'
+
'<li class="issue-box" style="width:25%;"><label>'
+
value
[
'issue_category'
]
+
'</label></li>'
+
'<li class="issue-box" style="width:40%;">'
+
value
[
'default_description'
]
+
'</li>'
+
'<li class="issue-box padLeft40" style="width:15%;"><label>'
+
value
[
'default_service_fee'
]
+
'</label></li>'
+
'<li class="padBottom10 padLeft20 issue-box">'
+
'<img src="'
+
base_url
+
value
[
'issue_cat_image'
]
+
'" height="50" width="auto" '
+
'onerror="this.src=;" />'
+
'</li>'
+
'</ul>'
;
});
jQuery
(
'[id="modal_content"]'
).
html
(
'<div class="border">'
+
head
+
body
+
'</div>'
);
remModalLoader
();
return
false
;
},
fail
:
function
(
xhr
,
textStatus
,
errorThrown
){
remModalLoader
();
jQuery
(
'[id="modal_content"]'
).
html
(
msg
);
return
false
;
},
error
:
function
(
ajaxContext
)
{
remModalLoader
();
jQuery
(
'[id="modal_content"]'
).
html
(
msg
);
return
false
;
}
});
}
\ No newline at end of file
sql/tobin_dcarfixers.sql
View file @
0f8c5e10
This diff is collapsed.
Click to expand it.
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