Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
PharmacySMSReport
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
PharmacySMSReport
Commits
ac2fe36d
Commit
ac2fe36d
authored
4 years ago
by
Vinodkumar Chindam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added validation and resize the image.
parent
d0c1760b
Pipeline
#47574
passed with stages
in 40 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
17 deletions
+21
-17
PharmaStoreReport/Controllers/HomeController.cs
PharmaStoreReport/Controllers/HomeController.cs
+1
-1
PharmaStoreReport/Views/Home/Index.cshtml
PharmaStoreReport/Views/Home/Index.cshtml
+4
-4
PharmaStoreReport/wwwroot/images/Ams_1.png
PharmaStoreReport/wwwroot/images/Ams_1.png
+0
-0
PharmaStoreReport/wwwroot/js/validate-home.js
PharmaStoreReport/wwwroot/js/validate-home.js
+12
-8
PharmaStoreReport/wwwroot/lib/jQuery.FileUpload/jquery.fileupload-ui.js
...ort/wwwroot/lib/jQuery.FileUpload/jquery.fileupload-ui.js
+4
-4
No files found.
PharmaStoreReport/Controllers/HomeController.cs
View file @
ac2fe36d
...
...
@@ -506,7 +506,7 @@ namespace PharmaStoreReport.Controllers
///System.IO.Directory.Delete(filepath);
System
.
IO
.
DirectoryInfo
di
=
new
System
.
IO
.
DirectoryInfo
(
filepath
);
di
.
Delete
(
true
);
return
Json
(
new
{
status
=
true
,
message
=
"Report
removed s
uccessfully."
});
return
Json
(
new
{
status
=
true
,
message
=
"Report
Deleted S
uccessfully."
});
}
catch
(
Exception
ex
)
{
...
...
This diff is collapsed.
Click to expand it.
PharmaStoreReport/Views/Home/Index.cshtml
View file @
ac2fe36d
...
...
@@ -14,7 +14,7 @@
<section
class=
"sms_report_dashboard"
>
<aside
class=
"left_side"
>
<div
class=
"brand_logo"
>
<img
src=
"
images/ams
.png"
class=
"img-fluid"
alt=
"AM Solutions "
>
<img
src=
"
~/images/Ams_1
.png"
class=
"img-fluid"
alt=
"AM Solutions "
>
</div>
<div
class=
"sms_report"
>
<h1>
SMS Reports
</h1>
...
...
@@ -91,7 +91,7 @@
<div
class=
"form-group mb-lg-0 row"
>
<label
class=
"form-label col-md-3"
>
Year:
</label>
<div
class=
"col-md-9"
>
<select
id=
"ddlYears"
class=
"form-control
year-drop
"
>
<select
id=
"ddlYears"
class=
"form-control"
>
@foreach (var item in Model.Years)
{
<option
value=
"@item.Value"
>
@item.Text
</option>
...
...
@@ -104,7 +104,7 @@
<div
class=
"form-group mb-lg-0 row"
>
<label
class=
"form-label col-md-3"
>
Month:
</label>
<div
class=
"col-md-9"
>
<select
id=
"ddlMonths"
name=
"ddlMonths"
class=
"form-control
months-drop
"
>
<select
id=
"ddlMonths"
name=
"ddlMonths"
class=
"form-control"
>
@foreach (var item in Model.Months)
{
if (Model.CurrentMonth == item.Value)
...
...
@@ -159,7 +159,7 @@
</button>
<div
class=
"modal-body"
>
<h2>
Delete Report
</h2>
Are you sure you want to delete this report?
<p>
Are you sure you want to delete
<span
id=
"dateandmonth"
></span>
report?
</p>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
id=
"btnDeleteReport"
onclick=
"DeleteReport();"
class=
"btn btn-gray mr-2"
>
Confirm
</button>
...
...
This diff is collapsed.
Click to expand it.
PharmaStoreReport/wwwroot/images/Ams_1.png
0 → 100644
View file @
ac2fe36d
21.1 KB
This diff is collapsed.
Click to expand it.
PharmaStoreReport/wwwroot/js/validate-home.js
View file @
ac2fe36d
...
...
@@ -141,32 +141,32 @@ $(function () {
return
false
;
}
else
if
(
filesList
.
length
==
0
)
{
$
.
bootstrapGrowl
(
"
Please upload
ams_healthnotes,script_figures and storereportnumbersr
esults files.
"
,
{
type
:
'
danger
'
,
color
:
'
red
'
,
delay
:
18000
})
$
.
bootstrapGrowl
(
"
Please upload
AMS_HealthNotes,Script_Figures and StoreReportNumbersR
esults files.
"
,
{
type
:
'
danger
'
,
color
:
'
red
'
,
delay
:
18000
})
}
else
if
(
filesList
.
length
!=
3
)
{
ValidateFileNames
();
if
(
unmachedfiles
.
length
==
1
)
{
$
.
bootstrapGrowl
(
"
Please
select
"
+
unmachedfiles
[
0
]
+
"
file
"
,
{
type
:
'
danger
'
,
color
:
'
red
'
,
delay
:
18000
})
$
.
bootstrapGrowl
(
"
Please
upload
"
+
unmachedfiles
[
0
]
+
"
file
"
,
{
type
:
'
danger
'
,
color
:
'
red
'
,
delay
:
18000
})
}
else
if
(
unmachedfiles
.
length
==
2
)
{
$
.
bootstrapGrowl
(
"
Please
select
"
+
unmachedfiles
[
0
]
+
"
,
"
+
unmachedfiles
[
1
]
+
"
files
"
,
{
type
:
'
danger
'
,
color
:
'
red
'
,
delay
:
18000
})
$
.
bootstrapGrowl
(
"
Please
upload
"
+
unmachedfiles
[
0
]
+
"
,
"
+
unmachedfiles
[
1
]
+
"
files
"
,
{
type
:
'
danger
'
,
color
:
'
red
'
,
delay
:
18000
})
}
else
if
(
unmachedfiles
.
length
==
3
)
{
$
.
bootstrapGrowl
(
"
Please upload
ams_healthnotes,script_figures and storereportnumbersr
esults files
"
,
{
type
:
'
danger
'
,
color
:
'
red
'
,
delay
:
18000
})
$
.
bootstrapGrowl
(
"
Please upload
AMS_HealthNotes,Script_Figures and StoreReportNumbersR
esults files
"
,
{
type
:
'
danger
'
,
color
:
'
red
'
,
delay
:
18000
})
}
}
else
{
ValidateFileNames
();
if
(
unmachedfiles
.
length
==
1
)
{
$
.
bootstrapGrowl
(
"
Please
select
"
+
unmachedfiles
[
0
]
+
"
file
"
,
{
type
:
'
danger
'
,
color
:
'
red
'
,
delay
:
18000
});
$
.
bootstrapGrowl
(
"
Please
upload
"
+
unmachedfiles
[
0
]
+
"
file
"
,
{
type
:
'
danger
'
,
color
:
'
red
'
,
delay
:
18000
});
}
else
if
(
unmachedfiles
.
length
==
2
)
{
$
.
bootstrapGrowl
(
"
Please
select
"
+
unmachedfiles
[
0
]
+
"
,
"
+
unmachedfiles
[
1
]
+
"
files
"
,
{
type
:
'
danger
'
,
color
:
'
red
'
,
delay
:
18000
});
$
.
bootstrapGrowl
(
"
Please
upload
"
+
unmachedfiles
[
0
]
+
"
,
"
+
unmachedfiles
[
1
]
+
"
files
"
,
{
type
:
'
danger
'
,
color
:
'
red
'
,
delay
:
18000
});
}
else
if
(
unmachedfiles
.
length
==
3
)
{
$
.
bootstrapGrowl
(
"
Please upload
ams_healthnotes,script_figures and storereportnumbersr
esults files
"
,
{
type
:
'
danger
'
,
color
:
'
red
'
,
delay
:
18000
});
$
.
bootstrapGrowl
(
"
Please upload
AMS_HealthNotes,Script_Figures and StoreReportNumbersR
esults files
"
,
{
type
:
'
danger
'
,
color
:
'
red
'
,
delay
:
18000
});
}
else
{
ajaxLoading
();
...
...
@@ -259,10 +259,12 @@ function ajaxLoading() {
<param name="Month"></param>
<returns></returns> */
function
ConfirmDeleteReport
()
{
$
(
"
.close
"
).
trigger
(
"
click
"
);
let
year
=
$
(
'
#ddlYears option:selected
'
).
val
();
let
month
=
$
(
'
#ddlMonths option:selected
'
).
val
();
if
(
year
==
0
)
{
$
.
bootstrapGrowl
(
"
Please select year.
"
,
{
type
:
'
danger
'
,
color
:
'
red
'
,
delay
:
18000
});
return
false
;
}
if
(
month
==
0
)
{
$
.
bootstrapGrowl
(
"
Please select month.
"
,
{
type
:
'
danger
'
,
color
:
'
red
'
,
delay
:
18000
});
return
false
;
}
$
(
'
#dateandmonth
'
).
text
(
year
+
"
"
+
$
(
'
#ddlMonths option:selected
'
).
text
());
$
(
"
#DeleteReport
"
).
modal
(
'
show
'
);
}
/* <summary>
...
...
@@ -272,12 +274,14 @@ function ConfirmDeleteReport() {
<param name="Month"></param>
<returns></returns> */
function
DeleteReport
()
{
$
(
"
.close
"
).
trigger
(
"
click
"
);
ajaxLoading
();
let
year
=
$
(
'
#ddlYears option:selected
'
).
val
();
let
month
=
$
(
'
#ddlMonths option:selected
'
).
text
();
$
.
get
(
"
Home/DeleteReport?Year=
"
+
year
+
"
&Month=
"
+
month
,
function
(
data
)
{
let
type
=
'
danger
'
;
if
(
data
.
status
==
"
True
"
)
{
type
=
"
success
"
;
}
let
color
=
'
red
'
;
if
(
data
.
status
)
{
type
=
"
success
"
;
color
=
"
blue
"
}
$
.
bootstrapGrowl
(
data
.
message
,
{
type
:
type
,
color
:
'
red
'
,
delay
:
18000
});
$
(
"
#DeleteReport
"
).
modal
(
'
hide
'
);
});
...
...
This diff is collapsed.
Click to expand it.
PharmaStoreReport/wwwroot/lib/jQuery.FileUpload/jquery.fileupload-ui.js
View file @
ac2fe36d
...
...
@@ -525,10 +525,10 @@
_cancelHandler
:
function
(
e
)
{
e
.
preventDefault
();
if
(
confirm
(
"
Are you sure you want to delete this file?
"
))
{
var
template
=
$
(
e
.
currentTarget
)
.
closest
(
'
.template-upload,.template-download
'
),
data
=
template
.
data
(
'
data
'
)
||
{};
var
template
=
$
(
e
.
currentTarget
)
.
closest
(
'
.template-upload,.template-download
'
),
data
=
template
.
data
(
'
data
'
)
||
{};
if
(
confirm
(
"
Are you sure you want to delete
"
+
data
.
files
[
0
].
name
+
"
file?
"
))
{
data
.
context
=
data
.
context
||
template
;
if
(
data
.
abort
)
{
data
.
abort
();
...
...
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