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

Ksmart UI citizen #34

Closed
wants to merge 106 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
d81efad
Initial file management version
priyamalu Aug 29, 2022
1b8c6d7
File management service folder structure
priyamalu Aug 30, 2022
11f110f
filemngmntchkstyleadded
priyamalu Aug 30, 2022
deeb9f7
'filemngmnttestng'
priyamalu Sep 3, 2022
9d3ff44
Added file management for Build
Sep 6, 2022
d7209af
adjusting pom file for Java version
Sep 6, 2022
1360934
adding SMS config
Sep 6, 2022
84f5078
resolving build issues
priyamalu Sep 6, 2022
8735f3e
Merge branch 'master' of https://github.com/ikmupyog/KSMART
priyamalu Sep 6, 2022
f2c3141
email config
Sep 6, 2022
f75c448
Merge branch 'master' of https://github.com/ikmupyog/KSMART
Sep 6, 2022
885fec6
added cert
Sep 9, 2022
e5197a8
adding cer for SMS
Sep 10, 2022
6f73610
changing to Mar22
Sep 12, 2022
7326fe4
filemgmnt initial template
priyamalu Sep 15, 2022
6cd2cfc
Merge branch 'master' of https://github.com/ikmupyog/KSMART
priyamalu Sep 15, 2022
a2deeb8
fixing hardcoded value for SMS
Sep 16, 2022
e2ab4f6
Merge branch 'master' of https://github.com/ikmupyog/KSMART
Sep 16, 2022
b2e2158
adjusted the certificate
Sep 16, 2022
59a4d1c
resource import
Sep 16, 2022
31f702c
classpath resource
Sep 16, 2022
d819468
Update map.js
MayaDevops Sep 17, 2022
d795f9f
Update map.js
MayaDevops Sep 17, 2022
35bee17
Update map.js
MayaDevops Sep 17, 2022
7d60597
Update index.html
MayaDevops Sep 17, 2022
6fe4058
Update application.properties
MayaDevops Sep 17, 2022
a10b714
adding certificate verify true
Sep 18, 2022
e311c84
Merge branch 'master' of https://github.com/ikmupyog/KSMART
Sep 18, 2022
5e7b847
Create .env
MayaDevops Sep 19, 2022
89f3da7
applicantpersonalcreateupdate
priyamalu Sep 19, 2022
cfa233d
resolving merge conflict
priyamalu Sep 19, 2022
8a277b2
Merge branch 'master' of https://github.com/ikmupyog/KSMART
priyamalu Sep 19, 2022
bb37c0c
refactoring names
priyamalu Sep 19, 2022
4ad2140
fm renaming interfaces
priyamalu Sep 19, 2022
ebd5291
calculationbystate
rajeshraghav Sep 20, 2022
0ef7ef4
Merge branch 'master' of https://github.com/ikmupyog/KSMART
rajeshraghav Sep 20, 2022
082b8d6
comitting the SMS cert change
Sep 23, 2022
7926a5f
Update index.js
MayaDevops Sep 26, 2022
13b5e17
filemngmntupdates
priyamalu Sep 27, 2022
b6035eb
Merge branch 'master' of https://github.com/ikmupyog/KSMART
priyamalu Sep 27, 2022
4bfbe85
---location&tlunits
Sep 27, 2022
6f9eefc
new modification for filemanagement service
priyamalu Sep 27, 2022
5eb5509
Merge pull request #2 from ikmupyog/filemanagement
vbvarsha Sep 27, 2022
dd3a43f
Create .env
MayaDevops Sep 27, 2022
bc94719
Merge pull request #1 from ikmupyog/MayaDevops-patch-1
MayaDevops Sep 27, 2022
4cb3ed3
adding SMS default template ID
Sep 28, 2022
51fde61
SMS debug
Sep 28, 2022
ea7ef96
sms fix for password
Sep 28, 2022
989ce29
password fix
Sep 28, 2022
9fc62b0
adding w/o ssl
Sep 28, 2022
7977dd0
add
Sep 28, 2022
e4e7e11
adding back change
Sep 29, 2022
b97e876
adding cert log
Sep 29, 2022
dd8036f
ssl context
Sep 29, 2022
b64c1d2
adding sslcontext log
Sep 29, 2022
8680716
added
Sep 29, 2022
706f37c
adding print for default keystore
Sep 29, 2022
1d7c8bc
pkcs12
Sep 29, 2022
98f4902
making exactly like UPYOG
Oct 1, 2022
dd20917
---LOCATION
Oct 1, 2022
c8d963d
---changes
Oct 1, 2022
828b55a
sms issues
Oct 1, 2022
7a49840
Merge branch 'ksmart-ui-citizen' of https://github.com/ikmupyog/KSMAR…
Oct 1, 2022
e653b70
---changes
Oct 1, 2022
6a281a2
----
Oct 1, 2022
41009ba
adding cer in new way
Oct 1, 2022
6553375
adding pkcs12
Oct 1, 2022
2c3a286
pkcs11
Oct 1, 2022
c4bac29
adding changes for cert issue
Oct 2, 2022
ea6e618
fixing compilation error
Oct 2, 2022
d9be099
fixing slContext issue
Oct 2, 2022
cda3e49
adding email configuration
Oct 2, 2022
a273d04
District Combo filling
MayaDevops Oct 3, 2022
0bb42ee
Merge pull request #4 from upyog/master
ikmkerala Oct 4, 2022
cee41c8
---commit
Oct 6, 2022
a2fd9ed
Merge branch 'ksmart-ui-citizen' of https://github.com/ikmupyog/KSMAR…
Oct 6, 2022
825f4b1
--card-style
Oct 6, 2022
edbe3eb
employee_dashboard
Oct 6, 2022
8c9a783
----changes
Oct 7, 2022
854f9c8
---dashbord
Oct 11, 2022
40e1384
add fix for #issue in SMS
Oct 13, 2022
a01b4f4
Merge branch 'master' of https://github.com/ikmupyog/KSMART
Oct 13, 2022
1c356a7
---
Oct 14, 2022
58cdf98
--commit
Oct 14, 2022
0e6ad9a
---changes2
Oct 14, 2022
509be4d
---newapplicsation
Oct 14, 2022
6baf520
fixing the issue for SMS
Oct 14, 2022
0bc7b76
---error cleared
Oct 15, 2022
cc3c6ce
adding SMS fix
Oct 15, 2022
1d229de
fixing UI issue
Oct 15, 2022
a121595
'Tradelicense'
MayaDevops Oct 18, 2022
68270ff
'tradelicenchanges'
MayaDevops Oct 19, 2022
4fa02c2
'Tradelicense'
MayaDevops Oct 19, 2022
b29650d
ui updates
Oct 20, 2022
fa132be
---updates
Oct 20, 2022
b35be04
ui updates
Oct 20, 2022
a99308c
ui updates
Oct 21, 2022
9895634
'TL'
MayaDevops Oct 26, 2022
c619182
Merge branch 'tradelicense-ui' of https://github.com/ikmupyog/KSMART …
Oct 26, 2022
49be8ae
ui-updates
Oct 29, 2022
dc3179b
side_navbar
Nov 4, 2022
2df2445
-conflict
Nov 8, 2022
078d95a
css-changes
Nov 8, 2022
82e32cc
cracked-cleared
Nov 8, 2022
84f2c3c
updates
Nov 9, 2022
c331f6b
updates2
Nov 9, 2022
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
frontend/micro-ui-internals/node_modules/*
.idea
index.lock
/.metadata/
/.sonarlint
.checkstyle
.pmd
14 changes: 14 additions & 0 deletions Migration/ApplicantAddress.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
CREATE TABLE IF NOT EXISTS eg_fm_applicantaddress
(
id character varying(64) PRIMARY KEY,
tenantid character varying(64),
houseno character varying(64),
housename character varying(64),
street character varying(64),
pincode character varying(64),
postofficename character varying(64),
createdby character varying(64),
createdat bigint,
lastmodifiedby character varying(64),
lastmodifiedat bigint
)
17 changes: 17 additions & 0 deletions Migration/ApplicantDet.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
CREATE TABLE IF NOT EXISTS eg_fm_applicantpersonal
(
id character varying(64) PRIMARY KEY,
aadhaarno character varying(64),
email character varying(64),
firstname character varying(64),
lastname character varying(64),
title character varying(64),
mobileno character varying(64),
tenantid character varying(64),
createdby character varying(64),
createdat bigint,
lastmodifiedby character varying(64),
lastmodifiedat bigint,
applicantaddressid character varying(64)

)
15 changes: 15 additions & 0 deletions Migration/ApplicantServiceDet.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
CREATE TABLE IF NOT EXISTS eg_fm_applicantdetails
(
id character varying(64) PRIMARY KEY,
tenantid character varying(64),
servicedetailsid character varying(64),
applicantpersonalid character varying(64),
fatherfirstname character varying(64),
fatherlastname character varying(64),
motherfirstname character varying(64),
motherlastname character varying(64),
createdby character varying(64),
createdat bigint,
lastmodifiedby character varying(64),
lastmodifiedat bigint
)
14 changes: 14 additions & 0 deletions Migration/ServiceMaster.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
CREATE TABLE IF NOT EXISTS eg_fm_servicedetails
(
id character varying(64) PRIMARY KEY,
tenantid character varying(64),
servicecode character varying(64),
servicename character varying(64),
servicedescription character varying(64),
businessservice character varying(64),
workflowcode character varying(64),
createdby character varying(64),
createdat bigint,
lastmodifiedby character varying(64),
lastmodifiedat bigint
)
5 changes: 5 additions & 0 deletions build/build-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,11 @@ config:
image-name: "xstate-webchat-db"

#Municipal Services
- name: "builds/upyog/municipal-services/egov-filemgmnt"
build:
- work-dir: "municipal-services/egov-filemgmnt"
image-name: "egov-filemgmnt"
dockerfile: "build/maven/Dockerfile"

- name: "builds/upyog/municipal-services/egov-user-event"
build:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ spring.kafka.consumer.properties.spring.json.use.type.headers=false

#Email Configuration
mail.enabled=true
mail.sender.username=test
mail.sender.password=test
mail.sender.username=info-ksmart.ikm@kerala.gov.in
mail.sender.password=X7&vD5$fP3
mail.smtps.auth=true
mail.smtps.starttls.enable=true
mail.smtps.debug=false
mail.port=465
mail.host=smtp.gmail.com
mail.host=smtp.mail.gov.in
mail.protocol=smtps

#Localization config
Expand All @@ -35,7 +35,7 @@ egov.localization.default.locale=
egov.user.host=https://dev.digit.org
egov.user.context.path=/user
egov.user.search.endpoint=/_search
egov.user.state.tenant.id=pb
egov.user.state.tenant.id=kl

email.subject=UPYOG Notification
email.subject=KSMART Notification

Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,10 @@ public MultiValueMap<String, String> getSmsRequestBody(Sms sms) {
if (value.startsWith("$")) {
switch (value) {
case "$username":
map.add(key, /*smsProperties.getUsername()*/"pbdwss.sms");
map.add(key, smsProperties.getUsername());
break;
case "$password":
map.add(key, /*smsProperties.getPassword()*/"Nkyf%403254");
map.add(key, smsProperties.getPassword());
break;
case "$senderid":
map.add(key, smsProperties.getSenderid());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,13 @@
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import org.springframework.core.io.Resource;
import org.springframework.core.io.ClassPathResource;

import lombok.extern.slf4j.Slf4j;

import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;

@Service
@Slf4j
Expand All @@ -47,20 +51,53 @@ private void postConstruct() {
log.info("postConstruct() start");
try
{
//sslContext = SSLContext.getInstance("TLSv1.2");
sslContext = SSLContext.getInstance("TLSv1.2");
if(smsProperties.isVerifyCertificate()) {
log.info("checking certificate");
KeyStore trustStore = KeyStore.getInstance(KeyStore.getDefaultType());
//KeyStore trustStore = KeyStore.getInstance("pkcs11");
//System.out.println(KeyStore.getDefaultType());
//File file = new File(System.getenv("JAVA_HOME")+"/lib/security/cacerts");
File file = new File(getClass().getClassLoader().getResource("smsgwsmsgovin-Mar22.cer").getFile());
InputStream is = new FileInputStream(file);
trustStore.load(is, "changeit".toCharArray());
TrustManagerFactory trustFactory = TrustManagerFactory
.getInstance(TrustManagerFactory.getDefaultAlgorithm());
trustFactory.init(trustStore);

TrustManager[] trustManagers = trustFactory.getTrustManagers();
sslContext.init(null, trustManagers, null);
//File file = new File(Thread.currentThread().getContextClassLoader().getResource("smsgwsmsgovin-sep22.cer").getFile());
//InputStream is = new FileInputStream(file);
//Resource resource = (Resource) new ClassPathResource("smsgwsmsgovin-sep22.cer");
//InputStream is = resource.getInputStream();
//InputStream is = getClass().getClassLoader().getResourceAsStream("smsgwsmsgovin-sep22.cer");
//trustStore.load(is, "changeit".toCharArray());


try (InputStream is = getClass().getClassLoader()
.getResourceAsStream("smsgwsmsgovin-sep22.cer")) {

//KeyStore trustStore = KeyStore.getInstance("pkcs12");
//trustStore.load(is, "changeit".toCharArray());

CertificateFactory certFactory = CertificateFactory.getInstance("X.509");
X509Certificate caCert = (X509Certificate) certFactory.generateCertificate(is);

KeyStore trustStore = KeyStore.getInstance(KeyStore.getDefaultType());
trustStore.load(null);
trustStore.setCertificateEntry("caCert", caCert);

TrustManagerFactory trustFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
trustFactory.init(trustStore);

TrustManager[] trustManagers = trustFactory.getTrustManagers();
sslContext.init(null, trustManagers, null);
}
catch(Exception e) {
e.printStackTrace();
log.error("Not able to load SMS certificate from the specified path");
}


//TrustManagerFactory trustFactory = TrustManagerFactory
// .getInstance(TrustManagerFactory.getDefaultAlgorithm());
//trustFactory.init(trustStore);

//TrustManager[] trustManagers = trustFactory.getTrustManagers();
//sslContext.init(null, trustManagers, null);
//System.out.println(sslContext.getSocketFactory());
}
else {
log.info("not checking certificate");
Expand Down Expand Up @@ -95,19 +132,20 @@ protected void submitToExternalSmsService(Sms sms) {

String final_data="";
final_data+="username="+ smsProperties.getUsername();
final_data+="&pin="+ smsProperties.getPassword();

//final_data+="&pin="+ smsProperties.getPassword();
final_data+="&pin="+ "GHt%40%23321ter";
String smsBody = sms.getMessage();

if(smsBody.split("#").length > 1) {
String templateId = smsBody.split("#")[1];

//String templateId = smsBody.split("#")[1];
String templateId=smsBody.substring(smsBody.lastIndexOf("#")+1, smsBody.length());
sms.setTemplateId(templateId);
smsBody = smsBody.split("#")[0];
//smsBody = smsBody.split("#")[0];
smsBody=smsBody.substring(0,smsBody.lastIndexOf("#")-1);

}else if(StringUtils.isEmpty(sms.getTemplateId())){
log.info("No template Id, Message Not sent"+smsBody);
return;
//return;
}

String message= "" + smsBody ;
Expand All @@ -125,11 +163,16 @@ protected void submitToExternalSmsService(Sms sms) {
else
final_data+="&dlt_template_id="+sms.getTemplateId();

log.info("URL which is sending+"+final_data);
if(smsProperties.isSmsEnabled()) {
HttpsURLConnection conn = (HttpsURLConnection) new URL(smsProperties.getUrl()+"?"+final_data).openConnection();
conn.setSSLSocketFactory(sslContext.getSocketFactory());
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setRequestMethod("GET");
conn.setRequestMethod("POST");
conn.setRequestProperty("Content-Type", "application/json");
conn.connect();

final BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
final StringBuffer stringBuffer = new StringBuffer();
String line;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ sms.provider.class=NIC
sms.provider.requestType=POST
sms.provider.url=https://smsgw.sms.gov.in/failsafe/MLink
sms.provider.contentType=application/json
sms.provider.username=iupyo.sms
sms.provider.password=C6%rE4#jM3
sms.provider.username=ikmlsg.sms
sms.provider.password=GHt%40%23321ter
sms.verify.response = true
sms.print.response = true
sms.verify.responseContains="success":true
sms.verify.ssl = true
sms.senderid=UPYOG
sms.senderid=IKMLSG
sms.mobile.prefix=
sms.sender.secure.key=value
sms.blacklist.numbers=9999X,5*
sms.whitelist.numbers=
sms.success.codes=200,201,202
sms.error.codes=
sms.verify.certificate=false
sms.verify.certificate=true
sms.msg.append=""
sms.provider.entityid=1001842650153206278
sms.default.tmplid=1
sms.provider.entityid=1701159193290176741
sms.default.tmplid=1707165950461405440
sms.debug.msggateway=true
sms.enabled=true
#msdg
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
egov.persist.yml.repo.path=classpath:egov-pg-service-persister.yml
2 changes: 2 additions & 0 deletions frontend/micro-ui/web/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
REACT_APP_STATE_LEVEL_TENANT_ID=kl
REACT_APP_PROXY_URL=https://ksmart-dev.lsgkerala.gov.in/
14 changes: 14 additions & 0 deletions frontend/micro-ui/web/micro-ui-internals/example/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
SKIP_PREFLIGHT_CHECK=true
REACT_APP_USER_TYPE=EMPLOYEE
REACT_APP_EMPLOYEE_TOKEN=c835932f-2ad4-4d05-83d6-49e0b8c59f8as
REACT_APP_CITIZEN_TOKEN=7cd58aae-30b3-41ed-a1b3-3417107a993c
REACT_APP_PROXY_API=https://ksmart-qa.lsgkerala.gov.in/
REACT_APP_PROXY_ASSETS=https://ksmart-qa.lsgkerala.gov.in/
REACT_APP_GLOBAL=https://ikm-dev-ui.s3.ap-south-1.amazonaws.com/globalConfigs.js
REACT_APP_CENTRAL_GLOBAL=https://ikm-dev-ui.s3.ap-south-1.amazonaws.com/globalConfigs.js
REACT_APP_QA_GLOBAL=https://ikm-dev-ui.s3.ap-south-1.amazonaws.com/globalConfigs.js
REACT_APP_UAT_GLOBAL=https://ikm-dev-ui.s3.ap-south-1.amazonaws.com/globalConfigs.js
REACT_APP_STATEB_GLOBAL=https://egov-central-instance-assets.s3.ap-south-1.amazonaws.com/statebglobalConfigs.js
staging=https://staging.digit.org
REACT_APP_STATE_LEVEL_TENANT_ID=kl
REACT_APP_PROXY_URL=https://ksmart-qa.lsgkerala.gov.in/
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<meta name="theme-color" content="#00bcd1"/>
<title>mSeva</title>
<!-- <link rel="stylesheet" href="https://unpkg.com/@egovernments/digit-ui-css/dist/index.css"/> -->
<script src="https://s3.ap-south-1.amazonaws.com/egov-dev-assets/globalConfigs.js"></script>
<script src="https://ikm-dev-ui.s3.ap-south-1.amazonaws.com/globalConfigs.js"></script>
<script src="%REACT_APP_GLOBAL%"></script>

</head>
Expand Down
4 changes: 2 additions & 2 deletions frontend/micro-ui/web/micro-ui-internals/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"node": ">=10"
},
"scripts": {
"start": "SKIP_PREFLIGHT_CHECK=true run-s build start:dev",
"sprint": "SKIP_PREFLIGHT_CHECK=true run-s start:script",
"start": "run-s build start:dev",
"sprint": "run-s start:script",
"start:dev": "run-p dev:**",
"start:script": "./scripts/create.sh",
"dev:css": "cd packages/css && yarn start",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ <h2>There is a problem</h2>

<!-- map -->
<div class="card">
<header class="card-header">Pin Complaint Location</header>
<header class="card-header">Pin Test Complaint Location</header>
<p class="card-text">
Click and hold to drop the pin to complaint location. If you are not able to pin the location you can skip the continue for next step.
</p>
Expand All @@ -360,6 +360,7 @@ <h2>There is a problem</h2>
<!-- <img src="./svg/searchicon.svg" class="map-search-bar-icon" alt=""> -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#505A5F" width="48px" height="48px" class="map-search-bar-icon">
<path d="M0 0h24v24H0z" fill="none" />
<script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAQOd09-vjmk1sXFb_ZQYDz2nlfhXq7Wf8&callback=initMap"></script>
<path
d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"
/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use strict";
let map;
var script = document.createElement("script");
const key = globalConfigs?.getConfig("GMAPS_API_KEY");
const key = globalConfigs?.getConfig("gmaps_api_key");
script.src = `https://maps.googleapis.com/maps/api/js?key=${key}&callback=initAutocomplete&libraries=places`;
script.defer = true;
window.initAutocomplete = function () {
Expand Down
Loading