commit 3c25ee462206f71c9c87899999e29c649ad3e492 Author: risadmin_prod Date: Mon Sep 16 04:24:40 2024 +0000 base_project diff --git a/prod116rb-back-b/authsec_springboot/.gitignore b/prod116rb-back-b/authsec_springboot/.gitignore new file mode 100644 index 0000000..ddfde45 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/.gitignore @@ -0,0 +1,3 @@ + +.DS_Store +backend/src/.DS_Store diff --git a/prod116rb-back-b/authsec_springboot/backend/.classpath b/prod116rb-back-b/authsec_springboot/backend/.classpath new file mode 100644 index 0000000..39abf1c --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/.classpath @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/prod116rb-back-b/authsec_springboot/backend/.factorypath b/prod116rb-back-b/authsec_springboot/backend/.factorypath new file mode 100644 index 0000000..fb0cfbd --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/.factorypath @@ -0,0 +1,314 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/prod116rb-back-b/authsec_springboot/backend/.project b/prod116rb-back-b/authsec_springboot/backend/.project new file mode 100644 index 0000000..b02cd1e --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/.project @@ -0,0 +1,28 @@ + + + app + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.springframework.ide.eclipse.boot.validation.springbootbuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/prod116rb-back-b/authsec_springboot/backend/.settings/org.eclipse.core.resources.prefs b/prod116rb-back-b/authsec_springboot/backend/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..abdea9a --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,4 @@ +eclipse.preferences.version=1 +encoding//src/main/java=UTF-8 +encoding//src/main/resources=UTF-8 +encoding/=UTF-8 diff --git a/prod116rb-back-b/authsec_springboot/backend/.settings/org.eclipse.jdt.apt.core.prefs b/prod116rb-back-b/authsec_springboot/backend/.settings/org.eclipse.jdt.apt.core.prefs new file mode 100644 index 0000000..dfa4f3a --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/.settings/org.eclipse.jdt.apt.core.prefs @@ -0,0 +1,4 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.apt.aptEnabled=true +org.eclipse.jdt.apt.genSrcDir=target/generated-sources/annotations +org.eclipse.jdt.apt.genTestSrcDir=target/generated-test-sources/test-annotations diff --git a/prod116rb-back-b/authsec_springboot/backend/.settings/org.eclipse.jdt.core.prefs b/prod116rb-back-b/authsec_springboot/backend/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..90b69d4 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,10 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.methodParameters=generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore +org.eclipse.jdt.core.compiler.processAnnotations=enabled +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/prod116rb-back-b/authsec_springboot/backend/.settings/org.eclipse.m2e.core.prefs b/prod116rb-back-b/authsec_springboot/backend/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..b59238f --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles=builder +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/prod116rb-back-b/authsec_springboot/backend/.settings/org.springframework.ide.eclipse.prefs b/prod116rb-back-b/authsec_springboot/backend/.settings/org.springframework.ide.eclipse.prefs new file mode 100644 index 0000000..a12794d --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/.settings/org.springframework.ide.eclipse.prefs @@ -0,0 +1,2 @@ +boot.validation.initialized=true +eclipse.preferences.version=1 diff --git a/prod116rb-back-b/authsec_springboot/backend/.swagger-codegen-ignore b/prod116rb-back-b/authsec_springboot/backend/.swagger-codegen-ignore new file mode 100644 index 0000000..19d3377 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/.swagger-codegen-ignore @@ -0,0 +1,23 @@ +# Swagger Codegen Ignore +# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# Thsi matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/aa/Connector/Controller/ConnectorController.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aa/Connector/Controller/ConnectorController.java new file mode 100644 index 0000000..9f04c2b --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aa/Connector/Controller/ConnectorController.java @@ -0,0 +1,79 @@ +package com.realnet.Connector.Controller; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.Connector.Entity.Connector; +import com.realnet.Connector.Repository.Connectorrepository; +import com.realnet.users.entity.Sys_Accounts; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; + +@RestController +@RequestMapping("/connector") +public class ConnectorController { + + @Autowired + private Connectorrepository connectorrepository; + @Autowired + private AppUserServiceImpl userService; + + + //ADD DATA + @PostMapping("/Connectorjson") + public ResponseEntity save(@RequestBody Connector connector) { + AppUser loggedInUser = userService.getLoggedInUser(); + Long account_id = loggedInUser.getAccount().getAccount_id(); + connector.setAccountId(account_id); + Connector save = connectorrepository.save(connector); + return new ResponseEntity<>(save, HttpStatus.OK); + + } + + //UPDATE BY ID + @PutMapping("/Connectorjson/{id}") + public ResponseEntity update(@PathVariable Long id, @RequestBody Connector connector) { + Connector con = connectorrepository.findById(id).orElseThrow(null); + con.setName(connector.getName()); + con.setConnector_json(connector.getConnector_json()); + + Connector save = connectorrepository.save(con); + return new ResponseEntity<>(save, HttpStatus.OK); + + } + + //GET ALL + @GetMapping("/Connectorjson") + public ResponseEntity getall() { + List save = connectorrepository.findAll(); + return new ResponseEntity<>(save, HttpStatus.OK); + + } + + //GET BY ID + @GetMapping("/Connectorjson/{id}") + public ResponseEntity getbyid(@PathVariable Long id) { + Connector con = connectorrepository.findById(id).orElseThrow(null); + return new ResponseEntity<>(con, HttpStatus.OK); + + } + + //DELETE BY ID + @DeleteMapping("/Connectorjson/{id}") + public void delete(@PathVariable Long id){ + Connector con = connectorrepository.findById(id).orElseThrow(null); + connectorrepository.delete(con); + + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/aa/Connector/Controller/MappingController.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aa/Connector/Controller/MappingController.java new file mode 100644 index 0000000..aec54be --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aa/Connector/Controller/MappingController.java @@ -0,0 +1,81 @@ +package com.realnet.Connector.Controller; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import com.realnet.Connector.Entity.Connector; +import com.realnet.Connector.Entity.Mapping; +import com.realnet.Connector.Repository.Connectorrepository; + +@RestController +@RequestMapping("/token/connector/mapping") +public class MappingController { + + @Autowired + private Connectorrepository connectorrepository; + + @PostMapping("/mapping") + public Object connector(@RequestBody Mapping mapping) { + List list = new ArrayList<>(); + +// Map param = new HashMap(); + String str =mapping.getMappingString(); + JsonParser parser = new JsonParser(); + JsonElement element = parser.parse(str); + JsonObject obj = element.getAsJsonObject(); + + //get key from get api + Set> entries = obj.entrySet(); + for (Map.Entry entry : entries) { + + String key = entry.getKey(); + String string = key.toString(); + list.add(string); + } + return list; + +} + @PostMapping("/mapping1") + public Object connector1(@RequestBody Mapping mapping) { + List list = new ArrayList<>(); + +// Map param = new HashMap(); + String str =mapping.getMappingString(); + JsonParser parser = new JsonParser(); + JsonElement element = parser.parse(str); + JsonObject obj = element.getAsJsonObject(); + + //get values from get api + Set> entries = obj.entrySet(); + for (Map.Entry entry : entries) { + + String string2 = entry.getValue().getAsString(); + list.add(string2); + } + return list; + +} + //get api for call connector by name for job(by gk) + @GetMapping("/connectorname/{name}") + public ResponseEntity getconnector(@PathVariable String name) { + Connector save = connectorrepository.findconnectorbyname(name); + return new ResponseEntity<>(save, HttpStatus.OK); + + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/aa/Connector/Entity/Connector.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aa/Connector/Entity/Connector.java new file mode 100644 index 0000000..8de5289 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aa/Connector/Entity/Connector.java @@ -0,0 +1,33 @@ +package com.realnet.Connector.Entity; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Lob; +import javax.persistence.Column; + +import com.realnet.Dashboard1.Entity.dashbord_Who_collumn; + +import lombok.Data; + +@Entity +@Data +public class Connector extends dashbord_Who_collumn { + + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String name; + @Column(length = 15000) + private String get_str; + @Lob + private String connector_json; + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/aa/Connector/Entity/Mapping.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aa/Connector/Entity/Mapping.java new file mode 100644 index 0000000..0e23d56 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aa/Connector/Entity/Mapping.java @@ -0,0 +1,9 @@ +package com.realnet.Connector.Entity; + +import lombok.Data; + +@Data +public class Mapping { + + private String mappingString; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/aa/Connector/Repository/Connectorrepository.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aa/Connector/Repository/Connectorrepository.java new file mode 100644 index 0000000..1d83c69 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aa/Connector/Repository/Connectorrepository.java @@ -0,0 +1,15 @@ +package com.realnet.Connector.Repository; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.stereotype.Repository; + +import com.realnet.Connector.Entity.Connector; +@Repository +public interface Connectorrepository extends JpaRepository{ + + + @Query(value = "select * from connector where name=?1", nativeQuery = true) + Connector findconnectorbyname(String name); + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/404.html b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/404.html new file mode 100644 index 0000000..14f0af7 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/404.html @@ -0,0 +1,61 @@ + + + + + + + Error || Final + + + + + + + + + + + + + +
+
+

404

+

page not found

+
+
+ + + + + diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/about.html b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/about.html new file mode 100644 index 0000000..2e5af22 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/about.html @@ -0,0 +1,115 @@ + + + + + + + About || Final + + + + + + + + + + + + + +
+
+
+

I'm baby coloring book poke taxidermy

+

+ Taxidermy forage glossier letterpress heirloom before they sold out + you probably haven't heard of them banh mi biodiesel chia. +

+

+ Taiyaki tumblr flexitarian jean shorts brunch, aesthetic salvia + retro. +

+ contact +
+ + Person Pouring Salt in Bowl +
+ +
+ + + + + diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/about.jpeg b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/about.jpeg new file mode 100644 index 0000000..6539080 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/about.jpeg differ diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/favicon.ico b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/favicon.ico new file mode 100644 index 0000000..b8fecd8 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/favicon.ico differ diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/logo.svg b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/logo.svg new file mode 100644 index 0000000..3daa6a4 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/logo.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/main.jpeg b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/main.jpeg new file mode 100644 index 0000000..4420530 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/main.jpeg differ diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/recipes/recipe-1.jpeg b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/recipes/recipe-1.jpeg new file mode 100644 index 0000000..85b4ab6 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/recipes/recipe-1.jpeg differ diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/recipes/recipe-2.jpeg b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/recipes/recipe-2.jpeg new file mode 100644 index 0000000..2a5109e Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/recipes/recipe-2.jpeg differ diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/recipes/recipe-3.jpeg b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/recipes/recipe-3.jpeg new file mode 100644 index 0000000..02f0bee Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/recipes/recipe-3.jpeg differ diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/recipes/recipe-4.jpeg b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/recipes/recipe-4.jpeg new file mode 100644 index 0000000..63c2bb7 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/recipes/recipe-4.jpeg differ diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/contact.html b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/contact.html new file mode 100644 index 0000000..b396f23 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/contact.html @@ -0,0 +1,129 @@ + + + + + + + Contact || Final + + + + + + + + + + + + + +
+
+
+

Want To Get In Touch?

+

+ Four dollar toast biodiesel plaid salvia actually pickled banjo + bespoke mlkshk intelligentsia edison bulb synth. +

+

Cardigan prism bicycle rights put a bird on it deep v.

+

+ Hashtag swag health goth air plant, raclette listicle fingerstache + cold-pressed fanny pack bicycle rights cardigan poke. +

+
+
+
+
+ + +
+
+ + +
+
+ + +
+ +
+
+
+ + +
+ + + + + diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/css/main.css b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/css/main.css new file mode 100644 index 0000000..e7f936c --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/css/main.css @@ -0,0 +1,746 @@ +*, +::after, +::before { + box-sizing: border-box; +} +/* fonts */ + +@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600&family=Montserrat&display=swap'); +html { + font-size: 100%; +} /*16px*/ + +:root { + /* colors */ + --primary-100: #e2e0ff; + --primary-200: #c1beff; + --primary-300: #a29dff; + --primary-400: #837dff; + --primary-500: #645cff; + --primary-600: #504acc; + --primary-700: #3c3799; + --primary-800: #282566; + --primary-900: #141233; + + /* grey */ + --grey-50: #f8fafc; + --grey-100: #f1f5f9; + --grey-200: #e2e8f0; + --grey-300: #cbd5e1; + --grey-400: #94a3b8; + --grey-500: #64748b; + --grey-600: #475569; + --grey-700: #334155; + --grey-800: #1e293b; + --grey-900: #0f172a; + /* rest of the colors */ + --black: #222; + --white: #fff; + --red-light: #f8d7da; + --red-dark: #842029; + --green-light: #d1e7dd; + --green-dark: #0f5132; + + /* fonts */ + --headingFont: 'Roboto', sans-serif; + --bodyFont: 'Nunito', sans-serif; + --smallText: 0.7em; + /* rest of the vars */ + --backgroundColor: var(--grey-50); + --textColor: var(--grey-900); + --borderRadius: 0.25rem; + --letterSpacing: 1px; + --transition: 0.3s ease-in-out all; + --max-width: 1120px; + --fixed-width: 600px; + + /* box shadow*/ + --shadow-1: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); + --shadow-2: 0 4px 6px -1px rgba(0, 0, 0, 0.1), + 0 2px 4px -1px rgba(0, 0, 0, 0.06); + --shadow-3: 0 10px 15px -3px rgba(0, 0, 0, 0.1), + 0 4px 6px -2px rgba(0, 0, 0, 0.05); + --shadow-4: 0 20px 25px -5px rgba(0, 0, 0, 0.1), + 0 10px 10px -5px rgba(0, 0, 0, 0.04); +} + +body { + background: var(--backgroundColor); + font-family: var(--bodyFont); + font-weight: 400; + line-height: 1.75; + color: var(--textColor); +} + +p { + margin-top: 0; + margin-bottom: 1.5rem; + max-width: 40em; +} + +h1, +h2, +h3, +h4, +h5 { + margin: 0; + margin-bottom: 1.38rem; + font-family: var(--headingFont); + font-weight: 400; + line-height: 1.3; + text-transform: capitalize; + letter-spacing: var(--letterSpacing); +} + +h1 { + margin-top: 0; + font-size: 3.052rem; +} + +h2 { + font-size: 2.441rem; +} + +h3 { + font-size: 1.953rem; +} + +h4 { + font-size: 1.563rem; +} + +h5 { + font-size: 1.25rem; +} + +small, +.text-small { + font-size: var(--smallText); +} + +a { + text-decoration: none; +} +ul { + list-style-type: none; + padding: 0; +} + +.img { + width: 100%; + display: block; + object-fit: cover; +} +/* buttons */ + +.btn { + cursor: pointer; + color: var(--white); + background: var(--primary-500); + border: transparent; + border-radius: var(--borderRadius); + letter-spacing: var(--letterSpacing); + padding: 0.375rem 0.75rem; + box-shadow: var(--shadow-1); + transition: var(--transtion); + text-transform: capitalize; + display: inline-block; +} +.btn:hover { + background: var(--primary-700); + box-shadow: var(--shadow-3); +} +.btn-hipster { + color: var(--primary-500); + background: var(--primary-200); +} +.btn-hipster:hover { + color: var(--primary-200); + background: var(--primary-700); +} +.btn-block { + width: 100%; +} + +/* alerts */ +.alert { + padding: 0.375rem 0.75rem; + margin-bottom: 1rem; + border-color: transparent; + border-radius: var(--borderRadius); +} + +.alert-danger { + color: var(--red-dark); + background: var(--red-light); +} +.alert-success { + color: var(--green-dark); + background: var(--green-light); +} +/* form */ + +.form { + width: 90vw; + max-width: var(--fixed-width); + background: var(--white); + border-radius: var(--borderRadius); + box-shadow: var(--shadow-2); + padding: 2rem 2.5rem; + margin: 3rem auto; +} +.form-label { + display: block; + font-size: var(--smallText); + margin-bottom: 0.5rem; + text-transform: capitalize; + letter-spacing: var(--letterSpacing); +} +.form-input, +.form-textarea { + width: 100%; + padding: 0.375rem 0.75rem; + border-radius: var(--borderRadius); + background: var(--backgroundColor); + border: 1px solid var(--grey-200); +} + +.form-row { + margin-bottom: 1rem; +} + +.form-textarea { + height: 7rem; +} +::placeholder { + font-family: inherit; + color: var(--grey-400); +} +.form-alert { + color: var(--red-dark); + letter-spacing: var(--letterSpacing); + text-transform: capitalize; +} +/* alert */ + +@keyframes spinner { + to { + transform: rotate(360deg); + } +} + +.loading { + width: 6rem; + height: 6rem; + border: 5px solid var(--grey-400); + border-radius: 50%; + border-top-color: var(--primary-500); + animation: spinner 0.6s linear infinite; +} +.loading { + margin: 0 auto; +} +/* title */ + +.title { + text-align: center; +} + +.title-underline { + background: var(--primary-500); + width: 7rem; + height: 0.25rem; + margin: 0 auto; + margin-top: -1rem; +} + +/* +=============== +Navbar +=============== +*/ + +.navbar { + display: flex; + align-items: center; + justify-content: center; +} +.nav-center { + width: 90vw; + max-width: var(--max-width); +} +.nav-header { + height: 6rem; + display: flex; + justify-content: space-between; + align-items: center; +} +.nav-header img { + width: 200px; +} +.nav-logo { + display: flex; + align-items: flex-end; +} + +.nav-btn { + padding: 0.15rem 0.75rem; +} +.nav-btn i { + font-size: 1.25rem; +} +.nav-links { + height: 0; + overflow: hidden; + display: flex; + flex-direction: column; + transition: var(--transition); +} +.show-links { + height: 23.9375rem; +} + +.nav-link { + display: block; + text-align: center; + font-size: 1.25rem; + text-transform: capitalize; + color: var(--grey-900); + letter-spacing: var(--letterSpacing); + padding: 1rem 0; + border-top: 1px solid var(--grey-500); + transition: var(--transition); +} +.nav-link:hover { + color: var(--primary-500); +} + +.contact-link a { + padding: 0.15rem 1rem; +} + +@media screen and (min-width: 992px) { + .navbar { + height: 6rem; + } + .nav-center { + display: flex; + align-items: center; + } + .nav-header { + padding: 0; + margin-right: 2rem; + height: auto; + } + + .nav-btn { + display: none; + } + .nav-links { + height: auto !important; + flex-direction: row; + align-items: center; + width: 100%; + } + .nav-link { + padding: 0; + border-top: none; + margin-right: 1rem; + font-size: 1rem; + } + .contact-link { + margin-right: 0; + margin-left: auto; + } +} +/* +=============== +Page +=============== +*/ + +.page { + width: 90vw; + max-width: var(--max-width); + margin: 0 auto; +} +.page { + padding-top: 2rem; + min-height: calc(100vh - (6rem + 4rem)); +} +/* +=============== +Footer +=============== +*/ + +.page-footer { + text-align: center; + height: 4rem; + display: flex; + align-items: center; + justify-content: center; + background: var(--black); + color: var(--white); +} +.page-footer h5 { + margin-top: 0; + margin-bottom: 0; +} +.page-footer p { + margin-bottom: 0; +} +.page-footer .footer-logo, +.page-footer a { + color: var(--primary-500); +} +/* +=============== +Hero +=============== +*/ + +.hero { + height: 40vh; + position: relative; + margin-bottom: 2rem; + background: url('../assets/main.jpeg') center/cover no-repeat; + border-radius: var(--borderRadius); +} +.hero-container { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + display: flex; + align-items: center; + justify-content: center; + background: rgba(0, 0, 0, 0.4); + border-radius: var(--borderRadius); +} +.hero-text { + color: var(--white); + text-align: center; +} + +@media only screen and (min-width: 768px) { + .hero-text h1 { + font-size: 4rem; + margin-bottom: 0; + } +} + +/* +=============== +Recipes +=============== +*/ + +.recipes-container { + display: grid; + gap: 2rem 1rem; +} + +.recipes-list { + display: grid; + gap: 2rem 1rem; + padding-bottom: 3rem; +} +.tags-container { + order: 1; + display: flex; + flex-direction: column; + padding-bottom: 3rem; + /* background: blue; */ +} +.tags-container h4 { + margin-bottom: 0.5rem; + font-weight: 500; +} +.tags-list { + display: grid; + grid-template-columns: 1fr 1fr 1fr; +} +.tags-list a { + text-transform: capitalize; + display: block; + color: var(--grey-500); + transition: var(--transition); +} +.tags-list a:hover { + color: var(--primary-500); +} +.recipe { + display: block; +} +.recipe-img { + height: 15rem; + border-radius: var(--borderRadius); + margin-bottom: 1rem; +} +.recipe h5 { + margin-bottom: 0; + margin-top: 0.25rem; + line-height: 1; + color: var(--grey-700); +} +.recipe p { + margin-bottom: 0; + line-height: 1; + color: var(--grey-500); + margin-top: 0.5rem; + letter-spacing: var(--letterSpacing); +} +@media screen and (min-width: 576px) { + .recipes-list { + grid-template-columns: 1fr 1fr; + } + .recipe-img { + height: 10rem; + } +} + +@media screen and (min-width: 992px) { + .recipes-container { + grid-template-columns: 200px 1fr; + gap: 1rem; + } + .recipes-list { + grid-template-columns: 1fr 1fr; + } + + .recipe p { + font-size: 0.85rem; + } + .tags-container { + order: 0; + /* background: blue; */ + } + .tags-list { + display: grid; + grid-template-columns: 1fr; + } +} + +@media screen and (min-width: 1200px) { + .recipe h5 { + font-size: 1.15rem; + } + .recipes-list { + grid-template-columns: 1fr 1fr 1fr; + } +} +/* +=============== +Error +=============== +*/ +.error-page { + text-align: center; + padding-top: 5rem; +} +.error-page h1 { + font-size: 9rem; +} +/* +=============== +About Page +=============== +*/ + +.about-page h2 { + text-transform: none; + font-weight: bold; +} +.about-page { + display: grid; + gap: 2rem 4rem; + padding-bottom: 3rem; +} +.about-img { + border-radius: var(--borderRadius); + height: 300px; +} + +@media screen and (min-width: 992px) { + .about-page { + grid-template-columns: 1fr 1fr; + grid-template-rows: 400px; + align-items: center; + } + .about-img { + height: 100%; + } +} + +.featured-title { + text-align: center; +} +/* +=============== +Contact Page +=============== +*/ +.contact-form { + width: 100%; + margin: 0; +} +.contact-container { + display: grid; + gap: 2rem 3rem; + padding-bottom: 3rem; +} +@media screen and (min-width: 992px) { + .contact-container { + grid-template-columns: 1fr 450px; + align-items: center; + } +} + +/* +=============== +Tags Page +=============== +*/ + +.tags-wrapper { + display: grid; + gap: 2rem; + padding-bottom: 3rem; +} +.tag { + background: var(--grey-500); + border-radius: var(--borderRadius); + text-align: center; + color: var(--white); + transition: var(--transition); + padding: 0.75rem 0; +} +.tag:hover { + background: var(--primary-500); +} +.tag h5, +.tag p { + margin-bottom: 0; +} +.tag h5 { + font-weight: 600; +} +@media screen and (min-width: 576px) { + .tags-wrapper { + grid-template-columns: 1fr 1fr; + } +} +@media screen and (min-width: 992px) { + .tags-wrapper { + grid-template-columns: 1fr 1fr 1fr; + } +} + +/* +=============== +Recipe Template +=============== +*/ + +.recipe-hero { + display: grid; + gap: 3rem; +} + +.recipe-hero-img { + height: 300px; + border-radius: var(--borderRadius); +} +.recipe-info p { + color: var(--grey-600); +} +.recipe-icons { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 1rem; + margin: 2rem 0; + text-align: center; +} +.recipe-icons i { + font-size: 1.5rem; + color: var(--primary-500); +} +.recipe-icons h5, +.recipe-icons p { + margin-bottom: 0; + font-size: 0.85em; +} + +.recipe-icons p { + color: var(--grey-600); +} +.recipe-tags { + display: flex; + align-items: center; + flex-wrap: wrap; + font-size: 0.7em; + font-weight: 600; +} +.recipe-tags a { + background: var(--primary-500); + border-radius: var(--borderRadius); + color: var(--white); + padding: 0.05rem 0.5rem; + margin: 0 0.25rem; + text-transform: capitalize; +} +@media screen and (min-width: 992px) { + .recipe-hero { + grid-template-columns: 4fr 5fr; + align-items: center; + } +} +.recipe-content { + padding: 3rem 0; + display: grid; + gap: 2rem 5rem; +} +@media screen and (min-width: 992px) { + .recipe-content { + grid-template-columns: 2fr 1fr; + } +} +.single-instruction header { + display: grid; + grid-template-columns: auto 1fr; + gap: 1.5rem; + align-items: center; +} +.single-instruction header p { + text-transform: uppercase; + font-weight: 600; + color: var(--primary-500); + margin-bottom: 0; +} +.single-instruction > p { + color: var(--grey-700); +} + +.single-instruction header div { + height: 2px; + background: var(--grey-300); +} + +.second-column { + display: grid; + row-gap: 2rem; +} + +.single-ingredient { + border-bottom: 2px solid var(--grey-300); + padding-bottom: 0.75rem; + color: var(--grey-700); +} +.single-tool { + border-bottom: 2px solid var(--grey-300); + padding-bottom: 0.75rem; + color: var(--primary-500); + text-transform: capitalize; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/css/normalize.css b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/css/normalize.css new file mode 100644 index 0000000..2768db4 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/css/normalize.css @@ -0,0 +1,351 @@ +/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ + +/* Document + ========================================================================== */ + +/** + * 1. Correct the line height in all browsers. + * 2. Prevent adjustments of font size after orientation changes in iOS. + */ + +html { + line-height: 1.15; /* 1 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/* Sections + ========================================================================== */ + +/** + * Remove the margin in all browsers. + */ + +body { + margin: 0; +} + +/** + * Render the `main` element consistently in IE. + */ + +main { + display: block; +} + +/** + * Correct the font size and margin on `h1` elements within `section` and + * `article` contexts in Chrome, Firefox, and Safari. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/* Grouping content + ========================================================================== */ + +/** + * 1. Add the correct box sizing in Firefox. + * 2. Show the overflow in Edge and IE. + */ + +hr { + box-sizing: content-box; /* 1 */ + height: 0; /* 1 */ + overflow: visible; /* 2 */ +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +pre { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/* Text-level semantics + ========================================================================== */ + +/** + * Remove the gray background on active links in IE 10. + */ + +a { + background-color: transparent; +} + +/** + * 1. Remove the bottom border in Chrome 57- + * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. + */ + +abbr[title] { + border-bottom: none; /* 1 */ + text-decoration: underline; /* 2 */ + text-decoration: underline dotted; /* 2 */ +} + +/** + * Add the correct font weight in Chrome, Edge, and Safari. + */ + +b, +strong { + font-weight: bolder; +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +code, +kbd, +samp { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/** + * Add the correct font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` elements from affecting the line height in + * all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +/* Embedded content + ========================================================================== */ + +/** + * Remove the border on images inside links in IE 10. + */ + +img { + border-style: none; +} + +/* Forms + ========================================================================== */ + +/** + * 1. Change the font styles in all browsers. + * 2. Remove the margin in Firefox and Safari. + */ + +button, +input, +optgroup, +select, +textarea { + font-family: inherit; /* 1 */ + font-size: 100%; /* 1 */ + line-height: 1.15; /* 1 */ + margin: 0; /* 2 */ +} + +/** + * Show the overflow in IE. + * 1. Show the overflow in Edge. + */ + +button, +input { + /* 1 */ + overflow: visible; +} + +/** + * Remove the inheritance of text transform in Edge, Firefox, and IE. + * 1. Remove the inheritance of text transform in Firefox. + */ + +button, +select { + /* 1 */ + text-transform: none; +} + +/** + * Correct the inability to style clickable types in iOS and Safari. + */ + +button, +[type='button'], +[type='reset'], +[type='submit'] { + -webkit-appearance: button; +} + +/** + * Remove the inner border and padding in Firefox. + */ + +button::-moz-focus-inner, +[type='button']::-moz-focus-inner, +[type='reset']::-moz-focus-inner, +[type='submit']::-moz-focus-inner { + border-style: none; + padding: 0; +} + +/** + * Restore the focus styles unset by the previous rule. + */ + +button:-moz-focusring, +[type='button']:-moz-focusring, +[type='reset']:-moz-focusring, +[type='submit']:-moz-focusring { + outline: 1px dotted ButtonText; +} + +/** + * Correct the padding in Firefox. + */ + +fieldset { + padding: 0.35em 0.75em 0.625em; +} + +/** + * 1. Correct the text wrapping in Edge and IE. + * 2. Correct the color inheritance from `fieldset` elements in IE. + * 3. Remove the padding so developers are not caught out when they zero out + * `fieldset` elements in all browsers. + */ + +legend { + box-sizing: border-box; /* 1 */ + color: inherit; /* 2 */ + display: table; /* 1 */ + max-width: 100%; /* 1 */ + padding: 0; /* 3 */ + white-space: normal; /* 1 */ +} + +/** + * Add the correct vertical alignment in Chrome, Firefox, and Opera. + */ + +progress { + vertical-align: baseline; +} + +/** + * Remove the default vertical scrollbar in IE 10+. + */ + +textarea { + overflow: auto; +} + +/** + * 1. Add the correct box sizing in IE 10. + * 2. Remove the padding in IE 10. + */ + +[type='checkbox'], +[type='radio'] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Correct the cursor style of increment and decrement buttons in Chrome. + */ + +[type='number']::-webkit-inner-spin-button, +[type='number']::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Correct the odd appearance in Chrome and Safari. + * 2. Correct the outline style in Safari. + */ + +[type='search'] { + -webkit-appearance: textfield; /* 1 */ + outline-offset: -2px; /* 2 */ +} + +/** + * Remove the inner padding in Chrome and Safari on macOS. + */ + +[type='search']::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * 1. Correct the inability to style clickable types in iOS and Safari. + * 2. Change font properties to `inherit` in Safari. + */ + +::-webkit-file-upload-button { + -webkit-appearance: button; /* 1 */ + font: inherit; /* 2 */ +} + +/* Interactive + ========================================================================== */ + +/* + * Add the correct display in Edge, IE 10+, and Firefox. + */ + +details { + display: block; +} + +/* + * Add the correct display in all browsers. + */ + +summary { + display: list-item; +} + +/* Misc + ========================================================================== */ + +/** + * Add the correct display in IE 10+. + */ + +template { + display: none; +} + +/** + * Add the correct display in IE 10. + */ + +[hidden] { + display: none; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/index.html b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/index.html new file mode 100644 index 0000000..1c90443 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/index.html @@ -0,0 +1,130 @@ + + + + + + + Simply Recipes || Final + + + + + + + + + + + + + + +
+ +
+
+
+

simply recipes

+

no fluff, just recipes

+
+
+
+ +
+ +
+

recipes

+ +
+ + + + +
+
+ + + + + + diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/js/app.js b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/js/app.js new file mode 100644 index 0000000..d20828d --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/js/app.js @@ -0,0 +1,19 @@ +const getElement = (selector) => { + const element = document.querySelector(selector) + + if (element) return element + throw Error( + `Please double check your class names, there is no ${selector} class` + ) +} + +const links = getElement('.nav-links') +const navBtnDOM = getElement('.nav-btn') + +navBtnDOM.addEventListener('click', () => { + links.classList.toggle('show-links') +}) + +const date = getElement('#date') +const currentYear = new Date().getFullYear() +date.textContent = currentYear diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/recipes.html b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/recipes.html new file mode 100644 index 0000000..2b6f379 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/recipes.html @@ -0,0 +1,119 @@ + + + + + + + Recipes || Final + + + + + + + + + + + + + + +
+
+ +
+

recipes

+ +
+ + + +
+
+ + + + + + diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/single-recipe.html b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/single-recipe.html new file mode 100644 index 0000000..32aa9e7 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/single-recipe.html @@ -0,0 +1,159 @@ + + + + + + + Single Recipe || Final + + + + + + + + + + + + + +
+
+
+ +
+

Banana Pancakes

+

+ Shabby chic humblebrag banh mi bushwick, banjo kale chips + meggings. Cred selfies sartorial, cloud bread disrupt blue bottle + seitan. Dreamcatcher tousled bitters, health goth vegan venmo + whatever street art lyft shabby chic pitchfork beard. Drinking + vinegar poke tbh, iPhone coloring book polaroid truffaut tousled + ramps pug trust fund letterpress. Portland four loko austin + chicharrones bitters single-origin coffee. Leggings letterpress + occupy pour-over. +

+
+
+ +
prep time
+

30 min.

+
+
+ +
cook time
+

15 min.

+
+
+ +
serving
+

6 servings

+
+
+

+ Tags : beef + breakfast + pancakes + food +

+
+
+ +
+
+

instructions

+ +
+
+

step 1

+
+
+

+ I'm baby mustache man braid fingerstache small batch venmo + succulents shoreditch. +

+
+ + +
+
+

step 2

+
+
+

+ Pabst pitchfork you probably haven't heard of them, asymmetrical + seitan tousled succulents wolf banh mi man bun bespoke selfies + freegan ethical hexagon. +

+
+ + +
+
+

step 3

+
+
+

+ Polaroid iPhone bitters chambray. Cornhole swag kombucha + live-edge. +

+
+ +
+
+
+

ingredients

+

1 1/2 cups dry pancake mix

+

1/2 cup flax seed meal

+

1 cup skim milk

+
+
+

tools

+

Hand Blender

+

Large Heavy Pot With Lid

+

Measuring Spoons

+

Measuring Cups

+
+
+
+
+
+ + + + + diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/tag-template.html b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/tag-template.html new file mode 100644 index 0000000..c07ce44 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/tag-template.html @@ -0,0 +1,109 @@ + + + + + + + Recipe Template || Final + + + + + + + + + + + + + +
+ + +
+ + + + + diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/tags.html b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/tags.html new file mode 100644 index 0000000..50caf75 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/final/tags.html @@ -0,0 +1,89 @@ + + + + + + + Tags || Final + + + + + + + + + + + + + +
+
+ + +
beef
+

1 recipe

+
+ + + +
breakfast
+

2 recipe

+
+ + + +
carrots
+

3 recipe

+
+ + + +
dinner
+

4 recipe

+
+ + + +
food
+

1 recipe

+
+ +
+
+ + + + + diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/404.html b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/404.html new file mode 100644 index 0000000..e470aa0 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/404.html @@ -0,0 +1,24 @@ + + + + + + + Error || Starter + + + + + + + + + + +

Error Page

+ + + diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/about.html b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/about.html new file mode 100644 index 0000000..6bee1a1 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/about.html @@ -0,0 +1,24 @@ + + + + + + + About || Starter + + + + + + + + + + +

About Page

+ + + diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/about.jpeg b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/about.jpeg new file mode 100644 index 0000000..6539080 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/about.jpeg differ diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/favicon.ico b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/favicon.ico new file mode 100644 index 0000000..b8fecd8 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/favicon.ico differ diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/logo.svg b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/logo.svg new file mode 100644 index 0000000..3daa6a4 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/logo.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/main.jpeg b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/main.jpeg new file mode 100644 index 0000000..4420530 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/main.jpeg differ diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/recipes/recipe-1.jpeg b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/recipes/recipe-1.jpeg new file mode 100644 index 0000000..85b4ab6 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/recipes/recipe-1.jpeg differ diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/recipes/recipe-2.jpeg b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/recipes/recipe-2.jpeg new file mode 100644 index 0000000..2a5109e Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/recipes/recipe-2.jpeg differ diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/recipes/recipe-3.jpeg b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/recipes/recipe-3.jpeg new file mode 100644 index 0000000..02f0bee Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/recipes/recipe-3.jpeg differ diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/recipes/recipe-4.jpeg b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/recipes/recipe-4.jpeg new file mode 100644 index 0000000..63c2bb7 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/recipes/recipe-4.jpeg differ diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/contact.html b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/contact.html new file mode 100644 index 0000000..e1195d0 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/contact.html @@ -0,0 +1,24 @@ + + + + + + + Contact || Starter + + + + + + + + + + +

Contact Page

+ + + diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/css/main.css b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/css/main.css new file mode 100644 index 0000000..74d7489 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/css/main.css @@ -0,0 +1,262 @@ +*, +::after, +::before { + box-sizing: border-box; +} +/* fonts */ + +@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600&family=Montserrat&display=swap'); +html { + font-size: 100%; +} /*16px*/ + +:root { + /* colors */ + --primary-100: #e2e0ff; + --primary-200: #c1beff; + --primary-300: #a29dff; + --primary-400: #837dff; + --primary-500: #645cff; + --primary-600: #504acc; + --primary-700: #3c3799; + --primary-800: #282566; + --primary-900: #141233; + + /* grey */ + --grey-50: #f8fafc; + --grey-100: #f1f5f9; + --grey-200: #e2e8f0; + --grey-300: #cbd5e1; + --grey-400: #94a3b8; + --grey-500: #64748b; + --grey-600: #475569; + --grey-700: #334155; + --grey-800: #1e293b; + --grey-900: #0f172a; + /* rest of the colors */ + --black: #222; + --white: #fff; + --red-light: #f8d7da; + --red-dark: #842029; + --green-light: #d1e7dd; + --green-dark: #0f5132; + + /* fonts */ + --headingFont: 'Roboto', sans-serif; + --bodyFont: 'Nunito', sans-serif; + --smallText: 0.7em; + /* rest of the vars */ + --backgroundColor: var(--grey-50); + --textColor: var(--grey-900); + --borderRadius: 0.25rem; + --letterSpacing: 1px; + --transition: 0.3s ease-in-out all; + --max-width: 1120px; + --fixed-width: 600px; + + /* box shadow*/ + --shadow-1: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); + --shadow-2: 0 4px 6px -1px rgba(0, 0, 0, 0.1), + 0 2px 4px -1px rgba(0, 0, 0, 0.06); + --shadow-3: 0 10px 15px -3px rgba(0, 0, 0, 0.1), + 0 4px 6px -2px rgba(0, 0, 0, 0.05); + --shadow-4: 0 20px 25px -5px rgba(0, 0, 0, 0.1), + 0 10px 10px -5px rgba(0, 0, 0, 0.04); +} + +body { + background: var(--backgroundColor); + font-family: var(--bodyFont); + font-weight: 400; + line-height: 1.75; + color: var(--textColor); +} + +p { + margin-top: 0; + margin-bottom: 1.5rem; + max-width: 40em; +} + +h1, +h2, +h3, +h4, +h5 { + margin: 0; + margin-bottom: 1.38rem; + font-family: var(--headingFont); + font-weight: 400; + line-height: 1.3; + text-transform: capitalize; + letter-spacing: var(--letterSpacing); +} + +h1 { + margin-top: 0; + font-size: 3.052rem; +} + +h2 { + font-size: 2.441rem; +} + +h3 { + font-size: 1.953rem; +} + +h4 { + font-size: 1.563rem; +} + +h5 { + font-size: 1.25rem; +} + +small, +.text-small { + font-size: var(--smallText); +} + +a { + text-decoration: none; +} +ul { + list-style-type: none; + padding: 0; +} + +.img { + width: 100%; + display: block; + object-fit: cover; +} +/* buttons */ + +.btn { + cursor: pointer; + color: var(--white); + background: var(--primary-500); + border: transparent; + border-radius: var(--borderRadius); + letter-spacing: var(--letterSpacing); + padding: 0.375rem 0.75rem; + box-shadow: var(--shadow-1); + transition: var(--transtion); + text-transform: capitalize; + display: inline-block; +} +.btn:hover { + background: var(--primary-700); + box-shadow: var(--shadow-3); +} +.btn-hipster { + color: var(--primary-500); + background: var(--primary-200); +} +.btn-hipster:hover { + color: var(--primary-200); + background: var(--primary-700); +} +.btn-block { + width: 100%; +} + +/* alerts */ +.alert { + padding: 0.375rem 0.75rem; + margin-bottom: 1rem; + border-color: transparent; + border-radius: var(--borderRadius); +} + +.alert-danger { + color: var(--red-dark); + background: var(--red-light); +} +.alert-success { + color: var(--green-dark); + background: var(--green-light); +} +/* form */ + +.form { + width: 90vw; + max-width: var(--fixed-width); + background: var(--white); + border-radius: var(--borderRadius); + box-shadow: var(--shadow-2); + padding: 2rem 2.5rem; + margin: 3rem auto; +} +.form-label { + display: block; + font-size: var(--smallText); + margin-bottom: 0.5rem; + text-transform: capitalize; + letter-spacing: var(--letterSpacing); +} +.form-input, +.form-textarea { + width: 100%; + padding: 0.375rem 0.75rem; + border-radius: var(--borderRadius); + background: var(--backgroundColor); + border: 1px solid var(--grey-200); +} + +.form-row { + margin-bottom: 1rem; +} + +.form-textarea { + height: 7rem; +} +::placeholder { + font-family: inherit; + color: var(--grey-400); +} +.form-alert { + color: var(--red-dark); + letter-spacing: var(--letterSpacing); + text-transform: capitalize; +} +/* alert */ + +@keyframes spinner { + to { + transform: rotate(360deg); + } +} + +.loading { + width: 6rem; + height: 6rem; + border: 5px solid var(--grey-400); + border-radius: 50%; + border-top-color: var(--primary-500); + animation: spinner 0.6s linear infinite; +} +.loading { + margin: 0 auto; +} +/* title */ + +.title { + text-align: center; +} + +.title-underline { + background: var(--primary-500); + width: 7rem; + height: 0.25rem; + margin: 0 auto; + margin-top: -1rem; +} + +/* +=============== +Navbar +=============== +*/ + diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/css/normalize.css b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/css/normalize.css new file mode 100644 index 0000000..2768db4 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/css/normalize.css @@ -0,0 +1,351 @@ +/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ + +/* Document + ========================================================================== */ + +/** + * 1. Correct the line height in all browsers. + * 2. Prevent adjustments of font size after orientation changes in iOS. + */ + +html { + line-height: 1.15; /* 1 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/* Sections + ========================================================================== */ + +/** + * Remove the margin in all browsers. + */ + +body { + margin: 0; +} + +/** + * Render the `main` element consistently in IE. + */ + +main { + display: block; +} + +/** + * Correct the font size and margin on `h1` elements within `section` and + * `article` contexts in Chrome, Firefox, and Safari. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/* Grouping content + ========================================================================== */ + +/** + * 1. Add the correct box sizing in Firefox. + * 2. Show the overflow in Edge and IE. + */ + +hr { + box-sizing: content-box; /* 1 */ + height: 0; /* 1 */ + overflow: visible; /* 2 */ +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +pre { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/* Text-level semantics + ========================================================================== */ + +/** + * Remove the gray background on active links in IE 10. + */ + +a { + background-color: transparent; +} + +/** + * 1. Remove the bottom border in Chrome 57- + * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. + */ + +abbr[title] { + border-bottom: none; /* 1 */ + text-decoration: underline; /* 2 */ + text-decoration: underline dotted; /* 2 */ +} + +/** + * Add the correct font weight in Chrome, Edge, and Safari. + */ + +b, +strong { + font-weight: bolder; +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +code, +kbd, +samp { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/** + * Add the correct font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` elements from affecting the line height in + * all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +/* Embedded content + ========================================================================== */ + +/** + * Remove the border on images inside links in IE 10. + */ + +img { + border-style: none; +} + +/* Forms + ========================================================================== */ + +/** + * 1. Change the font styles in all browsers. + * 2. Remove the margin in Firefox and Safari. + */ + +button, +input, +optgroup, +select, +textarea { + font-family: inherit; /* 1 */ + font-size: 100%; /* 1 */ + line-height: 1.15; /* 1 */ + margin: 0; /* 2 */ +} + +/** + * Show the overflow in IE. + * 1. Show the overflow in Edge. + */ + +button, +input { + /* 1 */ + overflow: visible; +} + +/** + * Remove the inheritance of text transform in Edge, Firefox, and IE. + * 1. Remove the inheritance of text transform in Firefox. + */ + +button, +select { + /* 1 */ + text-transform: none; +} + +/** + * Correct the inability to style clickable types in iOS and Safari. + */ + +button, +[type='button'], +[type='reset'], +[type='submit'] { + -webkit-appearance: button; +} + +/** + * Remove the inner border and padding in Firefox. + */ + +button::-moz-focus-inner, +[type='button']::-moz-focus-inner, +[type='reset']::-moz-focus-inner, +[type='submit']::-moz-focus-inner { + border-style: none; + padding: 0; +} + +/** + * Restore the focus styles unset by the previous rule. + */ + +button:-moz-focusring, +[type='button']:-moz-focusring, +[type='reset']:-moz-focusring, +[type='submit']:-moz-focusring { + outline: 1px dotted ButtonText; +} + +/** + * Correct the padding in Firefox. + */ + +fieldset { + padding: 0.35em 0.75em 0.625em; +} + +/** + * 1. Correct the text wrapping in Edge and IE. + * 2. Correct the color inheritance from `fieldset` elements in IE. + * 3. Remove the padding so developers are not caught out when they zero out + * `fieldset` elements in all browsers. + */ + +legend { + box-sizing: border-box; /* 1 */ + color: inherit; /* 2 */ + display: table; /* 1 */ + max-width: 100%; /* 1 */ + padding: 0; /* 3 */ + white-space: normal; /* 1 */ +} + +/** + * Add the correct vertical alignment in Chrome, Firefox, and Opera. + */ + +progress { + vertical-align: baseline; +} + +/** + * Remove the default vertical scrollbar in IE 10+. + */ + +textarea { + overflow: auto; +} + +/** + * 1. Add the correct box sizing in IE 10. + * 2. Remove the padding in IE 10. + */ + +[type='checkbox'], +[type='radio'] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Correct the cursor style of increment and decrement buttons in Chrome. + */ + +[type='number']::-webkit-inner-spin-button, +[type='number']::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Correct the odd appearance in Chrome and Safari. + * 2. Correct the outline style in Safari. + */ + +[type='search'] { + -webkit-appearance: textfield; /* 1 */ + outline-offset: -2px; /* 2 */ +} + +/** + * Remove the inner padding in Chrome and Safari on macOS. + */ + +[type='search']::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * 1. Correct the inability to style clickable types in iOS and Safari. + * 2. Change font properties to `inherit` in Safari. + */ + +::-webkit-file-upload-button { + -webkit-appearance: button; /* 1 */ + font: inherit; /* 2 */ +} + +/* Interactive + ========================================================================== */ + +/* + * Add the correct display in Edge, IE 10+, and Firefox. + */ + +details { + display: block; +} + +/* + * Add the correct display in all browsers. + */ + +summary { + display: list-item; +} + +/* Misc + ========================================================================== */ + +/** + * Add the correct display in IE 10+. + */ + +template { + display: none; +} + +/** + * Add the correct display in IE 10. + */ + +[hidden] { + display: none; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/index.html b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/index.html new file mode 100644 index 0000000..e89a673 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/index.html @@ -0,0 +1,24 @@ + + + + + + + Simply Recipes || Starter + + + + + + + + + + +

Home Page

+ + + diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/js/app.js b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/js/app.js new file mode 100644 index 0000000..d20828d --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/js/app.js @@ -0,0 +1,19 @@ +const getElement = (selector) => { + const element = document.querySelector(selector) + + if (element) return element + throw Error( + `Please double check your class names, there is no ${selector} class` + ) +} + +const links = getElement('.nav-links') +const navBtnDOM = getElement('.nav-btn') + +navBtnDOM.addEventListener('click', () => { + links.classList.toggle('show-links') +}) + +const date = getElement('#date') +const currentYear = new Date().getFullYear() +date.textContent = currentYear diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/recipes.html b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/recipes.html new file mode 100644 index 0000000..f352042 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/recipes.html @@ -0,0 +1,24 @@ + + + + + + + Recipes || Starter + + + + + + + + + + +

Recipes Page

+ + + diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/single-recipe.html b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/single-recipe.html new file mode 100644 index 0000000..6cfc261 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/single-recipe.html @@ -0,0 +1,24 @@ + + + + + + + Single Recipe || Starter + + + + + + + + + + +

Single Recipe Page

+ + + diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/tag-template.html b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/tag-template.html new file mode 100644 index 0000000..41cc413 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/tag-template.html @@ -0,0 +1,24 @@ + + + + + + + Beef|| Starter + + + + + + + + + + +

Tag Template Page

+ + + diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/tags.html b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/tags.html new file mode 100644 index 0000000..83422e6 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/aha/html-css-simply-recipes-main/starter/tags.html @@ -0,0 +1,24 @@ + + + + + + + Tags || Starter + + + + + + + + + + +

Tags Page

+ + + diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/ashwini/Connector/Controller/ConnectorController.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/ashwini/Connector/Controller/ConnectorController.java new file mode 100644 index 0000000..9f04c2b --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/ashwini/Connector/Controller/ConnectorController.java @@ -0,0 +1,79 @@ +package com.realnet.Connector.Controller; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.Connector.Entity.Connector; +import com.realnet.Connector.Repository.Connectorrepository; +import com.realnet.users.entity.Sys_Accounts; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; + +@RestController +@RequestMapping("/connector") +public class ConnectorController { + + @Autowired + private Connectorrepository connectorrepository; + @Autowired + private AppUserServiceImpl userService; + + + //ADD DATA + @PostMapping("/Connectorjson") + public ResponseEntity save(@RequestBody Connector connector) { + AppUser loggedInUser = userService.getLoggedInUser(); + Long account_id = loggedInUser.getAccount().getAccount_id(); + connector.setAccountId(account_id); + Connector save = connectorrepository.save(connector); + return new ResponseEntity<>(save, HttpStatus.OK); + + } + + //UPDATE BY ID + @PutMapping("/Connectorjson/{id}") + public ResponseEntity update(@PathVariable Long id, @RequestBody Connector connector) { + Connector con = connectorrepository.findById(id).orElseThrow(null); + con.setName(connector.getName()); + con.setConnector_json(connector.getConnector_json()); + + Connector save = connectorrepository.save(con); + return new ResponseEntity<>(save, HttpStatus.OK); + + } + + //GET ALL + @GetMapping("/Connectorjson") + public ResponseEntity getall() { + List save = connectorrepository.findAll(); + return new ResponseEntity<>(save, HttpStatus.OK); + + } + + //GET BY ID + @GetMapping("/Connectorjson/{id}") + public ResponseEntity getbyid(@PathVariable Long id) { + Connector con = connectorrepository.findById(id).orElseThrow(null); + return new ResponseEntity<>(con, HttpStatus.OK); + + } + + //DELETE BY ID + @DeleteMapping("/Connectorjson/{id}") + public void delete(@PathVariable Long id){ + Connector con = connectorrepository.findById(id).orElseThrow(null); + connectorrepository.delete(con); + + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/ashwini/Connector/Controller/MappingController.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/ashwini/Connector/Controller/MappingController.java new file mode 100644 index 0000000..aec54be --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/ashwini/Connector/Controller/MappingController.java @@ -0,0 +1,81 @@ +package com.realnet.Connector.Controller; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import com.realnet.Connector.Entity.Connector; +import com.realnet.Connector.Entity.Mapping; +import com.realnet.Connector.Repository.Connectorrepository; + +@RestController +@RequestMapping("/token/connector/mapping") +public class MappingController { + + @Autowired + private Connectorrepository connectorrepository; + + @PostMapping("/mapping") + public Object connector(@RequestBody Mapping mapping) { + List list = new ArrayList<>(); + +// Map param = new HashMap(); + String str =mapping.getMappingString(); + JsonParser parser = new JsonParser(); + JsonElement element = parser.parse(str); + JsonObject obj = element.getAsJsonObject(); + + //get key from get api + Set> entries = obj.entrySet(); + for (Map.Entry entry : entries) { + + String key = entry.getKey(); + String string = key.toString(); + list.add(string); + } + return list; + +} + @PostMapping("/mapping1") + public Object connector1(@RequestBody Mapping mapping) { + List list = new ArrayList<>(); + +// Map param = new HashMap(); + String str =mapping.getMappingString(); + JsonParser parser = new JsonParser(); + JsonElement element = parser.parse(str); + JsonObject obj = element.getAsJsonObject(); + + //get values from get api + Set> entries = obj.entrySet(); + for (Map.Entry entry : entries) { + + String string2 = entry.getValue().getAsString(); + list.add(string2); + } + return list; + +} + //get api for call connector by name for job(by gk) + @GetMapping("/connectorname/{name}") + public ResponseEntity getconnector(@PathVariable String name) { + Connector save = connectorrepository.findconnectorbyname(name); + return new ResponseEntity<>(save, HttpStatus.OK); + + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/ashwini/Connector/Entity/Connector.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/ashwini/Connector/Entity/Connector.java new file mode 100644 index 0000000..8de5289 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/ashwini/Connector/Entity/Connector.java @@ -0,0 +1,33 @@ +package com.realnet.Connector.Entity; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Lob; +import javax.persistence.Column; + +import com.realnet.Dashboard1.Entity.dashbord_Who_collumn; + +import lombok.Data; + +@Entity +@Data +public class Connector extends dashbord_Who_collumn { + + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String name; + @Column(length = 15000) + private String get_str; + @Lob + private String connector_json; + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/ashwini/Connector/Entity/Mapping.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/ashwini/Connector/Entity/Mapping.java new file mode 100644 index 0000000..0e23d56 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/ashwini/Connector/Entity/Mapping.java @@ -0,0 +1,9 @@ +package com.realnet.Connector.Entity; + +import lombok.Data; + +@Data +public class Mapping { + + private String mappingString; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/ashwini/Connector/Repository/Connectorrepository.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/ashwini/Connector/Repository/Connectorrepository.java new file mode 100644 index 0000000..1d83c69 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/ashwini/Connector/Repository/Connectorrepository.java @@ -0,0 +1,15 @@ +package com.realnet.Connector.Repository; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.stereotype.Repository; + +import com.realnet.Connector.Entity.Connector; +@Repository +public interface Connectorrepository extends JpaRepository{ + + + @Query(value = "select * from connector where name=?1", nativeQuery = true) + Connector findconnectorbyname(String name); + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/projecttest/model/TestModel.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/projecttest/model/TestModel.java new file mode 100644 index 0000000..9dcd130 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/projecttest/model/TestModel.java @@ -0,0 +1,15 @@ +package com.realnet.model; + +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; + +public class TestModel { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private int id; + private String name; + private String email; + private String mob_no; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test3/Demo Code Extractor/Abc_1665647440047_back.zip b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test3/Demo Code Extractor/Abc_1665647440047_back.zip new file mode 100644 index 0000000..e35579f Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test3/Demo Code Extractor/Abc_1665647440047_back.zip differ diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test3/Demo Code Extractor/Abc_1665647440047_back/Controllers/AbcController.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test3/Demo Code Extractor/Abc_1665647440047_back/Controllers/AbcController.java new file mode 100644 index 0000000..4b90753 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test3/Demo Code Extractor/Abc_1665647440047_back/Controllers/AbcController.java @@ -0,0 +1,42 @@ +package com.realnet.Abc_1665647440047_back.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import com.realnet.Abc_1665647440047_back.Entity.Abc; +import com.realnet.Abc_1665647440047_back.Services.AbcService ; +@RequestMapping(value = "/_1665647440047_back") +@RestController +public class AbcController { + + @Autowired + private AbcService Service; + + @PostMapping("/Abc") + + public Abc Savedata(@RequestBody Abc data) { + Abc save = Service.Savedata(data) ; + return save; + } + + + @GetMapping("/Abc") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Abc/{id}") + public Abc getdetailsbyId(@PathVariable Long id ) { + Abc get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Abc/{id}") + public void delete_by_id(@PathVariable Long id ) { + Service.delete_by_id(id); + + } +@PutMapping("/Abc/{id}") + public Abc update(@RequestBody Abc data,@PathVariable Long id ) { + Abc update = Service.update(data,id); + return update; + } +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test3/Demo Code Extractor/Abc_1665647440047_back/Entity/Abc.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test3/Demo Code Extractor/Abc_1665647440047_back/Entity/Abc.java new file mode 100644 index 0000000..5c33750 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test3/Demo Code Extractor/Abc_1665647440047_back/Entity/Abc.java @@ -0,0 +1,18 @@ +package com.realnet.Abc_1665647440047_back.Entity; + import lombok.*; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + @Entity + @Data + public class Abc{ + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String name; + private int name_id; + + } \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test3/Demo Code Extractor/Abc_1665647440047_back/Repository/AbcRepository.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test3/Demo Code Extractor/Abc_1665647440047_back/Repository/AbcRepository.java new file mode 100644 index 0000000..2576449 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test3/Demo Code Extractor/Abc_1665647440047_back/Repository/AbcRepository.java @@ -0,0 +1,13 @@ +package com.realnet.Abc_1665647440047_back.Repository; + + +import org.springframework.data.jpa.repository.JpaRepository; + +import org.springframework.stereotype.Repository; + + +import com.realnet.Abc_1665647440047_back.Entity.Abc; + +@Repository +public interface AbcRepository extends JpaRepository { +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test3/Demo Code Extractor/Abc_1665647440047_back/Services/AbcService.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test3/Demo Code Extractor/Abc_1665647440047_back/Services/AbcService.java new file mode 100644 index 0000000..a26061b --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test3/Demo Code Extractor/Abc_1665647440047_back/Services/AbcService.java @@ -0,0 +1,37 @@ +package com.realnet.Abc_1665647440047_back.Services; +import com.realnet.Abc_1665647440047_back.Repository.AbcRepository; +import com.realnet.Abc_1665647440047_back.Entity.Abc;import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Service; + +@Service + public class AbcService { +@Autowired +private AbcRepository Repository; +public Abc Savedata(Abc data) { + return Repository.save(data); + } + + +public List getdetails() { + return (List) Repository.findAll(); + } + + +public Abc getdetailsbyId(Long id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Long id) { + Repository.deleteById(id); +} + + +public Abc update(Abc data,Long id) { + Abc old = Repository.findById(id).get(); +old.setName(data.getName()); +old.setName_id(data.getName_id()); +final Abc test = Repository.save(old); + return test;}} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test3/Demo Code Extractor/model.zip b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test3/Demo Code Extractor/model.zip new file mode 100644 index 0000000..ee66204 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test3/Demo Code Extractor/model.zip differ diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test3/Demo Code Extractor/model/TestModel.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test3/Demo Code Extractor/model/TestModel.java new file mode 100644 index 0000000..9dcd130 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test3/Demo Code Extractor/model/TestModel.java @@ -0,0 +1,15 @@ +package com.realnet.model; + +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; + +public class TestModel { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private int id; + private String name; + private String email; + private String mob_no; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/controller/BuildMasterBuilderController.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/controller/BuildMasterBuilderController.java new file mode 100644 index 0000000..31e9747 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/controller/BuildMasterBuilderController.java @@ -0,0 +1,537 @@ +//package com.realnet.codeextractor.controller; +// +//import java.io.BufferedWriter; +//import java.io.File; +//import java.io.FileNotFoundException; +//import java.io.FileWriter; +//import java.io.IOException; +//import java.nio.charset.StandardCharsets; +//import java.util.List; +// +//import org.apache.commons.io.FileUtils; +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.beans.factory.annotation.Value; +//import org.springframework.http.HttpStatus; +//import org.springframework.http.MediaType; +//import org.springframework.http.ResponseEntity; +//import org.springframework.web.bind.annotation.GetMapping; +//import org.springframework.web.bind.annotation.RequestMapping; +//import org.springframework.web.bind.annotation.RequestParam; +//import org.springframework.web.bind.annotation.RestController; +// +//import com.realnet.codeextractor.entity.Rn_Bcf_Extractor; +//import com.realnet.codeextractor.entity.Rn_Bcf_Extractor_Params; +//import com.realnet.codeextractor.service.Rn_Bcf_Exception_Rule_Library_Service; +//import com.realnet.codeextractor.service.Rn_Bcf_Extractor_Params_Service; +//import com.realnet.codeextractor.service.Rn_Bcf_Extractor_Service; +//import com.realnet.codeextractor.service.Rn_Bcf_Rule_Library_Service; +//import com.realnet.flf.service.FieldTypeService; +//import com.realnet.fnd.entity.Error; +//import com.realnet.fnd.entity.ErrorPojo; +//import com.realnet.fnd.entity.Success; +//import com.realnet.fnd.entity.SuccessPojo; +//import com.realnet.fnd.service.Rn_ModuleSetup_Service; +//import com.realnet.utils.Constant; +// +//import io.swagger.annotations.Api; +// +//@RestController +//@RequestMapping(value = "/api", produces = MediaType.APPLICATION_JSON_VALUE) +//@Api(tags = { "Build Master Builder" }) +//public class BuildMasterBuilderController { +// +// @Value("${projectPath}") +// private String projectPath; +// +// @Value("${angularProjectPath}") +// private String angularProjectPath; +// +// @Autowired +// private Rn_ModuleSetup_Service rn_module_setup_service; +// +// @Autowired +// private Rn_Bcf_Extractor_Service rn_bcf_extractor_service; +// +// @Autowired +// private Rn_Bcf_Extractor_Params_Service rn_bcf_extractor_params_service; +// +// @Autowired +// private Rn_Bcf_Rule_Library_Service rn_bcf_rule_library_service; +// +// @Autowired +// private Rn_Bcf_Exception_Rule_Library_Service rn_bcf_rule_exception_library_service; +// +// @Autowired +// private FieldTypeService fieldTypeService; +// //private static final Logger logger = Logger.getLogger(BuildMasterBuilderController.class); +// +// @GetMapping("/build_master_builder") +// public ResponseEntity masterControllerBuilder(@RequestParam(value = "id") Integer id) throws IOException, FileNotFoundException { +// StringBuilder variablesDynamicCode = new StringBuilder(); +// StringBuilder stringBuilderDynamicCode = new StringBuilder(); +// StringBuilder moduleCode = new StringBuilder(); +// +// +// // RN_BCF_CODE_EXTRACTOR_T ID +// //int eid = Integer.parseInt(id); +// +// Rn_Bcf_Extractor extractor = rn_bcf_extractor_service.getById(id); +// String technology_stack = extractor.getTech_stack(); +// String object_type = extractor.getObject_type(); +// String sub_object_type = extractor.getSub_object_type(); +// +// // RN_BCF_CODE_EXTRACTOR_PARAMS_T VALUES +// //List params = rn_bcf_extractor_params_service.getByHeaderId(eid); +// List params = extractor.getRn_bcf_extractor_Params(); +// +// // PARAMETERS TABLE VALUE +// int i = 0; +// int j=0; +// for (Rn_Bcf_Extractor_Params param : params) +// { +// boolean is_creation_enabled = param.isIs_creation_enabled(); +// boolean is_extraction_enabled = param.isIs_extraction_enabled(); +// String path = param.getMoved_address_string(); +// File file = new File(path); +// String parentPath = file.getParent(); +// +// String name = file.getName(); +// String convertedFileName = "SE_" + name; +// +// // STATIC CODE DIRECTORY +// String staticFileParentDir = parentPath + File.separator + "static_code"; +// File staticFile = new File(staticFileParentDir + File.separator + convertedFileName); +// String fileToString = FileUtils.readFileToString(staticFile, StandardCharsets.UTF_8); +// +// // ex. controller_file (FROM PARAMS TABLE) +// String file_name_var = param.getFile_name_var(); +// +// // ex. ui_name + "controller" +// String file_name_dynamic_string = param.getFile_name_dynamic_string(); +// +// // ex. String controller_file = ui_name + "controller"; +// variablesDynamicCode.append("String " + file_name_var + " = " + file_name_dynamic_string + ";\r\n"); +// +// System.out.println("file name dynamic str "+file_name_dynamic_string); +// //change file name entity +//// String mainstr1=file_name_dynamic_string; +//// String saleesent1=mainstr1.replace(".java", " "); +//// System.out.println("updated filename"+saleesent1); +//// System.out.println(file_name_dynamic_string.contains(".java")); +//// System.out.println(file_name_dynamic_string.contains(".ts")); +//// System.out.println(file_name_dynamic_string.contains(".scss")); +//// System.out.println(file_name_dynamic_string.contains(".html")); +// +// if(file_name_dynamic_string.contains(".java")) { +// variablesDynamicCode.append("String mainstr"+j+" = " + file_name_var + ";\r\n"+ +// "String "+file_name_var+""+1+"=mainstr"+j+".replace(\".java\", \"\");\r\n"+ +// "" + "\r\n"+"\n" ); +// }else if(file_name_dynamic_string.contains(".ts")) { +// variablesDynamicCode.append("String mainstr"+j+" = " + file_name_var + ";\r\n"+ +// "String "+file_name_var+""+1+"=mainstr"+j+".replace(\".ts\", \"\");\r\n"+ +// "" + "\r\n"+ +// "String "+file_name_var+""+2+"=mainstr"+j+".replace(\".component.ts\", \"\");\r\n"+ +// "" + "\r\n"+"\n" +// ); +// +// }else if(file_name_dynamic_string.contains(".html")) { +// variablesDynamicCode.append("String mainstr"+j+" = " + file_name_var + ";\r\n"+ +// "String "+file_name_var+""+1+"=mainstr"+j+".replace(\".html\", \"\");\r\n"+ +// "" + "\r\n"+"\n" ); +// }else if(file_name_dynamic_string.contains(".scss")) { +// variablesDynamicCode.append("String mainstr"+j+" = " + file_name_var + ";\r\n"+ +// "String "+file_name_var+""+1+"=mainstr"+j+".replace(\".scss\", \"\");\r\n"+ +// "" + "\r\n"+"\n" ); +// }else {System.out.println("not found");} +// +// +// +// // ======= MODULE NAME SHOULD COME FROM THE SESSION ======== +// //String moduleName = "\" + module_name + \"/\""; +// String moduleName = "\" + module_name + \"/"; +// +// String modulePath = param.getTotal_project_path_dynamic_string(); +// //System.out.println("MODULE PATH = " + modulePath); +// if(modulePath.endsWith(".java")) { +// String parent = modulePath.substring(0, modulePath.lastIndexOf("/")); // 1 +// String lvl2Parent = parent.substring(0, parent.lastIndexOf("/")+1); // 2 +// String tail0 = modulePath.substring(parent.lastIndexOf("/") +1); // 3 +// tail0 = tail0.substring(0, tail0.lastIndexOf("/")+1); // remove the .java file name +// modulePath = lvl2Parent + moduleName + tail0; +// } else { +// // add module name in spring project +// modulePath = modulePath.substring(0, modulePath.lastIndexOf("/")+1); +// String data0 = modulePath.substring(0, modulePath.lastIndexOf("/") + 1); +// String tail0 = modulePath.substring(modulePath.lastIndexOf("/") + 1); +// data0 += moduleName + tail0; +// modulePath = data0; +// } +//// System.out.println("MANUPULATED module PATH = " + modulePath); +// +//// String ref_address_string = param.getReference_address_string(); +//// ref_address_string = ref_address_string.substring(0, ref_address_string.lastIndexOf("/")+1); +// +// String total_address_path = param.getTotal_project_path_dynamic_string(); +// total_address_path = total_address_path.substring(0, total_address_path.lastIndexOf("/")+1); +// System.out.println("total path : "+total_address_path +"\n"); +// String module_dest_path = ""; +// String finalDir = ""; +// +// +//// module_dest_path = "angularProjectPath + \"" + modulePath; +//// // CREATE MODULE FOLDER STRUCTURE [DYNAMIC PATH] +//// moduleCode.append("File file" + (++i) + " = new File(" + module_dest_path +"\");\n" +//// + "if(!file" + (i) +".exists()) {\n" +//// + " file" + (i) + ".mkdirs();\n" +//// + "}\n"); +// +// /* +// * MAKE {{test1}} dynamic +// * INPUT : /frontend/src/app/admin/test1/details/rn_header_test1-details.component.html +// * OUTPUT : /frontend/src/app/admin/{{test1}}/details/ +// * +// * */ +// // DYNAMIC FOLDER NAME LOGIC FOR ANGULAR +// // start +//// final String ng_prj_struct = "/frontend/src/app/admin/"; +//// if (ref_address_string.contains(ng_prj_struct)) { +//// int len = ng_prj_struct.length(); +//// String data = ref_address_string.substring(0,len) + "\" + ng_folder_name + \""; +//// int tail = ref_address_string.indexOf("/", len + 1); +//// String temp = ref_address_string.substring(tail); +//// data += temp; +//// ref_address_string = data; +//// } +//// +// // end +// String dest_path = "projectPath + \"" + "/Projects/\" + project_name + \"" + total_address_path; +// System.out.println("dest path : "+dest_path); +// // String finalDir = dirString + "/" + "\" + " + file_name_var; +// finalDir = dest_path + "\" + " + file_name_var; +// System.out.println(finalDir); +// +// +// //module_dest_path = "projectPath + \"" + "/Projects/\" + project_name + " + modulePath; +//// String dest_path = "projectPath + \"" + "/Projects/\" + project_name + \"" + modulePath; +// +// +// // String finalDir = dirString + "/" + "\" + " + file_name_var; +// finalDir = dest_path + "\" + " + file_name_var; +// System.out.println("NIL FINAL DIR = " + finalDir+"\n"); +// +// if(is_creation_enabled) { +// StringBuilder fileCode = new StringBuilder(); +// // EMPTY FILE CODE WILL NOT GO IN THIS LOOP +// if(fileToString.isEmpty()) { +// fileCode.append(" " + file_name_var + "Code.append(\"" + fileToString + "\");\r\n"); +// } else { +// fileCode.append(" " + file_name_var + "Code.append(" + fileToString + ");\r\n"); +// } +// stringBuilderDynamicCode.append(" StringBuilder " + file_name_var + "Code = new StringBuilder();\r\n" +// //+ " " + file_name_var + "Code.append(" + fileToString + ");\r\n" +// + fileCode +// + "\r\n" +// + " File " + file_name_var + "File = new File(" + finalDir + ");\r\n" +// + " System.out.println(\"Directory name = \" + " + file_name_var + "File);\r\n" +// //== CREATE PARENT DIR IF NOT EXIST=== +// + " File " + file_name_var + "FileParentDir = new File(" + file_name_var + "File.getParent());\r\n" +// + " if(!" + file_name_var +"FileParentDir.exists()) {\r\n" +// + " " + file_name_var + "FileParentDir.mkdirs();\r\n" +// + " }\r\n" +// //== +// + " if (!" + file_name_var + "File.exists()) {\r\n" +// + " " + file_name_var + "File.createNewFile();\r\n" +// + " }\r\n" +// + " fw = new FileWriter(" + file_name_var + "File.getAbsoluteFile());\r\n" +// + " bw = new BufferedWriter(fw);\r\n" +// + " bw.write(" + file_name_var + "Code.toString());\r\n" +// + " bw.close();\r\n" +// + "\r\n"); +// +// } +// j++; +// } +// +// +// +// // CHILD MASTER BUILDER NAME DEPENDS ON (TECH_STACK, OBJ_TYPE, SUB_OBJ_TYPE) +// String childMasterBuilderName = technology_stack + "_" + object_type + "_" + sub_object_type + "_Builder"; +// childMasterBuilderName = childMasterBuilderName.replace(" ", "_"); +// childMasterBuilderName = childMasterBuilderName.replaceAll("[-]+", "_"); +// +// StringBuilder childMasterBuilderCode = new StringBuilder(); +// childMasterBuilderCode.append( +// "package com.realnet.builders;\r\n" +// + "\r\n" +// + "import java.io.BufferedReader;\r\n" +// + "import java.io.BufferedWriter;\r\n" +// + "import java.io.File;\r\n" +// + "import java.io.FileNotFoundException;\r\n" +// + "import java.io.FileReader;\r\n" +// + "import java.io.FileWriter;\r\n" +// + "import java.io.IOException;\r\n" +// + "import java.util.List;\r\n" +// + "import java.util.stream.Collectors;\r\n" +// + "\r\n" +// + "import org.modelmapper.ModelMapper;\r\n" +// + "import org.springframework.beans.factory.annotation.Autowired;\r\n" +// + "import org.springframework.beans.factory.annotation.Value;\r\n" +// + "import org.springframework.http.HttpStatus;\r\n" +// + "import org.springframework.http.MediaType;\r\n" +// + "import org.springframework.http.ResponseEntity;\r\n" +// + "import org.springframework.web.bind.annotation.GetMapping;\r\n" +// + "import org.springframework.web.bind.annotation.RequestMapping;\r\n" +// + "import org.springframework.web.bind.annotation.RequestParam;\r\n" +// + "import org.springframework.web.bind.annotation.RestController;\r\n" +// + "\r\n" +// + "import com.realnet.actionbuilder.entity.Rn_cff_ActionBuilder_Header;\r\n" +// + "import com.realnet.actionbuilder.entity.Rn_cff_ActionBuilder_Header;\r\n" +// + "import com.realnet.actionbuilder.service.Rn_Cff_ActionBuilder_Service;\r\n" +// + "import com.realnet.flf.service.FieldTypeService;\r\n" +// + "import com.realnet.fnd.entity.Error;\r\n" +// + "import com.realnet.fnd.entity.ErrorPojo;\r\n" +// + "import com.realnet.fnd.entity.Rn_Lookup_Values;\r\n" +// + "import com.realnet.fnd.entity.Rn_Module_Setup;\r\n" +// + "import com.realnet.fnd.entity.Rn_Project_Setup;\r\n" +// + "import com.realnet.fnd.entity.Success;\r\n" +// + "import com.realnet.fnd.entity.SuccessPojo;\r\n" +// + "import com.realnet.fnd.service.Rn_LookUp_Service;\r\n" +// + "import com.realnet.utils.Constant;\r\n" +// + "import com.realnet.utils.RealNetUtils;\r\n" +// + "import com.realnet.wfb.entity.Rn_Fb_Header;\r\n" +// + "import com.realnet.wfb.entity.Rn_Fb_Line;\r\n" +// + "import com.realnet.wfb.entity.Rn_Fb_Line_DTO;\r\n" +// + "import com.realnet.wfb.service.Rn_WireFrame_Service;\r\n" +// + "\r\n" +// + "import io.swagger.annotations.Api;\r\n" +// + "\r\n" +// + "@RestController\r\n" +// // CONTROLLER NAME SHOULD CHANGE +// // DEPENDS ON TECH_STACK/OBJECT_tYPE/SUB_OBJECT_TYPE +// + "@RequestMapping(value = \"/api\", produces = MediaType.APPLICATION_JSON_VALUE)\r\n" +// + "@Api(tags = { \"Master Builder\" })\r\n" +// + "public class " + childMasterBuilderName + " {\r\n" + "\r\n" + "\r\n" +// + " @Value(\"${angularProjectPath}\")\r\n" +// + " private String angularProjectPath;" +// + " @Value(\"${projectPath}\")\r\n" +// + " private String projectPath;" +// +// // DEPENDENCIES FOR WIREFRAME +// + " @Autowired\r\n" +// + " private Rn_WireFrame_Service wireFrameService;\r\n" + +// "\r\n" + +// " @Autowired\r\n" +// + " private Rn_LookUp_Service lookUpService;\r\n" +// + "\r\n" +// + " @Autowired\r\n" +// + " private Rn_Cff_ActionBuilder_Service actionBuilderService;\r\n" +// + "\r\n" +// + " @Autowired\r\n" +// + " private ModelMapper modelMapper;\r\n" +// + "\r\n" +// + " @Autowired\r\n" +// + " private FieldTypeService fieldTypeService;\r\n" +// +// + " @GetMapping(value = \"/" + childMasterBuilderName + "\")\r\n" +// + " public ResponseEntity build_wireframe(@RequestParam(\"header_id\") Integer id) throws IOException {\r\n" + "\r\n" +// + " System.out.println(\"id ::\"+id);" +// + "\n lookUpService.createTable(id);" +// + " \n // extra button \n List extraButton = wireFrameService.getExtraButton(id);" +// + " \n // HEADER VALUE\r\n" +// + " Rn_Fb_Header rn_fb_header = wireFrameService.getById(id);\r\n" +// + " \r\n" +// + " // LINE VALUES\r\n" +// + " List rn_fb_lines = rn_fb_header.getRn_fb_lines();\r\n" +// + " \r\n" +// + " // MODULE DETAILS\r\n" +// + " Rn_Module_Setup module = rn_fb_header.getModule();\r\n" +// + " \r\n" +// + " // PROJECT DETAILS\r\n" +// + " Rn_Project_Setup project = module.getProject();\r\n" +// + " \r\n" +// // ATTRIBUTE FLEX +// + " // ATTRIBUTE FLEX VALUES\r\n" +// + " List attribute_flex_values = lookUpService.getExtensions();\r\n" +// + " String project_name = project.getProjectName();\r\n" +// + " String module_name = module.getModuleName();" +// +// // header table values +// + " /*\r\n" +// + " * Header Table Values\r\n" +// + " * @GET UI_NAME\r\n" +// + " * @SET controller, model, repository, service name.\r\n" +// + " */\r\n" +// + " String technology_stack = rn_fb_header.getTechStack();\r\n" +// + " String ui_name = RealNetUtils.toFirstUpperCase(rn_fb_header.getUiName());\r\n" +// + " String form_code = rn_fb_header.getFormCode(); // value will come from db\r\n" +// +// + " String controller_name = ui_name.concat(\"_Controller\");\r\n" +// + " String dao_name = ui_name.concat(\"_Dao\");\r\n" +// + " String dao_name_lower = dao_name.toLowerCase();" +// + " String dao_impl_name = ui_name.concat(\"_DaoImpl\");\r\n" +// + " String repository_name = ui_name.concat(\"_Repository\");\r\n" +// + " String service_name = ui_name.concat(\"_Service\");\r\n" +// + " String service_impl_name = ui_name.concat(\"_ServiceImpl\");\r\n" + "\r\n" +// + " String table_name = ui_name.concat(\"_t\"); // For @Column(table=\"table_name\") && Model class name\r\n" +// + "\r\n" +// //+ " String line_table_name = ui_name.concat(\"_line_t\");\r\n" + "\r\n" +// + " /*----First Upper names (back-end)----------*/\r\n" +// + " String controller_name_first_upper = RealNetUtils.toFirstUpperCase(controller_name);\r\n" +// + " String repository_name_first_upper = RealNetUtils.toFirstUpperCase(repository_name);\r\n" +// + " String dao_name_first_upper = RealNetUtils.toFirstUpperCase(dao_name);\r\n" +// + " String dao_impl_name_first_upper = RealNetUtils.toFirstUpperCase(dao_impl_name);\r\n" +// + " String service_name_first_upper = RealNetUtils.toFirstUpperCase(service_name);\r\n" +// + " String service_impl_name_first_upper = RealNetUtils.toFirstUpperCase(service_impl_name);\r\n" +// + " String table_name_first_upper = RealNetUtils.toFirstUpperCase(table_name);\r\n" +// + " String table_name_upper = table_name.toUpperCase(); // For Model class\r\n" + "\r\n" +// //+ " String line_table_name_first_upper = RealNetUtils.toFirstUpperCase(line_table_name);\r\n" +// + " /*-------------lower names (back-end)----------*/\r\n" +// + " String table_name_lower = table_name.toLowerCase();\r\n" +// + " String repository_name_lower = repository_name.toLowerCase();\r\n" +// + " String service_name_lower = service_name.toLowerCase();\r\n" +// + "\r\n" +// +// //DTO APPROACH FOR CALLING A SERVICE +// + " List lineListDto = rn_fb_lines.stream().map(line -> modelMapper.map(line, Rn_Fb_Line_DTO.class))\r\n" +// + " .collect(Collectors.toList());\r\n" +// + " \r\n" +// + " // set table name in the dto class\r\n" +// + " for(Rn_Fb_Line_DTO dto : lineListDto) {\r\n" +// + " dto.setTable_name(table_name_lower);\r\n" +// + " }\r\n" +// +// // ======= NEED TO IMPLEMENT LOGIC FOR DIFFERENT TECHNOLOGY TYPE ==== +// ); // +// +// +// // =========== FRONT-END OBJECT NAMES ============== +// childMasterBuilderCode.append("// ===========FRONT END FILE NAMES DEPENDS ON UI NAME===============\r\n" +// + " String ng_ui_name = RealNetUtils.toFirstUpperCase(ui_name);\r\n" +// + " String ng_model_ts_name = ng_ui_name.concat(\"_t\");\r\n" +// + " String ng_component_ts_name = ng_ui_name.concat(\"Component\");\r\n" +// + " String ng_module_ts_name = ng_ui_name.concat(\"Module\");\r\n" +// + " String ng_service_ts_name = ng_ui_name.concat(\"Service\");\r\n" +// + " String ng_routing_module_ts_name = ng_ui_name.concat(\"RoutingModule\");\r\n" + "\r\n" +// + " String ng_service_ts_name_lower = ui_name.toLowerCase().concat(\"Service\");\r\n" +// + " String ng_model_ts_name_lower = ng_model_ts_name.toLowerCase();\r\n" +// + " // Routing Path names\r\n" +// + " String ng_path_name = ui_name.toLowerCase();\r\n" +// + " // CRUD Components name\r\n" +// + " String ng_all_grid_view_component_name = \"All\" + ng_ui_name.concat(\"Component\");\r\n" +// + " String ng_add_form_component_name = \"Add\" + ng_ui_name.concat(\"Component\");\r\n" +// + " String ng_edit_component_name = \"Edit\" + ng_ui_name.concat(\"Component\");\r\n" +// + " String ng_read_only_component_name = ng_ui_name + \"DetailsComponent\";\r\n" +// + " // Extension Components name\r\n" +// + " String ng_extension_add_component_name = \"AddExt\" + ng_ui_name.concat(\"Component\");\r\n" +// + " // File Folder name\r\n" +// + " String ng_folder_name = ui_name.toLowerCase();\r\n" +// + " String ng_file_name = ui_name.toLowerCase();\r\n" +// + "\r\n"); +// +// String action_builder_code = fieldTypeService.angular_action_builder_code(); +// +// // DYNAMIC VARIABLE FOR FILE-NAME DEPENDS ON UI NAME +// childMasterBuilderCode.append( +// variablesDynamicCode // this is the file name with extension(from params table) +// + "\r\n" +// // MASTER CONTROLLER CODE START +// + " FileWriter fw = null;\r\n" +// + " BufferedWriter bw = null;\r\n" +// + " try { \r\n" +// // ACTION BUILDER CODE +// + action_builder_code +// + // =========== VARIABLE CODE WILL BE APPEND HERE ===============// +// stringBuilderDynamicCode +// + "\r\n"); +// +// // UPDATE MENU +// // String angular_update_sidenav = ""; +// childMasterBuilderCode.append(moduleCode +"\r\n" + +// // 22:30 UPDATE SIDE BAR START +// "/*-----------------------UPDATE ADMIN ROUTING TS FILE --------------------*/\r\n" +// + " // String frontEndDir = angularProjectPath.concat(\"/frontend/\");\n" +// + " File adminRoutingModule = new File(projectPath+\"/Projects/\"+project_name+ \"/webui/src/app/app-routing.module.ts\");\r\n" +// + " File tempRoutingModule = new File(projectPath+\"/Projects/\"+project_name+\"/webui/src/app/temp-routing.module.ts\");\r\n" +// + "\r\n" + +// " BufferedReader reader = new BufferedReader(new FileReader(adminRoutingModule));\r\n" + +// " BufferedWriter writer = new BufferedWriter(new FileWriter(tempRoutingModule));\r\n" + +// " String removeStr = \"]}];@NgModule({imports: [RouterModule.forChild(routes)],exports: [RouterModule]})export class AdminRoutingModule{}\";\r\n" + +// " String currentLine;\r\n" + +// " System.out.println(adminRoutingModule.getName());\r\n" + +// " while ((currentLine = reader.readLine()) != null) {\r\n" + +// " String trimmedLine = currentLine.trim();\r\n" + +// " if (trimmedLine.equals(removeStr)) {\r\n" + +// " currentLine = \"\";\r\n" + +// " }\r\n" + +// " writer.write(currentLine + System.getProperty(\"line.separator\"));\r\n" + +// "\r\n" + +// " }\r\n" + +// " writer.close();\r\n" + +// " reader.close();\r\n" + +// " boolean delete = adminRoutingModule.delete();\r\n" + +// " boolean b22 = tempRoutingModule.renameTo(adminRoutingModule);\r\n" + +// "\r\n" + +// " StringBuilder admin_routing_module_string = new StringBuilder();\r\n" + +// " admin_routing_module_string.append(\" \");\r\n" + +// " String adminRoutingModuleName = projectPath+\"/Projects/\"+project_name+ \"/webui/src/app/app-routing.module.ts\";\r\n" + +// "\r\n" + +// " fw = new FileWriter(adminRoutingModuleName, true);\r\n" + +// " fw.write(admin_routing_module_string.toString());\r\n" + +// " fw.close();\r\n" + +// "\r\n" +// +// ); +// +// // MODULE CREATE CODE +// childMasterBuilderCode.append(" } catch (FileNotFoundException e) {\r\n" +// + " e.printStackTrace();\r\n" +// + " ErrorPojo errorPojo = new ErrorPojo();\r\n" +// + " Error error = new Error();\r\n" +// + " error.setTitle(Constant.FORM_BUILDER_API_TITLE);\r\n" +// + " error.setMessage(Constant.FORM_BUILD_FAILURE);\r\n" +// + " errorPojo.setError(error);\r\n" +// + " return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED);\r\n" +// + " }\r\n" +// + " SuccessPojo successPojo = new SuccessPojo();\r\n" +// + " Success success = new Success();\r\n" +// + " success.setTitle(Constant.FORM_BUILDER_API_TITLE);\r\n" +// + " success.setMessage(Constant.FORM_BUILD_SUCCESS);\r\n" +// + " successPojo.setSuccess(success);\r\n" +// + " return new ResponseEntity(successPojo, HttpStatus.OK);\r\n" +// + "\r\n" +// +"\n}" +// +"}"); +// +// // System.out.println(masterBuilderCode.toString()); +// +// FileWriter fw = null; +// BufferedWriter bw = null; +// try { +// // FILE NAME SHOULD CHANGE DEPENDS ON TECH_STACK/OBJECT_tYPE/SUB_OBJECT_TYPE +// File masterBuilderFile = new File( +// projectPath + "/src/main/java/com/realnet/builders/" + childMasterBuilderName + ".java"); +// if (!masterBuilderFile.exists()) { +// masterBuilderFile.createNewFile(); +// } +// fw = new FileWriter(masterBuilderFile.getAbsoluteFile()); +// bw = new BufferedWriter(fw); +// bw.write(childMasterBuilderCode.toString()); +// bw.close(); +// } catch (FileNotFoundException e) { +// e.printStackTrace(); +// ErrorPojo errorPojo = new ErrorPojo(); +// Error error = new Error(); +// error.setTitle(Constant.MASTER_BUILDER_API_TITLE); +// error.setMessage(Constant.MASTER_BUILDER_FAILURE); +// errorPojo.setError(error); +// return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); +// } +// +// SuccessPojo successPojo = new SuccessPojo(); +// Success success = new Success(); +// success.setTitle(Constant.MASTER_BUILDER_API_TITLE); +// success.setMessage(Constant.MASTER_BUILDER_SUCCESS); +// successPojo.setSuccess(success); +// return new ResponseEntity(successPojo, HttpStatus.CREATED); +// } +//} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/controller/CodeExtractorController.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/controller/CodeExtractorController.java new file mode 100644 index 0000000..69f2f4e --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/controller/CodeExtractorController.java @@ -0,0 +1,778 @@ +package com.realnet.codeextractor.controller; + +import java.io.BufferedOutputStream; +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.StandardCopyOption; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.validation.Valid; + +import org.apache.commons.io.FilenameUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import org.springframework.data.domain.Sort; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.util.StringUtils; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.servlet.support.ServletUriComponentsBuilder; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.realnet.codeextractor.entity.FileDetails; +import com.realnet.codeextractor.entity.FileListDto; +import com.realnet.codeextractor.entity.Rn_Bcf_Extractor; +import com.realnet.codeextractor.entity.Rn_Bcf_Extractor_Params; +import com.realnet.codeextractor.response.CodeExtractorParamsResponse; +import com.realnet.codeextractor.response.CodeExtractorResponse; +import com.realnet.codeextractor.service.Rn_Bcf_Extractor_Params_Service; +import com.realnet.codeextractor.service.Rn_Bcf_Extractor_Service; +import com.realnet.fnd.entity.Error; +import com.realnet.fnd.entity.ErrorPojo; +import com.realnet.fnd.entity.Success; +import com.realnet.fnd.entity.SuccessPojo; +import com.realnet.fnd.service.FileStorageService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.realnet.utils.Constant; +import com.realnet.utils.RealNetUtils; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import net.lingala.zip4j.ZipFile; +import net.lingala.zip4j.exception.ZipException; + +@Slf4j +@JsonAutoDetect(fieldVisibility = Visibility.ANY) +@RestController +@RequestMapping(value = "/api", produces = MediaType.APPLICATION_JSON_VALUE) +@Api(tags = { "Code Extractor" }) +public class CodeExtractorController { + + @Autowired + private AppUserServiceImpl userService; + + @Autowired + private FileStorageService fileStorageService; + + @Autowired + private Rn_Bcf_Extractor_Service extractorService; + + @Autowired + private Rn_Bcf_Extractor_Params_Service extractorParamsService; + + @Value("${projectPath}") + private String projectPath; + + // GET ALL SORTED AND PAGINATED DATA + @ApiOperation(value = "List of of Bcf Extractor", response = Rn_Bcf_Extractor.class) + @GetMapping("/bcf-extractor") + public CodeExtractorResponse getExtractors( + @RequestParam(value = "page", defaultValue = "0", required = false) Integer page, + @RequestParam(value = "size", defaultValue = "20", required = false) Integer size) { + // sorted data + Pageable paging = PageRequest.of(page, size, Sort.by("createdAt").descending()); + Page result = extractorService.getAll(paging); + + CodeExtractorResponse resp = new CodeExtractorResponse(); + resp.setPageStats(result, true); + resp.setItems(result.getContent()); +// //Map> extractorMap = Collections.singletonMap("extractior", result.getContent()); +// return new ResponseEntity>>(extractorMap, HttpStatus.OK); + return resp; + + } + +// // GET ALL +// @ApiOperation(value = "List of Bcf Extractor") +// @GetMapping("/bcf-extractor") +// public ResponseEntity getExtractors() { +// List result = extractorService.getAll(); +// Map> extractorMap = Collections.singletonMap("extractior", result); +// System.out.println(extractorMap); +// return ResponseEntity.ok().body(result); +// } + + // GET BY ID + @ApiOperation(value = "Get an Bcf Extractor", response = Rn_Bcf_Extractor.class) + @GetMapping("/bcf-extractor/{id}") + public ResponseEntity getExtractorById(@PathVariable(value = "id") int id) { + Rn_Bcf_Extractor bcf_extractor = extractorService.getById(id); + + // Map extractorMap = + // Collections.singletonMap("extractior", bcf_extractor); + // return new ResponseEntity>(extractorMap, + // HttpStatus.OK); + // return ResponseEntity.ok().body(bcf_extractor); + return new ResponseEntity(bcf_extractor, HttpStatus.OK); + + } + + // ========= SAVE AND UNZIP FILE AND MOVE TO A SPECIFIC PATH ======== + @ApiOperation(value = "Add new Bcf Extractor") + @PostMapping(value = "/bcf-extractor") + public ResponseEntity saveExtractor(// @Valid @RequestBody Rn_Bcf_Extractor bcf_extractor, + @RequestParam(value = "bcf_extractor", required = true) String extractorReq, + @RequestParam(value = "file", required = true) MultipartFile file) + throws IOException, JsonParseException, JsonMappingException { + + System.out.println("extractorReq = " + extractorReq); + System.out.println("file = " + file.getOriginalFilename()); + + log.debug("extractorReq => {} ", extractorReq); + log.debug("file => {} ", file.getOriginalFilename()); + ObjectMapper mapper = new ObjectMapper(); + Rn_Bcf_Extractor bcf_extractor = mapper.readValue(extractorReq, Rn_Bcf_Extractor.class); + log.debug("bcf_extractor => {}", bcf_extractor); + AppUser loggedInUser = userService.getLoggedInUser(); + bcf_extractor.setAccountId(loggedInUser.getAccount().getAccount_id()); + bcf_extractor.setCreatedBy(loggedInUser.getUserId()); + + String techStackKey = RealNetUtils.getTechnologyStackKey(bcf_extractor.getTech_stack()); + System.out.println("TECHNOLOGY STACK KEY = " + techStackKey); + bcf_extractor.setTech_stack_key(techStackKey); + + // upload to directory + String uploadPath = projectPath.concat("/src/main/resources/zip-uploads/"); + fileStorageService.uploadFile(file, uploadPath); + + String fileName = file.getOriginalFilename(); + System.out.println( + "UPLOAD PATH = " + uploadPath + "\nFILE NAME = " + fileName + "\nFile Size = " + file.getSize()); + + // SAVE ZIP FILE NAME INTO DATABASE + bcf_extractor.setSample_file_name(fileName); + extractorService.save(bcf_extractor); + + // ZIP TO UNZIP + String zipFilePath = uploadPath + fileName; + String fileNameWithOutExt = FilenameUtils.removeExtension(fileName); + Date d = new Date(); + String destFolderName = fileNameWithOutExt + "_" + d.getTime(); + String destPath = projectPath.concat("/src/main/resources/extracted-files/" + destFolderName); + System.out.println("ZIP FILE PATH = " + zipFilePath + "\nDESTINATION PATH = " + destPath); + try { + ZipFile zipFile = new ZipFile(zipFilePath); + /* + * // Get the list of file headers from the zip file List fileHeaderList = + * zipFile.getFileHeaders(); // Loop through the file headers for (int i = 0; i< + * fileHeaderList.size(); i++) { FileHeader fileHeader = (FileHeader) + * fileHeaderList.get(i); String name = fileHeader.getFileName(); + * if(name.contains(".html") || name.contains(".css") || name.contains(".java") + * || name.contains(".jsp") || name.contains(".ts") ) { + * zipFile.extractFile(fileHeader, destPath); } } + */ + zipFile.extractAll(destPath); + } catch (ZipException e) { + e.printStackTrace(); + } + + int headerId = bcf_extractor.getId(); + System.out.println("Code Extractor Parameter Header Id = " + headerId); + String tech_stack = bcf_extractor.getTech_stack(); + String obj_type = bcf_extractor.getObject_type(); + String sub_obj_type = bcf_extractor.getSub_object_type(); + + // MOVE FILES TO PARENT DIRECTORY & DELETE EMPTY FILES & SAVE PATHS INTO PARAMS + // TABLE + extractorService.saveListOFiles(headerId, tech_stack, obj_type, sub_obj_type, destPath); + + // SAVE MOVED PATHS INTO DB + extractorService.moveFiles(headerId, destPath); + + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.EXTRACTOR_API_TITLE); + success.setMessage(Constant.EXTRACTOR_CREATED_SUCCESSFULLY); + successPojo.setSuccess(success); + log.debug("Response {} ", successPojo); + return new ResponseEntity(successPojo, HttpStatus.CREATED); +// Map response = new HashMap<>(); +// response.put("SUCCESS", Boolean.TRUE); +// return ResponseEntity.status(HttpStatus.CREATED).body(response); + } + + // UPDATE bcf extractor + @ApiOperation(value = "Update an Extension", response = Rn_Bcf_Extractor.class) + @PutMapping("/bcf-extractor/{id}") + public ResponseEntity updateExtractor( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, + @PathVariable(value = "id") int id, @Valid @RequestBody Rn_Bcf_Extractor bcf_extractor) { + AppUser loggedInUser = userService.getLoggedInUser(); + bcf_extractor.setUpdatedBy(loggedInUser.getUserId()); + + Rn_Bcf_Extractor updatedExtractor = extractorService.updateById(id, bcf_extractor); + + if (bcf_extractor.getId() != updatedExtractor.getId()) { + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.EXTRACTOR_API_TITLE); + error.setMessage(Constant.EXTRACTOR_NOT_DELETED); + errorPojo.setError(error); + // return ResponseEntity.status(HttpStatus.NOT_FOUND).body(response); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.EXTRACTOR_API_TITLE); + success.setMessage(Constant.EXTRACTOR_UPDATED_SUCCESSFULLY); + successPojo.setSuccess(success); + return new ResponseEntity(successPojo, HttpStatus.OK); + + // return ResponseEntity.status(HttpStatus.ACCEPTED).body(updatedRn_Ext_Field); + } + + // DELETE bcf extractor + @DeleteMapping("/bcf-extractor/{id}") + public ResponseEntity deleteExtractor(@PathVariable(value = "id") int id) { + boolean deleted = extractorService.deleteById(id); + // Map response = new HashMap<>(); + if (deleted) { + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.EXTRACTOR_API_TITLE); + success.setMessage(Constant.EXTRACTOR_DELETED_SUCCESSFULLY); + successPojo.setSuccess(success); + return new ResponseEntity(successPojo, HttpStatus.OK); + // response.put("deleted", Boolean.TRUE); + // return ResponseEntity.status(HttpStatus.OK).body(response); + } + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.EXTRACTOR_API_TITLE); + error.setMessage(Constant.EXTRACTOR_NOT_DELETED); + errorPojo.setError(error); + // return ResponseEntity.status(HttpStatus.NOT_FOUND).body(response); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + + // =============== BCF CODE EXTRACTOR PARAMS ================ + + // GET ALL SORTED AND PAGINATED DATA BY HEADER ID + @ApiOperation(value = "List of of Bcf Extractor Parameters", response = Rn_Bcf_Extractor.class) + @GetMapping("/bcf-extractor-params") + public CodeExtractorParamsResponse codeExtractorParameters( + @RequestParam(value = "header_id", required = true) Integer headerId, // use param id to get data + @RequestParam(value = "page", defaultValue = "0", required = false) Integer page, + @RequestParam(value = "size", defaultValue = "20", required = false) Integer size) { + // sorted data + // Pageable paging = PageRequest.of(page, size, + // Sort.by("createdAt").descending()); + List result = extractorParamsService.getByHeaderIdOrderByDate(headerId); + // log.debug("extractor params sorted data : {}", result.toString()); + CodeExtractorParamsResponse resp = new CodeExtractorParamsResponse(); + // resp.setPageStats(result, true); + resp.setItems(result); + return resp; +// Map> extractorMap = Collections.singletonMap("extractorParams", result); +// return new ResponseEntity>>(extractorMap, HttpStatus.OK); + } + + // GET BY ID + @ApiOperation(value = "Get an Bcf Extractor Parameter", response = Rn_Bcf_Extractor_Params.class) + @GetMapping("/bcf-extractor-params/{id}") + public ResponseEntity codeExtractorParamsById(@PathVariable(value = "id") int id) { + Rn_Bcf_Extractor_Params bcf_extractor_params = extractorParamsService.getById(id); + + // Map extractorMap = + // Collections.singletonMap("extractorParams",bcf_extractor_params); + // return new ResponseEntity>(extractorMap, + // HttpStatus.OK); + return new ResponseEntity(bcf_extractor_params, HttpStatus.OK); + + } + + @ApiOperation(value = "Add new Extractor Parameter", response = Rn_Bcf_Extractor_Params.class) + @PostMapping(value = "/bcf-extractor-params") // use param id to update data + public ResponseEntity addNewExtractorParam(@RequestParam(value = "header_id", required = true) Integer headerId, + @Valid @RequestBody Rn_Bcf_Extractor_Params bcf_extractor_param) { + Rn_Bcf_Extractor extractor = extractorService.getById(headerId); + bcf_extractor_param.setRn_bcf_extractor(extractor); // set header id + Rn_Bcf_Extractor_Params savedParam = extractorParamsService.save(bcf_extractor_param); + if (savedParam == null) { + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.EXTRACTOR_API_TITLE); + error.setMessage(Constant.EXTRACTOR_NOT_CREATED); + errorPojo.setError(error); + // return ResponseEntity.status(HttpStatus.NOT_FOUND).body(response); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.EXTRACTOR_API_TITLE); + success.setMessage(Constant.EXTRACTOR_CREATED_SUCCESSFULLY); + successPojo.setSuccess(success); + return new ResponseEntity(successPojo, HttpStatus.OK); + } + + // UPDATE bcf extractor param + @ApiOperation(value = "Update an Extension Parameter", response = Rn_Bcf_Extractor_Params.class) + @PutMapping("/bcf-extractor-params/{id}") + public ResponseEntity updatecodeExtractorParam( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, + @RequestParam(value = "header_id", required = false) Integer headerId, @PathVariable(value = "id") int id, + @Valid @RequestBody Rn_Bcf_Extractor_Params bcf_extractor_param) { + AppUser loggedInUser = userService.getLoggedInUser(); + bcf_extractor_param.setUpdatedBy(loggedInUser.getUserId()); + + Rn_Bcf_Extractor_Params updatedExtractorParam = extractorParamsService.updateById(id, bcf_extractor_param); + + if (bcf_extractor_param.getId() != updatedExtractorParam.getId()) { + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.EXTRACTOR_API_TITLE); + error.setMessage(Constant.EXTRACTOR_NOT_UPDATED); + errorPojo.setError(error); + // return ResponseEntity.status(HttpStatus.NOT_FOUND).body(response); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.EXTRACTOR_API_TITLE); + success.setMessage(Constant.EXTRACTOR_UPDATED_SUCCESSFULLY); + successPojo.setSuccess(success); + // return ResponseEntity.status(HttpStatus.ACCEPTED).body(updatedRn_Ext_Field); + return new ResponseEntity(successPojo, HttpStatus.OK); + } + + // ========= TOGGLE BUTTON SERVICE FOR EXTRACTION AND CREATION ENABLE DISABLE + // BUTTON // + + // EXTRACTION STATUS CHANGE + @GetMapping(value = "/bcf-extractor-params/extraction-status-change") + public ResponseEntity extractionStatusChange(@RequestParam(value = "id") int id) throws IOException { + AppUser loggedInUser = userService.getLoggedInUser(); + Rn_Bcf_Extractor_Params param = extractorParamsService.getById(id); + log.debug("Extractor Param : {} ", param); + param.setIs_extraction_enabled(!param.isIs_extraction_enabled()); + param.setUpdatedBy(loggedInUser.getUserId()); + + Rn_Bcf_Extractor_Params updatedParam = extractorParamsService.save(param); + log.debug("UPDATED Extractor Param : {} ", updatedParam); + if (param.getId() != updatedParam.getId()) { + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.EXTRACTOR_API_TITLE); + error.setMessage(Constant.EXTRACTOR_NOT_UPDATED); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.EXTRACTOR_API_TITLE); + success.setMessage(Constant.EXTRACTOR_UPDATED_SUCCESSFULLY); + successPojo.setSuccess(success); + return new ResponseEntity(successPojo, HttpStatus.OK); + } + + // CREATION STATUS CHANGE + @GetMapping(value = "/bcf-extractor-params/creation-status-change") + public ResponseEntity creationStatusChange(@RequestParam(value = "id") int id) throws IOException { + AppUser loggedInUser = userService.getLoggedInUser(); + + Rn_Bcf_Extractor_Params param = extractorParamsService.getById(id); + log.debug("Extractor Param : {} ", param); + param.setIs_creation_enabled(!param.isIs_creation_enabled()); + + param.setUpdatedBy(loggedInUser.getUserId()); + Rn_Bcf_Extractor_Params updatedParam = extractorParamsService.save(param); + log.debug("UPDATED Extractor Param : {} ", updatedParam); + if (param.getId() != updatedParam.getId()) { + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.EXTRACTOR_API_TITLE); + error.setMessage(Constant.EXTRACTOR_NOT_UPDATED); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.EXTRACTOR_API_TITLE); + success.setMessage(Constant.EXTRACTOR_UPDATED_SUCCESSFULLY); + successPojo.setSuccess(success); + return new ResponseEntity(successPojo, HttpStatus.OK); + } + + // ========== FILE CODE EDITOR PART ============// + + /* + * File list(from code extractor params table) for dropDown in file editor + */ + @ApiOperation(value = "Get Extracted File List", response = FileDetails.class) + @GetMapping("/bcf-extractor-file-list/{id}") + public ResponseEntity getFileListBy(@PathVariable(value = "id") int headerId) { + + List params = extractorParamsService.getByHeaderId(headerId); + ArrayList response = new ArrayList<>(); + for (Rn_Bcf_Extractor_Params param : params) { + int id = param.getId(); + String fileName = param.getName_string(); + FileListDto fileList = new FileListDto(); + fileList.setId(id); + fileList.setFileName(fileName); + response.add(fileList); + } + + if (response.isEmpty()) { + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.FILE_LIST_API_TITLE); + error.setMessage(Constant.FILE_LIST_IS_EMPTY); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } else { + return new ResponseEntity>(response, HttpStatus.OK); + } + } + + // =====read files and get file contents =========// + @ApiOperation(value = "Get an Bcf Extractor Parameter", response = FileDetails.class) + @GetMapping("/file-code-read/{id}") + public ResponseEntity readFilesById(@PathVariable(value = "id") int id) { + Rn_Bcf_Extractor_Params params = extractorParamsService.getById(id); + String address_string = params.getAddress_string(); // uploaded path + String moved_address_string = params.getMoved_address_string(); // in a same folder + // String reference_address_string = params.getReference_address_string(); + + String filePath = moved_address_string.replace(projectPath, ""); + filePath = projectPath.concat(filePath); + StringBuilder code = new StringBuilder(); + File file = null; + try { + file = new File(filePath); + String fileName = file.getName(); + // String fileType = FilenameUtils.getExtension(fileName); + log.info("File Name : {}", fileName); + // log.info("File Type : {} ", fileType); + // BufferedReader br = new BufferedReader(new FileReader(file)); + // String fileString = FileUtils.readFileToString(file, StandardCharsets.UTF_8); + + FileReader fr = new FileReader(file); + BufferedReader br = new BufferedReader(fr); + String line; + while ((line = br.readLine()) != null) { + code.append(line + "\n"); + } + fr.close(); + br.close(); + } catch (IOException e) { + log.debug("IO Exception Handled..."); + log.error(e.getMessage()); + e.getMessage(); + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.FILE_OPERATION_API_TITLE); + error.setMessage(Constant.FILE_NOT_FOUND_EXCEPTION); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + + FileDetails fileDetails = new FileDetails(); + fileDetails.setId(id); + fileDetails.setText(code.toString()); + + return new ResponseEntity(fileDetails, HttpStatus.OK); + } + + // ============= code editor (save data into file) ========= + @ApiOperation(value = "Save File Data") + @PostMapping(value = "/file-code-save") + public ResponseEntity codeSaveInFile(@Valid @RequestBody FileDetails fileDetails) { + + int paramsId = fileDetails.getId(); + String code = fileDetails.getText(); + log.debug("updated code : {}", code); + + Rn_Bcf_Extractor_Params params = extractorParamsService.getById(paramsId); + // String address_string = params.getAddress_string(); + String moved_address_string = params.getMoved_address_string(); + // String reference_address_string = params.getReference_address_string(); + + // projectPath + // String filePath = projectPath.concat(reference_address_string); + + String filePath = moved_address_string.replace(projectPath, ""); + filePath = projectPath.concat(filePath); + + File file = null; + try { + file = new File(filePath); + String fileName = file.getName(); + String fileType = FilenameUtils.getExtension(fileName); + log.info("File Name : {}", fileName); + log.info("File Type : {} ", fileType); +// if(fileType.equalsIgnoreCase("java") || fileType.equalsIgnoreCase("ts")|| fileType.equalsIgnoreCase("txt")) { +// code = Jsoup.parse(code).text(); +// } + BufferedWriter bw = new BufferedWriter(new FileWriter(file, false)); // OVER WRITE FILE + bw.write(code); + bw.close(); + } catch (FileNotFoundException e) { + log.debug("File Not Found Exception Handled..."); + log.error(e.getMessage()); + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.FILE_OPERATION_API_TITLE); + error.setMessage(Constant.FILE_NOT_FOUND_EXCEPTION); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } catch (IOException e) { + log.error(e.getMessage()); + log.debug("IOException Handled..."); + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.FILE_OPERATION_API_TITLE); + error.setMessage(Constant.FILE_CODE_SAVE_FAILURE); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.FILE_OPERATION_API_TITLE); + success.setMessage(Constant.FILE_CODE_SAVE_SUCCESSFULLY); + successPojo.setSuccess(success); + return new ResponseEntity(successPojo, HttpStatus.OK); + } + + // ======= STATIC CODE READ ========= + @ApiOperation(value = "Read Static File and Return Code", response = FileDetails.class) + @GetMapping("/static-file-code-read/{id}") + public ResponseEntity readStaticFilesById(@PathVariable(value = "id") int id) { + Rn_Bcf_Extractor_Params param = extractorParamsService.getById(id); + String name_string = param.getName_string(); + + + String moved_address_string = param.getMoved_address_string(); // in a same folder + + + String staticFileName = "SE_".concat(name_string); + String staticPath = moved_address_string.replace(projectPath, ""); + staticPath = staticPath.substring(0, staticPath.lastIndexOf("/")); + staticPath = staticPath.concat("/static_code/"); // static code folder + staticPath = staticPath.concat(staticFileName); // static filde name + + // projectPath + String filePath = projectPath.concat(staticPath); + +// String filePath = staticPath; //by gk + + StringBuilder code = new StringBuilder(); + File file = null; + try { + file = new File(filePath); + String fileName = file.getName(); + // String fileType = FilenameUtils.getExtension(fileName); + log.info("Static File Name : {}", fileName); + // BufferedReader br = new BufferedReader(new FileReader(file)); + // String fileString = FileUtils.readFileToString(file, StandardCharsets.UTF_8); + + FileReader fr = new FileReader(file); + BufferedReader br = new BufferedReader(fr); + String line; + while ((line = br.readLine()) != null) { + code.append(line + "\n"); + } + fr.close(); + br.close(); + } catch (IOException e) { + log.debug("IO Exception Handled..."); + log.error(e.getMessage()); + e.getMessage(); + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.FILE_OPERATION_API_TITLE); + error.setMessage(Constant.FILE_NOT_FOUND_EXCEPTION); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + + String codee = code.substring(0, code.lastIndexOf("\n")); // remove last line break + FileDetails fileDetails = new FileDetails(); + fileDetails.setId(id); + fileDetails.setText(codee); + return new ResponseEntity(fileDetails, HttpStatus.OK); + } + + // ======= STATIC CODE SAVE INTO FILE ========= + @ApiOperation(value = "Save File Data") + @PostMapping(value = "/static-file-code-save") + public ResponseEntity staticCodeSaveInFile(@Valid @RequestBody FileDetails fileDetails) { + + int paramsId = fileDetails.getId(); + String code = fileDetails.getText(); + // log.debug("updated code : {}", code); + + Rn_Bcf_Extractor_Params param = extractorParamsService.getById(paramsId); + // String address_string = param.getAddress_string(); + String name_string = param.getName_string(); + String moved_address_string = param.getMoved_address_string(); // in a same folder + + String staticFileName = "SE_".concat(name_string); + String staticPath = moved_address_string.replace(projectPath, ""); + staticPath = staticPath.substring(0, staticPath.lastIndexOf("/")); + staticPath = staticPath.concat("/static_code/"); // static code folder + staticPath = staticPath.concat(staticFileName); // static file name + + // projectPath + String filePath = projectPath.concat(staticPath); + + File file = null; + try { + file = new File(filePath); + String fileName = file.getName(); + log.info("Static File Name : {}", fileName); + + BufferedWriter bw = new BufferedWriter(new FileWriter(file, false)); // OVER WRITE FILE + bw.write(code); + bw.close(); + } catch (FileNotFoundException e) { + log.debug("File Not Found Exception Handled..."); + e.printStackTrace(); + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.FILE_OPERATION_API_TITLE); + error.setMessage(Constant.FILE_NOT_FOUND_EXCEPTION); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } catch (IOException e) { + e.printStackTrace(); + log.debug("IOException Handled..."); + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.FILE_OPERATION_API_TITLE); + error.setMessage(Constant.FILE_CODE_SAVE_FAILURE); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.FILE_OPERATION_API_TITLE); + success.setMessage(Constant.FILE_CODE_SAVE_SUCCESSFULLY); + successPojo.setSuccess(success); + return new ResponseEntity(successPojo, HttpStatus.OK); + } + + // @PostMapping("/upload") + @PostMapping(value = "/upload-file", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) + public ResponseEntity uploadToLocalFileSystem(@RequestParam("file") MultipartFile file) { + + System.out.println("calling upload controller"); + String fileName = StringUtils.cleanPath(file.getOriginalFilename()); + Path path = Paths.get(projectPath + fileName); + try { + Files.copy(file.getInputStream(), path, StandardCopyOption.REPLACE_EXISTING); + } catch (IOException e) { + e.printStackTrace(); + } + String fileDownloadUri = ServletUriComponentsBuilder.fromCurrentContextPath().path("/files/download/") + .path(fileName).toUriString(); + return ResponseEntity.ok(fileDownloadUri); + } + + @RequestMapping(value = "/redirect", produces = { MediaType.APPLICATION_JSON_VALUE }, method = RequestMethod.POST) + public ResponseEntity registerBatchUser(@RequestParam("file") MultipartFile file) { + if (!file.isEmpty()) { + try { + byte[] bytes = file.getBytes(); + BufferedOutputStream stream = new BufferedOutputStream(new FileOutputStream(new File(projectPath))); + stream.write(bytes); + stream.close(); + + } catch (Exception e) { + Map FeedBackStatus = new HashMap(); + return ResponseEntity.ok(FeedBackStatus); + } + + } + return ResponseEntity.ok(null); + } + + @PostMapping(value = "/uploadFile", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) + public String uploadFile(@RequestParam("file") MultipartFile file) throws IOException { + String fileName = file.getOriginalFilename(); + return fileName; + } + + @RequestMapping(value = "/upload-file-2", method = RequestMethod.POST) + public @ResponseBody ResponseEntity> handleFileUpload( + @RequestParam("file") MultipartFile file) { + String name = file.getName(); + System.out.println(name); + + Map FeedBackStatus = new HashMap(); + FeedBackStatus.put("status", "success"); + + return ResponseEntity.ok(FeedBackStatus); + + } + + /* + * @PostMapping(value = "/uploadFile", consumes = + * MediaType.MULTIPART_FORM_DATA_VALUE) public String + * uploadFile2(@RequestParam("file") MultipartFile file)throws IOException { + * Path tempFile = Files.createTempFile(null, null); + * + * Files.write(tempFile, MultipartFile.getBytes()); File fileToSend = + * tempFile.toFile(); + * + * MultiValueMap parameters = new LinkedMultiValueMap<>(); + * + * parameters.add("file", new FileSystemResource(fileToSend)); + * + * HttpHeaders headers = new HttpHeaders(); headers.set("Content-Type", + * "multipart/form-data"); + * + * HttpEntity httpEntity = new HttpEntity<>(parameters, headers); + * + * try { restTemplate.exchange(apiUrl, HttpMethod.POST, httpEntity, + * MyClazz.class); } finally { fileAEnviar.delete(); } + * + * } + */ + + @PostMapping("/upload-gb") + public ResponseEntity uploadFileGb(@RequestParam("file") MultipartFile file) { + return ResponseEntity.ok("working"); + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/controller/DynamicCodeExtractionController.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/controller/DynamicCodeExtractionController.java new file mode 100644 index 0000000..e5f7dce --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/controller/DynamicCodeExtractionController.java @@ -0,0 +1,352 @@ +package com.realnet.codeextractor.controller; + +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileWriter; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; + +import org.apache.commons.io.FileUtils; +import org.apache.commons.io.FilenameUtils; +import org.hibernate.boot.model.source.spi.CascadeStyleSource; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.servlet.ModelAndView; + +import com.realnet.codeextractor.entity.Rn_Bcf_Exception_Rules; +import com.realnet.codeextractor.entity.Rn_Bcf_Extractor; +import com.realnet.codeextractor.entity.Rn_Bcf_Extractor_Params; +import com.realnet.codeextractor.entity.Rn_Bcf_Rules; +import com.realnet.codeextractor.service.Rn_Bcf_Exception_Rule_Library_Service; +import com.realnet.codeextractor.service.Rn_Bcf_Extractor_Params_Service; +import com.realnet.codeextractor.service.Rn_Bcf_Extractor_Service; +import com.realnet.codeextractor.service.Rn_Bcf_Rule_Library_Service; +import com.realnet.fnd.entity.Error; +import com.realnet.fnd.entity.ErrorPojo; +import com.realnet.fnd.entity.Success; +import com.realnet.fnd.entity.SuccessPojo; +import com.realnet.logging.LogExecutionTime; +import com.realnet.utils.Constant; +import com.realnet.utils.RealNetUtils; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@RestController +@RequestMapping(value = "/api", produces = MediaType.APPLICATION_JSON_VALUE) +@Api(tags = { "Code Extractor" }) +public class DynamicCodeExtractionController { + @Value("${projectPath}") + private String projectPath; + + @Autowired + private Rn_Bcf_Extractor_Service rn_bcf_extractor_service; + + @Autowired + private Rn_Bcf_Extractor_Params_Service rn_bcf_extractor_params_service; + + @Autowired + private Rn_Bcf_Rule_Library_Service bcfRuleLibraryService; + +// @Autowired +// private RealNetUtils utils; + + @Autowired + Rn_Bcf_Exception_Rule_Library_Service rn_bcf_rule_exception_library_service; + + @LogExecutionTime + @ApiOperation(value = "Dynamic Code Extraction") + @GetMapping(value = "/dynamic_code_extraction") + public ResponseEntity dynamicCodeExtraction(@RequestParam(value = "header_id") Integer headerId) + throws IOException + { + + Rn_Bcf_Extractor extractor = rn_bcf_extractor_service.getById(headerId); + String technology_stack = extractor.getTech_stack(); + String object_type = extractor.getObject_type(); + String sub_object_type = extractor.getSub_object_type(); + + System.out.println("FROM Rn_Bcf_Extractor = " + technology_stack + " || " + object_type + " || " + sub_object_type+"||"+headerId); + + // PARAMS + List params = extractor.getRn_bcf_extractor_Params(); +// +// // FILE NAME VARIABLE NAMES IN BUILDER CODE +// Map map = new HashMap(); +// map.put("controller_name_first_upper", "Nil_final_controller"); +// map.put("table_name_first_upper", "Rn_nil_final"); +// map.put("table_name_lower", "rn_nil_final"); +// map.put("table_name_upper", "RN_NIL_FINAL"); +// map.put("service_name_first_upper", "Nil_final_service"); +// map.put("service_name_lower", "nil_final_service"); +// map.put("service_impl_name_first_upper", "Nil_final_serviceimpl"); +// map.put("repository_name_first_upper", "Rn_header_test1_repository"); +// map.put("repository_name_lower", "rn_header_test1_repository"); +// map.put("ng_add_form_component_name", "AddRn_header_test1Component"); +// map.put("ng_all_grid_view_component_name", "AllRn_header_test1Component"); +// map.put("ng_read_only_component_name", "Rn_header_test1DetailsComponent"); +// map.put("ng_edit_component_name", "EditRn_header_test1Component"); +// map.put("ng_extension_add_component_name", "AddExtRn_header_test1Component"); +// map.put("ng_routing_module_ts_name", "Rn_header_test1RoutingModule"); +// map.put("ng_component_ts_name", "Rn_header_test1Component"); +// map.put("ng_module_ts_name", "Rn_header_test1Module"); +// map.put("ng_service_ts_name", "Rn_header_test1Service"); +// map.put("ng_model_ts_name ", "Rn_header_test1_t"); + + // STATIC FILES ( SE_FILE_NAME.EXT) + ArrayList staticFiles = new ArrayList(); + + + + try { + + // PARAMETERS TABLE VALUE + for (Rn_Bcf_Extractor_Params param : params) + { +// System.out.println("---Exception rule for loop--"); + boolean is_extraction_enabled = param.isIs_extraction_enabled(); + boolean is_creation_enabled = param.isIs_creation_enabled(); + String path = param.getMoved_address_string(); + + + File file = new File(path); + String parentPath = file.getParent(); + + String name = file.getName(); + String ConvertedFileName = "SE_" + name; + + // STATIC FILES DIRECTORY + String staticFileParentDir = parentPath + File.separator + "static_code"; + File staticFile = new File(staticFileParentDir + File.separator + ConvertedFileName); + + // STATIC FILE PATH + String staticFileDir = staticFile.getAbsolutePath().replace("\\", "/"); + // ADD STATIC FILE PATH TO ARRAYLIST + if (is_extraction_enabled && is_creation_enabled) { + // System.out.println("STATIC FILE DIR ADDED TO ARRAYLIST = " + staticFileDir); + staticFiles.add(staticFileDir); + + } + } + + // package part MODULE_NAME ADD + + + for (String staticDir : staticFiles) + { + + File file = new File(staticDir); + Path path = Paths.get(staticDir); + StringBuilder code = new StringBuilder(); + List lines = Files.readAllLines(path, StandardCharsets.UTF_8); + + + for (String line : lines) + { + + if (line.startsWith("\"package")) + { + int i = line.lastIndexOf("."); + String head = line.substring(0, i + 1); + String tail = line.substring(i); + String moduleName = "\" + module_name + \""; + line = head + moduleName + tail; + } + code.append(line + "\n"); + + } + + //System.out.println(code); + BufferedWriter br = new BufferedWriter(new FileWriter(file)); // replaced string + br.write(code.toString()); + br.close(); + + } + + + + int count=0; + for (String staticDir : staticFiles) + { + File file1 = new File(staticDir); + Path path1 = Paths.get(staticDir); + StringBuilder code = new StringBuilder(); + StringBuilder code2 = new StringBuilder(); + List lines = Files.readAllLines(path1, StandardCharsets.UTF_8); + for (String line : lines) + { + if (line.startsWith("\"public class")) + { +// + String file_name_var=params.get(count).getFile_name_var(); + +// System.out.println("file namevar "+file_name_var); + + + line = "\"public class \" + "+file_name_var+""+1+" + \"{\"+"; + } + + + + if (line.startsWith("\"public interface")) + { +// + String file_name_var=params.get(count).getFile_name_var(); + +// System.out.println("file namevar "+file_name_var); + + + line = "\"public interface \" + "+file_name_var+""+1+" + \"{\"+"; + } + + + if (line.startsWith("\" templateUrl")) + { +// " templateUrl: './readonly.component.html'," + "\r\n" + + String file_name_var=params.get(count).getFile_name_var(); + +// System.out.println("file namevar "+file_name_var); + + + line = " \" templateUrl: './\"+"+file_name_var+""+1+"+\".html',\"" + "\r\n \n" +"+" ; + } + + if (line.startsWith("\" styleUrls")) + { +// " styleUrls: ['./readonly.component.scss']" + "\r\n" + + String file_name_var=params.get(count).getFile_name_var(); + +// System.out.println("file namevar "+file_name_var); + + + line = " \" styleUrls: ['./\"+"+file_name_var+""+1+"+\".scss']\"" + "\r\n \n"+"+" ; + } + + if (line.startsWith("\"export class")) + { +// "export class ReadonlyComponent implements OnInit {" + "\r\n" + + String file_name_var=params.get(count).getFile_name_var(); + +// System.out.println("file namevar "+file_name_var); + + + line = "\"export class \"+"+file_name_var+""+2+"+\"Component implements OnInit {\"" + "\r\n"+"+" ; + } + + + + code.append(line + "\n"); + + } + count++; + BufferedWriter br = new BufferedWriter(new FileWriter(file1)); // replaced string + br.write(code.toString()); + br.close(); + } + + + + + + + + + // APPLY ALL RULES PRESENT HERE + List rules = bcfRuleLibraryService.getAll(); + + int rulesOuterCount = 0; + for (Rn_Bcf_Rules rule : rules) + { + rulesOuterCount++; + // System.out.println("RULES FOR COUNT = " + ++rulesOuterCount); + String start = rule.getIdentifier_start_string(); + String end = rule.getIdentifier_end_string(); + String replaceWith = rule.getReplacement_string(); + + String tech_stack = rule.getTech_stack(); + String sub_object_type2 = rule.getSub_object_type(); + String object_type2 = rule.getObject_type(); + replaceWith = replaceWith.concat(""); + + if(technology_stack.equals(tech_stack) && sub_object_type.equals(sub_object_type2) && object_type.equals(object_type2)) + { +// System.out.println("main tech stack"+technology_stack+" new "+tech_stack); +// System.out.println("main subobject "+sub_object_type+" new "+sub_object_type2); +// System.out.println("main object "+object_type+" new "+object_type2); + + + int dirCount = 0; + for (String staticDir : staticFiles) + { + dirCount++; + + File staticFile = new File(staticDir); + String staticFileName = staticFile.getName(); + + // System.out.println("========" + staticFileName + "============="); + String fileString = FileUtils.readFileToString(staticFile, StandardCharsets.UTF_8); + String fileType = FilenameUtils.getExtension(staticFileName); + + // don't check empty file for replacement.. + if (!fileString.isEmpty()) { + + // RULE APPLY + String finalString = RealNetUtils.stringReplace(fileString, start, end, replaceWith, + fileType); + + BufferedWriter bw = new BufferedWriter(new FileWriter(staticFile, false)); // replaced + // string + bw.write(finalString); + bw.close(); + + } + } + } + + +// System.out.println("loop count::"+dirCount); + + } + System.out.println("rules outer countt::"+rulesOuterCount); + } catch (FileNotFoundException e) { + e.printStackTrace(); + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.EXTRACTOR_API_TITLE); + error.setMessage(Constant.DYNAMIC_EXTRACTION_FAILED); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.EXTRACTOR_API_TITLE); + success.setMessage(Constant.DYNAMIC_EXTRACTION_SUCCESS); + successPojo.setSuccess(success); + log.debug("Response {} ", successPojo); + return new ResponseEntity(successPojo, HttpStatus.OK); + + } + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/controller/FileUploadController.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/controller/FileUploadController.java new file mode 100644 index 0000000..48df5f9 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/controller/FileUploadController.java @@ -0,0 +1,39 @@ +package com.realnet.codeextractor.controller; + +import org.codehaus.jackson.annotate.JsonIgnoreProperties; +import org.codehaus.jackson.map.annotate.JsonSerialize; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +import com.fasterxml.jackson.databind.SerializationFeature; + + + +//@JsonIgnoreProperties(ignoreUnknown=true) +@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"}) +//@JacksonFeatures(serializationDisable = {SerializationFeature.FAIL_ON_EMPTY_BEANS}) +@JsonSerialize +@RestController +public class FileUploadController { + + @PostMapping("/upload-gb") + public ResponseEntity uploadFileGb(@RequestParam("file") MultipartFile file[]){ + + for(MultipartFile files:file) { + System.out.println("File name::"+files.getOriginalFilename()); + + } + return new ResponseEntity(HttpStatus.OK); + + } + + @PostMapping("/upload-string") + public ResponseEntity uploadFileString(){ + return ResponseEntity.ok("working"); + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/controller/MasterCodeBuild_gk.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/controller/MasterCodeBuild_gk.java new file mode 100644 index 0000000..0ee1159 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/controller/MasterCodeBuild_gk.java @@ -0,0 +1,684 @@ +package com.realnet.codeextractor.controller; + +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.List; + +import org.apache.commons.io.FileUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.codeextractor.entity.Rn_Bcf_Extractor; +import com.realnet.codeextractor.entity.Rn_Bcf_Extractor_Params; +import com.realnet.codeextractor.service.Rn_Bcf_Extractor_Service; +import com.realnet.flf.service.FieldTypeService; +import com.realnet.fnd.entity.Error; +import com.realnet.fnd.entity.ErrorPojo; +import com.realnet.fnd.entity.Success; +import com.realnet.fnd.entity.SuccessPojo; +import com.realnet.utils.Constant; + +import io.swagger.annotations.Api; + +@RestController +@RequestMapping(value = "/api", produces = MediaType.APPLICATION_JSON_VALUE) +@Api(tags = { "Build Master Builder" }) +public class MasterCodeBuild_gk { + @Value("${projectPath}") + private String projectPath; + + @Value("${angularProjectPath}") + private String angularProjectPath; + + @Autowired + private Rn_Bcf_Extractor_Service rn_bcf_extractor_service; + + @Autowired + private FieldTypeService fieldTypeService; + // private static final Logger logger = + // Logger.getLogger(BuildMasterBuilderController.class); + + @GetMapping("/build_master_builder") + public ResponseEntity masterControllerBuilder(@RequestParam(value = "id") Integer id) + throws IOException, FileNotFoundException { + StringBuilder variablesDynamicCode = new StringBuilder(); + StringBuilder stringBuilderDynamicCode = new StringBuilder(); +// StringBuilder stringBuilder = new StringBuilder(); + + // RN_BCF_CODE_EXTRACTOR_T ID + // int eid = Integer.parseInt(id); + + Rn_Bcf_Extractor extractor = rn_bcf_extractor_service.getById(id); + String technology_stack = extractor.getTech_stack(); + String object_type = extractor.getObject_type(); + String sub_object_type = extractor.getSub_object_type(); + + // RN_BCF_CODE_EXTRACTOR_PARAMS_T VALUES + // List params = + // rn_bcf_extractor_params_service.getByHeaderId(eid); + List params = extractor.getRn_bcf_extractor_Params(); + + int j = 0; + for (Rn_Bcf_Extractor_Params param : params) { + boolean is_creation_enabled = param.isIs_creation_enabled(); +// param.isIs_extraction_enabled(); + String path = param.getMoved_address_string(); + File file = new File(path); + String parentPath = file.getParent(); + + String name = file.getName(); + String convertedFileName = "SE_" + name; + + // STATIC CODE DIRECTORY + String staticFileParentDir = parentPath + File.separator + "static_code"; + File staticFile = new File(staticFileParentDir + File.separator + convertedFileName); + + // HERE WE GET FILE INSIDE DATA + String fileToString = FileUtils.readFileToString(staticFile, StandardCharsets.UTF_8); + + // ex. controller_file (FROM PARAMS TABLE) + String file_name_var = param.getFile_name_var() + j; + + // ex. ui_name + "controller" + String file_name_dynamic_string = param.getFile_name_dynamic_string(); + + // ex. String controller_file = ui_name + "controller"; + variablesDynamicCode + .append("String " + file_name_var + " = " + "\"" + file_name_dynamic_string + "\"" + ";\r\n"); + + System.out.println("file name dynamic str " + file_name_dynamic_string); + // change file name entity +// String mainstr1=file_name_dynamic_string; +// String saleesent1=mainstr1.replace(".java", " "); +// System.out.println("updated filename"+saleesent1); +// System.out.println(file_name_dynamic_string.contains(".java")); +// System.out.println(file_name_dynamic_string.contains(".ts")); +// System.out.println(file_name_dynamic_string.contains(".scss")); +// System.out.println(file_name_dynamic_string.contains(".html")); + + // HERE WE CHECK AND APPEND FILE NAME + if (file_name_dynamic_string.contains(".java")) { + variablesDynamicCode + .append("String mainstr" + j + " = " + file_name_var + ";\r\n" + "String " + file_name_var + "" + + 1 + "=mainstr" + j + ".replace(\".java\", \"\");\r\n" + "" + "\r\n" + "\n"); + } else if (file_name_dynamic_string.contains(".ts")) { + variablesDynamicCode.append("String mainstr" + j + " = " + file_name_var + ";\r\n" + "String " + + file_name_var + "" + 1 + "=mainstr" + j + ".replace(\".ts\", \"\");\r\n" + "" + "\r\n" + + "String " + file_name_var + "" + 2 + "=mainstr" + j + ".replace(\".component.ts\", \"\");\r\n" + + "" + "\r\n" + "\n"); + + } else if (file_name_dynamic_string.contains(".html")) { + variablesDynamicCode + .append("String mainstr" + j + " = " + file_name_var + ";\r\n" + "String " + file_name_var + "" + + 1 + "=mainstr" + j + ".replace(\".html\", \"\");\r\n" + "" + "\r\n" + "\n"); + } else if (file_name_dynamic_string.contains(".scss")) { + variablesDynamicCode + .append("String mainstr" + j + " = " + file_name_var + ";\r\n" + "String " + file_name_var + "" + + 1 + "=mainstr" + j + ".replace(\".scss\", \"\");\r\n" + "" + "\r\n" + "\n"); + } else { + System.out.println("not found"); + } + + // ======= MODULE NAME SHOULD COME FROM THE SESSION ======== + // String moduleName = "\" + module_name + \"/\""; + String moduleName = "\" + module_name + \"/"; + + String modulePath = param.getTotal_project_path_dynamic_string(); + // System.out.println("MODULE PATH = " + modulePath); + if (modulePath.endsWith(".java")) { + String parent = modulePath.substring(0, modulePath.lastIndexOf("/")); // 1 + String lvl2Parent = parent.substring(0, parent.lastIndexOf("/") + 1); // 2 + String tail0 = modulePath.substring(parent.lastIndexOf("/") + 1); // 3 + tail0 = tail0.substring(0, tail0.lastIndexOf("/") + 1); // remove the .java file name + modulePath = lvl2Parent + moduleName + tail0; + } else { + // add module name in spring project + modulePath = modulePath.substring(0, modulePath.lastIndexOf("/") + 1); + String data0 = modulePath.substring(0, modulePath.lastIndexOf("/") + 1); + String tail0 = modulePath.substring(modulePath.lastIndexOf("/") + 1); + data0 += moduleName + tail0; + modulePath = data0; + } +// System.out.println("MANUPULATED module PATH = " + modulePath); + +// String ref_address_string = param.getReference_address_string(); +// ref_address_string = ref_address_string.substring(0, ref_address_string.lastIndexOf("/")+1); + + String total_address_path = param.getTotal_project_path_dynamic_string(); + total_address_path = total_address_path.substring(0, total_address_path.lastIndexOf("/") + 1); + System.out.println("total path : " + total_address_path + "\n"); + String finalDir = ""; + +// + // here we set file path + String dest_path = "projectPath + \"" + "/Projects/\" + project_name + \"" + total_address_path; + System.out.println("dest path : " + dest_path); + // String finalDir = dirString + "/" + "\" + " + file_name_var; + finalDir = dest_path + "\" + " + file_name_var; + System.out.println(finalDir); + + // module_dest_path = "projectPath + \"" + "/Projects/\" + project_name + " + + // modulePath; +// String dest_path = "projectPath + \"" + "/Projects/\" + project_name + \"" + modulePath; + + // String finalDir = dirString + "/" + "\" + " + file_name_var; + finalDir = dest_path + "\" + " + file_name_var; + System.out.println("NIL FINAL DIR = " + finalDir + "\n"); + + if (is_creation_enabled) { + StringBuilder fileCode = new StringBuilder(); + + if (file_name_dynamic_string.contains("entity")) { +// String entity = entity(path, "test"); + if (fileToString.isEmpty()) { + fileCode.append(" " + file_name_var + "Code.append(\"" + fileToString + "\");\r\n"); + } else { + fileCode.append(" " + file_name_var + "Code.append(" + fileToString + ");\r\n"); + } + + } else if (file_name_dynamic_string.contains("repository") + || file_name_dynamic_string.contains("repo")) { +// String repo = repo(path, "test"); + if (fileToString.isEmpty()) { + fileCode.append(" " + file_name_var + "Code.append(\"" + fileToString + "\");\r\n"); + } else { + fileCode.append(" " + file_name_var + "Code.append(" + fileToString + ");\r\n"); + } + + } else if (file_name_dynamic_string.contains("service")) { +// String service = service(path, "test"); + if (fileToString.isEmpty()) { + fileCode.append(" " + file_name_var + "Code.append(\"" + fileToString + "\");\r\n"); + } else { + fileCode.append(" " + file_name_var + "Code.append(" + fileToString + ");\r\n"); + } + + } else if (file_name_dynamic_string.contains("controller")) { +// String controller = controller(path, "test"); + if (fileToString.isEmpty()) { + fileCode.append(" " + file_name_var + "Code.append(\"" + fileToString + "\");\r\n"); + } else { + fileCode.append(" " + file_name_var + "Code.append(" + fileToString + ");\r\n"); + } + + } else { +// String other = other(path, "test"); + + if (file_name_dynamic_string.isEmpty()) { + fileCode.append(" " + file_name_var + "Code.append(\"" + fileToString + "\"\r\n"); + } else { + fileCode.append(" " + file_name_var + "Code.append(" + fileToString + "\r\n"); + } + + } + // EMPTY FILE CODE WILL NOT GO IN THIS LOOP + + stringBuilderDynamicCode.append(" StringBuilder " + file_name_var + "Code = new StringBuilder();\r\n" + // + " " + file_name_var + "Code.append(" + fileToString + ");\r\n" + + fileCode + "\r\n" + + + " File " + file_name_var + "File = new File(" + finalDir + ");\r\n" + + " System.out.println(\"Directory name = \" + " + file_name_var + "File);\r\n" + // == CREATE PARENT DIR IF NOT EXIST=== + + " File " + file_name_var + "FileParentDir = new File(" + file_name_var + + "File.getParent());\r\n" + " if(!" + file_name_var + "FileParentDir.exists()) {\r\n" + " " + + file_name_var + "FileParentDir.mkdirs();\r\n" + " }\r\n" + // == + + " if (!" + file_name_var + "File.exists()) {\r\n" + " " + file_name_var + + "File.createNewFile();\r\n" + " }\r\n" + " " + "fw = new FileWriter(" + + file_name_var + "File.getAbsoluteFile());\r\n" + " bw = new BufferedWriter(fw);\r\n" + + " " + " bw.write(" + file_name_var + "Code.toString());\r\n" + " bw.close();\r\n" + + "\r\n"); + + } + j++; + } + + // CHILD MASTER BUILDER NAME DEPENDS ON (TECH_STACK, OBJ_TYPE, SUB_OBJ_TYPE) + String childMasterBuilderName = technology_stack + "_" + object_type + "_" + sub_object_type + "_Builder"; + childMasterBuilderName = childMasterBuilderName.replace(" ", "_"); + childMasterBuilderName = childMasterBuilderName.replaceAll("[-]+", "_"); + + StringBuilder childMasterBuilderCode = new StringBuilder(); +// String action_builder_code = fieldTypeService.angular_action_builder_code(); + + childMasterBuilderCode.append("package com.realnet.builders;\r\n" + "\r\n" + + "import java.io.BufferedWriter;\r\n" + "import java.io.File;\r\n" + "import java.io.FileWriter;\r\n" + + "import java.io.IOException;\r\n" + "import java.util.ArrayList;\r\n" + "import java.util.Date;\r\n" + + "import java.util.List;\r\n" + "import java.util.Optional;\r\n" + "\r\n" + + "import org.modelmapper.ModelMapper;\r\n" + + "import org.springframework.beans.factory.annotation.Autowired;\r\n" + + "import org.springframework.beans.factory.annotation.Value;\r\n" + + "import org.springframework.http.HttpStatus;\r\n" + "import org.springframework.http.MediaType;\r\n" + + "import org.springframework.http.ResponseEntity;\r\n" + + "import org.springframework.web.bind.annotation.GetMapping;\r\n" + + "import org.springframework.web.bind.annotation.PathVariable;\r\n" + + "import org.springframework.web.bind.annotation.RequestMapping;\r\n" + + "import org.springframework.web.bind.annotation.RestController;\r\n" + "\r\n" + + "import com.google.gson.JsonElement;\r\n" + "import com.google.gson.JsonObject;\r\n" + + "import com.google.gson.JsonParser;\r\n" + "import com.google.gson.JsonArray;\r\n" + "\r\n" + + "import com.realnet.actionbuilder.service.Rn_Cff_ActionBuilder_Service;\r\n" + + "import com.realnet.flf.service.FieldTypeService;\r\n" + + "import com.realnet.fnd.service.Rn_LookUp_Service;\r\n" + + "import com.realnet.formdrag.repository.Rn_wf_lines_3Repository;\r\n" + + "import com.realnet.formdrag.entity.Rn_wf_lines_3;\r\n" + "" + + "import com.realnet.wfb.service.Rn_WireFrame_Service;\r\n" + "\r\n" + + "import io.swagger.annotations.Api;" + + + "\r\n" + "@RestController\r\n" + // CONTROLLER NAME SHOULD CHANGE + // DEPENDS ON TECH_STACK/OBJECT_tYPE/SUB_OBJECT_TYPE + + "@RequestMapping(value = \"/api\", produces = MediaType.APPLICATION_JSON_VALUE)\r\n" + + "@Api(tags = { \"Master Builder\" })\r\n" + "public class " + childMasterBuilderName + " {\r\n" + + "\r\n" + "\r\n" + " @Value(\"${angularProjectPath}\")\r\n" + " private String angularProjectPath;" + + " @Value(\"${projectPath}\")\r\n" + " private String projectPath;" + + // DEPENDENCIES FOR WIREFRAME + + " @Autowired\r\n" + " private Rn_WireFrame_Service wireFrameService;\r\n" + "\r\n" + + + " @Autowired\r\n" + " private Rn_LookUp_Service lookUpService;\r\n" + "@Autowired\r\n" + + " private Rn_wf_lines_3Repository repo;\n" + + + "\r\n" + " @Autowired\r\n" + " private Rn_Cff_ActionBuilder_Service actionBuilderService;\r\n" + + "\r\n" + " @Autowired\r\n" + " private ModelMapper modelMapper;\r\n" + "\r\n" + " @Autowired\r\n" + + " private FieldTypeService fieldTypeService;\r\n\n\n" + "@GetMapping(value = \"/" + + childMasterBuilderName + "/{header_id}\")\r\n" + + " public ResponseEntity createbyjson(@PathVariable Integer header_id) throws IOException {\r\n" + + " Optional wireframe = repo.findheader(header_id);\r\n" + "\r\n" + + " List tablename = new ArrayList<>();\r\n" + + " List entityname = new ArrayList<>();\r\n" + "\r\n" + + " JsonParser parser = new JsonParser();\r\n" + + " JsonElement element = parser.parse(wireframe.get().getModel());\r\n" + + " JsonObject jsonObject = element.getAsJsonObject();\r\n" + "\r\n" + + " JsonElement name = jsonObject.get(\"name\");\r\n" + " System.out.println(name);\r\n" + + " tablename.add(name.getAsString());\r\n" + "\r\n" + + " JsonElement desc = jsonObject.get(\"description\");\r\n" + + " System.out.println(desc);\r\n" + "// keys.add(\"desc :\"+desc.getAsString());\r\n" + + "\r\n" + " JsonElement element2 = jsonObject.get(\"attributes\");\r\n" + + " System.out.println(element2);\r\n" + "\r\n" + + " JsonArray jsonArray = element2.getAsJsonArray();\r\n" + + " System.out.println(jsonArray);\r\n" + "\r\n" + " for (JsonElement ar : jsonArray) {\r\n" + + "\r\n" + " JsonObject obj = ar.getAsJsonObject();\r\n" + "\r\n" + + " JsonElement type = obj.get(\"type\");\r\n" + " System.out.println(type);\r\n" + + "// keys.add(\"type :\"+type.getAsString());\r\n" + "\r\n" + + " JsonElement description = obj.get(\"description\");\r\n" + + " System.out.println(description);\r\n" + + "// keys.add(\"description :\"+description.getAsString());\r\n" + "\r\n" + + " JsonElement placeholder = obj.get(\"placeholder\");\r\n" + + "// System.out.println(placeholder);\r\n" + + "// keys.add(\"placeholder :\"+placeholder.getAsString());\r\n" + "\r\n" + + " JsonElement label = obj.get(\"label\");\r\n" + " System.out.println(label);\r\n" + + " entityname.add(label.getAsString());\r\n" + "\r\n" + " }\r\n" + "\r\n" + + " Date d = new Date();\r\n" + " String addString = \"_\";\r\n" + "\r\n" + + " // CALL BACKEND\r\n" +// + " backendservice.buildbackend(tablename, entityname, addString);\r\n" + "\r\n" +// + " // CALL FRONTEND\r\n" +// + " frontendservice.buildFrontend(tablename, entityname, addString);\r\n" +// + "" + +// + "\r\n" + " System.out.println(\"id ::\"+id);" +// + "\n lookUpService.createTable(id);" +// + " \n // extra button \n List extraButton = wireFrameService.getExtraButton(id);" +// + " \n // HEADER VALUE\r\n" + " Rn_Fb_Header rn_fb_header = wireFrameService.getById(id);\r\n" +// + " \r\n" + " // LINE VALUES\r\n" +// + " List rn_fb_lines = rn_fb_header.getRn_fb_lines();\r\n" + " \r\n" +// + " // MODULE DETAILS\r\n" + " Rn_Module_Setup module = rn_fb_header.getModule();\r\n" +// + " \r\n" + " // PROJECT DETAILS\r\n" +// + " Rn_Project_Setup project = module.getProject();\r\n" + " \r\n" +// // ATTRIBUTE FLEX +// + " // ATTRIBUTE FLEX VALUES\r\n" +// + " List attribute_flex_values = lookUpService.getExtensions();\r\n" +// + " String project_name = project.getProjectName();\r\n" + + " String project_name =" + "\"" + "test" + j + "\"" + ";\r\n" + +// + " String module_name = module.getModuleName();\r\n\n" + + "\r\r\rFileWriter fw = null;\r\n" + "BufferedWriter bw = null;\r\n" + variablesDynamicCode); + childMasterBuilderCode.append("" + + // ACTION BUILDER CODE + + + // =========== VARIABLE CODE WILL BE APPEND HERE ===============// + "\n" + stringBuilderDynamicCode.toString() + "\r\n" + + " return new ResponseEntity<>(\"created\", HttpStatus.CREATED);\r\n" + "}\r\n }"); + +// + FileWriter fw = null; + BufferedWriter bw = null; + try { + // FILE NAME SHOULD CHANGE DEPENDS ON TECH_STACK/OBJECT_tYPE/SUB_OBJECT_TYPE + File masterBuilderFile = new File( + projectPath + "/src/main/java/com/realnet/builders/" + childMasterBuilderName + ".java"); + if (!masterBuilderFile.exists()) { + masterBuilderFile.createNewFile(); + } + fw = new FileWriter(masterBuilderFile.getAbsoluteFile()); + bw = new BufferedWriter(fw); + bw.write(childMasterBuilderCode.toString()); + bw.close(); + } catch (FileNotFoundException e) { + e.printStackTrace(); + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.MASTER_BUILDER_API_TITLE); + error.setMessage(Constant.MASTER_BUILDER_FAILURE); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.MASTER_BUILDER_API_TITLE); + success.setMessage(Constant.MASTER_BUILDER_SUCCESS); + successPojo.setSuccess(success); + return new ResponseEntity(successPojo, HttpStatus.CREATED); + } + + public String entity(String path, String classname) throws IOException { + + return UpdateEntity(path, classname); + + } + + public String repo(String path, String classname) throws IOException { + return UpdateRepo(path, classname); + + } + + public String service(String path, String classname) throws IOException { + return UpdateService(path, classname); + + } + + public String controller(String path, String classname) throws IOException { + return UpdateController(path, classname); + + } + + public String other(String path, String classname) throws IOException { + + return UpdateRepo(path, classname); + + } + + public String UpdateEntity(String path, String classname) throws IOException { + +// String path = "C:\\Users\\Aniket\\Documents\\Entity.txt"; +// String classname = "gk"; + String addition = "for (int i = 0; i < entityname.size(); i++) {\r\n" + + " String string = entityname.get(i);\r\n" + + " String lowerCase = string.replaceAll(\" \", \"_\").toLowerCase();\r\n" + + " String add = \"\\n private \" + \"String\" + \" \" + lowerCase + \";\";\r\n" + + " intialize.append(add);\r\n" + + " }"; + /* + * RandomAccessFile writer=new + * RandomAccessFile("C:/Users/lenovo/Documents/demo.txt","rw"); + * + * writer.seek(position); writer.writeBytes(addition); writer.close(); + */ + String line = ""; + StringBuilder intialize = new StringBuilder(); + StringBuilder class_name = new StringBuilder(); + StringBuilder middle = new StringBuilder(); + StringBuilder end = new StringBuilder(); + BufferedReader br = new BufferedReader(new FileReader(path)); + while ((line = br.readLine()) != null) { + String[] data = line.split(","); + for (String d : data) { + if (d.contains("import") || d.contains("@Data") || d.contains("@Entity")) { + intialize.append("\""); + intialize.append(d); + intialize.append("\"+\n"); + } else if (d.contains("public")) { + + class_name.append("\"public class "+classname +" {\"+ \n"); +// intialize.append("\"+\n"); + } else if (d.contains("}")) { + intialize.append("\""); + end.append(d); + intialize.append("\"+\n"); + } + + } + } + br.close(); + + middle.append(addition); + StringBuilder finalstring = new StringBuilder(); + finalstring.append("\"StringBuilder intialize = new StringBuilder();\"+\r\n" + + "\" intialize.append(\"+"); + finalstring.append(intialize.toString()); + finalstring.append(class_name.toString()); + finalstring.append("\t\"@Id\"+\r\n" + + "\" @GeneratedValue(strategy = GenerationType.IDENTITY)\"+\r\n" + + "\" private int id;\");\n"); + finalstring.append(middle.toString()); + + + + return finalstring.toString(); + } + + public String UpdateRepo(String path, String classname) throws IOException { + + String line = ""; + StringBuilder intialize = new StringBuilder(); + StringBuilder class_name = new StringBuilder(); + StringBuilder middle = new StringBuilder(); + StringBuilder end = new StringBuilder(); + BufferedReader br = new BufferedReader(new FileReader(path)); + intialize.append("\""); + + + while ((line = br.readLine()) != null) { + String[] data = line.split(","); + for (String d : data) { + if (d.contains("import") || d.contains("@Repository") ) { + intialize.append("\""+d); + intialize.append("\"+\n"); + } else if (d.contains("public")) { + class_name.append("\""+"public class "+classname +" extends JpaRepository<"+classname + ", Long> " +"{"+"\"+"); + class_name.append("\n"); + } + + } + } + br.close(); + + StringBuilder finalstring = new StringBuilder(); + finalstring.append(" \""+" StringBuilder repo = new StringBuilder();"+"\"+\n" + +" \""+"" + +" "+ "repo.append("); + finalstring.append(intialize.toString()); + finalstring.append(class_name.toString()); + finalstring.append("\"+}\""); + finalstring.append("\");"+"\""); + + return finalstring.toString(); + } + + public String UpdateService(String path, String classname) throws IOException { + + String line = ""; + String apiName ="Api"; + + StringBuilder intialize = new StringBuilder(); + StringBuilder class_name = new StringBuilder(); + StringBuilder middle = new StringBuilder(); + StringBuilder end = new StringBuilder(); + BufferedReader br = new BufferedReader(new FileReader(path)); + + intialize.append("\"import java.util.List;\"+\r\n" + + "\r\n" + "\"import org.springframework.beans.factory.annotation.Autowired;\"+\r\n" + + "\" import org.springframework.stereotype.Service;\"+\n"); + + intialize.append("\n\"@Service\"+\n"); + + intialize.append("\"@RequestMapping(value = " +"\"/"+ apiName+ "\")\"+\n" + + "\"@RestController\"+\r\n"); + + + + class_name.append("\"public class "+ classname +"Service {\"+\r\n" + + + "\" @Autowired\"+\r\n" + + "\" private " + classname+ "Service Service;\"+\n"); + + + middle.append( + "\" @Autowired\r\n" + "private " + classname + "Repository " + "Repository;\"+\n"); + + middle.append("\"public "+ classname +" Savedata("+classname+ " data) {\"+\r\n" + + " \" return Repository.save(data);\"+ \r\n" + " \" }\"+\r\n" + "\r\n" + + " \" \r\n" + "public List<" + classname + "> getdetails() {\"+\r\n" + + " \" return (List<" + classname + ">) Repository.findAll();\"+\r\n" + " }\r\n" + + "\r\n" + "\r\n" + "\"public "+ classname +" getdetailsbyId(Long id) {\"+\r\n" + + "\" return Repository.findById(id).get();\"+\r\n" + "\" }\"+\r\n" + "\r\n" + "\r\n" + + "\" public void delete_by_id(Long id) {\"+\r\n" + + "\" Repository.deleteById(id);\"+\r\n" + "}\"+\r\n" + "\r\n" + "\r\n"); + + middle.append("\"public "+ classname +" update("+ classname +" data,Long id) {\"+\n" + + " \""+ classname +" old = Repository.findById(id).get();\"+\n"); +// middle.append(" for (EntityBuild en : ent) { +// String name = en.getName(); +// +// String string = name.substring(0,1).toUpperCase()+name.substring(1); +// middle.append("old.set"+string+ "(data.get"+string+"());\r\n"); +// } + middle.append("\"final "+ classname +" test = Repository.save(old);\"+\r\n" + + " \" return test;\"+" + + "\"}\"+" + + "\"}\"+"); + + + + + br.close(); + + StringBuilder finalstring = new StringBuilder(); + finalstring.append("\" StringBuilder service = new StringBuilder();\"+\r\n" + + "\" service.append(\"+"); + finalstring.append(intialize.toString()); + finalstring.append(class_name.toString()); + finalstring.append(middle.toString()); + finalstring.append("\");"); + + // +// FileWriter fw = null; +// BufferedWriter bw = null; +// File masterBuilderFile = new File(newpath + "test" + ".java"); +// if (!masterBuilderFile.exists()) { +// masterBuilderFile.createNewFile(); +// } +// fw = new FileWriter(masterBuilderFile.getAbsoluteFile()); +// bw = new BufferedWriter(fw); +// bw.write(finalstring.toString()); +// bw.close(); + + + return finalstring.toString(); + } + + public String UpdateController(String path, String classname) throws IOException { + + String line = ""; + String apiName ="Api"; + + StringBuilder intialize = new StringBuilder(); + StringBuilder class_name = new StringBuilder(); + StringBuilder middle = new StringBuilder(); + StringBuilder end = new StringBuilder(); + BufferedReader br = new BufferedReader(new FileReader(path)); + + + intialize.append("import org.springframework.beans.factory.annotation.Autowired;\"+\r\n" + + "\" import org.springframework.web.bind.annotation.DeleteMapping;\"+\r\n" + + "\" import org.springframework.web.bind.annotation.GetMapping;\"+\r\n" + + "\" import org.springframework.web.bind.annotation.PathVariable;\"+\r\n" + + "\" import org.springframework.web.bind.annotation.PostMapping;\"+\r\n" + + "\" import org.springframework.web.bind.annotation.PutMapping;\"+\r\n" + + "\" import org.springframework.web.bind.annotation.RequestBody;\"+\r\n" + + "\" import org.springframework.web.bind.annotation.RequestParam;\"+\r\n" + + "\" import org.springframework.web.bind.annotation.RestController;\"+\r\n" + + "\" import org.springframework.web.bind.annotation.*;\"+\r\n"); + + intialize.append("\" @RequestMapping(value = " +"\"/"+ apiName+ "\")\"+\n" + + "\" @RestController \"+\r\n "); + class_name.append("\" public class "+ classname +"Controller {\"+\r\n" + + + "\" @Autowired \"+ \r\n" + + "\" private " + classname+ "Service Service; \"+\n"); + + middle.append( "\" @PostMapping("+"\"/" + classname+")\"+\r\n" + + " \r\n" + + " \" public " + classname+ " Savedata(@RequestBody " + classname+ " data) { \"+ \r\n" + + " \" " + classname+ " save = Service.Savedata(data) ;\"+\r\n" + + " \" return save;\"+\r\n" + + " \"+ }\"+\r\n" +// + " \" \r\n \"+" +// + " \" \r\n \"+" + + " \" @GetMapping(\"/" + classname+ "\")\"+\r\n" + + " \" public List<" + classname+ "> getdetails() { \"+ \r\n" + + " \" List<" + classname+ "> get = Service.getdetails(); \"+ \r\n" + + " \" return get;\"+\r\n\" } \"+\n" + + "\" @GetMapping(\"/" + classname+ "/{id}\")\"+\r\n" + + " \" public " + classname+ " getdetailsbyId(@PathVariable Long id ) {\"+\r\n" + + " \" " + classname+ " get = Service.getdetailsbyId(id);\"+\r\n" + + "\" return get;\"+\r\n" + + " \" }\"+\n" + + "\" @DeleteMapping(\"/" + classname+ "/{id}\")\"+\r\n" + + " \" public void delete_by_id(@PathVariable Long id ) {\"+\r\n" + + " \" Service.delete_by_id(id);\"+\r\n" +// + " \" \"+ \r\n" + + " \"\"+ }\n" + + "\" @PutMapping(\"/" + classname+"/{id}\")\"+\r\n" + + "\" public " + classname+ " update(@RequestBody " + classname+ " data,@PathVariable Long id ) {\"+\r\n" + + " \" " + classname+ " update = Service.update(data,id);\"+\r\n" + + "\" return update;\"+\r\n" + + "\" }\"+\n\"}\"+"); + + + + + br.close(); + + StringBuilder finalstring = new StringBuilder(); + finalstring.append("\" StringBuilder controller = new StringBuilder();\"+\r\n" + + "\"controller.append("); + finalstring.append(intialize.toString()); + finalstring.append(class_name.toString()); + finalstring.append(middle.toString()); +// finalstring.append("}"); + finalstring.append("\");"); + + // +// FileWriter fw = null; +// BufferedWriter bw = null; +// File masterBuilderFile = new File(newpath + "test" + ".java"); +// if (!masterBuilderFile.exists()) { +// masterBuilderFile.createNewFile(); +// } +// fw = new FileWriter(masterBuilderFile.getAbsoluteFile()); +// bw = new BufferedWriter(fw); +// bw.write(finalstring.toString()); +// bw.close(); + + + return finalstring.toString(); + + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/controller/NamingConvensionController.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/controller/NamingConvensionController.java new file mode 100644 index 0000000..b0b99be --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/controller/NamingConvensionController.java @@ -0,0 +1,69 @@ +package com.realnet.codeextractor.controller; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.codeextractor.entity.NamingConvension; +import com.realnet.codeextractor.repository.NamingConvension_Repository; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; + +@RestController +@RequestMapping(value = "/api", produces = MediaType.APPLICATION_JSON_VALUE) +@Api(tags = { "Naming Convension" }) +public class NamingConvensionController { + + @Autowired + private NamingConvension_Repository namingConvensionRepository; + +// @Autowired +// private TokenUtil tokenUtil; + + // GET ALL + @ApiOperation(value = "List of Naming", response = NamingConvension.class) + @GetMapping("/naming-convension") + public ResponseEntity getAll() { + List namingConvension = namingConvensionRepository.findAll(); + return ResponseEntity.status(HttpStatus.OK).body(namingConvension); + } + +// // GET BY ID +// @ApiOperation(value = "Get a Form", response = NamingConvension.class) +// @GetMapping("/form_setup/{id}") +// public ResponseEntity getFormsById(@PathVariable(value = "id") int id) { +// NamingConvension NamingConvension = NamingConvension_service.getById(id); +// return ResponseEntity.ok().body(NamingConvension); +// } + +// // SAVE +// @ApiOperation(value = "naming-convension", response = NamingConvension.class) +// @PostMapping("/naming-convension") +// public ResponseEntity create( +// @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, +// @Valid @RequestBody NamingConvension namingConvension) { +// NamingConvension savedNamingConvension = namingConvensionRepository.save(namingConvension); +// return ResponseEntity.status(HttpStatus.CREATED).body(savedNamingConvension); +// } + +// // UPDATE +// @ApiOperation(value = "Update A Form", response = NamingConvension.class) +// @PutMapping("/form_setup/{id}") +// public ResponseEntity updateNamingConvension( +// @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, +// @PathVariable(value = "id") Integer id, @Valid @RequestBody List NamingConvensionRequest) { +// +// NamingConvension namingConvension = namingConvensionRepository.findById(id).get(); +// +// +// NamingConvension updatedNamingConvension = namingConvensionRepository.update(id, NamingConvension); +// return ResponseEntity.status(HttpStatus.ACCEPTED).body(updatedNamingConvension); +// } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/controller/RuleLibraryNew_gk.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/controller/RuleLibraryNew_gk.java new file mode 100644 index 0000000..57eb2e3 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/controller/RuleLibraryNew_gk.java @@ -0,0 +1,161 @@ +package com.realnet.codeextractor.controller; + +import java.io.File; +import java.io.IOException; +import java.nio.charset.StandardCharsets; + +import org.apache.commons.io.FileUtils; +import org.json.simple.parser.ParseException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.codeextractor.service.Rule_library_service_gk; +@RestController +@RequestMapping("/codeextractor/rulelib_new") +public class RuleLibraryNew_gk { + + @Autowired + private Rule_library_service_gk rule_service; + + + @GetMapping("/test13") + public ResponseEntity getKeysInJsonUsingMaps(@RequestParam String keyword) throws ParseException, IOException { + + //ENTITY + if (keyword.contains("entity_package")) { + String path ="C:\\Users\\Dell\\Desktop\\26 AUG\\CallingAnotherAPi\\testing/Abc.java"; + String start ="package com"; + String end =";\r\n" + + "\r\n" + + "import javax.persistence.GeneratedValue;"; + String replaceWith ="Test_1"; + + rule_service.rule(path,start,end,replaceWith); + } + if (keyword.contains("ENTITYCLASS")) { + String path ="C:\\Users\\Dell\\Desktop\\26 AUG\\CallingAnotherAPi\\testing/Abc.java"; + String start ="public class"; + String end ="{"; + String replaceWith ="Test"; + + rule_service.rule(path,start,end,replaceWith); + } + + + if (keyword.contains("entity_loop")) { + String path ="C:\\Users\\Dell\\Desktop\\26 AUG\\CallingAnotherAPi\\testing/Abc.java"; + String start ="private int id;"; + String end ="}"; + String replaceWith =" \nfor (int i = 0; i < entityname.size(); i++) {\r\n" + + " String string = entityname.get(i);\r\n" + + " String lowerCase = string.replaceAll(\" \", \"_\").toLowerCase();\r\n" + + " String add = \"\\n private \" + \"String\" + \" \" + lowerCase + \";\";\r\n" + + " entityclass.append(add);\r\n" + + " }"; + + rule_service.rule(path,start,end,replaceWith); + } + + //REPOSITORY + + if (keyword.contains("repo_class")) { + String path ="C:\\Users\\Dell\\Desktop\\Demo Code Extractor\\Abc_1665647440047_back\\Repository/AbcRepository.java"; + String start ="public interface"; + String end ="JpaRepository { "; + String replaceWith ="Test_1"; + + rule_service.rule(path,start,end,replaceWith); + } + + //SERVICE + if (keyword.contains("service_class")) { + String path ="C:\\Users\\Dell\\Desktop\\Demo Code Extractor\\Abc_1665647440047_back\\Services/AbcService.java"; + String start ="public class"; + String end ="{"; + String replaceWith ="Test_1"; + + rule_service.rule(path,start,end,replaceWith); + } + + if (keyword.contains("service_body")) { + + String path ="C:\\Users\\Dell\\Desktop\\Demo Code Extractor\\Abc_1665647440047_back\\Services/AbcService.java"; + + File staticFile = new File(path); + String fileString = FileUtils.readFileToString(staticFile, StandardCharsets.UTF_8); + int length = fileString.length(); + + + String start ="@Autowired"; + String end =""; + String replaceWith ="sericeclass.append(\"\\r\\n\" + \"private \" + table_name + addString + \"Repository \" + \"Repository;\\n\");\r\n" + + "\r\n" + + " sericeclass.append(\"public \" + table_name + addString + \" Savedata(\" + table_name + addString + \" data) {\\r\\n\"\r\n" + + " + \" return Repository.save(data); \\r\\n\" + \" }\\r\\n\" + \"\\r\\n\" + \" \\r\\n\"\r\n" + + " + \"public List<\" + table_name + addString + \"> getdetails() {\\r\\n\" + \" return (List<\"\r\n" + + " + table_name + addString + \">) Repository.findAll();\\r\\n\" + \" }\\r\\n\" + \"\\r\\n\" + \"\\r\\n\"\r\n" + + " + \"public \" + table_name + addString + \" getdetailsbyId(Long id) {\\r\\n\"\r\n" + + " + \" return Repository.findById(id).get();\\r\\n\" + \" }\\r\\n\" + \"\\r\\n\" + \"\\r\\n\"\r\n" + + " + \" public void delete_by_id(Long id) {\\r\\n\" + \" Repository.deleteById(id);\\r\\n\" + \"}\\r\\n\" + \"\\r\\n\"\r\n" + + " + \"\\r\\n\");\r\n" + + "\r\n" + + " sericeclass.append(\"public \" + table_name + addString + \" update(\" + table_name + addString\r\n" + + " + \" data,Long id) {\\n\" + \" \" + table_name + addString + \" old = Repository.findById(id).get();\\n\");\r\n" + + " for (int i = 0; i < entityname.size(); i++) {\r\n" + + " String name1 = entityname.get(i);\r\n" + + " String name3 = name1.replaceAll(\" \", \"_\").toLowerCase();\r\n" + + " String string = name3.substring(0, 1).toUpperCase() + name3.substring(1);\r\n" + + " sericeclass.append(\"old.set\" + string + \"(data.get\" + string + \"());\\r\\n\");\r\n" + + " }\r\n" + + " sericeclass.append(\"final \" + table_name + addString + \" test = Repository.save(old);\\r\\n\"\r\n" + + " + \" return test;\" + \"}}\" + \"\");\r\n" + + ""; + + rule_service.rule(path,start,end,replaceWith); + } + + //CONTROLLER + if (keyword.contains("controller_class")) { + String path ="C:\\Users\\Dell\\Desktop\\Demo Code Extractor\\Abc_1665647440047_back\\Controllers/AbcController.java"; + String start ="public class"; + String end ="{"; + String replaceWith ="Test_1"; + + rule_service.rule(path,start,end,replaceWith); + } + if (keyword.contains("controller_body")) { + String path ="C:\\Users\\Dell\\Desktop\\Demo Code Extractor\\Abc_1665647440047_back\\Controllers/AbcController.java"; + String start ="@Autowired"; + String end =""; + String replaceWith ="controllerclass.append(\"\r\n" + + " + \" private \" + table_name + addString + \"Service Service;\\n\\n\"\r\n" + + "\r\n" + + " + \" @PostMapping(\" + \"\\\"/\" + table_name + \"\\\")\\r\\n\" + \" public \" + table_name + addString\r\n" + + " + \" Savedata(@RequestBody \" + table_name + addString + \" data) {\\r\\n\" + \" \" + table_name\r\n" + + " + addString + \" save = Service.Savedata(data) ;\\r\\n\" + \" return save;\\r\\n\" + \" }\\r\\n\"\r\n" + + " + \" \\r\\n\" + \" \\r\\n\" + \" @GetMapping(\\\"/\" + table_name + \"\\\")\\r\\n\" + \" public List<\"\r\n" + + " + table_name + addString + \"> getdetails() {\\r\\n\" + \" List<\" + table_name + addString\r\n" + + " + \"> get = Service.getdetails(); \\r\\n\" + \" return get;\\r\\n}\\n\" + \"@GetMapping(\\\"/\"\r\n" + + " + table_name + \"/{id}\\\")\\r\\n\" + \" public \" + table_name + addString\r\n" + + " + \" getdetailsbyId(@PathVariable Long id ) {\\r\\n\" + \" \" + table_name + addString\r\n" + + " + \" get = Service.getdetailsbyId(id);\\r\\n\" + \" return get;\\r\\n\" + \" }\\n\" + \"@DeleteMapping(\\\"/\"\r\n" + + " + table_name + \"/{id}\\\")\\r\\n\" + \" public void delete_by_id(@PathVariable Long id ) {\\r\\n\"\r\n" + + " + \" Service.delete_by_id(id);\\r\\n\" + \" \\r\\n\" + \" }\\n\" + \"@PutMapping(\\\"/\" + table_name\r\n" + + " + \"/{id}\\\")\\r\\n\" + \" public \" + table_name + addString + \" update(@RequestBody \" + table_name\r\n" + + " + addString + \" data,@PathVariable Long id ) {\\r\\n\" + \" \" + table_name + addString\r\n" + + " + \" update = Service.update(data,id);\\r\\n\" + \" return update;\\r\\n\" + \" }\\n}\");\r\n" + + ""; + + rule_service.rule(path,start,end,replaceWith); + } + return new ResponseEntity<>("created", HttpStatus.CREATED); + + } + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/controller/Rule_Library_Controller.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/controller/Rule_Library_Controller.java new file mode 100644 index 0000000..2c1b987 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/controller/Rule_Library_Controller.java @@ -0,0 +1,378 @@ +package com.realnet.codeextractor.controller; + +import java.util.List; + +import javax.validation.Valid; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.codeextractor.entity.Rn_Bcf_Exception_Rules; +import com.realnet.codeextractor.entity.Rn_Bcf_Rules; +import com.realnet.codeextractor.entity.RuleCopyDTO; +import com.realnet.codeextractor.response.ExceptionRuleLibraryResponse; +import com.realnet.codeextractor.response.RuleLibraryResponse; +import com.realnet.codeextractor.service.Rn_Bcf_Exception_Rule_Library_Service; +import com.realnet.codeextractor.service.Rn_Bcf_Rule_Library_Service; +import com.realnet.fnd.entity.Error; +import com.realnet.fnd.entity.ErrorPojo; +import com.realnet.fnd.entity.Success; +import com.realnet.fnd.entity.SuccessPojo; +import com.realnet.userDTO.User; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserService; +import com.realnet.utils.Constant; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@RestController +@RequestMapping(value = "/api", produces = MediaType.APPLICATION_JSON_VALUE) +@Api(tags = { "Rule Library" }) +public class Rule_Library_Controller { + + @Autowired + private AppUserService userService; + + @Autowired + private Rn_Bcf_Rule_Library_Service ruleLibraryService; + + @Autowired + private Rn_Bcf_Exception_Rule_Library_Service exceptionRuleLibraryService; + +// @Autowired +// private TokenUtil tokenUtil; + // ==== RULE LIBRARY AND EXCEPTION RULE LIBRARY REST APIS ==== // + + // COPY RULES + @ApiOperation(value = "Add A New Rule", response = Rn_Bcf_Rules.class) + @PostMapping("/rule-copy") + public ResponseEntity copyRule(@Valid @RequestBody RuleCopyDTO ruleReq) { + AppUser user = userService.getLoggedInUser(); + Long userId = user.getUserId(); + Long accId = user.getAccount().getAccount_id(); + + String from_tech_stack = ruleReq.getFrom_tech_stack(); + String from_object_type = ruleReq.getFrom_object_type(); + String from_sub_object_type = ruleReq.getFrom_sub_object_type(); + + String to_tech_stack = ruleReq.getTo_tech_stack(); + String to_object_type = ruleReq.getTo_object_type(); + String to_sub_object_type = ruleReq.getTo_sub_object_type(); + + // GET ALL RULES + List rules = ruleLibraryService.copyRules2(from_tech_stack, from_object_type, from_sub_object_type); + log.debug("RULE COPPIED {}", rules); + for (Rn_Bcf_Rules rule : rules) { + Rn_Bcf_Rules newRule = new Rn_Bcf_Rules(); + newRule.setCreatedBy(userId); + newRule.setAccountId(accId); + + newRule.setGroup_id(rule.getGroup_id()); + newRule.setFile_code(rule.getFile_code()); + newRule.setRule_name(rule.getRule_name()); + newRule.setRule_type(rule.getRule_type()); + newRule.setTech_stack(to_tech_stack); + newRule.setObject_type(to_object_type); + newRule.setSub_object_type(to_sub_object_type); + newRule.setIdentifier_start_string(rule.getIdentifier_start_string()); + newRule.setIdentifier_end_string(rule.getIdentifier_end_string()); + newRule.setReplacement_string(rule.getReplacement_string()); + + Rn_Bcf_Rules savedRule = ruleLibraryService.save(newRule); + log.debug("SAVED RULE {}", savedRule); + if (savedRule == null) { + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.RULE_LIBRARY_API_TITLE); + error.setMessage(Constant.RULE_NOT_CREATED); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + } + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.RULE_LIBRARY_API_TITLE); + success.setMessage(Constant.RULE_CREATED_SUCCESSFULLY); + successPojo.setSuccess(success); + return new ResponseEntity(successPojo, HttpStatus.CREATED); + } + + // GET ALL + @ApiOperation(value = "List of Rules", response = RuleLibraryResponse.class) + @GetMapping("/rule-library") + public RuleLibraryResponse getAllRules( + @RequestParam(value = "page", defaultValue = "0", required = false) Integer page, + @RequestParam(value = "size", defaultValue = "20", required = false) Integer size) { + RuleLibraryResponse resp = new RuleLibraryResponse(); + Pageable paging = PageRequest.of(page, size); + Page result = ruleLibraryService.getAll(paging); + resp.setPageStats(result, true); + resp.setItems(result.getContent()); + return resp; + } + + // GET BY ID + @ApiOperation(value = "Get a Rule", response = Rn_Bcf_Rules.class) + @GetMapping("/rule-library/{id}") + public ResponseEntity getRuleDetails(@PathVariable(value = "id") int id) { + Rn_Bcf_Rules rule = ruleLibraryService.getById(id); + return ResponseEntity.ok().body(rule); + } + + // SAVE + @ApiOperation(value = "Add A New Rule", response = Rn_Bcf_Rules.class) + @PostMapping("/rule-library") + public ResponseEntity createRule( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, + @Valid @RequestBody Rn_Bcf_Rules bcf_rule) { +// String userId = tokenUtil.getUserId(authToken); +// rn_forms_setup.setCreatedBy(userId); +// rn_forms_setup.setAccountId(userId); + Long userId = userService.getLoggedInUserId(); + bcf_rule.setCreatedBy(userId); + + Rn_Bcf_Rules savedRule = ruleLibraryService.save(bcf_rule); + + if (savedRule == null) { + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.RULE_LIBRARY_API_TITLE); + error.setMessage(Constant.RULE_NOT_CREATED); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.RULE_LIBRARY_API_TITLE); + success.setMessage(Constant.RULE_CREATED_SUCCESSFULLY); + successPojo.setSuccess(success); + return new ResponseEntity(successPojo, HttpStatus.CREATED); + } + + /* for testing purpose */ + // SAVE LIST OF DATA + @ApiOperation(value = "Add AList Of New Rules", response = Rn_Bcf_Rules.class) + @PostMapping("/rule-library/all") + public ResponseEntity createListOfRules(@RequestBody List<@Valid Rn_Bcf_Rules> bcf_rule) { + for (Rn_Bcf_Rules rule : bcf_rule) { + Long userId = userService.getLoggedInUserId(); + rule.setCreatedBy(userId); + + Rn_Bcf_Rules savedRule = ruleLibraryService.save(rule); + if (savedRule == null) { + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.RULE_LIBRARY_API_TITLE); + error.setMessage(Constant.RULE_NOT_CREATED); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + } + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.RULE_LIBRARY_API_TITLE); + success.setMessage(Constant.RULE_CREATED_SUCCESSFULLY); + successPojo.setSuccess(success); + return new ResponseEntity(successPojo, HttpStatus.CREATED); + } + + // UPDATE + @ApiOperation(value = "Update A Form", response = Rn_Bcf_Rules.class) + @PutMapping("/rule-library/{id}") + public ResponseEntity updateRule( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, + @PathVariable(value = "id") Integer id, @Valid @RequestBody Rn_Bcf_Rules rule) { +// String userId = tokenUtil.getUserId(authToken); +// rn_forms_setup.setUpdatedBy(userId); + Long userId = userService.getLoggedInUserId(); + rule.setUpdatedBy(userId); + Rn_Bcf_Rules updatedRule = ruleLibraryService.updateById(id, rule); + + if (id != updatedRule.getId()) { + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.RULE_LIBRARY_API_TITLE); + error.setMessage(Constant.RULE_NOT_UPDATED); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.RULE_LIBRARY_API_TITLE); + success.setMessage(Constant.RULE_UPDATED_SUCCESSFULLY); + successPojo.setSuccess(success); + return new ResponseEntity(successPojo, HttpStatus.OK); + } + + // DELETE + @DeleteMapping("/rule-library/{id}") + public ResponseEntity deleteRule(@PathVariable(value = "id") Integer id) { + boolean deleted = ruleLibraryService.deleteById(id); + if (deleted) { + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.RULE_LIBRARY_API_TITLE); + success.setMessage(Constant.RULE_DELETED_SUCCESSFULLY); + successPojo.setSuccess(success); + return new ResponseEntity(successPojo, HttpStatus.OK); + } else { + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.RULE_LIBRARY_API_TITLE); + error.setMessage(Constant.RULE_NOT_DELETED); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + } + + // =========== EXCEPTION RULE =================== // + // GET ALL + @ApiOperation(value = "List of Exception Rules", response = ExceptionRuleLibraryResponse.class) + @GetMapping("/exception-rule-library") + public ExceptionRuleLibraryResponse getAllExceptionRules( + @RequestParam(value = "page", defaultValue = "0", required = false) Integer page, + @RequestParam(value = "size", defaultValue = "20", required = false) Integer size) { + ExceptionRuleLibraryResponse resp = new ExceptionRuleLibraryResponse(); + Pageable paging = PageRequest.of(page, size); + Page result = exceptionRuleLibraryService.getAll(paging); + resp.setPageStats(result, true); + resp.setItems(result.getContent()); + return resp; + } + + // GET BY ID + @ApiOperation(value = "Get a Exception Rule", response = Rn_Bcf_Exception_Rules.class) + @GetMapping("/exception-rule-library/{id}") + public ResponseEntity getExceptionRuleDetails(@PathVariable(value = "id") int id) { + Rn_Bcf_Exception_Rules rule = exceptionRuleLibraryService.getById(id); + return ResponseEntity.ok().body(rule); + } + + // SAVE + @ApiOperation(value = "Add A New Rule", response = Rn_Bcf_Exception_Rules.class) + @PostMapping("/exception-rule-library") + public ResponseEntity createExceptionRule( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, + @Valid @RequestBody Rn_Bcf_Exception_Rules bcf_rule) { +// String userId = tokenUtil.getUserId(authToken); +// rn_forms_setup.setCreatedBy(userId); +// rn_forms_setup.setAccountId(userId); + Long userId = userService.getLoggedInUserId(); + bcf_rule.setCreatedBy(userId); + + Rn_Bcf_Exception_Rules savedRule = exceptionRuleLibraryService.save(bcf_rule); + + if (savedRule == null) { + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.EXCEPTION_RULE_LIBRARY_API_TITLE); + error.setMessage(Constant.EXCEPTION_RULE_NOT_CREATED); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.EXCEPTION_RULE_LIBRARY_API_TITLE); + success.setMessage(Constant.EXCEPTION_RULE_CREATED_SUCCESSFULLY); + successPojo.setSuccess(success); + return new ResponseEntity(successPojo, HttpStatus.CREATED); + } + + /* for testing purpose */ + // SAVE LIST OF DATA + @ApiOperation(value = "Add A New Rule", response = Rn_Bcf_Exception_Rules.class) + @PostMapping("/exception-rule-library/all") + public ResponseEntity createListOfExceptionRule(@RequestBody List<@Valid Rn_Bcf_Exception_Rules> bcf_rule) { + Long userId = userService.getLoggedInUserId(); + for (Rn_Bcf_Exception_Rules rule : bcf_rule) { + rule.setCreatedBy(userId); + Rn_Bcf_Exception_Rules savedRule = exceptionRuleLibraryService.save(rule); + if (savedRule == null) { + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.EXCEPTION_RULE_LIBRARY_API_TITLE); + error.setMessage(Constant.EXCEPTION_RULE_NOT_CREATED); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + } + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.EXCEPTION_RULE_LIBRARY_API_TITLE); + success.setMessage(Constant.EXCEPTION_RULE_CREATED_SUCCESSFULLY); + successPojo.setSuccess(success); + return new ResponseEntity(successPojo, HttpStatus.CREATED); + } + + // UPDATE + @ApiOperation(value = "Update A Form", response = Rn_Bcf_Exception_Rules.class) + @PutMapping("/exception-rule-library/{id}") + public ResponseEntity updateExcetionRule( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, + @PathVariable(value = "id") Integer id, @Valid @RequestBody Rn_Bcf_Exception_Rules rule) { +// String userId = tokenUtil.getUserId(authToken); +// rn_forms_setup.setUpdatedBy(userId); + Long userId = userService.getLoggedInUserId(); + rule.setUpdatedBy(userId); + Rn_Bcf_Exception_Rules updatedRule = exceptionRuleLibraryService.updateById(id, rule); + + if (id != updatedRule.getId()) { + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.EXCEPTION_RULE_LIBRARY_API_TITLE); + error.setMessage(Constant.EXCEPTION_RULE_NOT_UPDATED); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.EXCEPTION_RULE_LIBRARY_API_TITLE); + success.setMessage(Constant.EXCEPTION_RULE_UPDATED_SUCCESSFULLY); + successPojo.setSuccess(success); + return new ResponseEntity(successPojo, HttpStatus.OK); + } + + // DELETE + @DeleteMapping("/exception-rule-library/{id}") + public ResponseEntity deleteExceptionRule(@PathVariable(value = "id") Integer id) { + boolean deleted = exceptionRuleLibraryService.deleteById(id); + if (deleted) { + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.EXCEPTION_RULE_LIBRARY_API_TITLE); + success.setMessage(Constant.EXCEPTION_RULE_DELETED_SUCCESSFULLY); + successPojo.setSuccess(success); + return new ResponseEntity(successPojo, HttpStatus.OK); + } else { + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.EXCEPTION_RULE_LIBRARY_API_TITLE); + error.setMessage(Constant.EXCEPTION_RULE_NOT_DELETED); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/controller/Rule_library_keywordController.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/controller/Rule_library_keywordController.java new file mode 100644 index 0000000..7af6d82 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/controller/Rule_library_keywordController.java @@ -0,0 +1,53 @@ +package com.realnet.codeextractor.controller; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.realnet.codeextractor.entity.Rule_library_keyword; +import com.realnet.codeextractor.service.Rule_library_keywordService; + + +@RequestMapping(value = "/code_extractor/rule_keyword") +@RestController +public class Rule_library_keywordController { + + @Autowired + private Rule_library_keywordService Service; + + @PostMapping("/Rule_library_keyword") + public Rule_library_keyword Savedata(@RequestBody Rule_library_keyword data) { + Rule_library_keyword save = Service.Savedata(data); + return save; + } + + @GetMapping("/Rule_library_keyword") + public List getdetails() { + List get = Service.getdetails(); + return get; + } + + @GetMapping("/Rule_library_keyword/{id}") + public Rule_library_keyword getdetailsbyId(@PathVariable Integer id) { + Rule_library_keyword get = Service.getdetailsbyId(id); + return get; + } + + @DeleteMapping("/Rule_library_keyword/{id}") + public void delete_by_id(@PathVariable Integer id) { + Service.delete_by_id(id); + + } + + @PutMapping("/Rule_library_keyword/{id}") + public Rule_library_keyword update(@RequestBody Rule_library_keyword data, @PathVariable Integer id) { + Rule_library_keyword update = Service.update(data, id); + return update; + } +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/controller/StaticCodeExtractionController.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/controller/StaticCodeExtractionController.java new file mode 100644 index 0000000..8f614e3 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/controller/StaticCodeExtractionController.java @@ -0,0 +1,164 @@ +package com.realnet.codeextractor.controller; + +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.List; + +import org.apache.commons.io.FileUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.codeextractor.entity.Rn_Bcf_Extractor; +import com.realnet.codeextractor.entity.Rn_Bcf_Extractor_Params; +import com.realnet.codeextractor.service.Rn_Bcf_Extractor_Params_Service; +import com.realnet.codeextractor.service.Rn_Bcf_Extractor_Service; +import com.realnet.fnd.entity.ErrorPojo; +import com.realnet.fnd.entity.Success; +import com.realnet.fnd.entity.SuccessPojo; +import com.realnet.utils.Constant; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; + + +@Slf4j +@RestController +@RequestMapping(value = "/api", produces = MediaType.APPLICATION_JSON_VALUE) +@Api(tags = { "Code Extractor" }) +public class StaticCodeExtractionController { + @Value("${projectPath}") + private String projectPath; + + @Autowired + private Rn_Bcf_Extractor_Service bcf_extractorService; + + @Autowired + private Rn_Bcf_Extractor_Params_Service bcf_extractor_params_service; + + @ApiOperation(value = "Static Code Extraction") + @GetMapping(value = "/static_code_extraction") + public ResponseEntity staticCodeExtraction(@RequestParam(value = "header_id") Integer headerId) throws IOException { + Rn_Bcf_Extractor bcf_extractor = bcf_extractorService.getById(headerId); + List bcf_extractor_params_t_values = bcf_extractor.getRn_bcf_extractor_Params(); + log.debug("bcf_extractor_params_t_values {}", bcf_extractor_params_t_values); + + List bcf_extractor_params = bcf_extractor_params_service.getByHeaderId(headerId); + log.debug("bcf_extractor_params {}", bcf_extractor_params); + + for (Rn_Bcf_Extractor_Params params : bcf_extractor_params_t_values) { + String path = params.getMoved_address_string(); + boolean is_extraction_enabled = params.isIs_extraction_enabled(); + boolean is_creation_enabled = params.isIs_creation_enabled(); + + if (is_creation_enabled && is_extraction_enabled) { + try { + File file = new File(path); + + // STEP 1. CONVERT THE FILE INTO STRING + String fileContents = FileUtils.readFileToString(file, StandardCharsets.UTF_8); + //if (!fileContents.isEmpty()) { + fileContents = fileContents.replace("\\", "\\\\"); + fileContents = fileContents.replace("\"", (File.separator + "\"")); + + // STEP 2. CREATE A TEMP FILE AND WRITE THE CONVERTED STRING + String parentPath = file.getParent(); + + String name = file.getName(); + String fileName = "temp_" + name; + File tempFile = new File(parentPath + File.separator + fileName); + if (tempFile.createNewFile()) { + System.out.println("------ TEMP FILE CREATED-------\n" + tempFile.getAbsolutePath()); + } + BufferedWriter writer = new BufferedWriter(new FileWriter(tempFile)); + writer.write(fileContents); + writer.close(); + System.out.println("Successfully wrote to the file..."); + + StringBuilder code = new StringBuilder(); + + // STEP 3. READ THE TEMP FILE AND MAKE IT "STRING" + BufferedReader br = new BufferedReader(new FileReader(tempFile)); + String line = br.readLine(); + while (line != null) { + code.append("\"" + line + "\" + \"\\r\\n\" + \r\n"); + line = br.readLine(); + } + br.close(); + + // STEP 4: REMOVING WHITE SPACE + String finalString = code.toString().trim(); + if (!finalString.isEmpty()) { + // STEP 5: REMOVING LAST CHARS(+ "\r\n" +) + finalString = finalString.substring(0, finalString.length() - 10); + // System.out.println(finalString); + } + boolean deleted = tempFile.delete(); + if(deleted) { + log.info(tempFile.getName(), "{} File deleted"); + } + + // MODIFIED NAME + // CONVERT EVERY FILE INTO .JAVA FILE + // String ext = FilenameUtils.getExtension(name); + // String fileNameWithOutExt = FilenameUtils.removeExtension(name); + + String ConvertedFileName = "SE_" + name; + + // STAIC CODE OUTPUT DIRECTORY & PATH + String staticDirString = parentPath + File.separator + "static_code"; + File staticDir = new File(staticDirString); + if (!staticDir.exists()) { + staticDir.mkdir(); + } + + File staticFile = new File(staticDirString + File.separator + ConvertedFileName); + System.out.println("FILES WITH STATIC CODE DIRECTORY = " + staticFile); + + if (!staticFile.exists()) { + staticFile.createNewFile(); + } + BufferedWriter writer2 = new BufferedWriter(new FileWriter(staticFile.getAbsoluteFile())); + writer2.write(finalString); + writer2.close(); + /* + * //===========DELETE MAIN FILES=========== if(deleted) { file.delete(); + * logger.info("Deleted = " + file.getName() + " File"); } + */ + //} + } catch (FileNotFoundException e) { + log.error("File Not Found... " + e); + ErrorPojo errorPojo = new ErrorPojo(); + com.realnet.fnd.entity.Error error = new com.realnet.fnd.entity.Error(); + error.setTitle(Constant.EXTRACTOR_API_TITLE); + error.setMessage(Constant.STATIC_EXTRACTION_FAILED); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + } + } + + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.EXTRACTOR_API_TITLE); + success.setMessage(Constant.STATIC_EXTRACTION_SUCCESS); + successPojo.setSuccess(success); + log.debug("Response {} ", successPojo); + return new ResponseEntity(successPojo, HttpStatus.OK); + + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/controller/TechnologyStackController_codeextractor.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/controller/TechnologyStackController_codeextractor.java new file mode 100644 index 0000000..1b4c9f3 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/controller/TechnologyStackController_codeextractor.java @@ -0,0 +1,295 @@ +package com.realnet.codeextractor.controller; + +import java.io.File; +import java.io.FileDescriptor; +import java.io.IOException; +import java.util.List; + +import javax.validation.Valid; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import org.springframework.data.domain.Sort; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; +import com.realnet.codeextractor.entity.ActiveTechStack_DTO; +import com.realnet.codeextractor.entity.Rn_Bcf_Technology_Stack1; +import com.realnet.codeextractor.repository.Rn_Bcf_TechnologyStack_Repository1; +import com.realnet.codeextractor.response.TechnologyStackResponse; +import com.realnet.codeextractor.service.Rn_Bcf_TechnologyStack_Service; +import com.realnet.fnd.entity.Error; +import com.realnet.fnd.entity.ErrorPojo; +import com.realnet.fnd.entity.Success; +import com.realnet.fnd.entity.SuccessPojo; +import com.realnet.fnd.service.FileStorageService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserService; +import com.realnet.utils.Constant; +import com.realnet.utils.RealNetUtils; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import net.lingala.zip4j.ZipFile; +import net.lingala.zip4j.exception.ZipException; + +@JsonIgnoreProperties(ignoreUnknown = true) +@Slf4j +@RestController +@RequestMapping(value = "/codeextractor/technologystack", produces = MediaType.APPLICATION_JSON_VALUE) +@Api(tags = { "Technology Stack" }) +public class TechnologyStackController_codeextractor { + + @Autowired + private AppUserService userService; + + @Autowired + private FileStorageService fileStorageService; + + @Autowired + private Rn_Bcf_TechnologyStack_Service technologyStackService; + + @Autowired + private Rn_Bcf_TechnologyStack_Repository1 technologyStackRepo; + + @Value("${projectPath}") + private String projectPath; + + // GET ALL SORTED AND PAGINATED DATA + @ApiOperation(value = "List of Technology Stack", response = Rn_Bcf_Technology_Stack1.class) + @GetMapping("/technology-stack") + public TechnologyStackResponse getTechnologyStack( + @RequestParam(value = "page", defaultValue = "0", required = false) Integer page, + @RequestParam(value = "size", defaultValue = "20", required = false) Integer size) { + // sorted data + Pageable paging = PageRequest.of(page, size, Sort.by(Constant.SORT_BY_CREATION_DATE).descending()); + Page result = technologyStackService.getAll(paging); + System.out.println("ganesh bute"+result.getContent()); + TechnologyStackResponse resp = new TechnologyStackResponse(); + resp.setPageStats(result, true); + resp.setItems(result.getContent()); + return resp; + + } + + // GET BY ID + @ApiOperation(value = "Get A Technology Stack", response = Rn_Bcf_Technology_Stack1.class) + @GetMapping("/technology-stack/{id}") + public ResponseEntity getTechnologyStackDetails(@PathVariable(value = "id") int id) { + Rn_Bcf_Technology_Stack1 bcf_tech_stack = technologyStackService.getById(id); + // Map extractorMap = + // Collections.singletonMap("extractior", bcf_extractor); + // return new ResponseEntity>(extractorMap, + // HttpStatus.OK); + // return ResponseEntity.ok().body(bcf_extractor); + return new ResponseEntity(bcf_tech_stack, HttpStatus.OK); + + } + + // ========= SAVE AND UNZIP FILE AND MOVE TO A SPECIFIC PATH ======== + @ApiOperation(value = "Add new Technology Stack") + @PostMapping(value = "/technology-stack") + public ResponseEntity saveTechnologyStack(// @Valid @RequestBody Rn_Bcf_Technology_Stack1 bcf_extractor, + @RequestParam(value = "bcf_technology_stack", required = true) String techStackRequest, + @RequestParam(value = "file", required = true) MultipartFile file) + throws IOException, JsonParseException, JsonMappingException { + + System.out.println("techStackRequest = " + techStackRequest); + System.out.println("file = " + file.getOriginalFilename()); + + log.debug("techStackRequest => {} ", techStackRequest); + log.debug("file => {} ", file.getOriginalFilename()); + ObjectMapper mapper = new ObjectMapper(); + mapper.configOverride(FileDescriptor.class).setIsIgnoredType(true); + //mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, true); + mapper.setVisibility(mapper.getVisibilityChecker() + .withFieldVisibility(JsonAutoDetect.Visibility.ANY)); + mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false); + Rn_Bcf_Technology_Stack1 bcf_tech_stack = mapper.readValue(techStackRequest, Rn_Bcf_Technology_Stack1.class); + + + log.debug("bcf_tech_stack => {}", bcf_tech_stack); + AppUser loggedInUser = userService.getLoggedInUser(); + bcf_tech_stack.setAccountId(loggedInUser.getAccount().getAccount_id()); + bcf_tech_stack.setCreatedBy(loggedInUser.getUserId()); + + String techStackKey = RealNetUtils.getTechnologyStackKey(bcf_tech_stack.getTech_stack()); + bcf_tech_stack.setTech_stack_key(techStackKey); + // upload to directory + String uploadPath = projectPath.concat("/src/main/resources/technology-stack-zip-uploads/"); + fileStorageService.uploadFile(file, uploadPath); + + String fileName = file.getOriginalFilename(); + String folderName = fileName.substring(0, fileName.lastIndexOf(".")); + + System.out.println("UPLOAD PATH = " + uploadPath + "\nFILE NAME = " + fileName + "\nFile Size = " + file.getSize()); + + // SAVE ZIP FILE NAME INTO DATABASE + bcf_tech_stack.setBase_prj_file_name(folderName); + bcf_tech_stack.setActive(false); + System.out.println("before save"); + + Rn_Bcf_Technology_Stack1 savedTechnology = technologyStackService.save(bcf_tech_stack); + System.out.println("after save"); + + if (savedTechnology == null) { + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.TECHNOLOGY_STACK_API_TITLE); + error.setMessage(Constant.TECHNOLOGY_STACK_NOT_CREATED); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + + /* + * ZIP TO UNZIP + */ + // ZIP FILE BASE PATH + String zipFilePath = uploadPath + fileName; + + String tech_stack = savedTechnology.getTech_stack(); + // UNZIP DESTINATION PATH + String destPath = projectPath.concat("/BaseProject/" + tech_stack); + + File path = new File(destPath); + if (!path.exists()) { + path.mkdirs(); + } + + System.out.println("ZIP FILE PATH = " + zipFilePath + "\nDESTINATION PATH = " + destPath); + try { + ZipFile zipFile = new ZipFile(zipFilePath); + zipFile.extractAll(destPath); + } catch (ZipException e) { + e.printStackTrace(); + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.TECHNOLOGY_STACK_API_TITLE); + error.setMessage(Constant.UNZIP_EXCEPTION); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.TECHNOLOGY_STACK_API_TITLE); + success.setMessage(Constant.TECHNOLOGY_STACK_CREATED_SUCCESSFULLY); + successPojo.setSuccess(success); + return new ResponseEntity(successPojo, HttpStatus.CREATED); + } + + // UPDATE + @ApiOperation(value = "Update Technology Stack", response = Rn_Bcf_Technology_Stack1.class) + @PutMapping("/technology-stack/{id}") + public ResponseEntity updateTechnology( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, + @PathVariable(value = "id") int id, @Valid @RequestBody Rn_Bcf_Technology_Stack1 bcf_tech_stack) { + AppUser loggedInUser = userService.getLoggedInUser(); + bcf_tech_stack.setUpdatedBy(loggedInUser.getUserId()); + + Rn_Bcf_Technology_Stack1 updatedTech = technologyStackService.updateById(id, bcf_tech_stack); + + if (bcf_tech_stack.getId() != updatedTech.getId()) { + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.EXTRACTOR_API_TITLE); + error.setMessage(Constant.EXTRACTOR_NOT_DELETED); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.EXTRACTOR_API_TITLE); + success.setMessage(Constant.EXTRACTOR_UPDATED_SUCCESSFULLY); + successPojo.setSuccess(success); + return new ResponseEntity(successPojo, HttpStatus.OK); + } + + // DELETE + @DeleteMapping("/technology-stack/{id}") + public ResponseEntity deleteTechnologyStack(@PathVariable(value = "id") int id) { + boolean deleted = technologyStackService.deleteById(id); + if (deleted) { + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.TECHNOLOGY_STACK_API_TITLE); + success.setMessage(Constant.TECHNOLOGY_STACK_DELETED_SUCCESSFULLY); + successPojo.setSuccess(success); + return new ResponseEntity(successPojo, HttpStatus.OK); + } else { + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.TECHNOLOGY_STACK_API_TITLE); + error.setMessage(Constant.TECHNOLOGY_STACK_NOT_DELETED); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + } + + // ACTIVE + @GetMapping(value = "/tech-stack-active") + public ResponseEntity technologyActive(@RequestParam(value = "id") int id) throws IOException { + //log.info("technologyActive controller start {}", id); + AppUser loggedInUser = userService.getLoggedInUser(); + + Rn_Bcf_Technology_Stack1 tech_stack = technologyStackService.getById(id); + log.debug("TECH STACK : {} ", tech_stack); + if (tech_stack.isActive() == false) { + tech_stack.setActive(true); + } else if (tech_stack.isActive()) { + tech_stack.setActive(false); + } + + //tech_stack.setActive(!tech_stack.isActive()); // LOL + + tech_stack.setUpdatedBy(loggedInUser.getUserId()); + + Rn_Bcf_Technology_Stack1 tech = technologyStackService.save(tech_stack); + log.debug("UPDATED TECH STACK : {} ", tech); + System.out.println("UPDATED TECH STACK : " + tech); + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.TECHNOLOGY_STACK_API_TITLE); + success.setMessage(Constant.TECHNOLOGY_STACK_UPDATED_SUCCESSFULLY); + successPojo.setSuccess(success); + return new ResponseEntity(successPojo, HttpStatus.OK); + } + + // get activate technology stack list (id and name) + @ApiOperation(value = "Get Activate Technology Stack List ", response = ActiveTechStack_DTO.class) + @GetMapping("/active-technology") + @ResponseBody + public List getActiveTechnology() { + //List technologyStack = technologyStackService.getAll(); + List activeTechDTO = technologyStackService.getListOfActivateTechnology(); + return activeTechDTO; + } + + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/entity/ActiveTechStack_DTO.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/entity/ActiveTechStack_DTO.java new file mode 100644 index 0000000..81c5725 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/entity/ActiveTechStack_DTO.java @@ -0,0 +1,23 @@ +package com.realnet.codeextractor.entity; + +import lombok.Data; + +@Data +public class ActiveTechStack_DTO { + private int id; + private String Name; + +// public Integer getId() { +// return id; +// } +// public void setId(Integer id) { +// this.id = id; +// } +// public Integer getName() { +// return Name; +// } +// public void setName(Integer name) { +// Name = name; +// } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/entity/FileDetails.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/entity/FileDetails.java new file mode 100644 index 0000000..40c60d8 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/entity/FileDetails.java @@ -0,0 +1,12 @@ +package com.realnet.codeextractor.entity; + +import java.io.Serializable; + +import lombok.Data; + +@Data +public class FileDetails implements Serializable { + private static final long serialVersionUID = 1L; + private int id; + private String text; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/entity/FileListDto.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/entity/FileListDto.java new file mode 100644 index 0000000..c8f513a --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/entity/FileListDto.java @@ -0,0 +1,15 @@ +package com.realnet.codeextractor.entity; + +import java.io.Serializable; + +import lombok.Data; + +@Data +public class FileListDto implements Serializable { + /** + * + */ + private static final long serialVersionUID = 1L; + private int id; + private String fileName; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/entity/NamingConvension.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/entity/NamingConvension.java new file mode 100644 index 0000000..d441a0a --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/entity/NamingConvension.java @@ -0,0 +1,27 @@ +package com.realnet.codeextractor.entity; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; + +import lombok.Data; + +@Data +@Entity +@Table(name = "NAMING_CONVENSION") +public class NamingConvension { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "ID") + private Integer id; + + @Column(name = "VARIABLE_NAME") + private String variableName; + + @Column(name = "OBJECT_NAME_DYNAMIC_STRING") + private String objectNameDynamicString; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/entity/Rn_Bcf_Exception_Rules.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/entity/Rn_Bcf_Exception_Rules.java new file mode 100644 index 0000000..e1de485 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/entity/Rn_Bcf_Exception_Rules.java @@ -0,0 +1,132 @@ +package com.realnet.codeextractor.entity; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; + +import com.realnet.fnd.entity.Rn_Who_AccId_Column; + +import lombok.ToString; + +@ToString +@Entity +@Table(name = "RN_BCF_EXCEPTION_RULES") +public class Rn_Bcf_Exception_Rules extends Rn_Who_AccId_Column { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "ID") + private Integer id; + + @Column(name = "TECH_STACK") + private String tech_stack; + + @Column(name = "OBJECT_TYPE") + private String object_type; + + @Column(name = "SUB_OBJECT_TYPE") + private String sub_object_type; + + @Column(name = "OBJECT_NAME_VARIABLE") + private String object_name_variable; + + @Column(name = "OBJECT_NAME_DYNAMIC_STRING") + private String object_name_dynamic_string; + + public Rn_Bcf_Exception_Rules() { + super(); + // TODO Auto-generated constructor stub + } + + public Rn_Bcf_Exception_Rules(Integer id, String tech_stack, String object_type, String sub_object_type, + String object_name_variable, String object_name_dynamic_string) { + super(); + this.id = id; + this.tech_stack = tech_stack; + this.object_type = object_type; + this.sub_object_type = sub_object_type; + this.object_name_variable = object_name_variable; + this.object_name_dynamic_string = object_name_dynamic_string; + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getTech_stack() { + return tech_stack; + } + + public void setTech_stack(String tech_stack) { + this.tech_stack = tech_stack; + } + + public String getObject_type() { + return object_type; + } + + public void setObject_type(String object_type) { + this.object_type = object_type; + } + + public String getSub_object_type() { + return sub_object_type; + } + + public void setSub_object_type(String sub_object_type) { + this.sub_object_type = sub_object_type; + } + + public String getObject_name_variable() { + return object_name_variable; + } + + public void setObject_name_variable(String object_name_variable) { + this.object_name_variable = object_name_variable; + } + + public String getObject_name_dynamic_string() { + return object_name_dynamic_string; + } + + public void setObject_name_dynamic_string(String object_name_dynamic_string) { + this.object_name_dynamic_string = object_name_dynamic_string; + } + + + +// // WHO COLUMNS +// @Temporal(TemporalType.TIMESTAMP) +// @Column(name = "CREATED_AT", nullable = false, updatable = false) +// @CreatedDate +// private Date createdAt; +// +// //@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime createdAt; +// +// @Temporal(TemporalType.TIMESTAMP) +// @Column(name = "UPDATED_AT", nullable = false) +// @LastModifiedDate +// private Date updatedAt; +// +// @Column(name = "CREATED_BY", updatable = false) +// private Long createdBy; +// +// @Column(name = "UPDATED_BY") +// private Long updatedBy; +// +// @Column(name = "ACCOUNT_ID") +// private Long accountId; + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/entity/Rn_Bcf_Extractor.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/entity/Rn_Bcf_Extractor.java new file mode 100644 index 0000000..7733c7d --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/entity/Rn_Bcf_Extractor.java @@ -0,0 +1,196 @@ +package com.realnet.codeextractor.entity; + +import java.util.List; + +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.OneToMany; +import javax.persistence.Table; + +import com.fasterxml.jackson.annotation.JsonManagedReference; +import com.realnet.fnd.entity.Rn_Who_Columns; + +@Entity +@Table(name = "RN_BCF_EXTRACTOR_T") +public class Rn_Bcf_Extractor extends Rn_Who_Columns { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "ID") + private Integer id; + + @Column(name = "TECH_STACK") + private String tech_stack; + + @Column(name = "TECH_STACK_KEY") + private String tech_stack_key; + + @Column(name = "OBJECT_TYPE") + private String object_type; + + @Column(name = "SUB_OBJECT_TYPE") + private String sub_object_type; + + @Column(name = "FORM_TYPE_NAME") + private String form_type_name; + + @Column(name = "STD_WF_NAME") + private String std_wf_name; + + @Column(name = "ICON_FILE_NAME") + private String icon_file_name; + + @Column(name = "SAMPLE_FILE_NAME") + private String sample_file_name; + + @Column(name = "EXTRACTOR_STAGE") + private String extractor_stage; + + @OneToMany(mappedBy = "rn_bcf_extractor", targetEntity = Rn_Bcf_Extractor_Params.class, cascade = CascadeType.ALL, fetch = FetchType.EAGER) + @JsonManagedReference + private List rn_bcf_extractor_Params; + + // SYSTEM ACCOUNT ID + @Column(name = "ACCOUNT_ID") + private long accountId; + + public Rn_Bcf_Extractor() { + super(); + } + + public Rn_Bcf_Extractor(Integer id, String tech_stack, String tech_stack_key, String object_type, + String sub_object_type, String form_type_name, String std_wf_name, String icon_file_name, + String sample_file_name, String extractor_stage, List rn_bcf_extractor_Params, + long accountId) { + super(); + this.id = id; + this.tech_stack = tech_stack; + this.tech_stack_key = tech_stack_key; + this.object_type = object_type; + this.sub_object_type = sub_object_type; + this.form_type_name = form_type_name; + this.std_wf_name = std_wf_name; + this.icon_file_name = icon_file_name; + this.sample_file_name = sample_file_name; + this.extractor_stage = extractor_stage; + this.rn_bcf_extractor_Params = rn_bcf_extractor_Params; + this.accountId = accountId; + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getTech_stack() { + return tech_stack; + } + + public void setTech_stack(String tech_stack) { + this.tech_stack = tech_stack; + } + + public String getTech_stack_key() { + return tech_stack_key; + } + + public void setTech_stack_key(String tech_stack_key) { + this.tech_stack_key = tech_stack_key; + } + + public String getObject_type() { + return object_type; + } + + public void setObject_type(String object_type) { + this.object_type = object_type; + } + + public String getSub_object_type() { + return sub_object_type; + } + + public void setSub_object_type(String sub_object_type) { + this.sub_object_type = sub_object_type; + } + + public String getForm_type_name() { + return form_type_name; + } + + public void setForm_type_name(String form_type_name) { + this.form_type_name = form_type_name; + } + + public String getStd_wf_name() { + return std_wf_name; + } + + public void setStd_wf_name(String std_wf_name) { + this.std_wf_name = std_wf_name; + } + + public String getIcon_file_name() { + return icon_file_name; + } + + public void setIcon_file_name(String icon_file_name) { + this.icon_file_name = icon_file_name; + } + + public String getSample_file_name() { + return sample_file_name; + } + + public void setSample_file_name(String sample_file_name) { + this.sample_file_name = sample_file_name; + } + + public String getExtractor_stage() { + return extractor_stage; + } + + public void setExtractor_stage(String extractor_stage) { + this.extractor_stage = extractor_stage; + } + + public List getRn_bcf_extractor_Params() { + return rn_bcf_extractor_Params; + } + + public void setRn_bcf_extractor_Params(List rn_bcf_extractor_Params) { + this.rn_bcf_extractor_Params = rn_bcf_extractor_Params; + } + + public long getAccountId() { + return accountId; + } + + public void setAccountId(long accountId) { + this.accountId = accountId; + } + + @Override + public String toString() { + return "Rn_Bcf_Extractor [id=" + id + ", tech_stack=" + tech_stack + ", tech_stack_key=" + tech_stack_key + + ", object_type=" + object_type + ", sub_object_type=" + sub_object_type + ", form_type_name=" + + form_type_name + ", std_wf_name=" + std_wf_name + ", icon_file_name=" + icon_file_name + + ", sample_file_name=" + sample_file_name + ", extractor_stage=" + extractor_stage + + ", rn_bcf_extractor_Params=" + rn_bcf_extractor_Params + ", accountId=" + accountId + "]"; + } + + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/entity/Rn_Bcf_Extractor_DTO.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/entity/Rn_Bcf_Extractor_DTO.java new file mode 100644 index 0000000..b96e29a --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/entity/Rn_Bcf_Extractor_DTO.java @@ -0,0 +1,39 @@ +package com.realnet.codeextractor.entity; + +import java.io.Serializable; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; + +import lombok.Data; + +@Data +@JsonSerialize +public class Rn_Bcf_Extractor_DTO implements Serializable { + /** + * + */ + private static final long serialVersionUID = 1L; + + private Integer id; + + private String tech_stack; + + private String tech_stack_key; + + private String object_type; + + private String sub_object_type; + + private String form_type_name; + + private String std_wf_name; + + private String icon_file_name; + + private String sample_file_name; + + // private String extractor_stage; + + // private long accountId; + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/entity/Rn_Bcf_Extractor_Params.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/entity/Rn_Bcf_Extractor_Params.java new file mode 100644 index 0000000..eb4da74 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/entity/Rn_Bcf_Extractor_Params.java @@ -0,0 +1,270 @@ +package com.realnet.codeextractor.entity; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; + +import com.fasterxml.jackson.annotation.JsonBackReference; +import com.realnet.fnd.entity.Rn_Who_Columns; + +@Entity +@Table(name = "RN_BCF_EXTRACTOR_PARAMS_T") +public class Rn_Bcf_Extractor_Params extends Rn_Who_Columns { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "ID") + private Integer id; + +// @Column(name = "HEADER_ID") +// private int header_id; + + @Column(name = "TECH_STACK") + private String tech_stack; + + @Column(name = "OBJECT_TYPE") + private String object_type; + + @Column(name = "SUB_OBJECT_TYPE") + private String sub_object_type; + + @Column(name = "FILE_CODE") + private String file_code; + + @Column(name = "NAME_STRING") + private String name_string; + + @Column(name = "ADDRESS_STRING") + private String address_string; + + @Column(name = "MOVED_ADDRESS_STRING") + private String moved_address_string; + + @Column(name = "REFERENCE_ADDRESS_STRING") + private String reference_address_string; + + @Column(name = "DESCRIPTION") + private String description; + + @Column(name = "FILE_NAME_VAR") + private String file_name_var; + + @Column(name = "FILE_NAME_DYNAMIC_STRING") + private String file_name_dynamic_string; + + @Column(name = "IS_EXTRACTION_ENABLED") + private boolean is_extraction_enabled; + + @Column(name = "IS_CREATION_ENABLED") + private boolean is_creation_enabled; + + @Column(name = "Total_Project_Path_Dynamic_String") + private String total_project_path_dynamic_string; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn(name = "HEADER_ID") + @JsonBackReference + private Rn_Bcf_Extractor rn_bcf_extractor; + +// @JsonIgnore +// private int headerId; +// +// public int getHeaderId() { +// return headerId; +// } +// +// public void setHeaderId(int headerId) { +// this.headerId = headerId; +// } + + // SYSTEM ACCOUNT ID + @Column(name = "ACCOUNT_ID") + private long accountId; + + public Rn_Bcf_Extractor_Params() { + super(); + } + + public Rn_Bcf_Extractor_Params(Integer id, String tech_stack, String object_type, String sub_object_type, + String file_code, String name_string, String address_string, String moved_address_string, + String reference_address_string, String description, String file_name_var, String file_name_dynamic_string, + boolean is_extraction_enabled, boolean is_creation_enabled, Rn_Bcf_Extractor rn_bcf_extractor, + long accountId,String total_project_path_dynamic_string) { + super(); + this.id = id; + this.tech_stack = tech_stack; + this.object_type = object_type; + this.sub_object_type = sub_object_type; + this.file_code = file_code; + this.name_string = name_string; + this.address_string = address_string; + this.moved_address_string = moved_address_string; + this.reference_address_string = reference_address_string; + this.description = description; + this.file_name_var = file_name_var; + this.file_name_dynamic_string = file_name_dynamic_string; + this.is_extraction_enabled = is_extraction_enabled; + this.is_creation_enabled = is_creation_enabled; + this.rn_bcf_extractor = rn_bcf_extractor; + this.accountId = accountId; + this.total_project_path_dynamic_string=total_project_path_dynamic_string; + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getTech_stack() { + return tech_stack; + } + + public void setTech_stack(String tech_stack) { + this.tech_stack = tech_stack; + } + + public String getObject_type() { + return object_type; + } + + public void setObject_type(String object_type) { + this.object_type = object_type; + } + + public String getSub_object_type() { + return sub_object_type; + } + + public void setSub_object_type(String sub_object_type) { + this.sub_object_type = sub_object_type; + } + + public String getFile_code() { + return file_code; + } + + public void setFile_code(String file_code) { + this.file_code = file_code; + } + + public String getName_string() { + return name_string; + } + + public void setName_string(String name_string) { + this.name_string = name_string; + } + + public String getAddress_string() { + return address_string; + } + + public void setAddress_string(String address_string) { + this.address_string = address_string; + } + + public String getMoved_address_string() { + return moved_address_string; + } + + public void setMoved_address_string(String moved_address_string) { + this.moved_address_string = moved_address_string; + } + + public String getReference_address_string() { + return reference_address_string; + } + + public void setReference_address_string(String reference_address_string) { + this.reference_address_string = reference_address_string; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getFile_name_var() { + return file_name_var; + } + + public void setFile_name_var(String file_name_var) { + this.file_name_var = file_name_var; + } + + public String getFile_name_dynamic_string() { + return file_name_dynamic_string; + } + + public void setFile_name_dynamic_string(String file_name_dynamic_string) { + this.file_name_dynamic_string = file_name_dynamic_string; + } + + public boolean isIs_extraction_enabled() { + return is_extraction_enabled; + } + + public void setIs_extraction_enabled(boolean is_extraction_enabled) { + this.is_extraction_enabled = is_extraction_enabled; + } + + public boolean isIs_creation_enabled() { + return is_creation_enabled; + } + + public void setIs_creation_enabled(boolean is_creation_enabled) { + this.is_creation_enabled = is_creation_enabled; + } + + public Rn_Bcf_Extractor getRn_bcf_extractor() { + return rn_bcf_extractor; + } + + public void setRn_bcf_extractor(Rn_Bcf_Extractor rn_bcf_extractor) { + this.rn_bcf_extractor = rn_bcf_extractor; + } + + public long getAccountId() { + return accountId; + } + + public void setAccountId(long accountId) { + this.accountId = accountId; + } + + public String getTotal_project_path_dynamic_string() { + return total_project_path_dynamic_string; + } + + public void setTotal_project_path_dynamic_string(String total_project_path_dynamic_string) { + this.total_project_path_dynamic_string = total_project_path_dynamic_string; + } + + @Override + public String toString() { + return "Rn_Bcf_Extractor_Params [id=" + id + ", tech_stack=" + tech_stack + ", object_type=" + object_type + + ", sub_object_type=" + sub_object_type + ", file_code=" + file_code + ", name_string=" + name_string + + ", address_string=" + address_string + ", moved_address_string=" + moved_address_string + + ", reference_address_string=" + reference_address_string + ", description=" + description + + ", file_name_var=" + file_name_var + ", file_name_dynamic_string=" + file_name_dynamic_string + + ", is_extraction_enabled=" + is_extraction_enabled + ", is_creation_enabled=" + is_creation_enabled + + ", accountId=" + accountId + "]"; + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/entity/Rn_Bcf_Rules.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/entity/Rn_Bcf_Rules.java new file mode 100644 index 0000000..51c0ddd --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/entity/Rn_Bcf_Rules.java @@ -0,0 +1,193 @@ +package com.realnet.codeextractor.entity; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; + +import com.realnet.fnd.entity.Rn_Who_AccId_Column; + +import lombok.ToString; + +@ToString +@Entity +@Table(name = "RN_BCF_RULES") +public class Rn_Bcf_Rules extends Rn_Who_AccId_Column { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "ID") + private Integer id; + + @Column(name = "GROUP_ID") + private String group_id; + + @Column(name = "RULE_NAME") + private String rule_name; + + @Column(name = "TECH_STACK") + private String tech_stack; + + @Column(name = "OBJECT_TYPE") + private String object_type; + + @Column(name = "SUB_OBJECT_TYPE") + private String sub_object_type; + + @Column(name = "FILE_CODE") + private String file_code; + + @Column(name = "RULE_TYPE") + private String rule_type; + + // Big text + @Column(name = "IDENTIFIER_START_STRING") + private String identifier_start_string; + + // Big text + @Column(name = "IDENTIFIER_END_STRING") + private String identifier_end_string; + + // Big text + @Column(name = "REPLACEMENT_STRING",length = 8000) + private String replacement_string; + + public Rn_Bcf_Rules() { + super(); + // TODO Auto-generated constructor stub + } + + public Rn_Bcf_Rules(Integer id, String group_id, String rule_name, String tech_stack, String object_type, + String sub_object_type, String file_code, String rule_type, String identifier_start_string, + String identifier_end_string, String replacement_string) { + super(); + this.id = id; + this.group_id = group_id; + this.rule_name = rule_name; + this.tech_stack = tech_stack; + this.object_type = object_type; + this.sub_object_type = sub_object_type; + this.file_code = file_code; + this.rule_type = rule_type; + this.identifier_start_string = identifier_start_string; + this.identifier_end_string = identifier_end_string; + this.replacement_string = replacement_string; + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getGroup_id() { + return group_id; + } + + public void setGroup_id(String group_id) { + this.group_id = group_id; + } + + public String getRule_name() { + return rule_name; + } + + public void setRule_name(String rule_name) { + this.rule_name = rule_name; + } + + public String getTech_stack() { + return tech_stack; + } + + public void setTech_stack(String tech_stack) { + this.tech_stack = tech_stack; + } + + public String getObject_type() { + return object_type; + } + + public void setObject_type(String object_type) { + this.object_type = object_type; + } + + public String getSub_object_type() { + return sub_object_type; + } + + public void setSub_object_type(String sub_object_type) { + this.sub_object_type = sub_object_type; + } + + public String getFile_code() { + return file_code; + } + + public void setFile_code(String file_code) { + this.file_code = file_code; + } + + public String getRule_type() { + return rule_type; + } + + public void setRule_type(String rule_type) { + this.rule_type = rule_type; + } + + public String getIdentifier_start_string() { + return identifier_start_string; + } + + public void setIdentifier_start_string(String identifier_start_string) { + this.identifier_start_string = identifier_start_string; + } + + public String getIdentifier_end_string() { + return identifier_end_string; + } + + public void setIdentifier_end_string(String identifier_end_string) { + this.identifier_end_string = identifier_end_string; + } + + public String getReplacement_string() { + return replacement_string; + } + + public void setReplacement_string(String replacement_string) { + this.replacement_string = replacement_string; + } + + +// // WHO COLUMNS +// @Temporal(TemporalType.TIMESTAMP) +// @Column(name = "CREATED_AT", nullable = false, updatable = false) +// @CreatedDate +// private Date createdAt; +// +// @Temporal(TemporalType.TIMESTAMP) +// @Column(name = "UPDATED_AT", nullable = false) +// @LastModifiedDate +// private Date updatedAt; +// +// @Column(name = "CREATED_BY", updatable = false) +// private Long createdBy; +// +// @Column(name = "UPDATED_BY") +// private Long updatedBy; +// +// @Column(name = "ACCOUNT_ID") +// private Long accountId; + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/entity/Rn_Bcf_Technology_Stack1.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/entity/Rn_Bcf_Technology_Stack1.java new file mode 100644 index 0000000..5712bd8 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/entity/Rn_Bcf_Technology_Stack1.java @@ -0,0 +1,106 @@ +package com.realnet.codeextractor.entity; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; + +import com.realnet.fnd.entity.Rn_Who_AccId_Column; + +import lombok.ToString; + +@ToString +@Entity +@Table(name = "RN_BCF_TECHNOLOGY_STACK") +public class Rn_Bcf_Technology_Stack1 extends Rn_Who_AccId_Column { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "ID") + private Integer id; + + @Column(name = "TECH_STACK") + private String tech_stack; + + @Column(name = "TECH_STACK_KEY") + private String tech_stack_key; + + // Big text + @Column(name = "TAGS") + private String tags; + + @Column(name = "BASE_PRJ_FILE_NAME") + private String base_prj_file_name; + + @Column(name = "IS_ACTIVE") + private boolean active; + + public Rn_Bcf_Technology_Stack1() { + super(); + } + + public Rn_Bcf_Technology_Stack1(Integer id, String tech_stack, String tech_stack_key, String tags, + String base_prj_file_name, boolean active) { + super(); + this.id = id; + this.tech_stack = tech_stack; + this.tech_stack_key = tech_stack_key; + this.tags = tags; + this.base_prj_file_name = base_prj_file_name; + this.active = active; + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getTech_stack() { + return tech_stack; + } + + public void setTech_stack(String tech_stack) { + this.tech_stack = tech_stack; + } + + public String getTech_stack_key() { + return tech_stack_key; + } + + public void setTech_stack_key(String tech_stack_key) { + this.tech_stack_key = tech_stack_key; + } + + public String getTags() { + return tags; + } + + public void setTags(String tags) { + this.tags = tags; + } + + public String getBase_prj_file_name() { + return base_prj_file_name; + } + + public void setBase_prj_file_name(String base_prj_file_name) { + this.base_prj_file_name = base_prj_file_name; + } + + public boolean isActive() { + return active; + } + + public void setActive(boolean active) { + this.active = active; + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/entity/RuleCopyDTO.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/entity/RuleCopyDTO.java new file mode 100644 index 0000000..ad0ba1a --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/entity/RuleCopyDTO.java @@ -0,0 +1,60 @@ +package com.realnet.codeextractor.entity; + +//@Data +public class RuleCopyDTO { + private String from_tech_stack; + private String from_object_type; + private String from_sub_object_type; + private String to_tech_stack; + private String to_object_type; + private String to_sub_object_type; + + public String getFrom_tech_stack() { + return from_tech_stack; + } + + public void setFrom_tech_stack(String from_tech_stack) { + this.from_tech_stack = from_tech_stack; + } + + public String getFrom_object_type() { + return from_object_type; + } + + public void setFrom_object_type(String from_object_type) { + this.from_object_type = from_object_type; + } + + public String getFrom_sub_object_type() { + return from_sub_object_type; + } + + public void setFrom_sub_object_type(String from_sub_object_type) { + this.from_sub_object_type = from_sub_object_type; + } + + public String getTo_tech_stack() { + return to_tech_stack; + } + + public void setTo_tech_stack(String to_tech_stack) { + this.to_tech_stack = to_tech_stack; + } + + public String getTo_object_type() { + return to_object_type; + } + + public void setTo_object_type(String to_object_type) { + this.to_object_type = to_object_type; + } + + public String getTo_sub_object_type() { + return to_sub_object_type; + } + + public void setTo_sub_object_type(String to_sub_object_type) { + this.to_sub_object_type = to_sub_object_type; + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/entity/Rule_library_keyword.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/entity/Rule_library_keyword.java new file mode 100644 index 0000000..9e02b14 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/entity/Rule_library_keyword.java @@ -0,0 +1,34 @@ +package com.realnet.codeextractor.entity; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; + +import lombok.Data; + +@Data +@Entity +public class Rule_library_keyword { + + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + + private String tech_stack; + + private String object_type; + + private String sub_object_type; + + private String version; + + private String replcement_string; + private boolean isactive; + + + + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/repository/NamingConvension_Repository.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/repository/NamingConvension_Repository.java new file mode 100644 index 0000000..dd118c9 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/repository/NamingConvension_Repository.java @@ -0,0 +1,14 @@ +package com.realnet.codeextractor.repository; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +import com.realnet.codeextractor.entity.NamingConvension; + +@Repository +public interface NamingConvension_Repository extends JpaRepository { + // for pagination + Page findAll(Pageable p); +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/repository/Rn_Bcf_Exception_Rule_Library_Repository.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/repository/Rn_Bcf_Exception_Rule_Library_Repository.java new file mode 100644 index 0000000..489679a --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/repository/Rn_Bcf_Exception_Rule_Library_Repository.java @@ -0,0 +1,28 @@ +package com.realnet.codeextractor.repository; + +import java.util.List; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; + +import com.realnet.codeextractor.entity.Rn_Bcf_Exception_Rules; + +@Repository +public interface Rn_Bcf_Exception_Rule_Library_Repository extends JpaRepository { + // for pagination + Page findAll(Pageable p); + + @Query(value = "SELECT * FROM rn_bcf_exception_rules WHERE TECH_STACK =:tech_stack AND OBJECT_TYPE =:object_type AND SUB_OBJECT_TYPE =:sub_object_type", nativeQuery = true) + List findByType(@Param("tech_stack")String tech_stack, @Param("object_type")String object_type, @Param("sub_object_type")String sub_object_type); + + // testing + //List findByTechStackAndObjectTypeAndSubObjectType(String tech_stack, String object_type, String sub_object_type); + +// @Query(value = "SELECT * FROM RN_BCF_EXTRACTOR_PARAMS_T WHERE HEADER_ID =:hId ORDER BY created_at DESC", nativeQuery = true) +// List findByHeaderIdOrderByDate(@Param("hId") Integer headerId); +} + diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/repository/Rn_Bcf_Extractor_Params_Repository.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/repository/Rn_Bcf_Extractor_Params_Repository.java new file mode 100644 index 0000000..7f8c659 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/repository/Rn_Bcf_Extractor_Params_Repository.java @@ -0,0 +1,30 @@ +package com.realnet.codeextractor.repository; + +import java.util.List; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; + +import com.realnet.codeextractor.entity.Rn_Bcf_Extractor_Params; + +@Repository +public interface Rn_Bcf_Extractor_Params_Repository extends JpaRepository { + // for pagination + Page findAll(Pageable p); + + // need modification + @Query(value = "SELECT * FROM rn_bcf_extractor_params_t WHERE ACCOUNT_ID =:accId", nativeQuery = true) + List findByAccountId(@Param("accId") Integer id, Pageable pageable); + + @Query(value = "SELECT * FROM rn_bcf_extractor_params_t WHERE HEADER_ID =:hId", nativeQuery = true) + List findByHeaderId(@Param("hId") Integer headerId); + + //@Query(value = "SELECT * FROM RN_BCF_EXTRACTOR_PARAMS_T WHERE HEADER_ID =:hId ORDER BY created_at DESC", nativeQuery = true) + @Query(value = "SELECT * FROM rn_bcf_extractor_params_t WHERE HEADER_ID =:hId ORDER BY created_at DESC", nativeQuery = true) + List findByHeaderIdOrderByDate(@Param("hId") Integer headerId); +} + diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/repository/Rn_Bcf_Extractor_Repository.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/repository/Rn_Bcf_Extractor_Repository.java new file mode 100644 index 0000000..6deb51e --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/repository/Rn_Bcf_Extractor_Repository.java @@ -0,0 +1,14 @@ +package com.realnet.codeextractor.repository; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +import com.realnet.codeextractor.entity.Rn_Bcf_Extractor; + +@Repository +public interface Rn_Bcf_Extractor_Repository extends JpaRepository { + // for pagination + Page findAll(Pageable p); +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/repository/Rn_Bcf_Rule_Library_Repository.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/repository/Rn_Bcf_Rule_Library_Repository.java new file mode 100644 index 0000000..7236a7c --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/repository/Rn_Bcf_Rule_Library_Repository.java @@ -0,0 +1,38 @@ +package com.realnet.codeextractor.repository; + +import java.util.List; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; + +import com.realnet.codeextractor.entity.Rn_Bcf_Rules; + +@Repository +public interface Rn_Bcf_Rule_Library_Repository extends JpaRepository { + // for pagination + Page findAll(Pageable p); + +// @Query(value = "SELECT * FROM RN_BCF_EXTRACTOR_PARAMS_T WHERE HEADER_ID =:hId ORDER BY created_at DESC", nativeQuery = true) +// List findByHeaderIdOrderByDate(@Param("hId") Integer headerId); + +// List getByRuleType(String tech_stack, String object_type, String sub_object_type); +// + @Query(value = "SELECT ID, GROUP_ID, RULE_NAME, ':to_tech_stack', ':to_object_type', ':to_sub_object_type', FILE_CODE, RULE_TYPE, IDENTIFIER_START_STRING, IDENTIFIER_END_STRING, REPLACEMENT_STRING FROM rn_bcf_rules WHERE TECH_STACK =:from_tech_stack AND OBJECT_TYPE =:from_object_type AND SUB_OBJECT_TYPE =:from_sub_object_type", nativeQuery = true) + public List copyRules( + @Param("to_tech_stack") String to_tech_stack, + @Param("to_object_type") String to_object_type, + @Param("to_sub_object_type") String to_sub_object_type, + @Param("from_tech_stack") String from_tech_stack, + @Param("from_object_type") String from_object_type, + @Param("from_sub_object_type") String from_sub_object_type); + + @Query(value = "SELECT * FROM rn_bcf_rules WHERE TECH_STACK =:from_tech_stack AND OBJECT_TYPE =:from_object_type AND SUB_OBJECT_TYPE =:from_sub_object_type", nativeQuery = true) + public List copyRules2(@Param("from_tech_stack") String from_tech_stack, + @Param("from_object_type") String from_object_type, + @Param("from_sub_object_type") String from_sub_object_type); + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/repository/Rn_Bcf_TechnologyStack_Repository1.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/repository/Rn_Bcf_TechnologyStack_Repository1.java new file mode 100644 index 0000000..fdc94b8 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/repository/Rn_Bcf_TechnologyStack_Repository1.java @@ -0,0 +1,28 @@ +package com.realnet.codeextractor.repository; + +import java.util.List; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.stereotype.Repository; + +import com.realnet.codeextractor.entity.Rn_Bcf_Technology_Stack1; + +@Repository +public interface Rn_Bcf_TechnologyStack_Repository1 extends JpaRepository { + // for pagination + Page findAll(Pageable p); + + @Query(value = "SELECT * FROM rn_bcf_technology_stack WHERE IS_ACTIVE=1", nativeQuery = true) + List activeTechStacks(); + // List findByActive(@Param("status")boolean status); + +// @Procedure("active_technology") +// List activeTechList(); + +// @Query(value = "call active_technology", nativeQuery = true) // call store procedure +// List activeTechList(); + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/repository/Rule_library_keywordRepository.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/repository/Rule_library_keywordRepository.java new file mode 100644 index 0000000..5e8124b --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/repository/Rule_library_keywordRepository.java @@ -0,0 +1,11 @@ +package com.realnet.codeextractor.repository; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +import com.realnet.codeextractor.entity.Rule_library_keyword; + + +@Repository +public interface Rule_library_keywordRepository extends JpaRepository { +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/response/CodeExtractorParamsResponse.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/response/CodeExtractorParamsResponse.java new file mode 100644 index 0000000..32e6ed9 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/response/CodeExtractorParamsResponse.java @@ -0,0 +1,18 @@ +package com.realnet.codeextractor.response; + +import java.util.List; + +import com.realnet.codeextractor.entity.Rn_Bcf_Extractor; +import com.realnet.codeextractor.entity.Rn_Bcf_Extractor_Params; +import com.realnet.fnd.response.PageResponse; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper = false) +public class CodeExtractorParamsResponse extends PageResponse { + @ApiModelProperty(required = true, value = "") + private List items; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/response/CodeExtractorResponse.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/response/CodeExtractorResponse.java new file mode 100644 index 0000000..1dd0ef9 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/response/CodeExtractorResponse.java @@ -0,0 +1,17 @@ +package com.realnet.codeextractor.response; + +import java.util.List; + +import com.realnet.codeextractor.entity.Rn_Bcf_Extractor; +import com.realnet.fnd.response.PageResponse; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper=false) +public class CodeExtractorResponse extends PageResponse { + @ApiModelProperty(required = true, value = "") + private List items; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/response/ExceptionRuleLibraryResponse.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/response/ExceptionRuleLibraryResponse.java new file mode 100644 index 0000000..ecc725c --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/response/ExceptionRuleLibraryResponse.java @@ -0,0 +1,17 @@ +package com.realnet.codeextractor.response; + +import java.util.List; + +import com.realnet.codeextractor.entity.Rn_Bcf_Exception_Rules; +import com.realnet.fnd.response.PageResponse; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper=false) +public class ExceptionRuleLibraryResponse extends PageResponse { + @ApiModelProperty(required = true, value = "") + private List items; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/response/RuleLibraryResponse.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/response/RuleLibraryResponse.java new file mode 100644 index 0000000..2b96f96 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/response/RuleLibraryResponse.java @@ -0,0 +1,18 @@ +package com.realnet.codeextractor.response; + +import java.util.List; + +import com.realnet.codeextractor.entity.Rn_Bcf_Extractor; +import com.realnet.codeextractor.entity.Rn_Bcf_Rules; +import com.realnet.fnd.response.PageResponse; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper=false) +public class RuleLibraryResponse extends PageResponse { + @ApiModelProperty(required = true, value = "") + private List items; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/response/TechnologyStackResponse.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/response/TechnologyStackResponse.java new file mode 100644 index 0000000..badb37e --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/response/TechnologyStackResponse.java @@ -0,0 +1,18 @@ +package com.realnet.codeextractor.response; + +import java.util.List; + +import com.realnet.codeextractor.entity.Rn_Bcf_Extractor; +import com.realnet.codeextractor.entity.Rn_Bcf_Technology_Stack1; +import com.realnet.fnd.response.PageResponse; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper=false) +public class TechnologyStackResponse extends PageResponse { + @ApiModelProperty(required = true, value = "") + private List items; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Exception_Rule_Library_Service.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Exception_Rule_Library_Service.java new file mode 100644 index 0000000..b52b7d9 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Exception_Rule_Library_Service.java @@ -0,0 +1,20 @@ +package com.realnet.codeextractor.service; + +import java.util.List; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; + +import com.realnet.codeextractor.entity.Rn_Bcf_Exception_Rules; + +public interface Rn_Bcf_Exception_Rule_Library_Service { + List getAll(); + Page getAll(Pageable p); + Rn_Bcf_Exception_Rules getById(int id); + Rn_Bcf_Exception_Rules save(Rn_Bcf_Exception_Rules bcf_rule); + Rn_Bcf_Exception_Rules updateById(int id, Rn_Bcf_Exception_Rules bcf_rule); + boolean deleteById(int id); + + List getByType(String tech_stack, String object_type, String sub_object_type); + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Exception_Rule_Library_ServiceImpl.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Exception_Rule_Library_ServiceImpl.java new file mode 100644 index 0000000..ee2b886 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Exception_Rule_Library_ServiceImpl.java @@ -0,0 +1,78 @@ +package com.realnet.codeextractor.service; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Service; + +import com.realnet.codeextractor.entity.Rn_Bcf_Exception_Rules; +import com.realnet.codeextractor.repository.Rn_Bcf_Exception_Rule_Library_Repository; +import com.realnet.exceptions.ResourceNotFoundException; + +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@Service +public class Rn_Bcf_Exception_Rule_Library_ServiceImpl implements Rn_Bcf_Exception_Rule_Library_Service { + + @Autowired + private Rn_Bcf_Exception_Rule_Library_Repository exceptionRuleLibraryRepository; + + @Override + public List getAll() { + return exceptionRuleLibraryRepository.findAll(); + } + + @Override + public Page getAll(Pageable page) { + return exceptionRuleLibraryRepository.findAll(page); + } + + @Override + public Rn_Bcf_Exception_Rules getById(int id) { + Rn_Bcf_Exception_Rules bcf_extractor = exceptionRuleLibraryRepository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Rule Not Found :: " + id)); + return bcf_extractor; + } + + @Override + public Rn_Bcf_Exception_Rules save(Rn_Bcf_Exception_Rules bcf_extractor) { + Rn_Bcf_Exception_Rules savedExtractor = exceptionRuleLibraryRepository.save(bcf_extractor); + return savedExtractor; + } + + @Override + public Rn_Bcf_Exception_Rules updateById(int id, Rn_Bcf_Exception_Rules ruleRequest) { + Rn_Bcf_Exception_Rules old_extractor = exceptionRuleLibraryRepository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Exception Rule not found :: " + id)); + + old_extractor.setTech_stack(ruleRequest.getTech_stack()); + old_extractor.setObject_type(ruleRequest.getObject_type()); + old_extractor.setSub_object_type(ruleRequest.getSub_object_type()); + old_extractor.setObject_name_variable(ruleRequest.getObject_name_variable()); + old_extractor.setObject_name_dynamic_string(ruleRequest.getObject_name_dynamic_string()); + + final Rn_Bcf_Exception_Rules updated_rule = exceptionRuleLibraryRepository.save(old_extractor); + return updated_rule; + } + + @Override + public boolean deleteById(int id) { + if (!exceptionRuleLibraryRepository.existsById(id)) { + throw new ResourceNotFoundException("Rule not exist"); + } + Rn_Bcf_Exception_Rules rule = exceptionRuleLibraryRepository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Rule not found :: " + id)); + exceptionRuleLibraryRepository.delete(rule); + return true; + } + + @Override + public List getByType(String tech_stack, String object_type, String sub_object_type) { + return exceptionRuleLibraryRepository.findByType(tech_stack, object_type, sub_object_type); + } + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Extractor_Params_Service.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Extractor_Params_Service.java new file mode 100644 index 0000000..ba2c495 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Extractor_Params_Service.java @@ -0,0 +1,24 @@ +package com.realnet.codeextractor.service; + +import java.util.List; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; + +import com.realnet.codeextractor.entity.Rn_Bcf_Extractor_Params; + +public interface Rn_Bcf_Extractor_Params_Service { + List getAll(); + Page getAll(Pageable p); + + List getByHeaderId(int headerId); + List getByHeaderIdOrderByDate(int headerId); + + + Rn_Bcf_Extractor_Params getById(int id); + Rn_Bcf_Extractor_Params save(Rn_Bcf_Extractor_Params bcf_extractor_params); + Rn_Bcf_Extractor_Params updateById(int id, Rn_Bcf_Extractor_Params bcf_extractor_params); + + boolean deleteById(int id); + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Extractor_Params_ServiceImpl.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Extractor_Params_ServiceImpl.java new file mode 100644 index 0000000..c6e898d --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Extractor_Params_ServiceImpl.java @@ -0,0 +1,91 @@ +package com.realnet.codeextractor.service; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Service; + +import com.realnet.codeextractor.entity.Rn_Bcf_Extractor_Params; +import com.realnet.codeextractor.repository.Rn_Bcf_Extractor_Params_Repository; +import com.realnet.exceptions.ResourceNotFoundException; +import com.realnet.users.service1.AppUserService; + +@Service +public class Rn_Bcf_Extractor_Params_ServiceImpl implements Rn_Bcf_Extractor_Params_Service { + + @Autowired + private AppUserService userService; + + @Autowired + private Rn_Bcf_Extractor_Params_Repository rn_bcf_extractor_params_repository; + + @Override + public List getAll() { + return rn_bcf_extractor_params_repository.findAll(); + } + + @Override + public Page getAll(Pageable page) { + return rn_bcf_extractor_params_repository.findAll(page); + } + + @Override + public Rn_Bcf_Extractor_Params getById(int id) { + Rn_Bcf_Extractor_Params bcf_extractor = rn_bcf_extractor_params_repository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Extractor Param Data Not Found :: " + id)); + return bcf_extractor; + } + + @Override + public Rn_Bcf_Extractor_Params save(Rn_Bcf_Extractor_Params bcf_extractor) { + Rn_Bcf_Extractor_Params savedExtractor = rn_bcf_extractor_params_repository.save(bcf_extractor); + return savedExtractor; + } + + @Override + public Rn_Bcf_Extractor_Params updateById(int id, Rn_Bcf_Extractor_Params extractorParamsRequest) { + // User loggedInUser = userService.getLoggedInUser(); + Rn_Bcf_Extractor_Params old_extractor = rn_bcf_extractor_params_repository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Menu not found :: " + id)); + old_extractor.setTech_stack(extractorParamsRequest.getTech_stack()); + old_extractor.setObject_type(extractorParamsRequest.getObject_type()); + old_extractor.setSub_object_type(extractorParamsRequest.getSub_object_type()); + old_extractor.setFile_code(extractorParamsRequest.getFile_code()); + old_extractor.setName_string(extractorParamsRequest.getName_string()); + old_extractor.setAddress_string(extractorParamsRequest.getAddress_string()); + old_extractor.setMoved_address_string(extractorParamsRequest.getMoved_address_string()); + old_extractor.setReference_address_string(extractorParamsRequest.getReference_address_string()); + old_extractor.setDescription(extractorParamsRequest.getDescription()); + old_extractor.setFile_name_var(extractorParamsRequest.getFile_name_var()); + old_extractor.setFile_name_dynamic_string(extractorParamsRequest.getFile_name_dynamic_string()); + old_extractor.setIs_extraction_enabled(extractorParamsRequest.isIs_extraction_enabled()); + old_extractor.setIs_creation_enabled(extractorParamsRequest.isIs_creation_enabled()); + old_extractor.setTotal_project_path_dynamic_string(extractorParamsRequest.getTotal_project_path_dynamic_string()); + final Rn_Bcf_Extractor_Params updated_function = rn_bcf_extractor_params_repository.save(old_extractor); + return updated_function; + } + + @Override + public boolean deleteById(int id) { + if (!rn_bcf_extractor_params_repository.existsById(id)) { + throw new ResourceNotFoundException("Extractor Data not exist"); + } + Rn_Bcf_Extractor_Params bcf_extractor = rn_bcf_extractor_params_repository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Menu not found :: " + id)); + rn_bcf_extractor_params_repository.delete(bcf_extractor); + return true; + } + + @Override + public List getByHeaderId(int headerId) { + return rn_bcf_extractor_params_repository.findByHeaderId(headerId); + } + + @Override + public List getByHeaderIdOrderByDate(int headerId) { + return rn_bcf_extractor_params_repository.findByHeaderIdOrderByDate(headerId); + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Extractor_Service.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Extractor_Service.java new file mode 100644 index 0000000..03d2fb6 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Extractor_Service.java @@ -0,0 +1,27 @@ +package com.realnet.codeextractor.service; + +import java.io.File; +import java.io.IOException; +import java.util.List; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; + +import com.realnet.codeextractor.entity.Rn_Bcf_Extractor; + +public interface Rn_Bcf_Extractor_Service { + List getAll(); + Page getAll(Pageable p); + Rn_Bcf_Extractor getById(int id); + Rn_Bcf_Extractor save(Rn_Bcf_Extractor bcf_extractor); + Rn_Bcf_Extractor updateById(int id, Rn_Bcf_Extractor bcf_extractor); + boolean deleteById(int id); + + public void saveListOFiles(int headerId, String tech_stack, String obj_type, String sub_obj_type, String destDirectory) + throws IOException; + + public void moveFiles(int id, String toDir) throws IOException; + public void deleteEmptyDirectory(File dir) throws IOException; + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Extractor_ServiceImpl.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Extractor_ServiceImpl.java new file mode 100644 index 0000000..3006280 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Extractor_ServiceImpl.java @@ -0,0 +1,249 @@ +package com.realnet.codeextractor.service; + +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Service; + +import com.realnet.codeextractor.entity.Rn_Bcf_Extractor; +import com.realnet.codeextractor.entity.Rn_Bcf_Extractor_Params; +import com.realnet.codeextractor.repository.Rn_Bcf_Extractor_Repository; +import com.realnet.exceptions.ResourceNotFoundException; +import com.realnet.fnd.service.FileStorageService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserService; +import com.realnet.users.service1.AppUserServiceImpl; + +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@Service +public class Rn_Bcf_Extractor_ServiceImpl implements Rn_Bcf_Extractor_Service { + + @Autowired + private AppUserServiceImpl userService; + + @Autowired + private FileStorageService fileStorageService; + + @Autowired + private Rn_Bcf_Extractor_Repository rn_bcf_extractor_repository; + + @Autowired + private Rn_Bcf_Extractor_Params_Service rn_bcf_extractor_params_service; + + @Override + public List getAll() { + return rn_bcf_extractor_repository.findAll(); + } + + @Override + public Page getAll(Pageable page) { + return rn_bcf_extractor_repository.findAll(page); + } + + @Override + public Rn_Bcf_Extractor getById(int id) { + Rn_Bcf_Extractor bcf_extractor = rn_bcf_extractor_repository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Extractor Table Data Not Found :: " + id)); + return bcf_extractor; + } + + @Override + public Rn_Bcf_Extractor save(Rn_Bcf_Extractor bcf_extractor) { + // User loggedInUser = userService.getLoggedInUser(); + // bcf_extractor.setCreatedBy(loggedInUser.getUserId()); + Rn_Bcf_Extractor savedExtractor = rn_bcf_extractor_repository.save(bcf_extractor); + return savedExtractor; + } + + @Override + public Rn_Bcf_Extractor updateById(int id, Rn_Bcf_Extractor extractorRequest) { + // User loggedInUser = userService.getLoggedInUser(); + + Rn_Bcf_Extractor old_extractor = rn_bcf_extractor_repository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Menu not found :: " + id)); + + old_extractor.setTech_stack(extractorRequest.getTech_stack()); + old_extractor.setTech_stack_key(extractorRequest.getTech_stack_key()); + old_extractor.setObject_type(extractorRequest.getObject_type()); + old_extractor.setSub_object_type(extractorRequest.getSub_object_type()); + old_extractor.setForm_type_name(extractorRequest.getForm_type_name()); + old_extractor.setStd_wf_name(extractorRequest.getStd_wf_name()); + old_extractor.setIcon_file_name(extractorRequest.getIcon_file_name()); + old_extractor.setSample_file_name(extractorRequest.getSample_file_name()); + old_extractor.setExtractor_stage(extractorRequest.getExtractor_stage()); + // line part + old_extractor.setRn_bcf_extractor_Params(extractorRequest.getRn_bcf_extractor_Params()); + // old_extractor.setUpdatedBy(loggedInUser.getUserId()); + final Rn_Bcf_Extractor updated_function = rn_bcf_extractor_repository.save(old_extractor); + return updated_function; + } + + @Override + public boolean deleteById(int id) { + if (!rn_bcf_extractor_repository.existsById(id)) { + throw new ResourceNotFoundException("Extractor Data not exist"); + } + Rn_Bcf_Extractor bcf_extractor = rn_bcf_extractor_repository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Menu not found :: " + id)); + rn_bcf_extractor_repository.delete(bcf_extractor); + return true; + } + + @Override + public void saveListOFiles(int headerId, String tech_stack, String obj_type, String sub_obj_type, + String destDirectory) throws IOException { + File destDir = new File(destDirectory); + + System.out.println("Destination Folder Path = " + destDirectory); + + ArrayList files = new ArrayList(); + + // Get all files from a directory. + File[] fList = destDir.listFiles(); + if (fList != null) { + for (File file : fList) { + if (file.isFile()) { + files.add(file.getAbsolutePath()); + // System.out.println("directory:" + file.getAbsolutePath()); + } else if (file.isDirectory()) { + saveListOFiles(headerId, tech_stack, obj_type, sub_obj_type, file.getAbsolutePath()); + } + } + } + + AppUser user = userService.getLoggedInUser(); + Long userId = user.getUserId(); + + Rn_Bcf_Extractor rn_bcf_extractor = this.getById(headerId); + String sampleFileName = rn_bcf_extractor.getSample_file_name(); + Long accId = rn_bcf_extractor.getAccountId(); + System.out.println("SAMPLE FILE NAME = " + sampleFileName); + // REMOVING .ZIP + sampleFileName = sampleFileName.substring(0, sampleFileName.lastIndexOf(".")); +// System.out.println("AFTER REMOVING .ZIP = " + sampleFileName); + // FOR CONVERTING OBJECT NAMES + // String insertPrefix = "Rn_"; + + //List params = new ArrayList(); + // GET FILE PATHS + for (int i = 0; i < files.size(); i++) { + //List params = new ArrayList(); + String filePath = files.get(i).replace("\\", "/"); + File finalFile = new File(filePath); + String name = finalFile.getName(); + + /* + * ***ADD RN PREFIX LOGIC*** if(!name.contains(insertPrefix)) { name = + * name.substring(0,0).concat(insertPrefix) + name.substring(0); } + */ + + // DESTINATION ADDRESS PATH(FOR OUTPUT FILES) + /* + * ZIP FILE NAME = Angular_project INPUT : + * {PROJECT_PATH}/src/main/resources/extracted-files/ + * Angular_project_1599226114430/rn_header_test1-details.component.html OUTPUT : + * /frontend/src/app/admin/{{DYNAMIC VARIABLE}}/details/ + */ + String ref_address_string = filePath.substring(filePath.lastIndexOf(sampleFileName)); + ref_address_string = ref_address_string.substring(ref_address_string.indexOf("/")); + // System.out.println("REF ADDRESS STRING = " + ref_address_string); + +// // DYNAMIC UI_NAME LOGIC FOR ANGULAR FILE STRUCTURE +// final String ng_prj_struct = "/frontend/src/app/admin/"; +// if (ref_address_string.contains(ng_prj_struct)) { +// int len = ng_prj_struct.length(); +// String data = ref_address_string.substring(0,len) + "ui_name"; +// int tail = ref_address_string.indexOf("/", len + 1); +// String temp = ref_address_string.substring(tail); +// data += temp; +// ref_address_string = data; +// } + + // ========ADD IT INTO PARAMETERS TABLE========= + Rn_Bcf_Extractor_Params rn_bcf_extractor_params = new Rn_Bcf_Extractor_Params(); + // System.out.println("SET HEADER ID = " + headerId); + + // rn_bcf_extractor_params_t.setHeader_id(headerId); + rn_bcf_extractor_params.setTech_stack(tech_stack); + rn_bcf_extractor_params.setObject_type(obj_type); + rn_bcf_extractor_params.setSub_object_type(sub_obj_type); + rn_bcf_extractor_params.setFile_code("200"); + rn_bcf_extractor_params.setName_string(name); + rn_bcf_extractor_params.setAddress_string(filePath); + rn_bcf_extractor_params.setReference_address_string(ref_address_string); // FOR OUTPUT FILE PATH + + String fileType = net.lingala.zip4j.util.FileUtils.getFileExtension(finalFile); + rn_bcf_extractor_params.setDescription(fileType); + // IF IT'S YES, THEN FILE WILL BE PROCESSED FOR STATIC AND DYNAMIC EXTRACTION. + rn_bcf_extractor_params.setIs_extraction_enabled(true); + rn_bcf_extractor_params.setIs_creation_enabled(true); + rn_bcf_extractor_params.setAccountId(accId); + rn_bcf_extractor_params.setCreatedBy(userId); + + // SAVING BASE PROJECT FILE PATH IN PARAMS TABLE + //bcf_extractor_params_service.save(rn_bcf_extractor_params_t); + //rn_bcf_extractor.setRn_bcf_extractor_Params(rn_bcf_extractor_params); +// params.add(rn_bcf_extractor_params); +// rn_bcf_extractor.setRn_bcf_extractor_Params(params); +// this.updateById(headerId, rn_bcf_extractor); // need to test + rn_bcf_extractor_params.setRn_bcf_extractor(rn_bcf_extractor); + rn_bcf_extractor_params_service.save(rn_bcf_extractor_params); + } + + } + + @Override + public void moveFiles(int id, String toDir) throws IOException { + File moveToFile = new File(toDir); + // List params_t = getById(id).getRn_bcf_extractor_Params(); + //Rn_Bcf_Extractor extractor = this.getById(id); + //log.debug("extractor : {} ",extractor); + //List params_t = extractor.getRn_bcf_extractor_Params(); + List params_t = rn_bcf_extractor_params_service.getByHeaderId(id); + //log.debug("extractor : {} ", params_t); + for (Rn_Bcf_Extractor_Params params : params_t) { + String fileDirectory = params.getAddress_string(); + + File file = new File(fileDirectory); + String fileName = file.getName(); + + // MOVE ALL FILES INTO PARENT DIRECTORY + System.out.println("File name = " + fileName + "\n" + "Move to = " + toDir); + file.renameTo(new File(moveToFile, file.getName())); + + String destDir = toDir + "/" + fileName; + + // SAVE MOVED DIRECTORY PATH INTO THE PARAMS TABLE + params.setMoved_address_string(destDir); + rn_bcf_extractor_params_service.save(params); + } + // DELETE EMPTY DIRECTORY + this.deleteEmptyDirectory(moveToFile); + + } + + @Override + public void deleteEmptyDirectory(File dir) throws IOException { + if (dir.isDirectory()) { + File[] fList = dir.listFiles(); + if (fList != null) { + for (File file : fList) { + if (!file.isFile()) { + System.out.println("Removing empty directory : " + file.getName()); + file.delete(); + deleteEmptyDirectory(file); + } + } + dir.delete(); + } + } + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Rule_Library_Service.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Rule_Library_Service.java new file mode 100644 index 0000000..bef1318 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Rule_Library_Service.java @@ -0,0 +1,31 @@ +package com.realnet.codeextractor.service; + +import java.util.List; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; + +import com.realnet.codeextractor.entity.Rn_Bcf_Rules; + +public interface Rn_Bcf_Rule_Library_Service { + List getAll(); + + Page getAll(Pageable p); + + Rn_Bcf_Rules getById(int id); + + Rn_Bcf_Rules save(Rn_Bcf_Rules bcf_rule); + + Rn_Bcf_Rules updateById(int id, Rn_Bcf_Rules bcf_rule); + + boolean deleteById(int id); + + List copyRules(String to_tech_stack, String to_object_type, String to_sub_object_type, + String from_tech_stack, String from_object_type, String from_sub_object_type); + + List copyRules2(String from_tech_stack, String from_object_type, String from_sub_object_type); + + // String stringReplace(String str, String start, String end, String + // replaceWith, String file_type); + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Rule_Library_ServiceImpl.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Rule_Library_ServiceImpl.java new file mode 100644 index 0000000..60b5f74 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Rule_Library_ServiceImpl.java @@ -0,0 +1,131 @@ +package com.realnet.codeextractor.service; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Service; + +import com.realnet.codeextractor.entity.Rn_Bcf_Rules; +import com.realnet.codeextractor.repository.Rn_Bcf_Rule_Library_Repository; +import com.realnet.exceptions.ResourceNotFoundException; + +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@Service +public class Rn_Bcf_Rule_Library_ServiceImpl implements Rn_Bcf_Rule_Library_Service { + + @Autowired + private Rn_Bcf_Rule_Library_Repository ruleLibraryRepository; + + @Override + public List getAll() { + return ruleLibraryRepository.findAll(); + } + + @Override + public Page getAll(Pageable page) { + return ruleLibraryRepository.findAll(page); + } + + @Override + public Rn_Bcf_Rules getById(int id) { + Rn_Bcf_Rules bcf_extractor = ruleLibraryRepository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Rule Not Found :: " + id)); + return bcf_extractor; + } + + @Override + public Rn_Bcf_Rules save(Rn_Bcf_Rules bcf_extractor) { + Rn_Bcf_Rules savedExtractor = ruleLibraryRepository.save(bcf_extractor); + return savedExtractor; + } + + @Override + public Rn_Bcf_Rules updateById(int id, Rn_Bcf_Rules ruleRequest) { + Rn_Bcf_Rules old_extractor = ruleLibraryRepository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Rule not found :: " + id)); + + old_extractor.setGroup_id(ruleRequest.getGroup_id()); + old_extractor.setRule_name(ruleRequest.getRule_name()); + old_extractor.setTech_stack(ruleRequest.getTech_stack()); + old_extractor.setObject_type(ruleRequest.getObject_type()); + old_extractor.setSub_object_type(ruleRequest.getSub_object_type()); + old_extractor.setFile_code(ruleRequest.getFile_code()); + old_extractor.setRule_type(ruleRequest.getRule_type()); + old_extractor.setIdentifier_start_string(ruleRequest.getIdentifier_start_string()); + old_extractor.setIdentifier_end_string(ruleRequest.getIdentifier_end_string()); + old_extractor.setReplacement_string(ruleRequest.getReplacement_string()); + + final Rn_Bcf_Rules updated_rule = ruleLibraryRepository.save(old_extractor); + return updated_rule; + } + + @Override + public boolean deleteById(int id) { + if (!ruleLibraryRepository.existsById(id)) { + throw new ResourceNotFoundException("Rule not exist"); + } + Rn_Bcf_Rules rule = ruleLibraryRepository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Rule not found :: " + id)); + ruleLibraryRepository.delete(rule); + return true; + } + +// @Override +// public String stringReplace(String str, String start, String end, String replaceWith, String file_type) { +// int i = str.indexOf(start); +// while (i != -1) { +// int j = str.indexOf(end, i + 1); +// if (j != -1) { +// /* @Include starting and ending string +// * String data = str.substring(0, i + start.length()) + "\n" + replaceWith + "\n"; +// * String temp = str.substring(j); +// * +// * @Not Include starting and ending string +// * String data = str.substring(0, i) + "\n" + replaceWith + "\n"; +// * String temp = str.substring(j + end.length()); +// * */ +// String data = str.substring(0, i) + "\n" + replaceWith + "\n"; +// String temp = str.substring(j + end.length()); +// data += temp; +// str = data; +// i = str.indexOf(start, i + replaceWith.length() + end.length() + 1); +// } else { +// break; +// } +// } +// +//// if (replaced) { +//// String newStart = ""; +//// String newEnd = ""; +//// if(file_type.equals("html") || file_type.equals("jsp")) { +//// newStart = ""; +//// newEnd = ""; +//// str = str.replace(start, newStart); +//// str = str.replace(end, newEnd); +//// } +//// if(file_type.equals("java") || file_type.equals("ts") || file_type.equals("js")) { +//// newStart = "/* bcf-fieldloop-startshere-processed */"; +//// newEnd = "/* bcf-fieldloop-endshere-processed */"; +//// str = str.replace(start, newStart); +//// str = str.replace(end, newEnd); +//// } +//// } +// return str; +// } + + public List copyRules(String to_tech_stack, String to_object_type, String to_sub_object_type,String from_tech_stack,String from_object_type, String from_sub_object_type){ + List rules = ruleLibraryRepository.copyRules(to_tech_stack, to_object_type, to_sub_object_type, from_tech_stack, from_object_type, from_sub_object_type); + log.debug("Nil Copied Rules: {}", rules); + return ruleLibraryRepository.copyRules(to_tech_stack, to_object_type, to_sub_object_type, from_tech_stack, from_object_type, from_sub_object_type); + } + + @Override + public List copyRules2(String from_tech_stack, String from_object_type, String from_sub_object_type) { + return ruleLibraryRepository.copyRules2(from_tech_stack, from_object_type, from_sub_object_type); + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_TechnologyStack_Service.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_TechnologyStack_Service.java new file mode 100644 index 0000000..880efd1 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_TechnologyStack_Service.java @@ -0,0 +1,21 @@ +package com.realnet.codeextractor.service; + +import java.util.List; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; + +import com.realnet.codeextractor.entity.ActiveTechStack_DTO; +import com.realnet.codeextractor.entity.Rn_Bcf_Technology_Stack1; + +public interface Rn_Bcf_TechnologyStack_Service { + List getAll(); + Page getAll(Pageable p); + Rn_Bcf_Technology_Stack1 getById(int id); + Rn_Bcf_Technology_Stack1 save(Rn_Bcf_Technology_Stack1 bcf_tech_stack); + Rn_Bcf_Technology_Stack1 updateById(int id, Rn_Bcf_Technology_Stack1 bcf_tech_stack); + boolean deleteById(int id); + + List getListOfActivateTechnology(); + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_TechnologyStack_ServiceImpl1.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_TechnologyStack_ServiceImpl1.java new file mode 100644 index 0000000..9e77a84 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_TechnologyStack_ServiceImpl1.java @@ -0,0 +1,101 @@ +package com.realnet.codeextractor.service; + +import java.util.ArrayList; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Service; + +import com.realnet.codeextractor.entity.ActiveTechStack_DTO; +import com.realnet.codeextractor.entity.Rn_Bcf_Technology_Stack1; +import com.realnet.codeextractor.repository.Rn_Bcf_TechnologyStack_Repository1; +import com.realnet.exceptions.ResourceNotFoundException; +import com.realnet.utils.Constant; + +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@Service +public class Rn_Bcf_TechnologyStack_ServiceImpl1 implements Rn_Bcf_TechnologyStack_Service { + + @Autowired + private Rn_Bcf_TechnologyStack_Repository1 technologStackRepository; + + @Override + public List getAll() { + return technologStackRepository.findAll(); + } + + @Override + public Page getAll(Pageable page) { + return technologStackRepository.findAll(page); + } + + @Override + public Rn_Bcf_Technology_Stack1 getById(int id) { + Rn_Bcf_Technology_Stack1 bcf_extractor = technologStackRepository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException(Constant.NOT_FOUND_EXCEPTION + id)); + return bcf_extractor; + } + + @Override + public Rn_Bcf_Technology_Stack1 save(Rn_Bcf_Technology_Stack1 bcf_extractor) { + Rn_Bcf_Technology_Stack1 savedTechnology = technologStackRepository.save(bcf_extractor); + return savedTechnology; + } + + @Override + public Rn_Bcf_Technology_Stack1 updateById(int id, Rn_Bcf_Technology_Stack1 technologyRequest) { + Rn_Bcf_Technology_Stack1 old_extractor = technologStackRepository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException(Constant.NOT_FOUND_EXCEPTION + id)); + + old_extractor.setTech_stack(technologyRequest.getTech_stack()); + old_extractor.setTech_stack_key(technologyRequest.getTech_stack_key()); + old_extractor.setBase_prj_file_name(technologyRequest.getBase_prj_file_name()); + old_extractor.setTags(technologyRequest.getTags()); + old_extractor.setActive(technologyRequest.isActive()); + + final Rn_Bcf_Technology_Stack1 updated_technology = technologStackRepository.save(old_extractor); + return updated_technology; + } + + @Override + public boolean deleteById(int id) { + if (!technologStackRepository.existsById(id)) { + throw new ResourceNotFoundException(Constant.NOT_EXIST_EXCEPTION); + } + Rn_Bcf_Technology_Stack1 bcf_extractor = technologStackRepository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException(Constant.NOT_FOUND_EXCEPTION + id)); + technologStackRepository.delete(bcf_extractor); + return true; + } + + @Override + public List getListOfActivateTechnology() { +// List activeTechList = technologStackRepository.activeTechList(); +// log.debug("ACTIVE TECHNOLOGY LIST : {} ", activeTechList); + + List activeTech = technologStackRepository.activeTechStacks(); + log.debug("ACTIVE TECHNOLOGY : {} ", activeTech); + +// activeTech.forEach(data -> { +// ActiveTechStack_DTO dto = new ActiveTechStack_DTO(); +// dto.setId(data.getId()); +// dto.setName(data.getBase_prj_file_name()); +// }); + + List activeTechDTO = new ArrayList(); + for (Rn_Bcf_Technology_Stack1 tech : activeTech) { + ActiveTechStack_DTO dto = new ActiveTechStack_DTO(); + dto.setId(tech.getId()); + dto.setName(tech.getBase_prj_file_name()); + activeTechDTO.add(dto); + } + log.debug("activeTechDTO : {} ", activeTechDTO); + System.out.println("ServiceImpl : activeTechDTO " + activeTechDTO); + return activeTechDTO; + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/service/Rule_library_keywordService.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/service/Rule_library_keywordService.java new file mode 100644 index 0000000..3c479cd --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/service/Rule_library_keywordService.java @@ -0,0 +1,44 @@ +package com.realnet.codeextractor.service; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.realnet.codeextractor.entity.Rule_library_keyword; +import com.realnet.codeextractor.repository.Rule_library_keywordRepository; + + +@Service +public class Rule_library_keywordService { + + @Autowired + private Rule_library_keywordRepository Repository; + + public Rule_library_keyword Savedata(Rule_library_keyword data) { + return Repository.save(data); + } + + public List getdetails() { + return (List) Repository.findAll(); + } + + public Rule_library_keyword getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + public void delete_by_id(Integer id) { + Repository.deleteById(id); + } + + public Rule_library_keyword update(Rule_library_keyword data, Integer id) { + Rule_library_keyword old = Repository.findById(id).get(); + old.setTech_stack(data.getTech_stack()); + old.setObject_type(data.getObject_type()); + old.setSub_object_type(data.getSub_object_type()); + old.setVersion(data.getVersion()); + old.setReplcement_string(data.getReplcement_string()); + final Rule_library_keyword test = Repository.save(old); + return test; + } +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/service/Rule_library_service_gk.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/service/Rule_library_service_gk.java new file mode 100644 index 0000000..7c5d5f9 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test4/codeextractor/service/Rule_library_service_gk.java @@ -0,0 +1,105 @@ +package com.realnet.codeextractor.service; + +import java.io.File; +import java.io.IOException; +import java.nio.charset.StandardCharsets; + +import org.apache.commons.io.FileUtils; +import org.apache.commons.io.FilenameUtils; +import org.json.simple.parser.ParseException; +import org.springframework.stereotype.Service; +import org.springframework.web.bind.annotation.GetMapping; + +@Service +public class Rule_library_service_gk { + + public String rule(String path, String start, String end, String replaceWith) throws ParseException, IOException { + + StringBuilder frontend = new StringBuilder(); + + File staticFile = new File(path); + String staticFileName = staticFile.getName(); + + // System.out.println("========" + staticFileName + "============="); + + String fileString = FileUtils.readFileToString(staticFile, StandardCharsets.UTF_8); + String fileType = FilenameUtils.getExtension(staticFileName); + + // don't check empty file for replacement.. + if (!fileString.isEmpty()) { + + // RULE APPLY + if (end.isEmpty()) { + String f_string = stringReplacewithout_endstring(fileString, start, replaceWith, fileType); + System.out.println(f_string.toString()); + }else { + String finalString = stringReplace(fileString, start, end, replaceWith, fileType); + System.out.println(finalString.toString()); + + } + +// BufferedWriter bw = new BufferedWriter(new FileWriter(staticFile, false)); // replaced +// // string +// bw.write(finalString); +// bw.close(); + + } + + return frontend.toString(); + } + + //WHEN END STRING IS PRESENT + public static String stringReplace(String str, String start, String end, String replaceWith, String file_type) { + int i = str.indexOf(start); + while (i != -1) { + int j = str.indexOf(end, i + 1); + if (j != -1) { + /* + * @Include starting and ending string String data = str.substring(0, i + + * start.length()) + "\n" + replaceWith + "\n"; String temp = str.substring(j); + * + * @Not Include starting and ending string String data = str.substring(0, i) + + * "\n" + replaceWith + "\n"; String temp = str.substring(j + end.length()); + */ +// String data = str.substring(0, i+start.length()) +" "+ replaceWith ; +// String temp = str.substring(j-end.length() + end.length()); + + String data = str.substring(0, i) + start + " " + replaceWith + " " + end; + String temp = str.substring(j + end.length()); + data += temp; + str = data; + i = str.indexOf(start, i + replaceWith.length() + end.length() + 1); + } else { + break; + } + } + + return str; + } + + //WHEN END STRING IS NOT PERSENT + public static String stringReplacewithout_endstring(String str, String start, String replaceWith, String file_type) { + int i = str.indexOf(start); + while (i != -1) { + + /* + * @Include starting and ending string String data = str.substring(0, i + + * start.length()) + "\n" + replaceWith + "\n"; String temp = str.substring(j); + * + * @Not Include starting and ending string String data = str.substring(0, i) + + * "\n" + replaceWith + "\n"; String temp = str.substring(j + end.length()); + */ +// String data = str.substring(0, i+start.length()) +" "+ replaceWith ; +// String temp = str.substring(j-end.length() + end.length()); + + String data = str.substring(0, i) + start + " " + replaceWith ; + str = data; + i = str.indexOf(start, i + replaceWith.length() ); + + } + + return str; + } + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test5/Connector/Controller/ConnectorController.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test5/Connector/Controller/ConnectorController.java new file mode 100644 index 0000000..9f04c2b --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test5/Connector/Controller/ConnectorController.java @@ -0,0 +1,79 @@ +package com.realnet.Connector.Controller; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.Connector.Entity.Connector; +import com.realnet.Connector.Repository.Connectorrepository; +import com.realnet.users.entity.Sys_Accounts; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; + +@RestController +@RequestMapping("/connector") +public class ConnectorController { + + @Autowired + private Connectorrepository connectorrepository; + @Autowired + private AppUserServiceImpl userService; + + + //ADD DATA + @PostMapping("/Connectorjson") + public ResponseEntity save(@RequestBody Connector connector) { + AppUser loggedInUser = userService.getLoggedInUser(); + Long account_id = loggedInUser.getAccount().getAccount_id(); + connector.setAccountId(account_id); + Connector save = connectorrepository.save(connector); + return new ResponseEntity<>(save, HttpStatus.OK); + + } + + //UPDATE BY ID + @PutMapping("/Connectorjson/{id}") + public ResponseEntity update(@PathVariable Long id, @RequestBody Connector connector) { + Connector con = connectorrepository.findById(id).orElseThrow(null); + con.setName(connector.getName()); + con.setConnector_json(connector.getConnector_json()); + + Connector save = connectorrepository.save(con); + return new ResponseEntity<>(save, HttpStatus.OK); + + } + + //GET ALL + @GetMapping("/Connectorjson") + public ResponseEntity getall() { + List save = connectorrepository.findAll(); + return new ResponseEntity<>(save, HttpStatus.OK); + + } + + //GET BY ID + @GetMapping("/Connectorjson/{id}") + public ResponseEntity getbyid(@PathVariable Long id) { + Connector con = connectorrepository.findById(id).orElseThrow(null); + return new ResponseEntity<>(con, HttpStatus.OK); + + } + + //DELETE BY ID + @DeleteMapping("/Connectorjson/{id}") + public void delete(@PathVariable Long id){ + Connector con = connectorrepository.findById(id).orElseThrow(null); + connectorrepository.delete(con); + + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test5/Connector/Controller/MappingController.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test5/Connector/Controller/MappingController.java new file mode 100644 index 0000000..0cb895d --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test5/Connector/Controller/MappingController.java @@ -0,0 +1,104 @@ +package com.realnet.Connector.Controller; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import com.realnet.Connector.Entity.Connector; +import com.realnet.Connector.Entity.Mapping; +import com.realnet.Connector.Repository.Connectorrepository; + +@RestController +@RequestMapping("/token/connector/mapping") +public class MappingController { + + @Autowired + private Connectorrepository connectorrepository; + + @PostMapping("/mapping") + public Object connector(@RequestBody Mapping mapping) { + List list = new ArrayList<>(); + +// Map param = new HashMap(); + String str = mapping.getMappingString(); + JsonParser parser = new JsonParser(); + JsonElement element = parser.parse(str); + JsonObject obj = element.getAsJsonObject(); + + // get key from get api + Set> entries = obj.entrySet(); + for (Map.Entry entry : entries) { + + String key = entry.getKey(); + String string = key.toString(); + list.add(string); + } + return list; + + } + + @PostMapping("/mapping1") + public Object connector1(@RequestBody Mapping mapping) { + List list = new ArrayList<>(); + +// Map param = new HashMap(); + String str = mapping.getMappingString(); + JsonParser parser = new JsonParser(); + JsonElement element = parser.parse(str); + JsonObject obj = element.getAsJsonObject(); + + // get values from get api + Set> entries = obj.entrySet(); + for (Map.Entry entry : entries) { + + String string2 = entry.getValue().getAsString(); + list.add(string2); + } + return list; + + } + + @PostMapping("/mapping2") + public Object getvalue(@RequestBody Mapping mapping) { + List list = new ArrayList<>(); + +// Map param = new HashMap(); + String str = mapping.getMappingString(); + JsonParser parser = new JsonParser(); + JsonElement element = parser.parse(str); + JsonObject obj = element.getAsJsonObject(); + + // get values from get api + Set> entries = obj.entrySet(); + for (Map.Entry entry : entries) { + + String string2 = entry.getValue().getAsString(); + list.add(string2); + } + return list; + + } + + // get api for call connector by name for job(by gk) + @GetMapping("/connectorname/{name}") + public ResponseEntity getconnector(@PathVariable String name) { + Connector save = connectorrepository.findconnectorbyname(name); + return new ResponseEntity<>(save, HttpStatus.OK); + + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test5/Connector/Entity/Connector.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test5/Connector/Entity/Connector.java new file mode 100644 index 0000000..8de5289 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test5/Connector/Entity/Connector.java @@ -0,0 +1,33 @@ +package com.realnet.Connector.Entity; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Lob; +import javax.persistence.Column; + +import com.realnet.Dashboard1.Entity.dashbord_Who_collumn; + +import lombok.Data; + +@Entity +@Data +public class Connector extends dashbord_Who_collumn { + + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String name; + @Column(length = 15000) + private String get_str; + @Lob + private String connector_json; + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test5/Connector/Entity/Mapping.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test5/Connector/Entity/Mapping.java new file mode 100644 index 0000000..0e23d56 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test5/Connector/Entity/Mapping.java @@ -0,0 +1,9 @@ +package com.realnet.Connector.Entity; + +import lombok.Data; + +@Data +public class Mapping { + + private String mappingString; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/BaseProject/test5/Connector/Repository/Connectorrepository.java b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test5/Connector/Repository/Connectorrepository.java new file mode 100644 index 0000000..1d83c69 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/BaseProject/test5/Connector/Repository/Connectorrepository.java @@ -0,0 +1,15 @@ +package com.realnet.Connector.Repository; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.stereotype.Repository; + +import com.realnet.Connector.Entity.Connector; +@Repository +public interface Connectorrepository extends JpaRepository{ + + + @Query(value = "select * from connector where name=?1", nativeQuery = true) + Connector findconnectorbyname(String name); + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/BRD Lead Research (1)_1702204592889.xlsx b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/BRD Lead Research (1)_1702204592889.xlsx new file mode 100644 index 0000000..b2c78a8 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/BRD Lead Research (1)_1702204592889.xlsx differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/BRD Lead Research.xlsx_1702061306652 b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/BRD Lead Research.xlsx_1702061306652 new file mode 100644 index 0000000..0776c73 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/BRD Lead Research.xlsx_1702061306652 differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/BRD Lead Research.xlsx_1702061322914 b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/BRD Lead Research.xlsx_1702061322914 new file mode 100644 index 0000000..0776c73 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/BRD Lead Research.xlsx_1702061322914 differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/BRD Lead Research_1702064198316.xlsx b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/BRD Lead Research_1702064198316.xlsx new file mode 100644 index 0000000..0776c73 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/BRD Lead Research_1702064198316.xlsx differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/BRD Lead Research_1702099911160.xlsx b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/BRD Lead Research_1702099911160.xlsx new file mode 100644 index 0000000..0776c73 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/BRD Lead Research_1702099911160.xlsx differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/BRD Lead Research_1702100584709.xlsx b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/BRD Lead Research_1702100584709.xlsx new file mode 100644 index 0000000..0776c73 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/BRD Lead Research_1702100584709.xlsx differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/BRD Lead Research_1702106670593.xlsx b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/BRD Lead Research_1702106670593.xlsx new file mode 100644 index 0000000..0776c73 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/BRD Lead Research_1702106670593.xlsx differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Company_1702203812932.xlsx b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Company_1702203812932.xlsx new file mode 100644 index 0000000..2f36963 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Company_1702203812932.xlsx differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Gaurav Kumar (2)_1702099252056.docx b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Gaurav Kumar (2)_1702099252056.docx new file mode 100644 index 0000000..a9dd678 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Gaurav Kumar (2)_1702099252056.docx differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Gaurav Kumar_1702204586756.pdf b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Gaurav Kumar_1702204586756.pdf new file mode 100644 index 0000000..717442a Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Gaurav Kumar_1702204586756.pdf differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/HSI_220x100.jpg_1702053167198 b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/HSI_220x100.jpg_1702053167198 new file mode 100644 index 0000000..e74ac98 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/HSI_220x100.jpg_1702053167198 differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/HSI_220x100.jpg_1702053169266 b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/HSI_220x100.jpg_1702053169266 new file mode 100644 index 0000000..e74ac98 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/HSI_220x100.jpg_1702053169266 differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Lead Research Sample Report_1702062431957.pdf b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Lead Research Sample Report_1702062431957.pdf new file mode 100644 index 0000000..a1299c7 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Lead Research Sample Report_1702062431957.pdf differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Lead Research Sample Report_1702064196341.pdf b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Lead Research Sample Report_1702064196341.pdf new file mode 100644 index 0000000..a1299c7 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Lead Research Sample Report_1702064196341.pdf differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Lead Research Sample Report_1702065610144.pdf b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Lead Research Sample Report_1702065610144.pdf new file mode 100644 index 0000000..a1299c7 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Lead Research Sample Report_1702065610144.pdf differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Lead Research Sample Report_1702099246272.pdf b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Lead Research Sample Report_1702099246272.pdf new file mode 100644 index 0000000..a1299c7 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Lead Research Sample Report_1702099246272.pdf differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Lead Research Sample Report_1702099909415.pdf b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Lead Research Sample Report_1702099909415.pdf new file mode 100644 index 0000000..a1299c7 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Lead Research Sample Report_1702099909415.pdf differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Lead Research Sample Report_1702106507641.pdf b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Lead Research Sample Report_1702106507641.pdf new file mode 100644 index 0000000..a1299c7 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Lead Research Sample Report_1702106507641.pdf differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Sample Attendance App.docx_1702061299332 b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Sample Attendance App.docx_1702061299332 new file mode 100644 index 0000000..3bd5dce Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Sample Attendance App.docx_1702061299332 differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Sample Attendance App.docx_1702061303418 b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Sample Attendance App.docx_1702061303418 new file mode 100644 index 0000000..3bd5dce Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Sample Attendance App.docx_1702061303418 differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Sample Attendance App.docx_1702061319760 b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Sample Attendance App.docx_1702061319760 new file mode 100644 index 0000000..3bd5dce Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Sample Attendance App.docx_1702061319760 differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Sample Attendance App_1702103968567.docx b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Sample Attendance App_1702103968567.docx new file mode 100644 index 0000000..3bd5dce Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Sample Attendance App_1702103968567.docx differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Sample Attendance App_1702103972049.docx b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Sample Attendance App_1702103972049.docx new file mode 100644 index 0000000..3bd5dce Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Sample Attendance App_1702103972049.docx differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Sample Attendance App_1702106509297.docx b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Sample Attendance App_1702106509297.docx new file mode 100644 index 0000000..3bd5dce Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Sample Attendance App_1702106509297.docx differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Sample Attendance App_1702106672547.docx b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Sample Attendance App_1702106672547.docx new file mode 100644 index 0000000..3bd5dce Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/Sample Attendance App_1702106672547.docx differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/WhatsApp Image 2023-08-05 at 9.18.54 AM.jpeg_1702061316216 b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/WhatsApp Image 2023-08-05 at 9.18.54 AM.jpeg_1702061316216 new file mode 100644 index 0000000..6618380 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/WhatsApp Image 2023-08-05 at 9.18.54 AM.jpeg_1702061316216 differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/WhatsApp Image 2023-08-05 at 9.18.54 AM.jpeg_1702061329316 b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/WhatsApp Image 2023-08-05 at 9.18.54 AM.jpeg_1702061329316 new file mode 100644 index 0000000..6618380 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/WhatsApp Image 2023-08-05 at 9.18.54 AM.jpeg_1702061329316 differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/cldnsure_1702111863905.png b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/cldnsure_1702111863905.png new file mode 100644 index 0000000..890f7bd Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/cldnsure_1702111863905.png differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image (7).png_1702053045347 b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image (7).png_1702053045347 new file mode 100644 index 0000000..8d8252d Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image (7).png_1702053045347 differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image (7).png_1702053046798 b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image (7).png_1702053046798 new file mode 100644 index 0000000..8d8252d Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image (7).png_1702053046798 differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image (7).png_1702053157144 b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image (7).png_1702053157144 new file mode 100644 index 0000000..8d8252d Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image (7).png_1702053157144 differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image (7).png_1702053158727 b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image (7).png_1702053158727 new file mode 100644 index 0000000..8d8252d Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image (7).png_1702053158727 differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image (7).png_1702053160254 b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image (7).png_1702053160254 new file mode 100644 index 0000000..8d8252d Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image (7).png_1702053160254 differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image (7).png_1702053164353 b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image (7).png_1702053164353 new file mode 100644 index 0000000..8d8252d Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image (7).png_1702053164353 differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image (7).png_1702054747220 b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image (7).png_1702054747220 new file mode 100644 index 0000000..8d8252d Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image (7).png_1702054747220 differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image (7)_1702062428052.png b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image (7)_1702062428052.png new file mode 100644 index 0000000..8d8252d Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image (7)_1702062428052.png differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image (7)_1702111862466.png b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image (7)_1702111862466.png new file mode 100644 index 0000000..8d8252d Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image (7)_1702111862466.png differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image.png_1702026483662 b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image.png_1702026483662 new file mode 100644 index 0000000..345120d Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image.png_1702026483662 differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image.png_1702052987565 b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image.png_1702052987565 new file mode 100644 index 0000000..345120d Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image.png_1702052987565 differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image.png_1702052989394 b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image.png_1702052989394 new file mode 100644 index 0000000..345120d Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image.png_1702052989394 differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image.png_1702053989661 b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image.png_1702053989661 new file mode 100644 index 0000000..345120d Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image.png_1702053989661 differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image_1702203806261.png b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image_1702203806261.png new file mode 100644 index 0000000..345120d Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image_1702203806261.png differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image_1702204580473.png b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image_1702204580473.png new file mode 100644 index 0000000..345120d Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/image_1702204580473.png differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/logo_1702203804424.png b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/logo_1702203804424.png new file mode 100644 index 0000000..dd996b9 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/logo_1702203804424.png differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/paytm1.png_1702053992704 b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/paytm1.png_1702053992704 new file mode 100644 index 0000000..729484c Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/paytm1.png_1702053992704 differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/paytm1.png_1702054745710 b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/paytm1.png_1702054745710 new file mode 100644 index 0000000..729484c Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/paytm1.png_1702054745710 differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/paytm1.png_1702057782909 b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/paytm1.png_1702057782909 new file mode 100644 index 0000000..729484c Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/paytm1.png_1702057782909 differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/paytm1.png_1702057784287 b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/paytm1.png_1702057784287 new file mode 100644 index 0000000..729484c Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/paytm1.png_1702057784287 differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/paytm1_1702103970155.png b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/paytm1_1702103970155.png new file mode 100644 index 0000000..729484c Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/paytm1_1702103970155.png differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/paytm1_1702111860859.png b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/paytm1_1702111860859.png new file mode 100644 index 0000000..729484c Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/paytm1_1702111860859.png differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/paytm1_1703226744275.png b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/paytm1_1703226744275.png new file mode 100644 index 0000000..729484c Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/paytm1_1703226744275.png differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/razorpay.png_1702027659349 b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/razorpay.png_1702027659349 new file mode 100644 index 0000000..465275c Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/razorpay.png_1702027659349 differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/razorpay.png_1702053042156 b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/razorpay.png_1702053042156 new file mode 100644 index 0000000..465275c Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/razorpay.png_1702053042156 differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/razorpay.png_1702053043732 b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/razorpay.png_1702053043732 new file mode 100644 index 0000000..465275c Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/razorpay.png_1702053043732 differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/razorpay.png_1702053809714 b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/razorpay.png_1702053809714 new file mode 100644 index 0000000..465275c Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/razorpay.png_1702053809714 differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/razorpay.png_1702053812252 b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/razorpay.png_1702053812252 new file mode 100644 index 0000000..465275c Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/razorpay.png_1702053812252 differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/razorpay.png_1702053991139 b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/razorpay.png_1702053991139 new file mode 100644 index 0000000..465275c Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/razorpay.png_1702053991139 differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/razorpay.png_1702054744200 b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/razorpay.png_1702054744200 new file mode 100644 index 0000000..465275c Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/razorpay.png_1702054744200 differ diff --git a/prod116rb-back-b/authsec_springboot/backend/Resources/Files/sample2-v1.0.2_1702100581391.zip b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/sample2-v1.0.2_1702100581391.zip new file mode 100644 index 0000000..1586595 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/Resources/Files/sample2-v1.0.2_1702100581391.zip differ diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/Abc.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/Abc.java new file mode 100644 index 0000000..5c33750 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/Abc.java @@ -0,0 +1,18 @@ +package com.realnet.Abc_1665647440047_back.Entity; + import lombok.*; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + @Entity + @Data + public class Abc{ + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String name; + private int name_id; + + } \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/AbcController.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/AbcController.java new file mode 100644 index 0000000..4b90753 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/AbcController.java @@ -0,0 +1,42 @@ +package com.realnet.Abc_1665647440047_back.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import com.realnet.Abc_1665647440047_back.Entity.Abc; +import com.realnet.Abc_1665647440047_back.Services.AbcService ; +@RequestMapping(value = "/_1665647440047_back") +@RestController +public class AbcController { + + @Autowired + private AbcService Service; + + @PostMapping("/Abc") + + public Abc Savedata(@RequestBody Abc data) { + Abc save = Service.Savedata(data) ; + return save; + } + + + @GetMapping("/Abc") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Abc/{id}") + public Abc getdetailsbyId(@PathVariable Long id ) { + Abc get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Abc/{id}") + public void delete_by_id(@PathVariable Long id ) { + Service.delete_by_id(id); + + } +@PutMapping("/Abc/{id}") + public Abc update(@RequestBody Abc data,@PathVariable Long id ) { + Abc update = Service.update(data,id); + return update; + } +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/AbcRepository.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/AbcRepository.java new file mode 100644 index 0000000..2576449 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/AbcRepository.java @@ -0,0 +1,13 @@ +package com.realnet.Abc_1665647440047_back.Repository; + + +import org.springframework.data.jpa.repository.JpaRepository; + +import org.springframework.stereotype.Repository; + + +import com.realnet.Abc_1665647440047_back.Entity.Abc; + +@Repository +public interface AbcRepository extends JpaRepository { +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/AbcService.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/AbcService.java new file mode 100644 index 0000000..a26061b --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/AbcService.java @@ -0,0 +1,37 @@ +package com.realnet.Abc_1665647440047_back.Services; +import com.realnet.Abc_1665647440047_back.Repository.AbcRepository; +import com.realnet.Abc_1665647440047_back.Entity.Abc;import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Service; + +@Service + public class AbcService { +@Autowired +private AbcRepository Repository; +public Abc Savedata(Abc data) { + return Repository.save(data); + } + + +public List getdetails() { + return (List) Repository.findAll(); + } + + +public Abc getdetailsbyId(Long id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Long id) { + Repository.deleteById(id); +} + + +public Abc update(Abc data,Long id) { + Abc old = Repository.findById(id).get(); +old.setName(data.getName()); +old.setName_id(data.getName_id()); +final Abc test = Repository.save(old); + return test;}} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/static_code/SE_Abc.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/static_code/SE_Abc.java new file mode 100644 index 0000000..792402e --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/static_code/SE_Abc.java @@ -0,0 +1,18 @@ +"package com.realnet.+""+.Entity;" + "\r\n" + +" import lombok.*;" + "\r\n" + +" import javax.persistence.*;" + "\r\n" + +" import java.time.LocalDateTime;" + "\r\n" + +" import java.util.*;" + "\r\n" + +"" + "\r\n" + +" @Entity " + "\r\n" + +" @Data" + "\r\n" + +" public class Abc{ " + "\r\n" + +"" + "\r\n" + +" @Id" + "\r\n" + +" @GeneratedValue(strategy = GenerationType.IDENTITY)" + "\r\n" + +" private Long id;" + "\r\n" + +"" + "\r\n" + +" private String name;" + "\r\n" + +" private int name_id;" + "\r\n" + +"" + "\r\n" + +" }" \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/static_code/SE_AbcController.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/static_code/SE_AbcController.java new file mode 100644 index 0000000..ec46b16 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/static_code/SE_AbcController.java @@ -0,0 +1,42 @@ +"package com.realnet.+""+.Controllers;" + "\r\n" + +"import java.util.List;" + "\r\n" + +"import org.springframework.beans.factory.annotation.Autowired;" + "\r\n" + +" import org.springframework.web.bind.annotation.*;" + "\r\n" + +"import com.realnet.+""+.Entity.Abc;" + "\r\n" + +"import com.realnet.+""+.Services.AbcService ;" + "\r\n" + +"@RequestMapping(value = \"/_1665647440047_back\")" + "\r\n" + +"@RestController" + "\r\n" + +"public class AbcController {" + "\r\n" + +" " + "\r\n" + +" @Autowired" + "\r\n" + +" private AbcService Service;" + "\r\n" + +"" + "\r\n" + +" @PostMapping(\"/Abc\")" + "\r\n" + +" " + "\r\n" + +" public Abc Savedata(@RequestBody Abc data) {" + "\r\n" + +" Abc save = Service.Savedata(data) ;" + "\r\n" + +" return save;" + "\r\n" + +" }" + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" @GetMapping(\"/Abc\")" + "\r\n" + +" public List getdetails() {" + "\r\n" + +" List get = Service.getdetails(); " + "\r\n" + +" return get;" + "\r\n" + +"}" + "\r\n" + +"@GetMapping(\"/Abc/{id}\")" + "\r\n" + +" public Abc getdetailsbyId(@PathVariable Long id ) {" + "\r\n" + +" Abc get = Service.getdetailsbyId(id);" + "\r\n" + +" return get;" + "\r\n" + +" }" + "\r\n" + +"@DeleteMapping(\"/Abc/{id}\")" + "\r\n" + +" public void delete_by_id(@PathVariable Long id ) {" + "\r\n" + +" Service.delete_by_id(id);" + "\r\n" + +" " + "\r\n" + +" }" + "\r\n" + +"@PutMapping(\"/Abc/{id}\")" + "\r\n" + +" public Abc update(@RequestBody Abc data,@PathVariable Long id ) {" + "\r\n" + +" Abc update = Service.update(data,id);" + "\r\n" + +" return update;" + "\r\n" + +" }" + "\r\n" + +"}" \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/static_code/SE_AbcRepository.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/static_code/SE_AbcRepository.java new file mode 100644 index 0000000..d4650e5 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/static_code/SE_AbcRepository.java @@ -0,0 +1,13 @@ +"package com.realnet.+""+.Repository;" + "\r\n" + +"" + "\r\n" + +"" + "\r\n" + +"import org.springframework.data.jpa.repository.JpaRepository;" + "\r\n" + +"" + "\r\n" + +"import org.springframework.stereotype.Repository;" + "\r\n" + +" " + "\r\n" + +"" + "\r\n" + +"import com.realnet.+""+.Entity.Abc;" + "\r\n" + +"" + "\r\n" + +"@Repository" + "\r\n" + +"public interface AbcRepository extends JpaRepository { " + "\r\n" + +"}" \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/static_code/SE_AbcService.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/static_code/SE_AbcService.java new file mode 100644 index 0000000..a435283 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/static_code/SE_AbcService.java @@ -0,0 +1,37 @@ +"package com.realnet.+""+.Services;" + "\r\n" + +"import com.realnet.+""+.Repository.AbcRepository;" + "\r\n" + +"import com.realnet.+""+.Entity.Abc;import java.util.List;" + "\r\n" + +"" + "\r\n" + +"import org.springframework.beans.factory.annotation.Autowired;" + "\r\n" + +" import org.springframework.stereotype.Service;" + "\r\n" + +"" + "\r\n" + +"@Service" + "\r\n" + +" public class AbcService {" + "\r\n" + +"@Autowired" + "\r\n" + +"private AbcRepository Repository;" + "\r\n" + +"public Abc Savedata(Abc data) {" + "\r\n" + +" return Repository.save(data); " + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" " + "\r\n" + +"public List getdetails() {" + "\r\n" + +" return (List) Repository.findAll();" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +"" + "\r\n" + +"public Abc getdetailsbyId(Long id) {" + "\r\n" + +" return Repository.findById(id).get();" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +"" + "\r\n" + +" public void delete_by_id(Long id) {" + "\r\n" + +" Repository.deleteById(id);" + "\r\n" + +"}" + "\r\n" + +"" + "\r\n" + +"" + "\r\n" + +"public Abc update(Abc data,Long id) {" + "\r\n" + +" Abc old = Repository.findById(id).get();" + "\r\n" + +"old.setName(data.getName());" + "\r\n" + +"old.setName_id(data.getName_id());" + "\r\n" + +"final Abc test = Repository.save(old);" + "\r\n" + +" return test;}}" \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/Abc.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/Abc.java new file mode 100644 index 0000000..5c33750 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/Abc.java @@ -0,0 +1,18 @@ +package com.realnet.Abc_1665647440047_back.Entity; + import lombok.*; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + @Entity + @Data + public class Abc{ + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String name; + private int name_id; + + } \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/AbcController.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/AbcController.java new file mode 100644 index 0000000..4b90753 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/AbcController.java @@ -0,0 +1,42 @@ +package com.realnet.Abc_1665647440047_back.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import com.realnet.Abc_1665647440047_back.Entity.Abc; +import com.realnet.Abc_1665647440047_back.Services.AbcService ; +@RequestMapping(value = "/_1665647440047_back") +@RestController +public class AbcController { + + @Autowired + private AbcService Service; + + @PostMapping("/Abc") + + public Abc Savedata(@RequestBody Abc data) { + Abc save = Service.Savedata(data) ; + return save; + } + + + @GetMapping("/Abc") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Abc/{id}") + public Abc getdetailsbyId(@PathVariable Long id ) { + Abc get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Abc/{id}") + public void delete_by_id(@PathVariable Long id ) { + Service.delete_by_id(id); + + } +@PutMapping("/Abc/{id}") + public Abc update(@RequestBody Abc data,@PathVariable Long id ) { + Abc update = Service.update(data,id); + return update; + } +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/AbcRepository.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/AbcRepository.java new file mode 100644 index 0000000..2576449 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/AbcRepository.java @@ -0,0 +1,13 @@ +package com.realnet.Abc_1665647440047_back.Repository; + + +import org.springframework.data.jpa.repository.JpaRepository; + +import org.springframework.stereotype.Repository; + + +import com.realnet.Abc_1665647440047_back.Entity.Abc; + +@Repository +public interface AbcRepository extends JpaRepository { +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/AbcService.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/AbcService.java new file mode 100644 index 0000000..a26061b --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/AbcService.java @@ -0,0 +1,37 @@ +package com.realnet.Abc_1665647440047_back.Services; +import com.realnet.Abc_1665647440047_back.Repository.AbcRepository; +import com.realnet.Abc_1665647440047_back.Entity.Abc;import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Service; + +@Service + public class AbcService { +@Autowired +private AbcRepository Repository; +public Abc Savedata(Abc data) { + return Repository.save(data); + } + + +public List getdetails() { + return (List) Repository.findAll(); + } + + +public Abc getdetailsbyId(Long id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Long id) { + Repository.deleteById(id); +} + + +public Abc update(Abc data,Long id) { + Abc old = Repository.findById(id).get(); +old.setName(data.getName()); +old.setName_id(data.getName_id()); +final Abc test = Repository.save(old); + return test;}} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/static_code/SE_Abc.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/static_code/SE_Abc.java new file mode 100644 index 0000000..ed67b94 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/static_code/SE_Abc.java @@ -0,0 +1,18 @@ +"package com.realnet.+repo_name+.Entity;" + "\r\n" + +" import lombok.*;" + "\r\n" + +" import javax.persistence.*;" + "\r\n" + +" import java.time.LocalDateTime;" + "\r\n" + +" import java.util.*;" + "\r\n" + +"" + "\r\n" + +" @Entity " + "\r\n" + +" @Data" + "\r\n" + +" public class Abc{ " + "\r\n" + +"" + "\r\n" + +" @Id" + "\r\n" + +" @GeneratedValue(strategy = GenerationType.IDENTITY)" + "\r\n" + +" private Long id;" + "\r\n" + +"" + "\r\n" + +" private String name;" + "\r\n" + +" private int name_id;" + "\r\n" + +"" + "\r\n" + +" }" \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/static_code/SE_AbcController.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/static_code/SE_AbcController.java new file mode 100644 index 0000000..5222d4c --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/static_code/SE_AbcController.java @@ -0,0 +1,42 @@ +"package com.realnet.+repo_name+.Controllers;" + "\r\n" + +"import java.util.List;" + "\r\n" + +"import org.springframework.beans.factory.annotation.Autowired;" + "\r\n" + +" import org.springframework.web.bind.annotation.*;" + "\r\n" + +"import com.realnet.+repo_name+.Entity.Abc;" + "\r\n" + +"import com.realnet.+repo_name+.Services.AbcService ;" + "\r\n" + +"@RequestMapping(value = \"/_1665647440047_back\")" + "\r\n" + +"@RestController" + "\r\n" + +"public class AbcController {" + "\r\n" + +" " + "\r\n" + +" @Autowired" + "\r\n" + +" private AbcService Service;" + "\r\n" + +"" + "\r\n" + +" @PostMapping(\"/Abc\")" + "\r\n" + +" " + "\r\n" + +" public Abc Savedata(@RequestBody Abc data) {" + "\r\n" + +" Abc save = Service.Savedata(data) ;" + "\r\n" + +" return save;" + "\r\n" + +" }" + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" @GetMapping(\"/Abc\")" + "\r\n" + +" public List getdetails() {" + "\r\n" + +" List get = Service.getdetails(); " + "\r\n" + +" return get;" + "\r\n" + +"}" + "\r\n" + +"@GetMapping(\"/Abc/{id}\")" + "\r\n" + +" public Abc getdetailsbyId(@PathVariable Long id ) {" + "\r\n" + +" Abc get = Service.getdetailsbyId(id);" + "\r\n" + +" return get;" + "\r\n" + +" }" + "\r\n" + +"@DeleteMapping(\"/Abc/{id}\")" + "\r\n" + +" public void delete_by_id(@PathVariable Long id ) {" + "\r\n" + +" Service.delete_by_id(id);" + "\r\n" + +" " + "\r\n" + +" }" + "\r\n" + +"@PutMapping(\"/Abc/{id}\")" + "\r\n" + +" public Abc update(@RequestBody Abc data,@PathVariable Long id ) {" + "\r\n" + +" Abc update = Service.update(data,id);" + "\r\n" + +" return update;" + "\r\n" + +" }" + "\r\n" + +"}" \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/static_code/SE_AbcRepository.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/static_code/SE_AbcRepository.java new file mode 100644 index 0000000..1b6bd38 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/static_code/SE_AbcRepository.java @@ -0,0 +1,13 @@ +"package com.realnet.+repo_name+.Repository;" + "\r\n" + +"" + "\r\n" + +"" + "\r\n" + +"import org.springframework.data.jpa.repository.JpaRepository;" + "\r\n" + +"" + "\r\n" + +"import org.springframework.stereotype.Repository;" + "\r\n" + +" " + "\r\n" + +"" + "\r\n" + +"import com.realnet.+repo_name+.Entity.Abc;" + "\r\n" + +"" + "\r\n" + +"@Repository" + "\r\n" + +"public interface AbcRepository extends JpaRepository { " + "\r\n" + +"}" \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/static_code/SE_AbcService.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/static_code/SE_AbcService.java new file mode 100644 index 0000000..678771a --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/static_code/SE_AbcService.java @@ -0,0 +1,37 @@ +"package com.realnet.+repo_name+.Services;" + "\r\n" + +"import com.realnet.+repo_name+.Repository.AbcRepository;" + "\r\n" + +"import com.realnet.+repo_name+.Entity.Abc;import java.util.List;" + "\r\n" + +"" + "\r\n" + +"import org.springframework.beans.factory.annotation.Autowired;" + "\r\n" + +" import org.springframework.stereotype.Service;" + "\r\n" + +"" + "\r\n" + +"@Service" + "\r\n" + +" public class AbcService {" + "\r\n" + +"@Autowired" + "\r\n" + +"private AbcRepository Repository;" + "\r\n" + +"public Abc Savedata(Abc data) {" + "\r\n" + +" return Repository.save(data); " + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" " + "\r\n" + +"public List getdetails() {" + "\r\n" + +" return (List) Repository.findAll();" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +"" + "\r\n" + +"public Abc getdetailsbyId(Long id) {" + "\r\n" + +" return Repository.findById(id).get();" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +"" + "\r\n" + +" public void delete_by_id(Long id) {" + "\r\n" + +" Repository.deleteById(id);" + "\r\n" + +"}" + "\r\n" + +"" + "\r\n" + +"" + "\r\n" + +"public Abc update(Abc data,Long id) {" + "\r\n" + +" Abc old = Repository.findById(id).get();" + "\r\n" + +"old.setName(data.getName());" + "\r\n" + +"old.setName_id(data.getName_id());" + "\r\n" + +"final Abc test = Repository.save(old);" + "\r\n" + +" return test;}}" \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/Abc.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/Abc.java new file mode 100644 index 0000000..5c33750 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/Abc.java @@ -0,0 +1,18 @@ +package com.realnet.Abc_1665647440047_back.Entity; + import lombok.*; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + @Entity + @Data + public class Abc{ + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String name; + private int name_id; + + } \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/AbcController.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/AbcController.java new file mode 100644 index 0000000..4b90753 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/AbcController.java @@ -0,0 +1,42 @@ +package com.realnet.Abc_1665647440047_back.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import com.realnet.Abc_1665647440047_back.Entity.Abc; +import com.realnet.Abc_1665647440047_back.Services.AbcService ; +@RequestMapping(value = "/_1665647440047_back") +@RestController +public class AbcController { + + @Autowired + private AbcService Service; + + @PostMapping("/Abc") + + public Abc Savedata(@RequestBody Abc data) { + Abc save = Service.Savedata(data) ; + return save; + } + + + @GetMapping("/Abc") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Abc/{id}") + public Abc getdetailsbyId(@PathVariable Long id ) { + Abc get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Abc/{id}") + public void delete_by_id(@PathVariable Long id ) { + Service.delete_by_id(id); + + } +@PutMapping("/Abc/{id}") + public Abc update(@RequestBody Abc data,@PathVariable Long id ) { + Abc update = Service.update(data,id); + return update; + } +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/AbcRepository.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/AbcRepository.java new file mode 100644 index 0000000..2576449 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/AbcRepository.java @@ -0,0 +1,13 @@ +package com.realnet.Abc_1665647440047_back.Repository; + + +import org.springframework.data.jpa.repository.JpaRepository; + +import org.springframework.stereotype.Repository; + + +import com.realnet.Abc_1665647440047_back.Entity.Abc; + +@Repository +public interface AbcRepository extends JpaRepository { +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/AbcService.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/AbcService.java new file mode 100644 index 0000000..a26061b --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/AbcService.java @@ -0,0 +1,37 @@ +package com.realnet.Abc_1665647440047_back.Services; +import com.realnet.Abc_1665647440047_back.Repository.AbcRepository; +import com.realnet.Abc_1665647440047_back.Entity.Abc;import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Service; + +@Service + public class AbcService { +@Autowired +private AbcRepository Repository; +public Abc Savedata(Abc data) { + return Repository.save(data); + } + + +public List getdetails() { + return (List) Repository.findAll(); + } + + +public Abc getdetailsbyId(Long id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Long id) { + Repository.deleteById(id); +} + + +public Abc update(Abc data,Long id) { + Abc old = Repository.findById(id).get(); +old.setName(data.getName()); +old.setName_id(data.getName_id()); +final Abc test = Repository.save(old); + return test;}} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/static_code/SE_Abc.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/static_code/SE_Abc.java new file mode 100644 index 0000000..c2de4a5 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/static_code/SE_Abc.java @@ -0,0 +1,26 @@ +"package com.realnet."+repo_name+".Entity;" + "\r\n" + +" import lombok.*;" + "\r\n" + +" import javax.persistence.*;" + "\r\n" + +" import java.time.LocalDateTime;" + "\r\n" + +" import java.util.*;" + "\r\n" + +"" + "\r\n" + +" @Entity " + "\r\n" + +" @Data" + "\r\n" + +" public class "+table_name+"{ " + "\r\n" + +"" + "\r\n" + +" "+ for (Entry e : entrySet) { + + String string = e.getKey().toLowerCase(); + String datatype = e.getValue().toString(); + String lowerCase = string.replaceAll(" ", "_").toLowerCase(); + String add = "n private " + datatype + " " + lowerCase + ";"; + "+table_name+"1Code.append(add); + } + "+table_name+"1Code.append("n}nr"); +"" + "\r\n" + +" @GeneratedValue(strategy = GenerationType.IDENTITY)" + "\r\n" + +" private Long id;" + "\r\n" + +"" + "\r\n" + +" private String name;" + "\r\n" + +" private int name_id;" + "\r\n" + +"" + "\r\n" + +" }" \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/static_code/SE_AbcController.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/static_code/SE_AbcController.java new file mode 100644 index 0000000..aa91466 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/static_code/SE_AbcController.java @@ -0,0 +1,42 @@ +"package com.realnet."+repo_name+".Controllers;" + "\r\n" + +"import java.util.List;" + "\r\n" + +"import org.springframework.beans.factory.annotation.Autowired;" + "\r\n" + +" import org.springframework.web.bind.annotation.*;" + "\r\n" + +"import com.realnet."+repo_name+".Entity."+table_name+";" + "\r\n" + +"import com.realnet."+repo_name+".Services."+table_name+"Service ;" + "\r\n" + +"@RequestMapping(value = \"/_1665647440047_back\")" + "\r\n" + +"@RestController" + "\r\n" + +"public class "+table_name+"Controller {" + "\r\n" + +" " + "\r\n" + +" @Autowired" + "\r\n" + +" private "+table_name+"Service Service;" + "\r\n" + +"" + "\r\n" + +" @PostMapping(\"/"+table_name+"\")" + "\r\n" + +" " + "\r\n" + +" public "+table_name+" Savedata(@RequestBody "+table_name+" data) {" + "\r\n" + +" "+table_name+" save = Service.Savedata(data) ;" + "\r\n" + +" return save;" + "\r\n" + +" }" + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" @GetMapping(\"/"+table_name+"\")" + "\r\n" + +" public List<"+table_name+"> getdetails() {" + "\r\n" + +" List<"+table_name+"> get = Service.getdetails(); " + "\r\n" + +" return get;" + "\r\n" + +"}" + "\r\n" + +"@GetMapping(\"/"+table_name+"/{id}\")" + "\r\n" + +" public "+table_name+" getdetailsbyId(@PathVariable Long id ) {" + "\r\n" + +" "+table_name+" get = Service.getdetailsbyId(id);" + "\r\n" + +" return get;" + "\r\n" + +" }" + "\r\n" + +"@DeleteMapping(\"/"+table_name+"/{id}\")" + "\r\n" + +" public void delete_by_id(@PathVariable Long id ) {" + "\r\n" + +" Service.delete_by_id(id);" + "\r\n" + +" " + "\r\n" + +" }" + "\r\n" + +"@PutMapping(\"/"+table_name+"/{id}\")" + "\r\n" + +" public "+table_name+" update(@RequestBody "+table_name+" data,@PathVariable Long id ) {" + "\r\n" + +" "+table_name+" update = Service.update(data,id);" + "\r\n" + +" return update;" + "\r\n" + +" }" + "\r\n" + +"}" \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/static_code/SE_AbcRepository.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/static_code/SE_AbcRepository.java new file mode 100644 index 0000000..cd27a5d --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/static_code/SE_AbcRepository.java @@ -0,0 +1,13 @@ +"package com.realnet."+repo_name+".Repository;" + "\r\n" + +"" + "\r\n" + +"" + "\r\n" + +"import org.springframework.data.jpa.repository.JpaRepository;" + "\r\n" + +"" + "\r\n" + +"import org.springframework.stereotype.Repository;" + "\r\n" + +" " + "\r\n" + +"" + "\r\n" + +"import com.realnet."+repo_name+".Entity."+table_name+";" + "\r\n" + +"" + "\r\n" + +"@Repository" + "\r\n" + +"public interface "+table_name+"Repository extends JpaRepository<"+table_name+", Long> { " + "\r\n" + +"}" \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/static_code/SE_AbcService.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/static_code/SE_AbcService.java new file mode 100644 index 0000000..8a7344c --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/static_code/SE_AbcService.java @@ -0,0 +1,37 @@ +"package com.realnet."+repo_name+".Services;" + "\r\n" + +"import com.realnet."+repo_name+".Repository."+table_name+"Repository;" + "\r\n" + +"import com.realnet."+repo_name+".Entity."+table_name+";import java.util.List;" + "\r\n" + +"" + "\r\n" + +"import org.springframework.beans.factory.annotation.Autowired;" + "\r\n" + +" import org.springframework.stereotype.Service;" + "\r\n" + +"" + "\r\n" + +"@Service" + "\r\n" + +" public class "+table_name+"Service {" + "\r\n" + +"@Autowired" + "\r\n" + +"private "+table_name+"Repository Repository;" + "\r\n" + +"public "+table_name+" Savedata("+table_name+" data) {" + "\r\n" + +" return Repository.save(data); " + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" " + "\r\n" + +"public List<"+table_name+"> getdetails() {" + "\r\n" + +" return (List<"+table_name+">) Repository.findAll();" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +"" + "\r\n" + +"public "+table_name+" getdetailsbyId(Long id) {" + "\r\n" + +" return Repository.findById(id).get();" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +"" + "\r\n" + +" public void delete_by_id(Long id) {" + "\r\n" + +" Repository.deleteById(id);" + "\r\n" + +"}" + "\r\n" + +"" + "\r\n" + +"" + "\r\n" + +"public "+table_name+" update("+table_name+" data,Long id) {" + "\r\n" + +" "+table_name+" old = Repository.findById(id).get();" + "\r\n" + +"old.setName(data.getName());" + "\r\n" + +"old.setName_id(data.getName_id());" + "\r\n" + +"final "+table_name+" test = Repository.save(old);" + "\r\n" + +" return test;}}" \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/Abc.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/Abc.java new file mode 100644 index 0000000..5c33750 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/Abc.java @@ -0,0 +1,18 @@ +package com.realnet.Abc_1665647440047_back.Entity; + import lombok.*; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + @Entity + @Data + public class Abc{ + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String name; + private int name_id; + + } \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/AbcController.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/AbcController.java new file mode 100644 index 0000000..4b90753 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/AbcController.java @@ -0,0 +1,42 @@ +package com.realnet.Abc_1665647440047_back.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import com.realnet.Abc_1665647440047_back.Entity.Abc; +import com.realnet.Abc_1665647440047_back.Services.AbcService ; +@RequestMapping(value = "/_1665647440047_back") +@RestController +public class AbcController { + + @Autowired + private AbcService Service; + + @PostMapping("/Abc") + + public Abc Savedata(@RequestBody Abc data) { + Abc save = Service.Savedata(data) ; + return save; + } + + + @GetMapping("/Abc") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Abc/{id}") + public Abc getdetailsbyId(@PathVariable Long id ) { + Abc get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Abc/{id}") + public void delete_by_id(@PathVariable Long id ) { + Service.delete_by_id(id); + + } +@PutMapping("/Abc/{id}") + public Abc update(@RequestBody Abc data,@PathVariable Long id ) { + Abc update = Service.update(data,id); + return update; + } +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/AbcRepository.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/AbcRepository.java new file mode 100644 index 0000000..2576449 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/AbcRepository.java @@ -0,0 +1,13 @@ +package com.realnet.Abc_1665647440047_back.Repository; + + +import org.springframework.data.jpa.repository.JpaRepository; + +import org.springframework.stereotype.Repository; + + +import com.realnet.Abc_1665647440047_back.Entity.Abc; + +@Repository +public interface AbcRepository extends JpaRepository { +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/AbcService.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/AbcService.java new file mode 100644 index 0000000..a26061b --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/AbcService.java @@ -0,0 +1,37 @@ +package com.realnet.Abc_1665647440047_back.Services; +import com.realnet.Abc_1665647440047_back.Repository.AbcRepository; +import com.realnet.Abc_1665647440047_back.Entity.Abc;import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Service; + +@Service + public class AbcService { +@Autowired +private AbcRepository Repository; +public Abc Savedata(Abc data) { + return Repository.save(data); + } + + +public List getdetails() { + return (List) Repository.findAll(); + } + + +public Abc getdetailsbyId(Long id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Long id) { + Repository.deleteById(id); +} + + +public Abc update(Abc data,Long id) { + Abc old = Repository.findById(id).get(); +old.setName(data.getName()); +old.setName_id(data.getName_id()); +final Abc test = Repository.save(old); + return test;}} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/static_code/SE_Abc.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/static_code/SE_Abc.java new file mode 100644 index 0000000..143506f --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/static_code/SE_Abc.java @@ -0,0 +1,18 @@ +"package com.realnet.Abc_1665647440047_back.Entity;" + "\r\n" + +" import lombok.*;" + "\r\n" + +" import javax.persistence.*;" + "\r\n" + +" import java.time.LocalDateTime;" + "\r\n" + +" import java.util.*;" + "\r\n" + +"" + "\r\n" + +" @Entity " + "\r\n" + +" @Data" + "\r\n" + +" public class Abc{ " + "\r\n" + +"" + "\r\n" + +" @Id" + "\r\n" + +" @GeneratedValue(strategy = GenerationType.IDENTITY)" + "\r\n" + +" private Long id;" + "\r\n" + +"" + "\r\n" + +" private String name;" + "\r\n" + +" private int name_id;" + "\r\n" + +"" + "\r\n" + +" }" \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/static_code/SE_AbcController.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/static_code/SE_AbcController.java new file mode 100644 index 0000000..8e9a704 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/static_code/SE_AbcController.java @@ -0,0 +1,42 @@ +"package com.realnet.Abc_1665647440047_back.Controllers;" + "\r\n" + +"import java.util.List;" + "\r\n" + +"import org.springframework.beans.factory.annotation.Autowired;" + "\r\n" + +" import org.springframework.web.bind.annotation.*;" + "\r\n" + +"import com.realnet.Abc_1665647440047_back.Entity.Abc;" + "\r\n" + +"import com.realnet.Abc_1665647440047_back.Services.AbcService ;" + "\r\n" + +"@RequestMapping(value = \"/_1665647440047_back\")" + "\r\n" + +"@RestController" + "\r\n" + +"public class AbcController {" + "\r\n" + +" " + "\r\n" + +" @Autowired" + "\r\n" + +" private AbcService Service;" + "\r\n" + +"" + "\r\n" + +" @PostMapping(\"/Abc\")" + "\r\n" + +" " + "\r\n" + +" public Abc Savedata(@RequestBody Abc data) {" + "\r\n" + +" Abc save = Service.Savedata(data) ;" + "\r\n" + +" return save;" + "\r\n" + +" }" + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" @GetMapping(\"/Abc\")" + "\r\n" + +" public List getdetails() {" + "\r\n" + +" List get = Service.getdetails(); " + "\r\n" + +" return get;" + "\r\n" + +"}" + "\r\n" + +"@GetMapping(\"/Abc/{id}\")" + "\r\n" + +" public Abc getdetailsbyId(@PathVariable Long id ) {" + "\r\n" + +" Abc get = Service.getdetailsbyId(id);" + "\r\n" + +" return get;" + "\r\n" + +" }" + "\r\n" + +"@DeleteMapping(\"/Abc/{id}\")" + "\r\n" + +" public void delete_by_id(@PathVariable Long id ) {" + "\r\n" + +" Service.delete_by_id(id);" + "\r\n" + +" " + "\r\n" + +" }" + "\r\n" + +"@PutMapping(\"/Abc/{id}\")" + "\r\n" + +" public Abc update(@RequestBody Abc data,@PathVariable Long id ) {" + "\r\n" + +" Abc update = Service.update(data,id);" + "\r\n" + +" return update;" + "\r\n" + +" }" + "\r\n" + +"}" \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/static_code/SE_AbcRepository.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/static_code/SE_AbcRepository.java new file mode 100644 index 0000000..c974278 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/static_code/SE_AbcRepository.java @@ -0,0 +1,13 @@ +"package com.realnet.Abc_1665647440047_back.Repository;" + "\r\n" + +"" + "\r\n" + +"" + "\r\n" + +"import org.springframework.data.jpa.repository.JpaRepository;" + "\r\n" + +"" + "\r\n" + +"import org.springframework.stereotype.Repository;" + "\r\n" + +" " + "\r\n" + +"" + "\r\n" + +"import com.realnet.Abc_1665647440047_back.Entity.Abc;" + "\r\n" + +"" + "\r\n" + +"@Repository" + "\r\n" + +"public interface AbcRepository extends JpaRepository { " + "\r\n" + +"}" \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/static_code/SE_AbcService.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/static_code/SE_AbcService.java new file mode 100644 index 0000000..db4d587 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/static_code/SE_AbcService.java @@ -0,0 +1,37 @@ +"package com.realnet.Abc_1665647440047_back.Services;" + "\r\n" + +"import com.realnet.Abc_1665647440047_back.Repository.AbcRepository;" + "\r\n" + +"import com.realnet.Abc_1665647440047_back.Entity.Abc;import java.util.List;" + "\r\n" + +"" + "\r\n" + +"import org.springframework.beans.factory.annotation.Autowired;" + "\r\n" + +" import org.springframework.stereotype.Service;" + "\r\n" + +"" + "\r\n" + +"@Service" + "\r\n" + +" public class AbcService {" + "\r\n" + +"@Autowired" + "\r\n" + +"private AbcRepository Repository;" + "\r\n" + +"public Abc Savedata(Abc data) {" + "\r\n" + +" return Repository.save(data); " + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" " + "\r\n" + +"public List getdetails() {" + "\r\n" + +" return (List) Repository.findAll();" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +"" + "\r\n" + +"public Abc getdetailsbyId(Long id) {" + "\r\n" + +" return Repository.findById(id).get();" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +"" + "\r\n" + +" public void delete_by_id(Long id) {" + "\r\n" + +" Repository.deleteById(id);" + "\r\n" + +"}" + "\r\n" + +"" + "\r\n" + +"" + "\r\n" + +"public Abc update(Abc data,Long id) {" + "\r\n" + +" Abc old = Repository.findById(id).get();" + "\r\n" + +"old.setName(data.getName());" + "\r\n" + +"old.setName_id(data.getName_id());" + "\r\n" + +"final Abc test = Repository.save(old);" + "\r\n" + +" return test;}}" \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/BugTracker.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/BugTracker.java new file mode 100644 index 0000000..28adc88 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/BugTracker.java @@ -0,0 +1,45 @@ +package com.realnet.bugTracker.Entity; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Lob; +import javax.persistence.Table; + +import com.realnet.incident.entity.WhooColomns; + +import lombok.Data; + +@Entity +@Data + +public class BugTracker extends WhooColomns { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String type; + private String key_no; + private String summary; + private String assignee; + private String reporter; + + private String select_project; + private String title; + private String select_status; + private String select_priority; + private String steps; + private String description; + + + private String fileName; + + private String fileType; + + @Lob + private byte[] data; + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/BugTrackerController.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/BugTrackerController.java new file mode 100644 index 0000000..01cf186 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/BugTrackerController.java @@ -0,0 +1,111 @@ +package com.realnet.bugTracker.Controller; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.realnet.activity.service.ActivityService; +import com.realnet.bugTracker.Entity.BugTracker; +import com.realnet.bugTracker.Service.BugTrackerService; +import com.realnet.fileupload.helper.Fileuploadhelper; +import com.realnet.incident.entity.IncidentEntity; + +@RestController +@RequestMapping("/sureserve/bugtracker") +public class BugTrackerController { + + @Autowired + private BugTrackerService bugTrackerService; + + @Autowired + private Fileuploadhelper fileuploadhelper; + + @PostMapping("/bugtracker") + public ResponseEntity createIssue(@RequestParam String data, @RequestParam MultipartFile file) + throws JsonMappingException, JsonProcessingException { + + // Deserialize the "data" parameter to a BugTracker object using Jackson's + // ObjectMapper + BugTracker bugTracker = new ObjectMapper().readValue(data, BugTracker.class); + + // Check if a file was uploaded + if (!file.isEmpty()) { + System.out.println(file.getOriginalFilename()); + + // Use a file upload helper method to upload the file and return a boolean + // indicating success or failure + boolean isUploaded = fileuploadhelper.uploadFile(file); + + if (isUploaded) { + System.out.println("File uploaded successfully"); + bugTracker.setFileName(file.getOriginalFilename()); + } + } else { + bugTracker.setFileName("No file"); + } + + // Pass the updated BugTracker object to the bugTrackerService's createIssue + // method to create a new BugTracker object + BugTracker createdTracker = bugTrackerService.createIssue(bugTracker); + + return ResponseEntity.ok("addded successfully"); + } + + @GetMapping("/bugtracker/{id}") + public ResponseEntity getIssueById(@PathVariable Long id) { + BugTracker tracker = bugTrackerService.getIssueById(id); + return ResponseEntity.ok(tracker); + } + + @GetMapping("/bugtracker") + public ResponseEntity> getAllIssues() { + List allIssues = bugTrackerService.getAllIssues(); + return ResponseEntity.ok(allIssues); + } + + @PutMapping("/bugtracker/{id}") + public ResponseEntity updateIssue(@RequestParam String data, @PathVariable Long id, + @RequestParam MultipartFile file) throws Exception { + + BugTracker bugTracker = new ObjectMapper().readValue(data, BugTracker.class); + + if (!file.isEmpty()) { + System.out.println(file.getOriginalFilename()); + boolean f = fileuploadhelper.uploadFile(file); + + if (f) { + System.out.println("file uploaded successfully"); + bugTracker.setFileName(file.getOriginalFilename()); + } + } else { + bugTracker.setFileName("No file"); + } + + // Update the bug tracker with the new incident entity + bugTrackerService.updateIssue(id, bugTracker); + + return ResponseEntity.ok("Update successfully"); + } + + @DeleteMapping("/bugtracker/{id}") + public ResponseEntity deleteIssue(@PathVariable Long id) { + bugTrackerService.deleteIssue(id); + String message = "Issue with ID " + id + " has been deleted"; + return ResponseEntity.ok(message); + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/BugTrackerRepository.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/BugTrackerRepository.java new file mode 100644 index 0000000..fee4ac9 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/BugTrackerRepository.java @@ -0,0 +1,11 @@ +package com.realnet.bugTracker.Repository; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +import com.realnet.bugTracker.Entity.BugTracker; + +@Repository +public interface BugTrackerRepository extends JpaRepository { + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/BugTrackerService.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/BugTrackerService.java new file mode 100644 index 0000000..6fd68ba --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/BugTrackerService.java @@ -0,0 +1,59 @@ +package com.realnet.bugTracker.Service; + +import java.util.List; + +import javax.persistence.EntityNotFoundException; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.realnet.bugTracker.Entity.BugTracker; +import com.realnet.bugTracker.Repository.BugTrackerRepository; + +@Service +public class BugTrackerService { + + @Autowired + private BugTrackerRepository bugTrackerRepository; + + public BugTracker createIssue(BugTracker tracker) { + return bugTrackerRepository.save(tracker); + } + + public BugTracker getIssueById(Long id) { + return bugTrackerRepository.findById(id).orElseThrow(() -> new EntityNotFoundException("Issue not found")); + } + + public List getAllIssues() { + return bugTrackerRepository.findAll(); + } + + public BugTracker updateIssue(Long id, BugTracker tracker) { + BugTracker existingIssue = getIssueById(id); + existingIssue.setType(tracker.getType()); + existingIssue.setKey_no(tracker.getKey_no()); + existingIssue.setSummary(tracker.getSummary()); + existingIssue.setAssignee(tracker.getAssignee()); + existingIssue.setReporter(tracker.getReporter()); + existingIssue.setSelect_project(tracker.getSelect_project()); + existingIssue.setTitle(tracker.getTitle()); + existingIssue.setSelect_status(tracker.getSelect_status()); + existingIssue.setSelect_priority(tracker.getSelect_priority()); + existingIssue.setSteps(tracker.getSteps()); + existingIssue.setDescription(tracker.getDescription()); + existingIssue.setFileName(tracker.getFileName()); + existingIssue.setFileType(tracker.getFileType()); + existingIssue.setData(tracker.getData()); + + return bugTrackerRepository.save(existingIssue); + } + + + + + + public void deleteIssue(Long id) { + bugTrackerRepository.deleteById(id); + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/static_code/SE_BugTracker.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/static_code/SE_BugTracker.java new file mode 100644 index 0000000..ac9c517 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/static_code/SE_BugTracker.java @@ -0,0 +1,45 @@ +"package com.realnet.bugTracker.Entity;" + "\r\n" + +"" + "\r\n" + +"import javax.persistence.Entity;" + "\r\n" + +"import javax.persistence.GeneratedValue;" + "\r\n" + +"import javax.persistence.GenerationType;" + "\r\n" + +"import javax.persistence.Id;" + "\r\n" + +"import javax.persistence.Lob;" + "\r\n" + +"import javax.persistence.Table;" + "\r\n" + +"" + "\r\n" + +"import com.realnet.incident.entity.WhooColomns;" + "\r\n" + +"" + "\r\n" + +"import lombok.Data;" + "\r\n" + +"" + "\r\n" + +"@Entity" + "\r\n" + +"@Data" + "\r\n" + +"" + "\r\n" + +"public class BugTracker extends WhooColomns {" + "\r\n" + +" " + "\r\n" + +" @Id" + "\r\n" + +" @GeneratedValue(strategy = GenerationType.IDENTITY)" + "\r\n" + +" private Long id;" + "\r\n" + +"" + "\r\n" + +" private String type;" + "\r\n" + +" private String key_no;" + "\r\n" + +" private String summary;" + "\r\n" + +" private String assignee;" + "\r\n" + +" private String reporter;" + "\r\n" + +" " + "\r\n" + +" private String select_project;" + "\r\n" + +" private String title;" + "\r\n" + +" private String select_status;" + "\r\n" + +" private String select_priority;" + "\r\n" + +" private String steps;" + "\r\n" + +" private String description;" + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" private String fileName;" + "\r\n" + +" " + "\r\n" + +" private String fileType;" + "\r\n" + +" " + "\r\n" + +" @Lob" + "\r\n" + +" private byte[] data;" + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +"}" \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/static_code/SE_BugTrackerController.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/static_code/SE_BugTrackerController.java new file mode 100644 index 0000000..ea815e5 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/static_code/SE_BugTrackerController.java @@ -0,0 +1,111 @@ +"package com.realnet.bugTracker.Controller;" + "\r\n" + +"" + "\r\n" + +"import java.util.List;" + "\r\n" + +"" + "\r\n" + +"import org.springframework.beans.factory.annotation.Autowired;" + "\r\n" + +"import org.springframework.http.HttpStatus;" + "\r\n" + +"import org.springframework.http.ResponseEntity;" + "\r\n" + +"import org.springframework.web.bind.annotation.DeleteMapping;" + "\r\n" + +"import org.springframework.web.bind.annotation.GetMapping;" + "\r\n" + +"import org.springframework.web.bind.annotation.PathVariable;" + "\r\n" + +"import org.springframework.web.bind.annotation.PostMapping;" + "\r\n" + +"import org.springframework.web.bind.annotation.PutMapping;" + "\r\n" + +"import org.springframework.web.bind.annotation.RequestBody;" + "\r\n" + +"import org.springframework.web.bind.annotation.RequestMapping;" + "\r\n" + +"import org.springframework.web.bind.annotation.RequestParam;" + "\r\n" + +"import org.springframework.web.bind.annotation.RestController;" + "\r\n" + +"import org.springframework.web.multipart.MultipartFile;" + "\r\n" + +"" + "\r\n" + +"import com.fasterxml.jackson.core.JsonProcessingException;" + "\r\n" + +"import com.fasterxml.jackson.databind.JsonMappingException;" + "\r\n" + +"import com.fasterxml.jackson.databind.ObjectMapper;" + "\r\n" + +"import com.realnet.activity.service.ActivityService;" + "\r\n" + +"import com.realnet.bugTracker.Entity.BugTracker;" + "\r\n" + +"import com.realnet.bugTracker.Service.BugTrackerService;" + "\r\n" + +"import com.realnet.fileupload.helper.Fileuploadhelper;" + "\r\n" + +"import com.realnet.incident.entity.IncidentEntity;" + "\r\n" + +"" + "\r\n" + +"@RestController" + "\r\n" + +"@RequestMapping(\"/sureserve/bugtracker\")" + "\r\n" + +"public class BugTrackerController {" + "\r\n" + +"" + "\r\n" + +" @Autowired" + "\r\n" + +" private BugTrackerService bugTrackerService;" + "\r\n" + +"" + "\r\n" + +" @Autowired" + "\r\n" + +" private Fileuploadhelper fileuploadhelper;" + "\r\n" + +"" + "\r\n" + +" @PostMapping(\"/bugtracker\")" + "\r\n" + +" public ResponseEntity createIssue(@RequestParam String data, @RequestParam MultipartFile file)" + "\r\n" + +" throws JsonMappingException, JsonProcessingException {" + "\r\n" + +"" + "\r\n" + +" // Deserialize the \"data\" parameter to a BugTracker object using Jackson's" + "\r\n" + +" // ObjectMapper" + "\r\n" + +" BugTracker bugTracker = new ObjectMapper().readValue(data, BugTracker.class);" + "\r\n" + +"" + "\r\n" + +" // Check if a file was uploaded" + "\r\n" + +" if (!file.isEmpty()) {" + "\r\n" + +" System.out.println(file.getOriginalFilename());" + "\r\n" + +"" + "\r\n" + +" // Use a file upload helper method to upload the file and return a boolean" + "\r\n" + +" // indicating success or failure" + "\r\n" + +" boolean isUploaded = fileuploadhelper.uploadFile(file);" + "\r\n" + +"" + "\r\n" + +" if (isUploaded) {" + "\r\n" + +" System.out.println(\"File uploaded successfully\");" + "\r\n" + +" bugTracker.setFileName(file.getOriginalFilename());" + "\r\n" + +" }" + "\r\n" + +" } else {" + "\r\n" + +" bugTracker.setFileName(\"No file\");" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" // Pass the updated BugTracker object to the bugTrackerService's createIssue" + "\r\n" + +" // method to create a new BugTracker object" + "\r\n" + +" BugTracker createdTracker = bugTrackerService.createIssue(bugTracker);" + "\r\n" + +"" + "\r\n" + +" return ResponseEntity.ok(\"addded successfully\");" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" @GetMapping(\"/bugtracker/{id}\")" + "\r\n" + +" public ResponseEntity getIssueById(@PathVariable Long id) {" + "\r\n" + +" BugTracker tracker = bugTrackerService.getIssueById(id);" + "\r\n" + +" return ResponseEntity.ok(tracker);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" @GetMapping(\"/bugtracker\")" + "\r\n" + +" public ResponseEntity> getAllIssues() {" + "\r\n" + +" List allIssues = bugTrackerService.getAllIssues();" + "\r\n" + +" return ResponseEntity.ok(allIssues);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" @PutMapping(\"/bugtracker/{id}\")" + "\r\n" + +" public ResponseEntity updateIssue(@RequestParam String data, @PathVariable Long id," + "\r\n" + +" @RequestParam MultipartFile file) throws Exception {" + "\r\n" + +"" + "\r\n" + +" BugTracker bugTracker = new ObjectMapper().readValue(data, BugTracker.class);" + "\r\n" + +"" + "\r\n" + +" if (!file.isEmpty()) {" + "\r\n" + +" System.out.println(file.getOriginalFilename());" + "\r\n" + +" boolean f = fileuploadhelper.uploadFile(file);" + "\r\n" + +"" + "\r\n" + +" if (f) {" + "\r\n" + +" System.out.println(\"file uploaded successfully\");" + "\r\n" + +" bugTracker.setFileName(file.getOriginalFilename());" + "\r\n" + +" }" + "\r\n" + +" } else {" + "\r\n" + +" bugTracker.setFileName(\"No file\");" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" // Update the bug tracker with the new incident entity" + "\r\n" + +" bugTrackerService.updateIssue(id, bugTracker);" + "\r\n" + +"" + "\r\n" + +" return ResponseEntity.ok(\"Update successfully\");" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" @DeleteMapping(\"/bugtracker/{id}\")" + "\r\n" + +" public ResponseEntity deleteIssue(@PathVariable Long id) {" + "\r\n" + +" bugTrackerService.deleteIssue(id);" + "\r\n" + +" String message = \"Issue with ID \" + id + \" has been deleted\";" + "\r\n" + +" return ResponseEntity.ok(message);" + "\r\n" + +" }" + "\r\n" + +"}" \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/static_code/SE_BugTrackerRepository.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/static_code/SE_BugTrackerRepository.java new file mode 100644 index 0000000..99fb5d1 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/static_code/SE_BugTrackerRepository.java @@ -0,0 +1,11 @@ +"package com.realnet.bugTracker.Repository;" + "\r\n" + +"" + "\r\n" + +"import org.springframework.data.jpa.repository.JpaRepository;" + "\r\n" + +"import org.springframework.stereotype.Repository;" + "\r\n" + +"" + "\r\n" + +"import com.realnet.bugTracker.Entity.BugTracker;" + "\r\n" + +"" + "\r\n" + +"@Repository" + "\r\n" + +"public interface BugTrackerRepository extends JpaRepository {" + "\r\n" + +" " + "\r\n" + +"}" \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/static_code/SE_BugTrackerService.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/static_code/SE_BugTrackerService.java new file mode 100644 index 0000000..748ca44 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/static_code/SE_BugTrackerService.java @@ -0,0 +1,59 @@ +"package com.realnet.bugTracker.Service;" + "\r\n" + +"" + "\r\n" + +"import java.util.List;" + "\r\n" + +"" + "\r\n" + +"import javax.persistence.EntityNotFoundException;" + "\r\n" + +"" + "\r\n" + +"import org.springframework.beans.factory.annotation.Autowired;" + "\r\n" + +"import org.springframework.stereotype.Service;" + "\r\n" + +"" + "\r\n" + +"import com.realnet.bugTracker.Entity.BugTracker;" + "\r\n" + +"import com.realnet.bugTracker.Repository.BugTrackerRepository;" + "\r\n" + +"" + "\r\n" + +"@Service" + "\r\n" + +"public class BugTrackerService {" + "\r\n" + +" " + "\r\n" + +" @Autowired" + "\r\n" + +" private BugTrackerRepository bugTrackerRepository;" + "\r\n" + +"" + "\r\n" + +" public BugTracker createIssue(BugTracker tracker) {" + "\r\n" + +" return bugTrackerRepository.save(tracker);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" public BugTracker getIssueById(Long id) {" + "\r\n" + +" return bugTrackerRepository.findById(id).orElseThrow(() -> new EntityNotFoundException(\"Issue not found\"));" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" public List getAllIssues() {" + "\r\n" + +" return bugTrackerRepository.findAll();" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" public BugTracker updateIssue(Long id, BugTracker tracker) {" + "\r\n" + +" BugTracker existingIssue = getIssueById(id);" + "\r\n" + +" existingIssue.setType(tracker.getType());" + "\r\n" + +" existingIssue.setKey_no(tracker.getKey_no());" + "\r\n" + +" existingIssue.setSummary(tracker.getSummary());" + "\r\n" + +" existingIssue.setAssignee(tracker.getAssignee());" + "\r\n" + +" existingIssue.setReporter(tracker.getReporter());" + "\r\n" + +" existingIssue.setSelect_project(tracker.getSelect_project());" + "\r\n" + +" existingIssue.setTitle(tracker.getTitle());" + "\r\n" + +" existingIssue.setSelect_status(tracker.getSelect_status());" + "\r\n" + +" existingIssue.setSelect_priority(tracker.getSelect_priority());" + "\r\n" + +" existingIssue.setSteps(tracker.getSteps());" + "\r\n" + +" existingIssue.setDescription(tracker.getDescription());" + "\r\n" + +" existingIssue.setFileName(tracker.getFileName());" + "\r\n" + +" existingIssue.setFileType(tracker.getFileType());" + "\r\n" + +" existingIssue.setData(tracker.getData());" + "\r\n" + +"" + "\r\n" + +" return bugTrackerRepository.save(existingIssue);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +"" + "\r\n" + +" public void deleteIssue(Long id) {" + "\r\n" + +" bugTrackerRepository.deleteById(id);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +"}" \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/Entity_eventsController.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/Entity_eventsController.java new file mode 100644 index 0000000..69fb3d6 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/Entity_eventsController.java @@ -0,0 +1,103 @@ +package com.realnet.entityevents.Controller; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; + +import com.realnet.entityevents.Entity.Entity_events_t; +import com.realnet.entityevents.Service.Entity_eventsService; + + +@RestController +@RequestMapping("/entityevents") +public class Entity_eventsController { + + @Autowired + private Entity_eventsService entity_eventsService; + + // Get all entity events + @GetMapping("/entityevents") + public ResponseEntity> getAllEntityEvents() { + List entityEvents = entity_eventsService.getAllEntityEvents(); + return new ResponseEntity>(entityEvents, HttpStatus.OK); + } + + // Get entity event by ID + @GetMapping("/entityevents/{id}") + public ResponseEntity getEntityEventById(@PathVariable Long id) { + Entity_events_t entityEvent = entity_eventsService.getEntityEventById(id); + if (entityEvent != null) { + return new ResponseEntity(entityEvent, HttpStatus.OK); + } else { + return new ResponseEntity(HttpStatus.NOT_FOUND); + } + } + + // Create entity event + @PostMapping("/entityevents") + public ResponseEntity createEntityEvent(@RequestBody Entity_events_t entityEvent) { + Entity_events_t createdEntityEvent = entity_eventsService.createEntityEvent(entityEvent); + return new ResponseEntity(createdEntityEvent, HttpStatus.CREATED); + } + + // Update entity event + @PutMapping("/entityevents/{id}") + public ResponseEntity updateEntityEvent(@PathVariable Long id, @RequestBody Entity_events_t entityEvent) { + Entity_events_t updatedEntityEvent = entity_eventsService.updateEntityEvent(id, entityEvent); + if (updatedEntityEvent != null) { + return new ResponseEntity(updatedEntityEvent, HttpStatus.OK); + } else { + return new ResponseEntity(HttpStatus.NOT_FOUND); + } + } + + + // Delete entity event + @DeleteMapping("/entityevents/{id}") + public ResponseEntity deleteEntityEvent(@PathVariable Long id) { + entity_eventsService.deleteEntityEvent(id); + String message = "ID " + id + " has been deleted"; + return ResponseEntity.ok(message); + } + + + + +// @GetMapping("/entityevents/name-type") +// public ResponseEntity getEntityEventByName(@RequestParam("entity_name") String entity_name, @RequestParam("event_type") String event_type) { +// boolean exists = entity_eventsService.existsByEntityNameAndEventType(entity_name, event_type); +// return new ResponseEntity(exists, HttpStatus.OK); +// +// } + + + + + + + + + + + + + + + + + + + + + + + + + + + + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/Entity_eventsRepository.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/Entity_eventsRepository.java new file mode 100644 index 0000000..bd572d5 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/Entity_eventsRepository.java @@ -0,0 +1,23 @@ +package com.realnet.entityevents.Repository; + +import java.util.List; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; + +import com.realnet.entityevents.Entity.Entity_events_t; + +@Repository +public interface Entity_eventsRepository extends JpaRepository { + + @Query(value = "SELECT * FROM realnet_CNSBE.entity_events_t WHERE entity_name = :entityName", nativeQuery = true) + List findByEntityName(@Param("entityName") String entityName); + + + + + +} + diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/Entity_eventsService.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/Entity_eventsService.java new file mode 100644 index 0000000..ed11971 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/Entity_eventsService.java @@ -0,0 +1,83 @@ +package com.realnet.entityevents.Service; + + +import java.util.HashSet; +import java.util.List; + +import java.util.Set; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.realnet.entityevents.Entity.Entity_events_t; +import com.realnet.entityevents.Repository.Entity_eventsRepository; + + +@Service +public class Entity_eventsService { + + @Autowired + private Entity_eventsRepository entity_eventsRepository; + + public List getAllEntityEvents() { + return entity_eventsRepository.findAll(); + } + + public Entity_events_t getEntityEventById(Long id) { + return entity_eventsRepository.findById(id).orElse(null); + } + + public Entity_events_t createEntityEvent(Entity_events_t entityEvent) { + return entity_eventsRepository.save(entityEvent); + } + + public Entity_events_t updateEntityEvent(Long id, Entity_events_t entityEvent) { + Entity_events_t existingEntityEvent = entity_eventsRepository.findById(id).orElse(null); + if (existingEntityEvent != null) { + existingEntityEvent.setEntity_name(entityEvent.getEntity_name()); + existingEntityEvent.setEvent_type(entityEvent.getEvent_type()); + existingEntityEvent.set_active(entityEvent.is_active()); + return entity_eventsRepository.save(existingEntityEvent); + } + return null; + } + + + public void deleteEntityEvent(Long id) { + entity_eventsRepository.deleteById(id); + } + + + + + public boolean isEntityAllowed(String entity_name) { + + System.out.println("isEntityAllowed called " + entity_name); + + if (entity_name == null || entity_name.isEmpty()) { + return true; // Allow unspecified entities + } + + List entityEventsList = entity_eventsRepository.findByEntityName(entity_name); + if (entityEventsList == null || entityEventsList.isEmpty()) { + return false; // Disallow entities not found in entity events + } + + return true; + } + + + + + + + + + + +// public boolean existsByEntityNameAndEventType(String entity_name, String event_type) { +// return entity_eventsRepository.existsByEntityNameAndEventType(entity_name, event_type); +// } + + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/Entity_events_t.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/Entity_events_t.java new file mode 100644 index 0000000..9992c4f --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/Entity_events_t.java @@ -0,0 +1,25 @@ +package com.realnet.entityevents.Entity; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; + +import lombok.Data; + +import com.realnet.fnd.entity.Rn_Who_AccId_Column; + +@Entity +@Data +public class Entity_events_t extends Rn_Who_AccId_Column{ + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String entity_name; + + private String event_type; + + private boolean is_active = true; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/static_code/SE_Entity_eventsController.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/static_code/SE_Entity_eventsController.java new file mode 100644 index 0000000..eff6753 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/static_code/SE_Entity_eventsController.java @@ -0,0 +1,103 @@ +"package com.realnet.entityevents.Controller;" + "\r\n" + +"" + "\r\n" + +"import java.util.List;" + "\r\n" + +"" + "\r\n" + +"import org.springframework.beans.factory.annotation.Autowired;" + "\r\n" + +"import org.springframework.http.HttpStatus;" + "\r\n" + +"import org.springframework.http.ResponseEntity;" + "\r\n" + +"import org.springframework.web.bind.annotation.*;" + "\r\n" + +"" + "\r\n" + +"import com.realnet.entityevents.Entity.Entity_events_t;" + "\r\n" + +"import com.realnet.entityevents.Service.Entity_eventsService;" + "\r\n" + +"" + "\r\n" + +"" + "\r\n" + +"@RestController" + "\r\n" + +"@RequestMapping(\"/entityevents\")" + "\r\n" + +"public class Entity_eventsController {" + "\r\n" + +"" + "\r\n" + +" @Autowired" + "\r\n" + +" private Entity_eventsService entity_eventsService;" + "\r\n" + +"" + "\r\n" + +" // Get all entity events" + "\r\n" + +" @GetMapping(\"/entityevents\")" + "\r\n" + +" public ResponseEntity> getAllEntityEvents() {" + "\r\n" + +" List entityEvents = entity_eventsService.getAllEntityEvents();" + "\r\n" + +" return new ResponseEntity>(entityEvents, HttpStatus.OK);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" // Get entity event by ID" + "\r\n" + +" @GetMapping(\"/entityevents/{id}\")" + "\r\n" + +" public ResponseEntity getEntityEventById(@PathVariable Long id) {" + "\r\n" + +" Entity_events_t entityEvent = entity_eventsService.getEntityEventById(id);" + "\r\n" + +" if (entityEvent != null) {" + "\r\n" + +" return new ResponseEntity(entityEvent, HttpStatus.OK);" + "\r\n" + +" } else {" + "\r\n" + +" return new ResponseEntity(HttpStatus.NOT_FOUND);" + "\r\n" + +" }" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" // Create entity event" + "\r\n" + +" @PostMapping(\"/entityevents\")" + "\r\n" + +" public ResponseEntity createEntityEvent(@RequestBody Entity_events_t entityEvent) {" + "\r\n" + +" Entity_events_t createdEntityEvent = entity_eventsService.createEntityEvent(entityEvent);" + "\r\n" + +" return new ResponseEntity(createdEntityEvent, HttpStatus.CREATED);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" // Update entity event" + "\r\n" + +" @PutMapping(\"/entityevents/{id}\")" + "\r\n" + +" public ResponseEntity updateEntityEvent(@PathVariable Long id, @RequestBody Entity_events_t entityEvent) {" + "\r\n" + +" Entity_events_t updatedEntityEvent = entity_eventsService.updateEntityEvent(id, entityEvent);" + "\r\n" + +" if (updatedEntityEvent != null) {" + "\r\n" + +" return new ResponseEntity(updatedEntityEvent, HttpStatus.OK);" + "\r\n" + +" } else {" + "\r\n" + +" return new ResponseEntity(HttpStatus.NOT_FOUND);" + "\r\n" + +" }" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" " + "\r\n" + +" // Delete entity event" + "\r\n" + +" @DeleteMapping(\"/entityevents/{id}\")" + "\r\n" + +" public ResponseEntity deleteEntityEvent(@PathVariable Long id) {" + "\r\n" + +" entity_eventsService.deleteEntityEvent(id);" + "\r\n" + +" String message = \"ID \" + id + \" has been deleted\";" + "\r\n" + +" return ResponseEntity.ok(message);" + "\r\n" + +" }" + "\r\n" + +" " + "\r\n" + +"" + "\r\n" + +" " + "\r\n" + +"" + "\r\n" + +"// @GetMapping(\"/entityevents/name-type\")" + "\r\n" + +"// public ResponseEntity getEntityEventByName(@RequestParam(\"entity_name\") String entity_name, @RequestParam(\"event_type\") String event_type) {" + "\r\n" + +"// boolean exists = entity_eventsService.existsByEntityNameAndEventType(entity_name, event_type);" + "\r\n" + +"// return new ResponseEntity(exists, HttpStatus.OK);" + "\r\n" + +"//" + "\r\n" + +"// }" + "\r\n" + +" " + "\r\n" + +"" + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +"" + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +"}" \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/static_code/SE_Entity_eventsRepository.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/static_code/SE_Entity_eventsRepository.java new file mode 100644 index 0000000..ada4dee --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/static_code/SE_Entity_eventsRepository.java @@ -0,0 +1,23 @@ +"package com.realnet.entityevents.Repository;" + "\r\n" + +"" + "\r\n" + +"import java.util.List;" + "\r\n" + +"" + "\r\n" + +"import org.springframework.data.jpa.repository.JpaRepository;" + "\r\n" + +"import org.springframework.data.jpa.repository.Query;" + "\r\n" + +"import org.springframework.data.repository.query.Param;" + "\r\n" + +"import org.springframework.stereotype.Repository;" + "\r\n" + +"" + "\r\n" + +"import com.realnet.entityevents.Entity.Entity_events_t;" + "\r\n" + +"" + "\r\n" + +"@Repository" + "\r\n" + +"public interface Entity_eventsRepository extends JpaRepository {" + "\r\n" + +"" + "\r\n" + +" @Query(value = \"SELECT * FROM realnet_CNSBE.entity_events_t WHERE entity_name = :entityName\", nativeQuery = true)" + "\r\n" + +" List findByEntityName(@Param(\"entityName\") String entityName);" + "\r\n" + +"" + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +"" + "\r\n" + +" " + "\r\n" + +"}" + "\r\n" + +"" \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/static_code/SE_Entity_eventsService.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/static_code/SE_Entity_eventsService.java new file mode 100644 index 0000000..569c6c6 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/static_code/SE_Entity_eventsService.java @@ -0,0 +1,79 @@ +"package com.realnet.entityevents.Service;" + "\r\n" + +"" + "\r\n" + +"" + "\r\n" + +"import java.util.HashSet;" + "\r\n" + +"import java.util.List;" + "\r\n" + +"" + "\r\n" + +"import java.util.Set;" + "\r\n" + +"" + "\r\n" + +"import org.springframework.beans.factory.annotation.Autowired;" + "\r\n" + +"import org.springframework.stereotype.Service;" + "\r\n" + +"" + "\r\n" + +"import com.realnet.entityevents.Entity.Entity_events_t;" + "\r\n" + +"import com.realnet.entityevents.Repository.Entity_eventsRepository;" + "\r\n" + +"" + "\r\n" + +"" + "\r\n" + +"@Service" + "\r\n" + +"public class Entity_eventsService {" + "\r\n" + +"" + "\r\n" + +" @Autowired" + "\r\n" + +" private Entity_eventsRepository entity_eventsRepository;" + "\r\n" + +"" + "\r\n" + +" public List getAllEntityEvents() {" + "\r\n" + +" return entity_eventsRepository.findAll();" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" public Entity_events_t getEntityEventById(Long id) {" + "\r\n" + +" return entity_eventsRepository.findById(id).orElse(null);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" public Entity_events_t createEntityEvent(Entity_events_t entityEvent) {" + "\r\n" + +" return entity_eventsRepository.save(entityEvent);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" public Entity_events_t updateEntityEvent(Long id, Entity_events_t entityEvent) {" + "\r\n" + +" Entity_events_t existingEntityEvent = entity_eventsRepository.findById(id).orElse(null);" + "\r\n" + +" if (existingEntityEvent != null) {" + "\r\n" + +" existingEntityEvent.setEntity_name(entityEvent.getEntity_name());" + "\r\n" + +" existingEntityEvent.setEvent_type(entityEvent.getEvent_type());" + "\r\n" + +" existingEntityEvent.set_active(entityEvent.is_active());" + "\r\n" + +" return entity_eventsRepository.save(existingEntityEvent);" + "\r\n" + +" }" + "\r\n" + +" return null;" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" " + "\r\n" + +" public void deleteEntityEvent(Long id) {" + "\r\n" + +" entity_eventsRepository.deleteById(id);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" " + "\r\n" + +"" + "\r\n" + +" " + "\r\n" + +" public boolean isEntityAllowed(String entity_name) {" + "\r\n" + +"" + "\r\n" + +" System.out.println(\"isEntityAllowed called \" + entity_name);" + "\r\n" + +"" + "\r\n" + +" if (entity_name == null || entity_name.isEmpty()) {" + "\r\n" + +" return true; // Allow unspecified entities" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" List entityEventsList = entity_eventsRepository.findByEntityName(entity_name);" + "\r\n" + +" if (entityEventsList == null || entityEventsList.isEmpty()) {" + "\r\n" + +" return false; // Disallow entities not found in entity events" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" return true;" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +serviceloop1 +"}" \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/static_code/SE_Entity_events_t.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/static_code/SE_Entity_events_t.java new file mode 100644 index 0000000..929a766 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/static_code/SE_Entity_events_t.java @@ -0,0 +1,25 @@ +"package com.realnet.entityevents.Entity;" + "\r\n" + +"" + "\r\n" + +"import javax.persistence.Entity;" + "\r\n" + +"import javax.persistence.GeneratedValue;" + "\r\n" + +"import javax.persistence.GenerationType;" + "\r\n" + +"import javax.persistence.Id;" + "\r\n" + +"" + "\r\n" + +"import lombok.Data;" + "\r\n" + +"" + "\r\n" + +"import com.realnet.fnd.entity.Rn_Who_AccId_Column;" + "\r\n" + +"" + "\r\n" + +"@Entity" + "\r\n" + +"@Data" + "\r\n" + +"public class Entity_events_t extends Rn_Who_AccId_Column{" + "\r\n" + +"" + "\r\n" + +" @Id" + "\r\n" + +" @GeneratedValue(strategy = GenerationType.IDENTITY)" + "\r\n" + +" private Long id;" + "\r\n" + +"" + "\r\n" + +" private String entity_name;" + "\r\n" + +"" + "\r\n" + +" private String event_type;" + "\r\n" + +"" + "\r\n" + +" private boolean is_active = true;" + "\r\n" + +"}" \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/Controller.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/Controller.java new file mode 100644 index 0000000..28b0b47 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/Controller.java @@ -0,0 +1,1071 @@ +//package com.realnet.excel.controller; +package com.realnet.template.controller; + +import java.io.BufferedReader; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.StandardCopyOption; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.DataFormatter; +import org.apache.poi.ss.usermodel.Row; +import org.apache.poi.ss.usermodel.Sheet; +import org.apache.poi.ss.usermodel.Workbook; +import org.apache.poi.ss.usermodel.WorkbookFactory; +import org.apache.poi.xssf.usermodel.XSSFWorkbook; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.io.InputStreamResource; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.util.StringUtils; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +import com.realnet.Sr_Contact_type.Entity.Sr_Contact_type_t; +import com.realnet.Sr_Contact_type.Repository.Sr_Contact_type_Repository; +import com.realnet.Sr_State.Entity.Sr_State_t; +import com.realnet.Sr_State.Repository.Sr_State_Repository; +import com.realnet.Sr_category2.Entity.Sr_category2_t; +import com.realnet.Sr_category2.Repository.Sr_category2_Repository; +import com.realnet.Sr_customer.Entity.Sr_customer_t; +import com.realnet.Sr_customer.Repository.Sr_customer_Repository; +import com.realnet.Sr_handler.Entity.Sr_handler_t; +import com.realnet.Sr_handler.Repository.Sr_handler_Repository; +import com.realnet.Sr_impact2.Entity.Sr_impact2_t; +import com.realnet.Sr_impact2.Repository.Sr_impact2_Repository; +import com.realnet.Sr_priority2.Entity.Sr_priority2_t; +import com.realnet.Sr_priority2.Repository.Sr_priority2_Repository; +import com.realnet.Sr_urgency.Entity.Sr_urgency_t; +import com.realnet.Sr_urgency.Repository.Sr_urgency_Repository; +import com.realnet.template.repository.TemplatedataRepo; +import com.realnet.template.service.FileUploadService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; + +@RestController +@RequestMapping("api/template") +public class Controller { + @Autowired + private TemplatedataRepo temprepo; + + @Autowired + private Sr_priority2_Repository priorityrepo; + + @Autowired + private Sr_impact2_Repository impactrepo; + + @Autowired + private Sr_urgency_Repository urgencyrepo; + + @Autowired + private Sr_State_Repository staterepo; + + @Autowired + private Sr_Contact_type_Repository contactrepo; + + @Autowired + private Sr_customer_Repository customerepo; + + @Autowired + private Sr_category2_Repository categoryrepo; + + @Autowired + private Sr_handler_Repository handlerepo; + @Autowired + FileUploadService fileupload; + @Autowired + private AppUserServiceImpl userService; + + @GetMapping("/demo/download/{file_type}") + + public ResponseEntity demoTemplate(@PathVariable String file_type) throws IOException { + + if (file_type.equalsIgnoreCase("priority")) { + + String filename = "Sr_priority2_t" + ".xlsx"; + String[] header = { "Priority Name", "Description", "Is Active", "Effective Start Date", + "Effective End date" }; + ByteArrayInputStream in = demoTemplate(header, file_type); + InputStreamResource file = new InputStreamResource(in); + return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + filename) + .contentType(MediaType.parseMediaType("application/vnd.ms-excel")).body(file); + + } else if (file_type.equalsIgnoreCase("impact")) { + + String filename = "Sr_impact2_t" + ".xlsx"; + String[] header = { "Impact Name", "Description", "Is Active", "Effective Start Date", + "Effective End date" }; + ByteArrayInputStream in = demoTemplate(header, file_type); + InputStreamResource file = new InputStreamResource(in); + return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + filename) + .contentType(MediaType.parseMediaType("application/vnd.ms-excel")).body(file); + + } else if (file_type.equalsIgnoreCase("urgency")) { + + String filename = "Sr_urgency_t" + ".xlsx"; + String[] header = { "Urgency Name", "Description", "Is Active", "Effective Start Date", + "Effective End date" }; + ByteArrayInputStream in = demoTemplate(header, file_type); + InputStreamResource file = new InputStreamResource(in); + return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + filename) + .contentType(MediaType.parseMediaType("application/vnd.ms-excel")).body(file); + + } else if (file_type.equalsIgnoreCase("category")) { + + String filename = "Sr_category2_t" + ".xlsx"; + String[] header = { "Category Name", "Customer Id", "Is Active", "Effective Start Date", + "Effective End date" }; + ByteArrayInputStream in = demoTemplate(header, file_type); + InputStreamResource file = new InputStreamResource(in); + return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + filename) + .contentType(MediaType.parseMediaType("application/vnd.ms-excel")).body(file); + + } else if (file_type.equalsIgnoreCase("state")) { + + String filename = "Sr_State_t" + ".xlsx"; + String[] header = { "State Name", "Description", "Is Active", "Effective Start Date", + "Effective End date" }; + ByteArrayInputStream in = demoTemplate(header, file_type); + InputStreamResource file = new InputStreamResource(in); + return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + filename) + .contentType(MediaType.parseMediaType("application/vnd.ms-excel")).body(file); + + } else if (file_type.equalsIgnoreCase("contact_type")) { + + String filename = "Sr_Contact_type_t" + ".xlsx"; + String[] header = { "Contact Type Name", "Description", "Is Active", "Effective Start Date", + "Effective End date" }; + ByteArrayInputStream in = demoTemplate(header, file_type); + InputStreamResource file = new InputStreamResource(in); + return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + filename) + .contentType(MediaType.parseMediaType("application/vnd.ms-excel")).body(file); + + } else if (file_type.equalsIgnoreCase("customer")) { + + String filename = "Sr_customer_t" + ".xlsx"; + String[] header = { "Customer Name", "Description", "Is Active", "Effective Start Date", + "Effective End date" }; + ByteArrayInputStream in = demoTemplate(header, file_type); + InputStreamResource file = new InputStreamResource(in); + return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + filename) + .contentType(MediaType.parseMediaType("application/vnd.ms-excel")).body(file); + + } else if (file_type.equalsIgnoreCase("handler")) { + + String filename = "Sr_handler_t" + ".xlsx"; + String[] header = { "User Id", "Role Id", "Is Active", "Effective Start Date", "Effective End date" }; + ByteArrayInputStream in = demoTemplate(header, file_type); + InputStreamResource file = new InputStreamResource(in); + return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + filename) + .contentType(MediaType.parseMediaType("application/vnd.ms-excel")).body(file); + + } + + return new ResponseEntity("Not Found", HttpStatus.BAD_REQUEST); + + } + + public static ByteArrayInputStream demoTemplate(String[] HEADERs, String file_type) throws IOException { + String SHEET = file_type; + Workbook workbook = new XSSFWorkbook(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + Sheet sheet = workbook.createSheet(SHEET); + Row headerRow = sheet.createRow(0); + for (int col = 0; col < HEADERs.length; col++) { + Cell cell = headerRow.createCell(col); + cell.setCellValue(HEADERs[col]); + } + workbook.write(out); + return new ByteArrayInputStream(out.toByteArray()); + + } + + @PostMapping("/save/{filetype}") + public ResponseEntity uploadFile(@RequestParam MultipartFile file, @PathVariable String filetype) + throws IOException, ParseException { + BufferedReader br; + InputStream is = file.getInputStream(); + br = new BufferedReader(new InputStreamReader(is)); + String file_name = file.getOriginalFilename(); + AppUser loggedInUser = userService.getLoggedInUser(); + + if (filetype.equalsIgnoreCase("priority")) { + + if (file_name.contains("Sr_priority2_t")) { + + String[] header = { "Priority Name", "Description", "Is Active", "Effective Start Date", + "Effective End date" }; + ArrayList prioritylist = new ArrayList(); + + Workbook workbook = WorkbookFactory.create(is); + +// Create a DataFormatter to format and get each cell's value as String + DataFormatter dataFormatter = new DataFormatter(); + + Sheet sheet = workbook.getSheetAt(0); + + // Getting number of columns in the Sheet + int cols = sheet.getRow(0).getLastCellNum(); + + fileupload.uploadFile(file, loggedInUser.getUserId(), filetype); + + for (Row row : sheet) { + + if (row.getRowNum() == 0) { + for (int i = 0; i < cols; i++) { + String value = dataFormatter.formatCellValue(row.getCell(i)); + + if (!header[i].equalsIgnoreCase(value)) { + + return new ResponseEntity<>( + "priority file Should have \"" + header + " \"in the header in excel file", + HttpStatus.BAD_REQUEST); + } + } + + } + + if (row.getRowNum() != 0) { + Date date = row.getCell(3).getDateCellValue(); + Date date2 = row.getCell(4).getDateCellValue(); + + Sr_priority2_t priority = new Sr_priority2_t(); + priority.setPriority_name(dataFormatter.formatCellValue(row.getCell(0))); + priority.setDescription(dataFormatter.formatCellValue(row.getCell(1))); + priority.setActive(Boolean.valueOf(dataFormatter.formatCellValue(row.getCell(2)))); + + priority.setEffective_start_date(date); + priority.setEffective_end_date(date2); + + prioritylist.add(priority); + } + + } + priorityrepo.saveAll(prioritylist); + workbook.close(); + +// + + return new ResponseEntity<>("File Uploaded", HttpStatus.ACCEPTED); + } + return new ResponseEntity<>("File name should contain Sr_priority2_t", HttpStatus.BAD_REQUEST); + + } + + else if (filetype.contains("impact")) { + + if (file_name.contains("Sr_impact2_t")) { + + String[] header = { "Impact Name", "Description", "Is Active", "Effective Start Date", + "Effective End date" }; + + ArrayList impactlist = new ArrayList(); + + Workbook workbook = WorkbookFactory.create(is); + +// Create a DataFormatter to format and get each cell's value as String + DataFormatter dataFormatter = new DataFormatter(); + + Sheet sheet = workbook.getSheetAt(0); + + // Getting number of columns in the Sheet + int cols = sheet.getRow(0).getLastCellNum(); + + fileupload.uploadFile(file, loggedInUser.getUserId(), filetype); + + for (Row row : sheet) { + + if (row.getRowNum() == 0) { + for (int i = 0; i < cols; i++) { + String value = dataFormatter.formatCellValue(row.getCell(i)); + + if (!header[i].equalsIgnoreCase(value)) { + + return new ResponseEntity<>("priority file header is not in correct format ", + HttpStatus.BAD_REQUEST); + } + } + + } + + if (row.getRowNum() != 0) { + + Date date = row.getCell(3).getDateCellValue(); + Date date2 = row.getCell(4).getDateCellValue(); + + Sr_impact2_t impact = new Sr_impact2_t(); + impact.setImpact_name(dataFormatter.formatCellValue(row.getCell(0))); + impact.setDescription(dataFormatter.formatCellValue(row.getCell(1))); + impact.setIsActive(Boolean.valueOf(dataFormatter.formatCellValue(row.getCell(2)))); + + impact.setEffective_start_date(date); + impact.setEffective_end_date(date2); + + impactlist.add(impact); + } + + } + impactrepo.saveAll(impactlist); + System.out.println(impactlist); + + workbook.close(); + + return new ResponseEntity<>("File Uploaded", HttpStatus.ACCEPTED); + } + return new ResponseEntity<>("File name should contain Sr_impact2_t", HttpStatus.BAD_REQUEST); + + } + + else if (filetype.contains("urgency")) { + + if (file_name.contains("Sr_urgency_t")) { + + String[] header = { "Urgency Name", "Description", "Is Active", "Effective Start Date", + "Effective End date" }; + List li = new ArrayList(); + li.add("Impact Name"); + li.add("Description"); + li.add("Is Active"); + li.add("Effective Start Date"); + li.add("Effective End date"); + + ArrayList impactlist = new ArrayList(); + + Workbook workbook = WorkbookFactory.create(is); + +// Create a DataFormatter to format and get each cell's value as String + DataFormatter dataFormatter = new DataFormatter(); + + Sheet sheet = workbook.getSheetAt(0); + + // Getting number of columns in the Sheet + int cols = sheet.getRow(0).getLastCellNum(); + + fileupload.uploadFile(file, loggedInUser.getUserId(), filetype); + + for (Row row : sheet) { + + if (row.getRowNum() == 0) { + for (int i = 0; i < cols; i++) { + String value = dataFormatter.formatCellValue(row.getCell(i)); + + if (!header[i].equalsIgnoreCase(value)) { + + return new ResponseEntity<>( + "priority file Should have \"" + li + " \"in the header in excel file", + HttpStatus.BAD_REQUEST); + } + } + + } + + if (row.getRowNum() != 0) { + Date date = row.getCell(3).getDateCellValue(); + Date date2 = row.getCell(4).getDateCellValue(); + + Sr_urgency_t urgency = new Sr_urgency_t(); + urgency.setUrgency_name(dataFormatter.formatCellValue(row.getCell(0))); + urgency.setDescription(dataFormatter.formatCellValue(row.getCell(1))); + urgency.setIsActive(Boolean.valueOf(dataFormatter.formatCellValue(row.getCell(2)))); + + urgency.setEffective_start_date(date); + urgency.setEffective_end_date(date2); + + impactlist.add(urgency); + } + + } + urgencyrepo.saveAll(impactlist); + System.out.println(impactlist); + + workbook.close(); + + return new ResponseEntity<>("File Uploaded", HttpStatus.ACCEPTED); + } + return new ResponseEntity<>("File name should contain sr_incident_t", HttpStatus.BAD_REQUEST); + + } else if (filetype.equalsIgnoreCase("category")) { + + String[] header = { "Category Name", "Customer Id", "Is Active", "Effective Start Date", + "Effective End date" }; + +// if (file_name.contains("Sr_impact2_t")) { +// +// ArrayList impactlist = new ArrayList(); +// +// Workbook workbook = WorkbookFactory.create(is); +// +//// Create a DataFormatter to format and get each cell's value as String +// DataFormatter dataFormatter = new DataFormatter(); +// +// Sheet sheet = workbook.getSheetAt(0); +// +// // Getting number of columns in the Sheet +// int cols = sheet.getRow(0).getLastCellNum(); +// +// fileupload.uploadFile(file, loggedInUser.getUserId(), filetype); +// +// for (Row row : sheet) { +// +// if (row.getRowNum() == 0) { +// for (int i = 0; i < cols; i++) { +// String value = dataFormatter.formatCellValue(row.getCell(i)); +// +// if (!header[i].equalsIgnoreCase(value)) { +// +// return new ResponseEntity<>("priority file header is not in correct format ", +// HttpStatus.BAD_REQUEST); +// } +// } +// +// } +// +// if (row.getRowNum() != 0) { +// String value = dataFormatter.formatCellValue(row.getCell(4)); +// String value2 = dataFormatter.formatCellValue(row.getCell(5)); +// Date date = new SimpleDateFormat("dd-MM-yyyy").parse(value); +// Date date2 = new SimpleDateFormat("dd-MM-yyyy").parse(value2); +// +// Sr_impact2_t impact = new Sr_impact2_t(); +// impact.setImpact_name(file_name); +// impact.setDescription(dataFormatter.formatCellValue(row.getCell(2))); +// impact.setIsActive(Boolean.valueOf(dataFormatter.formatCellValue(row.getCell(3)))); +// +//// priority.setEffective_start_date(date); +//// priority.setEffective_end_date(date2); +// +// impactlist.add(impact); +// } +// +// } +// impactrepo.saveAll(impactlist); +// System.out.println(impactlist); +// +// workbook.close(); +// +// } + + } else if (filetype.equalsIgnoreCase("state")) { + + String[] header = { "State Name", "Description", "Is Active", "Effective Start Date", + "Effective End date" }; + + if (file_name.contains("Sr_State_t")) { + + ArrayList statelist = new ArrayList(); + + Workbook workbook = WorkbookFactory.create(is); + +// Create a DataFormatter to format and get each cell's value as String + DataFormatter dataFormatter = new DataFormatter(); + + Sheet sheet = workbook.getSheetAt(0); + + // Getting number of columns in the Sheet + int cols = sheet.getRow(0).getLastCellNum(); + + fileupload.uploadFile(file, loggedInUser.getUserId(), filetype); + + for (Row row : sheet) { + + if (row.getRowNum() == 0) { + for (int i = 0; i < cols; i++) { + String value = dataFormatter.formatCellValue(row.getCell(i)); + + if (!header[i].equalsIgnoreCase(value)) { + + return new ResponseEntity<>("priority file header is not in correct format ", + HttpStatus.BAD_REQUEST); + } + } + + } + + if (row.getRowNum() != 0) { + String value = dataFormatter.formatCellValue(row.getCell(3)); + String value2 = dataFormatter.formatCellValue(row.getCell(4)); + + Sr_State_t state = new Sr_State_t(); + state.setState_name(dataFormatter.formatCellValue(row.getCell(0))); + state.setDescription(dataFormatter.formatCellValue(row.getCell(1))); + state.setIsActive(Boolean.valueOf(dataFormatter.formatCellValue(row.getCell(2)))); + + state.setEffective_end_date(value2); + state.setEffective_start_date(value); + + statelist.add(state); + } + + } + staterepo.saveAll(statelist); + + workbook.close(); + + } + + } else if (filetype.equalsIgnoreCase("contact_type")) { + + String[] header = { "Contact Type Name", "Description", "Is Active", "Effective Start Date", + "Effective End date" }; + + if (file_name.contains("Sr_Contact_type_t")) { + + ArrayList statelist = new ArrayList(); + + Workbook workbook = WorkbookFactory.create(is); + +// Create a DataFormatter to format and get each cell's value as String + DataFormatter dataFormatter = new DataFormatter(); + + Sheet sheet = workbook.getSheetAt(0); + + // Getting number of columns in the Sheet + int cols = sheet.getRow(0).getLastCellNum(); + + fileupload.uploadFile(file, loggedInUser.getUserId(), filetype); + + for (Row row : sheet) { + + if (row.getRowNum() == 0) { + for (int i = 0; i < cols; i++) { + String value = dataFormatter.formatCellValue(row.getCell(i)); + + if (!header[i].equalsIgnoreCase(value)) { + + return new ResponseEntity<>("priority file header is not in correct format ", + HttpStatus.BAD_REQUEST); + } + } + + } + + if (row.getRowNum() != 0) { + Date date = row.getCell(3).getDateCellValue(); + Date date2 = row.getCell(4).getDateCellValue(); + + Sr_Contact_type_t contact = new Sr_Contact_type_t(); + contact.setCon_type_name(dataFormatter.formatCellValue(row.getCell(0))); + contact.setDescription(dataFormatter.formatCellValue(row.getCell(1))); + contact.setIsActive(Boolean.valueOf(dataFormatter.formatCellValue(row.getCell(2)))); + + contact.setEffective_start_date(date); + contact.setEffective_end_date(date2); + + statelist.add(contact); + } + + } + contactrepo.saveAll(statelist); + + workbook.close(); + + } + + } else if (filetype.equalsIgnoreCase("customer")) { + + String[] header = { "Customer Name", "Description", "Is Active", "Effective Start Date", + "Effective End date" }; + + if (file_name.contains("Sr_customer_t")) { + + ArrayList customerlist = new ArrayList(); + + Workbook workbook = WorkbookFactory.create(is); + +// Create a DataFormatter to format and get each cell's value as String + DataFormatter dataFormatter = new DataFormatter(); + + Sheet sheet = workbook.getSheetAt(0); + + // Getting number of columns in the Sheet + int cols = sheet.getRow(0).getLastCellNum(); + + fileupload.uploadFile(file, loggedInUser.getUserId(), filetype); + + for (Row row : sheet) { + + if (row.getRowNum() == 0) { + for (int i = 0; i < cols; i++) { + String value = dataFormatter.formatCellValue(row.getCell(i)); + + if (!header[i].equalsIgnoreCase(value)) { + + return new ResponseEntity<>("priority file header is not in correct format ", + HttpStatus.BAD_REQUEST); + } + } + + } + + if (row.getRowNum() != 0) { + Date date = row.getCell(3).getDateCellValue(); + Date date2 = row.getCell(4).getDateCellValue(); + + Sr_customer_t customer = new Sr_customer_t(); + customer.setCustomer_name(dataFormatter.formatCellValue(row.getCell(0))); + customer.setDescription(dataFormatter.formatCellValue(row.getCell(1))); + customer.setIsActive(Boolean.valueOf(dataFormatter.formatCellValue(row.getCell(2)))); + + customer.setEffective_start_date(date); + customer.setEffective_end_date(date2); + + customerlist.add(customer); + } + + } + customerepo.saveAll(customerlist); + + workbook.close(); + + } + + } else if (filetype.equalsIgnoreCase("handler")) { + + String[] header = { "User Id", "Role Id", "Is Active", "Effective Start Date", "Effective End date" }; + +// if (file_name.contains("Sr_State_t")) { +// +// ArrayList statelist = new ArrayList(); +// +// Workbook workbook = WorkbookFactory.create(is); +// +//// Create a DataFormatter to format and get each cell's value as String +// DataFormatter dataFormatter = new DataFormatter(); +// +// Sheet sheet = workbook.getSheetAt(0); +// +// // Getting number of columns in the Sheet +// int cols = sheet.getRow(0).getLastCellNum(); +// +// fileupload.uploadFile(file, loggedInUser.getUserId(), filetype); +// +// for (Row row : sheet) { +// +// if (row.getRowNum() == 0) { +// for (int i = 0; i < cols; i++) { +// String value = dataFormatter.formatCellValue(row.getCell(i)); +// +// if (!header[i].equalsIgnoreCase(value)) { +// +// return new ResponseEntity<>("priority file header is not in correct format ", +// HttpStatus.BAD_REQUEST); +// } +// } +// +// } +// +// if (row.getRowNum() != 0) { +// Date date = row.getCell(3).getDateCellValue(); +// Date date2 = row.getCell(4).getDateCellValue(); +// +// Sr_State_t state = new Sr_State_t(); +// state.setState_name(dataFormatter.formatCellValue(row.getCell(1))); +// state.setDescription(dataFormatter.formatCellValue(row.getCell(2))); +// state.setIsActive(Boolean.valueOf(dataFormatter.formatCellValue(row.getCell(3)))); +// +//// priority.setEffective_start_date(date); +//// priority.setEffective_end_date(date2); +// +// statelist.add(state); +// } +// +// } +// staterepo.saveAll(statelist); +// +// workbook.close(); +// +// } + + } + + return new ResponseEntity<>("Something Went Wrong please try again....!!!!! ", HttpStatus.BAD_REQUEST); + + } + +// Download template data in excel Files + + @GetMapping("/download/{file_type}") + + public ResponseEntity getFile(@PathVariable String file_type) throws IOException { + + if (file_type.equalsIgnoreCase("priority")) { + + String filename = "Sr_priority2_t" + ".xlsx"; + String[] header = { "Priority Name", "Description", "Is Active", "Effective Start Date", + "Effective End date" }; + List findAll = priorityrepo.findAll(); + ByteArrayInputStream in = templateByte(findAll, header); + InputStreamResource file = new InputStreamResource(in); + return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + filename) + .contentType(MediaType.parseMediaType("application/vnd.ms-excel")).body(file); + + } else if (file_type.equalsIgnoreCase("impact")) { + + String filename = "Sr_impact2_t" + ".xlsx"; + String[] header = { "Impact Name", "Description", "Is Active", "Effective Start Date", + "Effective End date" }; + List findAll = impactrepo.findAll(); + ByteArrayInputStream in = templateByte3(findAll, header); + InputStreamResource file = new InputStreamResource(in); + return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + filename) + .contentType(MediaType.parseMediaType("application/vnd.ms-excel")).body(file); + + } else if (file_type.equalsIgnoreCase("urgency")) { + + String filename = "Sr_urgency_t" + ".xlsx"; + String[] header = { "Urgency Name", "Description", "Is Active", "Effective Start Date", + "Effective End date" }; + List findAll = urgencyrepo.findAll(); + ByteArrayInputStream in = templateByte2(findAll, header); + InputStreamResource file = new InputStreamResource(in); + return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + filename) + .contentType(MediaType.parseMediaType("application/vnd.ms-excel")).body(file); + + } else if (file_type.equalsIgnoreCase("category")) { + + String filename = "Sr_category2_t" + ".xlsx"; + String[] header = { "Category Name", "Customer Id", "Is Active", "Effective Start Date", + "Effective End date" }; + List findAll = categoryrepo.findAll(); + ByteArrayInputStream in = templateByte4(findAll, header); + InputStreamResource file = new InputStreamResource(in); + return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + filename) + .contentType(MediaType.parseMediaType("application/vnd.ms-excel")).body(file); + + } else if (file_type.equalsIgnoreCase("state")) { + + String filename = "Sr_State_t" + ".xlsx"; + String[] header = { "State Name", "Description", "Is Active", "Effective Start Date", + "Effective End date" }; + List findAll = staterepo.findAll(); + ByteArrayInputStream in = templateByte6(findAll, header); + InputStreamResource file = new InputStreamResource(in); + return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + filename) + .contentType(MediaType.parseMediaType("application/vnd.ms-excel")).body(file); + + } else if (file_type.equalsIgnoreCase("contact_type")) { + + String filename = "Sr_Contact_type_t" + ".xlsx"; + String[] header = { "Contact Type Name", "Description", "Is Active", "Effective Start Date", + "Effective End date" }; + List findAll = contactrepo.findAll(); + ByteArrayInputStream in = templateByte5(findAll, header); + InputStreamResource file = new InputStreamResource(in); + return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + filename) + .contentType(MediaType.parseMediaType("application/vnd.ms-excel")).body(file); + + } else if (file_type.equalsIgnoreCase("customer")) { + + String filename = "Sr_customer_t" + ".xlsx"; + String[] header = { "Customer Name", "Description", "Is Active", "Effective Start Date", + "Effective End date" }; + List findAll = customerepo.findAll(); + ByteArrayInputStream in = templateByte7(findAll, header); + InputStreamResource file = new InputStreamResource(in); + return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + filename) + .contentType(MediaType.parseMediaType("application/vnd.ms-excel")).body(file); + + } else if (file_type.equalsIgnoreCase("handler")) { + + String filename = "Sr_handler_t" + ".xlsx"; + String[] header = { "User Id", "Role Id", "Is Active", "Effective Start Date", "Effective End date" }; + List findAll = handlerepo.findAll(); + ByteArrayInputStream in = templateByte8(findAll, header); + InputStreamResource file = new InputStreamResource(in); + return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + filename) + .contentType(MediaType.parseMediaType("application/vnd.ms-excel")).body(file); + + } + + return new ResponseEntity("Not Found", HttpStatus.BAD_REQUEST); + + } + + public static ByteArrayInputStream templateByte(List list, String[] hEADERs) { + + String SHEET = "priority"; + + try (Workbook workbook = new XSSFWorkbook(); ByteArrayOutputStream out = new ByteArrayOutputStream();) { + Sheet sheet = workbook.createSheet(SHEET); + + // Header + Row headerRow = sheet.createRow(0); + + for (int col = 0; col < hEADERs.length; col++) { + Cell cell = headerRow.createCell(col); + cell.setCellValue(hEADERs[col]); + } + + int rowIdx = 1; + for (Sr_priority2_t p : list) { + Row row = sheet.createRow(rowIdx++); + + row.createCell(0).setCellValue(p.getPriority_name()); + row.createCell(1).setCellValue(p.getDescription()); + row.createCell(2).setCellValue(p.isActive()); + row.createCell(3).setCellValue(String.valueOf(p.getEffective_start_date())); + row.createCell(4).setCellValue(String.valueOf(p.getEffective_end_date())); + } + workbook.write(out); + return new ByteArrayInputStream(out.toByteArray()); + } catch (IOException e) { + throw new RuntimeException("fail to import data to Excel file: " + e.getMessage()); + } + + } + + public static ByteArrayInputStream templateByte2(List list, String[] hEADERs) { + + String SHEET = "URGENCY"; + + try (Workbook workbook = new XSSFWorkbook(); ByteArrayOutputStream out = new ByteArrayOutputStream();) { + Sheet sheet = workbook.createSheet(SHEET); + + // Header + Row headerRow = sheet.createRow(0); + + for (int col = 0; col < hEADERs.length; col++) { + Cell cell = headerRow.createCell(col); + cell.setCellValue(hEADERs[col]); + } + + int rowIdx = 1; + for (Sr_urgency_t p : list) { + Row row = sheet.createRow(rowIdx++); + + row.createCell(0).setCellValue(p.getUrgency_name()); + row.createCell(1).setCellValue(p.getDescription()); + row.createCell(2).setCellValue(p.isIsActive()); + row.createCell(3).setCellValue(String.valueOf(p.getEffective_start_date())); + row.createCell(4).setCellValue(String.valueOf(p.getEffective_end_date())); + } + workbook.write(out); + return new ByteArrayInputStream(out.toByteArray()); + } catch (IOException e) { + throw new RuntimeException("fail to import data to Excel file: " + e.getMessage()); + } + + } + + public static ByteArrayInputStream templateByte3(List list, String[] hEADERs) { + + String SHEET = "Impact"; + + try (Workbook workbook = new XSSFWorkbook(); ByteArrayOutputStream out = new ByteArrayOutputStream();) { + Sheet sheet = workbook.createSheet(SHEET); + + // Header + Row headerRow = sheet.createRow(0); + + for (int col = 0; col < hEADERs.length; col++) { + Cell cell = headerRow.createCell(col); + cell.setCellValue(hEADERs[col]); + } + + int rowIdx = 1; + for (Sr_impact2_t p : list) { + Row row = sheet.createRow(rowIdx++); + + row.createCell(0).setCellValue(p.getImpact_name()); + row.createCell(1).setCellValue(p.getDescription()); + row.createCell(2).setCellValue(p.isIsActive()); + row.createCell(3).setCellValue(String.valueOf(p.getEffective_start_date())); + row.createCell(4).setCellValue(String.valueOf(p.getEffective_end_date())); + } + workbook.write(out); + return new ByteArrayInputStream(out.toByteArray()); + } catch (IOException e) { + throw new RuntimeException("fail to import data to Excel file: " + e.getMessage()); + } + + } + + public static ByteArrayInputStream templateByte4(List list, String[] hEADERs) { + + String SHEET = "Impact"; + + try (Workbook workbook = new XSSFWorkbook(); ByteArrayOutputStream out = new ByteArrayOutputStream();) { + Sheet sheet = workbook.createSheet(SHEET); + + // Header + Row headerRow = sheet.createRow(0); + + for (int col = 0; col < hEADERs.length; col++) { + Cell cell = headerRow.createCell(col); + cell.setCellValue(hEADERs[col]); + } + + int rowIdx = 1; + for (Sr_category2_t p : list) { + Row row = sheet.createRow(rowIdx++); + + row.createCell(0).setCellValue(p.getCustomer_id()); + row.createCell(1).setCellValue(p.getDescription()); + row.createCell(2).setCellValue(p.isActive()); + row.createCell(3).setCellValue(String.valueOf(p.getEffective_start_date())); + row.createCell(4).setCellValue(String.valueOf(p.getEffective_end_date())); + } + workbook.write(out); + return new ByteArrayInputStream(out.toByteArray()); + } catch (IOException e) { + throw new RuntimeException("fail to import data to Excel file: " + e.getMessage()); + } + + } + + public static ByteArrayInputStream templateByte5(List list, String[] hEADERs) { + + String SHEET = "Impact"; + + try (Workbook workbook = new XSSFWorkbook(); ByteArrayOutputStream out = new ByteArrayOutputStream();) { + Sheet sheet = workbook.createSheet(SHEET); + + // Header + Row headerRow = sheet.createRow(0); + + for (int col = 0; col < hEADERs.length; col++) { + Cell cell = headerRow.createCell(col); + cell.setCellValue(hEADERs[col]); + } + + int rowIdx = 1; + for (Sr_Contact_type_t p : list) { + Row row = sheet.createRow(rowIdx++); + + row.createCell(0).setCellValue(p.getCon_type_name()); + row.createCell(1).setCellValue(p.getDescription()); + row.createCell(2).setCellValue(p.isIsActive()); + row.createCell(3).setCellValue(String.valueOf(p.getEffective_start_date())); + row.createCell(4).setCellValue(String.valueOf(p.getEffective_end_date())); + } + workbook.write(out); + return new ByteArrayInputStream(out.toByteArray()); + } catch (IOException e) { + throw new RuntimeException("fail to import data to Excel file: " + e.getMessage()); + } + + } + + public static ByteArrayInputStream templateByte6(List list, String[] hEADERs) { + + String SHEET = "Impact"; + + try (Workbook workbook = new XSSFWorkbook(); ByteArrayOutputStream out = new ByteArrayOutputStream();) { + Sheet sheet = workbook.createSheet(SHEET); + + // Header + Row headerRow = sheet.createRow(0); + + for (int col = 0; col < hEADERs.length; col++) { + Cell cell = headerRow.createCell(col); + cell.setCellValue(hEADERs[col]); + } + + int rowIdx = 1; + for (Sr_State_t p : list) { + Row row = sheet.createRow(rowIdx++); + row.createCell(0).setCellValue(p.getState_name()); + row.createCell(1).setCellValue(p.getDescription()); + row.createCell(2).setCellValue(p.isIsActive()); + row.createCell(3).setCellValue(String.valueOf(p.getEffective_start_date())); + row.createCell(4).setCellValue(String.valueOf(p.getEffective_end_date())); + } + workbook.write(out); + return new ByteArrayInputStream(out.toByteArray()); + } catch (IOException e) { + throw new RuntimeException("fail to import data to Excel file: " + e.getMessage()); + } + + } + + public static ByteArrayInputStream templateByte7(List list, String[] hEADERs) { + + String SHEET = "Impact"; + + try (Workbook workbook = new XSSFWorkbook(); ByteArrayOutputStream out = new ByteArrayOutputStream();) { + Sheet sheet = workbook.createSheet(SHEET); + + // Header + Row headerRow = sheet.createRow(0); + + for (int col = 0; col < hEADERs.length; col++) { + Cell cell = headerRow.createCell(col); + cell.setCellValue(hEADERs[col]); + } + + int rowIdx = 1; + for (Sr_customer_t p : list) { + Row row = sheet.createRow(rowIdx++); + + row.createCell(0).setCellValue(p.getCustomer_name()); + row.createCell(1).setCellValue(p.getDescription()); + row.createCell(2).setCellValue(p.isIsActive()); + row.createCell(3).setCellValue(String.valueOf(p.getEffective_start_date())); + row.createCell(4).setCellValue(String.valueOf(p.getEffective_end_date())); + } + workbook.write(out); + return new ByteArrayInputStream(out.toByteArray()); + } catch (IOException e) { + throw new RuntimeException("fail to import data to Excel file: " + e.getMessage()); + } + + } + + public static ByteArrayInputStream templateByte8(List list, String[] hEADERs) { + + String SHEET = "Impact"; + + try (Workbook workbook = new XSSFWorkbook(); ByteArrayOutputStream out = new ByteArrayOutputStream();) { + Sheet sheet = workbook.createSheet(SHEET); + + // Header + Row headerRow = sheet.createRow(0); + + for (int col = 0; col < hEADERs.length; col++) { + Cell cell = headerRow.createCell(col); + cell.setCellValue(hEADERs[col]); + } + + int rowIdx = 1; + for (Sr_handler_t p : list) { + Row row = sheet.createRow(rowIdx++); + + row.createCell(0).setCellValue(p.getRole()); + row.createCell(1).setCellValue(p.getUser_name()); + row.createCell(2).setCellValue(p.isIsActive()); + row.createCell(3).setCellValue(String.valueOf(p.getEffective_start_date())); + row.createCell(4).setCellValue(String.valueOf(p.getEffective_end_date())); + } + workbook.write(out); + return new ByteArrayInputStream(out.toByteArray()); + } catch (IOException e) { + throw new RuntimeException("fail to import data to Excel file: " + e.getMessage()); + } + + } + + @GetMapping("/getalltemplate") + public ResponseEntity getALlTemplate() { + return new ResponseEntity<>(temprepo.findAll(), HttpStatus.ACCEPTED); + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/DatabaseQueryController.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/DatabaseQueryController.java new file mode 100644 index 0000000..7a56d31 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/DatabaseQueryController.java @@ -0,0 +1,75 @@ +package com.realnet.template.controller; + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.template.repository.DynamicTempRepo; +import com.realnet.template.service.DatabaseQueryService; + +@RestController +@RequestMapping("/sureserve/template/databasequery") +public class DatabaseQueryController { + + @Autowired + private DatabaseQueryService rn_table_service; + @Autowired + private DynamicTempRepo tempRepo; + + @Value("${spring.datasource.username}") + private String userName; + + @Value("${spring.datasource.password}") + private String password; + + @Value("${spring.datasource.url}") + private String url; + +// get all databse list available + @GetMapping("/Table_list") + @ResponseBody + public List getdatabase() { + List list = tempRepo.getdatabaseList(); + return list; + } + + // get all table list available + @GetMapping("/Table_list_all") + @ResponseBody + public List gettableList() + +// @PathVariable String table_schema) + { +// List list = tempRepo.getListOftables(table_schema); + List list = rn_table_service.getListOftable("sureserve"); + return list; + } + + // get all column list available + @GetMapping("/Table_list/{table_schema}/{TABLE_NAME}") + @ResponseBody + public List getallcolumnlist(@PathVariable String table_schema, @PathVariable String TABLE_NAME) { + List list = rn_table_service.getColumnAliasList1(table_schema, TABLE_NAME); + return list; + } + + // create database + @GetMapping("/createdatabase/{table_schema}") + @ResponseBody + public List createdatabase(@PathVariable String table_schema) { + List list = rn_table_service.createdatabase(table_schema); + return list; + } + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/DatabaseQueryService.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/DatabaseQueryService.java new file mode 100644 index 0000000..f7e284e --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/DatabaseQueryService.java @@ -0,0 +1,89 @@ +package com.realnet.template.service; + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; +import org.springframework.web.bind.annotation.PathVariable; + +@Service +public class DatabaseQueryService { + + @Value("${spring.datasource.username}") + private String userName; + + @Value("${spring.datasource.password}") + private String password; + + @Value("${spring.datasource.url}") + private String url; + + // get all column + + public List getColumnAliasList1(String table_schema, String tABLE_NAME) { + String query = "SELECT column_name FROM information_schema.columns WHERE TABLE_SCHEMA='" + table_schema + + "' and table_name = '" + tABLE_NAME + "' "; + List list = new ArrayList(); + try (Connection con = DriverManager.getConnection(url, userName, password); + + Statement stmt = con.createStatement()) { + ResultSet rs = stmt.executeQuery(query); + while (rs.next()) { + String coffeeName = rs.getString("column_name"); + list.add(coffeeName); + } + } catch (SQLException e) { + e.printStackTrace(); + } + return list; + } + + // get all table list from databse + + public List getListOftable(String table_schema) { + String query = "SELECT table_name FROM information_schema.tables WHERE table_schema='" + table_schema + "' "; + + List list = new ArrayList(); + try (Connection con = DriverManager.getConnection(url, userName, password); + + Statement stmt = con.createStatement()) { + ResultSet rs = stmt.executeQuery(query); + while (rs.next()) { + String coffeeName = rs.getString("table_name"); + list.add(coffeeName); + } + } catch (SQLException e) { + e.printStackTrace(); + } + return list; + } + + public List createdatabase(String table_schema){ + String query = "CREATE SCHEMA " + table_schema + ";"; + + List list = new ArrayList(); + try (Connection con = DriverManager.getConnection(url, userName, password); // conn.str + + Statement stmt = con.createStatement()) { + int rs = stmt.executeUpdate(query); + + list.add(rs); + + } catch (SQLException e) { + e.printStackTrace(); + } finally { + } + return list; + + } + + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/DynamicTempRepo.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/DynamicTempRepo.java new file mode 100644 index 0000000..6abf71f --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/DynamicTempRepo.java @@ -0,0 +1,24 @@ +package com.realnet.template.repository; + +import java.util.List; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; + +import com.realnet.template.entity.Dynamic_template; + +@Repository +public interface DynamicTempRepo extends JpaRepository{ + + + @Query(value= "select schema_name from information_schema.schemata",nativeQuery = true) + List getdatabaseList(); + + @Query(value= "SELECT table_name FROM information_schema.tables WHERE table_schema =?1",nativeQuery = true) + List getListOftables(String table_schema); + + @Query(value= "SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE `TABLE_SCHEMA`=:'TABLE_SCHEMA' AND `TABLE_NAME`='TABLE_NAME';",nativeQuery = true) + List getallcolumnlist(@Param("TABLE_SCHEMA") Object table_schema, @Param("TABLE_NAME") Object tABLE_NAME); +} diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/DynamicTemplateController.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/DynamicTemplateController.java new file mode 100644 index 0000000..fc4c2cf --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/DynamicTemplateController.java @@ -0,0 +1,250 @@ +package com.realnet.template.controller; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.apache.poi.ss.usermodel.DataFormatter; +import org.apache.poi.ss.usermodel.Row; +import org.apache.poi.ss.usermodel.Sheet; +import org.apache.poi.ss.usermodel.Workbook; +import org.apache.poi.ss.usermodel.WorkbookFactory; +import org.json.simple.JSONObject; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import com.realnet.Notification.Notification.Entity.NotEntity; +import com.realnet.fileupload.helper.Fileuploadhelper; +import com.realnet.incident.entity.IncidentEntity; +import com.realnet.template.entity.Dynamic_template; +import com.realnet.template.repository.DynamicTempRepo; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; + +@RestController +@RequestMapping("/sureserve/template/dynamic") +public class DynamicTemplateController { + + @Autowired + private DynamicTempRepo tempRepo; + + @Autowired + private AppUserServiceImpl userService; + + @Autowired + private Fileuploadhelper fileuploadhelper; + + @GetMapping("/templatetojson") + public ResponseEntity saveTemplateInJson(@RequestParam MultipartFile file) throws IOException { + + BufferedReader br; + InputStream is = file.getInputStream(); + br = new BufferedReader(new InputStreamReader(is)); + + Workbook workbook = WorkbookFactory.create(is); + +// Create a DataFormatter to format and get each cell's value as String + DataFormatter dataFormatter = new DataFormatter(); + + Sheet sheet = workbook.getSheetAt(0); + + // Getting number of columns in the Sheet + int cols = sheet.getRow(0).getLastCellNum(); + int firstRowNum = sheet.getFirstRowNum(); + + List keys = new ArrayList(); + List jsonList = new ArrayList(); + + for (Row row : sheet) { + JSONObject object = new JSONObject(); + if (row.getRowNum() == 0) { + for (int i = 0; i < cols; i++) { + String value = dataFormatter.formatCellValue(row.getCell(i)); + keys.add(value); + } + + } + + if (row.getRowNum() != 0) { + + for (int i = 0; i < cols; i++) { + String key = keys.get(i); + String value = dataFormatter.formatCellValue(row.getCell(i)); + + object.put(key, value); + + jsonList.add(object); + } + + } + + } + + workbook.close(); + + return new ResponseEntity<>(jsonList, HttpStatus.BAD_REQUEST); + } + + @GetMapping("/jsonkeychange") + + public ResponseEntity changeKeysOfJson(@RequestParam String newjson, @RequestParam String body) + throws IOException { + + JsonParser parser = new JsonParser(); + JsonElement element = parser.parse(newjson); + JsonElement element2 = parser.parse(body); + JsonObject object2 = element.getAsJsonObject(); + JsonArray array = element2.getAsJsonArray(); + Iterator iterator = array.iterator(); + + List jsonList = new ArrayList(); + + Set keySet = object2.keySet(); + Iterator it = keySet.iterator(); + +// String key = it.next(); + while (iterator.hasNext()) { + + Map map = new HashMap(); + Object next = iterator.next(); + JsonElement parse = parser.parse(next.toString()); + JsonObject jsonObject = parse.getAsJsonObject(); + for (String k : keySet) { + String next2 = object2.get(k).getAsString(); + String value2 = jsonObject.get(k).getAsString(); + map.put(next2, value2); + } + + jsonList.add(map); + + } + + return new ResponseEntity<>(jsonList, HttpStatus.BAD_REQUEST); + } + + // create data with file upload + @PostMapping("/dynamic_temp") + public ResponseEntity addIssues(@RequestParam String data, @RequestParam MultipartFile file) + throws JsonMappingException, JsonProcessingException { + + AppUser user = userService.getLoggedInUser(); + String userId = user.getUsername(); + Dynamic_template dynamic_template; + + dynamic_template = new ObjectMapper().readValue(data, Dynamic_template.class); + + if (!file.isEmpty()) { +// for (MultipartFile e : attachmentFile) { + System.out.println(file.getOriginalFilename()); + + boolean f = fileuploadhelper.uploadFile(file); + + if (f) { + System.out.println("file uploaded successfully"); + dynamic_template.setFile_name(file.getOriginalFilename()); + + } + + } else { + dynamic_template.setFile_name("No file"); + + } + + dynamic_template.setUser_id(userId); + + Dynamic_template save = tempRepo.save(dynamic_template); + + if (save.getId() == 0) { + return new ResponseEntity("template Not Added", HttpStatus.BAD_REQUEST); + } else { + + return new ResponseEntity<>(save, HttpStatus.ACCEPTED); + } + } + + // get all + @GetMapping("/dynamic_temp") + public ResponseEntity getAll() { + + return new ResponseEntity<>(tempRepo.findAll(), HttpStatus.ACCEPTED); + + } + + // get by id + @GetMapping("/dynamic_temp/{id}") + public ResponseEntity getIssueById(@PathVariable Long id) { + + return new ResponseEntity<>(tempRepo.findById(id).get(), HttpStatus.ACCEPTED); + + } + + // delete by id + @DeleteMapping("/dynamic_temp/{id}") + public ResponseEntity deleteIssue(@PathVariable Long id) { + tempRepo.deleteById(id); + return new ResponseEntity("Success", HttpStatus.ACCEPTED); + + } + + // update by id + @PutMapping("/dynamic_temp/{id}") + public ResponseEntity updateIssue(@RequestParam String data, @PathVariable Long id, + @RequestParam MultipartFile file) throws Exception { + + Dynamic_template dynamic_template; + dynamic_template = new ObjectMapper().readValue(data, Dynamic_template.class); + + Dynamic_template template = tempRepo.findById(id).get(); + + if (!file.isEmpty()) { + System.out.println(file.getOriginalFilename()); + + boolean f = fileuploadhelper.uploadFile(file); + + if (f) { + System.out.println("file uploaded successfully"); + template.setFile_name(file.getOriginalFilename()); + + } + + } else { + template.setFile_name("No file"); + + } + + template.setEntity_name(dynamic_template.getEntity_name()); + template.setUser_id(dynamic_template.getUser_id()); + + Dynamic_template save = tempRepo.save(template); + return new ResponseEntity<>(save, HttpStatus.ACCEPTED); + + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/Dynamic_template.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/Dynamic_template.java new file mode 100644 index 0000000..dfa08de --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/Dynamic_template.java @@ -0,0 +1,25 @@ +package com.realnet.template.entity; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@Entity +@AllArgsConstructor +@NoArgsConstructor +public class Dynamic_template { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String user_id; + private String file_name; + private String entity_name; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/ExcelDataService.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/ExcelDataService.java new file mode 100644 index 0000000..4154748 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/ExcelDataService.java @@ -0,0 +1,96 @@ +//package com.realnet.excel.service; +// +//import java.io.IOException; +//import java.util.ArrayList; +//import java.util.List; +// +//import org.apache.poi.EncryptedDocumentException; +//import org.apache.poi.ss.usermodel.Cell; +//import org.apache.poi.ss.usermodel.DataFormatter; +//import org.apache.poi.ss.usermodel.Row; +//import org.apache.poi.ss.usermodel.Sheet; +//import org.apache.poi.ss.usermodel.Workbook; +//import org.apache.poi.ss.usermodel.WorkbookFactory; +//import org.springframework.stereotype.Service; +// +//import com.realnet.excel.entity.ExcelFileUpload; +// +//@Service +//public class ExcelDataService { +// +// Workbook workbook; +// +// public List getExcelDataAsList() { +// +// List list = new ArrayList(); +// +// // Create a DataFormatter to format and get each cell's value as String +// DataFormatter dataFormatter = new DataFormatter(); +// +// // Create the Workbook +//// try { +//// workbook = WorkbookFactory.create(); +//// } catch (EncryptedDocumentException | IOException e) { +//// e.printStackTrace(); +//// } +// +// // Retrieving the number of sheets in the Workbook +// System.out.println("-------Workbook has '" + workbook.getNumberOfSheets() + "' Sheets-----"); +// +// // Getting the Sheet at index zero +// Sheet sheet = workbook.getSheetAt(0); +// +// // Getting number of columns in the Sheet +// int noOfColumns = sheet.getRow(0).getLastCellNum(); +// System.out.println("-------Sheet has '"+noOfColumns+"' columns------"); +// +// // Using for-each loop to iterate over the rows and columns +// for (Row row : sheet) { +// for (Cell cell : row) { +// String cellValue = dataFormatter.formatCellValue(cell); +// list.add(cellValue); +// } +// } +// +// // filling excel data and creating list as List +// List invList = createList(list, noOfColumns); +// +// // Closing the workbook +// try { +// workbook.close(); +// } catch (IOException e) { +// // TODO Auto-generated catch block +// e.printStackTrace(); +// } +// +// return invList; +// } +// +// private List createList(List excelData, int noOfColumns) { +// +// ArrayList invList = new ArrayList(); +// +// int i = noOfColumns; +// do { +// ExcelFileUpload inv = new ExcelFileUpload(); +// +//// inv.setName(excelData.get(i)); +//// inv.setAmount(Double.valueOf(excelData.get(i + 1))); +//// inv.setNumber(excelData.get(i + 2)); +//// inv.setReceivedDate(excelData.get(i + 3)); +// +// invList.add(inv); +// i = i + (noOfColumns); +// +// } while (i < excelData.size()); +// return invList; +// } +// +//// public int saveExcelData(List invoices) { +//// invoices = repo.saveAll(invoices); +//// return invoices.size(); +//// } +// + + +//} diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/FileUploadService.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/FileUploadService.java new file mode 100644 index 0000000..f9500fa --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/FileUploadService.java @@ -0,0 +1,79 @@ +package com.realnet.template.service; + +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.StandardCopyOption; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; +import org.springframework.util.StringUtils; +import org.springframework.web.multipart.MultipartFile; + +import com.realnet.template.entity.TemplateFileUpload; +import com.realnet.template.repository.TemplatedataRepo; + +@Service +public class FileUploadService { + + + @Autowired + private TemplatedataRepo repo; + + + + public String uploadFile(MultipartFile file,Long user_id,String file_type) { + try { + +// String + String file_name= file.getOriginalFilename(); + String substring = file_name.substring(0,file_name.lastIndexOf(".")); + + String str = substring+System.currentTimeMillis(); + String location =System.getProperty("user.dir")+"/src/main/resources"; + + + String file_name2= file.getOriginalFilename(); + + + File staticdir2 = new File(location+"/incomingfile"); + if(!staticdir2.exists()) { + staticdir2.mkdir(); + } + Path copyLocation2 = Paths + .get(staticdir2 + File.separator + StringUtils.cleanPath(file_name2)); + + Files.copy(file.getInputStream(), copyLocation2, StandardCopyOption.REPLACE_EXISTING); + + + File staticdir = new File(location+"/processingfile"); + if(!staticdir.exists()) { + staticdir.mkdir(); + } + Path copyLocation = Paths + .get(staticdir + File.separator + StringUtils.cleanPath(str+".xlsx")); + + Files.copy(file.getInputStream(), copyLocation, StandardCopyOption.REPLACE_EXISTING); + + + TemplateFileUpload exceldata= new TemplateFileUpload(); + exceldata.setFile_location(location); + + exceldata.setFile_name(file.getOriginalFilename()); + exceldata.setFile_changed_name(str); + exceldata.setFile_type(file_type); + exceldata.setUser_id(user_id); + repo.save(exceldata); + + System.out.println("-----------------------saving data----------------"); + return location; + } catch (Exception e) { + e.printStackTrace(); + throw new RuntimeException("Could not store file " + file.getOriginalFilename() + + ". Please try again!"); + } + + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/TemplateFileUpload.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/TemplateFileUpload.java new file mode 100644 index 0000000..60bc508 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/TemplateFileUpload.java @@ -0,0 +1,27 @@ +package com.realnet.template.entity; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@Entity +@AllArgsConstructor +@NoArgsConstructor +public class TemplateFileUpload { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private Long user_id; + private String file_name; + private String file_changed_name; + private String file_location; + private String file_type; + private Integer status; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/TemplatedataRepo.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/TemplatedataRepo.java new file mode 100644 index 0000000..190abf6 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/TemplatedataRepo.java @@ -0,0 +1,9 @@ +package com.realnet.template.repository; + +import org.springframework.data.jpa.repository.JpaRepository; + +import com.realnet.template.entity.TemplateFileUpload; + +public interface TemplatedataRepo extends JpaRepository{ + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_Controller.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_Controller.java new file mode 100644 index 0000000..b84de13 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_Controller.java @@ -0,0 +1,1071 @@ +"//package com.realnet.excel.controller;" + "\r\n" + +"package com.realnet.template.controller;" + "\r\n" + +"" + "\r\n" + +"import java.io.BufferedReader;" + "\r\n" + +"import java.io.ByteArrayInputStream;" + "\r\n" + +"import java.io.ByteArrayOutputStream;" + "\r\n" + +"import java.io.File;" + "\r\n" + +"import java.io.IOException;" + "\r\n" + +"import java.io.InputStream;" + "\r\n" + +"import java.io.InputStreamReader;" + "\r\n" + +"import java.nio.file.Files;" + "\r\n" + +"import java.nio.file.Path;" + "\r\n" + +"import java.nio.file.Paths;" + "\r\n" + +"import java.nio.file.StandardCopyOption;" + "\r\n" + +"import java.text.ParseException;" + "\r\n" + +"import java.text.SimpleDateFormat;" + "\r\n" + +"import java.util.ArrayList;" + "\r\n" + +"import java.util.Date;" + "\r\n" + +"import java.util.List;" + "\r\n" + +"" + "\r\n" + +"import org.apache.poi.ss.usermodel.Cell;" + "\r\n" + +"import org.apache.poi.ss.usermodel.DataFormatter;" + "\r\n" + +"import org.apache.poi.ss.usermodel.Row;" + "\r\n" + +"import org.apache.poi.ss.usermodel.Sheet;" + "\r\n" + +"import org.apache.poi.ss.usermodel.Workbook;" + "\r\n" + +"import org.apache.poi.ss.usermodel.WorkbookFactory;" + "\r\n" + +"import org.apache.poi.xssf.usermodel.XSSFWorkbook;" + "\r\n" + +"import org.springframework.beans.factory.annotation.Autowired;" + "\r\n" + +"import org.springframework.core.io.InputStreamResource;" + "\r\n" + +"import org.springframework.http.HttpHeaders;" + "\r\n" + +"import org.springframework.http.HttpStatus;" + "\r\n" + +"import org.springframework.http.MediaType;" + "\r\n" + +"import org.springframework.http.ResponseEntity;" + "\r\n" + +"import org.springframework.util.StringUtils;" + "\r\n" + +"import org.springframework.web.bind.annotation.GetMapping;" + "\r\n" + +"import org.springframework.web.bind.annotation.PathVariable;" + "\r\n" + +"import org.springframework.web.bind.annotation.PostMapping;" + "\r\n" + +"import org.springframework.web.bind.annotation.RequestMapping;" + "\r\n" + +"import org.springframework.web.bind.annotation.RequestParam;" + "\r\n" + +"import org.springframework.web.bind.annotation.RestController;" + "\r\n" + +"import org.springframework.web.multipart.MultipartFile;" + "\r\n" + +"" + "\r\n" + +"import com.realnet.Sr_Contact_type.Entity.Sr_Contact_type_t;" + "\r\n" + +"import com.realnet.Sr_Contact_type.Repository.Sr_Contact_type_Repository;" + "\r\n" + +"import com.realnet.Sr_State.Entity.Sr_State_t;" + "\r\n" + +"import com.realnet.Sr_State.Repository.Sr_State_Repository;" + "\r\n" + +"import com.realnet.Sr_category2.Entity.Sr_category2_t;" + "\r\n" + +"import com.realnet.Sr_category2.Repository.Sr_category2_Repository;" + "\r\n" + +"import com.realnet.Sr_customer.Entity.Sr_customer_t;" + "\r\n" + +"import com.realnet.Sr_customer.Repository.Sr_customer_Repository;" + "\r\n" + +"import com.realnet.Sr_handler.Entity.Sr_handler_t;" + "\r\n" + +"import com.realnet.Sr_handler.Repository.Sr_handler_Repository;" + "\r\n" + +"import com.realnet.Sr_impact2.Entity.Sr_impact2_t;" + "\r\n" + +"import com.realnet.Sr_impact2.Repository.Sr_impact2_Repository;" + "\r\n" + +"import com.realnet.Sr_priority2.Entity.Sr_priority2_t;" + "\r\n" + +"import com.realnet.Sr_priority2.Repository.Sr_priority2_Repository;" + "\r\n" + +"import com.realnet.Sr_urgency.Entity.Sr_urgency_t;" + "\r\n" + +"import com.realnet.Sr_urgency.Repository.Sr_urgency_Repository;" + "\r\n" + +"import com.realnet.template.repository.TemplatedataRepo;" + "\r\n" + +"import com.realnet.template.service.FileUploadService;" + "\r\n" + +"import com.realnet.users.entity1.AppUser;" + "\r\n" + +"import com.realnet.users.service1.AppUserServiceImpl;" + "\r\n" + +"" + "\r\n" + +"@RestController" + "\r\n" + +"@RequestMapping(\"api/template\")" + "\r\n" + +"public class Controller {" + "\r\n" + +" @Autowired" + "\r\n" + +" private TemplatedataRepo temprepo;" + "\r\n" + +"" + "\r\n" + +" @Autowired" + "\r\n" + +" private Sr_priority2_Repository priorityrepo;" + "\r\n" + +"" + "\r\n" + +" @Autowired" + "\r\n" + +" private Sr_impact2_Repository impactrepo;" + "\r\n" + +"" + "\r\n" + +" @Autowired" + "\r\n" + +" private Sr_urgency_Repository urgencyrepo;" + "\r\n" + +"" + "\r\n" + +" @Autowired" + "\r\n" + +" private Sr_State_Repository staterepo;" + "\r\n" + +"" + "\r\n" + +" @Autowired" + "\r\n" + +" private Sr_Contact_type_Repository contactrepo;" + "\r\n" + +"" + "\r\n" + +" @Autowired" + "\r\n" + +" private Sr_customer_Repository customerepo;" + "\r\n" + +"" + "\r\n" + +" @Autowired" + "\r\n" + +" private Sr_category2_Repository categoryrepo;" + "\r\n" + +"" + "\r\n" + +" @Autowired" + "\r\n" + +" private Sr_handler_Repository handlerepo;" + "\r\n" + +" @Autowired" + "\r\n" + +" FileUploadService fileupload;" + "\r\n" + +" @Autowired" + "\r\n" + +" private AppUserServiceImpl userService;" + "\r\n" + +"" + "\r\n" + +" @GetMapping(\"/demo/download/{file_type}\")" + "\r\n" + +"" + "\r\n" + +" public ResponseEntity demoTemplate(@PathVariable String file_type) throws IOException {" + "\r\n" + +"" + "\r\n" + +" if (file_type.equalsIgnoreCase(\"priority\")) {" + "\r\n" + +"" + "\r\n" + +" String filename = \"Sr_priority2_t\" + \".xlsx\";" + "\r\n" + +" String[] header = { \"Priority Name\", \"Description\", \"Is Active\", \"Effective Start Date\"," + "\r\n" + +" \"Effective End date\" };" + "\r\n" + +" ByteArrayInputStream in = demoTemplate(header, file_type);" + "\r\n" + +" InputStreamResource file = new InputStreamResource(in);" + "\r\n" + +" return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\" + filename)" + "\r\n" + +" .contentType(MediaType.parseMediaType(\"application/vnd.ms-excel\")).body(file);" + "\r\n" + +"" + "\r\n" + +" } else if (file_type.equalsIgnoreCase(\"impact\")) {" + "\r\n" + +"" + "\r\n" + +" String filename = \"Sr_impact2_t\" + \".xlsx\";" + "\r\n" + +" String[] header = { \"Impact Name\", \"Description\", \"Is Active\", \"Effective Start Date\"," + "\r\n" + +" \"Effective End date\" };" + "\r\n" + +" ByteArrayInputStream in = demoTemplate(header, file_type);" + "\r\n" + +" InputStreamResource file = new InputStreamResource(in);" + "\r\n" + +" return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\" + filename)" + "\r\n" + +" .contentType(MediaType.parseMediaType(\"application/vnd.ms-excel\")).body(file);" + "\r\n" + +"" + "\r\n" + +" } else if (file_type.equalsIgnoreCase(\"urgency\")) {" + "\r\n" + +"" + "\r\n" + +" String filename = \"Sr_urgency_t\" + \".xlsx\";" + "\r\n" + +" String[] header = { \"Urgency Name\", \"Description\", \"Is Active\", \"Effective Start Date\"," + "\r\n" + +" \"Effective End date\" };" + "\r\n" + +" ByteArrayInputStream in = demoTemplate(header, file_type);" + "\r\n" + +" InputStreamResource file = new InputStreamResource(in);" + "\r\n" + +" return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\" + filename)" + "\r\n" + +" .contentType(MediaType.parseMediaType(\"application/vnd.ms-excel\")).body(file);" + "\r\n" + +"" + "\r\n" + +" } else if (file_type.equalsIgnoreCase(\"category\")) {" + "\r\n" + +"" + "\r\n" + +" String filename = \"Sr_category2_t\" + \".xlsx\";" + "\r\n" + +" String[] header = { \"Category Name\", \"Customer Id\", \"Is Active\", \"Effective Start Date\"," + "\r\n" + +" \"Effective End date\" };" + "\r\n" + +" ByteArrayInputStream in = demoTemplate(header, file_type);" + "\r\n" + +" InputStreamResource file = new InputStreamResource(in);" + "\r\n" + +" return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\" + filename)" + "\r\n" + +" .contentType(MediaType.parseMediaType(\"application/vnd.ms-excel\")).body(file);" + "\r\n" + +"" + "\r\n" + +" } else if (file_type.equalsIgnoreCase(\"state\")) {" + "\r\n" + +"" + "\r\n" + +" String filename = \"Sr_State_t\" + \".xlsx\";" + "\r\n" + +" String[] header = { \"State Name\", \"Description\", \"Is Active\", \"Effective Start Date\"," + "\r\n" + +" \"Effective End date\" };" + "\r\n" + +" ByteArrayInputStream in = demoTemplate(header, file_type);" + "\r\n" + +" InputStreamResource file = new InputStreamResource(in);" + "\r\n" + +" return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\" + filename)" + "\r\n" + +" .contentType(MediaType.parseMediaType(\"application/vnd.ms-excel\")).body(file);" + "\r\n" + +"" + "\r\n" + +" } else if (file_type.equalsIgnoreCase(\"contact_type\")) {" + "\r\n" + +"" + "\r\n" + +" String filename = \"Sr_Contact_type_t\" + \".xlsx\";" + "\r\n" + +" String[] header = { \"Contact Type Name\", \"Description\", \"Is Active\", \"Effective Start Date\"," + "\r\n" + +" \"Effective End date\" };" + "\r\n" + +" ByteArrayInputStream in = demoTemplate(header, file_type);" + "\r\n" + +" InputStreamResource file = new InputStreamResource(in);" + "\r\n" + +" return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\" + filename)" + "\r\n" + +" .contentType(MediaType.parseMediaType(\"application/vnd.ms-excel\")).body(file);" + "\r\n" + +"" + "\r\n" + +" } else if (file_type.equalsIgnoreCase(\"customer\")) {" + "\r\n" + +"" + "\r\n" + +" String filename = \"Sr_customer_t\" + \".xlsx\";" + "\r\n" + +" String[] header = { \"Customer Name\", \"Description\", \"Is Active\", \"Effective Start Date\"," + "\r\n" + +" \"Effective End date\" };" + "\r\n" + +" ByteArrayInputStream in = demoTemplate(header, file_type);" + "\r\n" + +" InputStreamResource file = new InputStreamResource(in);" + "\r\n" + +" return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\" + filename)" + "\r\n" + +" .contentType(MediaType.parseMediaType(\"application/vnd.ms-excel\")).body(file);" + "\r\n" + +"" + "\r\n" + +" } else if (file_type.equalsIgnoreCase(\"handler\")) {" + "\r\n" + +"" + "\r\n" + +" String filename = \"Sr_handler_t\" + \".xlsx\";" + "\r\n" + +" String[] header = { \"User Id\", \"Role Id\", \"Is Active\", \"Effective Start Date\", \"Effective End date\" };" + "\r\n" + +" ByteArrayInputStream in = demoTemplate(header, file_type);" + "\r\n" + +" InputStreamResource file = new InputStreamResource(in);" + "\r\n" + +" return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\" + filename)" + "\r\n" + +" .contentType(MediaType.parseMediaType(\"application/vnd.ms-excel\")).body(file);" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" return new ResponseEntity(\"Not Found\", HttpStatus.BAD_REQUEST);" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" public static ByteArrayInputStream demoTemplate(String[] HEADERs, String file_type) throws IOException {" + "\r\n" + +" String SHEET = file_type;" + "\r\n" + +" Workbook workbook = new XSSFWorkbook();" + "\r\n" + +" ByteArrayOutputStream out = new ByteArrayOutputStream();" + "\r\n" + +" Sheet sheet = workbook.createSheet(SHEET);" + "\r\n" + +" Row headerRow = sheet.createRow(0);" + "\r\n" + +" for (int col = 0; col < HEADERs.length; col++) {" + "\r\n" + +" Cell cell = headerRow.createCell(col);" + "\r\n" + +" cell.setCellValue(HEADERs[col]);" + "\r\n" + +" }" + "\r\n" + +" workbook.write(out);" + "\r\n" + +" return new ByteArrayInputStream(out.toByteArray());" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" @PostMapping(\"/save/{filetype}\")" + "\r\n" + +" public ResponseEntity uploadFile(@RequestParam MultipartFile file, @PathVariable String filetype)" + "\r\n" + +" throws IOException, ParseException {" + "\r\n" + +" BufferedReader br;" + "\r\n" + +" InputStream is = file.getInputStream();" + "\r\n" + +" br = new BufferedReader(new InputStreamReader(is));" + "\r\n" + +" String file_name = file.getOriginalFilename();" + "\r\n" + +" AppUser loggedInUser = userService.getLoggedInUser();" + "\r\n" + +"" + "\r\n" + +" if (filetype.equalsIgnoreCase(\"priority\")) {" + "\r\n" + +"" + "\r\n" + +" if (file_name.contains(\"Sr_priority2_t\")) {" + "\r\n" + +"" + "\r\n" + +" String[] header = { \"Priority Name\", \"Description\", \"Is Active\", \"Effective Start Date\"," + "\r\n" + +" \"Effective End date\" };" + "\r\n" + +" ArrayList prioritylist = new ArrayList();" + "\r\n" + +"" + "\r\n" + +" Workbook workbook = WorkbookFactory.create(is);" + "\r\n" + +"" + "\r\n" + +"// Create a DataFormatter to format and get each cell's value as String" + "\r\n" + +" DataFormatter dataFormatter = new DataFormatter();" + "\r\n" + +"" + "\r\n" + +" Sheet sheet = workbook.getSheetAt(0);" + "\r\n" + +"" + "\r\n" + +" // Getting number of columns in the Sheet" + "\r\n" + +" int cols = sheet.getRow(0).getLastCellNum();" + "\r\n" + +"" + "\r\n" + +" fileupload.uploadFile(file, loggedInUser.getUserId(), filetype);" + "\r\n" + +"" + "\r\n" + +" for (Row row : sheet) {" + "\r\n" + +"" + "\r\n" + +" if (row.getRowNum() == 0) {" + "\r\n" + +" for (int i = 0; i < cols; i++) {" + "\r\n" + +" String value = dataFormatter.formatCellValue(row.getCell(i));" + "\r\n" + +"" + "\r\n" + +" if (!header[i].equalsIgnoreCase(value)) {" + "\r\n" + +"" + "\r\n" + +" return new ResponseEntity<>(" + "\r\n" + +" \"priority file Should have \\\"\" + header + \" \\\"in the header in excel file\"," + "\r\n" + +" HttpStatus.BAD_REQUEST);" + "\r\n" + +" }" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" if (row.getRowNum() != 0) {" + "\r\n" + +" Date date = row.getCell(3).getDateCellValue();" + "\r\n" + +" Date date2 = row.getCell(4).getDateCellValue();" + "\r\n" + +"" + "\r\n" + +" Sr_priority2_t priority = new Sr_priority2_t();" + "\r\n" + +" priority.setPriority_name(dataFormatter.formatCellValue(row.getCell(0)));" + "\r\n" + +" priority.setDescription(dataFormatter.formatCellValue(row.getCell(1)));" + "\r\n" + +" priority.setActive(Boolean.valueOf(dataFormatter.formatCellValue(row.getCell(2))));" + "\r\n" + +"" + "\r\n" + +" priority.setEffective_start_date(date);" + "\r\n" + +" priority.setEffective_end_date(date2);" + "\r\n" + +"" + "\r\n" + +" prioritylist.add(priority);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +" priorityrepo.saveAll(prioritylist);" + "\r\n" + +" workbook.close();" + "\r\n" + +"" + "\r\n" + +"// " + "\r\n" + +"" + "\r\n" + +" return new ResponseEntity<>(\"File Uploaded\", HttpStatus.ACCEPTED);" + "\r\n" + +" }" + "\r\n" + +" return new ResponseEntity<>(\"File name should contain Sr_priority2_t\", HttpStatus.BAD_REQUEST);" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" else if (filetype.contains(\"impact\")) {" + "\r\n" + +"" + "\r\n" + +" if (file_name.contains(\"Sr_impact2_t\")) {" + "\r\n" + +"" + "\r\n" + +" String[] header = { \"Impact Name\", \"Description\", \"Is Active\", \"Effective Start Date\"," + "\r\n" + +" \"Effective End date\" };" + "\r\n" + +"" + "\r\n" + +" ArrayList impactlist = new ArrayList();" + "\r\n" + +"" + "\r\n" + +" Workbook workbook = WorkbookFactory.create(is);" + "\r\n" + +"" + "\r\n" + +"// Create a DataFormatter to format and get each cell's value as String" + "\r\n" + +" DataFormatter dataFormatter = new DataFormatter();" + "\r\n" + +"" + "\r\n" + +" Sheet sheet = workbook.getSheetAt(0);" + "\r\n" + +"" + "\r\n" + +" // Getting number of columns in the Sheet" + "\r\n" + +" int cols = sheet.getRow(0).getLastCellNum();" + "\r\n" + +"" + "\r\n" + +" fileupload.uploadFile(file, loggedInUser.getUserId(), filetype);" + "\r\n" + +"" + "\r\n" + +" for (Row row : sheet) {" + "\r\n" + +"" + "\r\n" + +" if (row.getRowNum() == 0) {" + "\r\n" + +" for (int i = 0; i < cols; i++) {" + "\r\n" + +" String value = dataFormatter.formatCellValue(row.getCell(i));" + "\r\n" + +"" + "\r\n" + +" if (!header[i].equalsIgnoreCase(value)) {" + "\r\n" + +"" + "\r\n" + +" return new ResponseEntity<>(\"priority file header is not in correct format \"," + "\r\n" + +" HttpStatus.BAD_REQUEST);" + "\r\n" + +" }" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" if (row.getRowNum() != 0) {" + "\r\n" + +"" + "\r\n" + +" Date date = row.getCell(3).getDateCellValue();" + "\r\n" + +" Date date2 = row.getCell(4).getDateCellValue();" + "\r\n" + +"" + "\r\n" + +" Sr_impact2_t impact = new Sr_impact2_t();" + "\r\n" + +" impact.setImpact_name(dataFormatter.formatCellValue(row.getCell(0)));" + "\r\n" + +" impact.setDescription(dataFormatter.formatCellValue(row.getCell(1)));" + "\r\n" + +" impact.setIsActive(Boolean.valueOf(dataFormatter.formatCellValue(row.getCell(2))));" + "\r\n" + +"" + "\r\n" + +" impact.setEffective_start_date(date);" + "\r\n" + +" impact.setEffective_end_date(date2);" + "\r\n" + +"" + "\r\n" + +" impactlist.add(impact);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +" impactrepo.saveAll(impactlist);" + "\r\n" + +" System.out.println(impactlist);" + "\r\n" + +"" + "\r\n" + +" workbook.close();" + "\r\n" + +"" + "\r\n" + +" return new ResponseEntity<>(\"File Uploaded\", HttpStatus.ACCEPTED);" + "\r\n" + +" }" + "\r\n" + +" return new ResponseEntity<>(\"File name should contain Sr_impact2_t\", HttpStatus.BAD_REQUEST);" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" else if (filetype.contains(\"urgency\")) {" + "\r\n" + +"" + "\r\n" + +" if (file_name.contains(\"Sr_urgency_t\")) {" + "\r\n" + +"" + "\r\n" + +" String[] header = { \"Urgency Name\", \"Description\", \"Is Active\", \"Effective Start Date\"," + "\r\n" + +" \"Effective End date\" };" + "\r\n" + +" List li = new ArrayList();" + "\r\n" + +" li.add(\"Impact Name\");" + "\r\n" + +" li.add(\"Description\");" + "\r\n" + +" li.add(\"Is Active\");" + "\r\n" + +" li.add(\"Effective Start Date\");" + "\r\n" + +" li.add(\"Effective End date\");" + "\r\n" + +"" + "\r\n" + +" ArrayList impactlist = new ArrayList();" + "\r\n" + +"" + "\r\n" + +" Workbook workbook = WorkbookFactory.create(is);" + "\r\n" + +"" + "\r\n" + +"// Create a DataFormatter to format and get each cell's value as String" + "\r\n" + +" DataFormatter dataFormatter = new DataFormatter();" + "\r\n" + +"" + "\r\n" + +" Sheet sheet = workbook.getSheetAt(0);" + "\r\n" + +"" + "\r\n" + +" // Getting number of columns in the Sheet" + "\r\n" + +" int cols = sheet.getRow(0).getLastCellNum();" + "\r\n" + +"" + "\r\n" + +" fileupload.uploadFile(file, loggedInUser.getUserId(), filetype);" + "\r\n" + +"" + "\r\n" + +" for (Row row : sheet) {" + "\r\n" + +"" + "\r\n" + +" if (row.getRowNum() == 0) {" + "\r\n" + +" for (int i = 0; i < cols; i++) {" + "\r\n" + +" String value = dataFormatter.formatCellValue(row.getCell(i));" + "\r\n" + +"" + "\r\n" + +" if (!header[i].equalsIgnoreCase(value)) {" + "\r\n" + +"" + "\r\n" + +" return new ResponseEntity<>(" + "\r\n" + +" \"priority file Should have \\\"\" + li + \" \\\"in the header in excel file\"," + "\r\n" + +" HttpStatus.BAD_REQUEST);" + "\r\n" + +" }" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" if (row.getRowNum() != 0) {" + "\r\n" + +" Date date = row.getCell(3).getDateCellValue();" + "\r\n" + +" Date date2 = row.getCell(4).getDateCellValue();" + "\r\n" + +"" + "\r\n" + +" Sr_urgency_t urgency = new Sr_urgency_t();" + "\r\n" + +" urgency.setUrgency_name(dataFormatter.formatCellValue(row.getCell(0)));" + "\r\n" + +" urgency.setDescription(dataFormatter.formatCellValue(row.getCell(1)));" + "\r\n" + +" urgency.setIsActive(Boolean.valueOf(dataFormatter.formatCellValue(row.getCell(2))));" + "\r\n" + +"" + "\r\n" + +" urgency.setEffective_start_date(date);" + "\r\n" + +" urgency.setEffective_end_date(date2);" + "\r\n" + +"" + "\r\n" + +" impactlist.add(urgency);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +" urgencyrepo.saveAll(impactlist);" + "\r\n" + +" System.out.println(impactlist);" + "\r\n" + +"" + "\r\n" + +" workbook.close();" + "\r\n" + +"" + "\r\n" + +" return new ResponseEntity<>(\"File Uploaded\", HttpStatus.ACCEPTED);" + "\r\n" + +" }" + "\r\n" + +" return new ResponseEntity<>(\"File name should contain sr_incident_t\", HttpStatus.BAD_REQUEST);" + "\r\n" + +"" + "\r\n" + +" } else if (filetype.equalsIgnoreCase(\"category\")) {" + "\r\n" + +"" + "\r\n" + +" String[] header = { \"Category Name\", \"Customer Id\", \"Is Active\", \"Effective Start Date\"," + "\r\n" + +" \"Effective End date\" };" + "\r\n" + +"" + "\r\n" + +"// if (file_name.contains(\"Sr_impact2_t\")) {" + "\r\n" + +"//" + "\r\n" + +"// ArrayList impactlist = new ArrayList();" + "\r\n" + +"//" + "\r\n" + +"// Workbook workbook = WorkbookFactory.create(is);" + "\r\n" + +"//" + "\r\n" + +"//// Create a DataFormatter to format and get each cell's value as String" + "\r\n" + +"// DataFormatter dataFormatter = new DataFormatter();" + "\r\n" + +"//" + "\r\n" + +"// Sheet sheet = workbook.getSheetAt(0);" + "\r\n" + +"//" + "\r\n" + +"// // Getting number of columns in the Sheet" + "\r\n" + +"// int cols = sheet.getRow(0).getLastCellNum();" + "\r\n" + +"//" + "\r\n" + +"// fileupload.uploadFile(file, loggedInUser.getUserId(), filetype);" + "\r\n" + +"//" + "\r\n" + +"// for (Row row : sheet) {" + "\r\n" + +"//" + "\r\n" + +"// if (row.getRowNum() == 0) {" + "\r\n" + +"// for (int i = 0; i < cols; i++) {" + "\r\n" + +"// String value = dataFormatter.formatCellValue(row.getCell(i));" + "\r\n" + +"//" + "\r\n" + +"// if (!header[i].equalsIgnoreCase(value)) {" + "\r\n" + +"//" + "\r\n" + +"// return new ResponseEntity<>(\"priority file header is not in correct format \"," + "\r\n" + +"// HttpStatus.BAD_REQUEST);" + "\r\n" + +"// }" + "\r\n" + +"// }" + "\r\n" + +"//" + "\r\n" + +"// }" + "\r\n" + +"//" + "\r\n" + +"// if (row.getRowNum() != 0) {" + "\r\n" + +"// String value = dataFormatter.formatCellValue(row.getCell(4));" + "\r\n" + +"// String value2 = dataFormatter.formatCellValue(row.getCell(5));" + "\r\n" + +"// Date date = new SimpleDateFormat(\"dd-MM-yyyy\").parse(value);" + "\r\n" + +"// Date date2 = new SimpleDateFormat(\"dd-MM-yyyy\").parse(value2);" + "\r\n" + +"//" + "\r\n" + +"// Sr_impact2_t impact = new Sr_impact2_t();" + "\r\n" + +"// impact.setImpact_name(file_name);" + "\r\n" + +"// impact.setDescription(dataFormatter.formatCellValue(row.getCell(2)));" + "\r\n" + +"// impact.setIsActive(Boolean.valueOf(dataFormatter.formatCellValue(row.getCell(3))));" + "\r\n" + +"//" + "\r\n" + +"//// priority.setEffective_start_date(date);" + "\r\n" + +"//// priority.setEffective_end_date(date2);" + "\r\n" + +"//" + "\r\n" + +"// impactlist.add(impact);" + "\r\n" + +"// }" + "\r\n" + +"//" + "\r\n" + +"// }" + "\r\n" + +"// impactrepo.saveAll(impactlist);" + "\r\n" + +"// System.out.println(impactlist);" + "\r\n" + +"//" + "\r\n" + +"// workbook.close();" + "\r\n" + +"//" + "\r\n" + +"// }" + "\r\n" + +"" + "\r\n" + +" } else if (filetype.equalsIgnoreCase(\"state\")) {" + "\r\n" + +"" + "\r\n" + +" String[] header = { \"State Name\", \"Description\", \"Is Active\", \"Effective Start Date\"," + "\r\n" + +" \"Effective End date\" };" + "\r\n" + +"" + "\r\n" + +" if (file_name.contains(\"Sr_State_t\")) {" + "\r\n" + +"" + "\r\n" + +" ArrayList statelist = new ArrayList();" + "\r\n" + +"" + "\r\n" + +" Workbook workbook = WorkbookFactory.create(is);" + "\r\n" + +"" + "\r\n" + +"// Create a DataFormatter to format and get each cell's value as String" + "\r\n" + +" DataFormatter dataFormatter = new DataFormatter();" + "\r\n" + +"" + "\r\n" + +" Sheet sheet = workbook.getSheetAt(0);" + "\r\n" + +"" + "\r\n" + +" // Getting number of columns in the Sheet" + "\r\n" + +" int cols = sheet.getRow(0).getLastCellNum();" + "\r\n" + +"" + "\r\n" + +" fileupload.uploadFile(file, loggedInUser.getUserId(), filetype);" + "\r\n" + +"" + "\r\n" + +" for (Row row : sheet) {" + "\r\n" + +"" + "\r\n" + +" if (row.getRowNum() == 0) {" + "\r\n" + +" for (int i = 0; i < cols; i++) {" + "\r\n" + +" String value = dataFormatter.formatCellValue(row.getCell(i));" + "\r\n" + +"" + "\r\n" + +" if (!header[i].equalsIgnoreCase(value)) {" + "\r\n" + +"" + "\r\n" + +" return new ResponseEntity<>(\"priority file header is not in correct format \"," + "\r\n" + +" HttpStatus.BAD_REQUEST);" + "\r\n" + +" }" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" if (row.getRowNum() != 0) {" + "\r\n" + +" String value = dataFormatter.formatCellValue(row.getCell(3));" + "\r\n" + +" String value2 = dataFormatter.formatCellValue(row.getCell(4));" + "\r\n" + +"" + "\r\n" + +" Sr_State_t state = new Sr_State_t();" + "\r\n" + +" state.setState_name(dataFormatter.formatCellValue(row.getCell(0)));" + "\r\n" + +" state.setDescription(dataFormatter.formatCellValue(row.getCell(1)));" + "\r\n" + +" state.setIsActive(Boolean.valueOf(dataFormatter.formatCellValue(row.getCell(2))));" + "\r\n" + +"" + "\r\n" + +" state.setEffective_end_date(value2);" + "\r\n" + +" state.setEffective_start_date(value);" + "\r\n" + +"" + "\r\n" + +" statelist.add(state);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +" staterepo.saveAll(statelist);" + "\r\n" + +"" + "\r\n" + +" workbook.close();" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" } else if (filetype.equalsIgnoreCase(\"contact_type\")) {" + "\r\n" + +"" + "\r\n" + +" String[] header = { \"Contact Type Name\", \"Description\", \"Is Active\", \"Effective Start Date\"," + "\r\n" + +" \"Effective End date\" };" + "\r\n" + +"" + "\r\n" + +" if (file_name.contains(\"Sr_Contact_type_t\")) {" + "\r\n" + +"" + "\r\n" + +" ArrayList statelist = new ArrayList();" + "\r\n" + +"" + "\r\n" + +" Workbook workbook = WorkbookFactory.create(is);" + "\r\n" + +"" + "\r\n" + +"// Create a DataFormatter to format and get each cell's value as String" + "\r\n" + +" DataFormatter dataFormatter = new DataFormatter();" + "\r\n" + +"" + "\r\n" + +" Sheet sheet = workbook.getSheetAt(0);" + "\r\n" + +"" + "\r\n" + +" // Getting number of columns in the Sheet" + "\r\n" + +" int cols = sheet.getRow(0).getLastCellNum();" + "\r\n" + +"" + "\r\n" + +" fileupload.uploadFile(file, loggedInUser.getUserId(), filetype);" + "\r\n" + +"" + "\r\n" + +" for (Row row : sheet) {" + "\r\n" + +"" + "\r\n" + +" if (row.getRowNum() == 0) {" + "\r\n" + +" for (int i = 0; i < cols; i++) {" + "\r\n" + +" String value = dataFormatter.formatCellValue(row.getCell(i));" + "\r\n" + +"" + "\r\n" + +" if (!header[i].equalsIgnoreCase(value)) {" + "\r\n" + +"" + "\r\n" + +" return new ResponseEntity<>(\"priority file header is not in correct format \"," + "\r\n" + +" HttpStatus.BAD_REQUEST);" + "\r\n" + +" }" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" if (row.getRowNum() != 0) {" + "\r\n" + +" Date date = row.getCell(3).getDateCellValue();" + "\r\n" + +" Date date2 = row.getCell(4).getDateCellValue();" + "\r\n" + +"" + "\r\n" + +" Sr_Contact_type_t contact = new Sr_Contact_type_t();" + "\r\n" + +" contact.setCon_type_name(dataFormatter.formatCellValue(row.getCell(0)));" + "\r\n" + +" contact.setDescription(dataFormatter.formatCellValue(row.getCell(1)));" + "\r\n" + +" contact.setIsActive(Boolean.valueOf(dataFormatter.formatCellValue(row.getCell(2))));" + "\r\n" + +"" + "\r\n" + +" contact.setEffective_start_date(date);" + "\r\n" + +" contact.setEffective_end_date(date2);" + "\r\n" + +"" + "\r\n" + +" statelist.add(contact);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +" contactrepo.saveAll(statelist);" + "\r\n" + +"" + "\r\n" + +" workbook.close();" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" } else if (filetype.equalsIgnoreCase(\"customer\")) {" + "\r\n" + +"" + "\r\n" + +" String[] header = { \"Customer Name\", \"Description\", \"Is Active\", \"Effective Start Date\"," + "\r\n" + +" \"Effective End date\" };" + "\r\n" + +"" + "\r\n" + +" if (file_name.contains(\"Sr_customer_t\")) {" + "\r\n" + +"" + "\r\n" + +" ArrayList customerlist = new ArrayList();" + "\r\n" + +"" + "\r\n" + +" Workbook workbook = WorkbookFactory.create(is);" + "\r\n" + +"" + "\r\n" + +"// Create a DataFormatter to format and get each cell's value as String" + "\r\n" + +" DataFormatter dataFormatter = new DataFormatter();" + "\r\n" + +"" + "\r\n" + +" Sheet sheet = workbook.getSheetAt(0);" + "\r\n" + +"" + "\r\n" + +" // Getting number of columns in the Sheet" + "\r\n" + +" int cols = sheet.getRow(0).getLastCellNum();" + "\r\n" + +"" + "\r\n" + +" fileupload.uploadFile(file, loggedInUser.getUserId(), filetype);" + "\r\n" + +"" + "\r\n" + +" for (Row row : sheet) {" + "\r\n" + +"" + "\r\n" + +" if (row.getRowNum() == 0) {" + "\r\n" + +" for (int i = 0; i < cols; i++) {" + "\r\n" + +" String value = dataFormatter.formatCellValue(row.getCell(i));" + "\r\n" + +"" + "\r\n" + +" if (!header[i].equalsIgnoreCase(value)) {" + "\r\n" + +"" + "\r\n" + +" return new ResponseEntity<>(\"priority file header is not in correct format \"," + "\r\n" + +" HttpStatus.BAD_REQUEST);" + "\r\n" + +" }" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" if (row.getRowNum() != 0) {" + "\r\n" + +" Date date = row.getCell(3).getDateCellValue();" + "\r\n" + +" Date date2 = row.getCell(4).getDateCellValue();" + "\r\n" + +"" + "\r\n" + +" Sr_customer_t customer = new Sr_customer_t();" + "\r\n" + +" customer.setCustomer_name(dataFormatter.formatCellValue(row.getCell(0)));" + "\r\n" + +" customer.setDescription(dataFormatter.formatCellValue(row.getCell(1)));" + "\r\n" + +" customer.setIsActive(Boolean.valueOf(dataFormatter.formatCellValue(row.getCell(2))));" + "\r\n" + +"" + "\r\n" + +" customer.setEffective_start_date(date);" + "\r\n" + +" customer.setEffective_end_date(date2);" + "\r\n" + +"" + "\r\n" + +" customerlist.add(customer);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +" customerepo.saveAll(customerlist);" + "\r\n" + +"" + "\r\n" + +" workbook.close();" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" } else if (filetype.equalsIgnoreCase(\"handler\")) {" + "\r\n" + +"" + "\r\n" + +" String[] header = { \"User Id\", \"Role Id\", \"Is Active\", \"Effective Start Date\", \"Effective End date\" };" + "\r\n" + +"" + "\r\n" + +"// if (file_name.contains(\"Sr_State_t\")) {" + "\r\n" + +"//" + "\r\n" + +"// ArrayList statelist = new ArrayList();" + "\r\n" + +"//" + "\r\n" + +"// Workbook workbook = WorkbookFactory.create(is);" + "\r\n" + +"//" + "\r\n" + +"//// Create a DataFormatter to format and get each cell's value as String" + "\r\n" + +"// DataFormatter dataFormatter = new DataFormatter();" + "\r\n" + +"//" + "\r\n" + +"// Sheet sheet = workbook.getSheetAt(0);" + "\r\n" + +"//" + "\r\n" + +"// // Getting number of columns in the Sheet" + "\r\n" + +"// int cols = sheet.getRow(0).getLastCellNum();" + "\r\n" + +"//" + "\r\n" + +"// fileupload.uploadFile(file, loggedInUser.getUserId(), filetype);" + "\r\n" + +"//" + "\r\n" + +"// for (Row row : sheet) {" + "\r\n" + +"//" + "\r\n" + +"// if (row.getRowNum() == 0) {" + "\r\n" + +"// for (int i = 0; i < cols; i++) {" + "\r\n" + +"// String value = dataFormatter.formatCellValue(row.getCell(i));" + "\r\n" + +"//" + "\r\n" + +"// if (!header[i].equalsIgnoreCase(value)) {" + "\r\n" + +"//" + "\r\n" + +"// return new ResponseEntity<>(\"priority file header is not in correct format \"," + "\r\n" + +"// HttpStatus.BAD_REQUEST);" + "\r\n" + +"// }" + "\r\n" + +"// }" + "\r\n" + +"//" + "\r\n" + +"// }" + "\r\n" + +"//" + "\r\n" + +"// if (row.getRowNum() != 0) {" + "\r\n" + +"// Date date = row.getCell(3).getDateCellValue();" + "\r\n" + +"// Date date2 = row.getCell(4).getDateCellValue();" + "\r\n" + +"//" + "\r\n" + +"// Sr_State_t state = new Sr_State_t();" + "\r\n" + +"// state.setState_name(dataFormatter.formatCellValue(row.getCell(1)));" + "\r\n" + +"// state.setDescription(dataFormatter.formatCellValue(row.getCell(2)));" + "\r\n" + +"// state.setIsActive(Boolean.valueOf(dataFormatter.formatCellValue(row.getCell(3))));" + "\r\n" + +"//" + "\r\n" + +"//// priority.setEffective_start_date(date);" + "\r\n" + +"//// priority.setEffective_end_date(date2);" + "\r\n" + +"//" + "\r\n" + +"// statelist.add(state);" + "\r\n" + +"// }" + "\r\n" + +"//" + "\r\n" + +"// }" + "\r\n" + +"// staterepo.saveAll(statelist);" + "\r\n" + +"//" + "\r\n" + +"// workbook.close();" + "\r\n" + +"//" + "\r\n" + +"// }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" return new ResponseEntity<>(\"Something Went Wrong please try again....!!!!! \", HttpStatus.BAD_REQUEST);" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +"// Download template data in excel Files" + "\r\n" + +"" + "\r\n" + +" @GetMapping(\"/download/{file_type}\")" + "\r\n" + +"" + "\r\n" + +" public ResponseEntity getFile(@PathVariable String file_type) throws IOException {" + "\r\n" + +"" + "\r\n" + +" if (file_type.equalsIgnoreCase(\"priority\")) {" + "\r\n" + +"" + "\r\n" + +" String filename = \"Sr_priority2_t\" + \".xlsx\";" + "\r\n" + +" String[] header = { \"Priority Name\", \"Description\", \"Is Active\", \"Effective Start Date\"," + "\r\n" + +" \"Effective End date\" };" + "\r\n" + +" List findAll = priorityrepo.findAll();" + "\r\n" + +" ByteArrayInputStream in = templateByte(findAll, header);" + "\r\n" + +" InputStreamResource file = new InputStreamResource(in);" + "\r\n" + +" return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\" + filename)" + "\r\n" + +" .contentType(MediaType.parseMediaType(\"application/vnd.ms-excel\")).body(file);" + "\r\n" + +"" + "\r\n" + +" } else if (file_type.equalsIgnoreCase(\"impact\")) {" + "\r\n" + +"" + "\r\n" + +" String filename = \"Sr_impact2_t\" + \".xlsx\";" + "\r\n" + +" String[] header = { \"Impact Name\", \"Description\", \"Is Active\", \"Effective Start Date\"," + "\r\n" + +" \"Effective End date\" };" + "\r\n" + +" List findAll = impactrepo.findAll();" + "\r\n" + +" ByteArrayInputStream in = templateByte3(findAll, header);" + "\r\n" + +" InputStreamResource file = new InputStreamResource(in);" + "\r\n" + +" return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\" + filename)" + "\r\n" + +" .contentType(MediaType.parseMediaType(\"application/vnd.ms-excel\")).body(file);" + "\r\n" + +"" + "\r\n" + +" } else if (file_type.equalsIgnoreCase(\"urgency\")) {" + "\r\n" + +"" + "\r\n" + +" String filename = \"Sr_urgency_t\" + \".xlsx\";" + "\r\n" + +" String[] header = { \"Urgency Name\", \"Description\", \"Is Active\", \"Effective Start Date\"," + "\r\n" + +" \"Effective End date\" };" + "\r\n" + +" List findAll = urgencyrepo.findAll();" + "\r\n" + +" ByteArrayInputStream in = templateByte2(findAll, header);" + "\r\n" + +" InputStreamResource file = new InputStreamResource(in);" + "\r\n" + +" return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\" + filename)" + "\r\n" + +" .contentType(MediaType.parseMediaType(\"application/vnd.ms-excel\")).body(file);" + "\r\n" + +"" + "\r\n" + +" } else if (file_type.equalsIgnoreCase(\"category\")) {" + "\r\n" + +"" + "\r\n" + +" String filename = \"Sr_category2_t\" + \".xlsx\";" + "\r\n" + +" String[] header = { \"Category Name\", \"Customer Id\", \"Is Active\", \"Effective Start Date\"," + "\r\n" + +" \"Effective End date\" };" + "\r\n" + +" List findAll = categoryrepo.findAll();" + "\r\n" + +" ByteArrayInputStream in = templateByte4(findAll, header);" + "\r\n" + +" InputStreamResource file = new InputStreamResource(in);" + "\r\n" + +" return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\" + filename)" + "\r\n" + +" .contentType(MediaType.parseMediaType(\"application/vnd.ms-excel\")).body(file);" + "\r\n" + +"" + "\r\n" + +" } else if (file_type.equalsIgnoreCase(\"state\")) {" + "\r\n" + +"" + "\r\n" + +" String filename = \"Sr_State_t\" + \".xlsx\";" + "\r\n" + +" String[] header = { \"State Name\", \"Description\", \"Is Active\", \"Effective Start Date\"," + "\r\n" + +" \"Effective End date\" };" + "\r\n" + +" List findAll = staterepo.findAll();" + "\r\n" + +" ByteArrayInputStream in = templateByte6(findAll, header);" + "\r\n" + +" InputStreamResource file = new InputStreamResource(in);" + "\r\n" + +" return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\" + filename)" + "\r\n" + +" .contentType(MediaType.parseMediaType(\"application/vnd.ms-excel\")).body(file);" + "\r\n" + +"" + "\r\n" + +" } else if (file_type.equalsIgnoreCase(\"contact_type\")) {" + "\r\n" + +"" + "\r\n" + +" String filename = \"Sr_Contact_type_t\" + \".xlsx\";" + "\r\n" + +" String[] header = { \"Contact Type Name\", \"Description\", \"Is Active\", \"Effective Start Date\"," + "\r\n" + +" \"Effective End date\" };" + "\r\n" + +" List findAll = contactrepo.findAll();" + "\r\n" + +" ByteArrayInputStream in = templateByte5(findAll, header);" + "\r\n" + +" InputStreamResource file = new InputStreamResource(in);" + "\r\n" + +" return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\" + filename)" + "\r\n" + +" .contentType(MediaType.parseMediaType(\"application/vnd.ms-excel\")).body(file);" + "\r\n" + +"" + "\r\n" + +" } else if (file_type.equalsIgnoreCase(\"customer\")) {" + "\r\n" + +"" + "\r\n" + +" String filename = \"Sr_customer_t\" + \".xlsx\";" + "\r\n" + +" String[] header = { \"Customer Name\", \"Description\", \"Is Active\", \"Effective Start Date\"," + "\r\n" + +" \"Effective End date\" };" + "\r\n" + +" List findAll = customerepo.findAll();" + "\r\n" + +" ByteArrayInputStream in = templateByte7(findAll, header);" + "\r\n" + +" InputStreamResource file = new InputStreamResource(in);" + "\r\n" + +" return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\" + filename)" + "\r\n" + +" .contentType(MediaType.parseMediaType(\"application/vnd.ms-excel\")).body(file);" + "\r\n" + +"" + "\r\n" + +" } else if (file_type.equalsIgnoreCase(\"handler\")) {" + "\r\n" + +"" + "\r\n" + +" String filename = \"Sr_handler_t\" + \".xlsx\";" + "\r\n" + +" String[] header = { \"User Id\", \"Role Id\", \"Is Active\", \"Effective Start Date\", \"Effective End date\" };" + "\r\n" + +" List findAll = handlerepo.findAll();" + "\r\n" + +" ByteArrayInputStream in = templateByte8(findAll, header);" + "\r\n" + +" InputStreamResource file = new InputStreamResource(in);" + "\r\n" + +" return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\" + filename)" + "\r\n" + +" .contentType(MediaType.parseMediaType(\"application/vnd.ms-excel\")).body(file);" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" return new ResponseEntity(\"Not Found\", HttpStatus.BAD_REQUEST);" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" public static ByteArrayInputStream templateByte(List list, String[] hEADERs) {" + "\r\n" + +"" + "\r\n" + +" String SHEET = \"priority\";" + "\r\n" + +"" + "\r\n" + +" try (Workbook workbook = new XSSFWorkbook(); ByteArrayOutputStream out = new ByteArrayOutputStream();) {" + "\r\n" + +" Sheet sheet = workbook.createSheet(SHEET);" + "\r\n" + +"" + "\r\n" + +" // Header" + "\r\n" + +" Row headerRow = sheet.createRow(0);" + "\r\n" + +"" + "\r\n" + +" for (int col = 0; col < hEADERs.length; col++) {" + "\r\n" + +" Cell cell = headerRow.createCell(col);" + "\r\n" + +" cell.setCellValue(hEADERs[col]);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" int rowIdx = 1;" + "\r\n" + +" for (Sr_priority2_t p : list) {" + "\r\n" + +" Row row = sheet.createRow(rowIdx++);" + "\r\n" + +"" + "\r\n" + +" row.createCell(0).setCellValue(p.getPriority_name());" + "\r\n" + +" row.createCell(1).setCellValue(p.getDescription());" + "\r\n" + +" row.createCell(2).setCellValue(p.isActive());" + "\r\n" + +" row.createCell(3).setCellValue(String.valueOf(p.getEffective_start_date()));" + "\r\n" + +" row.createCell(4).setCellValue(String.valueOf(p.getEffective_end_date()));" + "\r\n" + +" }" + "\r\n" + +" workbook.write(out);" + "\r\n" + +" return new ByteArrayInputStream(out.toByteArray());" + "\r\n" + +" } catch (IOException e) {" + "\r\n" + +" throw new RuntimeException(\"fail to import data to Excel file: \" + e.getMessage());" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" public static ByteArrayInputStream templateByte2(List list, String[] hEADERs) {" + "\r\n" + +"" + "\r\n" + +" String SHEET = \"URGENCY\";" + "\r\n" + +"" + "\r\n" + +" try (Workbook workbook = new XSSFWorkbook(); ByteArrayOutputStream out = new ByteArrayOutputStream();) {" + "\r\n" + +" Sheet sheet = workbook.createSheet(SHEET);" + "\r\n" + +"" + "\r\n" + +" // Header" + "\r\n" + +" Row headerRow = sheet.createRow(0);" + "\r\n" + +"" + "\r\n" + +" for (int col = 0; col < hEADERs.length; col++) {" + "\r\n" + +" Cell cell = headerRow.createCell(col);" + "\r\n" + +" cell.setCellValue(hEADERs[col]);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" int rowIdx = 1;" + "\r\n" + +" for (Sr_urgency_t p : list) {" + "\r\n" + +" Row row = sheet.createRow(rowIdx++);" + "\r\n" + +"" + "\r\n" + +" row.createCell(0).setCellValue(p.getUrgency_name());" + "\r\n" + +" row.createCell(1).setCellValue(p.getDescription());" + "\r\n" + +" row.createCell(2).setCellValue(p.isIsActive());" + "\r\n" + +" row.createCell(3).setCellValue(String.valueOf(p.getEffective_start_date()));" + "\r\n" + +" row.createCell(4).setCellValue(String.valueOf(p.getEffective_end_date()));" + "\r\n" + +" }" + "\r\n" + +" workbook.write(out);" + "\r\n" + +" return new ByteArrayInputStream(out.toByteArray());" + "\r\n" + +" } catch (IOException e) {" + "\r\n" + +" throw new RuntimeException(\"fail to import data to Excel file: \" + e.getMessage());" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" public static ByteArrayInputStream templateByte3(List list, String[] hEADERs) {" + "\r\n" + +"" + "\r\n" + +" String SHEET = \"Impact\";" + "\r\n" + +"" + "\r\n" + +" try (Workbook workbook = new XSSFWorkbook(); ByteArrayOutputStream out = new ByteArrayOutputStream();) {" + "\r\n" + +" Sheet sheet = workbook.createSheet(SHEET);" + "\r\n" + +"" + "\r\n" + +" // Header" + "\r\n" + +" Row headerRow = sheet.createRow(0);" + "\r\n" + +"" + "\r\n" + +" for (int col = 0; col < hEADERs.length; col++) {" + "\r\n" + +" Cell cell = headerRow.createCell(col);" + "\r\n" + +" cell.setCellValue(hEADERs[col]);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" int rowIdx = 1;" + "\r\n" + +" for (Sr_impact2_t p : list) {" + "\r\n" + +" Row row = sheet.createRow(rowIdx++);" + "\r\n" + +"" + "\r\n" + +" row.createCell(0).setCellValue(p.getImpact_name());" + "\r\n" + +" row.createCell(1).setCellValue(p.getDescription());" + "\r\n" + +" row.createCell(2).setCellValue(p.isIsActive());" + "\r\n" + +" row.createCell(3).setCellValue(String.valueOf(p.getEffective_start_date()));" + "\r\n" + +" row.createCell(4).setCellValue(String.valueOf(p.getEffective_end_date()));" + "\r\n" + +" }" + "\r\n" + +" workbook.write(out);" + "\r\n" + +" return new ByteArrayInputStream(out.toByteArray());" + "\r\n" + +" } catch (IOException e) {" + "\r\n" + +" throw new RuntimeException(\"fail to import data to Excel file: \" + e.getMessage());" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" public static ByteArrayInputStream templateByte4(List list, String[] hEADERs) {" + "\r\n" + +"" + "\r\n" + +" String SHEET = \"Impact\";" + "\r\n" + +"" + "\r\n" + +" try (Workbook workbook = new XSSFWorkbook(); ByteArrayOutputStream out = new ByteArrayOutputStream();) {" + "\r\n" + +" Sheet sheet = workbook.createSheet(SHEET);" + "\r\n" + +"" + "\r\n" + +" // Header" + "\r\n" + +" Row headerRow = sheet.createRow(0);" + "\r\n" + +"" + "\r\n" + +" for (int col = 0; col < hEADERs.length; col++) {" + "\r\n" + +" Cell cell = headerRow.createCell(col);" + "\r\n" + +" cell.setCellValue(hEADERs[col]);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" int rowIdx = 1;" + "\r\n" + +" for (Sr_category2_t p : list) {" + "\r\n" + +" Row row = sheet.createRow(rowIdx++);" + "\r\n" + +"" + "\r\n" + +" row.createCell(0).setCellValue(p.getCustomer_id());" + "\r\n" + +" row.createCell(1).setCellValue(p.getDescription());" + "\r\n" + +" row.createCell(2).setCellValue(p.isActive());" + "\r\n" + +" row.createCell(3).setCellValue(String.valueOf(p.getEffective_start_date()));" + "\r\n" + +" row.createCell(4).setCellValue(String.valueOf(p.getEffective_end_date()));" + "\r\n" + +" }" + "\r\n" + +" workbook.write(out);" + "\r\n" + +" return new ByteArrayInputStream(out.toByteArray());" + "\r\n" + +" } catch (IOException e) {" + "\r\n" + +" throw new RuntimeException(\"fail to import data to Excel file: \" + e.getMessage());" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" public static ByteArrayInputStream templateByte5(List list, String[] hEADERs) {" + "\r\n" + +"" + "\r\n" + +" String SHEET = \"Impact\";" + "\r\n" + +"" + "\r\n" + +" try (Workbook workbook = new XSSFWorkbook(); ByteArrayOutputStream out = new ByteArrayOutputStream();) {" + "\r\n" + +" Sheet sheet = workbook.createSheet(SHEET);" + "\r\n" + +"" + "\r\n" + +" // Header" + "\r\n" + +" Row headerRow = sheet.createRow(0);" + "\r\n" + +"" + "\r\n" + +" for (int col = 0; col < hEADERs.length; col++) {" + "\r\n" + +" Cell cell = headerRow.createCell(col);" + "\r\n" + +" cell.setCellValue(hEADERs[col]);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" int rowIdx = 1;" + "\r\n" + +" for (Sr_Contact_type_t p : list) {" + "\r\n" + +" Row row = sheet.createRow(rowIdx++);" + "\r\n" + +"" + "\r\n" + +" row.createCell(0).setCellValue(p.getCon_type_name());" + "\r\n" + +" row.createCell(1).setCellValue(p.getDescription());" + "\r\n" + +" row.createCell(2).setCellValue(p.isIsActive());" + "\r\n" + +" row.createCell(3).setCellValue(String.valueOf(p.getEffective_start_date()));" + "\r\n" + +" row.createCell(4).setCellValue(String.valueOf(p.getEffective_end_date()));" + "\r\n" + +" }" + "\r\n" + +" workbook.write(out);" + "\r\n" + +" return new ByteArrayInputStream(out.toByteArray());" + "\r\n" + +" } catch (IOException e) {" + "\r\n" + +" throw new RuntimeException(\"fail to import data to Excel file: \" + e.getMessage());" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" public static ByteArrayInputStream templateByte6(List list, String[] hEADERs) {" + "\r\n" + +"" + "\r\n" + +" String SHEET = \"Impact\";" + "\r\n" + +"" + "\r\n" + +" try (Workbook workbook = new XSSFWorkbook(); ByteArrayOutputStream out = new ByteArrayOutputStream();) {" + "\r\n" + +" Sheet sheet = workbook.createSheet(SHEET);" + "\r\n" + +"" + "\r\n" + +" // Header" + "\r\n" + +" Row headerRow = sheet.createRow(0);" + "\r\n" + +"" + "\r\n" + +" for (int col = 0; col < hEADERs.length; col++) {" + "\r\n" + +" Cell cell = headerRow.createCell(col);" + "\r\n" + +" cell.setCellValue(hEADERs[col]);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" int rowIdx = 1;" + "\r\n" + +" for (Sr_State_t p : list) {" + "\r\n" + +" Row row = sheet.createRow(rowIdx++);" + "\r\n" + +" row.createCell(0).setCellValue(p.getState_name());" + "\r\n" + +" row.createCell(1).setCellValue(p.getDescription());" + "\r\n" + +" row.createCell(2).setCellValue(p.isIsActive());" + "\r\n" + +" row.createCell(3).setCellValue(String.valueOf(p.getEffective_start_date()));" + "\r\n" + +" row.createCell(4).setCellValue(String.valueOf(p.getEffective_end_date()));" + "\r\n" + +" }" + "\r\n" + +" workbook.write(out);" + "\r\n" + +" return new ByteArrayInputStream(out.toByteArray());" + "\r\n" + +" } catch (IOException e) {" + "\r\n" + +" throw new RuntimeException(\"fail to import data to Excel file: \" + e.getMessage());" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" public static ByteArrayInputStream templateByte7(List list, String[] hEADERs) {" + "\r\n" + +"" + "\r\n" + +" String SHEET = \"Impact\";" + "\r\n" + +"" + "\r\n" + +" try (Workbook workbook = new XSSFWorkbook(); ByteArrayOutputStream out = new ByteArrayOutputStream();) {" + "\r\n" + +" Sheet sheet = workbook.createSheet(SHEET);" + "\r\n" + +"" + "\r\n" + +" // Header" + "\r\n" + +" Row headerRow = sheet.createRow(0);" + "\r\n" + +"" + "\r\n" + +" for (int col = 0; col < hEADERs.length; col++) {" + "\r\n" + +" Cell cell = headerRow.createCell(col);" + "\r\n" + +" cell.setCellValue(hEADERs[col]);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" int rowIdx = 1;" + "\r\n" + +" for (Sr_customer_t p : list) {" + "\r\n" + +" Row row = sheet.createRow(rowIdx++);" + "\r\n" + +"" + "\r\n" + +" row.createCell(0).setCellValue(p.getCustomer_name());" + "\r\n" + +" row.createCell(1).setCellValue(p.getDescription());" + "\r\n" + +" row.createCell(2).setCellValue(p.isIsActive());" + "\r\n" + +" row.createCell(3).setCellValue(String.valueOf(p.getEffective_start_date()));" + "\r\n" + +" row.createCell(4).setCellValue(String.valueOf(p.getEffective_end_date()));" + "\r\n" + +" }" + "\r\n" + +" workbook.write(out);" + "\r\n" + +" return new ByteArrayInputStream(out.toByteArray());" + "\r\n" + +" } catch (IOException e) {" + "\r\n" + +" throw new RuntimeException(\"fail to import data to Excel file: \" + e.getMessage());" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" public static ByteArrayInputStream templateByte8(List list, String[] hEADERs) {" + "\r\n" + +"" + "\r\n" + +" String SHEET = \"Impact\";" + "\r\n" + +"" + "\r\n" + +" try (Workbook workbook = new XSSFWorkbook(); ByteArrayOutputStream out = new ByteArrayOutputStream();) {" + "\r\n" + +" Sheet sheet = workbook.createSheet(SHEET);" + "\r\n" + +"" + "\r\n" + +" // Header" + "\r\n" + +" Row headerRow = sheet.createRow(0);" + "\r\n" + +"" + "\r\n" + +" for (int col = 0; col < hEADERs.length; col++) {" + "\r\n" + +" Cell cell = headerRow.createCell(col);" + "\r\n" + +" cell.setCellValue(hEADERs[col]);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" int rowIdx = 1;" + "\r\n" + +" for (Sr_handler_t p : list) {" + "\r\n" + +" Row row = sheet.createRow(rowIdx++);" + "\r\n" + +"" + "\r\n" + +" row.createCell(0).setCellValue(p.getRole());" + "\r\n" + +" row.createCell(1).setCellValue(p.getUser_name());" + "\r\n" + +" row.createCell(2).setCellValue(p.isIsActive());" + "\r\n" + +" row.createCell(3).setCellValue(String.valueOf(p.getEffective_start_date()));" + "\r\n" + +" row.createCell(4).setCellValue(String.valueOf(p.getEffective_end_date()));" + "\r\n" + +" }" + "\r\n" + +" workbook.write(out);" + "\r\n" + +" return new ByteArrayInputStream(out.toByteArray());" + "\r\n" + +" } catch (IOException e) {" + "\r\n" + +" throw new RuntimeException(\"fail to import data to Excel file: \" + e.getMessage());" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" @GetMapping(\"/getalltemplate\")" + "\r\n" + +" public ResponseEntity getALlTemplate() {" + "\r\n" + +" return new ResponseEntity<>(temprepo.findAll(), HttpStatus.ACCEPTED);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +"}" \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_DatabaseQueryController.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_DatabaseQueryController.java new file mode 100644 index 0000000..8f72c2d --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_DatabaseQueryController.java @@ -0,0 +1,75 @@ +"package com.realnet.template.controller;" + "\r\n" + +"" + "\r\n" + +"import java.sql.Connection;" + "\r\n" + +"import java.sql.DriverManager;" + "\r\n" + +"import java.sql.SQLException;" + "\r\n" + +"import java.sql.Statement;" + "\r\n" + +"import java.util.ArrayList;" + "\r\n" + +"import java.util.List;" + "\r\n" + +"" + "\r\n" + +"import org.springframework.beans.factory.annotation.Autowired;" + "\r\n" + +"import org.springframework.beans.factory.annotation.Value;" + "\r\n" + +"import org.springframework.web.bind.annotation.GetMapping;" + "\r\n" + +"import org.springframework.web.bind.annotation.PathVariable;" + "\r\n" + +"import org.springframework.web.bind.annotation.RequestMapping;" + "\r\n" + +"import org.springframework.web.bind.annotation.ResponseBody;" + "\r\n" + +"import org.springframework.web.bind.annotation.RestController;" + "\r\n" + +"" + "\r\n" + +"import com.realnet.template.repository.DynamicTempRepo;" + "\r\n" + +"import com.realnet.template.service.DatabaseQueryService;" + "\r\n" + +"" + "\r\n" + +"@RestController" + "\r\n" + +"@RequestMapping(\"/sureserve/template/databasequery\")" + "\r\n" + +"public class DatabaseQueryController {" + "\r\n" + +"" + "\r\n" + +" @Autowired" + "\r\n" + +" private DatabaseQueryService rn_table_service;" + "\r\n" + +" @Autowired" + "\r\n" + +" private DynamicTempRepo tempRepo;" + "\r\n" + +"" + "\r\n" + +" @Value(\"${spring.datasource.username}\")" + "\r\n" + +" private String userName;" + "\r\n" + +"" + "\r\n" + +" @Value(\"${spring.datasource.password}\")" + "\r\n" + +" private String password;" + "\r\n" + +"" + "\r\n" + +" @Value(\"${spring.datasource.url}\")" + "\r\n" + +" private String url;" + "\r\n" + +"" + "\r\n" + +"// get all databse list available" + "\r\n" + +" @GetMapping(\"/Table_list\")" + "\r\n" + +" @ResponseBody" + "\r\n" + +" public List getdatabase() {" + "\r\n" + +" List list = tempRepo.getdatabaseList();" + "\r\n" + +" return list;" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" // get all table list available" + "\r\n" + +" @GetMapping(\"/Table_list_all\")" + "\r\n" + +" @ResponseBody" + "\r\n" + +" public List gettableList()" + "\r\n" + +"" + "\r\n" + +"// @PathVariable String table_schema) " + "\r\n" + +" {" + "\r\n" + +"// List list = tempRepo.getListOftables(table_schema);" + "\r\n" + +" List list = rn_table_service.getListOftable(\"sureserve\");" + "\r\n" + +" return list;" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" // get all column list available" + "\r\n" + +" @GetMapping(\"/Table_list/{table_schema}/{TABLE_NAME}\")" + "\r\n" + +" @ResponseBody" + "\r\n" + +" public List getallcolumnlist(@PathVariable String table_schema, @PathVariable String TABLE_NAME) {" + "\r\n" + +" List list = rn_table_service.getColumnAliasList1(table_schema, TABLE_NAME);" + "\r\n" + +" return list;" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" // create database" + "\r\n" + +" @GetMapping(\"/createdatabase/{table_schema}\")" + "\r\n" + +" @ResponseBody" + "\r\n" + +" public List createdatabase(@PathVariable String table_schema) {" + "\r\n" + +" List list = rn_table_service.createdatabase(table_schema);" + "\r\n" + +" return list;" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +"}" \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_DatabaseQueryService.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_DatabaseQueryService.java new file mode 100644 index 0000000..88dd907 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_DatabaseQueryService.java @@ -0,0 +1,89 @@ +"package com.realnet.template.service;" + "\r\n" + +"" + "\r\n" + +"import java.sql.Connection;" + "\r\n" + +"import java.sql.DriverManager;" + "\r\n" + +"import java.sql.ResultSet;" + "\r\n" + +"import java.sql.SQLException;" + "\r\n" + +"import java.sql.Statement;" + "\r\n" + +"import java.util.ArrayList;" + "\r\n" + +"import java.util.List;" + "\r\n" + +"" + "\r\n" + +"import org.springframework.beans.factory.annotation.Autowired;" + "\r\n" + +"import org.springframework.beans.factory.annotation.Value;" + "\r\n" + +"import org.springframework.stereotype.Service;" + "\r\n" + +"import org.springframework.web.bind.annotation.PathVariable;" + "\r\n" + +"" + "\r\n" + +"@Service" + "\r\n" + +"public class DatabaseQueryService {" + "\r\n" + +"" + "\r\n" + +" @Value(\"${spring.datasource.username}\")" + "\r\n" + +" private String userName;" + "\r\n" + +"" + "\r\n" + +" @Value(\"${spring.datasource.password}\")" + "\r\n" + +" private String password;" + "\r\n" + +"" + "\r\n" + +" @Value(\"${spring.datasource.url}\")" + "\r\n" + +" private String url;" + "\r\n" + +"" + "\r\n" + +" // get all column" + "\r\n" + +"" + "\r\n" + +" public List getColumnAliasList1(String table_schema, String tABLE_NAME) {" + "\r\n" + +" String query = \"SELECT column_name FROM information_schema.columns WHERE TABLE_SCHEMA='\" + table_schema" + "\r\n" + +" + \"' and table_name = '\" + tABLE_NAME + \"' \";" + "\r\n" + +" List list = new ArrayList();" + "\r\n" + +" try (Connection con = DriverManager.getConnection(url, userName, password);" + "\r\n" + +"" + "\r\n" + +" Statement stmt = con.createStatement()) {" + "\r\n" + +" ResultSet rs = stmt.executeQuery(query);" + "\r\n" + +" while (rs.next()) {" + "\r\n" + +" String coffeeName = rs.getString(\"column_name\");" + "\r\n" + +" list.add(coffeeName);" + "\r\n" + +" }" + "\r\n" + +" } catch (SQLException e) {" + "\r\n" + +" e.printStackTrace();" + "\r\n" + +" }" + "\r\n" + +" return list;" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" // get all table list from databse" + "\r\n" + +"" + "\r\n" + +" public List getListOftable(String table_schema) {" + "\r\n" + +" String query = \"SELECT table_name FROM information_schema.tables WHERE table_schema='\" + table_schema + \"' \";" + "\r\n" + +"" + "\r\n" + +" List list = new ArrayList();" + "\r\n" + +" try (Connection con = DriverManager.getConnection(url, userName, password);" + "\r\n" + +"" + "\r\n" + +" Statement stmt = con.createStatement()) {" + "\r\n" + +" ResultSet rs = stmt.executeQuery(query);" + "\r\n" + +" while (rs.next()) {" + "\r\n" + +" String coffeeName = rs.getString(\"table_name\");" + "\r\n" + +" list.add(coffeeName);" + "\r\n" + +" }" + "\r\n" + +" } catch (SQLException e) {" + "\r\n" + +" e.printStackTrace();" + "\r\n" + +" }" + "\r\n" + +" return list;" + "\r\n" + +" }" + "\r\n" + +" " + "\r\n" + +" public List createdatabase(String table_schema){" + "\r\n" + +" String query = \"CREATE SCHEMA \" + table_schema + \";\";" + "\r\n" + +"" + "\r\n" + +" List list = new ArrayList();" + "\r\n" + +" try (Connection con = DriverManager.getConnection(url, userName, password); // conn.str" + "\r\n" + +"" + "\r\n" + +" Statement stmt = con.createStatement()) {" + "\r\n" + +" int rs = stmt.executeUpdate(query);" + "\r\n" + +"" + "\r\n" + +" list.add(rs);" + "\r\n" + +"" + "\r\n" + +" } catch (SQLException e) {" + "\r\n" + +" e.printStackTrace();" + "\r\n" + +" } finally {" + "\r\n" + +" }" + "\r\n" + +" return list;" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +" " + "\r\n" + +"" + "\r\n" + +"" + "\r\n" + +"}" \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_DynamicTempRepo.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_DynamicTempRepo.java new file mode 100644 index 0000000..14faf1d --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_DynamicTempRepo.java @@ -0,0 +1,24 @@ +"package com.realnet.template.repository;" + "\r\n" + +"" + "\r\n" + +"import java.util.List;" + "\r\n" + +"" + "\r\n" + +"import org.springframework.data.jpa.repository.JpaRepository;" + "\r\n" + +"import org.springframework.data.jpa.repository.Query;" + "\r\n" + +"import org.springframework.data.repository.query.Param;" + "\r\n" + +"import org.springframework.stereotype.Repository;" + "\r\n" + +"" + "\r\n" + +"import com.realnet.template.entity.Dynamic_template;" + "\r\n" + +"" + "\r\n" + +"@Repository" + "\r\n" + +"public interface DynamicTempRepo extends JpaRepository{" + "\r\n" + +"" + "\r\n" + +" " + "\r\n" + +" @Query(value= \"select schema_name from information_schema.schemata\",nativeQuery = true)" + "\r\n" + +" List getdatabaseList();" + "\r\n" + +"" + "\r\n" + +" @Query(value= \"SELECT table_name FROM information_schema.tables WHERE table_schema =?1\",nativeQuery = true)" + "\r\n" + +" List getListOftables(String table_schema);" + "\r\n" + +"" + "\r\n" + +" @Query(value= \"SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE `TABLE_SCHEMA`=:'TABLE_SCHEMA' AND `TABLE_NAME`='TABLE_NAME';\",nativeQuery = true)" + "\r\n" + +" List getallcolumnlist(@Param(\"TABLE_SCHEMA\") Object table_schema, @Param(\"TABLE_NAME\") Object tABLE_NAME);" + "\r\n" + +"}" \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_DynamicTemplateController.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_DynamicTemplateController.java new file mode 100644 index 0000000..06db400 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_DynamicTemplateController.java @@ -0,0 +1,250 @@ +"package com.realnet.template.controller;" + "\r\n" + +"" + "\r\n" + +"import java.io.BufferedReader;" + "\r\n" + +"import java.io.IOException;" + "\r\n" + +"import java.io.InputStream;" + "\r\n" + +"import java.io.InputStreamReader;" + "\r\n" + +"import java.text.DateFormat;" + "\r\n" + +"import java.text.SimpleDateFormat;" + "\r\n" + +"import java.util.ArrayList;" + "\r\n" + +"import java.util.Calendar;" + "\r\n" + +"import java.util.HashMap;" + "\r\n" + +"import java.util.Iterator;" + "\r\n" + +"import java.util.List;" + "\r\n" + +"import java.util.Map;" + "\r\n" + +"import java.util.Set;" + "\r\n" + +"" + "\r\n" + +"import org.apache.poi.ss.usermodel.DataFormatter;" + "\r\n" + +"import org.apache.poi.ss.usermodel.Row;" + "\r\n" + +"import org.apache.poi.ss.usermodel.Sheet;" + "\r\n" + +"import org.apache.poi.ss.usermodel.Workbook;" + "\r\n" + +"import org.apache.poi.ss.usermodel.WorkbookFactory;" + "\r\n" + +"import org.json.simple.JSONObject;" + "\r\n" + +"import org.springframework.beans.factory.annotation.Autowired;" + "\r\n" + +"import org.springframework.http.HttpStatus;" + "\r\n" + +"import org.springframework.http.ResponseEntity;" + "\r\n" + +"import org.springframework.web.bind.annotation.DeleteMapping;" + "\r\n" + +"import org.springframework.web.bind.annotation.GetMapping;" + "\r\n" + +"import org.springframework.web.bind.annotation.PathVariable;" + "\r\n" + +"import org.springframework.web.bind.annotation.PostMapping;" + "\r\n" + +"import org.springframework.web.bind.annotation.PutMapping;" + "\r\n" + +"import org.springframework.web.bind.annotation.RequestMapping;" + "\r\n" + +"import org.springframework.web.bind.annotation.RequestParam;" + "\r\n" + +"import org.springframework.web.bind.annotation.RestController;" + "\r\n" + +"import org.springframework.web.multipart.MultipartFile;" + "\r\n" + +"" + "\r\n" + +"import com.fasterxml.jackson.core.JsonProcessingException;" + "\r\n" + +"import com.fasterxml.jackson.databind.JsonMappingException;" + "\r\n" + +"import com.fasterxml.jackson.databind.ObjectMapper;" + "\r\n" + +"import com.google.gson.JsonArray;" + "\r\n" + +"import com.google.gson.JsonElement;" + "\r\n" + +"import com.google.gson.JsonObject;" + "\r\n" + +"import com.google.gson.JsonParser;" + "\r\n" + +"import com.realnet.Notification.Notification.Entity.NotEntity;" + "\r\n" + +"import com.realnet.fileupload.helper.Fileuploadhelper;" + "\r\n" + +"import com.realnet.incident.entity.IncidentEntity;" + "\r\n" + +"import com.realnet.template.entity.Dynamic_template;" + "\r\n" + +"import com.realnet.template.repository.DynamicTempRepo;" + "\r\n" + +"import com.realnet.users.entity1.AppUser;" + "\r\n" + +"import com.realnet.users.service1.AppUserServiceImpl;" + "\r\n" + +"" + "\r\n" + +"@RestController" + "\r\n" + +"@RequestMapping(\"/sureserve/template/dynamic\")" + "\r\n" + +"public class DynamicTemplateController {" + "\r\n" + +"" + "\r\n" + +" @Autowired" + "\r\n" + +" private DynamicTempRepo tempRepo;" + "\r\n" + +"" + "\r\n" + +" @Autowired" + "\r\n" + +" private AppUserServiceImpl userService;" + "\r\n" + +"" + "\r\n" + +" @Autowired" + "\r\n" + +" private Fileuploadhelper fileuploadhelper;" + "\r\n" + +"" + "\r\n" + +" @GetMapping(\"/templatetojson\")" + "\r\n" + +" public ResponseEntity saveTemplateInJson(@RequestParam MultipartFile file) throws IOException {" + "\r\n" + +"" + "\r\n" + +" BufferedReader br;" + "\r\n" + +" InputStream is = file.getInputStream();" + "\r\n" + +" br = new BufferedReader(new InputStreamReader(is));" + "\r\n" + +"" + "\r\n" + +" Workbook workbook = WorkbookFactory.create(is);" + "\r\n" + +"" + "\r\n" + +"// Create a DataFormatter to format and get each cell's value as String" + "\r\n" + +" DataFormatter dataFormatter = new DataFormatter();" + "\r\n" + +"" + "\r\n" + +" Sheet sheet = workbook.getSheetAt(0);" + "\r\n" + +"" + "\r\n" + +" // Getting number of columns in the Sheet" + "\r\n" + +" int cols = sheet.getRow(0).getLastCellNum();" + "\r\n" + +" int firstRowNum = sheet.getFirstRowNum();" + "\r\n" + +"" + "\r\n" + +" List keys = new ArrayList();" + "\r\n" + +" List jsonList = new ArrayList();" + "\r\n" + +"" + "\r\n" + +" for (Row row : sheet) {" + "\r\n" + +" JSONObject object = new JSONObject();" + "\r\n" + +" if (row.getRowNum() == 0) {" + "\r\n" + +" for (int i = 0; i < cols; i++) {" + "\r\n" + +" String value = dataFormatter.formatCellValue(row.getCell(i));" + "\r\n" + +" keys.add(value);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" if (row.getRowNum() != 0) {" + "\r\n" + +"" + "\r\n" + +" for (int i = 0; i < cols; i++) {" + "\r\n" + +" String key = keys.get(i);" + "\r\n" + +" String value = dataFormatter.formatCellValue(row.getCell(i));" + "\r\n" + +"" + "\r\n" + +" object.put(key, value);" + "\r\n" + +"" + "\r\n" + +" jsonList.add(object);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" workbook.close();" + "\r\n" + +"" + "\r\n" + +" return new ResponseEntity<>(jsonList, HttpStatus.BAD_REQUEST);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" @GetMapping(\"/jsonkeychange\")" + "\r\n" + +"" + "\r\n" + +" public ResponseEntity changeKeysOfJson(@RequestParam String newjson, @RequestParam String body)" + "\r\n" + +" throws IOException {" + "\r\n" + +"" + "\r\n" + +" JsonParser parser = new JsonParser();" + "\r\n" + +" JsonElement element = parser.parse(newjson);" + "\r\n" + +" JsonElement element2 = parser.parse(body);" + "\r\n" + +" JsonObject object2 = element.getAsJsonObject();" + "\r\n" + +" JsonArray array = element2.getAsJsonArray();" + "\r\n" + +" Iterator iterator = array.iterator();" + "\r\n" + +"" + "\r\n" + +" List jsonList = new ArrayList();" + "\r\n" + +"" + "\r\n" + +" Set keySet = object2.keySet();" + "\r\n" + +" Iterator it = keySet.iterator();" + "\r\n" + +"" + "\r\n" + +"// String key = it.next();" + "\r\n" + +" while (iterator.hasNext()) {" + "\r\n" + +"" + "\r\n" + +" Map map = new HashMap();" + "\r\n" + +" Object next = iterator.next();" + "\r\n" + +" JsonElement parse = parser.parse(next.toString());" + "\r\n" + +" JsonObject jsonObject = parse.getAsJsonObject();" + "\r\n" + +" for (String k : keySet) {" + "\r\n" + +" String next2 = object2.get(k).getAsString();" + "\r\n" + +" String value2 = jsonObject.get(k).getAsString();" + "\r\n" + +" map.put(next2, value2);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" jsonList.add(map);" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" return new ResponseEntity<>(jsonList, HttpStatus.BAD_REQUEST);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" // create data with file upload" + "\r\n" + +" @PostMapping(\"/dynamic_temp\")" + "\r\n" + +" public ResponseEntity addIssues(@RequestParam String data, @RequestParam MultipartFile file)" + "\r\n" + +" throws JsonMappingException, JsonProcessingException {" + "\r\n" + +"" + "\r\n" + +" AppUser user = userService.getLoggedInUser();" + "\r\n" + +" String userId = user.getUsername();" + "\r\n" + +" Dynamic_template dynamic_template;" + "\r\n" + +"" + "\r\n" + +" dynamic_template = new ObjectMapper().readValue(data, Dynamic_template.class);" + "\r\n" + +"" + "\r\n" + +" if (!file.isEmpty()) {" + "\r\n" + +"// for (MultipartFile e : attachmentFile) {" + "\r\n" + +" System.out.println(file.getOriginalFilename());" + "\r\n" + +"" + "\r\n" + +" boolean f = fileuploadhelper.uploadFile(file);" + "\r\n" + +"" + "\r\n" + +" if (f) {" + "\r\n" + +" System.out.println(\"file uploaded successfully\");" + "\r\n" + +" dynamic_template.setFile_name(file.getOriginalFilename());" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" } else {" + "\r\n" + +" dynamic_template.setFile_name(\"No file\");" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" dynamic_template.setUser_id(userId);" + "\r\n" + +"" + "\r\n" + +" Dynamic_template save = tempRepo.save(dynamic_template);" + "\r\n" + +"" + "\r\n" + +" if (save.getId() == 0) {" + "\r\n" + +" return new ResponseEntity(\"template Not Added\", HttpStatus.BAD_REQUEST);" + "\r\n" + +" } else {" + "\r\n" + +"" + "\r\n" + +" return new ResponseEntity<>(save, HttpStatus.ACCEPTED);" + "\r\n" + +" }" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" // get all" + "\r\n" + +" @GetMapping(\"/dynamic_temp\")" + "\r\n" + +" public ResponseEntity getAll() {" + "\r\n" + +"" + "\r\n" + +" return new ResponseEntity<>(tempRepo.findAll(), HttpStatus.ACCEPTED);" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" // get by id" + "\r\n" + +" @GetMapping(\"/dynamic_temp/{id}\")" + "\r\n" + +" public ResponseEntity getIssueById(@PathVariable Long id) {" + "\r\n" + +"" + "\r\n" + +" return new ResponseEntity<>(tempRepo.findById(id).get(), HttpStatus.ACCEPTED);" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" // delete by id" + "\r\n" + +" @DeleteMapping(\"/dynamic_temp/{id}\")" + "\r\n" + +" public ResponseEntity deleteIssue(@PathVariable Long id) {" + "\r\n" + +" tempRepo.deleteById(id);" + "\r\n" + +" return new ResponseEntity(\"Success\", HttpStatus.ACCEPTED);" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" // update by id" + "\r\n" + +" @PutMapping(\"/dynamic_temp/{id}\")" + "\r\n" + +" public ResponseEntity updateIssue(@RequestParam String data, @PathVariable Long id," + "\r\n" + +" @RequestParam MultipartFile file) throws Exception {" + "\r\n" + +"" + "\r\n" + +" Dynamic_template dynamic_template;" + "\r\n" + +" dynamic_template = new ObjectMapper().readValue(data, Dynamic_template.class);" + "\r\n" + +"" + "\r\n" + +" Dynamic_template template = tempRepo.findById(id).get();" + "\r\n" + +"" + "\r\n" + +" if (!file.isEmpty()) {" + "\r\n" + +" System.out.println(file.getOriginalFilename());" + "\r\n" + +"" + "\r\n" + +" boolean f = fileuploadhelper.uploadFile(file);" + "\r\n" + +"" + "\r\n" + +" if (f) {" + "\r\n" + +" System.out.println(\"file uploaded successfully\");" + "\r\n" + +" template.setFile_name(file.getOriginalFilename());" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" } else {" + "\r\n" + +" template.setFile_name(\"No file\");" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" template.setEntity_name(dynamic_template.getEntity_name());" + "\r\n" + +" template.setUser_id(dynamic_template.getUser_id());" + "\r\n" + +"" + "\r\n" + +" Dynamic_template save = tempRepo.save(template);" + "\r\n" + +" return new ResponseEntity<>(save, HttpStatus.ACCEPTED);" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +"}" \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_Dynamic_template.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_Dynamic_template.java new file mode 100644 index 0000000..63e3b6d --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_Dynamic_template.java @@ -0,0 +1,25 @@ +"package com.realnet.template.entity;" + "\r\n" + +"" + "\r\n" + +"import javax.persistence.Entity;" + "\r\n" + +"import javax.persistence.GeneratedValue;" + "\r\n" + +"import javax.persistence.GenerationType;" + "\r\n" + +"import javax.persistence.Id;" + "\r\n" + +"" + "\r\n" + +"import lombok.AllArgsConstructor;" + "\r\n" + +"import lombok.Data;" + "\r\n" + +"import lombok.NoArgsConstructor;" + "\r\n" + +"" + "\r\n" + +"@Data" + "\r\n" + +"@Entity" + "\r\n" + +"@AllArgsConstructor" + "\r\n" + +"@NoArgsConstructor" + "\r\n" + +"public class Dynamic_template {" + "\r\n" + +"" + "\r\n" + +" @Id" + "\r\n" + +" @GeneratedValue(strategy = GenerationType.IDENTITY)" + "\r\n" + +" private Long id;" + "\r\n" + +" " + "\r\n" + +" private String user_id;" + "\r\n" + +" private String file_name;" + "\r\n" + +" private String entity_name;" + "\r\n" + +"}" \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_ExcelDataService.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_ExcelDataService.java new file mode 100644 index 0000000..afe4984 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_ExcelDataService.java @@ -0,0 +1,96 @@ +"//package com.realnet.excel.service;" + "\r\n" + +"//" + "\r\n" + +"//import java.io.IOException;" + "\r\n" + +"//import java.util.ArrayList;" + "\r\n" + +"//import java.util.List;" + "\r\n" + +"//" + "\r\n" + +"//import org.apache.poi.EncryptedDocumentException;" + "\r\n" + +"//import org.apache.poi.ss.usermodel.Cell;" + "\r\n" + +"//import org.apache.poi.ss.usermodel.DataFormatter;" + "\r\n" + +"//import org.apache.poi.ss.usermodel.Row;" + "\r\n" + +"//import org.apache.poi.ss.usermodel.Sheet;" + "\r\n" + +"//import org.apache.poi.ss.usermodel.Workbook;" + "\r\n" + +"//import org.apache.poi.ss.usermodel.WorkbookFactory;" + "\r\n" + +"//import org.springframework.stereotype.Service;" + "\r\n" + +"//" + "\r\n" + +"//import com.realnet.excel.entity.ExcelFileUpload;" + "\r\n" + +"//" + "\r\n" + +"//@Service" + "\r\n" + +"//public class ExcelDataService {" + "\r\n" + +"// " + "\r\n" + +"// Workbook workbook;" + "\r\n" + +"//" + "\r\n" + +"// public List getExcelDataAsList() {" + "\r\n" + +"//" + "\r\n" + +"// List list = new ArrayList();" + "\r\n" + +"//" + "\r\n" + +"// // Create a DataFormatter to format and get each cell's value as String" + "\r\n" + +"// DataFormatter dataFormatter = new DataFormatter();" + "\r\n" + +"//" + "\r\n" + +"// // Create the Workbook" + "\r\n" + +"//// try {" + "\r\n" + +"//// workbook = WorkbookFactory.create();" + "\r\n" + +"//// } catch (EncryptedDocumentException | IOException e) {" + "\r\n" + +"//// e.printStackTrace();" + "\r\n" + +"//// }" + "\r\n" + +"//" + "\r\n" + +"// // Retrieving the number of sheets in the Workbook" + "\r\n" + +"// System.out.println(\"-------Workbook has '\" + workbook.getNumberOfSheets() + \"' Sheets-----\");" + "\r\n" + +"//" + "\r\n" + +"// // Getting the Sheet at index zero" + "\r\n" + +"// Sheet sheet = workbook.getSheetAt(0);" + "\r\n" + +"//" + "\r\n" + +"// // Getting number of columns in the Sheet" + "\r\n" + +"// int noOfColumns = sheet.getRow(0).getLastCellNum();" + "\r\n" + +"// System.out.println(\"-------Sheet has '\"+noOfColumns+\"' columns------\");" + "\r\n" + +"//" + "\r\n" + +"// // Using for-each loop to iterate over the rows and columns" + "\r\n" + +"// for (Row row : sheet) {" + "\r\n" + +"// for (Cell cell : row) {" + "\r\n" + +"// String cellValue = dataFormatter.formatCellValue(cell);" + "\r\n" + +"// list.add(cellValue);" + "\r\n" + +"// }" + "\r\n" + +"// }" + "\r\n" + +"//" + "\r\n" + +"// // filling excel data and creating list as List" + "\r\n" + +"// List invList = createList(list, noOfColumns);" + "\r\n" + +"//" + "\r\n" + +"// // Closing the workbook" + "\r\n" + +"// try {" + "\r\n" + +"// workbook.close();" + "\r\n" + +"// } catch (IOException e) {" + "\r\n" + +"// // TODO Auto-generated catch block" + "\r\n" + +"// e.printStackTrace();" + "\r\n" + +"// }" + "\r\n" + +"//" + "\r\n" + +"// return invList;" + "\r\n" + +"// }" + "\r\n" + +"//" + "\r\n" + +"// private List createList(List excelData, int noOfColumns) {" + "\r\n" + +"//" + "\r\n" + +"// ArrayList invList = new ArrayList();" + "\r\n" + +"//" + "\r\n" + +"// int i = noOfColumns;" + "\r\n" + +"// do {" + "\r\n" + +"// ExcelFileUpload inv = new ExcelFileUpload();" + "\r\n" + +"//" + "\r\n" + +"//// inv.setName(excelData.get(i));" + "\r\n" + +"//// inv.setAmount(Double.valueOf(excelData.get(i + 1)));" + "\r\n" + +"//// inv.setNumber(excelData.get(i + 2));" + "\r\n" + +"//// inv.setReceivedDate(excelData.get(i + 3));" + "\r\n" + +"//" + "\r\n" + +"// invList.add(inv);" + "\r\n" + +"// i = i + (noOfColumns);" + "\r\n" + +"//" + "\r\n" + +"// } while (i < excelData.size());" + "\r\n" + +"// return invList;" + "\r\n" + +"// }" + "\r\n" + +"//" + "\r\n" + +"//// public int saveExcelData(List invoices) {" + "\r\n" + +"//// invoices = repo.saveAll(invoices);" + "\r\n" + +"//// return invoices.size();" + "\r\n" + +"//// }" + "\r\n" + +"// " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +"//}" \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_FileUploadService.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_FileUploadService.java new file mode 100644 index 0000000..844b1d9 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_FileUploadService.java @@ -0,0 +1,79 @@ +"package com.realnet.template.service;" + "\r\n" + +"" + "\r\n" + +"import java.io.File;" + "\r\n" + +"import java.nio.file.Files;" + "\r\n" + +"import java.nio.file.Path;" + "\r\n" + +"import java.nio.file.Paths;" + "\r\n" + +"import java.nio.file.StandardCopyOption;" + "\r\n" + +"" + "\r\n" + +"import org.springframework.beans.factory.annotation.Autowired;" + "\r\n" + +"import org.springframework.beans.factory.annotation.Value;" + "\r\n" + +"import org.springframework.stereotype.Service;" + "\r\n" + +"import org.springframework.util.StringUtils;" + "\r\n" + +"import org.springframework.web.multipart.MultipartFile;" + "\r\n" + +"" + "\r\n" + +"import com.realnet.template.entity.TemplateFileUpload;" + "\r\n" + +"import com.realnet.template.repository.TemplatedataRepo;" + "\r\n" + +"" + "\r\n" + +"@Service" + "\r\n" + +"public class FileUploadService {" + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" @Autowired" + "\r\n" + +" private TemplatedataRepo repo;" + "\r\n" + +" " + "\r\n" + +"" + "\r\n" + +" " + "\r\n" + +" public String uploadFile(MultipartFile file,Long user_id,String file_type) {" + "\r\n" + +" try {" + "\r\n" + +" " + "\r\n" + +"// String " + "\r\n" + +" String file_name= file.getOriginalFilename();" + "\r\n" + +" String substring = file_name.substring(0,file_name.lastIndexOf(\".\"));" + "\r\n" + +" " + "\r\n" + +" String str = substring+System.currentTimeMillis();" + "\r\n" + +" String location =System.getProperty(\"user.dir\")+\"/src/main/resources\";" + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" String file_name2= file.getOriginalFilename();" + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" File staticdir2 = new File(location+\"/incomingfile\");" + "\r\n" + +" if(!staticdir2.exists()) {" + "\r\n" + +" staticdir2.mkdir();" + "\r\n" + +" }" + "\r\n" + +" Path copyLocation2 = Paths" + "\r\n" + +" .get(staticdir2 + File.separator + StringUtils.cleanPath(file_name2));" + "\r\n" + +" " + "\r\n" + +" Files.copy(file.getInputStream(), copyLocation2, StandardCopyOption.REPLACE_EXISTING); " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" File staticdir = new File(location+\"/processingfile\");" + "\r\n" + +" if(!staticdir.exists()) {" + "\r\n" + +" staticdir.mkdir();" + "\r\n" + +" }" + "\r\n" + +" Path copyLocation = Paths" + "\r\n" + +" .get(staticdir + File.separator + StringUtils.cleanPath(str+\".xlsx\"));" + "\r\n" + +" " + "\r\n" + +" Files.copy(file.getInputStream(), copyLocation, StandardCopyOption.REPLACE_EXISTING);" + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" TemplateFileUpload exceldata= new TemplateFileUpload();" + "\r\n" + +" exceldata.setFile_location(location);" + "\r\n" + +" " + "\r\n" + +" exceldata.setFile_name(file.getOriginalFilename());" + "\r\n" + +" exceldata.setFile_changed_name(str);" + "\r\n" + +" exceldata.setFile_type(file_type);" + "\r\n" + +" exceldata.setUser_id(user_id);" + "\r\n" + +" repo.save(exceldata);" + "\r\n" + +" " + "\r\n" + +" System.out.println(\"-----------------------saving data----------------\");" + "\r\n" + +" return location;" + "\r\n" + +" } catch (Exception e) {" + "\r\n" + +" e.printStackTrace();" + "\r\n" + +" throw new RuntimeException(\"Could not store file \" + file.getOriginalFilename()" + "\r\n" + +" + \". Please try again!\");" + "\r\n" + +" }" + "\r\n" + +" " + "\r\n" + +" }" + "\r\n" + +"}" \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_TemplateFileUpload.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_TemplateFileUpload.java new file mode 100644 index 0000000..fd00751 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_TemplateFileUpload.java @@ -0,0 +1,27 @@ +"package com.realnet.template.entity;" + "\r\n" + +"" + "\r\n" + +"import javax.persistence.Entity;" + "\r\n" + +"import javax.persistence.GeneratedValue;" + "\r\n" + +"import javax.persistence.GenerationType;" + "\r\n" + +"import javax.persistence.Id;" + "\r\n" + +"" + "\r\n" + +"import lombok.AllArgsConstructor;" + "\r\n" + +"import lombok.Data;" + "\r\n" + +"import lombok.NoArgsConstructor;" + "\r\n" + +"" + "\r\n" + +"@Data" + "\r\n" + +"@Entity" + "\r\n" + +"@AllArgsConstructor" + "\r\n" + +"@NoArgsConstructor" + "\r\n" + +"public class TemplateFileUpload {" + "\r\n" + +" @Id" + "\r\n" + +" @GeneratedValue(strategy = GenerationType.IDENTITY)" + "\r\n" + +" private Long id;" + "\r\n" + +" " + "\r\n" + +" private Long user_id;" + "\r\n" + +" private String file_name;" + "\r\n" + +" private String file_changed_name;" + "\r\n" + +" private String file_location;" + "\r\n" + +" private String file_type;" + "\r\n" + +" private Integer status;" + "\r\n" + +"}" \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_TemplatedataRepo.java b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_TemplatedataRepo.java new file mode 100644 index 0000000..48525fa --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_TemplatedataRepo.java @@ -0,0 +1,9 @@ +"package com.realnet.template.repository;" + "\r\n" + +"" + "\r\n" + +"import org.springframework.data.jpa.repository.JpaRepository;" + "\r\n" + +"" + "\r\n" + +"import com.realnet.template.entity.TemplateFileUpload;" + "\r\n" + +"" + "\r\n" + +"public interface TemplatedataRepo extends JpaRepository{" + "\r\n" + +"" + "\r\n" + +"}" \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/zip-uploads/Abc_1665647440047_back.zip b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/zip-uploads/Abc_1665647440047_back.zip new file mode 100644 index 0000000..e35579f Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/zip-uploads/Abc_1665647440047_back.zip differ diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/zip-uploads/bugTracker (2).zip b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/zip-uploads/bugTracker (2).zip new file mode 100644 index 0000000..af928fe Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/zip-uploads/bugTracker (2).zip differ diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/zip-uploads/entityevents.zip b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/zip-uploads/entityevents.zip new file mode 100644 index 0000000..c59e943 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/zip-uploads/entityevents.zip differ diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/zip-uploads/model.zip b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/zip-uploads/model.zip new file mode 100644 index 0000000..ee66204 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/zip-uploads/model.zip differ diff --git a/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/zip-uploads/template (1).zip b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/zip-uploads/template (1).zip new file mode 100644 index 0000000..36d50e7 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/cns-portal/code-extractor/zip-uploads/template (1).zip differ diff --git a/prod116rb-back-b/authsec_springboot/backend/dump.sql b/prod116rb-back-b/authsec_springboot/backend/dump.sql new file mode 100755 index 0000000..5f51259 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/dump.sql @@ -0,0 +1,508 @@ + +DROP TABLE IF EXISTS `accounts`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `accounts` ( + `id` bigint NOT NULL, + `companyname` varchar(255) DEFAULT NULL, + `email` varchar(255) DEFAULT NULL, + `managing_work` varchar(255) DEFAULT NULL, + `mobile` bigint DEFAULT NULL, + `name` varchar(255) DEFAULT NULL, + `pancard` varchar(255) DEFAULT NULL, + `password` varchar(255) DEFAULT NULL, + `working` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + + +/*!40000 ALTER TABLE `accounts` DISABLE KEYS */; +INSERT INTO `accounts` VALUES (1,'test','test@gmail.com','w',123456789,'kk','kk','test','w'); +/*!40000 ALTER TABLE `accounts` ENABLE KEYS */; + +DROP TABLE IF EXISTS `app_user_log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `app_user_log` ( + `log_id` bigint NOT NULL, + `created_on` datetime DEFAULT NULL, + `generate_log` varchar(255) DEFAULT NULL, + `log_file_name` varchar(255) DEFAULT NULL, + `log_level` varchar(255) DEFAULT NULL, + `user_name` varchar(255) DEFAULT NULL, + PRIMARY KEY (`log_id`), + UNIQUE KEY `UK_tl3or0c0pxxdvigxponlgee18` (`user_name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + + + +/*!40000 ALTER TABLE `app_user_log` DISABLE KEYS */; +INSERT INTO `app_user_log` VALUES (1,'2023-06-09 17:39:20','Y','sysadmin1686312560.log','info','sysadmin'); +/*!40000 ALTER TABLE `app_user_log` ENABLE KEYS */; + + +DROP TABLE IF EXISTS `app_user_log_sequence`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `app_user_log_sequence` ( + `next_val` bigint DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +/*!40000 ALTER TABLE `app_user_log_sequence` DISABLE KEYS */; +INSERT INTO `app_user_log_sequence` VALUES (2),(2),(2),(2),(2),(2),(2),(2),(2),(1); +/*!40000 ALTER TABLE `app_user_log_sequence` ENABLE KEYS */; + + + +DROP TABLE IF EXISTS `logs`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `logs` ( + `user_id` bigint NOT NULL, + `dated` varchar(255) DEFAULT NULL, + `lavel` varchar(255) DEFAULT NULL, + `logger` varchar(255) DEFAULT NULL, + `message` varchar(255) DEFAULT NULL, + PRIMARY KEY (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + + +/*!40000 ALTER TABLE `role` DISABLE KEYS */; +INSERT INTO `role` VALUES (1,'ADMIN','ROLE_ADMIN'),(2,'Developer','ROLE_Developer'),(3,'USER','ROLE_USER'),(5,'DEVEOPS','ROLE_DEVEOPS'); +/*!40000 ALTER TABLE `role` ENABLE KEYS */; + + + + +/*!40000 ALTER TABLE `sec_menu_det` DISABLE KEYS */; +INSERT INTO `sec_menu_det` VALUES (1116,'2023-01-25 10:25:50','2023-01-25 10:25:50',3000,'security','lock',0,'Security','sec3000','Enable'),(1117,'2023-01-25 10:42:02','2023-02-04 15:34:25',3010,'usermaintance',NULL,1116,'User Maintance','U1000','Enable'),(1118,'2023-01-25 11:12:27','2023-02-04 15:34:36',3020,'usergrpmaintance',NULL,1116,'User Group Maintance','U2000','Enable'),(1523,'2023-02-04 11:15:57','2023-02-04 15:34:45',3030,'menumaintance',NULL,1116,'Menu Maintance','M3000','Enable'),(1524,'2023-02-04 11:16:52','2023-02-04 15:34:54',3040,'menuaccess',NULL,1116,'Menu Access Control','MA4000','Enable'),(1525,'2023-02-04 11:17:31','2023-02-04 15:35:06',3050,'systemparameters',NULL,1116,'System Parameters','SP5000','Enable'),(1526,'2023-02-04 11:18:04','2023-02-04 15:35:14',3060,'accesstype',NULL,1116,'Access Type','A6000','Enable'),(1528,'2023-02-04 13:31:48','2023-02-04 15:33:02',1010,'incident-new',NULL,1527,'Incident','I1000','Enable'),(1529,'2023-02-04 13:33:03','2023-02-04 15:33:12',1020,'incident-overview',NULL,1527,'Overview','O2000','Enable'),(1530,'2023-02-04 13:34:42','2023-02-04 15:33:21',1030,'sureboard2',NULL,1527,'Issueboard','I3000','Enable'),(1531,'2023-02-04 13:35:27','2023-02-04 15:33:36',1040,'change-request',NULL,1527,'Change Request','C4000','Enable'),(1532,'2023-02-04 13:36:01','2023-02-10 02:25:13',1050,'problem-creation',NULL,1527,'Problem Request','P5000','Enable'),(1534,'2023-02-04 13:56:22','2023-02-04 15:34:07',2010,'Sr_priority2_t',NULL,1533,'Priority','P1000','Enable'),(1535,'2023-02-04 17:12:27','2023-02-04 17:12:27',2020,'Sr_urgency_t',NULL,1533,'Urgency','Su2000','Enable'),(1536,'2023-02-04 17:13:22','2023-02-04 17:13:22',2030,'Sr_impact2_t',NULL,1533,'Impact','Sm3000','Enable'),(1537,'2023-02-04 17:14:01','2023-02-04 17:14:01',2040,'Sr_category2_t',NULL,1533,'Category','Sc4000','Enable'),(1538,'2023-02-04 17:14:31','2023-02-04 17:14:31',2050,'Sr_State_t',NULL,1533,'State','S5000','Enable'),(1539,'2023-02-04 17:15:12','2023-02-09 13:25:27',2070,'Sr_customer_t',NULL,1533,'Customer','c7000','Enable'),(1540,'2023-02-04 17:16:23','2023-02-14 13:15:27',2060,'Sr_Contact_type_t',NULL,1533,'Contact','C6000','Enable'),(1541,'2023-02-04 17:17:22','2023-02-04 17:17:22',2080,'Sr_handler_t',NULL,1533,'Handler','H8000','Enable'),(1543,'2023-02-08 15:07:14','2023-03-01 05:51:41',4010,'sequence',NULL,1542,'Define Sequence','SE1000','Enable'),(1544,'2023-02-16 10:14:33','2023-02-16 10:14:33',4020,'bugtracker',NULL,1542,'Bug Tracker','B1000','Enable'),(1545,'2023-02-16 11:00:25','2023-02-16 11:00:25',4030,'datamanagemennt',NULL,1542,'Data Management','M3000','Enable'),(1550,'2023-03-01 06:10:35','2023-03-01 06:10:35',2090,'projects',NULL,1533,'Projects','P2000','Enable'),(1551,'2023-03-01 07:14:27','2023-03-01 07:14:27',4040,'applysequence',NULL,1542,'Apply Sequence','As3000','Enable'),(1552,'2023-06-05 14:14:21','2023-06-05 14:14:21',2000,'dash','dashboard',0,'dashboard','dashboard','Enable'),(1553,'2023-06-05 14:16:48','2023-06-17 03:53:20',1000,'DashboardTesting',NULL,1552,'dashboard1','dashboard','Enable'),(1554,'2023-06-11 10:55:12','2023-06-11 10:55:12',2000,'Dashtest',NULL,1552,'das2','2000','Enable'),(1555,'2023-10-10 12:50:55','2024-01-19 14:33:06',1000,'project','flag',0,'project','project','Enable'),(1556,'2023-10-11 11:03:39','2023-10-11 11:03:39',4000,'superadmin','King',0,'Super Admin','Super Admin','Enable'),(1557,'2023-10-11 11:04:17','2023-10-11 11:04:17',4100,'extension',NULL,1556,'Code Extension','CodeExtension','Enable'),(1558,'2023-10-25 16:31:26','2023-10-25 16:31:26',5000,'test','tools',0,'Vault','Vault','Enable'),(1559,'2023-10-25 16:32:18','2023-10-25 16:32:18',5001,'Access_Point',NULL,1558,'Access Point','Access Point','Enable'),(1560,'2023-10-25 17:34:39','2023-10-25 17:34:39',6000,'crm','employee-group',0,'CRM','crm','Enable'),(1561,'2023-10-25 17:35:21','2023-10-25 17:35:21',6001,'Calls',NULL,1560,'Calls','Calls','Enable'),(1562,'2023-10-25 17:35:43','2023-10-25 17:35:43',6002,'Campaign',NULL,1560,'Campaign','Campaign','Enable'),(1563,'2023-10-25 17:35:57','2023-10-25 17:35:57',6003,'Company',NULL,1560,'Company','Company','Enable'),(1564,'2023-10-25 17:36:16','2023-10-25 17:36:16',6004,'Contact',NULL,1560,'Contact','Contact','Enable'),(1565,'2023-10-25 17:36:32','2023-10-25 17:36:32',6005,'Dealer',NULL,1560,'Dealer','Dealer','Enable'),(1566,'2023-10-25 17:36:48','2023-10-25 17:36:48',6006,'Deals',NULL,1560,'Deals','Deals','Enable'),(1567,'2023-10-25 17:37:00','2023-10-25 17:37:00',6007,'Documents',NULL,1560,'Documents','Documents','Enable'),(1568,'2023-10-25 17:37:25','2023-10-25 17:37:25',6008,'Leads',NULL,1560,'Leads','Leads','Enable'),(1569,'2023-10-25 17:37:41','2023-10-25 17:37:41',6009,'Meetings',NULL,1560,'Meetings','Meetings','Enable'),(1570,'2023-10-25 17:39:36','2023-10-25 17:39:36',6010,'Product',NULL,1560,'Product','Product','Enable'),(1571,'2023-10-25 17:39:51','2023-10-25 17:39:51',6011,'Tasks',NULL,1560,'Tasks','Tasks','Enable'),(1572,'2023-11-01 18:43:22','2023-11-03 11:42:38',4000,'SequenceGenerator',NULL,1116,'Document Sequence','Document Sequrnce','Enable'),(1574,'2023-12-04 11:53:00','2023-12-04 18:49:58',1000,'Teacher_Registration',NULL,1573,'Teacher Registration','Teacher','Enable'),(1575,'2023-12-04 11:53:15','2023-12-04 18:50:25',1000,'Student_registration',NULL,1573,'Student Registration','Student','Enable'),(1576,'2023-12-04 18:50:53','2023-12-04 18:50:53',3000,'Courses_name',NULL,1573,'course','course','Enable'),(1577,'2024-01-27 15:39:15','2024-03-20 19:46:19',7000,'Transactions','King',0,'Transactions','Transactions','Enable'),(1579,'2024-02-01 16:26:28','2024-02-07 16:03:10',4300,'apiregistery',NULL,1556,'Api Registery','Api Registery','Enable'),(1580,'2024-02-02 10:05:03','2024-02-02 10:05:03',4200,'tokenregistery',NULL,1556,'Token Registery','Token Registery','Enable'),(1582,'2024-02-03 10:25:51','2024-02-03 10:25:51',8000,'test','test',0,'test','test','Enable'),(1588,'2024-02-07 16:03:53','2024-02-07 16:03:53',4400,'survey-form',NULL,1556,'Survey Form','SurveyForm','Enable'),(1593,'2024-02-24 15:02:22','2024-02-24 15:02:22',4500,'datamanage','data-cluster',0,'Data Management','DataManagement','Enable'),(1594,'2024-02-24 15:03:01','2024-02-24 15:03:01',4501,'datamanagement',NULL,1593,'Data Management','DataManagement','Enable'),(1595,'2024-02-24 15:03:34','2024-02-24 15:03:34',4502,'validationrule',NULL,1593,'Validaiton Rule','ValidaitonRule','Enable'),(1596,'2024-02-24 15:03:58','2024-02-24 15:03:58',4503,'mappingrule',NULL,1593,'Mapping Rule','MappingRule','Enable'),(1601,'2024-03-20 19:46:01','2024-03-20 19:46:37',9000,'Masters','data-cluster',0,'Masters','Masters','Enable'); +/*!40000 ALTER TABLE `sec_menu_det` ENABLE KEYS */; + + + +/*!40000 ALTER TABLE `sec_user_group` DISABLE KEYS */; +INSERT INTO `sec_user_group` VALUES (1,NULL,NULL,'add',30,'sysadmin','E',NULL,'2023-03-01 05:54:10'),(41,NULL,'2023-02-28 13:05:54','check',20,'users','Disable',NULL,'2023-02-28 13:30:14'); +/*!40000 ALTER TABLE `sec_user_group` ENABLE KEYS */; + + + +DROP TABLE IF EXISTS `sec_user_group_id`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `sec_user_group_id` ( + `next_val` bigint DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + + + +/*!40000 ALTER TABLE `sec_user_group_id` DISABLE KEYS */; +INSERT INTO `sec_user_group_id` VALUES (59),(59),(40),(40),(40),(40),(40),(40); +/*!40000 ALTER TABLE `sec_user_group_id` ENABLE KEYS */; + + + +/*!40000 ALTER TABLE `sys_accounts` DISABLE KEYS */; +INSERT INTO `sys_accounts` VALUES (1,NULL,NULL,NULL,NULL,NULL,NULL,NULL); +/*!40000 ALTER TABLE `sys_accounts` ENABLE KEYS */; + + +/*!40000 ALTER TABLE `sec_users` DISABLE KEYS */; +INSERT INTO `sec_users` (`user_id`, `is_complete`, `about`, `accesstype`, `active`, `change_passw`, `checknumber`, `country`, `createby`, `createdate`, `customer_id`, `days_mth`, `dep_string`, `email`, `expiry_date`, `first_login`, `full_name`, `is_blocked`, `lang_code`, `last_pwd_changed_date`, `mob_no`, `no_days_mth`, `notification`, `password1`, `password2`, `password3`, `password4`, `photo`, `photo_name`, `provider`, `pwd_changed_cnt`, `random_no`, `short_name`, `status`, `title`, `updateby`, `updatedate`, `user_passw`, `user_name`, `usr_grp_id`, `working`, `account_id`, `department_code`, `position_code`, `usr_grp`) VALUES (10007307, true, NULL, NULL, true, 'test3', NULL, NULL, NULL, '2024-09-03 19:32:38', NULL, NULL, NULL, 'sysadmin', NULL, NULL, 'sysadmin', false, NULL, '2024-09-03 19:32:38', '1234567890', NULL, NULL, 'admin123', NULL, NULL, NULL, NULL, NULL, NULL, 7, NULL, NULL, NULL, NULL, NULL, NULL, '$2b$10$8iFnL/cKTTmclSD1BZh8UeP0ZKKEzZ2hbTsrRcgy3kMinDRdxN7xe', 'sysadmin', NULL, NULL, 1, NULL, NULL, 1); +/*!40000 ALTER TABLE `sec_users` ENABLE KEYS */; + + + +DROP TABLE IF EXISTS `sec_user_sessions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `sec_user_sessions` ( + `client_ip` varchar(255) NOT NULL, + `session_id` varchar(255) NOT NULL, + `user_id` bigint NOT NULL, + `last_access_date` datetime DEFAULT NULL, + `logintime` datetime DEFAULT NULL, + `logouttime` datetime DEFAULT NULL, + `macid` varchar(255) DEFAULT NULL, + PRIMARY KEY (`client_ip`,`session_id`,`user_id`), + KEY `FKp9jm02b501ugvjvfhas5sskfq` (`user_id`), + CONSTRAINT `FKp9jm02b501ugvjvfhas5sskfq` FOREIGN KEY (`user_id`) REFERENCES `sec_users` (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + + + +/*!40000 ALTER TABLE `sec_user_sessions` DISABLE KEYS */; +/*!40000 ALTER TABLE `sec_user_sessions` ENABLE KEYS */; + + + + +DROP TABLE IF EXISTS `sec_grp_menu_access`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `sec_grp_menu_access` ( + `menu_item_id` bigint NOT NULL, + `usr_grp` bigint NOT NULL, + `createby` varchar(255) DEFAULT NULL, + `created_at` datetime DEFAULT NULL, + `isdisable` varchar(255) DEFAULT NULL, + `item_seq` bigint DEFAULT NULL, + `m_create` varchar(255) DEFAULT NULL, + `m_delete` varchar(255) DEFAULT NULL, + `m_edit` varchar(255) DEFAULT NULL, + `m_query` varchar(255) DEFAULT NULL, + `m_visible` varchar(255) DEFAULT NULL, + `main_menu_action_name` varchar(255) DEFAULT NULL, + `main_menu_icon_name` varchar(255) DEFAULT NULL, + `menu_id` bigint DEFAULT NULL, + `menu_item_desc` varchar(255) DEFAULT NULL, + `mexport` varchar(255) DEFAULT NULL, + `module_name` varchar(255) DEFAULT NULL, + `status` varchar(255) DEFAULT NULL, + `updateby` varchar(255) DEFAULT NULL, + `updated_at` datetime DEFAULT NULL, + PRIMARY KEY (`menu_item_id`,`usr_grp`), + KEY `FKtj8mtsrhc4m4acbrvjnnyvglm` (`usr_grp`), + CONSTRAINT `FKmkev6w9umgp6fg2afatibhq1x` FOREIGN KEY (`menu_item_id`) REFERENCES `sec_menu_det` (`menu_item_id`), + CONSTRAINT `FKtj8mtsrhc4m4acbrvjnnyvglm` FOREIGN KEY (`usr_grp`) REFERENCES `sec_user_group` (`usr_grp`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + + +/*!40000 ALTER TABLE `sec_grp_menu_access` DISABLE KEYS */; +INSERT INTO `sec_grp_menu_access` VALUES (1116,41,NULL,'2024-01-17 18:56:05','true',3000,'true','true','true','true','true','security','lock',0,'Security','true','sec3000','Enable',NULL,'2024-01-17 18:56:05'),(1117,41,NULL,'2024-01-17 18:56:07','true',3010,'true','true','true','true','true','usermaintance',NULL,1116,'User Maintance','true','U1000','Enable',NULL,'2024-01-17 18:56:07'),(1118,41,NULL,'2024-01-17 18:56:11','true',3020,'true','true','true','true','true','usergrpmaintance',NULL,1116,'User Group Maintance','true','U2000','Enable',NULL,'2024-01-17 18:56:11'),(1523,41,NULL,'2024-01-17 18:56:14','true',3030,'true','true','true','true','true','menumaintance',NULL,1116,'Menu Maintance','true','M3000','Enable',NULL,'2024-01-17 18:56:14'),(1524,41,NULL,'2024-01-17 18:56:16','true',3040,'true','true','true','true','true','menuaccess',NULL,1116,'Menu Access Control','true','MA4000','Enable',NULL,'2024-01-17 18:56:16'),(1525,41,NULL,'2024-01-17 18:56:18','true',3050,'true','true','true','true','true','systemparameters',NULL,1116,'System Parameters','true','SP5000','Enable',NULL,'2024-01-17 18:56:18'),(1526,41,NULL,'2024-01-17 18:56:19','true',3060,'true','true','true','true','true','accesstype',NULL,1116,'Access Type','true','A6000','Enable',NULL,'2024-01-17 18:56:19'),(1572,41,NULL,'2024-01-17 18:56:21','true',4000,'true','true','true','true','true','SequenceGenerator',NULL,1116,'Document Sequence','true','Document Sequrnce','Enable',NULL,'2024-01-17 18:56:21'),(1577,1,NULL,'2024-01-27 15:40:46','true',7000,'true','true','true','true','true','Transactions','King',0,'Transactions','true','Transactions','Enable',NULL,'2024-01-27 15:40:46'),(1601,1,NULL,'2024-03-20 20:06:50','true',9000,'true','true','true','true','true','Masters','data-cluster',0,'Masters','true','Masters','Enable',NULL,'2024-03-20 20:06:50'); +/*!40000 ALTER TABLE `sec_grp_menu_access` ENABLE KEYS */; + + + + +DROP TABLE IF EXISTS `sec_users_sequencs`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `sec_users_sequencs` ( + `next_val` bigint DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + + + +/*!40000 ALTER TABLE `sec_users_sequencs` DISABLE KEYS */; +INSERT INTO `sec_users_sequencs` VALUES (10007321),(10007300),(10007300),(10007300),(10007300),(10007300),(10007300),(10007300); +/*!40000 ALTER TABLE `sec_users_sequencs` ENABLE KEYS */; + + + + +DROP TABLE IF EXISTS `sec_workspace`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `sec_workspace` ( + `id` int NOT NULL AUTO_INCREMENT, + `account_id` bigint DEFAULT NULL, + `created_at` datetime NOT NULL, + `created_by` bigint DEFAULT NULL, + `updated_at` datetime NOT NULL, + `updated_by` bigint DEFAULT NULL, + `is_active` varchar(255) DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, + `is_default` varchar(255) DEFAULT NULL, + `name` varchar(255) DEFAULT NULL, + `owner_id` varchar(255) DEFAULT NULL, + `project_id` int DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + + + +DROP TABLE IF EXISTS `sec_workspace_users`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `sec_workspace_users` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `account_id` bigint DEFAULT NULL, + `created_at` datetime NOT NULL, + `created_by` bigint DEFAULT NULL, + `updated_at` datetime NOT NULL, + `updated_by` bigint DEFAULT NULL, + `project_id` int DEFAULT NULL, + `user_id` bigint DEFAULT NULL, + `user_name` varchar(255) DEFAULT NULL, + `user_role` varchar(255) DEFAULT NULL, + `worksapce_id` int NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + + + +/*!40000 ALTER TABLE `secuser_roles` DISABLE KEYS */; +INSERT INTO `secuser_roles` VALUES (10007307,1); +/*!40000 ALTER TABLE `secuser_roles` ENABLE KEYS */; + + + +DROP TABLE IF EXISTS `sys_accounts_users`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `sys_accounts_users` ( + `sys_accounts_id` bigint NOT NULL, + `users_user_id` bigint NOT NULL, + UNIQUE KEY `UK_8dxppqkque5ehofdy83bntgks` (`users_user_id`), + KEY `FKs9o1t4hyiyq2y330p0d2evf2a` (`sys_accounts_id`), + CONSTRAINT `FKdkc60wy8v55ylspegueinngjx` FOREIGN KEY (`users_user_id`) REFERENCES `sec_users` (`user_id`), + CONSTRAINT `FKs9o1t4hyiyq2y330p0d2evf2a` FOREIGN KEY (`sys_accounts_id`) REFERENCES `sys_accounts` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + + + +/*!40000 ALTER TABLE `sys_accounts_users` DISABLE KEYS */; +/*!40000 ALTER TABLE `sys_accounts_users` ENABLE KEYS */; + + + +DROP TABLE IF EXISTS `user_list`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `user_list` ( + `id` bigint NOT NULL, + `about` varchar(255) DEFAULT NULL, + `account_id` varchar(255) DEFAULT NULL, + `address1` varchar(255) DEFAULT NULL, + `address2` varchar(255) DEFAULT NULL, + `checknumber` varchar(255) DEFAULT NULL, + `company` varchar(255) DEFAULT NULL, + `country` varchar(255) DEFAULT NULL, + `created_at` varchar(255) DEFAULT NULL, + `created_by` varchar(255) DEFAULT NULL, + `default_customer_id` varchar(255) DEFAULT NULL, + `department` varchar(255) DEFAULT NULL, + `dob` varchar(255) DEFAULT NULL, + `email` varchar(255) DEFAULT NULL, + `enable_beta_testing` bit(1) NOT NULL, + `enable_renewal` bit(1) NOT NULL, + `firstname` varchar(255) DEFAULT NULL, + `fullname` varchar(255) DEFAULT NULL, + `gender` varchar(255) DEFAULT NULL, + `is_active` bit(1) NOT NULL, + `is_blocked` bit(1) NOT NULL, + `lastname` varchar(255) DEFAULT NULL, + `managing_work` varchar(255) DEFAULT NULL, + `menu_group` int NOT NULL, + `name` varchar(255) DEFAULT NULL, + `other_roles` varchar(255) DEFAULT NULL, + `pancard` varchar(255) DEFAULT NULL, + `password` varchar(255) DEFAULT NULL, + `phone` varchar(255) DEFAULT NULL, + `photos` varchar(255) DEFAULT NULL, + `postal` varchar(255) DEFAULT NULL, + `role` varchar(255) DEFAULT NULL, + `secret_answer` varchar(255) DEFAULT NULL, + `secret_question` varchar(255) DEFAULT NULL, + `security_provider_id` varchar(255) DEFAULT NULL, + `status` varchar(255) DEFAULT NULL, + `updated_at` varchar(255) DEFAULT NULL, + `updated_by` varchar(255) DEFAULT NULL, + `user_id` varchar(255) DEFAULT NULL, + `username` varchar(255) DEFAULT NULL, + `working` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + + + +/*!40000 ALTER TABLE `user_list` DISABLE KEYS */; +/*!40000 ALTER TABLE `user_list` ENABLE KEYS */; + + + + +DROP TABLE IF EXISTS `userloginhist`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `userloginhist` ( + `create_by` varchar(255) DEFAULT NULL, + `create_date` datetime DEFAULT NULL, + `expiry_reminder` bigint DEFAULT NULL, + `last_login_date` datetime DEFAULT NULL, + `last_password_chg_date` datetime DEFAULT NULL, + `last_password_fail_no` bigint DEFAULT NULL, + `update_by` varchar(255) DEFAULT NULL, + `update_date` datetime DEFAULT NULL, + `user_id` bigint NOT NULL, + PRIMARY KEY (`user_id`), + CONSTRAINT `FK2a2xifc15js82mjl20honhdfr` FOREIGN KEY (`user_id`) REFERENCES `sec_users` (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + + + +DROP TABLE IF EXISTS `userpasswlog`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `userpasswlog` ( + `create_date` datetime NOT NULL, + `user_id` bigint NOT NULL, + `user_passw` varchar(255) NOT NULL, + `create_by` varchar(255) DEFAULT NULL, + `update_by` varchar(255) DEFAULT NULL, + `update_date` datetime DEFAULT NULL, + PRIMARY KEY (`create_date`,`user_id`,`user_passw`), + KEY `FKpd759n25auh4bw5ri0xikikia` (`user_id`), + CONSTRAINT `FKpd759n25auh4bw5ri0xikikia` FOREIGN KEY (`user_id`) REFERENCES `sec_users` (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + + + +/*!40000 ALTER TABLE `userpasswlog` DISABLE KEYS */; +/*!40000 ALTER TABLE `userpasswlog` ENABLE KEYS */; + + + + + +DROP TABLE IF EXISTS `dashboard`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `dashboard` ( + `id` int NOT NULL AUTO_INCREMENT, + `account_id` bigint DEFAULT NULL, + `created_at` datetime NOT NULL, + `created_by` bigint DEFAULT NULL, + `updated_at` datetime NOT NULL, + `updated_by` bigint DEFAULT NULL, + `extn1` varchar(255) DEFAULT NULL, + `extn10` varchar(255) DEFAULT NULL, + `extn11` varchar(255) DEFAULT NULL, + `extn12` varchar(255) DEFAULT NULL, + `extn13` varchar(255) DEFAULT NULL, + `extn14` varchar(255) DEFAULT NULL, + `extn15` varchar(255) DEFAULT NULL, + `extn2` varchar(255) DEFAULT NULL, + `extn3` varchar(255) DEFAULT NULL, + `extn4` varchar(255) DEFAULT NULL, + `extn5` varchar(255) DEFAULT NULL, + `extn6` varchar(255) DEFAULT NULL, + `extn7` varchar(255) DEFAULT NULL, + `extn8` varchar(255) DEFAULT NULL, + `extn9` varchar(255) DEFAULT NULL, + `isdashboard` bit(1) NOT NULL, + `model` varchar(5000) DEFAULT NULL, + `name` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + + + +/*!40000 ALTER TABLE `dashboard` DISABLE KEYS */; +INSERT INTO `dashboard` VALUES (1,NULL,'2023-12-04 12:11:04',NULL,'2023-12-04 13:05:56',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,_binary '','[{\"charttitle\":\"index1\",\"type\":\"Index\",\"cols\":5,\"rows\":5,\"x\":0,\"y\":0,\"chartid\":3,\"component\":\"Index\",\"name\":\"Index\",\"slices\":false,\"donut\":false,\"chartcolor\":false,\"chartlegend\":false,\"showlabel\":false,\"Read Only\":false,\"selectedIcon\":\"IconData(U+0EE2A)\",\"charturl\":\"\",\"chartparameter\":\"\",\"datasource\":\"Default\"},{\"charttitle\":\"Index2\",\"type\":\"Index\",\"cols\":5,\"rows\":5,\"x\":0,\"y\":0,\"chartid\":4,\"component\":\"Index\",\"name\":\"Index\"},{\"charttitle\":\"Index3\",\"type\":\"Index\",\"cols\":5,\"rows\":5,\"x\":0,\"y\":0,\"chartid\":5,\"component\":\"Index\",\"name\":\"Index\"},{\"charttitle\":\"Doughnut Chart\",\"type\":\"Doughnut Chart\",\"cols\":5,\"rows\":5,\"x\":0,\"y\":0,\"chartid\":6,\"component\":\"Doughnut Chart\",\"name\":\"Doughnut Chart\",\"slices\":false,\"donut\":false,\"chartcolor\":false,\"chartlegend\":false,\"showlabel\":false,\"Read Only\":false,\"charturl\":\"http://43.205.154.152:30179/entityBuilder/Gaurav_testing/3\",\"chartparameter\":\"\",\"datasource\":\"Default\",\"selectedIcon\":\"IconData(U+0EE29)\"},{\"cols\": 4, \"rows\": 5, \"x\": 0, \"y\": 0, \"chartid\": 1, \"name\": \"Line Chart\", \"fieldName\": null, \"showlabel\": true, \"chartcolor\": null, \"chartlegend\": true, \"charturl\": \"http://43.205.154.152:30179/entityBuilder/Gaurav_testing\",\"xAxis\": \"name\",\"donut\": null, \"chartparameter\": null, \"datastore\": null,\"datasource\": null,\"id\": null,\"slices\": null,\"yAxis\": [\"pincode\"],\"charttitle\": \"Live Details\"}]','myfirstdashboard'); +/*!40000 ALTER TABLE `dashboard` ENABLE KEYS */; + + + +DROP TABLE IF EXISTS `dashboard_builder_t`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `dashboard_builder_t` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `dashboardname` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + + + +/*!40000 ALTER TABLE `dashboard_builder_t` DISABLE KEYS */; +/*!40000 ALTER TABLE `dashboard_builder_t` ENABLE KEYS */; + + + +DROP TABLE IF EXISTS `dashboard_schedule_t`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `dashboard_schedule_t` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `attachment` varchar(255) DEFAULT NULL, + `cc` varchar(255) DEFAULT NULL, + `cron` varchar(255) DEFAULT NULL, + `end_time` datetime DEFAULT NULL, + `every` varchar(255) DEFAULT NULL, + `gateway` varchar(255) DEFAULT NULL, + `gatewaydone` varchar(255) DEFAULT NULL, + `replacement_string` varchar(255) DEFAULT NULL, + `send_to` varchar(255) DEFAULT NULL, + `start_time` datetime DEFAULT NULL, + `template` varchar(255) DEFAULT NULL, + `type` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + + + +/*!40000 ALTER TABLE `dashboard_schedule_t` DISABLE KEYS */; +/*!40000 ALTER TABLE `dashboard_schedule_t` ENABLE KEYS */; + + + +DROP TABLE IF EXISTS `dashboardaxis`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `dashboardaxis` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `april` varchar(255) DEFAULT NULL, + `feb` varchar(255) DEFAULT NULL, + `jan` varchar(255) DEFAULT NULL, + `march` varchar(255) DEFAULT NULL, + `may` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + + + +/*!40000 ALTER TABLE `dashboardaxis` DISABLE KEYS */; +INSERT INTO `dashboardaxis` VALUES (1,'5','10','25','3',NULL),(3,'5000','15000','10000','30000',NULL),(4,'5000','15000','10000','30000',NULL),(5,'5000','15000','5','30000',NULL),(6,'5000','15000','10000','30000','2000'),(7,'23','20','25','30','20'),(8,'23','20','25','30','99'),(9,'23','20','25','30','20'); +/*!40000 ALTER TABLE `dashboardaxis` ENABLE KEYS */; + + + +/*!40000 ALTER TABLE `system_paramaters` DISABLE KEYS */; +INSERT INTO `system_paramaters` VALUES (1,'test1',0,NULL,NULL,NULL,0,NULL,NULL,NULL,0,_binary '',NULL,0,0,0,NULL,NULL,NULL,0,NULL,0,0,0,NULL,NULL,NULL,NULL,0,0); +/*!40000 ALTER TABLE `system_paramaters` ENABLE KEYS */; + + +DROP TABLE IF EXISTS `sys_param_upload`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `sys_param_upload` ( + `attachment_id` int NOT NULL, + `attachment` longblob, + `attachment_filename` varchar(255) DEFAULT NULL, + `attachment_type` varchar(255) DEFAULT NULL, + `cancel_status` varchar(255) NOT NULL, + `external_flag` varchar(255) DEFAULT NULL, + `updated_by` varchar(255) DEFAULT NULL, + `sys_param_entity_id` int DEFAULT NULL, + PRIMARY KEY (`attachment_id`), + KEY `FKl1h7bcgpr1y10ydiqw849vq99` (`sys_param_entity_id`), + CONSTRAINT `FKl1h7bcgpr1y10ydiqw849vq99` FOREIGN KEY (`sys_param_entity_id`) REFERENCES `system_paramaters` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + + + +/*!40000 ALTER TABLE `sys_param_upload` DISABLE KEYS */; +/*!40000 ALTER TABLE `sys_param_upload` ENABLE KEYS */; + + +-- Dump completed on 2024-01-27 15:45:01 \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/hs_err_pid6816.log b/prod116rb-back-b/authsec_springboot/backend/hs_err_pid6816.log new file mode 100644 index 0000000..4aa7edd --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/hs_err_pid6816.log @@ -0,0 +1,857 @@ +# +# There is insufficient memory for the Java Runtime Environment to continue. +# Native memory allocation (mmap) failed to map 258998272 bytes for G1 virtual space +# Possible reasons: +# The system is out of physical RAM or swap space +# The process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native heap +# Possible solutions: +# Reduce memory load on the system +# Increase physical memory or swap space +# Check if swap backing store is full +# Decrease Java heap size (-Xmx/-Xms) +# Decrease number of Java threads +# Decrease Java thread stack sizes (-Xss) +# Set larger code cache with -XX:ReservedCodeCacheSize= +# JVM is running with Unscaled Compressed Oops mode in which the Java heap is +# placed in the first 4GB address space. The Java Heap base address is the +# maximum limit for the native heap growth. Please use -XX:HeapBaseMinAddress +# to set the Java Heap base and to place the Java Heap above 4GB virtual address. +# This output file may be truncated or incomplete. +# +# Out of Memory Error (./open/src/hotspot/os/windows/os_windows.cpp:3321), pid=6816, tid=7380 +# +# JRE version: OpenJDK Runtime Environment (15.0.2+7) (build 15.0.2+7-27) +# Java VM: OpenJDK 64-Bit Server VM (15.0.2+7-27, mixed mode, tiered, compressed oops, g1 gc, windows-amd64) +# No core dump will be written. Minidumps are not enabled by default on client versions of Windows +# + +--------------- S U M M A R Y ------------ + +Command Line: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=52447 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost -Dspring.jmx.enabled=true -Dspring.application.admin.enabled=true -XX:TieredStopAtLevel=1 -Dspring.boot.project.name=backend -Dfile.encoding=UTF-8 -XX:+ShowCodeDetailsInExceptionMessages com.realnet.RealNetApp --spring.output.ansi.enabled=always + +Host: Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz, 8 cores, 7G, Windows 10 , 64 bit Build 19041 (10.0.19041.1889) +Time: Sat Oct 1 12:47:37 2022 India Standard Time elapsed time: 7190.426722 seconds (0d 1h 59m 50s) + +--------------- T H R E A D --------------- + +Current thread (0x0000022579a517b0): VMThread "VM Thread" [stack: 0x0000005178000000,0x0000005178100000] [id=7380] + +Stack: [0x0000005178000000,0x0000005178100000] +[error occurred during error reporting (printing stack bounds), id 0xc0000005, EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00000225000010ad] + +Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) +V [jvm.dll+0x62ae9a] +V [jvm.dll+0x7817a9] +V [jvm.dll+0x782f03] +V [jvm.dll+0x7834c5] +V [jvm.dll+0x78347b] +V [jvm.dll+0x62a2b9] +V [jvm.dll+0x62aa88] +C [ntdll.dll+0xa235f] +C [ntdll.dll+0x514a4] +C [ntdll.dll+0xa0e8e] +C 0x00000225000010ad + +VM_Operation (0x000000517a7fe270): G1CollectForAllocation, mode: safepoint, requested by thread 0x000002250f7af090 + + +--------------- P R O C E S S --------------- + +Threads class SMR info: +_java_thread_list=0x0000022511157d10, length=35, elements={ +0x0000022579a59180, 0x000002257a295010, 0x000002257a282db0, 0x000002257a283770, +0x000002257a2c27b0, 0x000002257a2c59e0, 0x000002257a2b1240, 0x00000225799ec0f0, +0x000002257a525cf0, 0x000002257ae597c0, 0x000002257ae64180, 0x000002257ae61b20, +0x000002257aed5cb0, 0x000002257d9eeff0, 0x000002257d9efe60, 0x000002257d9ece40, +0x000002257d9ed310, 0x000002257d9ee180, 0x000002257d9ed7e0, 0x000002250f7af090, +0x000002250f7b1710, 0x000002250f7afa30, 0x000002250f7b0d70, 0x000002250f7aff00, +0x000002250f7b1be0, 0x000002250f7b03d0, 0x000002250f7ad3b0, 0x000002250f7ac070, +0x000002250f7b20b0, 0x000002250f7b2580, 0x000002250f7ac540, 0x000002250f7b1240, +0x000002250f7b2f20, 0x000002250f7b08a0, 0x00000225798d3150 +} + +Java Threads: ( => current thread ) + 0x0000022579a59180 JavaThread "Reference Handler" daemon [_thread_blocked, id=13212, stack(0x0000005178100000,0x0000005178200000)] + 0x000002257a295010 JavaThread "Finalizer" daemon [_thread_blocked, id=2780, stack(0x0000005178200000,0x0000005178300000)] + 0x000002257a282db0 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=2844, stack(0x0000005178300000,0x0000005178400000)] + 0x000002257a283770 JavaThread "Attach Listener" daemon [_thread_blocked, id=5488, stack(0x0000005178400000,0x0000005178500000)] + 0x000002257a2c27b0 JavaThread "Service Thread" daemon [_thread_blocked, id=4264, stack(0x0000005178500000,0x0000005178600000)] + 0x000002257a2c59e0 JavaThread "C1 CompilerThread0" daemon [_thread_blocked, id=15236, stack(0x0000005178600000,0x0000005178700000)] + 0x000002257a2b1240 JavaThread "Sweeper thread" daemon [_thread_blocked, id=17268, stack(0x0000005178700000,0x0000005178800000)] + 0x00000225799ec0f0 JavaThread "Common-Cleaner" daemon [_thread_blocked, id=4196, stack(0x0000005178800000,0x0000005178900000)] + 0x000002257a525cf0 JavaThread "Notification Thread" daemon [_thread_blocked, id=12716, stack(0x0000005178900000,0x0000005178a00000)] + 0x000002257ae597c0 JavaThread "RMI TCP Accept-0" daemon [_thread_in_native, id=5236, stack(0x0000005178a00000,0x0000005178b00000)] + 0x000002257ae64180 JavaThread "RMI TCP Accept-52447" daemon [_thread_in_native, id=14720, stack(0x0000005178b00000,0x0000005178c00000)] + 0x000002257ae61b20 JavaThread "RMI TCP Accept-0" daemon [_thread_in_native, id=9868, stack(0x0000005178c00000,0x0000005178d00000)] + 0x000002257aed5cb0 JavaThread "RMI Scheduler(0)" daemon [_thread_blocked, id=10268, stack(0x0000005178f00000,0x0000005179000000)] + 0x000002257d9eeff0 JavaThread "mysql-cj-abandoned-connection-cleanup" daemon [_thread_blocked, id=4324, stack(0x0000005179900000,0x0000005179a00000)] + 0x000002257d9efe60 JavaThread "HikariPool-1 housekeeper" daemon [_thread_blocked, id=14616, stack(0x000000517a300000,0x000000517a400000)] + 0x000002257d9ece40 JavaThread "Catalina-utility-1" [_thread_blocked, id=16064, stack(0x000000517a400000,0x000000517a500000)] + 0x000002257d9ed310 JavaThread "Catalina-utility-2" [_thread_blocked, id=5460, stack(0x000000517a500000,0x000000517a600000)] + 0x000002257d9ee180 JavaThread "container-0" [_thread_blocked, id=9248, stack(0x000000517a600000,0x000000517a700000)] + 0x000002257d9ed7e0 JavaThread "Live Reload Server" daemon [_thread_in_native, id=1116, stack(0x000000517a800000,0x000000517a900000)] + 0x000002250f7af090 JavaThread "File Watcher" daemon [_thread_blocked, id=16340, stack(0x000000517a700000,0x000000517a800000)] + 0x000002250f7b1710 JavaThread "http-nio-9191-BlockPoller" daemon [_thread_blocked, id=16692, stack(0x000000517a900000,0x000000517aa00000)] + 0x000002250f7afa30 JavaThread "http-nio-9191-exec-1" daemon [_thread_blocked, id=5556, stack(0x000000517aa00000,0x000000517ab00000)] + 0x000002250f7b0d70 JavaThread "http-nio-9191-exec-2" daemon [_thread_blocked, id=14708, stack(0x000000517ab00000,0x000000517ac00000)] + 0x000002250f7aff00 JavaThread "http-nio-9191-exec-3" daemon [_thread_blocked, id=13008, stack(0x000000517ac00000,0x000000517ad00000)] + 0x000002250f7b1be0 JavaThread "http-nio-9191-exec-4" daemon [_thread_blocked, id=13096, stack(0x000000517ad00000,0x000000517ae00000)] + 0x000002250f7b03d0 JavaThread "http-nio-9191-exec-5" daemon [_thread_blocked, id=14108, stack(0x000000517ae00000,0x000000517af00000)] + 0x000002250f7ad3b0 JavaThread "http-nio-9191-exec-6" daemon [_thread_blocked, id=8704, stack(0x000000517af00000,0x000000517b000000)] + 0x000002250f7ac070 JavaThread "http-nio-9191-exec-7" daemon [_thread_blocked, id=4628, stack(0x000000517b000000,0x000000517b100000)] + 0x000002250f7b20b0 JavaThread "http-nio-9191-exec-8" daemon [_thread_blocked, id=5404, stack(0x000000517b100000,0x000000517b200000)] + 0x000002250f7b2580 JavaThread "http-nio-9191-exec-9" daemon [_thread_blocked, id=10000, stack(0x000000517b200000,0x000000517b300000)] + 0x000002250f7ac540 JavaThread "http-nio-9191-exec-10" daemon [_thread_blocked, id=4308, stack(0x000000517b300000,0x000000517b400000)] + 0x000002250f7b1240 JavaThread "http-nio-9191-ClientPoller" daemon [_thread_blocked, id=13388, stack(0x000000517b400000,0x000000517b500000)] + 0x000002250f7b2f20 JavaThread "http-nio-9191-Acceptor" daemon [_thread_in_native, id=13888, stack(0x000000517b500000,0x000000517b600000)] + 0x000002250f7b08a0 JavaThread "DestroyJavaVM" [_thread_blocked, id=6624, stack(0x0000005177a00000,0x0000005177b00000)] + 0x00000225798d3150 JavaThread "HikariPool-1 connection closer" daemon [_thread_blocked, id=4052, stack(0x0000005178e00000,0x0000005178f00000)] + +Other Threads: +=>0x0000022579a517b0 VMThread "VM Thread" [stack: 0x0000005178000000,0x0000005178100000] [id=7380] + 0x000002256e840090 WatcherThread [stack: 0x0000005178d00000,0x0000005178e00000] [id=3596] + 0x000002256e87e610 GCTaskThread "GC Thread#0" [stack: 0x0000005177b00000,0x0000005177c00000] [id=14008] + 0x000002257af52e90 GCTaskThread "GC Thread#1" [stack: 0x0000005179200000,0x0000005179300000] [id=9240] + 0x000002257af554d0 GCTaskThread "GC Thread#2" [stack: 0x0000005179300000,0x0000005179400000] [id=5240] + 0x000002257af51b70 GCTaskThread "GC Thread#3" [stack: 0x0000005179a00000,0x0000005179b00000] [id=1644] + 0x000002257af531c0 GCTaskThread "GC Thread#4" [stack: 0x0000005179b00000,0x0000005179c00000] [id=16524] + 0x000002257af551a0 GCTaskThread "GC Thread#5" [stack: 0x0000005179c00000,0x0000005179d00000] [id=3664] + 0x000002257af51ea0 GCTaskThread "GC Thread#6" [stack: 0x0000005179d00000,0x0000005179e00000] [id=16160] + 0x000002257af534f0 GCTaskThread "GC Thread#7" [stack: 0x0000005179e00000,0x0000005179f00000] [id=14136] + 0x000002256e88fa80 ConcurrentGCThread "G1 Main Marker" [stack: 0x0000005177c00000,0x0000005177d00000] [id=2952] + 0x000002256e8906f0 ConcurrentGCThread "G1 Conc#0" [stack: 0x0000005177d00000,0x0000005177e00000] [id=6148] + 0x000002257af54b40 ConcurrentGCThread "G1 Conc#1" [stack: 0x0000005179f00000,0x000000517a000000] [id=8824] + 0x000002256e8f8c60 ConcurrentGCThread "G1 Refine#0" [stack: 0x0000005177e00000,0x0000005177f00000] [id=2460] + 0x000002257b6ef9f0 ConcurrentGCThread "G1 Refine#1" [stack: 0x0000005179400000,0x0000005179500000] [id=2916] + 0x000002257b6efd50 ConcurrentGCThread "G1 Refine#2" [stack: 0x0000005179500000,0x0000005179600000] [id=15184] + 0x000002257b6f00b0 ConcurrentGCThread "G1 Refine#3" [stack: 0x0000005179600000,0x0000005179700000] [id=10480] + 0x000002250f535480 ConcurrentGCThread "G1 Refine#4" [stack: 0x0000005177700000,0x0000005177800000] [id=8708] + 0x000002250f536200 ConcurrentGCThread "G1 Refine#5" [stack: 0x0000005177800000,0x0000005177900000] [id=2300] + 0x000002250f534dc0 ConcurrentGCThread "G1 Refine#6" [stack: 0x0000005177900000,0x0000005177a00000] [id=7800] + 0x000002256e8f98e0 ConcurrentGCThread "G1 Young RemSet Sampling" [stack: 0x0000005177f00000,0x0000005178000000] [id=6548] + +Threads with active compile tasks: + +VM state: at safepoint (normal execution) + +VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event]) +[0x000002256e83a3b0] Threads_lock - owner thread: 0x0000022579a517b0 +[0x000002256e839ab0] Heap_lock - owner thread: 0x000002250f7af090 + +Heap address: 0x0000000083000000, size: 2000 MB, Compressed Oops mode: 32-bit +CDS disabled. +Compressed class space mapped at: 0x0000000100000000-0x0000000140000000, size: 1073741824 +Narrow klass base: 0x0000000000000000, Narrow klass shift: 3, Narrow klass range: 0x140000000 + +GC Precious Log: + CPUs: 8 total, 8 available + Memory: 7995M + Large Page Support: Disabled + NUMA Support: Disabled + Compressed Oops: Enabled (32-bit) + Heap Region Size: 1M + Heap Min Capacity: 8M + Heap Initial Capacity: 126M + Heap Max Capacity: 2000M + Pre-touch: Disabled + Parallel Workers: 8 + Concurrent Workers: 2 + Concurrent Refinement Workers: 8 + Periodic GC: Disabled + +Heap: + garbage-first heap total 505856K, used 109623K [0x0000000083000000, 0x0000000100000000) + region size 1024K, 1 young (1024K), 1 survivors (1024K) + Metaspace used 104640K, capacity 106186K, committed 106416K, reserved 1142784K + class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K + +Heap Regions: E=young(eden), S=young(survivor), O=old, HS=humongous(starts), HC=humongous(continues), CS=collection set, F=free, OA=open archive, CA=closed archive, TAMS=top-at-mark-start (previous, next) +| 0|0x0000000083000000, 0x0000000083100000, 0x0000000083100000|100%|HS| |TAMS 0x0000000083100000, 0x0000000083000000| Complete +| 1|0x0000000083100000, 0x0000000083200000, 0x0000000083200000|100%| O| |TAMS 0x0000000083200000, 0x0000000083100000| Untracked +| 2|0x0000000083200000, 0x0000000083300000, 0x0000000083300000|100%| O| |TAMS 0x0000000083300000, 0x0000000083200000| Untracked +| 3|0x0000000083300000, 0x0000000083400000, 0x0000000083400000|100%| O| |TAMS 0x0000000083400000, 0x0000000083300000| Untracked +| 4|0x0000000083400000, 0x0000000083500000, 0x0000000083500000|100%| O| |TAMS 0x0000000083500000, 0x0000000083400000| Untracked +| 5|0x0000000083500000, 0x0000000083600000, 0x0000000083600000|100%| O| |TAMS 0x0000000083600000, 0x0000000083500000| Untracked +| 6|0x0000000083600000, 0x0000000083700000, 0x0000000083700000|100%| O| |TAMS 0x0000000083700000, 0x0000000083600000| Untracked +| 7|0x0000000083700000, 0x0000000083800000, 0x0000000083800000|100%| O| |TAMS 0x0000000083800000, 0x0000000083700000| Untracked +| 8|0x0000000083800000, 0x0000000083900000, 0x0000000083900000|100%| O| |TAMS 0x0000000083900000, 0x0000000083800000| Untracked +| 9|0x0000000083900000, 0x00000000839ffff8, 0x0000000083a00000| 99%| O| |TAMS 0x0000000083900000, 0x0000000083900000| Untracked +| 10|0x0000000083a00000, 0x0000000083b00000, 0x0000000083b00000|100%| O| |TAMS 0x0000000083b00000, 0x0000000083a00000| Untracked +| 11|0x0000000083b00000, 0x0000000083c00000, 0x0000000083c00000|100%| O| |TAMS 0x0000000083c00000, 0x0000000083b00000| Untracked +| 12|0x0000000083c00000, 0x0000000083d00000, 0x0000000083d00000|100%| O| |TAMS 0x0000000083d00000, 0x0000000083c00000| Untracked +| 13|0x0000000083d00000, 0x0000000083e00000, 0x0000000083e00000|100%| O| |TAMS 0x0000000083e00000, 0x0000000083d00000| Untracked +| 14|0x0000000083e00000, 0x0000000083f00000, 0x0000000083f00000|100%| O| |TAMS 0x0000000083f00000, 0x0000000083e00000| Untracked +| 15|0x0000000083f00000, 0x0000000084000000, 0x0000000084000000|100%| O| |TAMS 0x0000000083f00000, 0x0000000083f00000| Untracked +| 16|0x0000000084000000, 0x0000000084100000, 0x0000000084100000|100%| O| |TAMS 0x0000000084000000, 0x0000000084000000| Untracked +| 17|0x0000000084100000, 0x0000000084200000, 0x0000000084200000|100%| O| |TAMS 0x0000000084100000, 0x0000000084100000| Untracked +| 18|0x0000000084200000, 0x0000000084201800, 0x0000000084300000| 0%| O| |TAMS 0x0000000084200000, 0x0000000084200000| Untracked +| 19|0x0000000084300000, 0x0000000084300000, 0x0000000084400000| 0%| F| |TAMS 0x0000000084300000, 0x0000000084300000| Untracked +| 20|0x0000000084400000, 0x0000000084400000, 0x0000000084500000| 0%| F| |TAMS 0x0000000084400000, 0x0000000084400000| Untracked +| 21|0x0000000084500000, 0x0000000084500000, 0x0000000084600000| 0%| F| |TAMS 0x0000000084500000, 0x0000000084500000| Untracked +| 22|0x0000000084600000, 0x0000000084700000, 0x0000000084700000|100%| O| |TAMS 0x0000000084700000, 0x0000000084600000| Untracked +| 23|0x0000000084700000, 0x0000000084800000, 0x0000000084800000|100%| O| |TAMS 0x0000000084800000, 0x0000000084700000| Untracked +| 24|0x0000000084800000, 0x0000000084800000, 0x0000000084900000| 0%| F| |TAMS 0x0000000084800000, 0x0000000084800000| Untracked +| 25|0x0000000084900000, 0x0000000084900000, 0x0000000084a00000| 0%| F| |TAMS 0x0000000084900000, 0x0000000084900000| Untracked +| 26|0x0000000084a00000, 0x0000000084b00000, 0x0000000084b00000|100%| O| |TAMS 0x0000000084b00000, 0x0000000084a00000| Untracked +| 27|0x0000000084b00000, 0x0000000084b00000, 0x0000000084c00000| 0%| F| |TAMS 0x0000000084b00000, 0x0000000084b00000| Untracked +| 28|0x0000000084c00000, 0x0000000084d00000, 0x0000000084d00000|100%| O| |TAMS 0x0000000084d00000, 0x0000000084c00000| Untracked +| 29|0x0000000084d00000, 0x0000000084d00000, 0x0000000084e00000| 0%| F| |TAMS 0x0000000084d00000, 0x0000000084d00000| Untracked +| 30|0x0000000084e00000, 0x0000000084f00000, 0x0000000084f00000|100%| O| |TAMS 0x0000000084f00000, 0x0000000084e00000| Untracked +| 31|0x0000000084f00000, 0x0000000084f00000, 0x0000000085000000| 0%| F| |TAMS 0x0000000084f00000, 0x0000000084f00000| Untracked +| 32|0x0000000085000000, 0x0000000085100000, 0x0000000085100000|100%| O| |TAMS 0x0000000085100000, 0x0000000085000000| Untracked +| 33|0x0000000085100000, 0x0000000085200000, 0x0000000085200000|100%| O| |TAMS 0x0000000085200000, 0x0000000085100000| Untracked +| 34|0x0000000085200000, 0x0000000085300000, 0x0000000085300000|100%| O| |TAMS 0x0000000085300000, 0x0000000085200000| Untracked +| 35|0x0000000085300000, 0x0000000085400000, 0x0000000085400000|100%| O| |TAMS 0x0000000085400000, 0x0000000085300000| Untracked +| 36|0x0000000085400000, 0x0000000085500000, 0x0000000085500000|100%| O| |TAMS 0x0000000085500000, 0x0000000085400000| Untracked +| 37|0x0000000085500000, 0x0000000085600000, 0x0000000085600000|100%| O| |TAMS 0x0000000085600000, 0x0000000085500000| Untracked +| 38|0x0000000085600000, 0x0000000085700000, 0x0000000085700000|100%| O| |TAMS 0x0000000085700000, 0x0000000085600000| Untracked +| 39|0x0000000085700000, 0x0000000085800000, 0x0000000085800000|100%| O| |TAMS 0x0000000085800000, 0x0000000085700000| Untracked +| 40|0x0000000085800000, 0x0000000085900000, 0x0000000085900000|100%| O| |TAMS 0x0000000085900000, 0x0000000085800000| Untracked +| 41|0x0000000085900000, 0x0000000085a00000, 0x0000000085a00000|100%| O| |TAMS 0x0000000085a00000, 0x0000000085900000| Untracked +| 42|0x0000000085a00000, 0x0000000085b00000, 0x0000000085b00000|100%| O| |TAMS 0x0000000085b00000, 0x0000000085a00000| Untracked +| 43|0x0000000085b00000, 0x0000000085c00000, 0x0000000085c00000|100%| O| |TAMS 0x0000000085c00000, 0x0000000085b00000| Untracked +| 44|0x0000000085c00000, 0x0000000085d00000, 0x0000000085d00000|100%| O| |TAMS 0x0000000085d00000, 0x0000000085c00000| Untracked +| 45|0x0000000085d00000, 0x0000000085d00000, 0x0000000085e00000| 0%| F| |TAMS 0x0000000085d00000, 0x0000000085d00000| Untracked +| 46|0x0000000085e00000, 0x0000000085e00000, 0x0000000085f00000| 0%| F| |TAMS 0x0000000085e00000, 0x0000000085e00000| Untracked +| 47|0x0000000085f00000, 0x0000000086000000, 0x0000000086000000|100%| O| |TAMS 0x0000000086000000, 0x0000000085f00000| Untracked +| 48|0x0000000086000000, 0x0000000086100000, 0x0000000086100000|100%| O| |TAMS 0x0000000086100000, 0x0000000086000000| Untracked +| 49|0x0000000086100000, 0x0000000086200000, 0x0000000086200000|100%| O| |TAMS 0x0000000086200000, 0x0000000086100000| Untracked +| 50|0x0000000086200000, 0x0000000086300000, 0x0000000086300000|100%| O| |TAMS 0x0000000086300000, 0x0000000086200000| Untracked +| 51|0x0000000086300000, 0x0000000086400000, 0x0000000086400000|100%| O| |TAMS 0x0000000086400000, 0x0000000086300000| Untracked +| 52|0x0000000086400000, 0x0000000086500000, 0x0000000086500000|100%| O| |TAMS 0x0000000086500000, 0x0000000086400000| Untracked +| 53|0x0000000086500000, 0x0000000086600000, 0x0000000086600000|100%| O| |TAMS 0x0000000086600000, 0x0000000086500000| Untracked +| 54|0x0000000086600000, 0x0000000086700000, 0x0000000086700000|100%| O| |TAMS 0x0000000086700000, 0x0000000086600000| Untracked +| 55|0x0000000086700000, 0x0000000086800000, 0x0000000086800000|100%| O| |TAMS 0x0000000086800000, 0x0000000086700000| Untracked +| 56|0x0000000086800000, 0x0000000086900000, 0x0000000086900000|100%| O| |TAMS 0x0000000086900000, 0x0000000086800000| Untracked +| 57|0x0000000086900000, 0x0000000086a00000, 0x0000000086a00000|100%| O| |TAMS 0x0000000086a00000, 0x0000000086900000| Untracked +| 58|0x0000000086a00000, 0x0000000086a00000, 0x0000000086b00000| 0%| F| |TAMS 0x0000000086a00000, 0x0000000086a00000| Untracked +| 59|0x0000000086b00000, 0x0000000086c00000, 0x0000000086c00000|100%| O| |TAMS 0x0000000086c00000, 0x0000000086b00000| Untracked +| 60|0x0000000086c00000, 0x0000000086d00000, 0x0000000086d00000|100%| O| |TAMS 0x0000000086d00000, 0x0000000086c00000| Untracked +| 61|0x0000000086d00000, 0x0000000086e00000, 0x0000000086e00000|100%| O| |TAMS 0x0000000086e00000, 0x0000000086d00000| Untracked +| 62|0x0000000086e00000, 0x0000000086f00000, 0x0000000086f00000|100%| O| |TAMS 0x0000000086f00000, 0x0000000086e00000| Untracked +| 63|0x0000000086f00000, 0x0000000086f00000, 0x0000000087000000| 0%| F| |TAMS 0x0000000086f00000, 0x0000000086f00000| Untracked +| 64|0x0000000087000000, 0x0000000087100000, 0x0000000087100000|100%| O| |TAMS 0x0000000087100000, 0x0000000087000000| Untracked +| 65|0x0000000087100000, 0x0000000087200000, 0x0000000087200000|100%| O| |TAMS 0x0000000087200000, 0x0000000087100000| Untracked +| 66|0x0000000087200000, 0x0000000087200000, 0x0000000087300000| 0%| F| |TAMS 0x0000000087200000, 0x0000000087200000| Untracked +| 67|0x0000000087300000, 0x0000000087300000, 0x0000000087400000| 0%| F| |TAMS 0x0000000087300000, 0x0000000087300000| Untracked +| 68|0x0000000087400000, 0x0000000087500000, 0x0000000087500000|100%| O| |TAMS 0x0000000087500000, 0x0000000087400000| Untracked +| 69|0x0000000087500000, 0x0000000087600000, 0x0000000087600000|100%| O| |TAMS 0x0000000087600000, 0x0000000087500000| Untracked +| 70|0x0000000087600000, 0x0000000087600000, 0x0000000087700000| 0%| F| |TAMS 0x0000000087600000, 0x0000000087600000| Untracked +| 71|0x0000000087700000, 0x0000000087800000, 0x0000000087800000|100%| O| |TAMS 0x0000000087800000, 0x0000000087700000| Untracked +| 72|0x0000000087800000, 0x0000000087900000, 0x0000000087900000|100%| O| |TAMS 0x0000000087900000, 0x0000000087800000| Untracked +| 73|0x0000000087900000, 0x0000000087a00000, 0x0000000087a00000|100%| O| |TAMS 0x0000000087a00000, 0x0000000087900000| Untracked +| 74|0x0000000087a00000, 0x0000000087b00000, 0x0000000087b00000|100%| O| |TAMS 0x0000000087b00000, 0x0000000087a00000| Untracked +| 75|0x0000000087b00000, 0x0000000087c00000, 0x0000000087c00000|100%| O| |TAMS 0x0000000087c00000, 0x0000000087b00000| Untracked +| 76|0x0000000087c00000, 0x0000000087d00000, 0x0000000087d00000|100%| O| |TAMS 0x0000000087d00000, 0x0000000087c00000| Untracked +| 77|0x0000000087d00000, 0x0000000087e00000, 0x0000000087e00000|100%| O| |TAMS 0x0000000087e00000, 0x0000000087d00000| Untracked +| 78|0x0000000087e00000, 0x0000000087e00000, 0x0000000087f00000| 0%| F| |TAMS 0x0000000087e00000, 0x0000000087e00000| Untracked +| 79|0x0000000087f00000, 0x0000000088000000, 0x0000000088000000|100%| O| |TAMS 0x0000000088000000, 0x0000000087f00000| Untracked +| 80|0x0000000088000000, 0x0000000088100000, 0x0000000088100000|100%| O| |TAMS 0x0000000088100000, 0x0000000088000000| Untracked +| 81|0x0000000088100000, 0x0000000088200000, 0x0000000088200000|100%| O| |TAMS 0x0000000088200000, 0x0000000088100000| Untracked +| 82|0x0000000088200000, 0x0000000088300000, 0x0000000088300000|100%| O| |TAMS 0x0000000088300000, 0x0000000088200000| Untracked +| 83|0x0000000088300000, 0x0000000088400000, 0x0000000088400000|100%| O| |TAMS 0x0000000088400000, 0x0000000088300000| Untracked +| 84|0x0000000088400000, 0x0000000088400000, 0x0000000088500000| 0%| F| |TAMS 0x0000000088400000, 0x0000000088400000| Untracked +| 85|0x0000000088500000, 0x0000000088600000, 0x0000000088600000|100%| O| |TAMS 0x0000000088600000, 0x0000000088500000| Untracked +| 86|0x0000000088600000, 0x0000000088700000, 0x0000000088700000|100%| O| |TAMS 0x0000000088700000, 0x0000000088600000| Untracked +| 87|0x0000000088700000, 0x0000000088700000, 0x0000000088800000| 0%| F| |TAMS 0x0000000088700000, 0x0000000088700000| Untracked +| 88|0x0000000088800000, 0x0000000088900000, 0x0000000088900000|100%| O| |TAMS 0x0000000088900000, 0x0000000088800000| Untracked +| 89|0x0000000088900000, 0x0000000088a00000, 0x0000000088a00000|100%| O| |TAMS 0x0000000088a00000, 0x0000000088900000| Untracked +| 90|0x0000000088a00000, 0x0000000088b00000, 0x0000000088b00000|100%| O| |TAMS 0x0000000088b00000, 0x0000000088a00000| Untracked +| 91|0x0000000088b00000, 0x0000000088c00000, 0x0000000088c00000|100%| O| |TAMS 0x0000000088c00000, 0x0000000088b00000| Untracked +| 92|0x0000000088c00000, 0x0000000088d00000, 0x0000000088d00000|100%| O| |TAMS 0x0000000088d00000, 0x0000000088c00000| Untracked +| 93|0x0000000088d00000, 0x0000000088e00000, 0x0000000088e00000|100%| O| |TAMS 0x0000000088e00000, 0x0000000088d00000| Untracked +| 94|0x0000000088e00000, 0x0000000088f00000, 0x0000000088f00000|100%| O| |TAMS 0x0000000088f00000, 0x0000000088e00000| Untracked +| 95|0x0000000088f00000, 0x0000000089000000, 0x0000000089000000|100%| O| |TAMS 0x0000000089000000, 0x0000000088f00000| Untracked +| 96|0x0000000089000000, 0x0000000089100000, 0x0000000089100000|100%| O| |TAMS 0x0000000089100000, 0x0000000089000000| Untracked +| 97|0x0000000089100000, 0x0000000089200000, 0x0000000089200000|100%| O| |TAMS 0x0000000089200000, 0x0000000089100000| Untracked +| 98|0x0000000089200000, 0x0000000089300000, 0x0000000089300000|100%| O| |TAMS 0x0000000089300000, 0x0000000089200000| Untracked +| 99|0x0000000089300000, 0x0000000089400000, 0x0000000089400000|100%| O| |TAMS 0x0000000089400000, 0x0000000089300000| Untracked +| 100|0x0000000089400000, 0x0000000089500000, 0x0000000089500000|100%| O| |TAMS 0x0000000089500000, 0x0000000089400000| Untracked +| 101|0x0000000089500000, 0x0000000089600000, 0x0000000089600000|100%| O| |TAMS 0x0000000089600000, 0x0000000089500000| Untracked +| 102|0x0000000089600000, 0x0000000089700000, 0x0000000089700000|100%| O| |TAMS 0x0000000089700000, 0x0000000089600000| Untracked +| 103|0x0000000089700000, 0x0000000089800000, 0x0000000089800000|100%| O| |TAMS 0x0000000089800000, 0x0000000089700000| Untracked +| 104|0x0000000089800000, 0x0000000089900000, 0x0000000089900000|100%| O| |TAMS 0x0000000089900000, 0x0000000089800000| Untracked +| 105|0x0000000089900000, 0x0000000089a00000, 0x0000000089a00000|100%| O| |TAMS 0x0000000089a00000, 0x0000000089900000| Untracked +| 106|0x0000000089a00000, 0x0000000089a00000, 0x0000000089b00000| 0%| F| |TAMS 0x0000000089a00000, 0x0000000089a00000| Untracked +| 107|0x0000000089b00000, 0x0000000089b00000, 0x0000000089c00000| 0%| F| |TAMS 0x0000000089b00000, 0x0000000089b00000| Untracked +| 108|0x0000000089c00000, 0x0000000089d00000, 0x0000000089d00000|100%| O| |TAMS 0x0000000089d00000, 0x0000000089c00000| Untracked +| 109|0x0000000089d00000, 0x0000000089e00000, 0x0000000089e00000|100%| O| |TAMS 0x0000000089e00000, 0x0000000089d00000| Untracked +| 110|0x0000000089e00000, 0x0000000089f00000, 0x0000000089f00000|100%| O| |TAMS 0x0000000089f00000, 0x0000000089e00000| Untracked +| 111|0x0000000089f00000, 0x000000008a000000, 0x000000008a000000|100%| O| |TAMS 0x000000008a000000, 0x0000000089f00000| Untracked +| 112|0x000000008a000000, 0x000000008a100000, 0x000000008a100000|100%| O| |TAMS 0x000000008a0d5800, 0x000000008a000000| Untracked +| 113|0x000000008a100000, 0x000000008a200000, 0x000000008a200000|100%| O| |TAMS 0x000000008a100000, 0x000000008a100000| Untracked +| 114|0x000000008a200000, 0x000000008a300000, 0x000000008a300000|100%| O| |TAMS 0x000000008a200000, 0x000000008a200000| Untracked +| 115|0x000000008a300000, 0x000000008a400000, 0x000000008a400000|100%| O| |TAMS 0x000000008a300000, 0x000000008a300000| Untracked +| 116|0x000000008a400000, 0x000000008a500000, 0x000000008a500000|100%| O| |TAMS 0x000000008a400000, 0x000000008a400000| Untracked +| 117|0x000000008a500000, 0x000000008a600000, 0x000000008a600000|100%| O| |TAMS 0x000000008a500000, 0x000000008a500000| Untracked +| 118|0x000000008a600000, 0x000000008a700000, 0x000000008a700000|100%| O| |TAMS 0x000000008a600000, 0x000000008a600000| Untracked +| 119|0x000000008a700000, 0x000000008a800000, 0x000000008a800000|100%| O| |TAMS 0x000000008a700000, 0x000000008a700000| Untracked +| 120|0x000000008a800000, 0x000000008a900000, 0x000000008a900000|100%| O| |TAMS 0x000000008a800000, 0x000000008a800000| Untracked +| 121|0x000000008a900000, 0x000000008aa00000, 0x000000008aa00000|100%| O| |TAMS 0x000000008a900000, 0x000000008a900000| Untracked +| 122|0x000000008aa00000, 0x000000008ab00000, 0x000000008ab00000|100%| O| |TAMS 0x000000008aa00000, 0x000000008aa00000| Untracked +| 123|0x000000008ab00000, 0x000000008ac00000, 0x000000008ac00000|100%| O| |TAMS 0x000000008ab00000, 0x000000008ab00000| Untracked +| 124|0x000000008ac00000, 0x000000008ad00000, 0x000000008ad00000|100%| O| |TAMS 0x000000008ac00000, 0x000000008ac00000| Untracked +| 125|0x000000008ad00000, 0x000000008ae00000, 0x000000008ae00000|100%| O| |TAMS 0x000000008ad00000, 0x000000008ad00000| Untracked +| 126|0x000000008ae00000, 0x000000008af00000, 0x000000008af00000|100%| O| |TAMS 0x000000008ae00000, 0x000000008ae00000| Untracked +| 127|0x000000008af00000, 0x000000008b000000, 0x000000008b000000|100%| O| |TAMS 0x000000008af00000, 0x000000008af00000| Untracked +| 128|0x000000008b000000, 0x000000008b000000, 0x000000008b100000| 0%| F| |TAMS 0x000000008b000000, 0x000000008b000000| Untracked +| 129|0x000000008b100000, 0x000000008b100000, 0x000000008b200000| 0%| F| |TAMS 0x000000008b100000, 0x000000008b100000| Untracked +| 130|0x000000008b200000, 0x000000008b200000, 0x000000008b300000| 0%| F| |TAMS 0x000000008b200000, 0x000000008b200000| Untracked +| 131|0x000000008b300000, 0x000000008b300000, 0x000000008b400000| 0%| F| |TAMS 0x000000008b300000, 0x000000008b300000| Untracked +| 132|0x000000008b400000, 0x000000008b400000, 0x000000008b500000| 0%| F| |TAMS 0x000000008b400000, 0x000000008b400000| Untracked +| 133|0x000000008b500000, 0x000000008b500000, 0x000000008b600000| 0%| F| |TAMS 0x000000008b500000, 0x000000008b500000| Untracked +| 134|0x000000008b600000, 0x000000008b600000, 0x000000008b700000| 0%| F| |TAMS 0x000000008b600000, 0x000000008b600000| Untracked +| 135|0x000000008b700000, 0x000000008b700000, 0x000000008b800000| 0%| F| |TAMS 0x000000008b700000, 0x000000008b700000| Untracked +| 136|0x000000008b800000, 0x000000008b800000, 0x000000008b900000| 0%| F| |TAMS 0x000000008b800000, 0x000000008b800000| Untracked +| 137|0x000000008b900000, 0x000000008b900000, 0x000000008ba00000| 0%| F| |TAMS 0x000000008b900000, 0x000000008b900000| Untracked +| 138|0x000000008ba00000, 0x000000008ba00000, 0x000000008bb00000| 0%| F| |TAMS 0x000000008ba00000, 0x000000008ba00000| Untracked +| 139|0x000000008bb00000, 0x000000008bb00000, 0x000000008bc00000| 0%| F| |TAMS 0x000000008bb00000, 0x000000008bb00000| Untracked +| 140|0x000000008bc00000, 0x000000008bc00000, 0x000000008bd00000| 0%| F| |TAMS 0x000000008bc00000, 0x000000008bc00000| Untracked +| 141|0x000000008bd00000, 0x000000008bd00000, 0x000000008be00000| 0%| F| |TAMS 0x000000008bd00000, 0x000000008bd00000| Untracked +| 142|0x000000008be00000, 0x000000008be00000, 0x000000008bf00000| 0%| F| |TAMS 0x000000008be00000, 0x000000008be00000| Untracked +| 143|0x000000008bf00000, 0x000000008bf00000, 0x000000008c000000| 0%| F| |TAMS 0x000000008bf00000, 0x000000008bf00000| Untracked +| 144|0x000000008c000000, 0x000000008c000000, 0x000000008c100000| 0%| F| |TAMS 0x000000008c000000, 0x000000008c000000| Untracked +| 145|0x000000008c100000, 0x000000008c100000, 0x000000008c200000| 0%| F| |TAMS 0x000000008c100000, 0x000000008c100000| Untracked +| 146|0x000000008c200000, 0x000000008c200000, 0x000000008c300000| 0%| F| |TAMS 0x000000008c200000, 0x000000008c200000| Untracked +| 147|0x000000008c300000, 0x000000008c300000, 0x000000008c400000| 0%| F| |TAMS 0x000000008c300000, 0x000000008c300000| Untracked +| 148|0x000000008c400000, 0x000000008c400000, 0x000000008c500000| 0%| F| |TAMS 0x000000008c400000, 0x000000008c400000| Untracked +| 149|0x000000008c500000, 0x000000008c500000, 0x000000008c600000| 0%| F| |TAMS 0x000000008c500000, 0x000000008c500000| Untracked +| 150|0x000000008c600000, 0x000000008c600000, 0x000000008c700000| 0%| F| |TAMS 0x000000008c600000, 0x000000008c600000| Untracked +| 151|0x000000008c700000, 0x000000008c700000, 0x000000008c800000| 0%| F| |TAMS 0x000000008c700000, 0x000000008c700000| Untracked +| 152|0x000000008c800000, 0x000000008c800000, 0x000000008c900000| 0%| F| |TAMS 0x000000008c800000, 0x000000008c800000| Untracked +| 153|0x000000008c900000, 0x000000008c900000, 0x000000008ca00000| 0%| F| |TAMS 0x000000008c900000, 0x000000008c900000| Untracked +| 154|0x000000008ca00000, 0x000000008ca00000, 0x000000008cb00000| 0%| F| |TAMS 0x000000008ca00000, 0x000000008ca00000| Untracked +| 155|0x000000008cb00000, 0x000000008cb00000, 0x000000008cc00000| 0%| F| |TAMS 0x000000008cb00000, 0x000000008cb00000| Untracked +| 156|0x000000008cc00000, 0x000000008cc00000, 0x000000008cd00000| 0%| F| |TAMS 0x000000008cc00000, 0x000000008cc00000| Untracked +| 157|0x000000008cd00000, 0x000000008cd00000, 0x000000008ce00000| 0%| F| |TAMS 0x000000008cd00000, 0x000000008cd00000| Untracked +| 158|0x000000008ce00000, 0x000000008ce00000, 0x000000008cf00000| 0%| F| |TAMS 0x000000008ce00000, 0x000000008ce00000| Untracked +| 159|0x000000008cf00000, 0x000000008cf00000, 0x000000008d000000| 0%| F| |TAMS 0x000000008cf00000, 0x000000008cf00000| Untracked +| 160|0x000000008d000000, 0x000000008d000000, 0x000000008d100000| 0%| F| |TAMS 0x000000008d000000, 0x000000008d000000| Untracked +| 161|0x000000008d100000, 0x000000008d100000, 0x000000008d200000| 0%| F| |TAMS 0x000000008d100000, 0x000000008d100000| Untracked +| 162|0x000000008d200000, 0x000000008d200000, 0x000000008d300000| 0%| F| |TAMS 0x000000008d200000, 0x000000008d200000| Untracked +| 163|0x000000008d300000, 0x000000008d300000, 0x000000008d400000| 0%| F| |TAMS 0x000000008d300000, 0x000000008d300000| Untracked +| 164|0x000000008d400000, 0x000000008d400000, 0x000000008d500000| 0%| F| |TAMS 0x000000008d400000, 0x000000008d400000| Untracked +| 165|0x000000008d500000, 0x000000008d500000, 0x000000008d600000| 0%| F| |TAMS 0x000000008d500000, 0x000000008d500000| Untracked +| 166|0x000000008d600000, 0x000000008d600000, 0x000000008d700000| 0%| F| |TAMS 0x000000008d600000, 0x000000008d600000| Untracked +| 167|0x000000008d700000, 0x000000008d700000, 0x000000008d800000| 0%| F| |TAMS 0x000000008d700000, 0x000000008d700000| Untracked +| 168|0x000000008d800000, 0x000000008d800000, 0x000000008d900000| 0%| F| |TAMS 0x000000008d800000, 0x000000008d800000| Untracked +| 169|0x000000008d900000, 0x000000008d900000, 0x000000008da00000| 0%| F| |TAMS 0x000000008d900000, 0x000000008d900000| Untracked +| 170|0x000000008da00000, 0x000000008da00000, 0x000000008db00000| 0%| F| |TAMS 0x000000008da00000, 0x000000008da00000| Untracked +| 171|0x000000008db00000, 0x000000008db00000, 0x000000008dc00000| 0%| F| |TAMS 0x000000008db00000, 0x000000008db00000| Untracked +| 172|0x000000008dc00000, 0x000000008dc00000, 0x000000008dd00000| 0%| F| |TAMS 0x000000008dc00000, 0x000000008dc00000| Untracked +| 173|0x000000008dd00000, 0x000000008dd00000, 0x000000008de00000| 0%| F| |TAMS 0x000000008dd00000, 0x000000008dd00000| Untracked +| 174|0x000000008de00000, 0x000000008de00000, 0x000000008df00000| 0%| F| |TAMS 0x000000008de00000, 0x000000008de00000| Untracked +| 175|0x000000008df00000, 0x000000008df00000, 0x000000008e000000| 0%| F| |TAMS 0x000000008df00000, 0x000000008df00000| Untracked +| 176|0x000000008e000000, 0x000000008e000000, 0x000000008e100000| 0%| F| |TAMS 0x000000008e000000, 0x000000008e000000| Untracked +| 177|0x000000008e100000, 0x000000008e100000, 0x000000008e200000| 0%| F| |TAMS 0x000000008e100000, 0x000000008e100000| Untracked +| 178|0x000000008e200000, 0x000000008e200000, 0x000000008e300000| 0%| F| |TAMS 0x000000008e200000, 0x000000008e200000| Untracked +| 179|0x000000008e300000, 0x000000008e300000, 0x000000008e400000| 0%| F| |TAMS 0x000000008e300000, 0x000000008e300000| Untracked +| 180|0x000000008e400000, 0x000000008e400000, 0x000000008e500000| 0%| F| |TAMS 0x000000008e400000, 0x000000008e400000| Untracked +| 181|0x000000008e500000, 0x000000008e500000, 0x000000008e600000| 0%| F| |TAMS 0x000000008e500000, 0x000000008e500000| Untracked +| 182|0x000000008e600000, 0x000000008e600000, 0x000000008e700000| 0%| F| |TAMS 0x000000008e600000, 0x000000008e600000| Untracked +| 183|0x000000008e700000, 0x000000008e700000, 0x000000008e800000| 0%| F| |TAMS 0x000000008e700000, 0x000000008e700000| Untracked +| 184|0x000000008e800000, 0x000000008e800000, 0x000000008e900000| 0%| F| |TAMS 0x000000008e800000, 0x000000008e800000| Untracked +| 185|0x000000008e900000, 0x000000008e900000, 0x000000008ea00000| 0%| F| |TAMS 0x000000008e900000, 0x000000008e900000| Untracked +| 186|0x000000008ea00000, 0x000000008ea00000, 0x000000008eb00000| 0%| F| |TAMS 0x000000008ea00000, 0x000000008ea00000| Untracked +| 187|0x000000008eb00000, 0x000000008eb00000, 0x000000008ec00000| 0%| F| |TAMS 0x000000008eb00000, 0x000000008eb00000| Untracked +| 188|0x000000008ec00000, 0x000000008ec00000, 0x000000008ed00000| 0%| F| |TAMS 0x000000008ec00000, 0x000000008ec00000| Untracked +| 189|0x000000008ed00000, 0x000000008ed00000, 0x000000008ee00000| 0%| F| |TAMS 0x000000008ed00000, 0x000000008ed00000| Untracked +| 190|0x000000008ee00000, 0x000000008ee00000, 0x000000008ef00000| 0%| F| |TAMS 0x000000008ee00000, 0x000000008ee00000| Untracked +| 191|0x000000008ef00000, 0x000000008ef00000, 0x000000008f000000| 0%| F| |TAMS 0x000000008ef00000, 0x000000008ef00000| Untracked +| 192|0x000000008f000000, 0x000000008f000000, 0x000000008f100000| 0%| F| |TAMS 0x000000008f000000, 0x000000008f000000| Untracked +| 193|0x000000008f100000, 0x000000008f100000, 0x000000008f200000| 0%| F| |TAMS 0x000000008f100000, 0x000000008f100000| Untracked +| 194|0x000000008f200000, 0x000000008f200000, 0x000000008f300000| 0%| F| |TAMS 0x000000008f200000, 0x000000008f200000| Untracked +| 195|0x000000008f300000, 0x000000008f300000, 0x000000008f400000| 0%| F| |TAMS 0x000000008f300000, 0x000000008f300000| Untracked +| 196|0x000000008f400000, 0x000000008f400000, 0x000000008f500000| 0%| F| |TAMS 0x000000008f400000, 0x000000008f400000| Untracked +| 197|0x000000008f500000, 0x000000008f500000, 0x000000008f600000| 0%| F| |TAMS 0x000000008f500000, 0x000000008f500000| Untracked +| 198|0x000000008f600000, 0x000000008f600000, 0x000000008f700000| 0%| F| |TAMS 0x000000008f600000, 0x000000008f600000| Untracked +| 199|0x000000008f700000, 0x000000008f700000, 0x000000008f800000| 0%| F| |TAMS 0x000000008f700000, 0x000000008f700000| Untracked +| 200|0x000000008f800000, 0x000000008f800000, 0x000000008f900000| 0%| F| |TAMS 0x000000008f800000, 0x000000008f800000| Untracked +| 201|0x000000008f900000, 0x000000008f900000, 0x000000008fa00000| 0%| F| |TAMS 0x000000008f900000, 0x000000008f900000| Untracked +| 202|0x000000008fa00000, 0x000000008fa00000, 0x000000008fb00000| 0%| F| |TAMS 0x000000008fa00000, 0x000000008fa00000| Untracked +| 203|0x000000008fb00000, 0x000000008fb00000, 0x000000008fc00000| 0%| F| |TAMS 0x000000008fb00000, 0x000000008fb00000| Untracked +| 204|0x000000008fc00000, 0x000000008fc00000, 0x000000008fd00000| 0%| F| |TAMS 0x000000008fc00000, 0x000000008fc00000| Untracked +| 205|0x000000008fd00000, 0x000000008fd00000, 0x000000008fe00000| 0%| F| |TAMS 0x000000008fd00000, 0x000000008fd00000| Untracked +| 206|0x000000008fe00000, 0x000000008fe00000, 0x000000008ff00000| 0%| F| |TAMS 0x000000008fe00000, 0x000000008fe00000| Untracked +| 207|0x000000008ff00000, 0x000000008ff00000, 0x0000000090000000| 0%| F| |TAMS 0x000000008ff00000, 0x000000008ff00000| Untracked +| 208|0x0000000090000000, 0x0000000090000000, 0x0000000090100000| 0%| F| |TAMS 0x0000000090000000, 0x0000000090000000| Untracked +| 209|0x0000000090100000, 0x0000000090100000, 0x0000000090200000| 0%| F| |TAMS 0x0000000090100000, 0x0000000090100000| Untracked +| 210|0x0000000090200000, 0x0000000090200000, 0x0000000090300000| 0%| F| |TAMS 0x0000000090200000, 0x0000000090200000| Untracked +| 211|0x0000000090300000, 0x0000000090300000, 0x0000000090400000| 0%| F| |TAMS 0x0000000090300000, 0x0000000090300000| Untracked +| 212|0x0000000090400000, 0x0000000090400000, 0x0000000090500000| 0%| F| |TAMS 0x0000000090400000, 0x0000000090400000| Untracked +| 213|0x0000000090500000, 0x0000000090500000, 0x0000000090600000| 0%| F| |TAMS 0x0000000090500000, 0x0000000090500000| Untracked +| 214|0x0000000090600000, 0x0000000090600000, 0x0000000090700000| 0%| F| |TAMS 0x0000000090600000, 0x0000000090600000| Untracked +| 215|0x0000000090700000, 0x0000000090700000, 0x0000000090800000| 0%| F| |TAMS 0x0000000090700000, 0x0000000090700000| Untracked +| 216|0x0000000090800000, 0x0000000090800000, 0x0000000090900000| 0%| F| |TAMS 0x0000000090800000, 0x0000000090800000| Untracked +| 217|0x0000000090900000, 0x0000000090900000, 0x0000000090a00000| 0%| F| |TAMS 0x0000000090900000, 0x0000000090900000| Untracked +| 218|0x0000000090a00000, 0x0000000090a00000, 0x0000000090b00000| 0%| F| |TAMS 0x0000000090a00000, 0x0000000090a00000| Untracked +| 219|0x0000000090b00000, 0x0000000090b00000, 0x0000000090c00000| 0%| F| |TAMS 0x0000000090b00000, 0x0000000090b00000| Untracked +| 220|0x0000000090c00000, 0x0000000090c00000, 0x0000000090d00000| 0%| F| |TAMS 0x0000000090c00000, 0x0000000090c00000| Untracked +| 221|0x0000000090d00000, 0x0000000090d00000, 0x0000000090e00000| 0%| F| |TAMS 0x0000000090d00000, 0x0000000090d00000| Untracked +| 222|0x0000000090e00000, 0x0000000090e00000, 0x0000000090f00000| 0%| F| |TAMS 0x0000000090e00000, 0x0000000090e00000| Untracked +| 223|0x0000000090f00000, 0x0000000090f00000, 0x0000000091000000| 0%| F| |TAMS 0x0000000090f00000, 0x0000000090f00000| Untracked +| 224|0x0000000091000000, 0x0000000091000000, 0x0000000091100000| 0%| F| |TAMS 0x0000000091000000, 0x0000000091000000| Untracked +| 225|0x0000000091100000, 0x0000000091100000, 0x0000000091200000| 0%| F| |TAMS 0x0000000091100000, 0x0000000091100000| Untracked +| 226|0x0000000091200000, 0x0000000091200000, 0x0000000091300000| 0%| F| |TAMS 0x0000000091200000, 0x0000000091200000| Untracked +| 227|0x0000000091300000, 0x0000000091300000, 0x0000000091400000| 0%| F| |TAMS 0x0000000091300000, 0x0000000091300000| Untracked +| 228|0x0000000091400000, 0x0000000091400000, 0x0000000091500000| 0%| F| |TAMS 0x0000000091400000, 0x0000000091400000| Untracked +| 229|0x0000000091500000, 0x0000000091500000, 0x0000000091600000| 0%| F| |TAMS 0x0000000091500000, 0x0000000091500000| Untracked +| 230|0x0000000091600000, 0x0000000091600000, 0x0000000091700000| 0%| F| |TAMS 0x0000000091600000, 0x0000000091600000| Untracked +| 231|0x0000000091700000, 0x0000000091700000, 0x0000000091800000| 0%| F| |TAMS 0x0000000091700000, 0x0000000091700000| Untracked +| 232|0x0000000091800000, 0x0000000091800000, 0x0000000091900000| 0%| F| |TAMS 0x0000000091800000, 0x0000000091800000| Untracked +| 233|0x0000000091900000, 0x0000000091900000, 0x0000000091a00000| 0%| F| |TAMS 0x0000000091900000, 0x0000000091900000| Untracked +| 234|0x0000000091a00000, 0x0000000091a00000, 0x0000000091b00000| 0%| F| |TAMS 0x0000000091a00000, 0x0000000091a00000| Untracked +| 235|0x0000000091b00000, 0x0000000091b0c6f0, 0x0000000091c00000| 4%| S|CS|TAMS 0x0000000091b00000, 0x0000000091b00000| Complete +| 236|0x0000000091c00000, 0x0000000091c00000, 0x0000000091d00000| 0%| F| |TAMS 0x0000000091c00000, 0x0000000091c00000| Untracked +| 237|0x0000000091d00000, 0x0000000091d00000, 0x0000000091e00000| 0%| F| |TAMS 0x0000000091d00000, 0x0000000091d00000| Untracked +| 238|0x0000000091e00000, 0x0000000091e00000, 0x0000000091f00000| 0%| F| |TAMS 0x0000000091e00000, 0x0000000091e00000| Untracked +| 239|0x0000000091f00000, 0x0000000091f00000, 0x0000000092000000| 0%| F| |TAMS 0x0000000091f00000, 0x0000000091f00000| Untracked +| 240|0x0000000092000000, 0x0000000092000000, 0x0000000092100000| 0%| F| |TAMS 0x0000000092000000, 0x0000000092000000| Untracked +| 241|0x0000000092100000, 0x0000000092100000, 0x0000000092200000| 0%| F| |TAMS 0x0000000092100000, 0x0000000092100000| Untracked +| 242|0x0000000092200000, 0x0000000092200000, 0x0000000092300000| 0%| F| |TAMS 0x0000000092200000, 0x0000000092200000| Untracked +| 243|0x0000000092300000, 0x0000000092300000, 0x0000000092400000| 0%| F| |TAMS 0x0000000092300000, 0x0000000092300000| Untracked +| 244|0x0000000092400000, 0x0000000092400000, 0x0000000092500000| 0%| F| |TAMS 0x0000000092400000, 0x0000000092400000| Untracked +| 245|0x0000000092500000, 0x0000000092500000, 0x0000000092600000| 0%| F| |TAMS 0x0000000092500000, 0x0000000092500000| Untracked +| 246|0x0000000092600000, 0x0000000092600000, 0x0000000092700000| 0%| F| |TAMS 0x0000000092600000, 0x0000000092600000| Untracked + +Card table byte_map: [0x0000022572960000,0x0000022572d50000] _byte_map_base: 0x0000022572548000 + +Marking Bits (Prev, Next): (CMBitMap*) 0x000002256e87eec0, (CMBitMap*) 0x000002256e87ee80 + Prev Bits: [0x0000022575080000, 0x0000022576fc0000) + Next Bits: [0x0000022573140000, 0x0000022575080000) + +Polling page: 0x000002256e000000 + +Metaspace: + +Usage: + Non-class: 90.02 MB capacity, 89.02 MB ( 99%) used, 826.88 KB ( <1%) free+waste, 193.69 KB ( <1%) overhead. + Class: 13.68 MB capacity, 13.16 MB ( 96%) used, 446.24 KB ( 3%) free+waste, 79.12 KB ( <1%) overhead. + Both: 103.70 MB capacity, 102.19 MB ( 99%) used, 1.24 MB ( 1%) free+waste, 272.81 KB ( <1%) overhead. + +Virtual space: + Non-class space: 92.00 MB reserved, 90.17 MB ( 98%) committed + Class space: 1.00 GB reserved, 13.75 MB ( 1%) committed + Both: 1.09 GB reserved, 103.92 MB ( 9%) committed + +Chunk freelists: + Non-Class: 26.00 KB + Class: 12.00 KB + Both: 38.00 KB + +MaxMetaspaceSize: 17179869184.00 GB +CompressedClassSpaceSize: 1.00 GB + +CodeHeap 'non-profiled nmethods': size=238336Kb used=29635Kb max_used=29635Kb free=208700Kb + bounds [0x0000022500740000, 0x0000022502440000, 0x000002250f000000] +CodeHeap 'non-nmethods': size=7424Kb used=1403Kb max_used=1403Kb free=6020Kb + bounds [0x0000022500000000, 0x0000022500270000, 0x0000022500740000] + total_blobs=18391 nmethods=17678 adapters=639 + compilation: enabled + stopped_count=0, restarted_count=0 + full_count=0 + +Compilation events (20 events): +Event: 5890.706 Thread 0x000002257a2c59e0 18301 ! 1 sun.rmi.transport.Transport::serviceCall (349 bytes) +Event: 5891.217 Thread 0x000002257a2c59e0 nmethod 18301 0x0000022502426710 code [0x0000022502426ce0, 0x0000022502428b28] +Event: 5950.695 Thread 0x000002257a2c59e0 18309 1 sun.rmi.server.UnicastServerRef::unmarshalCustomCallData (31 bytes) +Event: 5950.702 Thread 0x000002257a2c59e0 nmethod 18309 0x000002250242ae10 code [0x000002250242afe0, 0x000002250242b288] +Event: 5950.702 Thread 0x000002257a2c59e0 18310 1 sun.rmi.transport.ConnectionInputStream::registerRefs (71 bytes) +Event: 5950.716 Thread 0x000002257a2c59e0 nmethod 18310 0x000002250242b410 code [0x000002250242b620, 0x000002250242b938] +Event: 5950.716 Thread 0x000002257a2c59e0 18311 ! 1 sun.rmi.transport.ConnectionInputStream::done (145 bytes) +Event: 5950.737 Thread 0x000002257a2c59e0 nmethod 18311 0x000002250242bb10 code [0x000002250242bde0, 0x000002250242d028] +Event: 6010.700 Thread 0x000002257a2c59e0 18312 1 java.net.InetSocketAddress::getAddress (8 bytes) +Event: 6010.700 Thread 0x000002257a2c59e0 nmethod 18312 0x000002250242db10 code [0x000002250242dca0, 0x000002250242dd58] +Event: 6265.740 Thread 0x000002257a2c59e0 18313 s! 1 java.net.Socket::close (47 bytes) +Event: 6265.740 Thread 0x000002257a2c59e0 nmethod 18313 0x000002250242de10 code [0x000002250242dfc0, 0x000002250242e2f8] +Event: 6360.856 Thread 0x000002257a2c59e0 18314 1 java.util.Collections::reverse (125 bytes) +Event: 6360.862 Thread 0x000002257a2c59e0 nmethod 18314 0x000002250242e490 code [0x000002250242e6c0, 0x000002250242ea48] +Event: 6490.769 Thread 0x000002257a2c59e0 18315 1 java.net.ServerSocket::isBound (5 bytes) +Event: 6490.769 Thread 0x000002257a2c59e0 nmethod 18315 0x000002250242ec90 code [0x000002250242ee20, 0x000002250242eed8] +Event: 6747.010 Thread 0x000002257a2c59e0 18316 1 java.util.concurrent.SynchronousQueue$TransferStack::awaitFulfill (169 bytes) +Event: 6747.383 Thread 0x000002257a2c59e0 nmethod 18316 0x000002250242ef90 code [0x000002250242f220, 0x000002250242ff98] +Event: 6793.452 Thread 0x000002257a2c59e0 18317 s 1 com.zaxxer.hikari.pool.HikariPool::fillPool (78 bytes) +Event: 6793.697 Thread 0x000002257a2c59e0 nmethod 18317 0x0000022502430590 code [0x0000022502430760, 0x0000022502430a28] + +GC Heap History (20 events): +Event: 6175.390 GC heap after +{Heap after GC invocations=162 (full 0): + garbage-first heap total 252928K, used 109784K [0x0000000083000000, 0x0000000100000000) + region size 1024K, 1 young (1024K), 1 survivors (1024K) + Metaspace used 104639K, capacity 106186K, committed 106416K, reserved 1142784K + class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K +} +Event: 6315.685 GC heap before +{Heap before GC invocations=162 (full 0): + garbage-first heap total 252928K, used 225496K [0x0000000083000000, 0x0000000100000000) + region size 1024K, 114 young (116736K), 1 survivors (1024K) + Metaspace used 104639K, capacity 106186K, committed 106416K, reserved 1142784K + class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K +} +Event: 6315.691 GC heap after +{Heap after GC invocations=163 (full 0): + garbage-first heap total 252928K, used 109802K [0x0000000083000000, 0x0000000100000000) + region size 1024K, 1 young (1024K), 1 survivors (1024K) + Metaspace used 104639K, capacity 106186K, committed 106416K, reserved 1142784K + class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K +} +Event: 6452.947 GC heap before +{Heap before GC invocations=163 (full 0): + garbage-first heap total 252928K, used 225514K [0x0000000083000000, 0x0000000100000000) + region size 1024K, 114 young (116736K), 1 survivors (1024K) + Metaspace used 104639K, capacity 106186K, committed 106416K, reserved 1142784K + class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K +} +Event: 6452.951 GC heap after +{Heap after GC invocations=164 (full 0): + garbage-first heap total 252928K, used 109747K [0x0000000083000000, 0x0000000100000000) + region size 1024K, 1 young (1024K), 1 survivors (1024K) + Metaspace used 104639K, capacity 106186K, committed 106416K, reserved 1142784K + class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K +} +Event: 6584.252 GC heap before +{Heap before GC invocations=164 (full 0): + garbage-first heap total 252928K, used 225459K [0x0000000083000000, 0x0000000100000000) + region size 1024K, 114 young (116736K), 1 survivors (1024K) + Metaspace used 104639K, capacity 106186K, committed 106416K, reserved 1142784K + class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K +} +Event: 6584.353 GC heap after +{Heap after GC invocations=165 (full 0): + garbage-first heap total 252928K, used 109779K [0x0000000083000000, 0x0000000100000000) + region size 1024K, 1 young (1024K), 1 survivors (1024K) + Metaspace used 104639K, capacity 106186K, committed 106416K, reserved 1142784K + class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K +} +Event: 6724.122 GC heap before +{Heap before GC invocations=165 (full 0): + garbage-first heap total 252928K, used 225491K [0x0000000083000000, 0x0000000100000000) + region size 1024K, 114 young (116736K), 1 survivors (1024K) + Metaspace used 104639K, capacity 106186K, committed 106416K, reserved 1142784K + class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K +} +Event: 6724.302 GC heap after +{Heap after GC invocations=166 (full 0): + garbage-first heap total 252928K, used 109770K [0x0000000083000000, 0x0000000100000000) + region size 1024K, 1 young (1024K), 1 survivors (1024K) + Metaspace used 104639K, capacity 106186K, committed 106416K, reserved 1142784K + class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K +} +Event: 6893.026 GC heap before +{Heap before GC invocations=166 (full 0): + garbage-first heap total 252928K, used 225482K [0x0000000083000000, 0x0000000100000000) + region size 1024K, 114 young (116736K), 1 survivors (1024K) + Metaspace used 104639K, capacity 106186K, committed 106416K, reserved 1142784K + class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K +} +Event: 6919.432 GC heap after +{Heap after GC invocations=167 (full 0): + garbage-first heap total 252928K, used 109731K [0x0000000083000000, 0x0000000100000000) + region size 1024K, 1 young (1024K), 1 survivors (1024K) + Metaspace used 104639K, capacity 106186K, committed 106416K, reserved 1142784K + class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K +} +Event: 6984.248 GC heap before +{Heap before GC invocations=167 (full 0): + garbage-first heap total 252928K, used 120995K [0x0000000083000000, 0x0000000100000000) + region size 1024K, 12 young (12288K), 1 survivors (1024K) + Metaspace used 104639K, capacity 106186K, committed 106416K, reserved 1142784K + class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K +} +Event: 7027.223 GC heap after +{Heap after GC invocations=168 (full 0): + garbage-first heap total 252928K, used 109826K [0x0000000083000000, 0x0000000100000000) + region size 1024K, 1 young (1024K), 1 survivors (1024K) + Metaspace used 104639K, capacity 106186K, committed 106416K, reserved 1142784K + class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K +} +Event: 7084.006 GC heap before +{Heap before GC invocations=168 (full 0): + garbage-first heap total 252928K, used 121090K [0x0000000083000000, 0x0000000100000000) + region size 1024K, 12 young (12288K), 1 survivors (1024K) + Metaspace used 104640K, capacity 106186K, committed 106416K, reserved 1142784K + class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K +} +Event: 7087.733 GC heap after +{Heap after GC invocations=169 (full 0): + garbage-first heap total 252928K, used 109663K [0x0000000083000000, 0x0000000100000000) + region size 1024K, 1 young (1024K), 1 survivors (1024K) + Metaspace used 104640K, capacity 106186K, committed 106416K, reserved 1142784K + class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K +} +Event: 7100.806 GC heap before +{Heap before GC invocations=169 (full 0): + garbage-first heap total 252928K, used 120927K [0x0000000083000000, 0x0000000100000000) + region size 1024K, 12 young (12288K), 1 survivors (1024K) + Metaspace used 104640K, capacity 106186K, committed 106416K, reserved 1142784K + class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K +} +Event: 7101.906 GC heap after +{Heap after GC invocations=170 (full 0): + garbage-first heap total 252928K, used 109704K [0x0000000083000000, 0x0000000100000000) + region size 1024K, 1 young (1024K), 1 survivors (1024K) + Metaspace used 104640K, capacity 106186K, committed 106416K, reserved 1142784K + class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K +} +Event: 7117.151 GC heap before +{Heap before GC invocations=170 (full 0): + garbage-first heap total 252928K, used 120968K [0x0000000083000000, 0x0000000100000000) + region size 1024K, 12 young (12288K), 1 survivors (1024K) + Metaspace used 104640K, capacity 106186K, committed 106416K, reserved 1142784K + class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K +} +Event: 7120.742 GC heap after +{Heap after GC invocations=171 (full 0): + garbage-first heap total 252928K, used 109844K [0x0000000083000000, 0x0000000100000000) + region size 1024K, 1 young (1024K), 1 survivors (1024K) + Metaspace used 104640K, capacity 106186K, committed 106416K, reserved 1142784K + class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K +} +Event: 7174.869 GC heap before +{Heap before GC invocations=171 (full 0): + garbage-first heap total 252928K, used 121108K [0x0000000083000000, 0x0000000100000000) + region size 1024K, 12 young (12288K), 1 survivors (1024K) + Metaspace used 104640K, capacity 106186K, committed 106416K, reserved 1142784K + class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K +} + +Deoptimization events (18 events): +Event: 34.247 Thread 0x000002257b705830 DEOPT PACKING pc=0x0000022500a1433c sp=0x00000051798fccf0 +Event: 34.247 Thread 0x000002257b705830 DEOPT UNPACKING pc=0x000002250004e23f sp=0x00000051798fc248 mode 0 +Event: 41.141 Thread 0x000002257b705830 DEOPT PACKING pc=0x00000225011fa5dc sp=0x00000051798f5ec0 +Event: 41.141 Thread 0x000002257b705830 DEOPT UNPACKING pc=0x000002250004e23f sp=0x00000051798f5360 mode 0 +Event: 46.535 Thread 0x000002257b705830 DEOPT PACKING pc=0x0000022500a2d6d2 sp=0x00000051798f7600 +Event: 46.535 Thread 0x000002257b705830 DEOPT UNPACKING pc=0x000002250004e23f sp=0x00000051798f6b08 mode 3 +Event: 46.535 Thread 0x000002257b705830 DEOPT PACKING pc=0x0000022500a29b25 sp=0x00000051798f75c0 +Event: 46.535 Thread 0x000002257b705830 DEOPT UNPACKING pc=0x000002250004e23f sp=0x00000051798f6b08 mode 3 +Event: 53.173 Thread 0x000002257b705830 DEOPT PACKING pc=0x000002250188e47c sp=0x00000051798fbbd0 +Event: 53.173 Thread 0x000002257b705830 DEOPT UNPACKING pc=0x000002250004e23f sp=0x00000051798fb128 mode 0 +Event: 53.173 Thread 0x000002257b705830 DEOPT PACKING pc=0x000002250188e47c sp=0x00000051798fd390 +Event: 53.173 Thread 0x000002257b705830 DEOPT UNPACKING pc=0x000002250004e23f sp=0x00000051798fc8e8 mode 0 +Event: 53.710 Thread 0x000002257b705830 DEOPT PACKING pc=0x0000022500cf2fa4 sp=0x00000051798fe0a0 +Event: 53.710 Thread 0x000002257b705830 DEOPT UNPACKING pc=0x000002250004e23f sp=0x00000051798fd720 mode 0 +Event: 55.827 Thread 0x000002257b705830 DEOPT PACKING pc=0x00000225008b00cc sp=0x00000051798fbeb0 +Event: 55.827 Thread 0x000002257b705830 DEOPT UNPACKING pc=0x000002250004e23f sp=0x00000051798fb3d8 mode 0 +Event: 534.201 Thread 0x000002250f7ac070 DEOPT PACKING pc=0x0000022501c44398 sp=0x000000517b0fe110 +Event: 534.205 Thread 0x000002250f7ac070 DEOPT UNPACKING pc=0x000002250004e23f sp=0x000000517b0fd6b0 mode 3 + +Classes unloaded (14 events): +Event: 49.060 Thread 0x0000022579a517b0 Unloading class 0x0000000100a8dc40 'jdk/internal/reflect/GeneratedSerializationConstructorAccessor38' +Event: 49.060 Thread 0x0000022579a517b0 Unloading class 0x0000000100a8e040 'jdk/internal/reflect/GeneratedSerializationConstructorAccessor37' +Event: 49.060 Thread 0x0000022579a517b0 Unloading class 0x0000000100a8ec40 'jdk/internal/reflect/GeneratedSerializationConstructorAccessor36' +Event: 49.060 Thread 0x0000022579a517b0 Unloading class 0x0000000100a88440 'jdk/internal/reflect/GeneratedSerializationConstructorAccessor35' +Event: 50.471 Thread 0x0000022579a517b0 Unloading class 0x0000000100a8a040 'jdk/internal/reflect/GeneratedSerializationConstructorAccessor39' +Event: 51.854 Thread 0x0000022579a517b0 Unloading class 0x0000000100b16c40 'jdk/internal/reflect/GeneratedSerializationConstructorAccessor41' +Event: 51.854 Thread 0x0000022579a517b0 Unloading class 0x0000000100b16840 'jdk/internal/reflect/GeneratedSerializationConstructorAccessor40' +Event: 57.958 Thread 0x0000022579a517b0 Unloading class 0x0000000100b13440 'jdk/internal/reflect/GeneratedSerializationConstructorAccessor48' +Event: 57.958 Thread 0x0000022579a517b0 Unloading class 0x0000000100b13040 'jdk/internal/reflect/GeneratedSerializationConstructorAccessor47' +Event: 57.958 Thread 0x0000022579a517b0 Unloading class 0x0000000100b13c40 'jdk/internal/reflect/GeneratedSerializationConstructorAccessor46' +Event: 57.958 Thread 0x0000022579a517b0 Unloading class 0x0000000100b16c40 'jdk/internal/reflect/GeneratedSerializationConstructorAccessor45' +Event: 57.958 Thread 0x0000022579a517b0 Unloading class 0x0000000100b14840 'jdk/internal/reflect/GeneratedSerializationConstructorAccessor44' +Event: 57.958 Thread 0x0000022579a517b0 Unloading class 0x0000000100b15040 'jdk/internal/reflect/GeneratedSerializationConstructorAccessor43' +Event: 57.958 Thread 0x0000022579a517b0 Unloading class 0x0000000100b15840 'jdk/internal/reflect/GeneratedSerializationConstructorAccessor42' + +Classes redefined (0 events): +No events + +Internal exceptions (20 events): +Event: 59.740 Thread 0x000002257b705830 Exception (0x00000000907e7e00) +thrown [./open/src/hotspot/share/prims/jni.cpp, line 599] +Event: 59.792 Thread 0x000002257b705830 Exception (0x00000000903c29d8) +thrown [./open/src/hotspot/share/prims/jni.cpp, line 599] +Event: 59.793 Thread 0x000002257b705830 Exception (0x00000000903f4b48) +thrown [./open/src/hotspot/share/prims/jni.cpp, line 599] +Event: 59.921 Thread 0x000002257b705830 Exception (0x000000008fb7cc10) +thrown [./open/src/hotspot/share/prims/jni.cpp, line 599] +Event: 59.922 Thread 0x000002257b705830 Exception (0x000000008fbaefc8) +thrown [./open/src/hotspot/share/prims/jni.cpp, line 599] +Event: 59.946 Thread 0x000002257b705830 Exception (0x000000008faafc28) +thrown [./open/src/hotspot/share/prims/jni.cpp, line 599] +Event: 59.946 Thread 0x000002257b705830 Exception (0x000000008fae1dd8) +thrown [./open/src/hotspot/share/prims/jni.cpp, line 599] +Event: 60.015 Thread 0x000002257b705830 Exception (0x000000008f6728c8) +thrown [./open/src/hotspot/share/prims/jni.cpp, line 599] +Event: 60.016 Thread 0x000002257b705830 Exception (0x000000008f6a4c48) +thrown [./open/src/hotspot/share/prims/jni.cpp, line 599] +Event: 60.169 Thread 0x000002257b705830 Exception (0x000000008ea5b1e0) +thrown [./open/src/hotspot/share/prims/jni.cpp, line 599] +Event: 60.170 Thread 0x000002257b705830 Exception (0x000000008ea8d560) +thrown [./open/src/hotspot/share/prims/jni.cpp, line 599] +Event: 72.831 Thread 0x000002250f7aff00 Exception (0x0000000091460a98) +thrown [./open/src/hotspot/share/interpreter/linkResolver.cpp, line 782] +Event: 1811.543 Thread 0x0000022511086690 Exception (0x000000008f781fa0) +thrown [./open/src/hotspot/share/prims/jni.cpp, line 578] +Event: 1963.220 Thread 0x000002250f7ac070 Exception (0x0000000091f6b860) +thrown [./open/src/hotspot/share/interpreter/linkResolver.cpp, line 782] +Event: 1963.220 Thread 0x000002250f7b1be0 Exception (0x0000000091f6d478) +thrown [./open/src/hotspot/share/interpreter/linkResolver.cpp, line 782] +Event: 1985.373 Thread 0x000002250f7ad3b0 Exception (0x000000008cefe048) +thrown [./open/src/hotspot/share/classfile/systemDictionary.cpp, line 295] +Event: 1985.382 Thread 0x000002250f7ad3b0 Exception (0x000000008cd8d1a0) +thrown [./open/src/hotspot/share/classfile/systemDictionary.cpp, line 295] +Event: 3580.488 Thread 0x000002257c546460 Exception (0x000000008edaf398) +thrown [./open/src/hotspot/share/prims/jni.cpp, line 578] +Event: 5368.631 Thread 0x000002257a461050 Exception (0x000000008ed82a20) +thrown [./open/src/hotspot/share/prims/jni.cpp, line 578] +Event: 5399.027 Thread 0x000002257a4646d0 Exception (0x000000008c1018d0) +thrown [./open/src/hotspot/share/prims/jni.cpp, line 599] + +Events (20 events): +Event: 6724.058 Executing VM operation: G1CollectForAllocation +Event: 6724.310 Executing VM operation: G1CollectForAllocation done +Event: 6888.343 Thread 0x000002250f7aca10 Thread exited: 0x000002250f7aca10 +Event: 6892.528 Executing VM operation: G1CollectForAllocation +Event: 6919.698 Executing VM operation: G1CollectForAllocation done +Event: 6919.738 Executing VM operation: HandshakeAllThreads +Event: 6920.191 Executing VM operation: HandshakeAllThreads done +Event: 6973.947 Executing VM operation: G1CollectForAllocation +Event: 7028.276 Executing VM operation: G1CollectForAllocation done +Event: 7028.310 Executing VM operation: HandshakeAllThreads +Event: 7030.417 Executing VM operation: HandshakeAllThreads done +Event: 7035.662 Thread 0x000002257aed8660 Thread exited: 0x000002257aed8660 +Event: 7083.953 Executing VM operation: G1CollectForAllocation +Event: 7087.733 Executing VM operation: G1CollectForAllocation done +Event: 7100.593 Executing VM operation: G1CollectForAllocation +Event: 7101.953 Executing VM operation: G1CollectForAllocation done +Event: 7115.017 Executing VM operation: G1CollectForAllocation +Event: 7120.743 Executing VM operation: G1CollectForAllocation done +Event: 7134.573 Executing VM operation: G1CollectForAllocation +Event: 7172.257 Thread 0x00000225798d3150 Thread added: 0x00000225798d3150 + + +Dynamic libraries: +0x00007ff67fa40000 - 0x00007ff67fa4d000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\javaw.exe +0x00007ffd21630000 - 0x00007ffd21828000 C:\Windows\SYSTEM32\ntdll.dll +0x00007ffd20cf0000 - 0x00007ffd20dad000 C:\Windows\System32\KERNEL32.DLL +0x00007ffd1ef80000 - 0x00007ffd1f24e000 C:\Windows\System32\KERNELBASE.dll +0x00007ffd1f250000 - 0x00007ffd1f350000 C:\Windows\System32\ucrtbase.dll +0x00007ffd17600000 - 0x00007ffd17619000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\VCRUNTIME140.dll +0x00007ffcfb0e0000 - 0x00007ffcfb0f8000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\jli.dll +0x00007ffd207f0000 - 0x00007ffd20990000 C:\Windows\System32\USER32.dll +0x00007ffd1f3f0000 - 0x00007ffd1f412000 C:\Windows\System32\win32u.dll +0x00007ffcff210000 - 0x00007ffcff4aa000 C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.1110_none_60b5254171f9507e\COMCTL32.dll +0x00007ffd20080000 - 0x00007ffd200aa000 C:\Windows\System32\GDI32.dll +0x00007ffd21270000 - 0x00007ffd2130e000 C:\Windows\System32\msvcrt.dll +0x00007ffd1f420000 - 0x00007ffd1f52b000 C:\Windows\System32\gdi32full.dll +0x00007ffd1f350000 - 0x00007ffd1f3ed000 C:\Windows\System32\msvcp_win.dll +0x00007ffd20050000 - 0x00007ffd20080000 C:\Windows\System32\IMM32.DLL +0x00007ffd175f0000 - 0x00007ffd175fc000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\vcruntime140_1.dll +0x00007ffd01db0000 - 0x00007ffd01e41000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\msvcp140.dll +0x00007ffc94a10000 - 0x00007ffc9556e000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\server\jvm.dll +0x00007ffd21540000 - 0x00007ffd215ee000 C:\Windows\System32\ADVAPI32.dll +0x00007ffd20c50000 - 0x00007ffd20cec000 C:\Windows\System32\sechost.dll +0x00007ffd213f0000 - 0x00007ffd21515000 C:\Windows\System32\RPCRT4.dll +0x00007ffd200b0000 - 0x00007ffd200b8000 C:\Windows\System32\PSAPI.DLL +0x00007ffcfe4f0000 - 0x00007ffcfe517000 C:\Windows\SYSTEM32\WINMM.dll +0x00007ffd18d50000 - 0x00007ffd18d5a000 C:\Windows\SYSTEM32\VERSION.dll +0x00007ffcfeea0000 - 0x00007ffcfeea9000 C:\Windows\SYSTEM32\WSOCK32.dll +0x00007ffd21370000 - 0x00007ffd213db000 C:\Windows\System32\WS2_32.dll +0x00007ffd1d550000 - 0x00007ffd1d562000 C:\Windows\SYSTEM32\kernel.appcore.dll +0x00007ffd19760000 - 0x00007ffd1976a000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\jimage.dll +0x00007ffd1cac0000 - 0x00007ffd1cca4000 C:\Windows\SYSTEM32\DBGHELP.DLL +0x00007ffd02ee0000 - 0x00007ffd02f0c000 C:\Windows\SYSTEM32\dbgcore.DLL +0x00007ffd1eec0000 - 0x00007ffd1ef42000 C:\Windows\System32\bcryptPrimitives.dll +0x00007ffcf86a0000 - 0x00007ffcf86c5000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\java.dll +0x00007ffcf8680000 - 0x00007ffcf8698000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\zip.dll +0x00007ffd1f770000 - 0x00007ffd1feb3000 C:\Windows\System32\SHELL32.dll +0x00007ffd1cda0000 - 0x00007ffd1d535000 C:\Windows\SYSTEM32\windows.storage.dll +0x00007ffd20f10000 - 0x00007ffd21264000 C:\Windows\System32\combase.dll +0x00007ffd1e750000 - 0x00007ffd1e780000 C:\Windows\SYSTEM32\Wldp.dll +0x00007ffd20b40000 - 0x00007ffd20bed000 C:\Windows\System32\SHCORE.dll +0x00007ffd201e0000 - 0x00007ffd20235000 C:\Windows\System32\shlwapi.dll +0x00007ffd1ec90000 - 0x00007ffd1ecaf000 C:\Windows\SYSTEM32\profapi.dll +0x00007ffcf8660000 - 0x00007ffcf8679000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\net.dll +0x00007ffd16de0000 - 0x00007ffd16eea000 C:\Windows\SYSTEM32\WINHTTP.dll +0x00007ffd1e4b0000 - 0x00007ffd1e51a000 C:\Windows\system32\mswsock.dll +0x00007ffcd7b20000 - 0x00007ffcd7b32000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\nio.dll +0x00007ffcdbaa0000 - 0x00007ffcdbaa9000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\management.dll +0x00007ffcd79d0000 - 0x00007ffcd79db000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\management_ext.dll +0x00007ffcfedd0000 - 0x00007ffcfede7000 C:\Windows\system32\napinsp.dll +0x00007ffcfedb0000 - 0x00007ffcfedcb000 C:\Windows\system32\pnrpnsp.dll +0x00007ffd19410000 - 0x00007ffd19425000 C:\Windows\system32\wshbth.dll +0x00007ffd18010000 - 0x00007ffd1802d000 C:\Windows\system32\NLAapi.dll +0x00007ffd1e170000 - 0x00007ffd1e1ab000 C:\Windows\SYSTEM32\IPHLPAPI.DLL +0x00007ffd1e1b0000 - 0x00007ffd1e27a000 C:\Windows\SYSTEM32\DNSAPI.dll +0x00007ffd213e0000 - 0x00007ffd213e8000 C:\Windows\System32\NSI.dll +0x00007ffcfed90000 - 0x00007ffcfeda2000 C:\Windows\System32\winrnr.dll +0x00007ffd01720000 - 0x00007ffd0172a000 C:\Windows\System32\rasadhlp.dll +0x00007ffd06860000 - 0x00007ffd068e0000 C:\Windows\System32\fwpuclnt.dll +0x00007ffd1ef50000 - 0x00007ffd1ef77000 C:\Windows\System32\bcrypt.dll +0x00007ffd1e690000 - 0x00007ffd1e6a8000 C:\Windows\SYSTEM32\CRYPTSP.dll +0x00007ffd1dde0000 - 0x00007ffd1de14000 C:\Windows\system32\rsaenh.dll +0x00007ffd1ec10000 - 0x00007ffd1ec3e000 C:\Windows\SYSTEM32\USERENV.dll +0x00007ffd1e650000 - 0x00007ffd1e65c000 C:\Windows\SYSTEM32\CRYPTBASE.dll +0x00007ffd17450000 - 0x00007ffd17467000 C:\Windows\SYSTEM32\dhcpcsvc6.DLL +0x00007ffd17bf0000 - 0x00007ffd17c0d000 C:\Windows\SYSTEM32\dhcpcsvc.DLL +0x00007ffd15e50000 - 0x00007ffd15e60000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\verify.dll +0x00007ffcfb0d0000 - 0x00007ffcfb0dd000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\sunmscapi.dll +0x00007ffd1f530000 - 0x00007ffd1f686000 C:\Windows\System32\CRYPT32.dll +0x00007ffd1e820000 - 0x00007ffd1e847000 C:\Windows\SYSTEM32\ncrypt.dll +0x00007ffd1e7e0000 - 0x00007ffd1e81b000 C:\Windows\SYSTEM32\NTASN1.dll + +dbghelp: loaded successfully - version: 4.0.5 - missing functions: none +symbol engine: initialized successfully - sym options: 0x614 - pdb path: .;C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin;C:\Windows\SYSTEM32;C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.1110_none_60b5254171f9507e;C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\server + +VM Arguments: +jvm_args: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=52447 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost -Dspring.jmx.enabled=true -Dspring.application.admin.enabled=true -XX:TieredStopAtLevel=1 -Dspring.boot.project.name=backend -Dfile.encoding=UTF-8 -XX:+ShowCodeDetailsInExceptionMessages +java_command: com.realnet.RealNetApp --spring.output.ansi.enabled=always +java_class_path (initial): G:\foldername\backend\target\classes;C:\Users\hp\.m2\repository\org\springframework\boot\spring-boot-starter-mail\2.2.5.RELEASE\spring-boot-starter-mail-2.2.5.RELEASE.jar;C:\Users\hp\.m2\repository\org\springframework\boot\spring-boot-starter\2.2.5.RELEASE\spring-boot-starter-2.2.5.RELEASE.jar;C:\Users\hp\.m2\repository\org\springframework\boot\spring-boot-starter-logging\2.2.5.RELEASE\spring-boot-starter-logging-2.2.5.RELEASE.jar;C:\Users\hp\.m2\repository\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;C:\Users\hp\.m2\repository\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;C:\Users\hp\.m2\repository\org\apache\logging\log4j\log4j-to-slf4j\2.12.1\log4j-to-slf4j-2.12.1.jar;C:\Users\hp\.m2\repository\org\apache\logging\log4j\log4j-api\2.12.1\log4j-api-2.12.1.jar;C:\Users\hp\.m2\repository\org\slf4j\jul-to-slf4j\1.7.30\jul-to-slf4j-1.7.30.jar;C:\Users\hp\.m2\repository\org\yaml\snakeyaml\1.25\snakeyaml-1.25.jar;C:\Users\hp\.m2\repository\org\springframework\spring-context-support\5.2.4.RELEASE\spring-context-support-5.2.4.RELEASE.jar;C:\Users\hp\.m2\repository\org\springframework\spring-context\5.2.4.RELEASE\spring-context-5.2.4.RELEASE.jar;C:\Users\hp\.m2\repository\com\sun\mail\jakarta.mail\1.6.4\jakarta.mail-1.6.4.jar;C:\Users\hp\.m2\repository\com\sun\activation\jakarta.activation\1.2.2\jakarta.activation-1.2.2.jar;C:\Users\hp\.m2\repository\org\springframework\boot\spring-boot-starter-web\2.2.5.RELEASE\spring-boot-starter-web-2.2.5.RELEASE.jar;C:\Users\hp\.m2\repository\org\springframework\boot\spring-boot-starter-json\2.2.5.RELEASE\spring-boot-starter-json-2.2.5.RELEASE.jar;C:\Users\hp\.m2\repository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.10.2\jackson-datatype-jdk8-2.10.2.jar;C:\Users\hp\.m2\repository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.10.2\jackson-module-parameter-names-2.10.2.jar;C:\Users\hp\.m2\repository\org\springframework\spring-web\5.2.4.RELEASE\spring-web- +Launcher Type: SUN_STANDARD + +[Global flags] + intx CICompilerCount = 4 {product} {ergonomic} + uint ConcGCThreads = 2 {product} {ergonomic} + uint G1ConcRefinementThreads = 8 {product} {ergonomic} + size_t G1HeapRegionSize = 1048576 {product} {ergonomic} + uintx GCDrainStackTargetSize = 64 {product} {ergonomic} + size_t InitialHeapSize = 132120576 {product} {ergonomic} + bool ManagementServer = true {product} {command line} + size_t MarkStackSize = 4194304 {product} {ergonomic} + size_t MaxHeapSize = 2097152000 {product} {ergonomic} + size_t MaxNewSize = 1258291200 {product} {ergonomic} + size_t MinHeapDeltaBytes = 1048576 {product} {ergonomic} + size_t MinHeapSize = 8388608 {product} {ergonomic} + uintx NonNMethodCodeHeapSize = 7549744 {pd product} {ergonomic} + uintx NonProfiledCodeHeapSize = 244108496 {pd product} {ergonomic} + uintx ProfiledCodeHeapSize = 0 {pd product} {ergonomic} + uintx ReservedCodeCacheSize = 251658240 {pd product} {ergonomic} + bool SegmentedCodeCache = true {product} {ergonomic} + bool ShowCodeDetailsInExceptionMessages = true {manageable} {command line} + size_t SoftMaxHeapSize = 2097152000 {manageable} {ergonomic} + intx TieredStopAtLevel = 1 {product} {command line} + bool UseCompressedClassPointers = true {lp64_product} {ergonomic} + bool UseCompressedOops = true {lp64_product} {ergonomic} + bool UseG1GC = true {product} {ergonomic} + bool UseLargePagesIndividualAllocation = false {pd product} {ergonomic} + +Logging: +Log output configuration: + #0: stdout all=warning uptime,level,tags + #1: stderr all=off uptime,level,tags + +Environment Variables: +JAVA_HOME=F:\Java +PATH=C:/Users/hp/Downloads/sts-4.10.0.RELEASE//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955/jre/bin/server;C:/Users/hp/Downloads/sts-4.10.0.RELEASE//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955/jre/bin;C:\Program Files\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Program Files\dotnet\;C:\ProgramData\chocolatey\bin;C:\Users\hp\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Program Files\nodejs\;C:\Program Files\MySQL\MySQL Shell 8.0\bin\;C:\Python39\Scripts\;C:\Python39\;C:\Users\hp\AppData\Local\Programs\Python\Python39\Scripts\;C:\Users\hp\AppData\Local\Programs\Python\Python39\;C:\Users\hp\AppData\Local\Microsoft\WindowsApps;C:\Users\hp\.dotnet\tools;C:\Users\hp\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Users\hp\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\hp\AppData\Local\GitHubDesktop\bin;F:\Java\bin;F:\Java\bin;C:\Program Files\MongoDB\Server\4.4\bin;C:\Users\hp\AppData\Roaming\npm;C:\Users\hp\Downloads\sts-4.10.0.RELEASE; +USERNAME=hp +OS=Windows_NT +PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 142 Stepping 12, GenuineIntel + + + +--------------- S Y S T E M --------------- + +OS: + Windows 10 , 64 bit Build 19041 (10.0.19041.1889) +OS uptime: 0 days 3:07 hours +HyperV virtualization detected + +CPU: total 8 (initial active 8) (4 cores per cpu, 2 threads per core) family 6 model 142 stepping 12 microcode 0xde, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, vzeroupper, avx, avx2, aes, clmul, erms, 3dnowpref, lzcnt, ht, tsc, tscinvbit, bmi1, bmi2, adx, fma, clflush, clflushopt + +Memory: 4k page, system-wide physical 7995M (594M free) +TotalPageFile size 28028M (AvailPageFile size 1M) +current process WorkingSet (physical memory assigned to process): 35M, peak: 467M +current process commit charge ("private bytes"): 521M, peak: 768M + +vm_info: OpenJDK 64-Bit Server VM (15.0.2+7-27) for windows-amd64 JRE (15.0.2+7-27), built on Dec 7 2020 20:02:38 by "mach5one" with unknown MS VC++:1925 + +END. diff --git a/prod116rb-back-b/authsec_springboot/backend/logs/ExceptionLogs/Error.log b/prod116rb-back-b/authsec_springboot/backend/logs/ExceptionLogs/Error.log new file mode 100644 index 0000000..256a545 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/logs/ExceptionLogs/Error.log @@ -0,0 +1,45 @@ +2023-04-07T15:38:10.368+0530 ERROR Login Failed No value present +2023-04-14T12:20:09.761+0530 ERROR Login Failed No value present +2023-04-14T12:40:11.030+0530 ERROR Login Failed No value present +2023-04-14T12:43:04.245+0530 ERROR Login Failed No value present +2023-04-14T12:43:18.179+0530 ERROR Login Failed No value present +2023-04-14T12:47:15.982+0530 ERROR Login Failed No value present +2023-04-14T12:47:47.907+0530 ERROR Login Failed No value present +2023-04-14T12:49:20.899+0530 ERROR Login Failed No value present +2023-04-14T12:49:39.712+0530 ERROR Login Failed No value present +2023-04-14T12:49:54.172+0530 ERROR Login Failed No value present +2023-04-14T12:49:56.507+0530 ERROR Login Failed No value present +2023-04-14T12:49:59.471+0530 ERROR Login Failed No value present +2023-04-14T13:06:48.375+0530 ERROR Login Failed No value present +2023-04-14T14:17:17.959+0530 ERROR Login Failed No value present +2023-04-14T14:19:17.702+0530 ERROR Login Failed No value present +2023-04-14T14:24:27.427+0530 ERROR Login Failed No value present +2023-04-14T14:24:34.106+0530 ERROR Login Failed No value present +2023-04-14T14:24:59.329+0530 ERROR Login Failed No value present +2023-04-14T15:45:42.775+0530 ERROR Login Failed No value present +2023-04-14T18:27:38.701+0530 ERROR Login Failed Bad credentials +2023-09-29T12:37:11.138+0530 ERROR Login Failed Bad credentials +2023-09-29T23:54:39.748+0530 ERROR Login Failed Bad credentials +2023-10-21T16:34:16.901+0530 ERROR Authentication Failed. Username or Password not valid. +2023-10-21T16:34:16.905+0530 ERROR Authentication Failed. Username or Password not valid. +2023-10-21T16:34:17.029+0530 ERROR Authentication Failed. Username or Password not valid. +2023-10-21T16:34:17.029+0530 ERROR Authentication Failed. Username or Password not valid. +2023-10-21T16:34:17.029+0530 ERROR Authentication Failed. Username or Password not valid. +2023-10-21T16:34:17.046+0530 ERROR Authentication Failed. Username or Password not valid. +2023-10-21T16:34:46.579+0530 ERROR Authentication Failed. Username or Password not valid. +2023-11-03T10:51:17.798+0530 ERROR Login Failed Bad credentials +2023-11-03T12:48:05.904+0530 ERROR Login Failed Error creating bean with name 'inMemoryDatabaseShutdownExecutor': Singleton bean creation not allowed while singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!) +2023-11-20T19:33:52.278+0530 ERROR Login Failed Bad credentials +2023-11-29T12:24:44.472+0530 ERROR Login Failed Bad credentials +2023-11-30T10:02:24.935+0530 ERROR Login Failed Bad credentials +2023-12-02T17:12:48.378+0530 ERROR Login Failed Bad credentials +2023-12-02T17:19:07.149+0530 ERROR Login Failed Bad credentials +2023-12-04T19:36:38.738+0530 ERROR Login Failed No value present +2023-12-04T19:36:48.189+0530 ERROR Login Failed No value present +2023-12-04T23:47:26.784+0530 ERROR Login Failed Bad credentials +2023-12-04T23:53:25.084+0530 ERROR Login Failed Bad credentials +2023-12-20T22:55:47.256+0530 ERROR Login Failed Unable to acquire JDBC Connection; nested exception is org.hibernate.exception.JDBCConnectionException: Unable to acquire JDBC Connection +2023-12-20T22:55:47.257+0530 ERROR Login Failed Unable to acquire JDBC Connection; nested exception is org.hibernate.exception.JDBCConnectionException: Unable to acquire JDBC Connection +2023-12-29T17:03:49.832+0530 ERROR Authentication Failed. Username or Password not valid. +2023-12-29T17:03:49.833+0530 ERROR Authentication Failed. Username or Password not valid. +2023-12-29T23:27:43.701+0530 ERROR Authentication Failed. Username or Password not valid. diff --git a/prod116rb-back-b/authsec_springboot/backend/logs/SYSADMIN1673073474.log b/prod116rb-back-b/authsec_springboot/backend/logs/SYSADMIN1673073474.log new file mode 100644 index 0000000..e69de29 diff --git a/prod116rb-back-b/authsec_springboot/backend/logs/sysadmin1686312560.log b/prod116rb-back-b/authsec_springboot/backend/logs/sysadmin1686312560.log new file mode 100644 index 0000000..e69de29 diff --git a/prod116rb-back-b/authsec_springboot/backend/pom.xml b/prod116rb-back-b/authsec_springboot/backend/pom.xml new file mode 100644 index 0000000..16214a9 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/pom.xml @@ -0,0 +1,549 @@ + + 4.0.0 + com.realnet + app + jar + 1.0.0 + REAL IT SOLUTIONS + + 2.7.0 + UTF-8 + UTF-8 + 1.8 + + + org.springframework.boot + spring-boot-starter-parent + 2.2.5.RELEASE + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + org.springframework.boot + spring-boot-starter-mail + + + org.springframework.boot + spring-boot-starter-web + + + + org.springframework.boot + spring-boot-starter-aop + + + org.springframework.boot + spring-boot-starter-tomcat + provided + + + org.springframework.boot + spring-boot-starter-actuator + + + + io.springfox + springfox-swagger2 + 2.9.2 + + + io.swagger + swagger-annotations + + + io.swagger + swagger-models + + + + + org.apache.commons + commons-lang3 + 3.12.0 + + + com.googlecode.json-simple + json-simple + 1.1.1 + + + com.google.code.gson + gson + 2.8.5 + + + io.swagger + swagger-annotations + 1.5.22 + + + io.swagger + swagger-models + 1.5.22 + + + io.springfox + springfox-swagger-ui + 2.9.2 + + + + org.apache.pdfbox + pdfbox + 2.0.29 + + + + + + + + + + + mysql + mysql-connector-java + 8.0.28 + + + + org.springframework.boot + spring-boot-starter-security + + + org.springframework.boot + spring-boot-starter-data-jpa + + + org.springframework.boot + spring-boot-starter-validation + + + org.apache.poi + poi-ooxml + 4.1.2 + + + + org.apache.poi + poi-ooxml + 3.8-beta4 + + + org.apache.poi + poi-scratchpad + 3.9 + + + + + + org.apache.poi + poi + 4.1.2 + + + org.apache.poi + poi-ooxml + 4.1.2 + + + + + + org.springframework.boot + spring-boot-starter-jdbc + + + org.postgresql + postgresql + runtime + + + org.xerial + sqlite-jdbc + 3.25.2 + + + com.microsoft.sqlserver + mssql-jdbc + runtime + + + + org.springframework.boot + spring-boot-starter-websocket + + + org.springframework + spring-messaging + + + + org.springframework.boot + spring-boot-starter-cache + + + com.github.ben-manes.caffeine + caffeine + + + + com.h2database + h2 + runtime + + + org.slf4j + slf4j-api + + + + + org.springframework.security.oauth.boot + spring-security-oauth2-autoconfigure + 2.3.3.RELEASE + + + + org.springframework.security + spring-security-oauth2-client + + + org.springframework.social + spring-social-google + 1.0.0.RELEASE + + + org.springframework.social + spring-social-linkedin + 1.0.2.RELEASE + + + + + io.jsonwebtoken + jjwt + 0.9.0 + + + com.google.guava + guava + 23.5-jre + + + joda-time + joda-time + 2.9.9 + + + + + + + + com.fasterxml.jackson.core + jackson-core + 2.12.1 + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + org.modelmapper + modelmapper + 2.3.0 + + + org.codehaus.jackson + jackson-mapper-asl + 1.9.13 + + + commons-io + commons-io + 2.7 + + + + net.lingala.zip4j + zip4j + 2.6.1 + + + org.json + json + 20171018 + + + org.projectlombok + lombok + 1.18.20 + provided + + + javax.xml.bind + jaxb-api + 2.3.0 + + + org.springframework.boot + spring-boot-devtools + + + + org.apache.httpcomponents + httpclient + 4.5.13 + + + + + org.apache.clerezza.ext + org.json.simple + 0.4 + + + commons-codec + commons-codec + 1.10 + + + org.springframework.boot + spring-boot-starter-webflux + + + + + org.apache.poi + poi + 4.1.2 + + + + org.apache.poi + ooxml-schemas + 1.4 + + + + org.json + json + 20201115 + + + com.jcraft + jsch + 0.1.55 + + + org.json + json + 20201115 + + + + org.json + json + 20201115 + + + + com.twilio.sdk + twilio + 8.18.0 + + + + org.xhtmlrenderer + flying-saucer-pdf + 9.1.22 + + + + + com.lowagie + itext + 2.1.7 + + + + + + org.seleniumhq.selenium + selenium-java + 3.141.59 + + + + + com.itextpdf + itextpdf + 5.5.13.2 + + + + + org.postgresql + postgresql + 42.2.24 + + + + + org.mariadb.jdbc + mariadb-java-client + 3.1.2 + + + + + com.ibm.db2 + jcc + 11.5.5.0 + + + + + + redis.clients + jedis + 3.7.0 + + + + + + + + + + org.firebirdsql.jdbc + jaybird + 4.0.0.java11 + + + + + + + com.orientechnologies + orientdb-core + 3.2.19 + + + + + com.orientechnologies + orientdb-jdbc + 3.2.19 + + + + + software.amazon.awssdk + dynamodb + 2.17.102 + + + + + com.couchbase.client + java-client + 3.1.5 + + + io.projectreactor + reactor-core + 3.4.13 + + + + + org.neo4j + neo4j-jdbc-bolt + 5.0.0 + + + + + com.paytm.pg + paytm-checksum + 1.2.1 + + + + com.razorpay + razorpay-java + 1.4.4 + + + + + org.jsoup + jsoup + 1.14.3 + + + + org.springframework + spring-test + + + + + org.apache.pdfbox + pdfbox + 2.0.28 + + + + + org.apache.xmlgraphics + fop + 2.6 + + + + org.apache.commons + commons-csv + 1.4 + + + + + com.googlecode.json-simple + json-simple + 1.1.1 + + + + com.opencsv + opencsv + 5.5 + + + + diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Api/Controllers/BillingSequentialApi.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Api/Controllers/BillingSequentialApi.java new file mode 100644 index 0000000..d5237e5 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Api/Controllers/BillingSequentialApi.java @@ -0,0 +1,304 @@ +//package com.realnet.Billing.Api.Controllers; +// +//import java.util.HashMap; +//import java.util.List; +//import java.util.Map.Entry; +//import java.util.Optional; +//import java.util.Set; +// +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.beans.factory.annotation.Value; +//import org.springframework.http.HttpStatus; +//import org.springframework.http.ResponseEntity; +//import org.springframework.web.bind.annotation.GetMapping; +//import org.springframework.web.bind.annotation.RestController; +//import org.springframework.web.client.RestTemplate; +// +//import com.fasterxml.jackson.databind.ObjectMapper; +//import com.google.gson.JsonArray; +//import com.google.gson.JsonElement; +//import com.google.gson.JsonObject; +//import com.google.gson.JsonParser; +//import com.realnet.Billing.Entitys.ServiceOrder_t; +//import com.realnet.Billing.Repositorys.ServiceOrder_Repository; +//import com.realnet.Billing.Services.ServiceOrder_Service; +//import com.realnet.Communication.Models.Com_jobTable; +//import com.realnet.Communication.Repos.JobTablerepo; +//import com.realnet.Customer_master.Entity.Customer_master_t; +//import com.realnet.Customer_master.Repository.Customer_master_Repository; +//import com.realnet.DocumentBuilder.Entity.DocumentBuilder_t; +//import com.realnet.DocumentBuilder.Entity.Document_builder_lines; +//import com.realnet.DocumentBuilder.Services.DocumentBuilder_Service; +//import com.realnet.DocumentBuilder.Services.StringReplacementService; +// +//@RestController +// +//public class BillingSequentialApi { +// +// @Autowired +// private ServiceOrder_Repository serviceOrder_Repository; +// +// @Autowired +// private DocumentBuilder_Service Service; +// +//// @Autowired +//// private Fileupload_helper fileuploadhelper; +// +// @Autowired +// private StringReplacementService replacementService; +// +// @Autowired +// private Customer_master_Repository customer_master_Repository; +// +// @Autowired +// private JobTablerepo Com_jobTablerepo; +// +// @Value("${projectPath}") +// private String projectPath; +// +// public final String UPLOAD_DIREC = "/Files"; +// +// @Autowired +// private ServiceOrder_Service serviceOrder_Service; +// +// @GetMapping("/process-all-customers") +// public ResponseEntity processAllCustomers() { +// try { +// // Step 1: Create Service Orders for all customers +// List customers = customer_master_Repository.findAll(); +// for (Customer_master_t customer : customers) { +// serviceOrder_Service.createServiceOrderFromCustomer(customer); +// +// } +// +// // Step 2: Approve all pending service orders +// int updatedCount = serviceOrder_Service.approvePendingOrders(); +// +// // step 3: +// +// List autoApprovedServiceOrderIds = serviceOrder_Repository.findIdsByStatusOrderByAsc("AutoApproved"); +// +// // Process the service orders +// for (Long serviceOrderId : autoApprovedServiceOrderIds) { +// Optional serviceOrderOptional = serviceOrder_Repository.findById(serviceOrderId); +// +// if (serviceOrderOptional.isPresent()) { +// ServiceOrder_t serviceOrder = serviceOrderOptional.get(); +// String entityName = serviceOrder.getEntity(); +// +// // Fetch the corresponding customer(s) by entity name +// List customers1 = customer_master_Repository.findByEntityName(entityName); +// +// if (!customers1.isEmpty()) { +// // Assuming you want to process each customer found +// for (Customer_master_t customer : customers1) { +// // Now you have the serviceOrderId, entityName, and customer for processing +// String proformaInvoiceFileName = generateProformaInvoice(serviceOrderId); +// +// // step 4 +// sendEmailWithProformaInvoice(customer, proformaInvoiceFileName); +// } +// } else { +// // Handle the case where no customer was found for the given entity name +// } +// } else { +// // Handle the case where no service order was found for the given ID +// } +// } +// +// return ResponseEntity.ok("Processed all customers and generated invoices. " + updatedCount +// + " service orders were approved."); +// } catch (Exception e) { +// // Handle exceptions appropriately +// return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR) +// .body("Error processing customers: " + e.getMessage()); +// } +// } +// +// private String generateProformaInvoice(Long serviceOrderId) throws Exception { +// +// long documentId = 98; +// HashMap map = new HashMap<>(); +// JsonParser parser = new JsonParser(); +// DocumentBuilder_t doc = Service.getdetailsbyId(documentId); +// String file_name = doc.getFile_name(); +// String file_path = doc.getFile_path(); +// +// String replacerule = ""; +// String operation = null; +// String replaceWith = null; +// String startstring = null; +// String endstring = null; +// String keyword = null; +// String linestring = null; +// String cellAddress = null; +// JsonObject getbodyobject = null; +// String ModifyfileName = null; +// +// // .....................// +// +// List docline = doc.getDocument_builder_lines(); +// +// for (Document_builder_lines line : docline) { +// String model = line.getModel(); +// JsonParser parser1 = new JsonParser(); +// JsonArray jsonArray = parser1.parse(model).getAsJsonArray(); +// +// for (JsonElement element : jsonArray) { +// JsonObject jsonObject = element.getAsJsonObject(); +// if (jsonObject.has("name")) { +// ModifyfileName = jsonObject.get("name").getAsString(); +// break; // Break the loop once you find the first object with a "name" field +// } +// } +// +// if (ModifyfileName != null) { +// // Now 'nameValue' contains the value of the "name" field +// System.out.println("nameValue: " + ModifyfileName); +// break; // Break the outer loop as well, if needed +// } +// } +// +// if (ModifyfileName == null) { +// // Handle the case where no object with a "name" field was found +// System.out.println("No object with a 'name' field found."); +// } +// +// // long serviceOrderId = serviceOrderId2.getId(); +// ModifyfileName = ModifyfileName.replace("?", String.valueOf(serviceOrderId)); +// ModifyfileName = ModifyfileName + ".docx"; +// String newFilepath = replacementService.copyWordFile(file_path, file_name, file_path, ModifyfileName); +// +// // ..........................// +// +// List lines = doc.getDocument_builder_lines(); +// +// for (Document_builder_lines line : lines) { +// String model = line.getModel(); +// JsonElement element = parser.parse(model); +// JsonArray models = element.getAsJsonArray(); +// +// for (JsonElement mod : models) { +// JsonObject object = mod.getAsJsonObject(); +// +// String type = object.get("type").getAsString(); +// if (type.equalsIgnoreCase("Initialize")) { +// String a_uri = object.get("a_uri").toString().replaceAll("\"", ""); +// a_uri = a_uri.replace("?", String.valueOf(serviceOrderId)); +// System.out.println(a_uri); +// +// Object body = GET(a_uri).getBody(); +// ObjectMapper objectMapper = new ObjectMapper(); +// String json = objectMapper.writeValueAsString(body); +// JsonElement getbody = parser.parse(json); +// getbodyobject = getbody.getAsJsonObject(); +// +// } +// } +// +// for (JsonElement mod : models) { +// JsonObject object = mod.getAsJsonObject(); +// +// String type = object.get("type").getAsString(); +// if (type.equalsIgnoreCase("Mapper")) { +// String mapper = object.get("mappers").getAsString(); +// +// JsonElement parse = parser.parse(mapper); +// JsonArray mapArray = parse.getAsJsonArray(); +// for (JsonElement maps : mapArray) { +// JsonObject jsonObject = maps.getAsJsonObject(); +// startstring = jsonObject.get("start_string").toString().replaceAll("\"", ""); +// endstring = jsonObject.get("end_string").toString().replaceAll("\"", ""); +// replaceWith = jsonObject.get("replace_with").toString().replaceAll("\"", ""); +// keyword = jsonObject.get("Keyword").toString().replaceAll("\"", ""); +// linestring = jsonObject.get("line_string").toString().replaceAll("\"", ""); +// operation = jsonObject.get("operation").toString().replaceAll("\"", ""); +// cellAddress = jsonObject.get("cellAddress").toString().replaceAll("\"", ""); +// Set> entrySet = getbodyobject.entrySet(); +// for (Entry entry : entrySet) { +// +// String key = entry.getKey().toString().replaceAll("\"", ""); +// String value = entry.getValue().toString().replaceAll("\"", ""); +// +// if (replaceWith.equalsIgnoreCase(key)) { +// replaceWith = value; +// break; +// } +// +// } +// +// if (operation.contains("replacebyfirstandlast")) { +// +// replacerule = replacementService.replacewithstartandend(file_path, file_name, startstring, +// endstring, replaceWith); +// +// } +// +// if (operation.contains("appending")) { +// replacerule = replacementService.appendToSlide(linestring, replaceWith, file_path, +// file_name); +// } +// +// if (operation.contains("linereplacement")) { +// replacerule = replacementService.linereplacementForPPT(file_path, file_name, keyword, +// replaceWith); +// } +// if (operation.contains("replacement")) { +// replacerule = replacementService.replacesting(newFilepath, file_name, keyword, replaceWith, +// ModifyfileName); +// +// } +// +// if (operation.contains("excelcellReplace")) { +// replacerule = replacementService.excelcellReplace(file_path, file_name, cellAddress, +// replaceWith); +// +// } +// +// } +// } +// +// } +// } +// +// return replacerule; +// +// } +// +// private void sendEmailWithProformaInvoice(Customer_master_t customer, String fileName) { +// +// Long id = customer.getId(); +// String email = customer.getEmail(); +// +// String gateway = "EMAIL"; +// String sendTo = email; +// String replacementString = "no"; +// String cc = email; +// String template = "PerfomaInvoice"; +// +// // Create a new Com_jobTable instance and set its values +// Com_jobTable comJobTable = new Com_jobTable(); +// comJobTable.setJob_type("EMAIL"); // Set the job type to "EMAIL" +// comJobTable.setSend_to(sendTo); +// comJobTable.setGatewayName(gateway); +// comJobTable.setAttachment(fileName); +// comJobTable.setGatewaydone("N"); +// comJobTable.setReplacement_string(replacementString); +// comJobTable.setCc(cc); +// comJobTable.setReplacement_string(replacementString); +// comJobTable.setTemplate_name(template); +// // Save the Com_jobTable entity using your repository or service +// Com_jobTablerepo.save(comJobTable); +// +// } +// +// public ResponseEntity GET(String get) { +// RestTemplate restTemplate = new RestTemplate(); +// +// ResponseEntity u = restTemplate.getForEntity(get, Object.class); +// +// return u; +// +// } +// +//} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Api/Controllers/ServiceOrderApiController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Api/Controllers/ServiceOrderApiController.java new file mode 100644 index 0000000..3d3a4d2 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Api/Controllers/ServiceOrderApiController.java @@ -0,0 +1,403 @@ +//package com.realnet.Billing.Api.Controllers; +// +//import java.io.ByteArrayOutputStream; +//import java.util.HashMap; +//import java.util.List; +//import java.util.Map.Entry; +//import java.util.Optional; +//import java.util.Set; +// +//import org.apache.poi.ss.usermodel.Row; +//import org.apache.poi.ss.usermodel.Sheet; +//import org.apache.poi.ss.usermodel.Workbook; +//import org.apache.poi.xssf.usermodel.XSSFWorkbook; +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.beans.factory.annotation.Value; +//import org.springframework.http.HttpHeaders; +//import org.springframework.http.HttpStatus; +//import org.springframework.http.MediaType; +//import org.springframework.http.ResponseEntity; +//import org.springframework.web.bind.annotation.GetMapping; +//import org.springframework.web.bind.annotation.PathVariable; +//import org.springframework.web.bind.annotation.PutMapping; +//import org.springframework.web.bind.annotation.RequestMapping; +//import org.springframework.web.bind.annotation.RestController; +//import org.springframework.web.client.RestTemplate; +// +//import com.fasterxml.jackson.databind.ObjectMapper; +//import com.google.gson.JsonArray; +//import com.google.gson.JsonElement; +//import com.google.gson.JsonObject; +//import com.google.gson.JsonParser; +//import com.realnet.Billing.Entitys.Invoice_t; +//import com.realnet.Billing.Entitys.ServiceOrder_t; +//import com.realnet.Billing.Repositorys.ServiceOrder_Repository; +//import com.realnet.Billing.Services.ServiceOrder_Service; +//import com.realnet.Communication.Models.Com_jobTable; +//import com.realnet.Communication.Repos.JobTablerepo; +//import com.realnet.Customer_master.Entity.Customer_master_t; +//import com.realnet.Customer_master.Repository.Customer_master_Repository; +//import com.realnet.DocumentBuilder.Entity.DocumentBuilder_t; +//import com.realnet.DocumentBuilder.Entity.Document_builder_lines; +//import com.realnet.DocumentBuilder.Services.DocumentBuilder_Service; +//import com.realnet.DocumentBuilder.Services.StringReplacementService; +//import com.realnet.fileupload.helper.Fileupload_helper; +// +//@RestController +//@RequestMapping("/api/serviceorders") +//public class ServiceOrderApiController { +// +// @Autowired +// private ServiceOrder_Service serviceOrder_Service; +// +// @Autowired +// private ServiceOrder_Repository serviceOrder_Repository; +// +// @Autowired +// private DocumentBuilder_Service Service; +// +// @Autowired +// private Fileupload_helper fileuploadhelper; +// +// @Autowired +// private StringReplacementService replacementService; +// +// @Autowired +// private Customer_master_Repository customer_master_Repository; +// +// @Autowired +// private JobTablerepo Com_jobTablerepo; +// +// @Value("${projectPath}") +// private String projectPath; +// +// public final String UPLOAD_DIREC = "/Files"; +// +// // based on the period autocomplete all pending status +// @GetMapping("/update-status") +// public ResponseEntity updateStatusForExpiredOrders() { +// int updatedCount = serviceOrder_Service.updateStatusForExpiredOrders(); +// return ResponseEntity.ok("Updated " + updatedCount + " orders"); +// } +// +// // download profoma invoice +// @GetMapping("/generate-excel/{id}") +// public ResponseEntity generateExcel(@PathVariable Long id) { +// ServiceOrder_t serviceOrder = serviceOrder_Service.findById(id); +// +// if (serviceOrder != null) { +// Workbook workbook = generateExcelForServiceOrder(serviceOrder); +// +// try { +// ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); +// workbook.write(outputStream); +// byte[] excelBytes = outputStream.toByteArray(); +// HttpHeaders headers = new HttpHeaders(); +// headers.setContentType(MediaType.APPLICATION_OCTET_STREAM); +// headers.setContentDispositionFormData("attachment", "service_order.xlsx"); +// return new ResponseEntity<>(excelBytes, headers, HttpStatus.OK); +// } catch (Exception e) { +// // Handle exceptions +// } +// } +// +// return ResponseEntity.notFound().build(); +// } +// +// public Workbook generateExcelForServiceOrder(ServiceOrder_t serviceOrder) { +// Workbook workbook = new XSSFWorkbook(); +// Sheet sheet = workbook.createSheet("Service Order"); +// +// // Create header row +// Row headerRow = sheet.createRow(0); +// headerRow.createCell(0).setCellValue("Service Order ID"); +// headerRow.createCell(1).setCellValue("Service Order Seq"); +// +// // Add more header cells for other fields as needed... +// +// // Create data row +// Row dataRow = sheet.createRow(1); +// dataRow.createCell(0).setCellValue(serviceOrder.getId()); +// dataRow.createCell(1).setCellValue(serviceOrder.getServiceOrderSeq()); +// // Add more data cells for other fields as needed... +// +// return workbook; +// } +// +// // to HOLD status +//// @PutMapping("/change-service-order-status/{profomaInvoiceId}") +//// public ResponseEntity changeServiceOrderStatus(@PathVariable Long profomaInvoiceId) { +//// // Fetch the ProfomaInvoice by ID +//// ProfomaInvoice profomaInvoice = profomaInvoice_Service.findById(profomaInvoiceId); +//// +//// if (profomaInvoice != null) { +//// // Get the associated ServiceOrderId from ProfomaInvoice +//// Long serviceOrderId = profomaInvoice.getServiceOrderId(); +//// +//// // Fetch the associated ServiceOrder_t entity +//// ServiceOrder_t serviceOrder = serviceOrder_Service.findById(serviceOrderId); +//// +//// if (serviceOrder != null) { +//// // Update the status to "HOLD" +//// serviceOrder.setStatus("HOLD"); +//// serviceOrder_Service.saveData(serviceOrder); +//// +//// return ResponseEntity.ok("ServiceOrder status updated to HOLD"); +//// } +//// } +//// +//// return ResponseEntity.notFound().build(); +//// } +// +// // Auto Creation Service order to invoicecopyServiceOrderToInvoice api +// @GetMapping("/copyServiceOrderToInvoice") +// public List copyServiceOrderToInvoice() { +// List createdInvoice = serviceOrder_Service.createInvoicesForAutoApprovedServiceOrders(); +// return createdInvoice; +// } +// +////document status HOLD api (custmer hold) (old history table crude insert record),,service order release then it release hold +// @PutMapping("/updateHoldstatus/{id}") +// public ResponseEntity updateStatusById(@PathVariable Long id) { +// try { +// // Hardcode the new status value to "HOLD" +// serviceOrder_Service.updateStatusById(id, "HOLD"); +// return ResponseEntity.ok("Status updated to HOLD successfully"); +// } catch (Exception e) { +// // Handle exceptions, e.g., if the entity with the given ID is not found +// return ResponseEntity.badRequest().body("Failed to update status: " + e.getMessage()); +// } +// } +// +////so release hold +// @PutMapping("/updateResolvestatus/{id}") +// public ResponseEntity updateStatusResolvedById(@PathVariable Long id) { +// try { +// +// serviceOrder_Service.updateStatusById(id, "RESOLVED"); +// return ResponseEntity.ok("Status updated to HOLD successfully"); +// } catch (Exception e) { +// // Handle exceptions, e.g., if the entity with the given ID is not found +// return ResponseEntity.badRequest().body("Failed to update status: " + e.getMessage()); +// } +// } +// +// @PutMapping("/updateCustomerApprovedestatus/{id}") +// public ResponseEntity updateStatusCustomerApprovedById(@PathVariable Long id) { +// try { +// +// serviceOrder_Service.updateStatusById(id, "CustomerApproved"); +// return ResponseEntity.ok("Status updated to Approvec successfully"); +// } catch (Exception e) { +// // Handle exceptions, e.g., if the entity with the given ID is not found +// return ResponseEntity.badRequest().body("Failed to update status: " + e.getMessage()); +// } +// } +// +// @GetMapping("/customerGenerate") +// public void generateServiceOrder() { +// serviceOrder_Service.generateServiceOrders(); +// } +// +// @GetMapping("/approvePending") +// public ResponseEntity approvePendingOrders() { +// int updatedCount = serviceOrder_Service.approvePendingOrders(); +// return ResponseEntity.ok("Approved " + updatedCount + " pending orders"); +// } +// +// @GetMapping("/perfomaInvoiceCreation/{serviceOrderId}") +// public ResponseEntity perfomaInvoiceCreation(@PathVariable long serviceOrderId) throws Exception { +// +// long documentId = 98; +// HashMap map = new HashMap<>(); +// JsonParser parser = new JsonParser(); +// DocumentBuilder_t doc = Service.getdetailsbyId(documentId); +// String file_name = doc.getFile_name(); +// String file_path = doc.getFile_path(); +// +// String replacerule = ""; +// String operation = null; +// String replaceWith = null; +// String startstring = null; +// String endstring = null; +// String keyword = null; +// String linestring = null; +// String cellAddress = null; +// JsonObject getbodyobject = null; +// String ModifyfileName = null; +// +// // .....................// +// +// List docline = doc.getDocument_builder_lines(); +// +// for (Document_builder_lines line : docline) { +// String model = line.getModel(); +// JsonParser parser1 = new JsonParser(); +// JsonArray jsonArray = parser1.parse(model).getAsJsonArray(); +// +// for (JsonElement element : jsonArray) { +// JsonObject jsonObject = element.getAsJsonObject(); +// if (jsonObject.has("name")) { +// ModifyfileName = jsonObject.get("name").getAsString(); +// break; // Break the loop once you find the first object with a "name" field +// } +// } +// +// if (ModifyfileName != null) { +// // Now 'nameValue' contains the value of the "name" field +// System.out.println("nameValue: " + ModifyfileName); +// break; // Break the outer loop as well, if needed +// } +// } +// +// if (ModifyfileName == null) { +// // Handle the case where no object with a "name" field was found +// System.out.println("No object with a 'name' field found."); +// } +// +// ModifyfileName = ModifyfileName.replace("?", String.valueOf(serviceOrderId)); +// ModifyfileName = ModifyfileName + ".docx"; +// String newFilepath = replacementService.copyWordFile(file_path, file_name, file_path, ModifyfileName); +// +// // ..........................// +// +// List lines = doc.getDocument_builder_lines(); +// +// for (Document_builder_lines line : lines) { +// String model = line.getModel(); +// JsonElement element = parser.parse(model); +// JsonArray models = element.getAsJsonArray(); +// +// for (JsonElement mod : models) { +// JsonObject object = mod.getAsJsonObject(); +// +// String type = object.get("type").getAsString(); +// if (type.equalsIgnoreCase("Initialize")) { +// String a_uri = object.get("a_uri").toString().replaceAll("\"", ""); +// a_uri = a_uri.replace("?", String.valueOf(serviceOrderId)); +// System.out.println(a_uri); +//// Object body = GET(a_uri).getBody(); +//// JsonElement getbody = parser.parse(body.toString()); +//// getbodyobject = getbody.getAsJsonObject(); +// Object body = GET(a_uri).getBody(); +// ObjectMapper objectMapper = new ObjectMapper(); +// String json = objectMapper.writeValueAsString(body); +// JsonElement getbody = parser.parse(json); +// getbodyobject = getbody.getAsJsonObject(); +// +// } +// } +// +// for (JsonElement mod : models) { +// JsonObject object = mod.getAsJsonObject(); +// +// String type = object.get("type").getAsString(); +// if (type.equalsIgnoreCase("Mapper")) { +// String mapper = object.get("mappers").getAsString(); +// +// JsonElement parse = parser.parse(mapper); +// JsonArray mapArray = parse.getAsJsonArray(); +// for (JsonElement maps : mapArray) { +// JsonObject jsonObject = maps.getAsJsonObject(); +// startstring = jsonObject.get("start_string").toString().replaceAll("\"", ""); +// endstring = jsonObject.get("end_string").toString().replaceAll("\"", ""); +// replaceWith = jsonObject.get("replace_with").toString().replaceAll("\"", ""); +// keyword = jsonObject.get("Keyword").toString().replaceAll("\"", ""); +// linestring = jsonObject.get("line_string").toString().replaceAll("\"", ""); +// operation = jsonObject.get("operation").toString().replaceAll("\"", ""); +// cellAddress = jsonObject.get("cellAddress").toString().replaceAll("\"", ""); +// Set> entrySet = getbodyobject.entrySet(); +// for (Entry entry : entrySet) { +// +// String key = entry.getKey().toString().replaceAll("\"", ""); +// String value = entry.getValue().toString().replaceAll("\"", ""); +// +// if (replaceWith.equalsIgnoreCase(key)) { +// replaceWith = value; +// break; +// } +// +// } +// +// if (operation.contains("replacebyfirstandlast")) { +// +// replacerule = replacementService.replacewithstartandend(file_path, file_name, startstring, +// endstring, replaceWith); +// +// } +// +// if (operation.contains("appending")) { +// replacerule = replacementService.appendToSlide(linestring, replaceWith, file_path, +// file_name); +// } +// +// if (operation.contains("linereplacement")) { +// replacerule = replacementService.linereplacementForPPT(file_path, file_name, keyword, +// replaceWith); +// } +// if (operation.contains("replacement")) { +// replacerule = replacementService.replacesting(newFilepath, file_name, keyword, replaceWith, +// ModifyfileName); +// +// } +// +// if (operation.contains("excelcellReplace")) { +// replacerule = replacementService.excelcellReplace(file_path, file_name, cellAddress, +// replaceWith); +// +// } +// +// } +// } +// +// } +// } +// +// return new ResponseEntity<>(replacerule, HttpStatus.CREATED); +// } +// +// @GetMapping("/sendEmail/{id}/{fileName}") +// public ResponseEntity sendEmail(@PathVariable Long id, @PathVariable String fileName) { +// +// Optional customer_master_t = customer_master_Repository.findById(id); +// +// String email = null; +// if (customer_master_t.isPresent()) { +// Customer_master_t customer = customer_master_t.get(); +// email = customer.getEmail(); +// +// } +// +// String gateway = "EMAIL"; +// String sendTo = email; +// String replacementString = "no"; +// String cc = email; +// String template = "PerfomaInvoice"; +// +// // Create a new Com_jobTable instance and set its values +// Com_jobTable comJobTable = new Com_jobTable(); +// comJobTable.setJob_type("EMAIL"); // Set the job type to "EMAIL" +// comJobTable.setSend_to(sendTo); +// comJobTable.setGatewayName(gateway); +// comJobTable.setAttachment(fileName); +// comJobTable.setGatewaydone("N"); +// comJobTable.setReplacement_string(replacementString); +// comJobTable.setCc(cc); +// comJobTable.setReplacement_string(replacementString); +// comJobTable.setTemplate_name(template); +// // Save the Com_jobTable entity using your repository or service +// Com_jobTablerepo.save(comJobTable); +// +// return new ResponseEntity<>("Email sent successfully and job data saved!", HttpStatus.OK); +// } +// +// public ResponseEntity GET(String get) { +// RestTemplate restTemplate = new RestTemplate(); +// +// ResponseEntity u = restTemplate.getForEntity(get, Object.class); +// +// return u; +// +// } +// +//} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Controllers/ApprovalHistory_Controller.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Controllers/ApprovalHistory_Controller.java new file mode 100644 index 0000000..adbc786 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Controllers/ApprovalHistory_Controller.java @@ -0,0 +1,62 @@ +package com.realnet.Billing.Controllers; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; + +import com.realnet.Billing.Dto.ServiceOrderDto; +import com.realnet.Billing.Entitys.ApprovalHistory_t; +import com.realnet.Billing.Services.ApprovalHistory_Service; + +@RequestMapping(value = "/ApprovalHistory") +@RestController +public class ApprovalHistory_Controller { + + @Autowired + private ApprovalHistory_Service Service; + + @PostMapping("/ApprovalHistory") + public ApprovalHistory_t Savedata(@RequestBody ApprovalHistory_t data) { + ApprovalHistory_t save = Service.Savedata(data); + return save; + } + + @GetMapping("/ApprovalHistory") + public List getdetails() { + List get = Service.getdetails(); + return get; + } + + @GetMapping("/ApprovalHistory/{id}") + public ApprovalHistory_t getdetailsbyId(@PathVariable Long id) { + ApprovalHistory_t get = Service.getdetailsbyId(id); + return get; + + } + + @DeleteMapping("/ApprovalHistory/{id}") + public void delete_by_id(@PathVariable Long id) { + Service.delete_by_id(id); + + } + + @PutMapping("/ApprovalHistory/{id}") + public ApprovalHistory_t update(@RequestBody ApprovalHistory_t data, @PathVariable Long id) { + ApprovalHistory_t update = Service.update(data, id); + return update; + } + +// @PutMapping("/updateServiceOrderStatus") +// public ResponseEntity updateServiceOrderStatus( +// @RequestParam Long serviceOrderId, +// @RequestParam String newStatus, +// @RequestParam String actionedBy, +// @RequestParam String comments +// ) { +// ServiceOrderDto updatedServiceOrder = Service.updateServiceOrderStatus(serviceOrderId, newStatus, actionedBy, comments); +// return new ResponseEntity<>(updatedServiceOrder, HttpStatus.OK); +// } +// +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Controllers/ApprovalQueue_Controller.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Controllers/ApprovalQueue_Controller.java new file mode 100644 index 0000000..a7530a0 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Controllers/ApprovalQueue_Controller.java @@ -0,0 +1,89 @@ +package com.realnet.Billing.Controllers; + +import com.realnet.Billing.Dto.ApprovalNote_SO; +import com.realnet.Billing.Dto.ApprovalQueue_SO; +import com.realnet.Billing.Repositorys.ApprovalReturnHistory_Repo; +import com.realnet.Billing.Services.ApprovalQueueService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; + +import java.util.Date; +import java.util.List; + +@RestController +@RequestMapping("/billing/approval") +public class ApprovalQueue_Controller { + + @Autowired + private ApprovalQueueService approvalQueueService; + + @PostMapping("/add") + public ResponseEntity addApprovalQueue( + @RequestBody ApprovalQueue_SO approvalQueueSOSO + ) { + return ResponseEntity.ok(approvalQueueService.saveApprovalQueue(approvalQueueSOSO)); + } + + @GetMapping("/getAll") + public List getAllApprovalQueue() { + return approvalQueueService.getAllApprovalQueue(); + } + + @GetMapping("/get/{id}") + public ResponseEntity getApprovalQueueById( + @PathVariable Long id) { + ApprovalQueue_SO approvalQueueSOSO = approvalQueueService.getApprovalQueueById(id); + if (approvalQueueSOSO != null) { + return ResponseEntity.ok(approvalQueueSOSO); + } else { + return ResponseEntity.notFound().build(); + } + } + + @GetMapping("/getall/{docSeq}") + public ResponseEntity> getAllQueueForDoc(@PathVariable Long docSeq) { + List approvalQueueSOSOList = approvalQueueService.getAllQueueForDocument(docSeq); + + if (approvalQueueSOSOList.isEmpty()) { + return ResponseEntity.notFound().build(); + } + + return ResponseEntity.ok(approvalQueueSOSOList); + } + + + @PutMapping("/update/{id}") + public ResponseEntity updateApprovalQueue( + @PathVariable Long id, @RequestBody ApprovalQueue_SO updatedApprovalQueueSOSO) { + ApprovalQueue_SO existingApprovalQueueSOSO = approvalQueueService.getApprovalQueueById(id); + if (existingApprovalQueueSOSO != null) { + existingApprovalQueueSOSO.setApprover(updatedApprovalQueueSOSO.getApprover()); + existingApprovalQueueSOSO.setActionType(updatedApprovalQueueSOSO.getActionType()); + existingApprovalQueueSOSO.setActionTaken(updatedApprovalQueueSOSO.getActionTaken()); + existingApprovalQueueSOSO.setComments(updatedApprovalQueueSOSO.getComments()); + existingApprovalQueueSOSO.setActionedAt(updatedApprovalQueueSOSO.getActionedAt()); + + ApprovalQueue_SO updatedQueue = approvalQueueService.saveApprovalQueue(existingApprovalQueueSOSO); + return ResponseEntity.ok(updatedQueue); + } else { + return ResponseEntity.notFound().build(); + } + } + + // ******************************************************************************* \\ + // History-Controller \\ + + @Autowired + private ApprovalReturnHistory_Repo returnHistoryRepo; + + @PostMapping("/return") + public ResponseEntity saveReturnResponse( + @RequestBody ApprovalNote_SO history + ){ + history.setActionDate(new Date()); + System.out.println(history); + return ResponseEntity.ok(returnHistoryRepo.save(history)); + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Dto/ApprovalNote_SO.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Dto/ApprovalNote_SO.java new file mode 100644 index 0000000..06752e8 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Dto/ApprovalNote_SO.java @@ -0,0 +1,27 @@ +package com.realnet.Billing.Dto; + +import com.fasterxml.jackson.annotation.JsonBackReference; +import lombok.Data; + +import javax.persistence.*; +import java.util.Date; + +@Entity +@Data +public class ApprovalNote_SO { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String documentSeq; + private String actionTaken; + private String actionNote; + + private Date actionDate; + + @ManyToOne + @JoinColumn(name = "approval_queue_id") + @JsonBackReference + private ApprovalQueue_SO approvalQueueSO; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Dto/ApprovalQueue_SO.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Dto/ApprovalQueue_SO.java new file mode 100644 index 0000000..dd2408d --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Dto/ApprovalQueue_SO.java @@ -0,0 +1,44 @@ +package com.realnet.Billing.Dto; + +import java.util.Date; +import java.util.List; + +import javax.persistence.CascadeType; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.OneToMany; + +import com.fasterxml.jackson.annotation.JsonManagedReference; + +import lombok.Data; + +@Entity +@Data +public class ApprovalQueue_SO { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String formCode; + private String documentSeq; + private String approver; + private String actionType; + private String actionTaken; + private String comments; + private Date actionedAt; + + private String tablename; + + @OneToMany(mappedBy = "approvalQueueSO", cascade = CascadeType.ALL) + @JsonManagedReference + private List history; + +// @ManyToOne(fetch = FetchType.LAZY) +// @JoinColumn(name = "service_order_id") +// @JsonBackReference + private Long service_order_id; + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Dto/BillingPeriodsResponse.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Dto/BillingPeriodsResponse.java new file mode 100644 index 0000000..6c39ead --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Dto/BillingPeriodsResponse.java @@ -0,0 +1,32 @@ +package com.realnet.Billing.Dto; + + + +import java.util.Date; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import lombok.Data; +import lombok.Getter; +import lombok.Setter; + +@Data +@Getter +@Setter +public class BillingPeriodsResponse { + + @JsonFormat(pattern = "yyyy-MM-dd") + private Date periodStart; + + @JsonFormat(pattern = "yyyy-MM-dd") + private Date periodEnd; + + // Constructors, getters, setters + + + public BillingPeriodsResponse(Date periodStart, Date periodEnd) { + this.periodStart = periodStart; + this.periodEnd = periodEnd; + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Dto/ServiceOrderDto.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Dto/ServiceOrderDto.java new file mode 100644 index 0000000..da1cd76 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Dto/ServiceOrderDto.java @@ -0,0 +1,22 @@ +package com.realnet.Billing.Dto; + +import lombok.Data; + +@Data +public class ServiceOrderDto { + private Long id; + private String orderType; + private String orderNo; + private String orderGenerationDate; + private String serviceRequestBy; + private String serviceRenderedFrom; + private String serviceRenderedTo; + private String contactNumber; + private String poNumber; + private String status; + private String remarks; + private String deliveryTerms; + // Other attributes as needed + + // Getters and setters +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Dto/ServiceWithDiscount.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Dto/ServiceWithDiscount.java new file mode 100644 index 0000000..0fd18cc --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Dto/ServiceWithDiscount.java @@ -0,0 +1,48 @@ +package com.realnet.Billing.Dto; + +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Lob; + + +import lombok.Data; + +@Data +public class ServiceWithDiscount { + + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String name; + private String memo; + private boolean active; + private String type; + private String period; + private String sellPrice; + private String selfCost; + + private String serviceCode; + private String hsnCodes; + private boolean exempt; + private boolean nonGst; + private String taxRateType; + private String tarrifCode; + private String hsn_sacNumber; + private String natureOfTrans; + private String productType; + + @Lob + private String inputJson; + + + private String disc; + + + private String gst ; + +} + + diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Entitys/ApprovalHistory_t.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Entitys/ApprovalHistory_t.java new file mode 100644 index 0000000..5e2b19b --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Entitys/ApprovalHistory_t.java @@ -0,0 +1,23 @@ +package com.realnet.Billing.Entitys; + import lombok.*; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + @Entity + @Data + public class ApprovalHistory_t{ + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String document_type; + private Long document_id; + private String actioned_by; + private String action; + private String comments; + + private String approvalStatus; + + } \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Entitys/BillingPeriods_t.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Entitys/BillingPeriods_t.java new file mode 100644 index 0000000..1317154 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Entitys/BillingPeriods_t.java @@ -0,0 +1,26 @@ +package com.realnet.Billing.Entitys; + +import lombok.*; + +import java.util.Date; + +import javax.persistence.*; + + +@Entity +@Data +public class BillingPeriods_t { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private Date periodStart; + + private Date periodEnd; + + private Date dueDate; + + private String status; + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Entitys/CustomerRates_t.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Entitys/CustomerRates_t.java new file mode 100644 index 0000000..583b64d --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Entitys/CustomerRates_t.java @@ -0,0 +1,32 @@ +package com.realnet.Billing.Entitys; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; + +import com.realnet.WhoColumn.Who_column; + +import lombok.Data; + +@Entity +@Data +public class CustomerRates_t extends Who_column { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String rateCard; + private String destination; + private String numericPrefix; + private String sellRate; + private String blockMinDuration; + private String initBlockRate; + private String dateStart; + private String dateEnd; + private String enabled; + private String dateAdded; + private String dateModified; + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Job/Controller/BillingJobServiceController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Job/Controller/BillingJobServiceController.java new file mode 100644 index 0000000..f3531ea --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Job/Controller/BillingJobServiceController.java @@ -0,0 +1,325 @@ +//package com.realnet.Billing.Job.Controller; +// +//import java.sql.SQLException; +//import java.util.ArrayList; +//import java.util.HashMap; +//import java.util.Iterator; +//import java.util.List; +//import java.util.Map; +// +//import org.slf4j.Logger; +//import org.slf4j.LoggerFactory; +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.http.HttpEntity; +//import org.springframework.http.HttpHeaders; +//import org.springframework.http.HttpStatus; +//import org.springframework.http.MediaType; +//import org.springframework.http.ResponseEntity; +//import org.springframework.web.bind.annotation.GetMapping; +//import org.springframework.web.bind.annotation.PathVariable; +//import org.springframework.web.bind.annotation.PostMapping; +//import org.springframework.web.bind.annotation.RequestMapping; +//import org.springframework.web.bind.annotation.RestController; +//import org.springframework.web.client.RestTemplate; +// +//import com.google.gson.JsonArray; +//import com.google.gson.JsonElement; +//import com.google.gson.JsonObject; +//import com.google.gson.JsonParser; +//import com.realnet.Billing.Job.Entity.BillingJobEntity; +//import com.realnet.Billing.Job.Repository.BillingJobRepository; +// +//import com.realnet.utils.Port_Constant; +// +//@RestController +//@RequestMapping("/token/BillingWorkflow/surejob") +//public class BillingJobServiceController { +// Logger log = LoggerFactory.getLogger(BillingJobServiceController.class); +// +// @Autowired +// private BillingJobRepository jobrepo; +// +// @Autowired +// private BillingPerfomaWorkFlowLineRepository flowrepo; +// +// @Autowired +// private BillingPerfomaWorkFlowLineRepository line_repo; +// +// @Autowired +// private BillingTaxInvoiceWorkFlowLineRepository billingTaxInvoiceWorkFlowLineRepository; +// +// @Autowired +// BillingJobService service; +// +// @PostMapping("/assignJob") +// public ResponseEntity jobAssign() { +// BillingJobEntity obj = new BillingJobEntity(); +// BillingJobEntity obj2 = new BillingJobEntity(); +// // DataflowJobConsolidationEntity obj3 = new DataflowJobConsolidationEntity(); +// +// obj.setConnection_name(null); +// obj.setJob_type("PerfomaInvoice"); +// obj.setMethod("GET"); +// obj.setParameters(null); +// obj.setUrl("/token/PerfomaSequentialApi/executeWorkflow"); +// obj.setRef(null); +// jobrepo.save(obj); +// +// obj2.setConnection_name(null); +// obj2.setJob_type("TaxInvoice"); +// obj2.setMethod("GET"); +// obj2.setParameters(null); +// obj2.setRef(null); +// obj2.setUrl("/token/consolidation/MergeData"); +// jobrepo.save(obj2); +// +// return new ResponseEntity<>(obj2, HttpStatus.ACCEPTED); +// } +// +// @GetMapping("/getjob/{job_type}") +// public ResponseEntity getByJob(@PathVariable String job_type) { +// +// BillingJobEntity jobtype = jobrepo.getByJobType(job_type); +// return new ResponseEntity<>(jobtype, HttpStatus.ACCEPTED); +// } +// +// @GetMapping("/create_job/{id}") +// public ResponseEntity createjob(@PathVariable Long id) throws SQLException { +// +// String job_url = ""; +// String CRON_exp = ""; +// String job_type = ""; +// String title = ""; +// String node = ""; +// ArrayList list = new ArrayList<>(); +// BillingPerfomaWorkFlowLine lines = flowrepo.getSetuWorkflowlines(id); +// String str = lines.getModel(); +// +// JsonParser parser = new JsonParser(); +// JsonElement element = parser.parse(str); +// JsonArray array = element.getAsJsonArray(); +//// Iterator iterator = array.iterator(); +// +// List jobNamesList = new ArrayList<>(); +// +// for (JsonElement jsonElement : array) { +// +// JsonObject jsonObject = jsonElement.getAsJsonObject(); +// +// title = jsonObject.get("title").getAsString(); +// +// StringBuilder builder = new StringBuilder(); +// +// builder.append("no data"); +// System.out.println(builder.toString()); +// +// Map jobprodata = new HashMap(); +// jobprodata.put("jobName", title + "_" + System.currentTimeMillis()); +// jobprodata.put("jobGroup", "PerfomaInvoice"); +// +// jobprodata.put("startTime", "2022-12-26T13:02"); +// jobprodata.put("counter", "5"); +// jobprodata.put("repeatTime", "5"); +// jobprodata.put("cronExpression", "0/10 * * * * ?"); +// jobprodata.put("line_id", id.toString()); +// jobprodata.put("node_id", "null"); +// +// System.out.println(jobprodata); +// +// System.out.println(jobprodata); +// +// RestTemplate restTemplate = new RestTemplate(); +// String jobprourl2 = "http://" + Port_Constant.LOCAL_HOST + ":" + Port_Constant.SURE_JOB_8089 +// + "/surejob/schedule"; +// HttpHeaders headers2 = getHeaders(); +// HttpEntity request2 = new HttpEntity(jobprodata, headers2); +// +// ResponseEntity res2 = restTemplate.postForEntity(jobprourl2, request2, Object.class); +// System.out.println(res2.getStatusCodeValue()); +// +// if (res2.getStatusCodeValue() == 200) { +// log.info("Gitea data inserted in sure job"); +// System.out.println(res2.getBody()); +// jobNamesList.add(jobprodata.get("jobName")); +// // jobNamesList.add(jobprodata.get("jobGroup")); +// +// } +// } +// +// return new ResponseEntity<>(jobNamesList, HttpStatus.ACCEPTED); +// } +// +// @GetMapping("/surejob/{id}") +// public ResponseEntity forjobscheduler(@PathVariable Long id) throws SQLException { +// +// ArrayList list = new ArrayList<>(); +// BillingPerfomaWorkFlowLine lines = flowrepo.getSetuWorkflowlines(id); +// String str = lines.getModel(); +// +// JsonParser parser = new JsonParser(); +// JsonElement element = parser.parse(str); +// JsonArray array = element.getAsJsonArray(); +// Iterator iterator = array.iterator(); +// +// String job_url = ""; +// String CRON_exp = ""; +// String job_type = ""; +// BillingJobEntity job = null; +// +// Boolean auto_mapping = true; +// while (iterator.hasNext()) { +// +// Object next = iterator.next(); +// JsonElement parse = parser.parse(next.toString()); +// JsonObject jsonObject = parse.getAsJsonObject(); +// // int i = jsonObject.get("id").getAsInt(); +// +// +// job_type = "PerfomaInvoice"; +// +//// if (job_type.isEmpty() || job_type.contains("null") || job_type == null) { +//// job_type = jsonObject.get("type").toString().replaceAll("\"", ""); +//// } +// +// job = jobrepo.getByJobType(job_type); +// +// break; +//// } +// +// } +// return new ResponseEntity<>(job, HttpStatus.ACCEPTED); +// } +//// GET DATA FLOW LINE +// +// @GetMapping("/getline/{id}") +// public ResponseEntity getline(@PathVariable Long id) { +// +// return new ResponseEntity<>(line_repo.getSetuWorkflowlines(id), HttpStatus.ACCEPTED); +// +// } +// +// private HttpHeaders getHeaders() { +// HttpHeaders headers = new HttpHeaders(); +// headers.set("Content-Type", MediaType.APPLICATION_JSON_VALUE); +// headers.set("Accept", MediaType.APPLICATION_JSON_VALUE); +// return headers; +// } +// +// // Tax Invoice Job Start +// +// @GetMapping("/create_job/{id}") +// public ResponseEntity createjobforTaxInvoice(@PathVariable Long id) throws SQLException { +// +// String job_url = ""; +// String CRON_exp = ""; +// String job_type = ""; +// String title = ""; +// String node = ""; +// ArrayList list = new ArrayList<>(); +// BillingTaxInvoiceWorkFlowLine lines = billingTaxInvoiceWorkFlowLineRepository.getSetuWorkflowlines(id); +// String str = lines.getModel(); +// +// JsonParser parser = new JsonParser(); +// JsonElement element = parser.parse(str); +// JsonArray array = element.getAsJsonArray(); +//// Iterator iterator = array.iterator(); +// +// List jobNamesList = new ArrayList<>(); +// +// for (JsonElement jsonElement : array) { +// +// JsonObject jsonObject = jsonElement.getAsJsonObject(); +// +// title = jsonObject.get("title").getAsString(); +// +// StringBuilder builder = new StringBuilder(); +// +// builder.append("no data"); +// System.out.println(builder.toString()); +// +// Map jobprodata = new HashMap(); +// jobprodata.put("jobName", title + "_" + System.currentTimeMillis()); +// jobprodata.put("jobGroup", "TaxInvoice"); +// +// jobprodata.put("startTime", "2022-12-26T13:02"); +// jobprodata.put("counter", "5"); +// jobprodata.put("repeatTime", "5"); +// jobprodata.put("cronExpression", "0/10 * * * * ?"); +// jobprodata.put("line_id", id.toString()); +// jobprodata.put("node_id", "null"); +// +// System.out.println(jobprodata); +// +// System.out.println(jobprodata); +// +// RestTemplate restTemplate = new RestTemplate(); +// String jobprourl2 = "http://" + Port_Constant.LOCAL_HOST + ":" + Port_Constant.SURE_JOB_8089 +// + "/surejob/schedule"; +// HttpHeaders headers2 = getHeaders(); +// HttpEntity request2 = new HttpEntity(jobprodata, headers2); +// +// ResponseEntity res2 = restTemplate.postForEntity(jobprourl2, request2, Object.class); +// System.out.println(res2.getStatusCodeValue()); +// +// if (res2.getStatusCodeValue() == 200) { +// log.info("Gitea data inserted in sure job"); +// System.out.println(res2.getBody()); +// jobNamesList.add(jobprodata.get("jobName")); +// // jobNamesList.add(jobprodata.get("jobGroup")); +// +// } +// } +// +// return new ResponseEntity<>(jobNamesList, HttpStatus.ACCEPTED); +// } +// +// +// +// +// +// +// +// +// +// @GetMapping("/surejob/taxInvoice/{id}") +// public ResponseEntity forjobschedulerInvoicetax(@PathVariable Long id) throws SQLException { +// +// ArrayList list = new ArrayList<>(); +// BillingTaxInvoiceWorkFlowLine lines = billingTaxInvoiceWorkFlowLineRepository.getSetuWorkflowlines(id); +// String str = lines.getModel(); +// +// JsonParser parser = new JsonParser(); +// JsonElement element = parser.parse(str); +// JsonArray array = element.getAsJsonArray(); +// Iterator iterator = array.iterator(); +// +// String job_url = ""; +// String CRON_exp = ""; +// String job_type = ""; +// BillingJobEntity job = null; +// +// Boolean auto_mapping = true; +// while (iterator.hasNext()) { +// +// Object next = iterator.next(); +// JsonElement parse = parser.parse(next.toString()); +// JsonObject jsonObject = parse.getAsJsonObject(); +// // int i = jsonObject.get("id").getAsInt(); +// +// +// job_type = "TaxInvoice"; +// +//// if (job_type.isEmpty() || job_type.contains("null") || job_type == null) { +//// job_type = jsonObject.get("type").toString().replaceAll("\"", ""); +//// } +// +// job = jobrepo.getByJobType(job_type); +// +// break; +//// } +// +// } +// return new ResponseEntity<>(job, HttpStatus.ACCEPTED); +// } +// +//} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Job/Entity/BillingJobEntity.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Job/Entity/BillingJobEntity.java new file mode 100644 index 0000000..e8233d4 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Job/Entity/BillingJobEntity.java @@ -0,0 +1,25 @@ +package com.realnet.Billing.Job.Entity; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; + +import lombok.Data; + + +@Data +@Entity +public class BillingJobEntity { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private long id; + private String parameters; + private String url; + private String method; + private String connection_name; + private String job_type; + private String ref; + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Job/Repository/BillingJobRepository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Job/Repository/BillingJobRepository.java new file mode 100644 index 0000000..2e36afa --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Job/Repository/BillingJobRepository.java @@ -0,0 +1,16 @@ +package com.realnet.Billing.Job.Repository; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.stereotype.Repository; + +import com.realnet.Billing.Job.Entity.BillingJobEntity; + + + +@Repository +public interface BillingJobRepository extends JpaRepository { + + @Query(value = "SELECT * FROM billing_job_entity where job_type=?1", nativeQuery = true) + BillingJobEntity getByJobType(String jobtype); +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Job/Service/BillingJobService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Job/Service/BillingJobService.java new file mode 100644 index 0000000..0e5e6e8 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Job/Service/BillingJobService.java @@ -0,0 +1,23 @@ +//package com.realnet.Billing.Job.Service; +// +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.stereotype.Service; +// +//import com.realnet.DataConsolidation.Entity.DataflowJobConsolidationEntity; +//import com.realnet.DataConsolidation.Repository.DataflowJobConsolidationRepository; +// +// +//@Service +//public class BillingJobService { +// +// @Autowired +// private DataflowJobConsolidationRepository jobrepo; +// +// public DataflowJobConsolidationEntity getJobtype(String jobtype) { +// DataflowJobConsolidationEntity byJobType = jobrepo.getByJobType(jobtype); +// return byJobType; +// } +// +// +// +//} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Repositorys/ApprovalHistory_Repository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Repositorys/ApprovalHistory_Repository.java new file mode 100644 index 0000000..0c199f9 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Repositorys/ApprovalHistory_Repository.java @@ -0,0 +1,11 @@ +package com.realnet.Billing.Repositorys; + +import org.springframework.data.jpa.repository.JpaRepository; + +import org.springframework.stereotype.Repository; + +import com.realnet.Billing.Entitys.ApprovalHistory_t; + +@Repository +public interface ApprovalHistory_Repository extends JpaRepository { +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Repositorys/ApprovalQueue_Repository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Repositorys/ApprovalQueue_Repository.java new file mode 100644 index 0000000..f9dc768 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Repositorys/ApprovalQueue_Repository.java @@ -0,0 +1,13 @@ +package com.realnet.Billing.Repositorys; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +import com.realnet.Billing.Dto.ApprovalQueue_SO; + +import java.util.List; + +@Repository +public interface ApprovalQueue_Repository extends JpaRepository { + List findByDocumentSeq(Long docid); +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Repositorys/ApprovalReturnHistory_Repo.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Repositorys/ApprovalReturnHistory_Repo.java new file mode 100644 index 0000000..1cd8631 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Repositorys/ApprovalReturnHistory_Repo.java @@ -0,0 +1,9 @@ +package com.realnet.Billing.Repositorys; + +import com.realnet.Billing.Dto.ApprovalNote_SO; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +@Repository +public interface ApprovalReturnHistory_Repo extends JpaRepository { +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Services/ApprovalHistory_Service.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Services/ApprovalHistory_Service.java new file mode 100644 index 0000000..71808f0 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Services/ApprovalHistory_Service.java @@ -0,0 +1,140 @@ +package com.realnet.Billing.Services; + +import java.util.List; +import java.util.Optional; + +import javax.persistence.EntityNotFoundException; + +import org.modelmapper.ModelMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.realnet.Billing.Dto.ServiceOrderDto; +import com.realnet.Billing.Entitys.ApprovalHistory_t; +import com.realnet.Billing.Repositorys.ApprovalHistory_Repository; + +@Service +public class ApprovalHistory_Service { + + @Autowired + private ApprovalHistory_Repository Repository; + +// @Autowired +// private ServiceOrder_Repository serviceOrder_Repository1; + + public ApprovalHistory_t Savedata(ApprovalHistory_t data) { + return Repository.save(data); + } + + public List getdetails() { + return (List) Repository.findAll(); + } + + public ApprovalHistory_t getdetailsbyId(Long id) { + return Repository.findById(id).get(); + } + + public void delete_by_id(Long id) { + Repository.deleteById(id); + } + + public ApprovalHistory_t update(ApprovalHistory_t data, Long id) { + ApprovalHistory_t old = Repository.findById(id).get(); + old.setDocument_type(data.getDocument_type()); + old.setDocument_id(data.getDocument_id()); + old.setActioned_by(data.getActioned_by()); + old.setAction(data.getAction()); + old.setComments(data.getComments()); + final ApprovalHistory_t test = Repository.save(old); + return test; + } + +// public ServiceOrder_t updateServiceOrderStatus(Long serviceOrderId, String newStatus, String actionedBy, String comments) { +// try { +// Optional optionalServiceOrder = serviceOrder_Repository.findById(serviceOrderId); +// if (optionalServiceOrder.isEmpty()) { +// throw new EntityNotFoundException("Service Order not found with ID: " + serviceOrderId); +// } +// +// ServiceOrder_t serviceOrder = optionalServiceOrder.get(); +// serviceOrder.setStatus(newStatus); +// serviceOrder_Repository.save(serviceOrder); +// +// // Insert data into Approval History table +// ApprovalHistory_t approvalHistory = new ApprovalHistory_t(); +// approvalHistory.setDocument_type("ServiceOrder"); +// approvalHistory.setDocument_id(serviceOrderId); +// approvalHistory.setActioned_by(actionedBy); +// approvalHistory.setAction("Status Updated"); +// approvalHistory.setComments(comments); +// // Set other fields in the Approval History table as needed +// +// Repository.save(approvalHistory); +// +// return serviceOrder; +// } catch (EntityNotFoundException ex) { +// // Handle EntityNotFoundException (Service Order not found) +// // You can log the error, return a custom error response, or throw a new exception. +// throw ex; +// } catch (Exception ex) { +// // Handle other exceptions (e.g., database errors, unexpected issues) +// // You can log the error, return a custom error response, or throw a new exception. +// throw new RuntimeException("Error updating Service Order status.", ex); +// } +// } +// +// public ServiceOrderDto updateServiceOrderStatus(Long serviceOrderId, String newStatus, String actionedBy, String comments) { +// // ... existing code to update status ... +// +// +// +// // Convert ServiceOrder_t entity to ServiceOrderDto +// ServiceOrderDto serviceOrderDto = convertToDto(serviceOrder); +// +// return serviceOrderDto; +// } +// +// public ServiceOrderDto updateServiceOrderStatus(Long serviceOrderId, String newStatus, String actionedBy, +// String comments) { +// try { +// Optional optionalServiceOrder = serviceOrder_Repository.findById(serviceOrderId); +// if (!optionalServiceOrder.isPresent()) { +// throw new EntityNotFoundException("Service Order not found with ID: " + serviceOrderId); +// } +// +// ServiceOrder_t serviceOrder = optionalServiceOrder.get(); +// serviceOrder.setStatus(newStatus); +// serviceOrder_Repository.save(serviceOrder); +// +// // Insert data into Approval History table +// ApprovalHistory_t approvalHistory = new ApprovalHistory_t(); +// approvalHistory.setDocument_type("ServiceOrder"); +// approvalHistory.setDocument_id(serviceOrderId); +// approvalHistory.setActioned_by(actionedBy); +// approvalHistory.setAction("Status Updated"); +// approvalHistory.setComments(comments); +// // Set other fields in the Approval History table as needed +// +// Repository.save(approvalHistory); +// +// // Convert ServiceOrder_t entity to DTO and return +// return convertToDto(serviceOrder); +// } catch (EntityNotFoundException ex) { +// // Handle EntityNotFoundException (Service Order not found) +// // You can log the error, return a custom error response, or throw a new +// // exception. +// throw ex; +// } catch (Exception ex) { +// // Handle other exceptions (e.g., database errors, unexpected issues) +// // You can log the error, return a custom error response, or throw a new +// // exception. +// throw new RuntimeException("Error updating Service Order status.", ex); +// } +// } + +// private ServiceOrderDto convertToDto(ServiceOrder_t serviceOrder) { +// // Perform mapping from ServiceOrder_t entity to ServiceOrderDto +// ModelMapper modelMapper = new ModelMapper(); +// return modelMapper.map(serviceOrder, ServiceOrderDto.class); +// } +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Services/ApprovalQueueService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Services/ApprovalQueueService.java new file mode 100644 index 0000000..0765f8b --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Billing/Services/ApprovalQueueService.java @@ -0,0 +1,31 @@ +package com.realnet.Billing.Services; + +import com.realnet.Billing.Dto.ApprovalQueue_SO; +import com.realnet.Billing.Repositorys.ApprovalQueue_Repository; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class ApprovalQueueService { + + @Autowired + private ApprovalQueue_Repository approvalQueueRepository; + + public ApprovalQueue_SO saveApprovalQueue(ApprovalQueue_SO approvalQueueSOSO) { + return approvalQueueRepository.save(approvalQueueSOSO); + } + + public List getAllApprovalQueue() { + return approvalQueueRepository.findAll(); + } + + public ApprovalQueue_SO getApprovalQueueById(Long id) { + return approvalQueueRepository.findById(id).orElse(null); + } + + public List getAllQueueForDocument(Long docid) { + return approvalQueueRepository.findByDocumentSeq(docid); + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Entity/Builder_entity_t.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Entity/Builder_entity_t.java new file mode 100644 index 0000000..c1d165e --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Entity/Builder_entity_t.java @@ -0,0 +1,21 @@ +package com.realnet.Builders.Entity; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; + +import lombok.Data; + +@Entity +@Data +public class Builder_entity_t { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String job_type; + private String job_name; + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Repos/BuilderRepository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Repos/BuilderRepository.java new file mode 100644 index 0000000..16eb1a1 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Repos/BuilderRepository.java @@ -0,0 +1,15 @@ +package com.realnet.Builders.Repos; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.stereotype.Repository; + +import com.realnet.Builders.Entity.Builder_entity_t; + +@Repository +public interface BuilderRepository extends JpaRepository { + + @Query(value = "select * from builder_entity_t where job_name= ?1 && job_type=?2", nativeQuery = true) + Builder_entity_t findByjobTypeAndName(String job_name, String job_type); + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java new file mode 100644 index 0000000..df685fd --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java @@ -0,0 +1,583 @@ +package com.realnet.Builders.Services; + +import java.io.IOException; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map.Entry; +import java.util.Set; +import java.util.stream.Collectors; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.dao.DataAccessException; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Service; + +import com.realnet.Builders.Entity.Builder_entity_t; +import com.realnet.Builders.Repos.BuilderRepository; +import com.realnet.Dashboard1.Entity.Dashbord1_Line; +import com.realnet.Dashboard1.Entity.Dashbord_Header; +import com.realnet.Dashboard1.Repository.Dashboard_lineRepository; +import com.realnet.Dashboard1.Service.HeaderService; +import com.realnet.Rpt_builder2.Entity.Rpt_builder2_t; +import com.realnet.Rpt_builder2.Services.Rpt_builder2_Service; +import com.realnet.Rpt_builder2_lines.Entity.Rpt_builder2_lines_t; +import com.realnet.Rpt_builder2_lines.Services.Rpt_builder2_lines_Service; +import com.realnet.api_registery.Entity.Api_registery_header; +import com.realnet.api_registery.Entity.Api_registery_line; +import com.realnet.api_registery.Services.Api_registery_headerService; +import com.realnet.api_registery.Services.Api_registery_lineService; +import com.realnet.fnd.entity1.MenuDet; +import com.realnet.fnd.service1.SecmenuDetailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; + +@Service +public class BuilderService { + + @Autowired + private SecmenuDetailService secmenuDetailService; + + @Autowired + private HeaderService headerService; + + @Autowired + private Dashboard_lineRepository dashboard_lineRepository; + + @Autowired + private Api_registery_headerService api_registery_headerService; + + @Autowired + private Api_registery_lineService api_registery_lineService; + + @Autowired + private BuilderRepository builderRepository; + + @Autowired + private Rpt_builder2_lines_Service rLinesService; + + @Autowired + private Rpt_builder2_Service reBuilder2Service; + + @Autowired + private AppUserServiceImpl userServiceImpl; + + public void callotherService() throws IOException { + + executeDump(true); + + // ADD OTHER SERVICE + + System.out.println("dashboard and menu inserted..."); + + } + +// add Custom sec menu detail + + public ResponseEntity addCustomMenu(String tableName, String MenuType) { + +// default menu that is Transcation + Long menuid = 1577l; + + if (MenuType.equalsIgnoreCase("Masters")) { + menuid = 1601l; + + } + + MenuDet menuDet = null; + Builder_entity_t entity_t = builderRepository.findByjobTypeAndName(tableName, "Menu"); + + if (entity_t == null) { + System.out.println("now inserting menu"); + + menuDet = secmenuDetailService.customsecmenuadd(tableName, menuid); + + savebuilderentity(tableName, "Menu"); + } else { + System.out.println(tableName + " menu already have"); + + } + + return new ResponseEntity<>(menuDet, HttpStatus.CREATED); + } + +// add dashboard + public Dashbord_Header SaveDashboard(String dashboardname, String description, String model) { + + Dashbord_Header dash = null; + Builder_entity_t entity_t = builderRepository.findByjobTypeAndName(dashboardname, "Dashboard"); + + if (entity_t == null) { + System.out.println("now inserting dashboard"); + + Dashbord_Header dashbord_Header = new Dashbord_Header(); + dashbord_Header.setDashboard_name(dashboardname); + dashbord_Header.setDescription(description); + dashbord_Header.setObject_type("form"); + dashbord_Header.setSub_object_type("only header"); + + dash = headerService.Savedata(dashbord_Header); + Dashbord1_Line line = new Dashbord1_Line(); + + line.setModel(model); + line.setHeader_id(dash.getId().toString()); + line.setDashbord_Header(dash); + dashboard_lineRepository.save(line); + + savebuilderentity(dashboardname, "Dashboard"); + + } else { + System.out.println(dashboardname + " dashboard already have"); + + } + + return dash; + } + +// add Report + public Rpt_builder2_t SaveReport(String reportName, String description, Boolean isSql, String model) { + + Rpt_builder2_t report = null; + Builder_entity_t entity_t = builderRepository.findByjobTypeAndName(reportName, "Report"); + + if (entity_t == null) { + System.out.println("now inserting Report"); + + Rpt_builder2_t rp = new Rpt_builder2_t(); + rp.setReportName(reportName); + rp.setDescription(description); + rp.setIsSql(isSql); + + report = reBuilder2Service.Savedata(rp); + Rpt_builder2_lines_t line = new Rpt_builder2_lines_t(); + + line.setModel(model); + line.setHeader_id(report.getId().toString()); + line.setRpt_builder2_t(rp); + rLinesService.Savedata(line); + + savebuilderentity(reportName, "Report"); + + } else { + System.out.println(reportName + " Report already have"); + + } + + return report; + } + +// Add to api Registery + + public Api_registery_header SaveApiRegistery(String tableName) { + + Api_registery_header save = null; + Builder_entity_t entity_t = builderRepository.findByjobTypeAndName(tableName, "Api_registery"); + + if (entity_t == null) { + System.out.println("now inserting apiregistery"); + + Api_registery_header api_registery_header = new Api_registery_header(); + + api_registery_header.setTable_name(tableName); + + save = api_registery_headerService.Savedata(api_registery_header); + + HashMap hashMap = new HashMap<>(); + + hashMap.put("GetAll", "/" + tableName + "/" + tableName); + hashMap.put("GetById", "/" + tableName + "/" + tableName + "{Id}"); + hashMap.put("Post", "/" + tableName + "/" + tableName); + hashMap.put("Put", "/" + tableName + "/" + tableName); + + Set> entrySet = hashMap.entrySet(); + + for (Entry entry : entrySet) { + + String Method = entry.getKey(); + String url = entry.getValue(); + + Api_registery_line registery_line = new Api_registery_line(); + + registery_line.setMethod(Method); + registery_line.setUrl(url); + registery_line.setHeader_id(save.getId()); + + api_registery_lineService.Savedata(registery_line); + + } + + savebuilderentity(tableName, "Api_registery"); + } else { + System.out.println(tableName + " all method already have"); + + } + + return save; + } + + private void savebuilderentity(String Job_name, String jobType) { + + Builder_entity_t builder_entity_t = new Builder_entity_t(); + + builder_entity_t.setJob_name(Job_name); + builder_entity_t.setJob_type(jobType); + builderRepository.save(builder_entity_t); + + } + + @Autowired + private JdbcTemplate jdbcTemplate; + + public ResponseEntity executeDump(Boolean execute) throws IOException { + // Check if execution is allowed + System.out.println(" dump executed start.."); + + Builder_entity_t entity_t = builderRepository.findByjobTypeAndName("SqlDump", "Execute"); + + List users = userServiceImpl.getAllUsers(); + if (entity_t != null || !users.isEmpty()) { + execute = false; + + } + if (!execute) { + System.out.println("Dump Already Executed...\n"); + return ResponseEntity.ok("Service not executed due to 'execute' flag being false."); + } + +// Path path = Paths.get(System.getProperty("user.dir")).resolve(filePath); + + // Check if file exists +// if (!Files.exists(path)) { +// return ResponseEntity.badRequest().body("File not found: " + filePath); +// } +// +// // File content ko read karo aur SQL commands extract karo +// String sql = FileUtils.readFileToString(new File(filePath), StandardCharsets.UTF_8); + + String sql = getSql(); + // SQL commands ko execute karo + + // Split statements by semicolon +// List sqlStatements = Arrays.stream(sql.split(";")).map(String::trim) +// .filter(statement -> !statement.isEmpty()) // Empty statements ko remove karo +// .filter(statement -> !statement.startsWith("USE")) // "USE db;" ko ignore karo +// .filter(statement -> !statement.startsWith("--")) // Comments ko ignore karo +// .filter(statement -> !statement.startsWith("/*")) // Special MySQL commands ko ignore karo +// .collect(Collectors.toList()); + + List sqlStatements = Arrays.stream(sql.split("(?<=;)(?![^()]*\\))")) // Regular expression to split + // by semicolon not inside + // parentheses + .map(String::trim).filter(statement -> !statement.isEmpty()) // Empty statements ko remove karo + .filter(statement -> !statement.startsWith("--")) // Comments ko ignore karo + .filter(statement -> !statement.startsWith("/*")) // Special MySQL commands ko ignore karo + .collect(Collectors.toList()); + + // Execute each statement + for (String statement : sqlStatements) { + try { + jdbcTemplate.execute(statement); + + System.out.println(statement + " executed.."); + + } catch (DataAccessException e) { + System.out.println("DataAccessException error inside.." + e); + + // Specific SQL execution error ko catch karo aur log karo + + } + } + + savebuilderentity("SqlDump", "Execute"); + + System.out.println("Dump executed executed.."); + + // File ko delete karo +// Files.delete(path); + + System.out.println("File delete successfully..."); + + return ResponseEntity.ok("Dump executed and file deleted successfully!"); + + } + + public String getSql() { + + String sql = " \n" + "DROP TABLE IF EXISTS `accounts`;\n" + + "/*!40101 SET @saved_cs_client = @@character_set_client */;\n" + + "/*!50503 SET character_set_client = utf8mb4 */;\n" + "CREATE TABLE `accounts` (\n" + + " `id` bigint NOT NULL,\n" + " `companyname` varchar(255) DEFAULT NULL,\n" + + " `email` varchar(255) DEFAULT NULL,\n" + " `managing_work` varchar(255) DEFAULT NULL,\n" + + " `mobile` bigint DEFAULT NULL,\n" + " `name` varchar(255) DEFAULT NULL,\n" + + " `pancard` varchar(255) DEFAULT NULL,\n" + " `password` varchar(255) DEFAULT NULL,\n" + + " `working` varchar(255) DEFAULT NULL,\n" + " PRIMARY KEY (`id`)\n" + + ") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n" + + "/*!40101 SET character_set_client = @saved_cs_client */;\n" + "\n" + "\n" + + "/*!40000 ALTER TABLE `accounts` DISABLE KEYS */;\n" + + "INSERT INTO `accounts` VALUES (1,'test','test@gmail.com','w',123456789,'kk','kk','test','w');\n" + + "/*!40000 ALTER TABLE `accounts` ENABLE KEYS */;\n" + "\n" + "DROP TABLE IF EXISTS `app_user_log`;\n" + + "/*!40101 SET @saved_cs_client = @@character_set_client */;\n" + + "/*!50503 SET character_set_client = utf8mb4 */;\n" + "CREATE TABLE `app_user_log` (\n" + + " `log_id` bigint NOT NULL,\n" + " `created_on` datetime DEFAULT NULL,\n" + + " `generate_log` varchar(255) DEFAULT NULL,\n" + " `log_file_name` varchar(255) DEFAULT NULL,\n" + + " `log_level` varchar(255) DEFAULT NULL,\n" + " `user_name` varchar(255) DEFAULT NULL,\n" + + " PRIMARY KEY (`log_id`),\n" + " UNIQUE KEY `UK_tl3or0c0pxxdvigxponlgee18` (`user_name`)\n" + + ") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n" + + "/*!40101 SET character_set_client = @saved_cs_client */;\n" + "\n" + "\n" + "\n" + + "/*!40000 ALTER TABLE `app_user_log` DISABLE KEYS */;\n" + + "INSERT INTO `app_user_log` VALUES (1,'2023-06-09 17:39:20','Y','sysadmin1686312560.log','info','sysadmin');\n" + + "/*!40000 ALTER TABLE `app_user_log` ENABLE KEYS */;\n" + "\n" + "\n" + + "DROP TABLE IF EXISTS `app_user_log_sequence`;\n" + + "/*!40101 SET @saved_cs_client = @@character_set_client */;\n" + + "/*!50503 SET character_set_client = utf8mb4 */;\n" + "CREATE TABLE `app_user_log_sequence` (\n" + + " `next_val` bigint DEFAULT NULL\n" + + ") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n" + + "/*!40101 SET character_set_client = @saved_cs_client */;\n" + "\n" + + "/*!40000 ALTER TABLE `app_user_log_sequence` DISABLE KEYS */;\n" + + "INSERT INTO `app_user_log_sequence` VALUES (2),(2),(2),(2),(2),(2),(2),(2),(2),(1);\n" + + "/*!40000 ALTER TABLE `app_user_log_sequence` ENABLE KEYS */;\n" + "\n" + "\n" + "\n" + + "DROP TABLE IF EXISTS `logs`;\n" + "/*!40101 SET @saved_cs_client = @@character_set_client */;\n" + + "/*!50503 SET character_set_client = utf8mb4 */;\n" + "CREATE TABLE `logs` (\n" + + " `user_id` bigint NOT NULL,\n" + " `dated` varchar(255) DEFAULT NULL,\n" + + " `lavel` varchar(255) DEFAULT NULL,\n" + " `logger` varchar(255) DEFAULT NULL,\n" + + " `message` varchar(255) DEFAULT NULL,\n" + " PRIMARY KEY (`user_id`)\n" + + ") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n" + + "/*!40101 SET character_set_client = @saved_cs_client */;\n" + "\n" + "\n" + + "/*!40000 ALTER TABLE `role` DISABLE KEYS */;\n" + + "INSERT INTO `role` VALUES (1,'ADMIN','ROLE_ADMIN'),(2,'Developer','ROLE_Developer'),(3,'USER','ROLE_USER'),(5,'DEVEOPS','ROLE_DEVEOPS');\n" + + "/*!40000 ALTER TABLE `role` ENABLE KEYS */;\n" + "\n" + "\n" + "\n" + "\n" + + "/*!40000 ALTER TABLE `sec_menu_det` DISABLE KEYS */;\n" + + "INSERT INTO `sec_menu_det` VALUES (1116,'2023-01-25 10:25:50','2023-01-25 10:25:50',3000,'security','lock',0,'Security','sec3000','Enable'),(1117,'2023-01-25 10:42:02','2023-02-04 15:34:25',3010,'usermaintance',NULL,1116,'User Maintance','U1000','Enable'),(1118,'2023-01-25 11:12:27','2023-02-04 15:34:36',3020,'usergrpmaintance',NULL,1116,'User Group Maintance','U2000','Enable'),(1523,'2023-02-04 11:15:57','2023-02-04 15:34:45',3030,'menumaintance',NULL,1116,'Menu Maintance','M3000','Enable'),(1524,'2023-02-04 11:16:52','2023-02-04 15:34:54',3040,'menuaccess',NULL,1116,'Menu Access Control','MA4000','Enable'),(1525,'2023-02-04 11:17:31','2023-02-04 15:35:06',3050,'systemparameters',NULL,1116,'System Parameters','SP5000','Enable'),(1526,'2023-02-04 11:18:04','2023-02-04 15:35:14',3060,'accesstype',NULL,1116,'Access Type','A6000','Enable'),(1528,'2023-02-04 13:31:48','2023-02-04 15:33:02',1010,'incident-new',NULL,1527,'Incident','I1000','Enable'),(1529,'2023-02-04 13:33:03','2023-02-04 15:33:12',1020,'incident-overview',NULL,1527,'Overview','O2000','Enable'),(1530,'2023-02-04 13:34:42','2023-02-04 15:33:21',1030,'sureboard2',NULL,1527,'Issueboard','I3000','Enable'),(1531,'2023-02-04 13:35:27','2023-02-04 15:33:36',1040,'change-request',NULL,1527,'Change Request','C4000','Enable'),(1532,'2023-02-04 13:36:01','2023-02-10 02:25:13',1050,'problem-creation',NULL,1527,'Problem Request','P5000','Enable'),(1534,'2023-02-04 13:56:22','2023-02-04 15:34:07',2010,'Sr_priority2_t',NULL,1533,'Priority','P1000','Enable'),(1535,'2023-02-04 17:12:27','2023-02-04 17:12:27',2020,'Sr_urgency_t',NULL,1533,'Urgency','Su2000','Enable'),(1536,'2023-02-04 17:13:22','2023-02-04 17:13:22',2030,'Sr_impact2_t',NULL,1533,'Impact','Sm3000','Enable'),(1537,'2023-02-04 17:14:01','2023-02-04 17:14:01',2040,'Sr_category2_t',NULL,1533,'Category','Sc4000','Enable'),(1538,'2023-02-04 17:14:31','2023-02-04 17:14:31',2050,'Sr_State_t',NULL,1533,'State','S5000','Enable'),(1539,'2023-02-04 17:15:12','2023-02-09 13:25:27',2070,'Sr_customer_t',NULL,1533,'Customer','c7000','Enable'),(1540,'2023-02-04 17:16:23','2023-02-14 13:15:27',2060,'Sr_Contact_type_t',NULL,1533,'Contact','C6000','Enable'),(1541,'2023-02-04 17:17:22','2023-02-04 17:17:22',2080,'Sr_handler_t',NULL,1533,'Handler','H8000','Enable'),(1543,'2023-02-08 15:07:14','2023-03-01 05:51:41',4010,'sequence',NULL,1542,'Define Sequence','SE1000','Enable'),(1544,'2023-02-16 10:14:33','2023-02-16 10:14:33',4020,'bugtracker',NULL,1542,'Bug Tracker','B1000','Enable'),(1545,'2023-02-16 11:00:25','2023-02-16 11:00:25',4030,'datamanagemennt',NULL,1542,'Data Management','M3000','Enable'),(1550,'2023-03-01 06:10:35','2023-03-01 06:10:35',2090,'projects',NULL,1533,'Projects','P2000','Enable'),(1551,'2023-03-01 07:14:27','2023-03-01 07:14:27',4040,'applysequence',NULL,1542,'Apply Sequence','As3000','Enable'),(1552,'2023-06-05 14:14:21','2023-06-05 14:14:21',2000,'dash','dashboard',0,'dashboard','dashboard','Enable'),(1553,'2023-06-05 14:16:48','2023-06-17 03:53:20',1000,'DashboardTesting',NULL,1552,'dashboard1','dashboard','Enable'),(1554,'2023-06-11 10:55:12','2023-06-11 10:55:12',2000,'Dashtest',NULL,1552,'das2','2000','Enable'),(1555,'2023-10-10 12:50:55','2024-01-19 14:33:06',1000,'project','flag',0,'project','project','Enable'),(1556,'2023-10-11 11:03:39','2023-10-11 11:03:39',4000,'superadmin','King',0,'Super Admin','Super Admin','Enable'),(1557,'2023-10-11 11:04:17','2023-10-11 11:04:17',4100,'extension',NULL,1556,'Code Extension','CodeExtension','Enable'),(1558,'2023-10-25 16:31:26','2023-10-25 16:31:26',5000,'test','tools',0,'Vault','Vault','Enable'),(1559,'2023-10-25 16:32:18','2023-10-25 16:32:18',5001,'Access_Point',NULL,1558,'Access Point','Access Point','Enable'),(1560,'2023-10-25 17:34:39','2023-10-25 17:34:39',6000,'crm','employee-group',0,'CRM','crm','Enable'),(1561,'2023-10-25 17:35:21','2023-10-25 17:35:21',6001,'Calls',NULL,1560,'Calls','Calls','Enable'),(1562,'2023-10-25 17:35:43','2023-10-25 17:35:43',6002,'Campaign',NULL,1560,'Campaign','Campaign','Enable'),(1563,'2023-10-25 17:35:57','2023-10-25 17:35:57',6003,'Company',NULL,1560,'Company','Company','Enable'),(1564,'2023-10-25 17:36:16','2023-10-25 17:36:16',6004,'Contact',NULL,1560,'Contact','Contact','Enable'),(1565,'2023-10-25 17:36:32','2023-10-25 17:36:32',6005,'Dealer',NULL,1560,'Dealer','Dealer','Enable'),(1566,'2023-10-25 17:36:48','2023-10-25 17:36:48',6006,'Deals',NULL,1560,'Deals','Deals','Enable'),(1567,'2023-10-25 17:37:00','2023-10-25 17:37:00',6007,'Documents',NULL,1560,'Documents','Documents','Enable'),(1568,'2023-10-25 17:37:25','2023-10-25 17:37:25',6008,'Leads',NULL,1560,'Leads','Leads','Enable'),(1569,'2023-10-25 17:37:41','2023-10-25 17:37:41',6009,'Meetings',NULL,1560,'Meetings','Meetings','Enable'),(1570,'2023-10-25 17:39:36','2023-10-25 17:39:36',6010,'Product',NULL,1560,'Product','Product','Enable'),(1571,'2023-10-25 17:39:51','2023-10-25 17:39:51',6011,'Tasks',NULL,1560,'Tasks','Tasks','Enable'),(1572,'2023-11-01 18:43:22','2023-11-03 11:42:38',4000,'SequenceGenerator',NULL,1116,'Document Sequence','Document Sequrnce','Enable'),(1574,'2023-12-04 11:53:00','2023-12-04 18:49:58',1000,'Teacher_Registration',NULL,1573,'Teacher Registration','Teacher','Enable'),(1575,'2023-12-04 11:53:15','2023-12-04 18:50:25',1000,'Student_registration',NULL,1573,'Student Registration','Student','Enable'),(1576,'2023-12-04 18:50:53','2023-12-04 18:50:53',3000,'Courses_name',NULL,1573,'course','course','Enable'),(1577,'2024-01-27 15:39:15','2024-03-20 19:46:19',7000,'Transactions','King',0,'Transactions','Transactions','Enable'),(1579,'2024-02-01 16:26:28','2024-02-07 16:03:10',4300,'apiregistery',NULL,1556,'Api Registery','Api Registery','Enable'),(1580,'2024-02-02 10:05:03','2024-02-02 10:05:03',4200,'tokenregistery',NULL,1556,'Token Registery','Token Registery','Enable'),(1582,'2024-02-03 10:25:51','2024-02-03 10:25:51',8000,'test','test',0,'test','test','Enable'),(1588,'2024-02-07 16:03:53','2024-02-07 16:03:53',4400,'survey-form',NULL,1556,'Survey Form','SurveyForm','Enable'),(1593,'2024-02-24 15:02:22','2024-02-24 15:02:22',4500,'datamanage','data-cluster',0,'Data Management','DataManagement','Enable'),(1594,'2024-02-24 15:03:01','2024-02-24 15:03:01',4501,'datamanagement',NULL,1593,'Data Management','DataManagement','Enable'),(1595,'2024-02-24 15:03:34','2024-02-24 15:03:34',4502,'validationrule',NULL,1593,'Validaiton Rule','ValidaitonRule','Enable'),(1596,'2024-02-24 15:03:58','2024-02-24 15:03:58',4503,'mappingrule',NULL,1593,'Mapping Rule','MappingRule','Enable'),(1601,'2024-03-20 19:46:01','2024-03-20 19:46:37',9000,'Masters','data-cluster',0,'Masters','Masters','Enable');\n" + + "/*!40000 ALTER TABLE `sec_menu_det` ENABLE KEYS */;\n" + "\n" + "\n" + "\n" + + "/*!40000 ALTER TABLE `sec_user_group` DISABLE KEYS */;\n" + + "INSERT INTO `sec_user_group` VALUES (1,NULL,NULL,'add',30,'sysadmin','E',NULL,'2023-03-01 05:54:10'),(41,NULL,'2023-02-28 13:05:54','check',20,'users','Disable',NULL,'2023-02-28 13:30:14');\n" + + "/*!40000 ALTER TABLE `sec_user_group` ENABLE KEYS */;\n" + "\n" + "\n" + "\n" + + "DROP TABLE IF EXISTS `sec_user_group_id`;\n" + + "/*!40101 SET @saved_cs_client = @@character_set_client */;\n" + + "/*!50503 SET character_set_client = utf8mb4 */;\n" + "CREATE TABLE `sec_user_group_id` (\n" + + " `next_val` bigint DEFAULT NULL\n" + + ") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n" + + "/*!40101 SET character_set_client = @saved_cs_client */;\n" + "\n" + "\n" + "\n" + + "/*!40000 ALTER TABLE `sec_user_group_id` DISABLE KEYS */;\n" + + "INSERT INTO `sec_user_group_id` VALUES (59),(59),(40),(40),(40),(40),(40),(40);\n" + + "/*!40000 ALTER TABLE `sec_user_group_id` ENABLE KEYS */;\n" + "\n" + "\n" + "\n" + + "/*!40000 ALTER TABLE `sys_accounts` DISABLE KEYS */;\n" + + "INSERT INTO `sys_accounts` VALUES (1,NULL,NULL,NULL,NULL,NULL,NULL,NULL);\n" + + "/*!40000 ALTER TABLE `sys_accounts` ENABLE KEYS */;\n" + "\n" + "\n" + + "/*!40000 ALTER TABLE `sec_users` DISABLE KEYS */;\n" + + "INSERT INTO `sec_users` (`user_id`, `is_complete`, `about`, `accesstype`, `active`, `change_passw`, `checknumber`, `country`, `createby`, `createdate`, `customer_id`, `days_mth`, `dep_string`, `email`, `expiry_date`, `first_login`, `full_name`, `is_blocked`, `lang_code`, `last_pwd_changed_date`, `mob_no`, `no_days_mth`, `notification`, `password1`, `password2`, `password3`, `password4`, `photo`, `photo_name`, `provider`, `pwd_changed_cnt`, `random_no`, `short_name`, `status`, `title`, `updateby`, `updatedate`, `user_passw`, `user_name`, `usr_grp_id`, `working`, `account_id`, `department_code`, `position_code`, `usr_grp`) VALUES (10007307, true, NULL, NULL, true, 'test3', NULL, NULL, NULL, '2024-09-03 19:32:38', NULL, NULL, NULL, 'sysadmin', NULL, NULL, 'sysadmin', false, NULL, '2024-09-03 19:32:38', '1234567890', NULL, NULL, 'admin123', NULL, NULL, NULL, NULL, NULL, NULL, 7, NULL, NULL, NULL, NULL, NULL, NULL, '$2b$10$8iFnL/cKTTmclSD1BZh8UeP0ZKKEzZ2hbTsrRcgy3kMinDRdxN7xe', 'sysadmin', NULL, NULL, 1, NULL, NULL, 1);\n" + + "/*!40000 ALTER TABLE `sec_users` ENABLE KEYS */;\n" + "\n" + "\n" + "\n" + + "DROP TABLE IF EXISTS `sec_user_sessions`;\n" + + "/*!40101 SET @saved_cs_client = @@character_set_client */;\n" + + "/*!50503 SET character_set_client = utf8mb4 */;\n" + "CREATE TABLE `sec_user_sessions` (\n" + + " `client_ip` varchar(255) NOT NULL,\n" + " `session_id` varchar(255) NOT NULL,\n" + + " `user_id` bigint NOT NULL,\n" + " `last_access_date` datetime DEFAULT NULL,\n" + + " `logintime` datetime DEFAULT NULL,\n" + " `logouttime` datetime DEFAULT NULL,\n" + + " `macid` varchar(255) DEFAULT NULL,\n" + " PRIMARY KEY (`client_ip`,`session_id`,`user_id`),\n" + + " KEY `FKp9jm02b501ugvjvfhas5sskfq` (`user_id`),\n" + + " CONSTRAINT `FKp9jm02b501ugvjvfhas5sskfq` FOREIGN KEY (`user_id`) REFERENCES `sec_users` (`user_id`)\n" + + ") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n" + + "/*!40101 SET character_set_client = @saved_cs_client */;\n" + "\n" + "\n" + "\n" + + "/*!40000 ALTER TABLE `sec_user_sessions` DISABLE KEYS */;\n" + + "/*!40000 ALTER TABLE `sec_user_sessions` ENABLE KEYS */;\n" + "\n" + "\n" + "\n" + "\n" + + "DROP TABLE IF EXISTS `sec_grp_menu_access`;\n" + + "/*!40101 SET @saved_cs_client = @@character_set_client */;\n" + + "/*!50503 SET character_set_client = utf8mb4 */;\n" + "CREATE TABLE `sec_grp_menu_access` (\n" + + " `menu_item_id` bigint NOT NULL,\n" + " `usr_grp` bigint NOT NULL,\n" + + " `createby` varchar(255) DEFAULT NULL,\n" + " `created_at` datetime DEFAULT NULL,\n" + + " `isdisable` varchar(255) DEFAULT NULL,\n" + " `item_seq` bigint DEFAULT NULL,\n" + + " `m_create` varchar(255) DEFAULT NULL,\n" + " `m_delete` varchar(255) DEFAULT NULL,\n" + + " `m_edit` varchar(255) DEFAULT NULL,\n" + " `m_query` varchar(255) DEFAULT NULL,\n" + + " `m_visible` varchar(255) DEFAULT NULL,\n" + + " `main_menu_action_name` varchar(255) DEFAULT NULL,\n" + + " `main_menu_icon_name` varchar(255) DEFAULT NULL,\n" + " `menu_id` bigint DEFAULT NULL,\n" + + " `menu_item_desc` varchar(255) DEFAULT NULL,\n" + " `mexport` varchar(255) DEFAULT NULL,\n" + + " `module_name` varchar(255) DEFAULT NULL,\n" + " `status` varchar(255) DEFAULT NULL,\n" + + " `updateby` varchar(255) DEFAULT NULL,\n" + " `updated_at` datetime DEFAULT NULL,\n" + + " PRIMARY KEY (`menu_item_id`,`usr_grp`),\n" + " KEY `FKtj8mtsrhc4m4acbrvjnnyvglm` (`usr_grp`),\n" + + " CONSTRAINT `FKmkev6w9umgp6fg2afatibhq1x` FOREIGN KEY (`menu_item_id`) REFERENCES `sec_menu_det` (`menu_item_id`),\n" + + " CONSTRAINT `FKtj8mtsrhc4m4acbrvjnnyvglm` FOREIGN KEY (`usr_grp`) REFERENCES `sec_user_group` (`usr_grp`) ON DELETE CASCADE\n" + + ") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n" + + "/*!40101 SET character_set_client = @saved_cs_client */;\n" + "\n" + "\n" + + "/*!40000 ALTER TABLE `sec_grp_menu_access` DISABLE KEYS */;\n" + + "INSERT INTO `sec_grp_menu_access` VALUES (1116,41,NULL,'2024-01-17 18:56:05','true',3000,'true','true','true','true','true','security','lock',0,'Security','true','sec3000','Enable',NULL,'2024-01-17 18:56:05'),(1117,41,NULL,'2024-01-17 18:56:07','true',3010,'true','true','true','true','true','usermaintance',NULL,1116,'User Maintance','true','U1000','Enable',NULL,'2024-01-17 18:56:07'),(1118,41,NULL,'2024-01-17 18:56:11','true',3020,'true','true','true','true','true','usergrpmaintance',NULL,1116,'User Group Maintance','true','U2000','Enable',NULL,'2024-01-17 18:56:11'),(1523,41,NULL,'2024-01-17 18:56:14','true',3030,'true','true','true','true','true','menumaintance',NULL,1116,'Menu Maintance','true','M3000','Enable',NULL,'2024-01-17 18:56:14'),(1524,41,NULL,'2024-01-17 18:56:16','true',3040,'true','true','true','true','true','menuaccess',NULL,1116,'Menu Access Control','true','MA4000','Enable',NULL,'2024-01-17 18:56:16'),(1525,41,NULL,'2024-01-17 18:56:18','true',3050,'true','true','true','true','true','systemparameters',NULL,1116,'System Parameters','true','SP5000','Enable',NULL,'2024-01-17 18:56:18'),(1526,41,NULL,'2024-01-17 18:56:19','true',3060,'true','true','true','true','true','accesstype',NULL,1116,'Access Type','true','A6000','Enable',NULL,'2024-01-17 18:56:19'),(1572,41,NULL,'2024-01-17 18:56:21','true',4000,'true','true','true','true','true','SequenceGenerator',NULL,1116,'Document Sequence','true','Document Sequrnce','Enable',NULL,'2024-01-17 18:56:21'),(1577,1,NULL,'2024-01-27 15:40:46','true',7000,'true','true','true','true','true','Transactions','King',0,'Transactions','true','Transactions','Enable',NULL,'2024-01-27 15:40:46'),(1601,1,NULL,'2024-03-20 20:06:50','true',9000,'true','true','true','true','true','Masters','data-cluster',0,'Masters','true','Masters','Enable',NULL,'2024-03-20 20:06:50');\n" + + "/*!40000 ALTER TABLE `sec_grp_menu_access` ENABLE KEYS */;\n" + "\n" + "\n" + "\n" + "\n" + + "DROP TABLE IF EXISTS `sec_users_sequencs`;\n" + + "/*!40101 SET @saved_cs_client = @@character_set_client */;\n" + + "/*!50503 SET character_set_client = utf8mb4 */;\n" + "CREATE TABLE `sec_users_sequencs` (\n" + + " `next_val` bigint DEFAULT NULL\n" + + ") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n" + + "/*!40101 SET character_set_client = @saved_cs_client */;\n" + "\n" + "\n" + "\n" + + "/*!40000 ALTER TABLE `sec_users_sequencs` DISABLE KEYS */;\n" + + "INSERT INTO `sec_users_sequencs` VALUES (10007321),(10007300),(10007300),(10007300),(10007300),(10007300),(10007300),(10007300);\n" + + "/*!40000 ALTER TABLE `sec_users_sequencs` ENABLE KEYS */;\n" + "\n" + "\n" + "\n" + "\n" + + "DROP TABLE IF EXISTS `sec_workspace`;\n" + + "/*!40101 SET @saved_cs_client = @@character_set_client */;\n" + + "/*!50503 SET character_set_client = utf8mb4 */;\n" + "CREATE TABLE `sec_workspace` (\n" + + " `id` int NOT NULL AUTO_INCREMENT,\n" + " `account_id` bigint DEFAULT NULL,\n" + + " `created_at` datetime NOT NULL,\n" + " `created_by` bigint DEFAULT NULL,\n" + + " `updated_at` datetime NOT NULL,\n" + " `updated_by` bigint DEFAULT NULL,\n" + + " `is_active` varchar(255) DEFAULT NULL,\n" + " `description` varchar(255) DEFAULT NULL,\n" + + " `is_default` varchar(255) DEFAULT NULL,\n" + " `name` varchar(255) DEFAULT NULL,\n" + + " `owner_id` varchar(255) DEFAULT NULL,\n" + " `project_id` int DEFAULT NULL,\n" + + " PRIMARY KEY (`id`)\n" + ") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n" + + "/*!40101 SET character_set_client = @saved_cs_client */;\n" + "\n" + "\n" + "\n" + + "DROP TABLE IF EXISTS `sec_workspace_users`;\n" + + "/*!40101 SET @saved_cs_client = @@character_set_client */;\n" + + "/*!50503 SET character_set_client = utf8mb4 */;\n" + "CREATE TABLE `sec_workspace_users` (\n" + + " `id` bigint NOT NULL AUTO_INCREMENT,\n" + " `account_id` bigint DEFAULT NULL,\n" + + " `created_at` datetime NOT NULL,\n" + " `created_by` bigint DEFAULT NULL,\n" + + " `updated_at` datetime NOT NULL,\n" + " `updated_by` bigint DEFAULT NULL,\n" + + " `project_id` int DEFAULT NULL,\n" + " `user_id` bigint DEFAULT NULL,\n" + + " `user_name` varchar(255) DEFAULT NULL,\n" + " `user_role` varchar(255) DEFAULT NULL,\n" + + " `worksapce_id` int NOT NULL,\n" + " PRIMARY KEY (`id`)\n" + + ") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n" + + "/*!40101 SET character_set_client = @saved_cs_client */;\n" + "\n" + "\n" + "\n" + + "/*!40000 ALTER TABLE `secuser_roles` DISABLE KEYS */;\n" + + "INSERT INTO `secuser_roles` VALUES (10007307,1);\n" + + "/*!40000 ALTER TABLE `secuser_roles` ENABLE KEYS */;\n" + "\n" + "\n" + "\n" + + "DROP TABLE IF EXISTS `sys_accounts_users`;\n" + + "/*!40101 SET @saved_cs_client = @@character_set_client */;\n" + + "/*!50503 SET character_set_client = utf8mb4 */;\n" + "CREATE TABLE `sys_accounts_users` (\n" + + " `sys_accounts_id` bigint NOT NULL,\n" + " `users_user_id` bigint NOT NULL,\n" + + " UNIQUE KEY `UK_8dxppqkque5ehofdy83bntgks` (`users_user_id`),\n" + + " KEY `FKs9o1t4hyiyq2y330p0d2evf2a` (`sys_accounts_id`),\n" + + " CONSTRAINT `FKdkc60wy8v55ylspegueinngjx` FOREIGN KEY (`users_user_id`) REFERENCES `sec_users` (`user_id`),\n" + + " CONSTRAINT `FKs9o1t4hyiyq2y330p0d2evf2a` FOREIGN KEY (`sys_accounts_id`) REFERENCES `sys_accounts` (`id`)\n" + + ") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n" + + "/*!40101 SET character_set_client = @saved_cs_client */;\n" + "\n" + "\n" + "\n" + + "/*!40000 ALTER TABLE `sys_accounts_users` DISABLE KEYS */;\n" + + "/*!40000 ALTER TABLE `sys_accounts_users` ENABLE KEYS */;\n" + "\n" + "\n" + "\n" + + "DROP TABLE IF EXISTS `user_list`;\n" + + "/*!40101 SET @saved_cs_client = @@character_set_client */;\n" + + "/*!50503 SET character_set_client = utf8mb4 */;\n" + "CREATE TABLE `user_list` (\n" + + " `id` bigint NOT NULL,\n" + " `about` varchar(255) DEFAULT NULL,\n" + + " `account_id` varchar(255) DEFAULT NULL,\n" + " `address1` varchar(255) DEFAULT NULL,\n" + + " `address2` varchar(255) DEFAULT NULL,\n" + " `checknumber` varchar(255) DEFAULT NULL,\n" + + " `company` varchar(255) DEFAULT NULL,\n" + " `country` varchar(255) DEFAULT NULL,\n" + + " `created_at` varchar(255) DEFAULT NULL,\n" + " `created_by` varchar(255) DEFAULT NULL,\n" + + " `default_customer_id` varchar(255) DEFAULT NULL,\n" + " `department` varchar(255) DEFAULT NULL,\n" + + " `dob` varchar(255) DEFAULT NULL,\n" + " `email` varchar(255) DEFAULT NULL,\n" + + " `enable_beta_testing` bit(1) NOT NULL,\n" + " `enable_renewal` bit(1) NOT NULL,\n" + + " `firstname` varchar(255) DEFAULT NULL,\n" + " `fullname` varchar(255) DEFAULT NULL,\n" + + " `gender` varchar(255) DEFAULT NULL,\n" + " `is_active` bit(1) NOT NULL,\n" + + " `is_blocked` bit(1) NOT NULL,\n" + " `lastname` varchar(255) DEFAULT NULL,\n" + + " `managing_work` varchar(255) DEFAULT NULL,\n" + " `menu_group` int NOT NULL,\n" + + " `name` varchar(255) DEFAULT NULL,\n" + " `other_roles` varchar(255) DEFAULT NULL,\n" + + " `pancard` varchar(255) DEFAULT NULL,\n" + " `password` varchar(255) DEFAULT NULL,\n" + + " `phone` varchar(255) DEFAULT NULL,\n" + " `photos` varchar(255) DEFAULT NULL,\n" + + " `postal` varchar(255) DEFAULT NULL,\n" + " `role` varchar(255) DEFAULT NULL,\n" + + " `secret_answer` varchar(255) DEFAULT NULL,\n" + " `secret_question` varchar(255) DEFAULT NULL,\n" + + " `security_provider_id` varchar(255) DEFAULT NULL,\n" + " `status` varchar(255) DEFAULT NULL,\n" + + " `updated_at` varchar(255) DEFAULT NULL,\n" + " `updated_by` varchar(255) DEFAULT NULL,\n" + + " `user_id` varchar(255) DEFAULT NULL,\n" + " `username` varchar(255) DEFAULT NULL,\n" + + " `working` varchar(255) DEFAULT NULL,\n" + " PRIMARY KEY (`id`)\n" + + ") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n" + + "/*!40101 SET character_set_client = @saved_cs_client */;\n" + "\n" + "\n" + "\n" + + "/*!40000 ALTER TABLE `user_list` DISABLE KEYS */;\n" + + "/*!40000 ALTER TABLE `user_list` ENABLE KEYS */;\n" + "\n" + "\n" + "\n" + "\n" + + "DROP TABLE IF EXISTS `userloginhist`;\n" + + "/*!40101 SET @saved_cs_client = @@character_set_client */;\n" + + "/*!50503 SET character_set_client = utf8mb4 */;\n" + "CREATE TABLE `userloginhist` (\n" + + " `create_by` varchar(255) DEFAULT NULL,\n" + " `create_date` datetime DEFAULT NULL,\n" + + " `expiry_reminder` bigint DEFAULT NULL,\n" + " `last_login_date` datetime DEFAULT NULL,\n" + + " `last_password_chg_date` datetime DEFAULT NULL,\n" + + " `last_password_fail_no` bigint DEFAULT NULL,\n" + " `update_by` varchar(255) DEFAULT NULL,\n" + + " `update_date` datetime DEFAULT NULL,\n" + " `user_id` bigint NOT NULL,\n" + + " PRIMARY KEY (`user_id`),\n" + + " CONSTRAINT `FK2a2xifc15js82mjl20honhdfr` FOREIGN KEY (`user_id`) REFERENCES `sec_users` (`user_id`)\n" + + ") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n" + + "/*!40101 SET character_set_client = @saved_cs_client */;\n" + "\n" + "\n" + "\n" + + "DROP TABLE IF EXISTS `userpasswlog`;\n" + + "/*!40101 SET @saved_cs_client = @@character_set_client */;\n" + + "/*!50503 SET character_set_client = utf8mb4 */;\n" + "CREATE TABLE `userpasswlog` (\n" + + " `create_date` datetime NOT NULL,\n" + " `user_id` bigint NOT NULL,\n" + + " `user_passw` varchar(255) NOT NULL,\n" + " `create_by` varchar(255) DEFAULT NULL,\n" + + " `update_by` varchar(255) DEFAULT NULL,\n" + " `update_date` datetime DEFAULT NULL,\n" + + " PRIMARY KEY (`create_date`,`user_id`,`user_passw`),\n" + + " KEY `FKpd759n25auh4bw5ri0xikikia` (`user_id`),\n" + + " CONSTRAINT `FKpd759n25auh4bw5ri0xikikia` FOREIGN KEY (`user_id`) REFERENCES `sec_users` (`user_id`)\n" + + ") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n" + + "/*!40101 SET character_set_client = @saved_cs_client */;\n" + "\n" + "\n" + "\n" + + "/*!40000 ALTER TABLE `userpasswlog` DISABLE KEYS */;\n" + + "/*!40000 ALTER TABLE `userpasswlog` ENABLE KEYS */;\n" + "\n" + "\n" + "\n" + "\n" + "\n" + + "DROP TABLE IF EXISTS `dashboard`;\n" + + "/*!40101 SET @saved_cs_client = @@character_set_client */;\n" + + "/*!50503 SET character_set_client = utf8mb4 */;\n" + "CREATE TABLE `dashboard` (\n" + + " `id` int NOT NULL AUTO_INCREMENT,\n" + " `account_id` bigint DEFAULT NULL,\n" + + " `created_at` datetime NOT NULL,\n" + " `created_by` bigint DEFAULT NULL,\n" + + " `updated_at` datetime NOT NULL,\n" + " `updated_by` bigint DEFAULT NULL,\n" + + " `extn1` varchar(255) DEFAULT NULL,\n" + " `extn10` varchar(255) DEFAULT NULL,\n" + + " `extn11` varchar(255) DEFAULT NULL,\n" + " `extn12` varchar(255) DEFAULT NULL,\n" + + " `extn13` varchar(255) DEFAULT NULL,\n" + " `extn14` varchar(255) DEFAULT NULL,\n" + + " `extn15` varchar(255) DEFAULT NULL,\n" + " `extn2` varchar(255) DEFAULT NULL,\n" + + " `extn3` varchar(255) DEFAULT NULL,\n" + " `extn4` varchar(255) DEFAULT NULL,\n" + + " `extn5` varchar(255) DEFAULT NULL,\n" + " `extn6` varchar(255) DEFAULT NULL,\n" + + " `extn7` varchar(255) DEFAULT NULL,\n" + " `extn8` varchar(255) DEFAULT NULL,\n" + + " `extn9` varchar(255) DEFAULT NULL,\n" + " `isdashboard` bit(1) NOT NULL,\n" + + " `model` varchar(5000) DEFAULT NULL,\n" + " `name` varchar(255) DEFAULT NULL,\n" + + " PRIMARY KEY (`id`)\n" + + ") ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n" + + "/*!40101 SET character_set_client = @saved_cs_client */;\n" + "\n" + "\n" + "\n" + + "/*!40000 ALTER TABLE `dashboard` DISABLE KEYS */;\n" + + "INSERT INTO `dashboard` VALUES (1,NULL,'2023-12-04 12:11:04',NULL,'2023-12-04 13:05:56',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,_binary '','[{\\\"charttitle\\\":\\\"index1\\\",\\\"type\\\":\\\"Index\\\",\\\"cols\\\":5,\\\"rows\\\":5,\\\"x\\\":0,\\\"y\\\":0,\\\"chartid\\\":3,\\\"component\\\":\\\"Index\\\",\\\"name\\\":\\\"Index\\\",\\\"slices\\\":false,\\\"donut\\\":false,\\\"chartcolor\\\":false,\\\"chartlegend\\\":false,\\\"showlabel\\\":false,\\\"Read Only\\\":false,\\\"selectedIcon\\\":\\\"IconData(U+0EE2A)\\\",\\\"charturl\\\":\\\"\\\",\\\"chartparameter\\\":\\\"\\\",\\\"datasource\\\":\\\"Default\\\"},{\\\"charttitle\\\":\\\"Index2\\\",\\\"type\\\":\\\"Index\\\",\\\"cols\\\":5,\\\"rows\\\":5,\\\"x\\\":0,\\\"y\\\":0,\\\"chartid\\\":4,\\\"component\\\":\\\"Index\\\",\\\"name\\\":\\\"Index\\\"},{\\\"charttitle\\\":\\\"Index3\\\",\\\"type\\\":\\\"Index\\\",\\\"cols\\\":5,\\\"rows\\\":5,\\\"x\\\":0,\\\"y\\\":0,\\\"chartid\\\":5,\\\"component\\\":\\\"Index\\\",\\\"name\\\":\\\"Index\\\"},{\\\"charttitle\\\":\\\"Doughnut Chart\\\",\\\"type\\\":\\\"Doughnut Chart\\\",\\\"cols\\\":5,\\\"rows\\\":5,\\\"x\\\":0,\\\"y\\\":0,\\\"chartid\\\":6,\\\"component\\\":\\\"Doughnut Chart\\\",\\\"name\\\":\\\"Doughnut Chart\\\",\\\"slices\\\":false,\\\"donut\\\":false,\\\"chartcolor\\\":false,\\\"chartlegend\\\":false,\\\"showlabel\\\":false,\\\"Read Only\\\":false,\\\"charturl\\\":\\\"http://43.205.154.152:30179/entityBuilder/Gaurav_testing/3\\\",\\\"chartparameter\\\":\\\"\\\",\\\"datasource\\\":\\\"Default\\\",\\\"selectedIcon\\\":\\\"IconData(U+0EE29)\\\"},{\\\"cols\\\": 4, \\\"rows\\\": 5, \\\"x\\\": 0, \\\"y\\\": 0, \\\"chartid\\\": 1, \\\"name\\\": \\\"Line Chart\\\", \\\"fieldName\\\": null, \\\"showlabel\\\": true, \\\"chartcolor\\\": null, \\\"chartlegend\\\": true, \\\"charturl\\\": \\\"http://43.205.154.152:30179/entityBuilder/Gaurav_testing\\\",\\\"xAxis\\\": \\\"name\\\",\\\"donut\\\": null, \\\"chartparameter\\\": null, \\\"datastore\\\": null,\\\"datasource\\\": null,\\\"id\\\": null,\\\"slices\\\": null,\\\"yAxis\\\": [\\\"pincode\\\"],\\\"charttitle\\\": \\\"Live Details\\\"}]','myfirstdashboard');\n" + + "/*!40000 ALTER TABLE `dashboard` ENABLE KEYS */;\n" + "\n" + "\n" + "\n" + + "DROP TABLE IF EXISTS `dashboard_builder_t`;\n" + + "/*!40101 SET @saved_cs_client = @@character_set_client */;\n" + + "/*!50503 SET character_set_client = utf8mb4 */;\n" + "CREATE TABLE `dashboard_builder_t` (\n" + + " `id` bigint NOT NULL AUTO_INCREMENT,\n" + " `dashboardname` varchar(255) DEFAULT NULL,\n" + + " PRIMARY KEY (`id`)\n" + ") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n" + + "/*!40101 SET character_set_client = @saved_cs_client */;\n" + "\n" + "\n" + "\n" + + "/*!40000 ALTER TABLE `dashboard_builder_t` DISABLE KEYS */;\n" + + "/*!40000 ALTER TABLE `dashboard_builder_t` ENABLE KEYS */;\n" + "\n" + "\n" + "\n" + + "DROP TABLE IF EXISTS `dashboard_schedule_t`;\n" + + "/*!40101 SET @saved_cs_client = @@character_set_client */;\n" + + "/*!50503 SET character_set_client = utf8mb4 */;\n" + "CREATE TABLE `dashboard_schedule_t` (\n" + + " `id` bigint NOT NULL AUTO_INCREMENT,\n" + " `attachment` varchar(255) DEFAULT NULL,\n" + + " `cc` varchar(255) DEFAULT NULL,\n" + " `cron` varchar(255) DEFAULT NULL,\n" + + " `end_time` datetime DEFAULT NULL,\n" + " `every` varchar(255) DEFAULT NULL,\n" + + " `gateway` varchar(255) DEFAULT NULL,\n" + " `gatewaydone` varchar(255) DEFAULT NULL,\n" + + " `replacement_string` varchar(255) DEFAULT NULL,\n" + " `send_to` varchar(255) DEFAULT NULL,\n" + + " `start_time` datetime DEFAULT NULL,\n" + " `template` varchar(255) DEFAULT NULL,\n" + + " `type` varchar(255) DEFAULT NULL,\n" + " PRIMARY KEY (`id`)\n" + + ") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n" + + "/*!40101 SET character_set_client = @saved_cs_client */;\n" + "\n" + "\n" + "\n" + + "/*!40000 ALTER TABLE `dashboard_schedule_t` DISABLE KEYS */;\n" + + "/*!40000 ALTER TABLE `dashboard_schedule_t` ENABLE KEYS */;\n" + "\n" + "\n" + "\n" + + "DROP TABLE IF EXISTS `dashboardaxis`;\n" + + "/*!40101 SET @saved_cs_client = @@character_set_client */;\n" + + "/*!50503 SET character_set_client = utf8mb4 */;\n" + "CREATE TABLE `dashboardaxis` (\n" + + " `id` bigint NOT NULL AUTO_INCREMENT,\n" + " `april` varchar(255) DEFAULT NULL,\n" + + " `feb` varchar(255) DEFAULT NULL,\n" + " `jan` varchar(255) DEFAULT NULL,\n" + + " `march` varchar(255) DEFAULT NULL,\n" + " `may` varchar(255) DEFAULT NULL,\n" + + " PRIMARY KEY (`id`)\n" + + ") ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n" + + "/*!40101 SET character_set_client = @saved_cs_client */;\n" + "\n" + "\n" + "\n" + + "/*!40000 ALTER TABLE `dashboardaxis` DISABLE KEYS */;\n" + + "INSERT INTO `dashboardaxis` VALUES (1,'5','10','25','3',NULL),(3,'5000','15000','10000','30000',NULL),(4,'5000','15000','10000','30000',NULL),(5,'5000','15000','5','30000',NULL),(6,'5000','15000','10000','30000','2000'),(7,'23','20','25','30','20'),(8,'23','20','25','30','99'),(9,'23','20','25','30','20');\n" + + "/*!40000 ALTER TABLE `dashboardaxis` ENABLE KEYS */;\n" + "\n" + "\n" + "\n" + + "/*!40000 ALTER TABLE `system_paramaters` DISABLE KEYS */;\n" + + "INSERT INTO `system_paramaters` VALUES (1,'test1',0,NULL,NULL,NULL,0,NULL,NULL,NULL,0,_binary '',NULL,0,0,0,NULL,NULL,NULL,0,NULL,0,0,0,NULL,NULL,NULL,NULL,0,0);\n" + + "/*!40000 ALTER TABLE `system_paramaters` ENABLE KEYS */;\n" + "\n" + "\n" + + "DROP TABLE IF EXISTS `sys_param_upload`;\n" + + "/*!40101 SET @saved_cs_client = @@character_set_client */;\n" + + "/*!50503 SET character_set_client = utf8mb4 */;\n" + "CREATE TABLE `sys_param_upload` (\n" + + " `attachment_id` int NOT NULL,\n" + " `attachment` longblob,\n" + + " `attachment_filename` varchar(255) DEFAULT NULL,\n" + + " `attachment_type` varchar(255) DEFAULT NULL,\n" + " `cancel_status` varchar(255) NOT NULL,\n" + + " `external_flag` varchar(255) DEFAULT NULL,\n" + " `updated_by` varchar(255) DEFAULT NULL,\n" + + " `sys_param_entity_id` int DEFAULT NULL,\n" + " PRIMARY KEY (`attachment_id`),\n" + + " KEY `FKl1h7bcgpr1y10ydiqw849vq99` (`sys_param_entity_id`),\n" + + " CONSTRAINT `FKl1h7bcgpr1y10ydiqw849vq99` FOREIGN KEY (`sys_param_entity_id`) REFERENCES `system_paramaters` (`id`)\n" + + ") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n" + + "/*!40101 SET character_set_client = @saved_cs_client */;\n" + "\n" + "\n" + "\n" + + "/*!40000 ALTER TABLE `sys_param_upload` DISABLE KEYS */;\n" + + "/*!40000 ALTER TABLE `sys_param_upload` ENABLE KEYS */;\n" + "\n" + "\n" + + "-- Dump completed on 2024-01-27 15:45:01"; + return sql; + + } + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/BulkUpload/Controllers/BulkUpload_Controller.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/BulkUpload/Controllers/BulkUpload_Controller.java new file mode 100644 index 0000000..2961b42 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/BulkUpload/Controllers/BulkUpload_Controller.java @@ -0,0 +1,43 @@ +package com.realnet.BulkUpload.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import com.realnet.BulkUpload.Entity.BulkUpload_t; +import com.realnet.BulkUpload.Services.BulkUpload_Service; +@RequestMapping(value = "/BulkUpload") +@RestController +public class BulkUpload_Controller { + + @Autowired + private BulkUpload_Service Service; + + @PostMapping("/BulkUpload") + public BulkUpload_t Savedata(@RequestBody BulkUpload_t data) { + BulkUpload_t save = Service.Savedata(data) ; + return save; + } + + @GetMapping("/BulkUpload") + public List getdetails() { + List get = Service.getdetails(); + return get; +} + +@GetMapping("/BulkUpload/{id}") + public BulkUpload_t getdetailsbyId(@PathVariable Long id ) { + BulkUpload_t get = Service.getdetailsbyId(id); + return get; + + } +@DeleteMapping("/BulkUpload/{id}") + public void delete_by_id(@PathVariable Long id ) { + Service.delete_by_id(id); + + } + +@PutMapping("/BulkUpload/{id}") + public BulkUpload_t update(@RequestBody BulkUpload_t data,@PathVariable Long id ) { + BulkUpload_t update = Service.update(data,id); + return update; + } +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/BulkUpload/Controllers/DataImportController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/BulkUpload/Controllers/DataImportController.java new file mode 100644 index 0000000..ee2fdea --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/BulkUpload/Controllers/DataImportController.java @@ -0,0 +1,1082 @@ +package com.realnet.BulkUpload.Controllers; + +import org.apache.commons.lang3.StringUtils; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.sql.Timestamp; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import java.util.Set; + +import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.CellType; +import org.apache.poi.ss.usermodel.DateUtil; +import org.apache.poi.ss.usermodel.Row; +import org.apache.poi.ss.usermodel.Sheet; +import org.apache.poi.ss.usermodel.Workbook; +import org.apache.poi.ss.usermodel.WorkbookFactory; +import org.apache.poi.xssf.usermodel.XSSFCell; +import org.apache.poi.xssf.usermodel.XSSFRow; +import org.apache.poi.xssf.usermodel.XSSFSheet; +import org.apache.poi.xssf.usermodel.XSSFWorkbook; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.core.io.ByteArrayResource; +import org.springframework.core.io.InputStreamResource; +import org.springframework.core.io.Resource; +import org.springframework.dao.DataIntegrityViolationException; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.jdbc.core.JdbcTemplate; +//import org.springframework.mock.web.MockMultipartFile; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.realnet.BulkUpload.Repository.BulkUpload_Repository; +import com.realnet.BulkUpload.Services.BulkUpload_Service; +import com.realnet.template.entity.TemplateFileUpload; +import com.realnet.template.repository.TemplatedataRepo; +import com.realnet.template.service.DynamicTemplateService; +import com.realnet.template.service.FileUploadService; + +@RestController +@RequestMapping("api/BulkUpload") +public class DataImportController { + @Autowired + private JdbcTemplate jdbcTemplate; + @Autowired + private TemplatedataRepo temprepo; + @Autowired + private DynamicTemplateService dynamicTemplateService; + + @Autowired + private BulkUpload_Service bulkUpload_Service; + + @Autowired + private BulkUpload_Repository bulkUpload_Repository; + + @Autowired + private FileUploadService fileUploadService; + + @Autowired + private ObjectMapper objectMapper; + + @Value("${projectPath}") + private String projectPath; + + @PostMapping("/templatetojson/{id}") + public ResponseEntity convertFileToJson(@PathVariable Long id) throws IOException { + // Retrieve the TemplateFileUpload entity based on the provided ID + Optional fileUploadOptional = temprepo.findById(id); + + TemplateFileUpload fileUpload = fileUploadOptional.get(); + String location = fileUpload.getFile_location(); + String fileName = fileUpload.getFile_changed_name() + ".xlsx"; + String filePath = location + File.separator + "processingfile" + File.separator + fileName; + File file = new File(filePath); + if (!file.exists()) { + // Handle the case where the file is not found in the specified location + return ResponseEntity.notFound().build(); + } + + try (FileInputStream fis = new FileInputStream(file)) { + XSSFWorkbook workbook = new XSSFWorkbook(fis); + LinkedHashMap>> result = new LinkedHashMap<>(); + + for (int i = 0; i < workbook.getNumberOfSheets(); i++) { + XSSFSheet sheet = workbook.getSheetAt(i); + String sheetName = sheet.getSheetName(); + + List> sheetDataList = new ArrayList<>(); + + XSSFRow headerRow = sheet.getRow(0); + for (int rowNum = 1; rowNum <= sheet.getLastRowNum(); rowNum++) { + XSSFRow row = sheet.getRow(rowNum); + + if (row != null) { + LinkedHashMap rowData = new LinkedHashMap<>(); + for (int cellNum = 0; cellNum < row.getLastCellNum(); cellNum++) { + XSSFCell cell = row.getCell(cellNum); + if (cell != null) { + String columnName = headerRow.getCell(cellNum).getStringCellValue(); + String cellValue; + + // Check if the cell contains a date + if (cell.getCellType() == CellType.NUMERIC && DateUtil.isCellDateFormatted(cell)) { + // If it's a date, format it as "dd-MMM-yyyy" + Date dateCellValue = cell.getDateCellValue(); + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); + cellValue = dateFormat.format(dateCellValue); + } else { + // If not a date, convert the cell value to a string + cellValue = cell.toString(); + } + + rowData.put(columnName, cellValue); + } + } + sheetDataList.add(rowData); + } + } + + // Add the sheet data to the result LinkedHashMap with the sheet name as the key + result.put(sheetName, sheetDataList); + } + + return ResponseEntity.ok(result); + } catch (Exception e) { + // Handle any exceptions that may occur during processing + return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("Error processing Excel file."); + } + } + + @GetMapping("/getHeaders/{id}") + public ResponseEntity getAllSheetHeaders(@PathVariable Long id) throws IOException { + Optional fileUploadOptional = temprepo.findById(id); + + TemplateFileUpload fileUpload = fileUploadOptional.orElse(null); + + if (fileUpload == null) { + return ResponseEntity.notFound().build(); + } + + String location = fileUpload.getFile_location(); + String fileName = fileUpload.getFile_changed_name() + ".xlsx"; + String filePath = location + File.separator + "processingfile" + File.separator + fileName; + File file = new File(filePath); + + if (!file.exists()) { + return ResponseEntity.notFound().build(); + } + + try (Workbook workbook = WorkbookFactory.create(file)) { + Map>> sheetHeadersMap = new LinkedHashMap<>(); + + for (int i = 0; i < workbook.getNumberOfSheets(); i++) { + Sheet sheet = workbook.getSheetAt(i); + List> sheetHeaders = new ArrayList<>(); + + Row headerRow = sheet.getRow(0); + + if (headerRow != null) { + for (Cell cell : headerRow) { + String header = cell.getStringCellValue(); + Map headerObject = new LinkedHashMap<>(); + headerObject.put("headerName", header); + headerObject.put("value", ""); // Empty value + sheetHeaders.add(headerObject); + } + } + + sheetHeadersMap.put(sheet.getSheetName(), sheetHeaders); + } + + return ResponseEntity.ok(sheetHeadersMap); + } catch (Exception e) { + return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("Error processing Excel file."); + } + } + + @PostMapping("/jsonkeychange") + public ResponseEntity>>>> transformData( + @RequestParam("updatedKeyJson") String updatedKeyJson, + @RequestParam("oldKeyDataJson") String oldKeyDataJson) throws IOException { + try { + // Deserialize JSON strings into JSON objects + JsonNode updatedKeyJsonObject = objectMapper.readTree(updatedKeyJson); + JsonNode oldKeyDataJsonArray = objectMapper.readTree(oldKeyDataJson); + + // Create a result list with a single element + List>>> result = new ArrayList<>(); + + // Create a single element to hold the transformed data + Map>> transformedDataMap = new LinkedHashMap<>(); + + // Iterate through updatedKeyJson keys (e.g., "Customer", "Site") + Iterator updatedKeys = updatedKeyJsonObject.fieldNames(); + while (updatedKeys.hasNext()) { + String key = updatedKeys.next(); + JsonNode updatedKeyMappings = updatedKeyJsonObject.get(key); + + // Create a mapping of headerName to value from updatedKeyJson + Map keyMapping = new LinkedHashMap<>(); + for (JsonNode mapping : updatedKeyMappings) { + String headerName = mapping.get("headerName").asText(); + String value = mapping.get("value").asText(); + keyMapping.put(headerName, value); + } + + // Find the corresponding data array in oldKeyDataJsonArray + for (JsonNode oldDataArray : oldKeyDataJsonArray) { + if (oldDataArray.has(key)) { + JsonNode dataArray = oldDataArray.get(key); + List> transformedData = new ArrayList<>(); + + // Iterate through oldKeyDataJson for the given key + for (JsonNode item : dataArray) { + Map transformedItem = new LinkedHashMap<>(); + Iterator> fields = item.fields(); + + // Map old keys to new keys using keyMapping + while (fields.hasNext()) { + Map.Entry field = fields.next(); + String oldKey = field.getKey(); + String newKey = keyMapping.get(oldKey); + JsonNode valueNode = field.getValue(); + Object newValue = valueNode.isTextual() && ("TRUE".equalsIgnoreCase(valueNode.asText()) + || "FALSE".equalsIgnoreCase(valueNode.asText())) + ? Boolean.parseBoolean(valueNode.asText()) + : valueNode.asText(); + transformedItem.put(newKey, newValue); + } + + transformedData.add(transformedItem); + } + + // Add the transformed data to the single element + transformedDataMap.put(key, transformedData); + } + } + } + + // Add the single element to the result list + result.add(transformedDataMap); + + return new ResponseEntity<>(result, HttpStatus.OK); + } catch (Exception e) { + e.printStackTrace(); + return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR); + } + } + /////////// VERY IMPORTANT NOT DELETE THE BELOW/////////// + +// @PostMapping("/DownloadExcel/{id}") +// public ResponseEntity importdatadownloadexcel(@PathVariable Long id, +// @RequestBody Map>> jsonData) { +// +// TemplateFileUpload templateFileUpload = fileUploadService.getTemplatebyid(id); +// +// String entity_name = templateFileUpload.getEntity_name(); +// +// BulkUpload_t bulkUpload_t = bulkUpload_Repository.getentityName(entity_name); +// String ruleLine = bulkUpload_t.getRule_line(); +// +// JsonParser parser = new JsonParser(); +// JsonElement element = parser.parse(ruleLine); +// JsonArray array = element.getAsJsonArray(); +// Iterator iterator = array.iterator(); +// +// String fromsheet = null; +// String fromColumn = null; +// String validationTable = null; +// String checkColumn = null; +// String useColumn = null; +// String replacementtable = null; +// String replacementcolumn = null; +// +// while (iterator.hasNext()) { +// JsonElement next = iterator.next(); +// JsonObject jsonObject = next.getAsJsonObject(); +// +// fromsheet = jsonObject.get("fromsheet").getAsString(); +// fromColumn = jsonObject.get("fromColumn").getAsString(); +// validationTable = jsonObject.get("validationTable").getAsString(); +// checkColumn = jsonObject.get("checkColumn").getAsString(); +// useColumn = jsonObject.get("useColumn").getAsString(); +// replacementtable = jsonObject.get("useTable").getAsString(); +// replacementcolumn = jsonObject.get("replacementcolumn").getAsString(); +// +// break; +// } +// +// String customerTableName = validationTable; +// String siteTableName = replacementtable; +// +// try { +// Set tableNames = jsonData.keySet(); // Get all unique table names +// +// String siteEntityName = null; +// for (String tableName : tableNames) { +// List> tableData = jsonData.get(tableName); +// +// // Process tableData based on the tableName (e.g., "Site" or "Customer") +// System.out.println("Table Name: " + tableName); +// for (Map row : tableData) { +// // Process individual rows within the table data +// System.out.println("Row Data: " + row); +// } +// } +// +// List> processedDataList = new ArrayList<>(); // List to hold processed data rows +// +// // Iterate through each customer data entry +// List> customerData = jsonData.get("Customer"); +// for (Map insertCustomerData : customerData) { +// String customerName = (String) insertCustomerData.get(checkColumn); +// +// // Check if the customerName is not null and iterate through "Site" data +// List> siteData = jsonData.get(fromsheet); +// +// List> matchedSiteData = new ArrayList<>(); +// if (customerName != null) { +// // Iterate through "Site" data and check for a matching "entity_name" +// for (Map siteRow : siteData) { +// // Specify the index as "AM" (39th column) +//// String columnIndex = "AM"; +// String columnIndex = fromColumn; +// +// // Retrieve the value at the specified index +// +// for (Map.Entry entry : siteRow.entrySet()) { +// if (entry.getKey().equals(columnIndex)) { +// siteEntityName = (String) entry.getValue(); +// break; // Exit the loop once the value is found +// } +// } +// +// if (customerName.equals(siteEntityName)) { +// // Add the matching "Site" data to the list +// matchedSiteData.add(siteRow); +// } +// } +// } +// +// ObjectMapper objectMapper = new ObjectMapper(); +// String insertCustomerDataJson = objectMapper.writeValueAsString(insertCustomerData); +// String matchedSiteDataJson = objectMapper.writeValueAsString(matchedSiteData); +// +// String customerSql = getInsertQuery(customerTableName, insertCustomerData); +// +// // Insert data into the customer table +// Object[] customerValues = new Object[insertCustomerData.size() + 5]; +// int index = 0; +// for (Object value : insertCustomerData.values()) { +// customerValues[index++] = value; +// } +// customerValues[index++] = new Timestamp(System.currentTimeMillis()); // created_at +// customerValues[index++] = null; // created_by +// customerValues[index++] = null; // updated_by +// customerValues[index++] = new Timestamp(System.currentTimeMillis()); // updated_at +// customerValues[index] = null; // account_id +// jdbcTemplate.update(customerSql, customerValues); +// +// // we can use useColumn here +// Long generatedId = jdbcTemplate.queryForObject("SELECT LAST_INSERT_ID()", Long.class); +// +// List> insertMatchedSiteData = new ArrayList<>(); // List to hold processed data rows +// +// for (Map siteRow : matchedSiteData) { +// // Replace "Customer Name" with "customer_master_id" if it exists +// if (siteRow.containsKey(siteEntityName)) { +// siteRow.put(replacementcolumn, generatedId); +// siteRow.remove(siteEntityName); +// } +// insertMatchedSiteData.add(siteRow); +// } +// +// for (Map siteRow : insertMatchedSiteData) { +// Object[] siteValues = new Object[siteRow.size() + 5]; // Create a new array for each row +// +// int siteIndex = 0; +// for (Object value : siteRow.values()) { +// siteValues[siteIndex++] = value; +// } +// +// siteValues[siteIndex++] = new Timestamp(System.currentTimeMillis()); // created_at +// siteValues[siteIndex++] = null; // created_by +// siteValues[siteIndex++] = null; // updated_by +// siteValues[siteIndex++] = new Timestamp(System.currentTimeMillis()); // updated_at +// siteValues[siteIndex] = null; // account_id +// +// String siteSql = getInsertQuery(siteTableName, siteRow); +// jdbcTemplate.update(siteSql, siteValues); +// } +// +// // Add the processed customer data to the list +// processedDataList.add(insertCustomerData); +// } +// +// // Use a LinkedHashMap to preserve insertion order in the response +// Map>> response = new LinkedHashMap<>(); +// response.put("result", processedDataList); +// +// return new ResponseEntity<>(response, HttpStatus.OK); +// +// } catch (Exception e) { +// e.printStackTrace(); +// // Handle exceptions and return an appropriate response +// return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR); +// } +// } + + @PostMapping("/DownloadExcel/{id}") + public ResponseEntity importdatadownloadexcel( @PathVariable Long id, + @RequestParam(name = "jsonData") String jsonDataParam, + @RequestParam(name = "ruleData") String ruleDataParam) + throws JsonMappingException, JsonProcessingException, UnsupportedEncodingException { + + + + // Inside your method + ObjectMapper objectMapper = new ObjectMapper(); + JsonNode ruleDataNode = objectMapper.readTree(ruleDataParam); + + if (ruleDataNode.isArray() && ruleDataNode.isEmpty()) { + // If ruleDataParam is an empty JSON array, directly upload data to the table + return uploadDataToTable(id, jsonDataParam); + } + + + + // Parse jsonDataParam to extract the JSON data + Map>> jsonData = objectMapper.readValue( + URLDecoder.decode(jsonDataParam, "UTF-8"), new TypeReference>>>() { + }); + + // Parse ruleDataParam to extract the JSON data + List> ruleData = objectMapper.readValue(URLDecoder.decode(ruleDataParam, "UTF-8"), + new TypeReference>>() { + }); + + String fromsheet = null; + String fromColumn = null; + String validationTable = null; + String checkColumn = null; + String useColumn = null; + String replacementtable = null; + String replacementcolumn = null; + + + + if (ruleData != null && !ruleData.isEmpty()) { + // Assuming you want to access the first element in the array + Map rule = ruleData.get(0); + + fromsheet = rule.get("fromsheet"); + fromColumn = rule.get("fromColumn"); + validationTable = rule.get("validationTable"); + checkColumn = rule.get("checkColumn"); + useColumn = rule.get("useColumn"); + replacementtable = rule.get("replacementTable"); + replacementcolumn = rule.get("replacementcolumn"); + } + + String customerTableName = validationTable; + String siteTableName = replacementtable; + + try { + + String siteEntityName = null; + String responseMessage = null; + // Create a workbook + XSSFWorkbook workbook = new XSSFWorkbook(); + + // Create a sheet for customer data + XSSFSheet customerSheet = workbook.createSheet("Customer"); + + // Create a sheet for site data + XSSFSheet siteSheet = workbook.createSheet("Site"); + + + List> customerDataList = new ArrayList<>(); + List> siteDataList = new ArrayList<>(); + + // Get the column names for customer data + List customerColumnNames = getColumnNames(jsonData.get("Customer").get(0)); + // Create the header row for customer data + XSSFRow customerHeaderRow = customerSheet.createRow(0); + for (int i = 0; i < customerColumnNames.size(); i++) { + XSSFCell cell = customerHeaderRow.createCell(i); + cell.setCellValue(customerColumnNames.get(i)); + } + + // Get the column names for site data + List siteColumnNames = getColumnNames(jsonData.get(fromsheet).get(0)); + // Create the header row for site data + XSSFRow siteHeaderRow = siteSheet.createRow(0); + for (int i = 0; i < siteColumnNames.size(); i++) { + XSSFCell cell = siteHeaderRow.createCell(i); + cell.setCellValue(siteColumnNames.get(i)); + } + + // Iterate through each customer data entry + List> customerData = jsonData.get("Customer"); + for (Map insertCustomerData : customerData) { + String customerName = (String) insertCustomerData.get(checkColumn); + + Map processedRow = new HashMap<>(); + + // Check if the customerName is not null and iterate through "Site" data + List> siteData = jsonData.get(fromsheet); + + List> matchedSiteData = new ArrayList<>(); + if (customerName != null) { + // Iterate through "Site" data and check for a matching "entity_name" + for (Map siteRow : siteData) { + String columnIndex = fromColumn; + + String cellValue = getCellValue(jsonData, fromsheet, columnIndex); + responseMessage = cellValue; + + for (Map.Entry entry : siteRow.entrySet()) { + if (entry.getKey().equals(responseMessage)) { + siteEntityName = (String) entry.getValue(); + break; // Exit the loop once the value is found + } + } + + if (customerName.equals(siteEntityName)) { + // Add the matching "Site" data to the list + matchedSiteData.add(siteRow); + } + } + } + + String insertCustomerDataJson = objectMapper.writeValueAsString(insertCustomerData); + String matchedSiteDataJson = objectMapper.writeValueAsString(matchedSiteData); + + String customerSql = getInsertQuery(customerTableName, insertCustomerData); + + // Insert data into the customer table + try { + Object[] customerValues = new Object[insertCustomerData.size() + 5]; + int index = 0; + for (Object value : insertCustomerData.values()) { + customerValues[index++] = value; + } + customerValues[index++] = new Timestamp(System.currentTimeMillis()); // created_at + customerValues[index++] = null; // created_by + customerValues[index++] = null; // updated_by + customerValues[index++] = new Timestamp(System.currentTimeMillis()); // updated_at + customerValues[index] = null; // account_id + jdbcTemplate.update(customerSql, customerValues); + processedRow.putAll(insertCustomerData); + processedRow.put("Status", "Success"); + processedRow.put("Exception", "NA"); + customerDataList.add(processedRow); + } catch (DataIntegrityViolationException e) { + processedRow.putAll(insertCustomerData); + processedRow.put("Status", "Error"); + String exceptionMessage = extractExceptionMessage(e); + processedRow.put("Exception", exceptionMessage); + e.printStackTrace(); + customerDataList.add(processedRow); + } + + // Get the generated ID from the database + Long generatedId = jdbcTemplate.queryForObject("SELECT LAST_INSERT_ID()", Long.class); + + List> newMatchedSiteData = new ArrayList<>(); + + for (Map siteRow : matchedSiteData) { + // Replace "Customer Name" with "customer_master_id" if it exists + if (siteRow.containsKey(responseMessage)) { + siteRow.put(replacementcolumn, generatedId); + // siteRow.remove(responseMessage); + // siteRow.remove(responseMessage); + } + newMatchedSiteData.add(siteRow); + } + + // Insert site data for this customer + for (Map siteRow : newMatchedSiteData) { + Map siteProcessedRow = new HashMap<>(); + try { + Object[] siteValues = new Object[siteRow.size() + 5]; + + int siteIndex = 0; + for (Object value : siteRow.values()) { + siteValues[siteIndex++] = value; + } + + siteValues[siteIndex++] = new Timestamp(System.currentTimeMillis()); // created_at + siteValues[siteIndex++] = null; // created_by + siteValues[siteIndex++] = null; // updated_by + siteValues[siteIndex++] = new Timestamp(System.currentTimeMillis()); // updated_at + siteValues[siteIndex] = null; // account_id + + String siteSql = getInsertQuery(siteTableName, siteRow); + jdbcTemplate.update(siteSql, siteValues); + siteProcessedRow.putAll(siteRow); + siteProcessedRow.put("Status", "Success"); + siteProcessedRow.put("Exception", "NA"); + siteDataList.add(siteProcessedRow); + } catch (DataIntegrityViolationException ex) { + siteProcessedRow.putAll(siteRow); + siteProcessedRow.put("Status", "Error"); + String exceptionMessage = extractExceptionMessage(ex); + siteProcessedRow.put("Exception", exceptionMessage); + ex.printStackTrace(); + siteDataList.add(siteProcessedRow); + } + } + } + + // Write customer data to the customer sheet + writeDataToSheet(customerDataList, customerSheet, customerColumnNames); + // Write site data to the site sheet + writeDataToSheet(siteDataList, siteSheet, siteColumnNames); + + String filepath = "import-data"; + + long unixTimestamp = System.currentTimeMillis(); + + // Create the file name with the Unix timestamp + String excelFile = "failed_records_" + unixTimestamp + ".xlsx"; + + // String excelFilePath = "D:\\REAL IT + // SOLUTION\\SureSetuOld\\suresetu-mohasin205\\backend\\import-data\\processingfile\\failed_records.xlsx"; + + String location = projectPath + File.separator + filepath; + File dir2 = new File(location); + if (!dir2.exists()) { + dir2.mkdir(); + } + +// String file_name2 = file.getOriginalFilename(); + + File staticdir2 = new File(location + "/statusFile"); + if (!staticdir2.exists()) { + staticdir2.mkdir(); + } + + String excelFilePath = staticdir2 + File.separator + excelFile; + + Optional fileUploadOptional = temprepo.findById(id); + + if (fileUploadOptional.isPresent()) { + TemplateFileUpload fileUpload = fileUploadOptional.get(); + fileUpload.setDownloadfileLocation(excelFilePath); + temprepo.save(fileUpload); + } + + try (FileOutputStream fileOutputStream = new FileOutputStream(excelFilePath)) { + workbook.write(fileOutputStream); + } catch (IOException e) { + e.printStackTrace(); + // Handle the exception appropriately + } + + return ResponseEntity.ok().body("Excel file saved successfully to: " + excelFilePath); + + } catch (Exception e) { + e.printStackTrace(); + // Handle exceptions and return an appropriate response + return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR); + } + } + + private List getColumnNames(Map dataRow) { + return new ArrayList<>(dataRow.keySet()); + } + + // Method to write data to a sheet + private void writeDataToSheet(List> dataList, XSSFSheet sheet, List columnNames) { + int rowIndex = 0; + // Create the header row + XSSFRow headerRow = sheet.createRow(rowIndex++); + for (int i = 0; i < columnNames.size(); i++) { + XSSFCell cell = headerRow.createCell(i); + cell.setCellValue(columnNames.get(i)); + } + // Add "Status" and "Exception" columns to the sheet + headerRow.createCell(columnNames.size()).setCellValue("Status"); + headerRow.createCell(columnNames.size() + 1).setCellValue("Exception"); + + // Write the data rows + for (Map row : dataList) { + XSSFRow dataRow = sheet.createRow(rowIndex++); + int columnIndex = 0; + for (String columnName : columnNames) { + Object value = row.get(columnName); + XSSFCell cell = dataRow.createCell(columnIndex++); + cell.setCellValue(value != null ? value.toString() : ""); + } + // Add "Status" and "Exception" values to the data row + dataRow.createCell(columnIndex++).setCellValue(row.get("Status").toString()); + dataRow.createCell(columnIndex).setCellValue(row.get("Exception").toString()); + } + + } + + + + private ResponseEntity uploadDataToTable(Long id, String jsonDataParam) { + try { + // Get table name from TemplateFileUpload entity + Optional fileUploadOptional = temprepo.findById(id); + if (fileUploadOptional.isPresent()) { + TemplateFileUpload fileUpload = fileUploadOptional.get(); +// String tableName = fileUpload.getTablename(); + String tableName = "aa"; + // Insert data into the specified table + insertDataIntoTable(tableName, jsonDataParam); + return ResponseEntity.ok().body("Data uploaded successfully to table: " + tableName); + } else { + return ResponseEntity.status(HttpStatus.NOT_FOUND).body("Template file with id " + id + " not found"); + } + } catch (Exception e) { + e.printStackTrace(); + // Handle exceptions and return an appropriate response + return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR); + } + } + + + private void insertDataIntoTable(String tableName, String jsonDataParam) { + try { + ObjectMapper objectMapper = new ObjectMapper(); + // Parse jsonDataParam to extract the JSON data + Map>> jsonData = objectMapper.readValue( + URLDecoder.decode(jsonDataParam, "UTF-8"), new TypeReference>>>() {}); + + // Iterate over the entries of the jsonData map + for (Map.Entry>> entry : jsonData.entrySet()) { + String sheetName = entry.getKey(); // Get the sheet name dynamically + List> data = entry.getValue(); // Get the list of maps dynamically + + // Now you have the list of maps for the current sheet, you can iterate through it and perform your database insertion logic + for (Map rowData : data) { + StringBuilder columns = new StringBuilder(); + StringBuilder values = new StringBuilder(); + List params = new ArrayList<>(); + + // Build column names and values dynamically + for (Map.Entry columnEntry : rowData.entrySet()) { + if (columns.length() > 0) { + columns.append(", "); + values.append(", "); + } + columns.append(columnEntry.getKey()); + values.append("?"); + params.add(columnEntry.getValue()); + } + + // Construct the SQL query + String sql = "INSERT INTO " + tableName + " (" + columns + ") VALUES (" + values + ")"; + + // Execute the SQL query + jdbcTemplate.update(sql, params.toArray()); + } + } + } catch (Exception e) { + e.printStackTrace(); + // Handle exceptions appropriately + } + } + + + + private String extractExceptionMessage(DataIntegrityViolationException e) { + String errorMessage = e.getMessage(); + int startIndex = errorMessage.indexOf("Incorrect "); + int endIndex = errorMessage.indexOf("at row"); + if (startIndex != -1 && endIndex != -1) { + return errorMessage.substring(startIndex, endIndex).trim(); + } + return errorMessage; + } + + private String getInsertQuery(String tableName, Map data) { + StringBuilder sqlBuilder = new StringBuilder(); + sqlBuilder.append("INSERT INTO "); + sqlBuilder.append(tableName); + sqlBuilder.append(" ("); + sqlBuilder.append(String.join(", ", data.keySet())); + sqlBuilder.append(", created_at, created_by, updated_by, updated_at, account_id) VALUES ("); + sqlBuilder.append(String.join(", ", Collections.nCopies(data.size(), "?"))); + sqlBuilder.append(", ?, ?, ?, ?, ?)"); + return sqlBuilder.toString(); + } + + @GetMapping("/sheet/{id}") + public ResponseEntity getSheet(@PathVariable Long id) throws IOException { + ResponseEntity jsonData = convertFileToJsonforsheet(id); + + return ResponseEntity.ok(jsonData.getBody()); + } + + public ResponseEntity convertFileToJsonforsheet(Long id) throws IOException { + // Retrieve the TemplateFileUpload entity based on the provided ID + Optional fileUploadOptional = temprepo.findById(id); + + if (!fileUploadOptional.isPresent()) { + // Handle the case where the file is not found in the specified location + return ResponseEntity.notFound().build(); + } + + TemplateFileUpload fileUpload = fileUploadOptional.get(); + String location = fileUpload.getFile_location(); + String fileName = fileUpload.getFile_changed_name() + ".xlsx"; + String filePath = location + File.separator + "processingfile" + File.separator + fileName; + File file = new File(filePath); + + if (!file.exists()) { + // Handle the case where the file is not found in the specified location + return ResponseEntity.notFound().build(); + } + + try (FileInputStream fis = new FileInputStream(file)) { + XSSFWorkbook workbook = new XSSFWorkbook(fis); + List sheetNames = new ArrayList<>(); + + for (int i = 0; i < workbook.getNumberOfSheets(); i++) { + XSSFSheet sheet = workbook.getSheetAt(i); + String sheetName = sheet.getSheetName(); + sheetNames.add(sheetName); + } + + return ResponseEntity.ok(sheetNames); + } catch (Exception e) { + // Handle any exceptions that may occur during processing + return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("Error processing Excel file."); + } + } + + + + @GetMapping("/downloadImportStatement/{id}") + public ResponseEntity downloadImportStatement(@PathVariable Long id) { + // Retrieve the file data from the database based on the ID + TemplateFileUpload fileUpload = fileUploadService.getFileById(id); + + // Get the file location from the entity + String fileLocation = fileUpload.getDownloadfileLocation(); +// String filename = fileUpload.getDownloadfileName(); +// +// String filepath = fileLocation + File.separator + filename; + + try { + // Read the file content from the specified location + byte[] fileContent = Files.readAllBytes(Paths.get(fileLocation)); + + // Create a ByteArrayResource from the file content + ByteArrayResource resource = new ByteArrayResource(fileContent); + + return ResponseEntity.ok().contentType(MediaType.APPLICATION_OCTET_STREAM) + .header(HttpHeaders.CONTENT_DISPOSITION, + "attachment; filename=\"" + fileUpload.getFile_name() + "\"") + .body(resource); + } catch (IOException e) { + // Handle any potential exceptions (e.g., file not found) + e.printStackTrace(); + return ResponseEntity.status(500).body("Error occurred while reading the file."); + } + } + + + //get table column + + @GetMapping("/columns/{tableName}") + public List getColumnNames(@PathVariable String tableName) { + Set columnNamesSet = new HashSet<>(); + String convertedTableName = tableName; + List columnNames = jdbcTemplate.queryForList( + "SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = ?", + new Object[] { convertedTableName }, String.class); + // Exclude specific column names + List excludedColumns = Arrays.asList("id", "account_id", "updated_at", "created_at", "created_by", + "updated_by"); + for (String columnName : columnNames) { + if (!excludedColumns.contains(columnName)) { + columnNamesSet.add(columnName); + } + } + return new ArrayList<>(columnNamesSet); + } + + + + + + private String getCellValue(Map>> jsonData, String sheetName, + String cellAddress) throws IOException { + if (jsonData.containsKey(sheetName)) { + List> sheetData = jsonData.get(sheetName); + int size = sheetData.size(); + System.out.println(size); + Map firstRowData = sheetData.get(0); + + // Separate the numeric part (row part) and non-numeric part (column part) + String rowPart = ""; + String columnPart = ""; + + for (char c : cellAddress.toCharArray()) { + if (Character.isDigit(c)) { + rowPart += c; + } else { + columnPart += c; + } + } + + System.out.println("Column Part: " + columnPart); + System.out.println("Row Part: " + rowPart); + + int columnIndex = getColumnIndex(columnPart); // Get the column index based on the columnPart +// int rowIndex = Integer.parseInt(rowPart) - 1; // Excel-style 1-based index + System.out.println("Column Index: " + columnIndex); + + + if (columnIndex >= 0 ) { + // Get the list of keys from the firstRowData map + List keys = new ArrayList<>(firstRowData.keySet()); + + // Check if the columnIndex is within the range of keys + if (columnIndex < keys.size()) { + String columnName = keys.get(columnIndex); + return columnName; + } + } + } + + + + return null; + } + + + + + + private int getColumnIndex(String columnPart) { + int index = 0; + int multiplier = 1; + + // Iterate through the columnPart in reverse order (right to left) + for (int i = columnPart.length() - 1; i >= 0; i--) { + char c = columnPart.charAt(i); + index += (c - 'A' + 1) * multiplier; + multiplier *= 26; // Multiply by 26 for each position to calculate the index + } + + return index - 1; // Subtract 1 to get a 0-based index + } + + + + + +// @PostMapping("/DownloadExcel/{entityName}") +// public ResponseEntity importdatadownloadexcel(@PathVariable String entityName, +// @RequestBody List> data) throws IOException { +// List> processedData = processData(entityName, data); +// if (!processedData.isEmpty()) { +// Workbook workbook = createWorkbook(processedData); +// Resource resource = createExcelResource(workbook); +// return ResponseEntity.ok() +// .contentType(MediaType.parseMediaType("application/vnd.ms-excel")) +// .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=failed_records.xlsx") +// .body(resource); +// } +// return ResponseEntity.ok().body(null); +// } + + + + private List> processData(String entityName, List> data) { + List> processedData = new ArrayList<>(); + try { + String convertedTableName = entityName; + String sql = getInsertQuery(convertedTableName, data.get(0)); + for (int i = 0; i < data.size(); i++) { + Map row = data.get(i); + Map processedRow = new HashMap<>(); + try { + Object[] values = new Object[row.size() + 5]; // +5 for the additional columns + int index = 0; + for (Object value : row.values()) { + values[index++] = value; + } + values[index++] = new Timestamp(System.currentTimeMillis()); // created_at + values[index++] = null; // created_by + values[index++] = null; // updated_by + values[index++] = new Timestamp(System.currentTimeMillis()); // updated_at + values[index] = null; // account_id + jdbcTemplate.update(sql, values); + processedRow.putAll(row); + processedRow.put("Status", "Success"); + processedRow.put("Exception", "NA"); + } catch (DataIntegrityViolationException e) { + processedRow.putAll(row); + processedRow.put("Status", "Error"); + String exceptionMessage = extractExceptionMessage(e); + processedRow.put("Exception", exceptionMessage); + } + processedData.add(processedRow); + } + } catch (Exception e) { + // Handle any exceptions here if needed + } + return processedData; + } + + + + private Workbook createWorkbook(List> processedData) { + Workbook workbook = new XSSFWorkbook(); + Sheet sheet = workbook.createSheet("Failed Records"); + + // Add column headers to the worksheet + Row headerRow = sheet.createRow(0); + int columnIndex = 0; + for (String key : processedData.get(0).keySet()) { + Cell cell = headerRow.createCell(columnIndex++); + cell.setCellValue(key); + } + + // Add data rows to the worksheet + int rowIndex = 1; + for (Map row : processedData) { + Row dataRow = sheet.createRow(rowIndex++); + columnIndex = 0; + for (Object value : row.values()) { + Cell cell = dataRow.createCell(columnIndex++); + cell.setCellValue(value.toString()); + } + } + + return workbook; + } + + private Resource createExcelResource(Workbook workbook) throws IOException { + ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); + workbook.write(outputStream); + ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray()); + return new InputStreamResource(inputStream); + } + + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/BulkUpload/Controllers/MappingRuleController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/BulkUpload/Controllers/MappingRuleController.java new file mode 100644 index 0000000..7afa290 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/BulkUpload/Controllers/MappingRuleController.java @@ -0,0 +1,124 @@ +package com.realnet.BulkUpload.Controllers; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.Row; +import org.apache.poi.ss.usermodel.Sheet; +import org.apache.poi.ss.usermodel.Workbook; +import org.apache.poi.ss.usermodel.WorkbookFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +//import org.springframework.mock.web.MockMultipartFile; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +import com.realnet.BulkUpload.Entity.MappingRule; +import com.realnet.BulkUpload.Services.MappingRuleService; + +@RestController +@RequestMapping("/MappingRule") +public class MappingRuleController { + @Autowired + private MappingRuleService Service; + + @PostMapping("/MappingRule") + public MappingRule Savedata(@RequestBody MappingRule data) { + MappingRule save = Service.Savedata(data); + return save; + } + + @GetMapping("/MappingRule") + public List getdetails() { + List get = Service.getdetails(); + return get; + } + + @GetMapping("/MappingRule/{id}") + public MappingRule getdetailsbyId(@PathVariable Long id) { + MappingRule get = Service.getdetailsbyId(id); + return get; + + } + + @DeleteMapping("/MappingRule/{id}") + public void delete_by_id(@PathVariable Long id) { + Service.delete_by_id(id); + + } + + @PutMapping("/MappingRule/{id}") + public MappingRule update(@RequestBody MappingRule data, @PathVariable Long id) { + MappingRule update = Service.update(data, id); + return update; + } + + @GetMapping("/getHeaders") + public ResponseEntity getFileHeadersForSheet( + @RequestParam("file") MultipartFile excelFile, + @RequestParam("sheetName") String sheetName) { + try (Workbook workbook = WorkbookFactory.create(excelFile.getInputStream())) { + List sheetHeaders = new ArrayList<>(); + Sheet sheet = workbook.getSheet(sheetName); + + if (sheet == null) { + return ResponseEntity.notFound().build(); // Sheet not found + } + + Row headerRow = sheet.getRow(0); + if (headerRow != null) { + for (Cell cell : headerRow) { + String header = cell.getStringCellValue(); + sheetHeaders.add(header); + } + } + + return ResponseEntity.ok(sheetHeaders); + } catch (Exception e) { + return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("Error processing Excel file."); + } + } + +// @GetMapping("/getHeadersMapping") +// public ResponseEntity getAllSheetHeadersForMapping(@RequestParam("file") MultipartFile excelFile,@RequestParam("sheetName") String sheetName) { +// try (Workbook workbook = WorkbookFactory.create(excelFile.getInputStream())) { +// Map>> sheetHeadersMap = new LinkedHashMap<>(); +// +// for (int i = 0; i < workbook.getNumberOfSheets(); i++) { +// Sheet sheet = workbook.getSheet(sheetName); +// List> sheetHeaders = new ArrayList<>(); +// +// Row headerRow = sheet.getRow(0); +// +// if (headerRow != null) { +// for (Cell cell : headerRow) { +// String header = cell.getStringCellValue(); +// Map headerObject = new LinkedHashMap<>(); +// headerObject.put("headerName", header); +// headerObject.put("value", ""); // Empty value +// sheetHeaders.add(headerObject); +// } +// } +// +// sheetHeadersMap.put(sheet.getSheetName(), sheetHeaders); +// } +// +// return ResponseEntity.ok(sheetHeadersMap); +// } catch (Exception e) { +// return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("Error processing Excel file."); +// } +// } + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/BulkUpload/Controllers/MasterImportController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/BulkUpload/Controllers/MasterImportController.java new file mode 100644 index 0000000..0266bf3 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/BulkUpload/Controllers/MasterImportController.java @@ -0,0 +1,600 @@ +package com.realnet.BulkUpload.Controllers; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; + +import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.Row; +import org.apache.poi.ss.usermodel.Sheet; +import org.apache.poi.ss.usermodel.Workbook; +import org.apache.poi.xssf.usermodel.XSSFCell; +import org.apache.poi.xssf.usermodel.XSSFRow; +import org.apache.poi.xssf.usermodel.XSSFSheet; +import org.apache.poi.xssf.usermodel.XSSFWorkbook; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.core.io.ByteArrayResource; +import org.springframework.core.io.InputStreamResource; +import org.springframework.core.io.Resource; +import org.springframework.dao.DataIntegrityViolationException; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import com.realnet.BulkUpload.Entity.BulkUpload_t; +import com.realnet.BulkUpload.Repository.BulkUpload_Repository; +import com.realnet.BulkUpload.Services.BulkUpload_Service; +import com.realnet.template.entity.TemplateFileUpload; +import com.realnet.template.repository.TemplatedataRepo; +import com.realnet.template.service.DynamicTemplateService; +import com.realnet.template.service.FileUploadService; + +@RestController +@RequestMapping("/masterimport") +public class MasterImportController { + + @Autowired + private JdbcTemplate jdbcTemplate; + @Autowired + private TemplatedataRepo temprepo; + @Autowired + private DynamicTemplateService dynamicTemplateService; + + @Autowired + private BulkUpload_Service bulkUpload_Service; + + @Autowired + private BulkUpload_Repository bulkUpload_Repository; + + @Autowired + private FileUploadService fileUploadService; + + @Autowired + private ObjectMapper objectMapper; + + @Value("${projectPath}") + private String projectPath; + + @GetMapping("/demo/download/{file_type}") + public ResponseEntity demoTemplate(@PathVariable String file_type) throws IOException { + Workbook workbook = new XSSFWorkbook(); + + if (file_type.equalsIgnoreCase("Customer")) { + // Create Customer sheet with headers only + String[] customerHeaders = { "balance", "c_status", "city", "country","currency_code","customer_id", + "date_of_birth", "defaultsite_id", "email", "entity_name","file_name","file_path", + "first_name", "gender", "gst_no", "gst_state","house_no","mobile_no", + "pan_no", "sales_rep", "special_price", "state","street_address","street_address2", + "time_zone", "postal_code", "contact_number"}; + createSheetWithHeaders(workbook, "Customer", customerHeaders); + + // Create Site sheet with headers only + String[] siteHeaders = { "Site Name", "Site Description", "Active", "Test" }; + createSheetWithHeaders(workbook, "Site", siteHeaders); + } else { + return new ResponseEntity("Not found", HttpStatus.BAD_REQUEST); + } + + ByteArrayOutputStream out = new ByteArrayOutputStream(); + workbook.write(out); + + return ResponseEntity.ok() + .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + file_type + "_template.xlsx") + .contentType(MediaType.parseMediaType("application/vnd.ms-excel")).body(out.toByteArray()); + } + + private void createSheetWithHeaders(Workbook workbook, String sheetName, String[] headers) { + Sheet sheet = workbook.createSheet(sheetName); + Row headerRow = sheet.createRow(0); + + // Create headers + for (int col = 0; col < headers.length; col++) { + Cell cell = headerRow.createCell(col); + cell.setCellValue(headers[col]); + } + } + + @PostMapping("/DownloadExcelForMaster/{id}") + public ResponseEntity DownloadExcelForMaster(@PathVariable Long id, + @RequestBody Map>> jsonData) { + try { + + List templateFileUpload = temprepo.findUnprocessedRecordsOrderedByIdAsc(); + + + + if (!templateFileUpload.isEmpty()) { + for (TemplateFileUpload upload : templateFileUpload) { + String entity_name = upload.getEntity_name(); + BulkUpload_t bulkUpload_t = bulkUpload_Repository.getentityName(entity_name); + String ruleLine = bulkUpload_t.getRule_line(); + +// BulkUpload_t bulkUpload_t = bulkUpload_Repository.getentityName(entity_name); +// String ruleLine = bulkUpload_t.getRule_line(); + + JsonParser parser = new JsonParser(); + JsonElement element = parser.parse(ruleLine); + JsonArray array = element.getAsJsonArray(); + Iterator iterator = array.iterator(); + + String fromsheet = null; + String fromColumn = null; + String validationTable = null; + String checkColumn = null; + String useColumn = null; + String replacementtable = null; + String replacementcolumn = null; + + while (iterator.hasNext()) { + JsonElement next = iterator.next(); + JsonObject jsonObject = next.getAsJsonObject(); + + fromsheet = jsonObject.get("fromsheet").getAsString(); + fromColumn = jsonObject.get("fromColumn").getAsString(); + validationTable = jsonObject.get("validationTable").getAsString(); + checkColumn = jsonObject.get("checkColumn").getAsString(); + useColumn = jsonObject.get("useColumn").getAsString(); + replacementtable = jsonObject.get("useTable").getAsString(); + replacementcolumn = jsonObject.get("replacementcolumn").getAsString(); + + break; + } + + String customerTableName = validationTable; + String siteTableName = replacementtable; + + Set tableNames = jsonData.keySet(); // Get all unique table names + + String siteEntityName = null; + for (String tableName : tableNames) { + List> tableData = jsonData.get(tableName); + + // Process tableData based on the tableName (e.g., "Site" or "Customer") + System.out.println("Table Name: " + tableName); + for (Map row : tableData) { + // Process individual rows within the table data + System.out.println("Row Data: " + row); + } + } + + List> processedDataList = new ArrayList<>(); // List to hold processed data rows + + // Iterate through each customer data entry + List> customerData = jsonData.get("Customer"); + for (Map insertCustomerData : customerData) { + String customerName = (String) insertCustomerData.get(checkColumn); + + // Check if the customerName is not null and iterate through "Site" data + List> siteData = jsonData.get(fromsheet); + + List> matchedSiteData = new ArrayList<>(); + if (customerName != null) { + // Iterate through "Site" data and check for a matching "entity_name" + for (Map siteRow : siteData) { + // Specify the index as "AM" (39th column) +// String columnIndex = "AM"; + String columnIndex = fromColumn; + + // Retrieve the value at the specified index + + for (Map.Entry entry : siteRow.entrySet()) { + if (entry.getKey().equals(columnIndex)) { + siteEntityName = (String) entry.getValue(); + break; // Exit the loop once the value is found + } + } + + if (customerName.equals(siteEntityName)) { + // Add the matching "Site" data to the list + matchedSiteData.add(siteRow); + } + } + } + + ObjectMapper objectMapper = new ObjectMapper(); + String insertCustomerDataJson = objectMapper.writeValueAsString(insertCustomerData); + String matchedSiteDataJson = objectMapper.writeValueAsString(matchedSiteData); + + String customerSql = getInsertQuery(customerTableName, insertCustomerData); + + // Insert data into the customer table + Object[] customerValues = new Object[insertCustomerData.size() + 5]; + int index = 0; + for (Object value : insertCustomerData.values()) { + customerValues[index++] = value; + } + customerValues[index++] = new Timestamp(System.currentTimeMillis()); // created_at + customerValues[index++] = null; // created_by + customerValues[index++] = null; // updated_by + customerValues[index++] = new Timestamp(System.currentTimeMillis()); // updated_at + customerValues[index] = null; // account_id + jdbcTemplate.update(customerSql, customerValues); + + // we can use useColumn here + Long generatedId = jdbcTemplate.queryForObject("SELECT LAST_INSERT_ID()", Long.class); + + List> insertMatchedSiteData = new ArrayList<>(); // List to hold processed + // data rows + + for (Map siteRow : matchedSiteData) { + // Replace "Customer Name" with "customer_master_id" if it exists + if (siteRow.containsKey(siteEntityName)) { + siteRow.put(replacementcolumn, generatedId); + siteRow.remove(siteEntityName); + } + insertMatchedSiteData.add(siteRow); + } + + for (Map siteRow : insertMatchedSiteData) { + Object[] siteValues = new Object[siteRow.size() + 5]; // Create a new array for each row + + int siteIndex = 0; + for (Object value : siteRow.values()) { + siteValues[siteIndex++] = value; + } + + siteValues[siteIndex++] = new Timestamp(System.currentTimeMillis()); // created_at + siteValues[siteIndex++] = null; // created_by + siteValues[siteIndex++] = null; // updated_by + siteValues[siteIndex++] = new Timestamp(System.currentTimeMillis()); // updated_at + siteValues[siteIndex] = null; // account_id + + String siteSql = getInsertQuery(siteTableName, siteRow); + jdbcTemplate.update(siteSql, siteValues); + } + + // Add the processed customer data to the list + processedDataList.add(insertCustomerData); + } + + // Use a LinkedHashMap to preserve insertion order in the response + Map>> response = new LinkedHashMap<>(); + response.put("result", processedDataList); + + return new ResponseEntity<>(response, HttpStatus.OK); + + } + } + return new ResponseEntity<>("No data to process", HttpStatus.OK); + + } catch (Exception e) { + e.printStackTrace(); + // Handle exceptions and return an appropriate response + return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR); + } + } + + private List getColumnNames(Map dataRow) { + return new ArrayList<>(dataRow.keySet()); + } + + // Method to write data to a sheet + private void writeDataToSheet(List> dataList, XSSFSheet sheet, List columnNames) { + int rowIndex = 0; + // Create the header row + XSSFRow headerRow = sheet.createRow(rowIndex++); + for (int i = 0; i < columnNames.size(); i++) { + XSSFCell cell = headerRow.createCell(i); + cell.setCellValue(columnNames.get(i)); + } + // Add "Status" and "Exception" columns to the sheet + headerRow.createCell(columnNames.size()).setCellValue("Status"); + headerRow.createCell(columnNames.size() + 1).setCellValue("Exception"); + + // Write the data rows + for (Map row : dataList) { + XSSFRow dataRow = sheet.createRow(rowIndex++); + int columnIndex = 0; + for (String columnName : columnNames) { + Object value = row.get(columnName); + XSSFCell cell = dataRow.createCell(columnIndex++); + cell.setCellValue(value != null ? value.toString() : ""); + } + // Add "Status" and "Exception" values to the data row + dataRow.createCell(columnIndex++).setCellValue(row.get("Status").toString()); + dataRow.createCell(columnIndex).setCellValue(row.get("Exception").toString()); + } + + } + + private String extractExceptionMessage(DataIntegrityViolationException e) { + String errorMessage = e.getMessage(); + int startIndex = errorMessage.indexOf("Incorrect "); + int endIndex = errorMessage.indexOf("at row"); + if (startIndex != -1 && endIndex != -1) { + return errorMessage.substring(startIndex, endIndex).trim(); + } + return errorMessage; + } + + private String getInsertQuery(String tableName, Map data) { + StringBuilder sqlBuilder = new StringBuilder(); + sqlBuilder.append("INSERT INTO "); + sqlBuilder.append(tableName); + sqlBuilder.append(" ("); + sqlBuilder.append(String.join(", ", data.keySet())); + sqlBuilder.append(", created_at, created_by, updated_by, updated_at, account_id) VALUES ("); + sqlBuilder.append(String.join(", ", Collections.nCopies(data.size(), "?"))); + sqlBuilder.append(", ?, ?, ?, ?, ?)"); + return sqlBuilder.toString(); + } + + @GetMapping("/sheet/{id}") + public ResponseEntity getSheet(@PathVariable Long id) throws IOException { + ResponseEntity jsonData = convertFileToJsonforsheet(id); + + return ResponseEntity.ok(jsonData.getBody()); + } + + public ResponseEntity convertFileToJsonforsheet(Long id) throws IOException { + // Retrieve the TemplateFileUpload entity based on the provided ID + Optional fileUploadOptional = temprepo.findById(id); + + if (!fileUploadOptional.isPresent()) { + // Handle the case where the file is not found in the specified location + return ResponseEntity.notFound().build(); + } + + TemplateFileUpload fileUpload = fileUploadOptional.get(); + String location = fileUpload.getFile_location(); + String fileName = fileUpload.getFile_changed_name() + ".xlsx"; + String filePath = location + File.separator + "processingfile" + File.separator + fileName; + File file = new File(filePath); + + if (!file.exists()) { + // Handle the case where the file is not found in the specified location + return ResponseEntity.notFound().build(); + } + + try (FileInputStream fis = new FileInputStream(file)) { + XSSFWorkbook workbook = new XSSFWorkbook(fis); + List sheetNames = new ArrayList<>(); + + for (int i = 0; i < workbook.getNumberOfSheets(); i++) { + XSSFSheet sheet = workbook.getSheetAt(i); + String sheetName = sheet.getSheetName(); + sheetNames.add(sheetName); + } + + return ResponseEntity.ok(sheetNames); + } catch (Exception e) { + // Handle any exceptions that may occur during processing + return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("Error processing Excel file."); + } + } + + @GetMapping("/downloadImportStatement/{id}") + public ResponseEntity downloadImportStatement(@PathVariable Long id) { + // Retrieve the file data from the database based on the ID + TemplateFileUpload fileUpload = fileUploadService.getFileById(id); + + // Get the file location from the entity + String fileLocation = fileUpload.getDownloadfileLocation(); +// String filename = fileUpload.getDownloadfileName(); +// +// String filepath = fileLocation + File.separator + filename; + + try { + // Read the file content from the specified location + byte[] fileContent = Files.readAllBytes(Paths.get(fileLocation)); + + // Create a ByteArrayResource from the file content + ByteArrayResource resource = new ByteArrayResource(fileContent); + + return ResponseEntity.ok().contentType(MediaType.APPLICATION_OCTET_STREAM) + .header(HttpHeaders.CONTENT_DISPOSITION, + "attachment; filename=\"" + fileUpload.getFile_name() + "\"") + .body(resource); + } catch (IOException e) { + // Handle any potential exceptions (e.g., file not found) + e.printStackTrace(); + return ResponseEntity.status(500).body("Error occurred while reading the file."); + } + } + + @GetMapping("/columns/{tableName}") + public List getColumnNames(@PathVariable String tableName) { + Set columnNamesSet = new HashSet<>(); + String convertedTableName = tableName; + List columnNames = jdbcTemplate.queryForList( + "SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = ?", + new Object[] { convertedTableName }, String.class); + // Exclude specific column names + List excludedColumns = Arrays.asList("id", "account_id", "updated_at", "created_at", "created_by", + "updated_by"); + for (String columnName : columnNames) { + if (!excludedColumns.contains(columnName)) { + columnNamesSet.add(columnName); + } + } + return new ArrayList<>(columnNamesSet); + } + + private String getCellValue(Map>> jsonData, String sheetName, String cellAddress) + throws IOException { + if (jsonData.containsKey(sheetName)) { + List> sheetData = jsonData.get(sheetName); + int size = sheetData.size(); + System.out.println(size); + Map firstRowData = sheetData.get(0); + + // Separate the numeric part (row part) and non-numeric part (column part) + String rowPart = ""; + String columnPart = ""; + + for (char c : cellAddress.toCharArray()) { + if (Character.isDigit(c)) { + rowPart += c; + } else { + columnPart += c; + } + } + + System.out.println("Column Part: " + columnPart); + System.out.println("Row Part: " + rowPart); + + int columnIndex = getColumnIndex(columnPart); // Get the column index based on the columnPart +// int rowIndex = Integer.parseInt(rowPart) - 1; // Excel-style 1-based index + System.out.println("Column Index: " + columnIndex); + + if (columnIndex >= 0) { + // Get the list of keys from the firstRowData map + List keys = new ArrayList<>(firstRowData.keySet()); + + // Check if the columnIndex is within the range of keys + if (columnIndex < keys.size()) { + String columnName = keys.get(columnIndex); + return columnName; + } + } + } + + return null; + } + + private int getColumnIndex(String columnPart) { + int index = 0; + int multiplier = 1; + + // Iterate through the columnPart in reverse order (right to left) + for (int i = columnPart.length() - 1; i >= 0; i--) { + char c = columnPart.charAt(i); + index += (c - 'A' + 1) * multiplier; + multiplier *= 26; // Multiply by 26 for each position to calculate the index + } + + return index - 1; // Subtract 1 to get a 0-based index + } + + @PostMapping("/DownloadExcel/{entityName}") + public ResponseEntity importdatadownloadexcel(@PathVariable String entityName, + @RequestBody List> data) throws IOException { + List> processedData = processData(entityName, data); + if (!processedData.isEmpty()) { + Workbook workbook = createWorkbook(processedData); + Resource resource = createExcelResource(workbook); + return ResponseEntity.ok().contentType(MediaType.parseMediaType("application/vnd.ms-excel")) + .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=failed_records.xlsx").body(resource); + } + return ResponseEntity.ok().body(null); + } + + private List> processData(String entityName, List> data) { + List> processedData = new ArrayList<>(); + try { + String convertedTableName = entityName; + String sql = getInsertQuery(convertedTableName, data.get(0)); + for (int i = 0; i < data.size(); i++) { + Map row = data.get(i); + Map processedRow = new HashMap<>(); + try { + Object[] values = new Object[row.size() + 5]; // +5 for the additional columns + int index = 0; + for (Object value : row.values()) { + values[index++] = value; + } + values[index++] = new Timestamp(System.currentTimeMillis()); // created_at + values[index++] = null; // created_by + values[index++] = null; // updated_by + values[index++] = new Timestamp(System.currentTimeMillis()); // updated_at + values[index] = null; // account_id + jdbcTemplate.update(sql, values); + processedRow.putAll(row); + processedRow.put("Status", "Success"); + processedRow.put("Exception", "NA"); + } catch (DataIntegrityViolationException e) { + processedRow.putAll(row); + processedRow.put("Status", "Error"); + String exceptionMessage = extractExceptionMessage(e); + processedRow.put("Exception", exceptionMessage); + } + processedData.add(processedRow); + } + } catch (Exception e) { + // Handle any exceptions here if needed + } + return processedData; + } + + private Workbook createWorkbook(List> processedData) { + Workbook workbook = new XSSFWorkbook(); + Sheet sheet = workbook.createSheet("Failed Records"); + + // Add column headers to the worksheet + Row headerRow = sheet.createRow(0); + int columnIndex = 0; + for (String key : processedData.get(0).keySet()) { + Cell cell = headerRow.createCell(columnIndex++); + cell.setCellValue(key); + } + + // Add data rows to the worksheet + int rowIndex = 1; + for (Map row : processedData) { + Row dataRow = sheet.createRow(rowIndex++); + columnIndex = 0; + for (Object value : row.values()) { + Cell cell = dataRow.createCell(columnIndex++); + cell.setCellValue(value.toString()); + } + } + + return workbook; + } + + private Resource createExcelResource(Workbook workbook) throws IOException { + ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); + workbook.write(outputStream); + ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray()); + return new InputStreamResource(inputStream); + } + + + + +// private ResponseEntity getData(@PathVariable String type ){ +// if(type.equalsIgnoreCase("Customer")) { +// +// +// String[] customerHeaders = { "balance", "c_status", "city", "country","currency_code","customer_id", +// "date_of_birth", "defaultsite_id", "email", "entity_name","file_name","file_path", +// "first_name", "gender", "gst_no", "gst_state","house_no","mobile_no", +// "pan_no", "sales_rep", "special_price", "state","street_address","street_address2", +// "time_zone", "postal_code", "contact_number"}; +// +// +// } +// +// } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/BulkUpload/Entity/BulkUpload_t.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/BulkUpload/Entity/BulkUpload_t.java new file mode 100644 index 0000000..ca87344 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/BulkUpload/Entity/BulkUpload_t.java @@ -0,0 +1,21 @@ +package com.realnet.BulkUpload.Entity; + import lombok.*; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + @Entity + @Data + public class BulkUpload_t{ + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String entity_name; + private String description; + private String rule_line; + private boolean active; + private String fileType; + + } \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/BulkUpload/Entity/MappingRule.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/BulkUpload/Entity/MappingRule.java new file mode 100644 index 0000000..bb40e5a --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/BulkUpload/Entity/MappingRule.java @@ -0,0 +1,24 @@ +package com.realnet.BulkUpload.Entity; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; + +import lombok.Data; + +@Entity +@Data +public class MappingRule { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String entity_name; + private String description; + private String mapping_rule; + private boolean active; + private String fileType; + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/BulkUpload/Repository/BulkUpload_Repository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/BulkUpload/Repository/BulkUpload_Repository.java new file mode 100644 index 0000000..efa1764 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/BulkUpload/Repository/BulkUpload_Repository.java @@ -0,0 +1,21 @@ +package com.realnet.BulkUpload.Repository; + + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.stereotype.Repository; + + +import com.realnet.BulkUpload.Entity.BulkUpload_t; + + +@Repository +public interface BulkUpload_Repository extends JpaRepository { + + @Query(value = "SELECT * FROM bulk_upload_t where entity_name =?1", nativeQuery = true) + BulkUpload_t getentityName(String name); + +// @Query(value = "SELECT * FROM bulk_upload_t where entity_name =?1", nativeQuery = true) +// BulkUpload_t getByName(String name); + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/BulkUpload/Repository/MappingRuleRepository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/BulkUpload/Repository/MappingRuleRepository.java new file mode 100644 index 0000000..46b22b9 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/BulkUpload/Repository/MappingRuleRepository.java @@ -0,0 +1,11 @@ +package com.realnet.BulkUpload.Repository; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +import com.realnet.BulkUpload.Entity.MappingRule; + +@Repository +public interface MappingRuleRepository extends JpaRepository{ + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/BulkUpload/Services/BulkUpload_Service.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/BulkUpload/Services/BulkUpload_Service.java new file mode 100644 index 0000000..3723171 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/BulkUpload/Services/BulkUpload_Service.java @@ -0,0 +1,40 @@ +package com.realnet.BulkUpload.Services; + +import com.realnet.BulkUpload.Repository.BulkUpload_Repository; +import com.realnet.BulkUpload.Entity.BulkUpload_t; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class BulkUpload_Service { + @Autowired + private BulkUpload_Repository Repository; + + public BulkUpload_t Savedata(BulkUpload_t data) { + return Repository.save(data); + } + + public List getdetails() { + return (List) Repository.findAll(); + } + + public BulkUpload_t getdetailsbyId(Long id) { + return Repository.findById(id).get(); + } + + public void delete_by_id(Long id) { + Repository.deleteById(id); + } + + public BulkUpload_t update(BulkUpload_t data, Long id) { + BulkUpload_t old = Repository.findById(id).get(); + old.setEntity_name(data.getEntity_name()); + old.setDescription(data.getDescription()); + old.setRule_line(data.getRule_line()); + old.setActive(data.isActive()); + final BulkUpload_t test = Repository.save(old); + return test; + } +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/BulkUpload/Services/MappingRuleService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/BulkUpload/Services/MappingRuleService.java new file mode 100644 index 0000000..733a874 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/BulkUpload/Services/MappingRuleService.java @@ -0,0 +1,43 @@ +package com.realnet.BulkUpload.Services; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.realnet.BulkUpload.Entity.BulkUpload_t; +import com.realnet.BulkUpload.Entity.MappingRule; +import com.realnet.BulkUpload.Repository.MappingRuleRepository; + +@Service +public class MappingRuleService { + + @Autowired + private MappingRuleRepository Repository; + + public MappingRule Savedata(MappingRule data) { + return Repository.save(data); + } + + public List getdetails() { + return (List) Repository.findAll(); + } + + public MappingRule getdetailsbyId(Long id) { + return Repository.findById(id).get(); + } + + public void delete_by_id(Long id) { + Repository.deleteById(id); + } + + public MappingRule update(MappingRule data, Long id) { + MappingRule old = Repository.findById(id).get(); + old.setEntity_name(data.getEntity_name()); + old.setDescription(data.getDescription()); + old.setMapping_rule(data.getMapping_rule()); + old.setActive(data.isActive()); + final MappingRule test = Repository.save(old); + return test; + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/CredentialDatabase/Config/Databaseconfig.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/CredentialDatabase/Config/Databaseconfig.java new file mode 100644 index 0000000..0190ae8 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/CredentialDatabase/Config/Databaseconfig.java @@ -0,0 +1,40 @@ +//package com.realnet.CredentialDatabase.Config; +// +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.context.annotation.Bean; +//import org.springframework.context.annotation.Configuration; +//import org.springframework.jdbc.datasource.DriverManagerDataSource; +// +//import com.fasterxml.jackson.core.JsonProcessingException; +//import com.fasterxml.jackson.databind.JsonMappingException; +//import com.realnet.CredentialDatabase.Service.SurevaultService; +// +//import java.util.Properties; +// +//import javax.sql.DataSource; +// +//@Configuration +//public class Databaseconfig { +// +// @Autowired +// private SurevaultService surevaultService; +// +// @Bean +// public DataSource dataSource() throws JsonMappingException { +// DriverManagerDataSource dataSource = new DriverManagerDataSource(); +// +// try { +// dataSource.setUrl(surevaultService.getSurevaultCredentials("databaseUrl")); +// dataSource.setUsername(surevaultService.getSurevaultCredentials("databaseuserName")); +// dataSource.setPassword(surevaultService.getSurevaultCredentials("databasePassword")); +// +// } catch (JsonProcessingException e) { +// // Handle exceptions or log errors +// e.printStackTrace(); +// } +// +// // Other DataSource configurations +// +// return dataSource; +// } +//} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/CredentialDatabase/Service/SurevaultService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/CredentialDatabase/Service/SurevaultService.java new file mode 100644 index 0000000..57c559b --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/CredentialDatabase/Service/SurevaultService.java @@ -0,0 +1,85 @@ +//package com.realnet.CredentialDatabase.Service; +// +//import org.springframework.http.HttpEntity; +//import org.springframework.http.HttpHeaders; +//import org.springframework.http.HttpMethod; +//import org.springframework.http.MediaType; +//import org.springframework.http.ResponseEntity; +//import org.springframework.stereotype.Service; +//import org.springframework.web.client.RestTemplate; +// +//import com.fasterxml.jackson.core.JsonProcessingException; +//import com.fasterxml.jackson.databind.JsonNode; +//import com.fasterxml.jackson.databind.ObjectMapper; +//import com.google.gson.JsonElement; +//import com.google.gson.JsonObject; +//import com.google.gson.JsonParser; +//import com.realnet.utils.Port_Constant; +// +//@Service +//public class SurevaultService { +// +// +// +// public String getSurevaultCredentials(String key) throws JsonProcessingException { +// +// String SurevaultDeploymentType = Port_Constant.SUREVAULT_DEPLOYMENT_TYPE; +// System.out.println(SurevaultDeploymentType); +// // Obtain the token +// String token = callconnector("surevault").toString(); +// +// String surevaultApiUrl =Port_Constant.SURE_VAULT_DOMAIN + "/getcredentials/" + SurevaultDeploymentType; +// +// ResponseEntity get = GET(surevaultApiUrl, token); +// +// Object responseBody = get.getBody(); +// +// JsonNode jsonNode = new ObjectMapper().convertValue(responseBody, JsonNode.class); +// String value = jsonNode.get(key).asText(); +// return value; +// } +// +// public String callconnector(String name) throws JsonProcessingException { +// RestTemplate restTemplate = new RestTemplate(); +// String url = Port_Constant.SURE_VAULT_DOMAIN + "/token/Sure_Connectbyname/" + name; +// System.out.println(Port_Constant.SURE_VAULT_DOMAIN); +// +// ResponseEntity u = restTemplate.getForEntity(url, Object.class); +// Object object = u.getBody(); +// +// ObjectMapper mapper = new ObjectMapper(); +// String str = mapper.writeValueAsString(object); +// +// JsonParser parser = new JsonParser(); +// JsonElement element = parser.parse(str); +// +// JsonObject obj = element.getAsJsonObject(); +// JsonElement token = obj.get("access_token"); +// System.out.println("token is == " + token); +// return token.getAsString(); +// } +// +// public ResponseEntity GET(String get, String token) { +// RestTemplate restTemplate = new RestTemplate(); +// String resourceUrl = get; +// String token1 = "Bearer " + token; +// HttpHeaders headers = getHeaders(); +// headers.set("Authorization", token1); +// HttpEntity request = new HttpEntity(headers); +// ResponseEntity u = restTemplate.exchange(resourceUrl, HttpMethod.GET, request, Object.class); +// +// int statusCodeValue = u.getStatusCodeValue(); +// System.out.println(statusCodeValue); +// +// return u; +// +// } +// +// private HttpHeaders getHeaders() { +// HttpHeaders headers = new HttpHeaders(); +// headers.set("Content-Type", MediaType.APPLICATION_JSON_VALUE); +// headers.set("Accept", MediaType.APPLICATION_JSON_VALUE); +// return headers; +// } +// +//} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard1/Controller/Dashboard2.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard1/Controller/Dashboard2.java new file mode 100644 index 0000000..10ab846 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard1/Controller/Dashboard2.java @@ -0,0 +1,30 @@ +//package com.realnet.Dashboard1.Controller; +// +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.web.bind.annotation.GetMapping; +//import org.springframework.web.bind.annotation.PathVariable; +//import org.springframework.web.bind.annotation.RequestMapping; +//import org.springframework.web.bind.annotation.RestController; +// +//import com.realnet.Dashboard1.Entity.Dashbord_Header; +//import com.realnet.Dashboard1.Repository.HeaderRepository; +//import com.realnet.Dashboard1.Service.HeaderService; +// +//@RestController +//@RequestMapping("/token/dashboard2") +//public class Dashboard2 { +// +// @Autowired +// private HeaderService headerService; +// +// @Autowired +// private HeaderRepository headerRepository; +// +// @GetMapping("/getdashboardbyname/{name}") +// public Integer getdetailsbyId(@PathVariable String name) { +// Dashbord_Header dash = headerRepository.findByDashboardName(name); +// Integer id=dash.getId(); +// return id; +// } +// +//} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard1/Controller/Dashbord1Controller.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard1/Controller/Dashbord1Controller.java new file mode 100644 index 0000000..d23a9f0 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard1/Controller/Dashbord1Controller.java @@ -0,0 +1,110 @@ +package com.realnet.Dashboard1.Controller; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.Dashboard1.Entity.Dashbord1_Line; +import com.realnet.Dashboard1.Entity.Dashbord_Header; +import com.realnet.Dashboard1.Repository.HeaderRepository; +import com.realnet.Dashboard1.Service.HeaderService; + +@RestController +public class Dashbord1Controller { + + @Autowired + private HeaderService headerService; + + @Autowired + private HeaderRepository headerRepository; + +// @PreAuthorize("hasAnyRole('SYSADMIN','ProjectManager','Developer')") + @PostMapping("/Savedata") + public Dashbord_Header Savedata(@RequestBody Dashbord_Header dashbord_Header) { + Dashbord_Header dash = headerService.Savedata(dashbord_Header); + return dash; + } + + @GetMapping("/get_Dashboard_header") + public List getdetails() { + List dash = headerService.getdetails(); + return dash; + } + + @GetMapping("/get_all_lines") + public List get_all_lines() { + List dash = headerService.get_all_lines(); + return dash; + } + + + + @GetMapping("/get_module_id") + public List get_by_module_id(@RequestParam(value = "module_id") int module_id) { + + List module = headerService.get_by_module_id(module_id); + return module; + + } + + @GetMapping("/get_dashboard_headerbyid/{id}") + public Dashbord_Header getdetailsbyId(@PathVariable int id) { + Dashbord_Header dash = headerService.getdetailsbyId(id); + return dash; + } + +// @PreAuthorize("hasAnyRole('SYSADMIN','ProjectManager','Developer')") + @PutMapping("/update_dashboard_header") + public Dashbord_Header update_dashboard_header(@RequestBody Dashbord_Header dashbord_Header) { + Dashbord_Header dash = headerService.update_dashboard_header(dashbord_Header); + return dash; + } + +// update dashboard line by id + + @PutMapping("/update_Dashbord1_Lineby_id/{id}") + public Dashbord1_Line update_Dashbord1_Lineby_id(@PathVariable int id, @RequestBody Dashbord1_Line dashbord1_Line) { + + Dashbord1_Line dash = headerService.update_Dashbord1_Lineby_id(id, dashbord1_Line); + return dash; + + } + + @PostMapping("/update_Dashbord1_Line") + public Dashbord1_Line update_Dashbord1_Line(@RequestBody Dashbord1_Line dashbord1_Line) { + Dashbord1_Line dash1 = headerService.update_Dashbord1_Line(dashbord1_Line); + return dash1; + } + +// @PreAuthorize("hasAnyRole('SYSADMIN','ProjectManager','Developer')") + @DeleteMapping("/delete_by_header_id/{id}") + public void delete_by_id(@PathVariable int id) { + headerService.delete_by_id(id); + + } + + // COUNT OF LIST BUILDER + @GetMapping("/get_dashboard/{module_id}") + public ResponseEntity getREPORT(@PathVariable Integer module_id) { + String count_wireframe = headerRepository.count_dashboardheader(module_id); + + if (count_wireframe.isEmpty()) { + return new ResponseEntity<>(0, HttpStatus.OK); + + } else { + return new ResponseEntity<>(count_wireframe, HttpStatus.OK); + + } + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard1/Entity/Dashbord1_Line.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard1/Entity/Dashbord1_Line.java new file mode 100644 index 0000000..bf2c9be --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard1/Entity/Dashbord1_Line.java @@ -0,0 +1,45 @@ +package com.realnet.Dashboard1.Entity; + +import java.util.ArrayList; +import java.util.List; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.OneToMany; +import javax.persistence.OneToOne; +import javax.persistence.Table; + +import com.fasterxml.jackson.annotation.JsonBackReference; +import com.fasterxml.jackson.annotation.JsonManagedReference; + +import lombok.Data; +import lombok.ToString; + +@ToString(exclude = { "Dashbord_Header" }) +@Data +@Entity +@Table +public class Dashbord1_Line extends dashbord_Who_collumn { + + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + + private String header_id; + + @Column(length = 5000) + private String Model; + + @JsonBackReference + @ManyToOne + private Dashbord_Header dashbord_Header; + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard1/Entity/Dashbord_Header.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard1/Entity/Dashbord_Header.java new file mode 100644 index 0000000..e2faf4d --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard1/Entity/Dashbord_Header.java @@ -0,0 +1,63 @@ +package com.realnet.Dashboard1.Entity; + +import java.util.ArrayList; +import java.util.List; + +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.OneToMany; + +import com.fasterxml.jackson.annotation.JsonManagedReference; + +import lombok.Data; +import lombok.ToString; + +@ToString(exclude = { "Dashbord1_Line" }) +@Entity +@Data +public class Dashbord_Header extends dashbord_Who_collumn { + + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "ID") + private Integer id; + +// ============================== + + @Column(name = "MENU_NAME") + private String menuName; + + @Column(name = "IS_UPDATED") + private boolean updated; + + private String tech_Stack; + + private String object_type; + private String sub_object_type; + + @Column(name = "IS_BUILD") + private boolean build; + + private boolean testing; + + private String dashboard_name; + + private int module_id; + + private String description; + + private String secuirity_profile; + + private Boolean add_to_home; + + @JsonManagedReference + @OneToMany(cascade = CascadeType.ALL, mappedBy = "dashbord_Header") + private List dashbord1_Line = new ArrayList<>(); + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard1/Entity/dashbord_Who_collumn.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard1/Entity/dashbord_Who_collumn.java new file mode 100644 index 0000000..0d2f880 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard1/Entity/dashbord_Who_collumn.java @@ -0,0 +1,46 @@ +package com.realnet.Dashboard1.Entity; + +import java.io.Serializable; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.EntityListeners; +import javax.persistence.MappedSuperclass; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.annotation.LastModifiedDate; +import org.springframework.data.jpa.domain.support.AuditingEntityListener; + +import lombok.Data; + +@Data +@MappedSuperclass +@EntityListeners(AuditingEntityListener.class) +public class dashbord_Who_collumn implements Serializable{ + + private static final long serialVersionUID = 1L; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "CREATED_AT", nullable = false, updatable = false) + @CreatedDate + private Date createdAt; + + // @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime createdAt; + + + @Column(name = "CREATED_BY", updatable = false) + private Long createdBy; + + @Column(name = "UPDATED_BY") + private Long updatedBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "UPDATED_AT", nullable = false) + @LastModifiedDate + private Date updatedAt; + + @Column(name = "ACCOUNT_ID") + private Long accountId; + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard1/Repository/Dashboard_lineRepository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard1/Repository/Dashboard_lineRepository.java new file mode 100644 index 0000000..ea7655e --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard1/Repository/Dashboard_lineRepository.java @@ -0,0 +1,20 @@ +package com.realnet.Dashboard1.Repository; + +import java.util.List; + +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.CrudRepository; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; + +import com.realnet.Dashboard1.Entity.Dashbord1_Line; + +@Repository +public interface Dashboard_lineRepository extends CrudRepository { + + Dashbord1_Line findById(int id); + + @Query(value = "SELECT * FROM realnet_CNSBE.dashbord1_line where dashbord_header_id =:id", nativeQuery = true) + List getByheader(@Param("id") int id); + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard1/Repository/HeaderRepository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard1/Repository/HeaderRepository.java new file mode 100644 index 0000000..2934be7 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard1/Repository/HeaderRepository.java @@ -0,0 +1,35 @@ +package com.realnet.Dashboard1.Repository; + +import java.util.List; + +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.CrudRepository; +import org.springframework.stereotype.Repository; + +import com.realnet.Dashboard1.Entity.Dashbord_Header; + +@Repository +public interface HeaderRepository extends CrudRepository { + + Dashbord_Header findById(int id); + +// @Query( +// value= " select * from dashboard_header where module_id=?1",nativeQuery=true) +// List findbydashboardmodule(int moduleId); + +// public List findBymodule_id(String module_id); + + @Query(value = " select * from dashbord_header where module_id=?1", nativeQuery = true) + List findbydashboardmodule(int module_id); + +// @Query( +// "select u from Dashbord_Header u WHERE u.module_id =:n") +// List getBymoduleId(int module_id); + + @Query(value = "select count(id) from dashbord_header", nativeQuery = true) + public List findCount(); + + @Query(value = "SELECT count(id) FROM realnet_CNSBE.dashbord_header where module_id=?1", nativeQuery = true) + String count_dashboardheader(Integer moduleId); + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard1/Service/HeaderService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard1/Service/HeaderService.java new file mode 100644 index 0000000..db488cf --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard1/Service/HeaderService.java @@ -0,0 +1,99 @@ +package com.realnet.Dashboard1.Service; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.realnet.Dashboard1.Entity.Dashbord1_Line; +import com.realnet.Dashboard1.Entity.Dashbord_Header; +import com.realnet.Dashboard1.Repository.Dashboard_lineRepository; +import com.realnet.Dashboard1.Repository.HeaderRepository; + +@Service +public class HeaderService { + + @Autowired + private HeaderRepository headerRepository; + + @Autowired + private Dashboard_lineRepository dashboard_lineRepository; + + public Dashbord_Header Savedata(Dashbord_Header dashbord_Header) { + return headerRepository.save(dashbord_Header); + } + + + public List getdetails() { + // TODO Auto-generated method stub + return (List) headerRepository.findAll(); + } + + + public Dashbord_Header getdetailsbyId(int id) { + // TODO Auto-generated method stub + return headerRepository.findById(id); + } + + + public void delete_by_id(int id) { + // TODO Auto-generated method stub + headerRepository.deleteById(id); + } + + + public Dashbord_Header update_dashboard_header(Dashbord_Header dashbord_Header) { + return headerRepository.save(dashbord_Header); + } + + + + + public Dashbord1_Line update_Dashbord1_Line(Dashbord1_Line dashbord1_Line) { + // TODO Auto-generated method stub + return dashboard_lineRepository.save(dashbord1_Line); + } + + + public List get_by_module_id(int module_id) { + // TODO Auto-generated method stub + return (List) headerRepository.findbydashboardmodule(module_id); + } + + + public List get_all_lines() { + // TODO Auto-generated method stub + return (List) dashboard_lineRepository.findAll(); + } + +// public List get_by_module_id(int module_id) { +// // TODO Auto-generated method stub +// return (List) headerRepository.findAllById(module_id); +// } + +// public List get_by_module_id(String module_id) { +// // TODO Auto-generated method stub +// return (List) headerRepository.findBymodule_id(module_id); +// } + + public Dashbord1_Line update_Dashbord1_Lineby_id(int id, Dashbord1_Line dashbord1_Line) { + + + Dashbord1_Line oldline= dashboard_lineRepository.findById(id); +// .orElseThrow(() -> new ResourceNotFoundException(Constant.NOT_FOUND_EXCEPTION + " :" + id)); + + + oldline.setAccountId(dashbord1_Line.getAccountId()); + oldline.setHeader_id(dashbord1_Line.getHeader_id()); + oldline.setModel(dashbord1_Line.getModel()); + final Dashbord1_Line newline= dashboard_lineRepository.save(oldline); + return newline; + } + + + + + + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard_builder/Controllers/ChartBuilder.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard_builder/Controllers/ChartBuilder.java new file mode 100644 index 0000000..c9f07f3 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard_builder/Controllers/ChartBuilder.java @@ -0,0 +1,689 @@ +package com.realnet.Dashboard_builder.Controllers; + +import java.io.IOException; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.ResultSetMetaData; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.client.RestTemplate; + +import com.realnet.Payment.Paytm.PaytmPayment; + +import lombok.extern.slf4j.Slf4j; + +@Slf4j + +@RequestMapping("/chart") +@RestController +public class ChartBuilder { + + public List> getAllDataFromTable(String tableName) { + List> tableData = new ArrayList<>(); + + Connection connection = null; + Statement statement = null; + ResultSet resultSet = null; + + try { + // Establish a database connection + connection = DriverManager.getConnection( + "jdbc:mysql://realnet.cdtynkxfiu2h.ap-south-1.rds.amazonaws.com:3306/suresetu", "cnsdev", + "cnsdev1234"); + + // Create a SQL statement + statement = connection.createStatement(); + + // Execute the query to retrieve all data from the table + String query = "SELECT * FROM " + tableName; + resultSet = statement.executeQuery(query); + + // Retrieve the column names from the result set + ResultSetMetaData metaData = resultSet.getMetaData(); + int columnCount = metaData.getColumnCount(); + List columnNames = new ArrayList<>(); + for (int i = 1; i <= columnCount; i++) { + columnNames.add(metaData.getColumnName(i)); + } + + // Iterate over the result set and store each row in a map + while (resultSet.next()) { + Map rowData = new HashMap<>(); + for (String columnName : columnNames) { + Object value = resultSet.getObject(columnName); + rowData.put(columnName, value); + } + tableData.add(rowData); + } + } catch (SQLException e) { + log.error(e.getLocalizedMessage()); + } finally { + // Close the resources + if (resultSet != null) { + try { + resultSet.close(); + } catch (SQLException e) { + log.error(e.getLocalizedMessage()); + } + } + if (statement != null) { + try { + statement.close(); + } catch (SQLException e) { + log.error(e.getLocalizedMessage()); + } + } + if (connection != null) { + try { + connection.close(); + } catch (SQLException e) { + log.error(e.getLocalizedMessage()); + } + } + } + + return tableData; + } + +//...........................22.07.2023.............................// + +// @GetMapping(value = "/getdashjson/{job_type}") +// public ResponseEntity jsonretun(@RequestParam String tableName, @PathVariable String job_type, +// @RequestParam String xAxis, @RequestParam String yAxis) throws IOException { +// +// List> tableData = getAllDataFromTable(tableName); // Retrieve all data from the table +// +// List yAxisValues = new ArrayList<>(); +// List xAxisValues = new ArrayList<>(); +// +// for (Map row : tableData) { +// for (Entry entry : row.entrySet()) { +// String key = entry.getKey(); +// Object value = entry.getValue(); +// +// if (key.equalsIgnoreCase(xAxis)) { +// xAxisValues.add(value.toString()); +// } else if (key.equalsIgnoreCase(yAxis)) { +// yAxisValues.add(value); +// } +// } +// } +// +// StringBuilder jsonmap = new StringBuilder(); +// +// if (job_type.equalsIgnoreCase("Bar Chart")) { +// jsonmap.append("[\n"); +// } else if (job_type.equalsIgnoreCase("Line Chart")) { +// jsonmap.append(" {\r\n" + " \"chartData\": [\r\n" + " { \"data\": ["); +// } else if (job_type.equalsIgnoreCase("Doughnut Chart")) { +// jsonmap.append("{\"chartData\": [["); +// } +// +// for (int i = 0; i < xAxisValues.size(); i++) { +// String xValue = xAxisValues.get(i); +// Object yValue = yAxisValues.get(i); +// +// if (job_type.equalsIgnoreCase("Bar Chart")) { +// jsonmap.append("{\"name\": \"" + xValue + "\", \"progress\":\"" + yValue + "\"},\n"); +// } else if (job_type.equalsIgnoreCase("Line Chart")) { +// jsonmap.append(yValue + ","); +// } else if (job_type.equalsIgnoreCase("Doughnut Chart")) { +// jsonmap.append(yValue + ","); +// } +// } +// +// if (!xAxisValues.isEmpty() && !yAxisValues.isEmpty()) { +// jsonmap.deleteCharAt(jsonmap.lastIndexOf(",")); +// } +// +// if (job_type.equalsIgnoreCase("Bar Chart")) { +// jsonmap.append("]"); +// } else if (job_type.equalsIgnoreCase("Line Chart")) { +// jsonmap.append("], \"label\": \"" + yAxis + "\" }\r\n" + " ],\r\n" + " \"chartLabels\": [ "); +// } else if (job_type.equalsIgnoreCase("Doughnut Chart")) { +// jsonmap.append("]],\r\n" + " \"chartLabels\": ["); +// } +// +// for (String xValue : xAxisValues) { +// jsonmap.append("\"" + xValue + "\","); +// } +// +// if (!xAxisValues.isEmpty()) { +// jsonmap.deleteCharAt(jsonmap.lastIndexOf(",")); +// } +// +// if (job_type.equalsIgnoreCase("Line Chart")) { +// jsonmap.append("] \n }\n"); +// } else if (job_type.equalsIgnoreCase("Doughnut Chart")) { +// jsonmap.append("]\n" + "}"); +// } +// +// return new ResponseEntity<>(jsonmap.toString(), HttpStatus.CREATED); +// } + + @GetMapping(value = "/getdashjson/{job_type}") + public ResponseEntity jsonretun2(@RequestParam String tableName, @PathVariable String job_type, + @RequestParam(required = false) String xAxis, @RequestParam(required = false) List yAxes) + throws IOException { + + StringBuilder jsonmap = new StringBuilder(); + + if (job_type.equalsIgnoreCase("Grid View")) { + List> allData = getAllDataFromApi(tableName); + + jsonmap.append("[\n"); + + for (Map row : allData) { + jsonmap.append("{\n"); + + int colCount = 0; + for (String yAxis : yAxes) { + String key = yAxis; + Object value = row.get(key); + + jsonmap.append("\"" + key + "\": \"" + value + "\""); + + colCount++; + if (colCount < yAxes.size()) { + jsonmap.append(", "); + } + jsonmap.append("\n"); + } + + jsonmap.append("}"); + + if (!row.equals(allData.get(allData.size() - 1))) { + jsonmap.append(", "); + } + } + + jsonmap.append("\n]\n"); + + return new ResponseEntity<>(jsonmap.toString(), HttpStatus.CREATED); + } + + if (job_type.equalsIgnoreCase("Todo List") && yAxes != null && !yAxes.isEmpty()) { + List> allData = getAllDataFromApi(tableName); + + String listName = yAxes.get(0); // Assuming the first column in yAxes to be the list name + List listData = new ArrayList<>(); + + for (Map row : allData) { + Object value = row.get(listName); + + if (value != null) { + listData.add(value); + } + } + + Map response = new HashMap<>(); + response.put("listName", listName); + response.put("List", listData); + + return new ResponseEntity<>(response, HttpStatus.CREATED); + } + + List> tableData = getAllDataFromApi(tableName); // Retrieve all data from the table + + List> yAxisValuesList = new ArrayList<>(); + List xAxisValues = new ArrayList<>(); + + // Initialize a list for each y-axis parameter + for (int i = 0; i < yAxes.size(); i++) { + yAxisValuesList.add(new ArrayList<>()); + } + + for (Map row : tableData) { + for (Entry entry : row.entrySet()) { + String key = entry.getKey(); + Object value = entry.getValue(); + + if (key.equalsIgnoreCase(xAxis)) { + xAxisValues.add(value.toString()); + } else { + int yIndex = yAxes.indexOf(key); + if (yIndex >= 0) { + yAxisValuesList.get(yIndex).add(value); + } + } + } + } + + if (job_type.equalsIgnoreCase("Bar Chart")) { + jsonmap.append("{\n \"barChartData\": [\n"); + + for (int j = 0; j < yAxes.size(); j++) { + String yAxis = yAxes.get(j); + + jsonmap.append("{"); + jsonmap.append("\"data\": ["); + + for (int i = 0; i < xAxisValues.size(); i++) { + Object yValue = yAxisValuesList.get(j).get(i); + jsonmap.append(yValue); + + if (i < xAxisValues.size() - 1) { + jsonmap.append(","); + } + } + + jsonmap.append("],"); + jsonmap.append("\"label\": \"" + yAxis + "\""); + jsonmap.append("}"); + + if (j < yAxes.size() - 1) { + jsonmap.append(","); + } + } + + jsonmap.append("],\n \"barChartLabels\": [ "); + + for (String xValue : xAxisValues) { + jsonmap.append("\"" + xValue + "\","); + } + + if (!xAxisValues.isEmpty()) { + jsonmap.deleteCharAt(jsonmap.lastIndexOf(",")); + } + + jsonmap.append("] \n }\n"); + } + + else if (job_type.equalsIgnoreCase("Line Chart")) { + jsonmap.append("{\n \"chartData\": [\n"); + + for (int j = 0; j < yAxes.size(); j++) { + String yAxis = yAxes.get(j); + + jsonmap.append("{"); + jsonmap.append("\"data\": ["); + + for (int i = 0; i < xAxisValues.size(); i++) { + Object yValue = yAxisValuesList.get(j).get(i); + jsonmap.append(yValue); + + if (i < xAxisValues.size() - 1) { + jsonmap.append(","); + } + } + + jsonmap.append("],"); + jsonmap.append("\"label\": \"" + yAxis + "\""); + jsonmap.append("}"); + + if (j < yAxes.size() - 1) { + jsonmap.append(","); + } + } + + jsonmap.append("],\n \"chartLabels\": [ "); + + for (String xValue : xAxisValues) { + jsonmap.append("\"" + xValue + "\","); + } + + if (!xAxisValues.isEmpty()) { + jsonmap.deleteCharAt(jsonmap.lastIndexOf(",")); + } + + jsonmap.append("] \n }\n"); + } else if (job_type.equalsIgnoreCase("Doughnut Chart")) { + jsonmap.append("{\"chartData\": [\n"); + + for (int j = 0; j < yAxes.size(); j++) { + String yAxis = yAxes.get(j); + + jsonmap.append("["); + + for (int i = 0; i < xAxisValues.size(); i++) { + Object yValue = yAxisValuesList.get(j).get(i); + jsonmap.append(yValue); + + if (i < xAxisValues.size() - 1) { + jsonmap.append(","); + } + } + + jsonmap.append("]"); + + if (j < yAxes.size() - 1) { + jsonmap.append(","); + } + } + + jsonmap.append("],\n \"chartLabels\": ["); + + for (String xValue : xAxisValues) { + jsonmap.append("\"" + xValue + "\","); + } + + if (!xAxisValues.isEmpty()) { + jsonmap.deleteCharAt(jsonmap.lastIndexOf(",")); + } + + jsonmap.append("]\n}"); + } + + else if (job_type.equalsIgnoreCase("Radar Chart")) { + jsonmap.append("{\n \"radarChartData\": [\n"); + + for (int j = 0; j < yAxes.size(); j++) { + String yAxis = yAxes.get(j); + + jsonmap.append("{"); + jsonmap.append("\"data\": ["); + + for (int i = 0; i < xAxisValues.size(); i++) { + Object yValue = yAxisValuesList.get(j).get(i); + jsonmap.append(yValue); + + if (i < xAxisValues.size() - 1) { + jsonmap.append(","); + } + } + + jsonmap.append("],"); + jsonmap.append("\"label\": \"" + yAxis + "\""); + jsonmap.append("}"); + + if (j < yAxes.size() - 1) { + jsonmap.append(","); + } + } + + jsonmap.append("],\n \"radarChartLabels\": [ "); + + for (String xValue : xAxisValues) { + jsonmap.append("\"" + xValue + "\","); + } + + if (!xAxisValues.isEmpty()) { + jsonmap.deleteCharAt(jsonmap.lastIndexOf(",")); + } + + jsonmap.append("] \n }\n"); + } + + else if (job_type.equalsIgnoreCase("PolarArea Chart")) { + jsonmap.append("{\n \"polarAreaChartData\": [\n"); + + for (int j = 0; j < yAxes.size(); j++) { + String yAxis = yAxes.get(j); + + jsonmap.append("{"); + jsonmap.append("\"data\": ["); + + for (int i = 0; i < xAxisValues.size(); i++) { + Object yValue = yAxisValuesList.get(j).get(i); + jsonmap.append(yValue); + + if (i < xAxisValues.size() - 1) { + jsonmap.append(","); + } + } + + jsonmap.append("],"); + jsonmap.append("\"label\": \"" + yAxis + "\""); + jsonmap.append("}"); + + if (j < yAxes.size() - 1) { + jsonmap.append(","); + } + } + + jsonmap.append("],\n \"polarAreaChartLabels\": [ "); + + for (String xValue : xAxisValues) { + jsonmap.append("\"" + xValue + "\","); + } + + if (!xAxisValues.isEmpty()) { + jsonmap.deleteCharAt(jsonmap.lastIndexOf(",")); + } + + jsonmap.append("] \n }\n"); + } + + if (job_type.equalsIgnoreCase("Pie Chart")) { + jsonmap.append("{\n \"pieChartData\": ["); + + for (int i = 0; i < yAxisValuesList.get(0).size(); i++) { // Assuming "mark" is the first item in yAxes + jsonmap.append(yAxisValuesList.get(0).get(i)); // Use the y-axis values + + if (i < yAxisValuesList.get(0).size() - 1) { + jsonmap.append(","); + } + } + + jsonmap.append("],\n \"pieChartLabels\": [ "); + + for (int i = 0; i < xAxisValues.size(); i++) { // Assuming "name" is the x-axis + jsonmap.append("\"" + xAxisValues.get(i) + "\""); // Use the x-axis values + + if (i < xAxisValues.size() - 1) { + jsonmap.append(","); + } + } + + jsonmap.append("] \n }\n"); + } + + else if (job_type.equalsIgnoreCase("Bubble Chart")) { + jsonmap.append("{\n \"bubbleChartData\": [\n"); + + for (int j = 0; j < yAxes.size(); j++) { + String yAxis = yAxes.get(j); + + jsonmap.append("{"); + jsonmap.append("\"data\": ["); + + for (int i = 0; i < xAxisValues.size(); i++) { + Object xValue = xAxisValues.get(i); + Object yValue = yAxisValuesList.get(j).get(i); + int radius = 5 + (i % 3) * 3; // Adjust the radius as needed + + jsonmap.append("{ \"x\": " + xValue + ", \"y\": " + yValue + ", \"r\": " + radius + "}"); + + if (i < xAxisValues.size() - 1) { + jsonmap.append(","); + } + } + + jsonmap.append("],"); + jsonmap.append("\"label\": \"" + yAxis + "\""); + jsonmap.append("}"); + + if (j < yAxes.size() - 1) { + jsonmap.append(","); + } + } + + jsonmap.append("],\n \"bubbleChartLabels\": [ "); + + for (String label : xAxisValues) { + jsonmap.append("\"" + label + "\","); + } + + if (!xAxisValues.isEmpty()) { + jsonmap.deleteCharAt(jsonmap.lastIndexOf(",")); + } + + jsonmap.append("] \n }\n"); + } else if (job_type.equalsIgnoreCase("Scatter Chart")) { + jsonmap.append("{\n \"scatterChartData\": [\n"); + + for (int j = 0; j < yAxes.size(); j++) { + String yAxis = yAxes.get(j); + + jsonmap.append("{"); + jsonmap.append("\"data\": ["); + + for (int i = 0; i < xAxisValues.size(); i++) { + Object xValue = xAxisValues.get(i); + Object yValue = yAxisValuesList.get(j).get(i); + + jsonmap.append("{ \"x\": " + xValue + ", \"y\": " + yValue + "}"); + + if (i < xAxisValues.size() - 1) { + jsonmap.append(","); + } + } + + jsonmap.append("],"); + jsonmap.append("\"label\": \"" + yAxis + "\""); + jsonmap.append("}"); + + if (j < yAxes.size() - 1) { + jsonmap.append(","); + } + } + + jsonmap.append("],\n \"scatterChartLabels\": [ "); + + for (String label : xAxisValues) { + jsonmap.append("\"" + label + "\","); + } + + if (!xAxisValues.isEmpty()) { + jsonmap.deleteCharAt(jsonmap.lastIndexOf(",")); + } + + jsonmap.append("] \n }\n"); + } + + else if (job_type.equalsIgnoreCase("Dynamic Chart")) { + jsonmap.append("{\n \"dynamicChartData\": [\n"); + + for (int j = 0; j < yAxes.size(); j++) { + String yAxis = yAxes.get(j); + + jsonmap.append("{"); + jsonmap.append("\"data\": ["); + + for (int i = 0; i < xAxisValues.size(); i++) { + Object yValue = yAxisValuesList.get(j).get(i); + jsonmap.append(yValue); + + if (i < xAxisValues.size() - 1) { + jsonmap.append(","); + } + } + + jsonmap.append("],"); + jsonmap.append("\"label\": \"" + yAxis + "\""); + jsonmap.append("}"); + + if (j < yAxes.size() - 1) { + jsonmap.append(","); + } + } + + jsonmap.append("],\n \"dynamicChartLabels\": [ "); + + for (String xValue : xAxisValues) { + jsonmap.append("\"" + xValue + "\","); + } + + if (!xAxisValues.isEmpty()) { + jsonmap.deleteCharAt(jsonmap.lastIndexOf(",")); + } + + jsonmap.append("] \n }\n"); + } + + return new ResponseEntity<>(jsonmap.toString(), HttpStatus.CREATED); + } + +// @GetMapping("/getKey") + public List> getAllKeyFromApi(String apiUrl) { + List> apiData = new ArrayList<>(); + + try { + // Make a GET request using the provided URL + ResponseEntity responseEntity = GET(apiUrl); + + // Convert the response to a List> + if (responseEntity.getBody() instanceof List) { + // If the response is a list, assume it's a list of maps + apiData = (List>) responseEntity.getBody(); + } else { + // If the response is not a list, assume it's a single map + Map singleMap = new HashMap<>(); + singleMap.put("data", responseEntity.getBody()); + apiData.add(singleMap); + } + + } catch (Exception e) { + log.error(e.getLocalizedMessage()); + } + + return apiData; + } + + @GetMapping("/getAllKeys") + public Set getAllKeys(@RequestParam String apiUrl) { + List> apiData = getAllKeyFromApi(apiUrl); + return getAllKeys(apiData); + } + + private Set getAllKeys(List> apiData) { + Set allKeys = new HashSet<>(); + + for (Map data : apiData) { + allKeys.addAll(data.keySet()); + } + + return allKeys; + } + + public List> getAllDataFromApi(String apiUrl) { + List> apiData = new ArrayList<>(); + + try { + // Make a GET request using the provided URL + ResponseEntity responseEntity = GET(apiUrl); + + // Convert the response to a List> + if (responseEntity.getBody() instanceof List) { + // If the response is a list, assume it's a list of maps + apiData = (List>) responseEntity.getBody(); + } else { + // If the response is not a list, assume it's a single map + Map singleMap = new HashMap<>(); + singleMap.put("data", responseEntity.getBody()); + apiData.add(singleMap); + } + + } catch (Exception e) { + log.error(e.getLocalizedMessage()); + + } + + return apiData; + } + + public ResponseEntity GET(String get) { + RestTemplate restTemplate = new RestTemplate(); + + ResponseEntity u = restTemplate.getForEntity(get, Object.class); + + return u; + + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard_builder/Controllers/DashboardSchedule_Controller.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard_builder/Controllers/DashboardSchedule_Controller.java new file mode 100644 index 0000000..de4d2fc --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard_builder/Controllers/DashboardSchedule_Controller.java @@ -0,0 +1,47 @@ +package com.realnet.Dashboard_builder.Controllers; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import com.realnet.Dashboard_builder.Entity.DashboardSchedule_t; +import com.realnet.Dashboard_builder.Services.DashboardSchedule_Service; + +@RequestMapping(value = "/DashboardSchedule") +@RestController +public class DashboardSchedule_Controller { + + @Autowired + private DashboardSchedule_Service Service; + + @PostMapping("/DashboardSchedule") + public DashboardSchedule_t Savedata(@RequestBody DashboardSchedule_t data) { + DashboardSchedule_t save = Service.Savedata(data); + return save; + } + + @GetMapping("/DashboardSchedule") + public List getdetails() { + List get = Service.getdetails(); + return get; + } + + @GetMapping("/DashboardSchedule/{id}") + public DashboardSchedule_t getdetailsbyId(@PathVariable Long id) { + DashboardSchedule_t get = Service.getdetailsbyId(id); + return get; + + } + + @DeleteMapping("/DashboardSchedule/{id}") + public void delete_by_id(@PathVariable Long id) { + Service.delete_by_id(id); + + } + + @PutMapping("/DashboardSchedule/{id}") + public DashboardSchedule_t update(@RequestBody DashboardSchedule_t data, @PathVariable Long id) { + DashboardSchedule_t update = Service.update(data, id); + return update; + } +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard_builder/Controllers/Dashboard_builder_Controller.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard_builder/Controllers/Dashboard_builder_Controller.java new file mode 100644 index 0000000..96f0819 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard_builder/Controllers/Dashboard_builder_Controller.java @@ -0,0 +1,55 @@ +package com.realnet.Dashboard_builder.Controllers; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import com.realnet.Dashboard_builder.Entity.Dashboard_builder_t; +import com.realnet.Dashboard_builder.Repository.Dashboard_builder_Repository; +import com.realnet.Dashboard_builder.Services.Dashboard_builder_Service; + +@RequestMapping(value = "/Dashboard_builder") +@RestController +public class Dashboard_builder_Controller { + + @Autowired + private Dashboard_builder_Service Service; + + + @Autowired + private Dashboard_builder_Repository builder_Repository; + + @PostMapping("/Dashboard_builder") + public Dashboard_builder_t Savedata(@RequestBody Dashboard_builder_t data) { + Dashboard_builder_t save = Service.Savedata(data); + return save; + } + + @GetMapping("/Dashboard_builder") + public List getdetails() { + List get = Service.getdetails(); + return get; + } + + @GetMapping("/Dashboard_builder/{id}") + public Dashboard_builder_t getdetailsbyId(@PathVariable Long id) { + Dashboard_builder_t get = Service.getdetailsbyId(id); + return get; + + } + + @DeleteMapping("/Dashboard_builder/{id}") + public void delete_by_id(@PathVariable Long id) { + Service.delete_by_id(id); + + } + + @PutMapping("/Dashboard_builder/{id}") + public Dashboard_builder_t update(@RequestBody Dashboard_builder_t data, @PathVariable Long id) { + Dashboard_builder_t update = Service.update(data, id); + return update; + } + + + + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard_builder/Controllers/EmailGenerate.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard_builder/Controllers/EmailGenerate.java new file mode 100644 index 0000000..4159f89 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard_builder/Controllers/EmailGenerate.java @@ -0,0 +1,385 @@ +//package com.realnet.Dashboard_builder.Controllers; +// +//import java.io.File; +//import java.io.IOException; +//import java.nio.file.FileSystems; +//import java.nio.file.Files; +//import java.nio.file.Path; +//import java.nio.file.Paths; +//import java.time.Instant; +//import java.util.ArrayList; +//import java.util.List; +//import java.util.Optional; +//import java.util.stream.Collectors; +// +//import org.apache.commons.io.FilenameUtils; +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.http.HttpHeaders; +//import org.springframework.http.HttpStatus; +//import org.springframework.http.MediaType; +//import org.springframework.http.ResponseEntity; +//import org.springframework.util.StringUtils; +//import org.springframework.web.bind.annotation.GetMapping; +//import org.springframework.web.bind.annotation.PathVariable; +//import org.springframework.web.bind.annotation.PostMapping; +//import org.springframework.web.bind.annotation.RequestMapping; +//import org.springframework.web.bind.annotation.RequestPart; +//import org.springframework.web.bind.annotation.RestController; +//import org.springframework.web.multipart.MultipartFile; +// +//import com.realnet.Communication.Models.Com_jobTable; +//import com.realnet.Communication.Models.Com_template; +//import com.realnet.Communication.Models.ProcessedJobTable; +//import com.realnet.Communication.Repos.JobTablerepo; +//import com.realnet.Communication.Repos.ProcessedJobTableRepo; +//import com.realnet.Communication.Repos.TemplateRepo; +//import com.realnet.Communication.Services.EmailCommunicationService; +//import com.realnet.Communication.response.EntityResponse; +//import com.realnet.Dashboard_builder.Entity.DashboardSchedule_t; +//import com.realnet.Dashboard_builder.Repository.DashboardSchedule_Repository; +//import com.realnet.Gateway.Entity.Gateway_t; +//import com.realnet.Gateway.Repository.Gateway_Repository; +//import com.realnet.Gateway.Services.Gateway_Service; +//import com.realnet.Gateway.Services.SmsGatwaySmsServices; +// +//@RestController +//@RequestMapping("/dashboard/schedule") +//public class EmailGenerate { +// +// +// +// @Autowired +// private SmsGatwaySmsServices gatwaySmsServices; +// +// +// +// +// +// @Autowired +// private JobTablerepo Com_jobTablerepo; +// +// @Autowired +// private TemplateRepo templateRepo; +// +// @Autowired +// private ProcessedJobTableRepo jobTableRepo; +// +// @Autowired +// private EmailCommunicationService emailService; +// +// @Autowired +// private Gateway_Repository gateway_Repository; +// +// +//// public final String UPLOAD_DIREC = "/src/main/resources/images"; +// +// +// @GetMapping("/sendgatewaydashboard") +// public ResponseEntity sendGateway() { +// List get = Com_jobTablerepo.findTopByOrderByIdAsc(); +// +// if (!get.isEmpty()) { +// for (Com_jobTable com_jobTable : get) { +// String jobType = com_jobTable.getJob_type(); +// if (jobType.equalsIgnoreCase("EMAIL")) { +// ResponseEntity response = sendMailGateway(com_jobTable); +// if (response.getStatusCode() != HttpStatus.OK) { +// return response; +// } +// } +//// else if (jobType.equalsIgnoreCase("SMS")) { +//// ResponseEntity response = sendSmsGateway(com_jobTable); +//// if (response.getStatusCode() != HttpStatus.OK) { +//// return response; +//// } +//// } +// else { +// return new ResponseEntity<>(new EntityResponse("Incorrect job type"), HttpStatus.BAD_REQUEST); +// } +// } +// return new ResponseEntity<>(get, HttpStatus.OK); +// } else { +// return new ResponseEntity<>(new EntityResponse("All SMS/Emails already sent"), HttpStatus.OK); +// } +// } +// +// private ResponseEntity sendMailGateway(Com_jobTable com_jobTable) { +// String gatewayName = com_jobTable.getGatewayName(); +// // Long id = Long.parseLong(gatewayName); +// Gateway_t getData=gateway_Repository.findByGatewayName(gatewayName); +// +// Long id=getData.getId(); +// +// +// String tempName = com_jobTable.getTemplate_name(); +// // Long tempid = Long.parseLong(tempName); +// +// Com_template template = templateRepo.findBytemplatename(tempName); +// +// if (template == null) { +// return new ResponseEntity<>(new EntityResponse("Template not found"), HttpStatus.NOT_FOUND); +// } +// +// String replacement_string = com_jobTable.getReplacement_string(); +// String replace_body = template.getBody().replace("", replacement_string); +// +// +// +// ProcessedJobTable gatewayJobTable = new ProcessedJobTable(); +// gatewayJobTable.setJob_type(com_jobTable.getJob_type()); +// gatewayJobTable.setSend_to(com_jobTable.getSend_to()); +// gatewayJobTable.setCc(com_jobTable.getCc()); +// gatewayJobTable.setAttachment(com_jobTable.getAttachment()); +// gatewayJobTable.setGatewaydone(com_jobTable.getGatewaydone()); +// gatewayJobTable.setTemplate_name(com_jobTable.getTemplate_name()); +// gatewayJobTable.setReplacement_string(com_jobTable.getReplacement_string()); +// gatewayJobTable.setGatewayName(com_jobTable.getGatewayName()); +// +// +// String filename = com_jobTable.getAttachment(); +// if(filename!=null) { +// +// Path path = FileSystems.getDefault().getPath("").toAbsolutePath(); +// String filepath = Paths.get(path.toString(), UPLOAD_DIREC, filename).toString(); +// File file = new File(filepath); +// +// +// boolean sendMailWithAttachment = emailService.sendEmailGatewayWithAttachment(id, com_jobTable.getSend_to(), template.getSubject(), replace_body, com_jobTable.getCc(), file); +// +// System.out.println("email sent with attachment " + sendMailWithAttachment); +// +// gatewayJobTable.setStatus(HttpStatus.OK.value()); +// gatewayJobTable.setResp_body("Email sent with attachment"); +// +// } +// +// else { +// +// boolean sendemail = emailService.sendEmailGateway(id, com_jobTable.getSend_to(), template.getSubject(), +// replace_body, com_jobTable.getCc()); +// System.out.println("email without attachment sent " + sendemail); +// +// gatewayJobTable.setStatus(HttpStatus.OK.value()); +// gatewayJobTable.setResp_body("Email sent without attachment"); +// +// +// } +// +// +// +// jobTableRepo.save(gatewayJobTable); +// Com_jobTablerepo.delete(com_jobTable); +// return new ResponseEntity<>(HttpStatus.OK); +// } +// +// +// +// +// +// +// +// +// +// +//// public final String UPLOAD_DIREC = "/src/main/resources/images"; +// +// public final String UPLOAD_DIREC = "C:/Users/Gyanadipta Pahi/Desktop/SureSetuLast/suresetu-mohasin205/backend/src/main/resources/images"; +// +// @PostMapping("/upload") +// public ResponseEntity uploadFile(@RequestPart("file") MultipartFile file) { +// if (file.isEmpty()) { +// return ResponseEntity.status(HttpStatus.BAD_REQUEST).body("File is required."); +// } +// +// try { +// String fileName = generateFileName(file.getOriginalFilename()); +// String filePath = UPLOAD_DIREC + File.separator + fileName; +// File dest = new File(filePath); +// file.transferTo(dest); +// +// return ResponseEntity.ok("File uploaded successfully."); +// } catch (IOException e) { +// e.printStackTrace(); +// return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("Failed to upload file."); +// } +// } +// +// private String generateFileName(String originalFilename) { +// String baseName = "dashboardSchedule" + Instant.now().getEpochSecond(); +// String extension = FilenameUtils.getExtension(originalFilename); +// if (!StringUtils.isEmpty(extension)) { +// baseName += "." + extension; +// } +// return baseName; +// } +// +// +// +// +// +// +// +// +// +// +// +// +//// @GetMapping("/files/{partialName}") +//// public ResponseEntity getFileByName(@PathVariable("partialName") String partialName) { +//// List matchingFiles = findMatchingFiles(partialName); +//// +//// if (matchingFiles.isEmpty()) { +//// return ResponseEntity.notFound().build(); +//// } else if (matchingFiles.size() > 1) { +//// // return ResponseEntity.status(HttpStatus.CONFLICT).body("Multiple files match the provided name."); +//// } +//// +//// File file = matchingFiles.get(0); +//// try { +//// byte[] fileBytes = Files.readAllBytes(file.toPath()); +//// +//// HttpHeaders headers = new HttpHeaders(); +//// headers.setContentType(MediaType.APPLICATION_OCTET_STREAM); +//// headers.setContentDispositionFormData("attachment", file.getName()); +//// headers.setContentLength(fileBytes.length); +//// +//// return new ResponseEntity<>(fileBytes, headers, HttpStatus.OK); +//// } catch (Exception e) { +//// e.printStackTrace(); +//// return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).build(); +//// } +//// } +//// +//// private List findMatchingFiles(String partialName) { +//// List matchingFiles = new ArrayList<>(); +//// +//// File directory = new File(UPLOAD_DIREC); +//// File[] files = directory.listFiles(); +//// if (files != null) { +//// for (File file : files) { +//// if (file.isFile() && file.getName().startsWith(partialName)) { +//// matchingFiles.add(file); +//// } +//// } +//// } +//// +//// return matchingFiles; +//// } +// +//// @Autowired +//// private JobTablerepo comJobTableRepository; +// +// @Autowired +// private DashboardSchedule_Repository dashboardSchedule_Repository; +// +// @GetMapping("/files/{partialName}") +// public ResponseEntity getFileByName(@PathVariable("partialName") String partialName) { +// List matchingFiles = findMatchingFiles(partialName); +// +// if (matchingFiles.isEmpty()) { +// return ResponseEntity.notFound().build(); +// } else if (matchingFiles.size() > 1) { +// System.out.println("Multiple files match the provided name"); +// // return ResponseEntity.status(HttpStatus.CONFLICT).body("Multiple files match the provided name."); +// } +// +// File file = matchingFiles.get(0); +// try { +// byte[] fileBytes = Files.readAllBytes(file.toPath()); +// +// // Save file path as attachment in the entity +//// List get = dashboardSchedule_Repository.findTopByOrderByIdAsc(); +//// get.setAttachment(file.getAbsolutePath()); +//// dashboardSchedule_Repository.save(comJobTable); +// +// // // Replace with the desired DashboardSchedule_t entity ID +// List dashboardSchedules = dashboardSchedule_Repository.findTopByOrderByIdAsc(); +// if (!dashboardSchedules.isEmpty()) { +// DashboardSchedule_t dashboardSchedule = dashboardSchedules.get(0); +// dashboardSchedule.setAttachment(file.getAbsolutePath()); +// dashboardSchedule.setGatewaydone("N"); +// dashboardSchedule_Repository.save(dashboardSchedule); +// } else { +// System.out.println("No dashboard schedules found."); +// } +// +// HttpHeaders headers = new HttpHeaders(); +// headers.setContentType(MediaType.APPLICATION_OCTET_STREAM); +// headers.setContentDispositionFormData("attachment", file.getName()); +// headers.setContentLength(fileBytes.length); +// +// return new ResponseEntity<>(fileBytes, headers, HttpStatus.OK); +// } catch (Exception e) { +// e.printStackTrace(); +// return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).build(); +// } +// } +// +// private List findMatchingFiles(String partialName) { +// List matchingFiles = new ArrayList<>(); +// +// File directory = new File(UPLOAD_DIREC); +// File[] files = directory.listFiles(); +// if (files != null) { +// for (File file : files) { +// if (file.isFile() && file.getName().startsWith(partialName)) { +// matchingFiles.add(file); +// } +// } +// } +// +// return matchingFiles; +// } +// +// +// +// +// +// +// +// +// @GetMapping("/dashboardscheduleid") +// public List getDashboardScheduleId() { +// List dashboardScheduleOptional = dashboardSchedule_Repository.findTopByOrderByIdAsc(); +// +// List filteredList = dashboardScheduleOptional.stream() +// .filter(dashboardSchedule -> dashboardSchedule.getAttachment() != null && !dashboardSchedule.getAttachment().isEmpty()) +// .collect(Collectors.toList()); +// +// List comJobTables = new ArrayList<>(); +// for (DashboardSchedule_t dashboardSchedule : filteredList) { +// Com_jobTable comJobTable = new Com_jobTable(); +// comJobTable.setAttachment(dashboardSchedule.getAttachment()); +// comJobTable.setGatewaydone(dashboardSchedule.getGatewaydone()); +// comJobTable.setSend_to(dashboardSchedule.getSendTo()); +// comJobTable.setTemplate_name(dashboardSchedule.getTemplate()); +// comJobTable.setGatewayName(dashboardSchedule.getGateway()); +// comJobTable.setCc(dashboardSchedule.getCc()); +// comJobTable.setReplacement_string(dashboardSchedule.getReplacementString()); +// comJobTable.setJob_type(dashboardSchedule.getType()); +// +// +// comJobTables.add(comJobTable); +// } +// +// List savedComJobTables = Com_jobTablerepo.saveAll(comJobTables); +// +// +// for (DashboardSchedule_t dashboardSchedule : filteredList) { +// dashboardSchedule.setAttachment(null); +// dashboardSchedule.setGatewaydone("Y"); +// } +// dashboardSchedule_Repository.saveAll(filteredList); +// +// return savedComJobTables; +// } +// +// +// +// +// +// +// +// +// +//} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard_builder/Controllers/PdfController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard_builder/Controllers/PdfController.java new file mode 100644 index 0000000..88087f0 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard_builder/Controllers/PdfController.java @@ -0,0 +1,31 @@ +//package com.realnet.Dashboard_builder.Controllers; +// +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.http.HttpStatus; +//import org.springframework.http.ResponseEntity; +//import org.springframework.web.bind.annotation.GetMapping; +//import org.springframework.web.bind.annotation.PathVariable; +//import org.springframework.web.bind.annotation.RequestMapping; +//import org.springframework.web.bind.annotation.RestController; +// +//@RestController +//@RequestMapping("/pdf") +//public class PdfController { +// +// private final PdfService pdfService; +// +// @Autowired +// public PdfController(PdfService pdfService) { +// this.pdfService = pdfService; +// } +// +// @GetMapping("/generate/{dashboardName}") +// public ResponseEntity generatePdf(@PathVariable String dashboardName) { +// try { +// pdfService.generatePdf(dashboardName); +// return new ResponseEntity<>("PDF generated successfully!", HttpStatus.OK); +// } catch (Exception e) { +// return new ResponseEntity<>(e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR); +// } +// } +//} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard_builder/Controllers/PdfService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard_builder/Controllers/PdfService.java new file mode 100644 index 0000000..46f2d1e --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard_builder/Controllers/PdfService.java @@ -0,0 +1,284 @@ +//package com.realnet.Dashboard_builder.Controllers; +// +//import java.io.File; +//import java.io.FileOutputStream; +//import java.io.IOException; +//import java.time.Instant; +// +//import org.apache.commons.io.FileUtils; +//import org.apache.pdfbox.pdmodel.PDDocument; +//import org.apache.pdfbox.pdmodel.PDPage; +//import org.apache.pdfbox.pdmodel.PDPageContentStream; +//import org.apache.pdfbox.pdmodel.font.PDType1Font; +//import org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject; +//import org.openqa.selenium.By; +//import org.openqa.selenium.OutputType; +//import org.openqa.selenium.TakesScreenshot; +//import org.openqa.selenium.WebDriver; +//import org.openqa.selenium.WebElement; +//import org.openqa.selenium.chrome.ChromeDriver; +//import org.openqa.selenium.chrome.ChromeOptions; +//import org.openqa.selenium.remote.DesiredCapabilities; +//import org.openqa.selenium.remote.RemoteWebDriver; +//import org.openqa.selenium.support.ui.ExpectedConditions; +//import org.openqa.selenium.support.ui.WebDriverWait; +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.stereotype.Service; +// +//import com.itextpdf.text.Document; +//import com.itextpdf.text.DocumentException; +//import com.itextpdf.text.Image; +//import com.itextpdf.text.Rectangle; +//import com.itextpdf.text.pdf.PdfWriter; +//import com.realnet.Dashboard1.Entity.Dashbord_Header; +//import com.realnet.Dashboard1.Repository.HeaderRepository; +// +//@Service +//public class PdfService { +// +// @Autowired +// private HeaderRepository headerRepository; +// +//// public void generatePdf(String dashboardName) throws DocumentException { +//// String pdfPath = "src/main/resources/" + dashboardName + ".pdf"; +//// +//// System.setProperty("webdriver.chrome.driver", +//// "C:\\Users\\Gyanadipta Pahi\\Desktop\\SureSetuLast\\suresetu-mohasin205\\backend\\src\\main\\resources\\chromedriver\\chromedriver.exe"); +//// +//// WebDriver driver = new ChromeDriver(); +//// +//// // driver.get("http://localhost:19004/token/dashboard2/getdashboardbyname/" + +//// // dashboardName); +//// driver.get("http://localhost:4200/#/cns-portal/dashboardrunner/dashrunner/" + dashboardName); +//// +//// try { +//// +//// String username="sysadmin"; +//// String password="test3"; +//// +//// // Find the username and password fields and login button +//// WebElement usernameField = driver.findElement(By.id("login_username")); +//// WebElement passwordField = driver.findElement(By.id("login_password")); +//// WebElement loginButton = driver.findElement(By.id("login_Buttom")); +//// +//// // Enter the login credentials +//// usernameField.sendKeys(username); +//// passwordField.sendKeys(password); +//// +//// // Click the login button +//// loginButton.click(); +//// +//// Document document = new Document(); +//// FileOutputStream outputStream = new FileOutputStream(pdfPath); +//// PdfWriter.getInstance(document, outputStream); +//// document.open(); +//// +//// // Find the dashboard container element in your Angular app +//// // WebElement dashboardContainer = +//// // driver.findElement(By.id("contentContainer")); +//// +//// WebDriverWait wait = new WebDriverWait(driver, 10); // Wait up to 10 seconds +//// WebElement dashboardContainer = wait +//// .until(ExpectedConditions.presenceOfElementLocated(By.id("contentContainer"))); +//// +//// // Capture the screenshot of the dashboard using Selenium +//// byte[] dashboardImageBytes = ((TakesScreenshot) driver).getScreenshotAs(OutputType.BYTES); +//// Image dashboardImage = Image.getInstance(dashboardImageBytes); +//// +//// // Scale the image to fit the PDF page +//// Rectangle pageSize = document.getPageSize(); +//// dashboardImage.scaleToFit(pageSize.getWidth(), pageSize.getHeight()); +//// dashboardImage.setAlignment(Image.MIDDLE); +//// +//// // Add the dashboard image to the PDF document +//// document.add(dashboardImage); +//// +//// document.close(); +//// driver.quit(); +//// +//// } catch (Exception e) { +//// throw new DocumentException("Failed to generate PDF: " + e.getMessage()); +//// } +//// } +// +//// public String generatePdf2(String dashboardName) throws IOException { +//// Dashbord_Header dashbord_Header = headerRepository.findByDashboardName(dashboardName); +//// Integer id = dashbord_Header.getId(); +//// +//// System.out.println("id is .. " + id); +//// +//// long unixTimestamp = Instant.now().getEpochSecond(); +//// +//// String pdfFileName = dashboardName + "_" + unixTimestamp + ".pdf"; +//// String pdfPath = "/data/images/" + pdfFileName; +//// String chromiumPath = "/usr/bin/chromium"; // Replace with the actual path to your Chromium executable +//// +//// System.setProperty("webdriver.chrome.driver", "/usr/local/bin/chromedriver"); // Replace with the correct path +//// +//// ChromeOptions options = new ChromeOptions(); +//// options.setBinary(chromiumPath); +//// options.addArguments("--headless"); +//// options.addArguments("--disable-gpu"); +//// options.addArguments("--no-sandbox"); +//// options.addArguments("--remote-debugging-address=0.0.0.0"); +//// options.addArguments("--remote-debugging-port=9222"); +//// +//// DesiredCapabilities capabilities = DesiredCapabilities.chrome(); +//// capabilities.setCapability(ChromeOptions.CAPABILITY, options); +//// +//// try { +//// WebDriver driver = new RemoteWebDriver(capabilities); +//// // by me +//// // WebDriverWait wait = new WebDriverWait(driver, 10); +//// driver.get("http://43.205.154.152:30182/#/cns-portal/dashboardrunner/dashrunner/" + id); +//// +//// // Replace these login steps with your actual login logic +//// String username = "sysadmin"; +//// String password = "test3"; +//// WebElement usernameField = driver.findElement(By.id("login_username")); +//// WebElement passwordField = driver.findElement(By.id("login_password")); +//// WebElement loginButton = driver.findElement(By.id("login_Buttom")); +//// +//// usernameField.sendKeys(username); +//// passwordField.sendKeys(password); +//// loginButton.click(); +//// +//// Thread.sleep(15000); // Wait for the page to load (you can adjust the wait time as needed) +//// +//// // Capture the screenshot of the dashboard +//// File screenshotFile = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE); +//// FileUtils.copyFile(screenshotFile, new File(pdfPath + ".png")); +//// +//// driver.quit(); +//// +//// // Convert the screenshot to PDF using Apache PDFBox +//// PDDocument document = new PDDocument(); +//// PDPage pdfPage = new PDPage(); +//// document.addPage(pdfPage); +//// PDPageContentStream contentStream = new PDPageContentStream(document, pdfPage); +//// PDImageXObject imageXObject = PDImageXObject.createFromFile(pdfPath + ".png", document); +//// contentStream.drawImage(imageXObject, 50, 600); +//// contentStream.setFont(PDType1Font.HELVETICA_BOLD, 12); +//// contentStream.beginText(); +//// contentStream.newLineAtOffset(100, 700); +//// contentStream.showText("Your PDF content here"); // Replace with any additional content you want to add +//// contentStream.endText(); +//// contentStream.close(); +//// +//// document.save(pdfPath); +//// document.close(); +//// +//// // Clean up the temporary screenshot image +//// new File(pdfPath + ".png").delete(); +//// } catch (IOException | InterruptedException e) { +//// throw new IOException("Failed to generate PDF: " + e.getMessage()); +//// } +//// +//// return pdfFileName; +//// } +// +// public String generatePdf(String dashboardName) throws DocumentException { +// +// Dashbord_Header dashbord_Header = headerRepository.findByDashboardName(dashboardName); +// Integer id = dashbord_Header.getId(); +// +// System.out.println("id is .. " + id); +// +// long unixTimestamp = Instant.now().getEpochSecond(); +// +// String pdfFileName = dashboardName + "_" + unixTimestamp + ".pdf"; +// +//// String pdfPath = "src/main/resources/images/" + pdfFileName; +// String pdfPath = "/data/images/" + pdfFileName; +// +// System.setProperty("webdriver.chrome.driver", +// // "C:\\Users\\Gyanadipta Pahi\\Desktop\\SureSetNew\\suresetu-mohasin205\\backend\\src\\main\\resources\\chromedriver\\chromedriver.exe"); +// "/usr/local/bin/chromedriver"); +// +// System.out.println("test1 ...."); +//// WebDriver driver = new ChromeDriver(); +// ChromeOptions options = new ChromeOptions(); +// options.addArguments("--headless"); +// options.addArguments("--disable-gpu"); +// options.addArguments("--no-sandbox"); +// options.addArguments("--remote-debugging-address=0.0.0.0"); +// options.addArguments("--remote-debugging-port=9222"); +// WebDriver driver = new ChromeDriver(options); +// +// driver.get("http://43.205.154.152:30182/#/cns-portal/dashboardrunner/dashrunner/" + id); +// +// try { +// System.out.println("test2 ...."); +// +// String username = "sysadmin"; +// String password = "test3"; +// +// // Find the username and password fields and login button +// WebElement usernameField = driver.findElement(By.id("login_username")); +// WebElement passwordField = driver.findElement(By.id("login_password")); +// WebElement loginButton = driver.findElement(By.id("login_Buttom")); +// +// // Enter the login credentials +// usernameField.sendKeys(username); +// passwordField.sendKeys(password); +// +// // Click the login button +// loginButton.click(); +// +// Thread.sleep(10000); +// +// Document document = new Document(); +// FileOutputStream outputStream = new FileOutputStream(pdfPath); +// PdfWriter.getInstance(document, outputStream); +// document.open(); +// +// System.out.println("test3 ...."); +// +//// WebDriverWait wait = new WebDriverWait(driver, 10); // Wait up to 10 seconds +//// WebElement dashboardContainer = wait +//// .until(ExpectedConditions.presenceOfElementLocated(By.id("contentContainer"))); +//// +//// // Capture the screenshot of the dashboard using Selenium +//// byte[] dashboardImageBytes = ((TakesScreenshot) driver).getScreenshotAs(OutputType.BYTES); +//// Image dashboardImage = Image.getInstance(dashboardImageBytes); +//// +//// // Scale the image to fit the PDF page +//// Rectangle pageSize = document.getPageSize(); +//// dashboardImage.scaleToFit(pageSize.getWidth(), pageSize.getHeight()); +//// dashboardImage.setAlignment(Image.MIDDLE); +//// +//// // Add the dashboard image to the PDF document +//// document.add(dashboardImage); +//// +//// document.close(); +//// driver.quit(); +// +// +// +// WebDriverWait wait = new WebDriverWait(driver, 10); +// WebElement dashboardContainer = wait.until(ExpectedConditions.presenceOfElementLocated(By.id("contentContainer"))); +// +// // Capture screenshot of the specific element +// File screenshotFile = dashboardContainer.getScreenshotAs(OutputType.FILE); +// +// // Convert the screenshot file into an image +// Image dashboardImage = Image.getInstance(screenshotFile.getAbsolutePath()); +// +// // Scale and align the image as needed +// Rectangle pageSize = document.getPageSize(); +// dashboardImage.scaleToFit(pageSize.getWidth(), pageSize.getHeight()); +// dashboardImage.setAlignment(Image.MIDDLE); +// +// // Add the dashboard image to the PDF document +// document.add(dashboardImage); +// +// document.close(); +// driver.quit(); +// +// } catch (Exception e) { +// throw new DocumentException("Failed to generate PDF: " + e.getMessage()); +// } +// +// return pdfFileName; +// } +//} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard_builder/Entity/DashboardSchedule_t.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard_builder/Entity/DashboardSchedule_t.java new file mode 100644 index 0000000..0a5756d --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard_builder/Entity/DashboardSchedule_t.java @@ -0,0 +1,28 @@ +package com.realnet.Dashboard_builder.Entity; + import lombok.*; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + @Entity + @Data + public class DashboardSchedule_t{ + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String cron; + private String every; + private String gateway; + private String template; + private Date startTime; + private Date endTime; + private String attachment; + private String sendTo; + private String gatewaydone; + private String cc; + private String replacementString; + private String type; + + } \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard_builder/Entity/Dashboard_builder_t.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard_builder/Entity/Dashboard_builder_t.java new file mode 100644 index 0000000..f805eba --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard_builder/Entity/Dashboard_builder_t.java @@ -0,0 +1,20 @@ +package com.realnet.Dashboard_builder.Entity; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; + +import lombok.Data; + +@Entity +@Data +public class Dashboard_builder_t { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String dashboardname; + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard_builder/Repository/DashboardSchedule_Repository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard_builder/Repository/DashboardSchedule_Repository.java new file mode 100644 index 0000000..796f43c --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard_builder/Repository/DashboardSchedule_Repository.java @@ -0,0 +1,23 @@ +package com.realnet.Dashboard_builder.Repository; + + +import java.util.List; +import java.util.Optional; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.stereotype.Repository; + +import com.realnet.Dashboard_builder.Entity.DashboardSchedule_t; + + + + +@Repository +public interface DashboardSchedule_Repository extends JpaRepository { + + @Query(value = "SELECT * FROM dashboard_schedule_t where gatewaydone ='N' order by id asc", nativeQuery = true) + List findTopByOrderByIdAsc(); + + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard_builder/Repository/Dashboard_builder_Repository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard_builder/Repository/Dashboard_builder_Repository.java new file mode 100644 index 0000000..7567970 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard_builder/Repository/Dashboard_builder_Repository.java @@ -0,0 +1,14 @@ +package com.realnet.Dashboard_builder.Repository; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.stereotype.Repository; + +import com.realnet.Dashboard_builder.Entity.Dashboard_builder_t; + +@Repository +public interface Dashboard_builder_Repository extends JpaRepository { + + + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard_builder/Services/DashboardSchedule_Service.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard_builder/Services/DashboardSchedule_Service.java new file mode 100644 index 0000000..8166eb1 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard_builder/Services/DashboardSchedule_Service.java @@ -0,0 +1,47 @@ +package com.realnet.Dashboard_builder.Services; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.realnet.Dashboard_builder.Entity.DashboardSchedule_t; +import com.realnet.Dashboard_builder.Repository.DashboardSchedule_Repository; + +@Service +public class DashboardSchedule_Service { + @Autowired + private DashboardSchedule_Repository Repository; + + public DashboardSchedule_t Savedata(DashboardSchedule_t data) { + data.setGatewaydone("N"); + // DashboardSchedule_t save = Repository.save(job); + return Repository.save(data); + } + + public List getdetails() { + return (List) Repository.findAll(); + } + + public DashboardSchedule_t getdetailsbyId(Long id) { + return Repository.findById(id).get(); + } + + public void delete_by_id(Long id) { + Repository.deleteById(id); + } + + public DashboardSchedule_t update(DashboardSchedule_t data, Long id) { + DashboardSchedule_t old = Repository.findById(id).get(); + old.setCron(data.getCron()); + old.setEvery(data.getEvery()); + old.setGateway(data.getGateway()); + old.setTemplate(data.getTemplate()); + old.setStartTime(data.getStartTime()); + old.setEndTime(data.getEndTime()); + old.setAttachment(data.getAttachment()); + old.setSendTo(data.getSendTo()); + final DashboardSchedule_t test = Repository.save(old); + return test; + } +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard_builder/Services/Dashboard_builder_Service.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard_builder/Services/Dashboard_builder_Service.java new file mode 100644 index 0000000..acb6861 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard_builder/Services/Dashboard_builder_Service.java @@ -0,0 +1,37 @@ +package com.realnet.Dashboard_builder.Services; + +import com.realnet.Dashboard_builder.Repository.Dashboard_builder_Repository; +import com.realnet.Dashboard_builder.Entity.Dashboard_builder_t; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class Dashboard_builder_Service { + @Autowired + private Dashboard_builder_Repository Repository; + + public Dashboard_builder_t Savedata(Dashboard_builder_t data) { + return Repository.save(data); + } + + public List getdetails() { + return (List) Repository.findAll(); + } + + public Dashboard_builder_t getdetailsbyId(Long id) { + return Repository.findById(id).get(); + } + + public void delete_by_id(Long id) { + Repository.deleteById(id); + } + + public Dashboard_builder_t update(Dashboard_builder_t data, Long id) { + Dashboard_builder_t old = Repository.findById(id).get(); + old.setDashboardname(data.getDashboardname()); + final Dashboard_builder_t test = Repository.save(old); + return test; + } +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard_builder/Services/EmailGenerateService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard_builder/Services/EmailGenerateService.java new file mode 100644 index 0000000..059ee45 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Dashboard_builder/Services/EmailGenerateService.java @@ -0,0 +1,126 @@ +//package com.realnet.Dashboard_builder.Services; +// +//import java.io.File; +//import java.util.Properties; +// +//import javax.mail.Authenticator; +//import javax.mail.Message; +//import javax.mail.MessagingException; +//import javax.mail.PasswordAuthentication; +//import javax.mail.Session; +//import javax.mail.Transport; +//import javax.mail.internet.InternetAddress; +//import javax.mail.internet.MimeMessage; +// +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.mail.javamail.JavaMailSender; +//import org.springframework.mail.javamail.MimeMessageHelper; +// +//import com.realnet.Gateway.Entity.Gateway_t; +//import com.realnet.Gateway.Services.Gateway_Service; +// +//public class EmailGenerateService { +// +// @Autowired +// private JavaMailSender mailSender; +// +// @Autowired +// private Gateway_Service gateway_Service; +// +// public boolean sendEmailGateway(Long id, String to, String subject, String htmlContent, String cc) { +// // Email to database code start +// Gateway_t getdetails = gateway_Service.getdetailsbyId(id); +// +// String host = getdetails.getHost(); +// String username = getdetails.getUserName(); +// String password = getdetails.getPassword(); +// +// // SMTP server properties +// Properties props = new Properties(); +// props.setProperty("mail.smtp.host", host); +// props.setProperty("mail.smtp.port", "587"); +// props.setProperty("mail.smtp.auth", "true"); +// props.setProperty("mail.smtp.starttls.enable", "true"); +// +// try { +// Session session = Session.getInstance(props, new Authenticator() { +// protected PasswordAuthentication getPasswordAuthentication() { +// return new PasswordAuthentication(username, password); +// } +// }); +// +// // Create a new message +// MimeMessage message = new MimeMessage(session); +// +// // Set the sender +// message.setFrom(new InternetAddress(username)); +// +// // Set the recipient +// message.setRecipients(Message.RecipientType.TO, InternetAddress.parse(to)); +// +// // Set the CC recipient if provided +// if (cc != null) { +// message.setRecipients(Message.RecipientType.CC, InternetAddress.parse(cc)); +// } +// +// // Set the subject +// message.setSubject(subject); +// +// // Set the content +// message.setContent(htmlContent, "text/html"); +// +// // Send the message +// Transport.send(message); +// +// return true; +// } catch (MessagingException e) { +// e.printStackTrace(); +// return false; +// } +// } +// +// +// +// +// public String sendEmailGatewayWithAttachment(Long id, String to, String subject, String htmlContent, String cc, File file) { +// Gateway_t getdetails = gateway_Service.getdetailsbyId(id); +// if (getdetails != null) { +// String host = getdetails.getHost(); +// String username = getdetails.getUserName(); +// String password = getdetails.getPassword(); +// +// // SMTP server properties +// Properties props = new Properties(); +// props.setProperty("mail.smtp.host", host); +// props.setProperty("mail.smtp.port", "587"); +// props.setProperty("mail.smtp.auth", "true"); +// props.setProperty("mail.smtp.starttls.enable", "true"); +// +// try { +// Session session = Session.getInstance(props, new Authenticator() { +// protected PasswordAuthentication getPasswordAuthentication() { +// return new PasswordAuthentication(username, password); +// } +// }); +// +// MimeMessage mimeMessage = new MimeMessage(session); +// MimeMessageHelper mimeMessageHelper = new MimeMessageHelper(mimeMessage, true); +// mimeMessageHelper.setTo(to); +// mimeMessageHelper.setSubject(subject); +// mimeMessageHelper.setText(htmlContent, true); +// mimeMessageHelper.setCc(cc); +// mimeMessageHelper.addAttachment(file.getName(), file); +// +// Transport.send(mimeMessage); +// +// return "Mail sent successfully"; +// } catch (MessagingException e) { +// return "Error while sending mail: " + e.getMessage(); +// } +// } else { +// return "Error: Gateway not found"; +// } +// } +// +// +//} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcard/Controllers/AngularHtmlCode.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcard/Controllers/AngularHtmlCode.java new file mode 100644 index 0000000..a78c4db --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcard/Controllers/AngularHtmlCode.java @@ -0,0 +1,62 @@ +package com.realnet.FabricIcard.Controllers; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("/token") +public class AngularHtmlCode { + + @GetMapping("/convert") + public String convertAngularToHtml(@RequestParam String angularCode) { + // Perform conversion logic here (replace Angular-specific syntax with HTML) + String htmlCode = convertAngularToHtmlCode(angularCode); + return htmlCode; + } + + +// private String convertAngularToHtmlCode(String angularCode) { +// // Replace ng-container with a div +// String htmlCode = angularCode.replace(" getdetails() { + List get = Service.getdetails(); + return get; + } + + @GetMapping("/FabricIcard/{id}") + public FabricIcard getdetailsbyId(@PathVariable Long id) { + FabricIcard get = Service.getdetailsbyId(id); + return get; + + } + + @DeleteMapping("/FabricIcard/{id}") + public void delete_by_id(@PathVariable Long id) { + Service.delete_by_id(id); + + } + + @PutMapping("/FabricIcard/{id}") + public FabricIcard update(@RequestBody FabricIcard data, @PathVariable Long id) { + FabricIcard update = Service.update(data, id); + return update; + } +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcard/Controllers/LayoutPdf.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcard/Controllers/LayoutPdf.java new file mode 100644 index 0000000..7b8f2d2 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcard/Controllers/LayoutPdf.java @@ -0,0 +1,328 @@ +package com.realnet.FabricIcard.Controllers; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletResponse; + +import org.json.JSONArray; +import org.json.JSONObject; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.client.RestTemplate; +import org.xhtmlrenderer.pdf.ITextRenderer; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import com.realnet.FabricIcard.Entity.FabricIcard; +import com.realnet.FabricIcard.Repository.FabricIcardRepository; +import com.realnet.FabricIcardLines.Entity.FabricIcardLines; +import com.realnet.FabricIcardLines.Repository.FabricIcardLinesRepository; + +@RestController +@RequestMapping("/token") +public class LayoutPdf { + + @PostMapping("/generate-pdf") + public ResponseEntity generatePdf(@RequestBody String htmlContent) { + try { + // Use Flying Saucer to convert HTML to PDF + byte[] pdfBytes = generatePdf1(htmlContent); + + HttpHeaders headers = new HttpHeaders(); + headers.setContentType(MediaType.APPLICATION_PDF); + headers.setContentDispositionFormData("inline", "output.pdf"); + + return new ResponseEntity<>(pdfBytes, headers, HttpStatus.OK); + } catch (Exception e) { + e.printStackTrace(); + return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR); + } + } + + public byte[] generatePdf1(String htmlContent) throws Exception { + ITextRenderer renderer = new ITextRenderer(); + renderer.setDocumentFromString(htmlContent); + renderer.layout(); + + try (ByteArrayOutputStream outputStream = new ByteArrayOutputStream()) { + renderer.createPDF(outputStream); + return outputStream.toByteArray(); + } + } + + @Autowired + private FabricIcardRepository fabricIcardRepository; + + @Autowired + private FabricIcardLinesRepository fabricIcardLinesRepository; + + @PostMapping("/generateHtml1/{id}") + public String generateHtml1(@RequestBody List> jsonData, @PathVariable Long id) + throws JsonProcessingException { + return generateHtml2(jsonData, id); + } + + public String generateHtml2(List> jsonData, Long id) throws JsonProcessingException { + +// LayoutBuilder_t layoutBuilder_t = layoutBuilder_Repository.findById(id).get(); +// +// LayoutBuilderLines_t layoutBuilderLines_t = layoutBuilderLines_Repository.findById(id).get(); +// +// String url = layoutBuilder_t.getUrl(); +// String model = layoutBuilderLines_t.getModel(); +// +// String serviceOrderId = "146"; +// +// JsonParser parser = new JsonParser(); +// JsonElement element = parser.parse(model); +// JsonArray models = element.getAsJsonArray(); +// JsonObject getbodyobject = null; +// List> replacerule = null; +// String operation = null; +// String replaceWith = null; +// String startstring = null; +// String endstring = null; +// String keyword = null; +// String linestring = null; +// String cellAddress = null; +// String ModifyfileName = null; +// String nodeName = null; +// +// String a_uri = url.replace("?", String.valueOf(serviceOrderId)); +// System.out.println(a_uri); +// +// Object body = GET(a_uri).getBody(); +// ObjectMapper objectMapper = new ObjectMapper(); +// String json = objectMapper.writeValueAsString(body); +// JsonElement getbody = parser.parse(json); +// getbodyobject = getbody.getAsJsonObject(); +// +// +// +// for (JsonElement mod : models) { +// JsonObject object = mod.getAsJsonObject(); +// +// startstring = object.get("start_string").toString().replaceAll("\"", ""); +// endstring = object.get("end_string").toString().replaceAll("\"", ""); +// replaceWith = object.get("replace_with").toString().replaceAll("\"", ""); +// keyword = object.get("Keyword").toString().replaceAll("\"", ""); +// linestring = object.get("line_string").toString().replaceAll("\"", ""); +// operation = object.get("operation").toString().replaceAll("\"", ""); +// cellAddress = object.get("cellAddress").toString().replaceAll("\"", ""); +// +// nodeName = object.get("nodeName").toString().replaceAll("\"", ""); +//// // nodeName = "listOfItems"; // Set the desired node name +//// +// JsonArray values = searchJsonKey(getbodyobject, replaceWith, nodeName); +// +// for (JsonElement element1 : values) { +// String individualValue = element1.getAsString(); +// +// replaceWith = individualValue; +// +// System.out.println("Found value: " + individualValue); +// +// if (operation.contains("replacement")) { +// replacerule = replaceStringInJsonData(jsonData, replaceWith, keyword); +// +// } +// } +// +// } +// +// jsonData = replacerule; + + StringBuilder htmlBuilder = new StringBuilder(); + + // Open the main card div + htmlBuilder.append("
"); + htmlBuilder.append( + "
"); + + for (Map item : jsonData) { + + // Check for Table type + if ("Table".equals(item.get("type"))) { + htmlBuilder.append("
"); + + // Open the card-title div for Table + htmlBuilder.append("
"); + + // Add Table HTML code + htmlBuilder.append("
"); + htmlBuilder.append(""); + htmlBuilder.append(""); + htmlBuilder.append(""); + + // Add table header based on the JSON structure + List> values = (List>) item.get("values"); + + + for (Map value : values) { + htmlBuilder.append(""); + } + + htmlBuilder.append(""); + htmlBuilder.append(""); + htmlBuilder.append(""); + htmlBuilder.append(""); + + + // Add table body content based on the JSON structure + for (Map value : values) { + htmlBuilder.append(""); + } + + +// // Add the additional values twice +// for (Map additionalValue : values) { +// htmlBuilder.append(""); +// } + + htmlBuilder.append(""); + htmlBuilder.append(""); + + htmlBuilder.append("
").append(value.get("label")).append("
").append(value.get("value")).append("").append(additionalValue.get("value")).append("
"); + htmlBuilder.append("
"); + + // Close the card-title and individual item div for Table + htmlBuilder.append("
"); + } + + // Check for Image type + else if ("Image".equals(item.get("type"))) { + htmlBuilder.append("
"); + + // Open the card-title div for Image + htmlBuilder.append("
"); + + // Add Image tag + htmlBuilder.append("\"Image\""); + + // Close the card-title and individual item div for Image + htmlBuilder.append("
"); + } else if ("Line".equals(item.get("type"))) { + // Handle Line type + htmlBuilder.append("
"); + htmlBuilder.append("
"); + htmlBuilder.append("
"); + } else { + // Handle other types + // Open the individual item div + htmlBuilder.append("
"); + + // Open the card-title div + htmlBuilder.append("
"); + + // Append the fieldtext content + htmlBuilder.append(item.get("fieldtext")); + + // Close the card-title and individual item div + htmlBuilder.append("
"); + } + } + + // Close the main card div + htmlBuilder.append("
"); + + return htmlBuilder.toString(); + } + + public ResponseEntity GET(String get) { + RestTemplate restTemplate = new RestTemplate(); + + ResponseEntity u = restTemplate.getForEntity(get, Object.class); + + return u; + + } + + private static JsonArray searchJsonKey(JsonObject jsonObject, String keyToSearch, String nodeName) { + JsonArray resultArray = new JsonArray(); + + for (Map.Entry entry : jsonObject.entrySet()) { + String key = entry.getKey().replaceAll("\"", ""); + JsonElement value = entry.getValue(); + + if (value.isJsonObject()) { + // Recursively search for the key in the nested object + JsonArray nestedValues = searchJsonKey(value.getAsJsonObject(), keyToSearch, nodeName); + resultArray.addAll(nestedValues); + } else if (nodeName == null || nodeName.isEmpty() || key.equalsIgnoreCase(nodeName)) { + // If nodeName is null or matches the current key, search for the keyToSearch + if (value.isJsonArray()) { + // Handle arrays by iterating through each element + JsonArray jsonArray = value.getAsJsonArray(); + for (JsonElement arrayElement : jsonArray) { + if (arrayElement.isJsonObject()) { + JsonObject itemObject = arrayElement.getAsJsonObject(); + if (itemObject.has(keyToSearch)) { + resultArray.add(itemObject.get(keyToSearch)); + } + } + } + } else if (value.isJsonPrimitive() && key.equals(keyToSearch)) { + // If nodeName is null and the current key matches keyToSearch, add the value to + // the result + resultArray.add(value); + } + } + } + + return resultArray; + } + + + + public static List> replaceStringInJsonData(List> jsonData, String keyword, + String replaceWith) { + for (Map entry : jsonData) { + for (Map.Entry keyValue : entry.entrySet()) { + if (keyValue.getValue() instanceof String) { + String value = (String) keyValue.getValue(); + if (value.contains(replaceWith)) { + entry.replace(keyValue.getKey(), value.replace(replaceWith, keyword)); + } + } + } + } + return jsonData; + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcard/Controllers/MyImageReplacedElementFactory.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcard/Controllers/MyImageReplacedElementFactory.java new file mode 100644 index 0000000..59bfc6f --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcard/Controllers/MyImageReplacedElementFactory.java @@ -0,0 +1,40 @@ +//package com.realnet.LayoutBuilder.Controllers; +// +//import org.w3c.dom.Element; +//import org.xhtmlrenderer.extend.ReplacedElement; +//import org.xhtmlrenderer.extend.ReplacedElementFactory; +//import org.xhtmlrenderer.extend.UserAgentCallback; +//import org.xhtmlrenderer.layout.LayoutContext; +//import org.xhtmlrenderer.render.BlockBox; +//import org.xhtmlrenderer.simple.extend.FormSubmissionListener; +// +//public class MyImageReplacedElementFactory implements ReplacedElementFactory{ +// +// @Override +// public ReplacedElement createReplacedElement(LayoutContext c, BlockBox box, UserAgentCallback uac, int cssWidth, +// int cssHeight) { +// // TODO Auto-generated method stub +// return null; +// } +// +// @Override +// public void reset() { +// // TODO Auto-generated method stub +// +// } +// +// @Override +// public void remove(Element e) { +// // TODO Auto-generated method stub +// +// } +// +// @Override +// public void setFormSubmissionListener(FormSubmissionListener listener) { +// // TODO Auto-generated method stub +// +// } +// +//} + + diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcard/Controllers/PageController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcard/Controllers/PageController.java new file mode 100644 index 0000000..ab47849 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcard/Controllers/PageController.java @@ -0,0 +1,28 @@ +package com.realnet.FabricIcard.Controllers; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.FabricIcard.Entity.PageSource; +import com.realnet.FabricIcard.Repository.PageSourceRepository; + +@RestController +@RequestMapping("/api/pages") +public class PageController { + + @Autowired + private PageSourceRepository pageSourceRepository; + + @PostMapping("/save") + public String savePageSource(@RequestBody String sourceCode) { + PageSource pageSource = new PageSource(); + pageSource.setSourceCode(sourceCode); + + // Save to the database + pageSourceRepository.save(pageSource); + + return "Page source saved successfully!"; + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcard/Controllers/TestCode.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcard/Controllers/TestCode.java new file mode 100644 index 0000000..4da1232 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcard/Controllers/TestCode.java @@ -0,0 +1,108 @@ +//package com.realnet.FabricIcard.Controllers; +// +//import org.springframework.web.bind.annotation.RequestMapping; +//import org.springframework.web.bind.annotation.RestController; +//import com.fasterxml.jackson.databind.JsonNode; +//import com.fasterxml.jackson.databind.ObjectMapper; +//import org.springframework.web.bind.annotation.GetMapping; +//import org.springframework.web.bind.annotation.RequestMapping; +//import org.springframework.web.bind.annotation.RestController; +// +//import java.io.BufferedReader; +//import java.io.InputStreamReader; +//import java.net.HttpURLConnection; +//import java.net.URL; +//import java.util.ArrayList; +//import java.util.Iterator; +//import java.util.List; +//import java.util.Map; +// +//@RestController +//@RequestMapping("/token") +//public class TestCode { +// @GetMapping("/dynamicValues") +// public List> getDynamicValues() { +// try { +// // Make HTTP request to the first API +// String apiUrl = "http://3.109.61.114:30161/token/Billing/ServiceOrder/ServiceOrder/146"; +// String response = sendHttpRequest(apiUrl); +// +// // Parse the response and extract the listOfItems +// return createValuesFromList(response); +// } catch (Exception e) { +// e.printStackTrace(); +// return new ArrayList<>(); // Return an empty list in case of an error +// } +// } +// +// private String sendHttpRequest(String apiUrl) throws Exception { +// URL url = new URL(apiUrl); +// HttpURLConnection connection = (HttpURLConnection) url.openConnection(); +// connection.setRequestMethod("GET"); +// +// BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream())); +// StringBuilder response = new StringBuilder(); +// +// String line; +// while ((line = reader.readLine()) != null) { +// response.append(line); +// } +// +// reader.close(); +// connection.disconnect(); +// +// return response.toString(); +// } +// +// private List> createValuesFromList(String jsonResponse) { +// List> values = new ArrayList<>(); +// +// try { +// // Parse the JSON response using Jackson ObjectMapper +// ObjectMapper objectMapper = new ObjectMapper(); +// JsonNode rootNode = objectMapper.readTree(jsonResponse); +// +// // Extract the listOfItems node +// JsonNode listOfItemsNode = rootNode.path("listOfItems"); +// +// // Iterate through each item in the listOfItems +// Iterator itemsIterator = listOfItemsNode.elements(); +// while (itemsIterator.hasNext()) { +// JsonNode itemNode = itemsIterator.next(); +// +// // Extract relevant information from the item +// String itemCode = itemNode.path("itemCode").asText(); +// String unitPrice = itemNode.path("unitPrice").asText(); +// String lineTotal = itemNode.path("lineTotal").asText(); +// +// // Create the corresponding values +// Map itemValues = Map.of( +// "label", "Item and Description", +// "value", itemCode +// ); +// Map qtyValues = Map.of( +// "label", "Qty", +// "value", "1" +// ); +// Map rateValues = Map.of( +// "label", "Rate", +// "value", unitPrice +// ); +// Map amountValues = Map.of( +// "label", "Amount", +// "value", lineTotal +// ); +// +// // Add the values to the list +// values.add(itemValues); +// values.add(qtyValues); +// values.add(rateValues); +// values.add(amountValues); +// } +// } catch (Exception e) { +// e.printStackTrace(); +// } +// +// return values; +// } +//} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcard/Entity/FabricIcard.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcard/Entity/FabricIcard.java new file mode 100644 index 0000000..9f4ecfa --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcard/Entity/FabricIcard.java @@ -0,0 +1,35 @@ +package com.realnet.FabricIcard.Entity; + +import java.util.ArrayList; +import java.util.List; + +import javax.persistence.CascadeType; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.OneToMany; + +import com.fasterxml.jackson.annotation.JsonManagedReference; +import com.realnet.FabricIcardLines.Entity.FabricIcardLines; + +import lombok.Data; + +@Entity +@Data +public class FabricIcard { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String name; + private String description; + private boolean active; + private String url; + + @JsonManagedReference + @OneToMany(cascade = CascadeType.ALL, mappedBy = "layoutBuilder_t") + private List fabricIcardLines = new ArrayList<>(); + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcard/Entity/PageSource.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcard/Entity/PageSource.java new file mode 100644 index 0000000..8633a6b --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcard/Entity/PageSource.java @@ -0,0 +1,19 @@ +package com.realnet.FabricIcard.Entity; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; + +import lombok.Data; + +@Entity +@Data +public class PageSource { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String sourceCode; + + // getters and setters +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcard/Repository/FabricIcardRepository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcard/Repository/FabricIcardRepository.java new file mode 100644 index 0000000..719f189 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcard/Repository/FabricIcardRepository.java @@ -0,0 +1,12 @@ +package com.realnet.FabricIcard.Repository; + + +import org.springframework.data.jpa.repository.JpaRepository; + +import org.springframework.stereotype.Repository; + +import com.realnet.FabricIcard.Entity.FabricIcard; + +@Repository +public interface FabricIcardRepository extends JpaRepository { +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcard/Repository/PageSourceRepository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcard/Repository/PageSourceRepository.java new file mode 100644 index 0000000..d883def --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcard/Repository/PageSourceRepository.java @@ -0,0 +1,10 @@ +package com.realnet.FabricIcard.Repository; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +import com.realnet.FabricIcard.Entity.PageSource; + +@Repository +public interface PageSourceRepository extends JpaRepository { +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcard/Services/FabricIcardService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcard/Services/FabricIcardService.java new file mode 100644 index 0000000..2dab174 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcard/Services/FabricIcardService.java @@ -0,0 +1,41 @@ +package com.realnet.FabricIcard.Services; + +import com.realnet.FabricIcard.Entity.FabricIcard; +import com.realnet.FabricIcard.Repository.FabricIcardRepository; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class FabricIcardService { + @Autowired + private FabricIcardRepository Repository; + + public FabricIcard Savedata(FabricIcard data) { + return Repository.save(data); + } + + public List getdetails() { + return (List) Repository.findAll(); + } + + public FabricIcard getdetailsbyId(Long id) { + return Repository.findById(id).get(); + } + + public void delete_by_id(Long id) { + Repository.deleteById(id); + } + + public FabricIcard update(FabricIcard data, Long id) { + FabricIcard old = Repository.findById(id).get(); + old.setName(data.getName()); + old.setDescription(data.getDescription()); + old.setActive(data.isActive()); + old.setUrl(data.getUrl()); + final FabricIcard test = Repository.save(old); + return test; + } +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcard/Services/LayoutPdfService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcard/Services/LayoutPdfService.java new file mode 100644 index 0000000..7cb7d6a --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcard/Services/LayoutPdfService.java @@ -0,0 +1,282 @@ +package com.realnet.FabricIcard.Services; + +import java.io.ByteArrayOutputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletResponse; + +import org.springframework.stereotype.Service; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.xhtmlrenderer.pdf.ITextRenderer; + +@Service +public class LayoutPdfService { + + + public String generateForm(@RequestBody Map jsonData) { + // Convert JSON to HTML + String htmlForm = convertJsonToHtml(jsonData); + return htmlForm; + } + +// public void convertToPdf(@RequestBody String htmlContent) throws IOException { +// // Render HTML content using Flying Saucer +// try (ByteArrayOutputStream outputStream = new ByteArrayOutputStream()) { +// ITextRenderer renderer = new ITextRenderer(); +// renderer.setDocumentFromString(htmlContent); +// renderer.layout(); +// renderer.createPDF(outputStream); +// +// +// // Specify the directory and file name where you want to save the PDF +// String pdfFilePath = "/data/example.pdf"; +// +// String path="/data"; +// +// Path directory = Paths.get(path); +// if (!Files.exists(directory)) { +// try { +// Files.createDirectories(directory); +// } catch (IOException e) { +// e.printStackTrace(); +// // Handle directory creation failure appropriately +// } +// } +// +// +// // Save the PDF to the specified file +// try (FileOutputStream fileOutputStream = new FileOutputStream(pdfFilePath)) { +// outputStream.writeTo(fileOutputStream); +// } +// +// +// // Set the response headers +//// response.setContentType("application/pdf"); +//// response.setContentLength(outputStream.size()); +//// response.setHeader("Content-Disposition", "inline; filename=example.pdf"); +//// +//// // Write the PDF to the response output stream +//// response.getOutputStream().write(outputStream.toByteArray()); +//// response.getOutputStream().flush(); +// } catch (Exception e) { +// e.printStackTrace(); +// // Handle exceptions appropriately +// } +// } + + + + public void convertToPdf(@RequestBody String htmlContent) throws IOException { + + htmlContent="\r\n" + + "\r\n" + + "\r\n" + + " \r\n" + + " \r\n" + + " FormName\r\n" + + " \r\n" + + "\r\n" + + "\r\n" + + "\r\n" + + "
\r\n" + + "
\r\n" + + " Title\r\n" + + "
\r\n" + + "
\r\n" + + " \r\n" + + " \r\n" + + " \r\n" + + "
\r\n" + + "
\r\n" + + " \r\n" + + " \r\n" + + " \r\n" + + "
\r\n" + + "
\r\n" + + "\r\n" + + "\r\n" + + "\r\n"; + // Render HTML content using Flying Saucer + try (ByteArrayOutputStream outputStream = new ByteArrayOutputStream()) { + ITextRenderer renderer = new ITextRenderer(); + renderer.setDocumentFromString(htmlContent); + renderer.layout(); + renderer.createPDF(outputStream); + + // Reset the position of the output stream before writing to the file +// outputStream.reset(); + + // Specify the directory and file name where you want to save the PDF + String pdfFilePath = "/data/example.pdf"; + + String path = "/data"; + + Path directory = Paths.get(path); + if (!Files.exists(directory)) { + try { + Files.createDirectories(directory); + } catch (IOException e) { + e.printStackTrace(); + // Handle directory creation failure appropriately + } + } + + // Save the PDF to the specified file + try (FileOutputStream fileOutputStream = new FileOutputStream(pdfFilePath)) { + outputStream.writeTo(fileOutputStream); + } + + } catch (Exception e) { + e.printStackTrace(); + // Handle exceptions appropriately + } + } + + + private String convertJsonToHtml(Map formData) { + StringBuilder htmlBuilder = new StringBuilder("\n\n\n"); + htmlBuilder.append(" \n"); + htmlBuilder.append(" \n"); + htmlBuilder.append(String.format(" %s\n", formData.get("name"))); + htmlBuilder.append(" \n\n\n\n
\n"); + + // Iterate through the dashboard array + List> dashboard = (List>) formData.get("dashboard"); + for (Map element : dashboard) { + htmlBuilder.append(generateFormField(element)); + } + + htmlBuilder.append("
\n\n\n"); + return htmlBuilder.toString(); + } + + private String generateFormField(Map fieldData) { + StringBuilder fieldHtml = new StringBuilder(); + String type = (String) fieldData.get("type"); + + if (type != null) { + fieldHtml.append( + String.format("
\n", getGridStyle(fieldData))); + fieldHtml.append(String.format(" \n", fieldData.get("fieldName"), + fieldData.get("fieldtext"))); + + switch (type) { + case "text": + fieldHtml.append(String.format(" \n", + fieldData.get("fieldName"), fieldData.get("fieldName"), getAdditionalAttributes(fieldData))); + break; + case "textarea": + fieldHtml.append( + String.format(" \n", fieldData.get("fieldName"))); + break; + case "select": + fieldHtml.append(String.format(" \n"); + break; + // Add more cases for other form field types as needed + default: + // Handle unknown field types or add more specific cases + } + + fieldHtml.append("
\n"); + } + + return fieldHtml.toString(); + } + + private String getGridStyle(Map fieldData) { + int cols = (int) fieldData.get("cols"); + int rows = (int) fieldData.get("rows"); + int x = (int) fieldData.get("x"); + int y = (int) fieldData.get("y"); + + return String.format("grid-column: span %d; grid-row: span %d; grid-column-start: %d; grid-row-start: %d;", + cols, rows, x, y); + } + + private String getAdditionalAttributes(Map fieldData) { + StringBuilder attributes = new StringBuilder(); + + for (Map.Entry entry : fieldData.entrySet()) { + String key = entry.getKey(); + Object value = entry.getValue(); + + if (!Arrays.asList("type", "fieldName", "fieldtext", "cols", "rows", "x", "y").contains(key) + && value != null) { + attributes.append(String.format(" %s=\"%s\"", key, value)); + } + } + + return attributes.toString(); + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcardLines/Controllers/FabricIcardLinesController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcardLines/Controllers/FabricIcardLinesController.java new file mode 100644 index 0000000..4cd2a5b --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcardLines/Controllers/FabricIcardLinesController.java @@ -0,0 +1,78 @@ +package com.realnet.FabricIcardLines.Controllers; + +import java.io.IOException; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import com.realnet.FabricIcardLines.Entity.Dummyfabric; +import com.realnet.FabricIcardLines.Entity.FabricIcardLines; +import com.realnet.FabricIcardLines.Services.FabricIcardLinesService; + +@RequestMapping(value = "/FabricIcardLines") +@RestController +public class FabricIcardLinesController { + + @Autowired + private FabricIcardLinesService Service; + + @PostMapping("/FabricIcardLines") + public FabricIcardLines Savedata(@RequestBody FabricIcardLines data) { + FabricIcardLines save = Service.Savedata(data); + return save; + } + + @GetMapping("/FabricIcardLines") + public List getdetails() { + List get = Service.getdetails(); + return get; + } + + @GetMapping("/FabricIcardLines/{id}") + public FabricIcardLines getdetailsbyId(@PathVariable Long id) { + FabricIcardLines get = Service.getdetailsbyId(id); + return get; + + } + + @DeleteMapping("/FabricIcardLines/{id}") + public void delete_by_id(@PathVariable Long id) { + Service.delete_by_id(id); + + } + + @PutMapping("/FabricIcardLines/{id}") + public FabricIcardLines update(@RequestBody FabricIcardLines data, @PathVariable Long id) { + FabricIcardLines update = Service.update(data, id); + return update; + } + +// make xml file + @PutMapping("/FabricIcardLines/xml") + public FabricIcardLines makexmlfile(@RequestParam String id, @RequestBody Dummyfabric dummy) throws IOException { + + String xml = dummy.getXml(); + String json = dummy.getJson(); + + FabricIcardLines update = Service.makexmlfile(id, xml, json); + return update; + } + +// get by headerid + @GetMapping("/FabricIcardLines/headerId/{id}") + public FabricIcardLines getdetailsbyheaderId(@PathVariable String id) { + FabricIcardLines get = Service.getbyheaderid(id); + return get; + + } + +// file read + @GetMapping("/FabricIcardLines/json/{id}") + public String readfile(@PathVariable String id) throws IOException { + String get = Service.readjson(id); + + return get; + + } + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcardLines/Controllers/JsonKeysController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcardLines/Controllers/JsonKeysController.java new file mode 100644 index 0000000..72fccbf --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcardLines/Controllers/JsonKeysController.java @@ -0,0 +1,117 @@ +package com.realnet.FabricIcardLines.Controllers; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.realnet.FabricIcardLines.Entity.FabricIcardLines; +import com.realnet.FabricIcardLines.Services.FabricIcardLinesService; + +@CrossOrigin("*") +@RequestMapping(value = "/FabricIcardLines") +@RestController +public class JsonKeysController { + + @Autowired + private FabricIcardLinesService fabricIcardLinesService; + + @PostMapping("/getJsonKeys") + public ResponseEntity> getJsonKeys(@RequestBody String json) { + try { + // Parse JSON string into JsonNode + ObjectMapper objectMapper = new ObjectMapper(); + JsonNode jsonNode = objectMapper.readTree(json); + + // Get all keys from JsonNode + List keys = getAllKeys(jsonNode); + + return ResponseEntity.ok(keys); + } catch (Exception e) { + e.printStackTrace(); + return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null); + } + } + + private List getAllKeys(JsonNode jsonNode) { + List keys = new ArrayList<>(); + Iterator fieldNames = jsonNode.fieldNames(); + while (fieldNames.hasNext()) { + keys.add(fieldNames.next()); + } + return keys; + } + +// get key value from FabricIcardLinesService + @PostMapping("/FabricIcardLines/getKeyValuePairs/{id}") + public ResponseEntity>> getKeyValuePairs(@PathVariable String id) { + + FabricIcardLines lines = fabricIcardLinesService.getbyheaderid(id); + if (lines == null) { + String message = "No lines found for ID: " + id; + return ResponseEntity.status(HttpStatus.NOT_FOUND) + .body(Collections.singletonList(Collections.singletonMap("message", message))); + } + + String jsonData = lines.getLayoutModel(); + + try { + // Parse JSON string into JsonNode + ObjectMapper objectMapper = new ObjectMapper(); + JsonNode rootNode = objectMapper.readTree(jsonData); + + // Extract key-value pairs based on type + List> keyValuePairs = extractKeyValuePairs(rootNode); + + return ResponseEntity.ok(keyValuePairs); + } catch (Exception e) { + e.printStackTrace(); + return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null); + } + } + + private List> extractKeyValuePairs(JsonNode rootNode) { + List> keyValuePairs = new ArrayList<>(); + JsonNode objectsNode = rootNode.get("objects"); + if (objectsNode == null || !objectsNode.isArray()) { + return keyValuePairs; // Return empty list if objects array is missing or not an array + } + + for (JsonNode node : objectsNode) { + Map pair = new HashMap<>(); + String type = node.path("type").asText(); + if (type.equals("i-text")) { + JsonNode textNode = node.path("text"); + if (!textNode.isMissingNode()) { + pair.put(type, textNode.asText()); + } + } else if (type.equals("image")) { + JsonNode srcNode = node.path("src"); + if (!srcNode.isMissingNode()) { + pair.put(type, node.get("src").asText()); + + } + } + if (!pair.isEmpty()) { + + keyValuePairs.add(pair); + } + } + return keyValuePairs; + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcardLines/Entity/Dummyfabric.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcardLines/Entity/Dummyfabric.java new file mode 100644 index 0000000..c637c9f --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcardLines/Entity/Dummyfabric.java @@ -0,0 +1,19 @@ +package com.realnet.FabricIcardLines.Entity; + +import javax.persistence.Lob; + +import lombok.Data; + +@Data +public class Dummyfabric { + + + @Lob + private String json; + + @Lob + private String xml; + + + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcardLines/Entity/FabricIcardLines.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcardLines/Entity/FabricIcardLines.java new file mode 100644 index 0000000..02f220b --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcardLines/Entity/FabricIcardLines.java @@ -0,0 +1,41 @@ +package com.realnet.FabricIcardLines.Entity; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Lob; +import javax.persistence.ManyToOne; + +import com.fasterxml.jackson.annotation.JsonBackReference; +import com.realnet.FabricIcard.Entity.FabricIcard; + +import lombok.Data; + +@Entity +@Data +public class FabricIcardLines { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String header_id; + private String file_path; + private String xml_file_name; + private String json_file_name; + + @Lob + private String mapping_model; + + @Lob + private String Model; + + @Lob + private String layoutModel; + + @JsonBackReference + @ManyToOne + private FabricIcard layoutBuilder_t; + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcardLines/Repository/FabricIcardLinesRepository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcardLines/Repository/FabricIcardLinesRepository.java new file mode 100644 index 0000000..8e7c4b4 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcardLines/Repository/FabricIcardLinesRepository.java @@ -0,0 +1,15 @@ +package com.realnet.FabricIcardLines.Repository; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.stereotype.Repository; + +import com.realnet.FabricIcardLines.Entity.FabricIcardLines; + +@Repository +public interface FabricIcardLinesRepository extends JpaRepository { + + @Query(value = "select * from fabric_icard_lines where header_id=?1", nativeQuery = true) + FabricIcardLines getbyheaderId(String header_id); + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcardLines/Services/FabricIcardLinesService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcardLines/Services/FabricIcardLinesService.java new file mode 100644 index 0000000..2da3cee --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FabricIcardLines/Services/FabricIcardLinesService.java @@ -0,0 +1,109 @@ +package com.realnet.FabricIcardLines.Services; + +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.nio.file.Paths; +import java.util.List; + +import org.apache.commons.io.FileUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; + +import com.realnet.FabricIcard.Entity.FabricIcard; +import com.realnet.FabricIcard.Repository.FabricIcardRepository; +import com.realnet.FabricIcardLines.Entity.FabricIcardLines; +import com.realnet.FabricIcardLines.Repository.FabricIcardLinesRepository; + +@Service +public class FabricIcardLinesService { + + @Value("${projectPath}") + private String projectpath; + + @Autowired + private FabricIcardRepository fabricIcardRepository; + + @Autowired + private FabricIcardLinesRepository Repository; + + public FabricIcardLines Savedata(FabricIcardLines data) { + return Repository.save(data); + } + + public List getdetails() { + return (List) Repository.findAll(); + } + + public FabricIcardLines getdetailsbyId(Long id) { + return Repository.findById(id).get(); + } + + public void delete_by_id(Long id) { + Repository.deleteById(id); + } + + public FabricIcardLines update(FabricIcardLines data, Long id) { + FabricIcardLines old = Repository.findById(id).get(); + old.setHeader_id(data.getHeader_id()); + old.setModel(data.getModel()); + old.setLayoutModel(data.getLayoutModel()); + old.setFile_path(data.getFile_path()); + old.setXml_file_name(data.getXml_file_name()); + old.setJson_file_name(data.getJson_file_name()); + old.setMapping_model(data.getMapping_model()); + + final FabricIcardLines test = Repository.save(old); + return test; + } + +// make xml file + public FabricIcardLines makexmlfile(String headerid, String xml, String json) throws IOException { + + FabricIcard fabricIcard = fabricIcardRepository.findById(Long.valueOf(headerid)).get(); + + String name = fabricIcard.getName(); + String xmlfileName = name + ".xml"; + String jsonfileName = name + ".txt"; + + String filePath = Paths.get(xmlfileName).toString(); + FileWriter fr = new FileWriter(filePath); + fr.write(xml); + fr.close(); + + String jsonfilePath = Paths.get(jsonfileName).toString(); + FileWriter jsonfr = new FileWriter(jsonfilePath); + jsonfr.write(json); + jsonfr.close(); + + FabricIcardLines old = Repository.getbyheaderId(headerid); + + old.setFile_path(projectpath); + old.setXml_file_name(xmlfileName); + old.setJson_file_name(jsonfileName); + old.setHeader_id(headerid); + + final FabricIcardLines test = Repository.save(old); + return test; + } + +// get by header id + public FabricIcardLines getbyheaderid(String id) { + return Repository.getbyheaderId(id); + } + +// read file + public String readjson(String id) throws IOException { + + FabricIcardLines fLines = Repository.getbyheaderId(id); + String file_path = fLines.getFile_path(); + String json_file_name = fLines.getJson_file_name(); + String pathString = file_path + File.separator + json_file_name; + + String readFileToString = FileUtils.readFileToString(new File(pathString), StandardCharsets.UTF_8); + + return readFileToString; + } +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FileUpload/Controllers/UploadeddocsController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FileUpload/Controllers/UploadeddocsController.java new file mode 100644 index 0000000..fa74e91 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FileUpload/Controllers/UploadeddocsController.java @@ -0,0 +1,194 @@ +package com.realnet.FileUpload.Controllers; + +import java.io.File; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Arrays; +import java.util.Date; +import java.util.List; +import java.util.stream.Collectors; + +import org.apache.commons.io.FileUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.dao.DataAccessException; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.FileUpload.Entity.Uploadeddocs; +import com.realnet.FileUpload.Services.FileuploadService; +import com.realnet.FileUpload.Services.UploadedFileService; + +@RequestMapping(value = "/FileUpload") +//@CrossOrigin("*") +@RestController +public class UploadeddocsController { + @Autowired + private UploadedFileService Service; + + @Value("${projectPath}") + private String projectPath; + + @Autowired + private FileuploadService fileuploadService; + + @PostMapping("/Uploadeddocs/{ref}/{table_name}") + + public ResponseEntity Savedata(@PathVariable String ref, @PathVariable String table_name, + @RequestParam MultipartFile file) throws JsonMappingException, JsonProcessingException { + + Uploadeddocs tdata = new Uploadeddocs(); + Date d = new Date(); + String addString = "_" + d.getTime(); + + if (file.isEmpty()) { + return new ResponseEntity<>("file is empty", HttpStatus.BAD_REQUEST); + + } + String UPLOAD_DIREC = File.separator + "Resources" + File.separator + "Files"; + String originalFilename = file.getOriginalFilename(); + String filetype = originalFilename.substring(originalFilename.lastIndexOf(".")); + String filename = originalFilename.substring(0, originalFilename.lastIndexOf(".")) + addString; + String replacedfilename = filename + filetype; + System.out.println("file name is ..." + replacedfilename); + + Uploadeddocs save = null; + System.out.println(file.getOriginalFilename()); + + boolean f = fileuploadService.uploadFile(file, addString); + + if (f) { + System.out.println("file uploaded successfully"); + + tdata.setUploadedfile_path(projectPath + UPLOAD_DIREC); + + tdata.setUploadedfile_name(replacedfilename); + tdata.setRef(ref); + tdata.setRef_table_name(table_name); + + save = Service.Savedata(tdata); + return new ResponseEntity<>(save, HttpStatus.OK); + + } + + else { + return new ResponseEntity<>("file upload failed", HttpStatus.BAD_REQUEST); + + } + + } + + @PutMapping("/Uploadeddocs/{id}") + public Uploadeddocs update(@RequestBody Uploadeddocs data, @PathVariable Integer id) { + Uploadeddocs update = Service.update(data, id); + return update; + } + + @GetMapping("/Uploadeddocs") + public List getdetails() { + List get = Service.getdetails(); + return get; + } + + @GetMapping("/Uploadeddocs/{id}") + public Uploadeddocs getdetailsbyId(@PathVariable Integer id) { + Uploadeddocs get = Service.getdetailsbyId(id); + return get; + } + + @DeleteMapping("/Uploadeddocs/{id}") + public void delete_by_id(@PathVariable Integer id) { + Service.delete_by_id(id); + + } + +// get by ref and ref table name + @GetMapping("/Uploadeddocs/{ref}/{ref_tablename}") + public List getbyrefandtablename(@PathVariable String ref, @PathVariable String ref_tablename) { + List get = Service.getbyrefandtablename(ref, ref_tablename); + return get; + } + + @Autowired + private JdbcTemplate jdbcTemplate; + + @PostMapping("/execute") + public ResponseEntity executeDump(@RequestParam Boolean execute, @RequestParam String filePath) { + // Check if execution is allowed + if (!execute) { + return ResponseEntity.ok("Service not executed due to 'execute' flag being false."); + } + + Path path = Paths.get(System.getProperty("user.dir")).resolve(filePath); + + try { + // Check if file exists + if (!Files.exists(path)) { + return ResponseEntity.badRequest().body("File not found: " + filePath); + } + + // File content ko read karo aur SQL commands extract karo + String sql = FileUtils.readFileToString(new File(filePath), StandardCharsets.UTF_8); + + // SQL commands ko execute karo + + // Split statements by semicolon + List sqlStatements = Arrays.stream(sql.split(";")).map(String::trim) + .filter(statement -> !statement.isEmpty()) // Empty statements ko remove karo + .filter(statement -> !statement.startsWith("USE")) // "USE db;" ko ignore karo + .filter(statement -> !statement.startsWith("--")) // Comments ko ignore karo + .filter(statement -> !statement.startsWith("/*")) // Special MySQL commands ko ignore karo + .collect(Collectors.toList()); + + // Execute each statement + for (String statement : sqlStatements) { + try { + jdbcTemplate.execute(statement); + + System.out.println(statement + " executed.."); + + } catch (DataAccessException e) { + // Specific SQL execution error ko catch karo aur log karo + return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR) + .body("Error executing statement: " + statement + " | Error: " + e.getMessage()); + } + } + System.out.println("Dump executed executed.."); + + // File ko delete karo + Files.delete(path); + + System.out.println("File delete successfully..."); + + return ResponseEntity.ok("Dump executed and file deleted successfully!"); + + } catch (IOException e) { + + System.out.println("io error.." + e); + return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR) + .body("File reading/deletion error: " + e.getMessage()); + } catch (DataAccessException e) { + System.out.println("DataAccessException error.." + e); + + return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR) + .body("SQL execution error: " + e.getMessage()); + } + } + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FileUpload/Entity/Uploadeddocs.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FileUpload/Entity/Uploadeddocs.java new file mode 100644 index 0000000..6b8305c --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FileUpload/Entity/Uploadeddocs.java @@ -0,0 +1,22 @@ +package com.realnet.FileUpload.Entity; + +import lombok.*; +import javax.persistence.*; +import java.time.LocalDateTime; +import java.util.*; + +@Entity +@Data +public class Uploadeddocs extends who_column { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + + private String ref; + private String ref_table_name; + + private String uploadedfile_name; + private String uploadedfile_path; + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FileUpload/Entity/who_column.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FileUpload/Entity/who_column.java new file mode 100644 index 0000000..0de7978 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FileUpload/Entity/who_column.java @@ -0,0 +1,43 @@ +package com.realnet.FileUpload.Entity; + +import lombok.*; +import java.io.Serializable; +import java.util.Date; + +import javax.persistence.Column; +import javax.persistence.EntityListeners; +import javax.persistence.MappedSuperclass; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; + +import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.annotation.LastModifiedDate; +import org.springframework.data.jpa.domain.support.AuditingEntityListener; + +import lombok.Data; + +@Data +@MappedSuperclass +@EntityListeners(AuditingEntityListener.class) +public class who_column implements Serializable { + + private static final long serialVersionUID = 1L; + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "CREATED_AT", nullable = false, updatable = false) + @CreatedDate + private Date createdAt; + + // @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime createdAt; + + @Column(name = "CREATED_BY", updatable = false) + private Long createdBy; + + @Column(name = "UPDATED_BY") + private Long updatedBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "UPDATED_AT", nullable = false) + @LastModifiedDate + private Date updatedAt; + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FileUpload/Repository/UploadFileRepository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FileUpload/Repository/UploadFileRepository.java new file mode 100644 index 0000000..88eec31 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FileUpload/Repository/UploadFileRepository.java @@ -0,0 +1,17 @@ +package com.realnet.FileUpload.Repository; + +import java.util.List; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.stereotype.Repository; + +import com.realnet.FileUpload.Entity.Uploadeddocs; + +@Repository +public interface UploadFileRepository extends JpaRepository { + + @Query(value = "select * from uploadeddocs where ref=?1 && ref_table_name=?2", nativeQuery = true) + List findbyrefAnsTableName(String ref, String ref_table_name); + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FileUpload/Services/FileuploadService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FileUpload/Services/FileuploadService.java new file mode 100644 index 0000000..8a134f9 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FileUpload/Services/FileuploadService.java @@ -0,0 +1,107 @@ +package com.realnet.FileUpload.Services; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.InputStream; +import java.util.ArrayList; + +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; +import org.springframework.web.multipart.MultipartFile; + +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@Component +public class FileuploadService { + @Value("${projectPath}") + private String projectPath; + + public boolean uploadFile(MultipartFile multipartFile, String addString) { + boolean f = false; + String UPLOAD_DIREC = File.separator + "Resources" + File.separator + "Files"; + String originalFilename = multipartFile.getOriginalFilename(); + + String filetype = originalFilename.substring(originalFilename.lastIndexOf(".")); + String filename = originalFilename.substring(0, originalFilename.lastIndexOf(".")) + addString; + String replacedfilename = filename + filetype; + + System.out.println("file name with replace is ..." + replacedfilename); + String Path1 = projectPath + UPLOAD_DIREC; + + String filepath = Path1 + File.separator + replacedfilename; + + try { + + if (!UPLOAD_DIREC.isEmpty()) { + + File projectdir = new File(Path1); + if (!projectdir.exists()) { + boolean mkdir = projectdir.mkdirs(); + System.out.println(Path1 + " folder create = " + mkdir); + } + +// File file = new File(Path1); +// if (!file.exists()) { +// file.createNewFile(); +// } + +// System.out.println("\\" + ":" + "\\\\"); + +// UPLOAD_DIREC = UPLOAD_DIREC.replaceAll("\\\\", File.separator); +// UPLOAD_DIREC = UPLOAD_DIREC.replaceAll("//", File.separator); +// if (!UPLOAD_DIREC.startsWith(File.separator)) { +// UPLOAD_DIREC = File.separator + UPLOAD_DIREC; +// } +// ArrayList list = new ArrayList<>(); +// +// String liString = UPLOAD_DIREC; +// String Path1 = projectPath; +// +// int i = 0; +// do { +// +// int lastIndexOf = liString.lastIndexOf(File.separator); +// +// String substring = liString.substring(lastIndexOf + 1); +// list.add(substring); +// +// System.out.println(substring); +// +// liString = liString.substring(0, lastIndexOf); +// +// System.out.println("step " + i + " = " + liString); +// i++; +// +// } while (liString.contains(File.separator)); +// +// for (int j = list.size() - 1; j >= 0; j--) { +// Path1 = Path1 + File.separator + list.get(j); +// File projectdir = new File(Path1); +// if (!projectdir.exists()) { +// boolean mkdir = projectdir.mkdirs(); +// System.out.println(Path1 + " folder create = " + mkdir); +// } +// } + } + // reading data + InputStream is = multipartFile.getInputStream(); + byte data[] = new byte[is.available()]; + is.read(data); + + // writing data + + FileOutputStream fos = new FileOutputStream(filepath); + fos.write(data); + fos.close(); + fos.flush(); + f = true; + + } catch (Exception e) { + + log.error(e.getLocalizedMessage()); + } + return f; + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FileUpload/Services/UploadedFileService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FileUpload/Services/UploadedFileService.java new file mode 100644 index 0000000..67f4769 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FileUpload/Services/UploadedFileService.java @@ -0,0 +1,43 @@ +package com.realnet.FileUpload.Services; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.realnet.FileUpload.Entity.Uploadeddocs; +import com.realnet.FileUpload.Repository.UploadFileRepository; + +@Service +public class UploadedFileService { + @Autowired + private UploadFileRepository Repository; + + public Uploadeddocs Savedata(Uploadeddocs data) { + return Repository.save(data); + } + + public List getdetails() { + return (List) Repository.findAll(); + } + + public Uploadeddocs getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + public void delete_by_id(Integer id) { + Repository.deleteById(id); + } + + public Uploadeddocs update(Uploadeddocs data, Integer id) { + Uploadeddocs old = Repository.findById(id).get(); + old.setUploadedfile_name(data.getUploadedfile_name()); + final Uploadeddocs test = Repository.save(old); + return test; + } + +// get by ref and table name + public List getbyrefandtablename(String ref, String ref_table_name) { + return (List) Repository.findbyrefAnsTableName(ref, ref_table_name); + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FileUpload/controller/Filecontroller.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FileUpload/controller/Filecontroller.java new file mode 100644 index 0000000..acb0968 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FileUpload/controller/Filecontroller.java @@ -0,0 +1,54 @@ +//package com.realnet.FileUpload.controller; +// +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.http.HttpStatus; +//import org.springframework.http.ResponseEntity; +//import org.springframework.web.bind.annotation.PostMapping; +//import org.springframework.web.bind.annotation.RequestMapping; +//import org.springframework.web.bind.annotation.RequestParam; +//import org.springframework.web.bind.annotation.RestController; +//import org.springframework.web.multipart.MultipartFile; +// +//import com.realnet.fileupload.helper.Fileupload_helper; +// +//@RestController +//@RequestMapping("/sureserve/api") +//public class Filecontroller { +// +// @Autowired +// private Fileupload_helper fileuploadhelper; +// +// @PostMapping("/test") +// public ResponseEntity upload(@RequestParam("file") MultipartFile file) { +// +// /* +// * System.out.println(file.getOriginalFilename()); +// * System.out.println(file.getSize()); +// * System.out.println(file.getContentType()); +// */ +// +// try { +// +// if (file.isEmpty()) { +// return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("must contain file"); +// } +// /* +// * if(!file.getContentType().equals("image/png")) { +// * +// * return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR). +// * body("must contain png format"); } +// */ +// +// boolean f = fileuploadhelper.uploadFile(file); +// if (f) { +// return ResponseEntity.ok("File uploaded successfully"); +// } +// } catch (Exception e) { +// e.printStackTrace(); +// } +// +// return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("something went wrong"); +// +// } +// +//} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FileUpload/helper/Fileupload_helper.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FileUpload/helper/Fileupload_helper.java new file mode 100644 index 0000000..f6a5ff1 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FileUpload/helper/Fileupload_helper.java @@ -0,0 +1,81 @@ +package com.realnet.FileUpload.helper; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.InputStream; + +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; +import org.springframework.web.multipart.MultipartFile; + +@Component +public class Fileupload_helper { + + @Value("${projectPath}") + private String projectPath; + + public final String UPLOAD_DIREC = "/Files"; + + public boolean uploadFile(MultipartFile multipartFile) { + boolean f = false; + + try { + + File path = new File(projectPath + UPLOAD_DIREC); + File FileParentDir = new File(path.toString()); + if (!FileParentDir.exists()) { + FileParentDir.mkdirs(); + } + // reading data + InputStream is = multipartFile.getInputStream(); + byte data[] = new byte[is.available()]; + is.read(data); + + // writing data + + FileOutputStream fos = new FileOutputStream( + projectPath + UPLOAD_DIREC + File.separator + multipartFile.getOriginalFilename()); + fos.write(data); + fos.close(); + fos.flush(); + f = true; + + } catch (Exception e) { + + e.printStackTrace(); + } + return f; + } + + public boolean uploadFilewithtimestamp(MultipartFile multipartFile, String timestamp) { + boolean f = false; + + try { + + File path = new File(projectPath + UPLOAD_DIREC); + File FileParentDir = new File(path.toString()); + if (!FileParentDir.exists()) { + FileParentDir.mkdirs(); + } + // reading data + InputStream is = multipartFile.getInputStream(); + byte data[] = new byte[is.available()]; + is.read(data); + + // writing data + + FileOutputStream fos = new FileOutputStream( + projectPath + UPLOAD_DIREC + File.separator + timestamp + multipartFile.getOriginalFilename()); + fos.write(data); + fos.close(); + fos.flush(); + f = true; + + } catch (Exception e) { + + e.printStackTrace(); + } + return f; + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FromExtensionJson/Controllers/FromExtensionJson_Controller.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FromExtensionJson/Controllers/FromExtensionJson_Controller.java new file mode 100644 index 0000000..72f09d8 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FromExtensionJson/Controllers/FromExtensionJson_Controller.java @@ -0,0 +1,95 @@ +package com.realnet.FromExtensionJson.Controllers; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.FromExtensionJson.Entity.FromExtensionJson_t; +import com.realnet.FromExtensionJson.Repository.FromExtensionJson_Repository; +import com.realnet.FromExtensionJson.Services.FromExtensionJson_Service; +@RequestMapping(value = "/FromExtensionJson") +@RestController +public class FromExtensionJson_Controller { + + @Autowired + private FromExtensionJson_Service Service; + + @Autowired + private FromExtensionJson_Repository extensionJson_Repository; + + @PostMapping("/ExtensionJson") + public FromExtensionJson_t Savedata(@RequestBody FromExtensionJson_t data) { + FromExtensionJson_t save = Service.Savedata(data); + return save; + } + + @GetMapping("/ExtensionJson") + public List getdetails() { + List get = Service.getdetails(); + return get; + } + + @GetMapping("/ExtensionJson/{id}") + public FromExtensionJson_t getdetailsbyId(@PathVariable Long id) { + FromExtensionJson_t get = Service.getdetailsbyId(id); + return get; + + } + + @DeleteMapping("/ExtensionJson/{id}") + public void delete_by_id(@PathVariable Long id) { + Service.delete_by_id(id); + + } + + @PutMapping("/ExtensionJson/{id}") + public FromExtensionJson_t update(@RequestBody FromExtensionJson_t data, @PathVariable Long id) { + FromExtensionJson_t update = Service.update(data, id); + return update; + } + + + + + @GetMapping("/ExtensionJson/{formCode}") + public ResponseEntity getdetailsbyFormcode(@PathVariable String formCode) { + FromExtensionJson_t get = extensionJson_Repository.getdetailsbyFormCode(formCode); + // return get; + + if (get != null) { + String jsonObject = get.getJsonObject(); + return ResponseEntity.ok().body(jsonObject); + } else { + return ResponseEntity.notFound().build(); + } + + } + + + @GetMapping("/ListExtensionJson/{formCode}") + public ResponseEntity> getJsonObjectsByFormCodeList(@PathVariable String formCode) { + List jsonObjects = extensionJson_Repository.getJsonObjectsByFormCode(formCode); + if (!jsonObjects.isEmpty()) { + return ResponseEntity.ok().body(jsonObjects); + } else { + return ResponseEntity.notFound().build(); + } + } + + + + + + + + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FromExtensionJson/Entity/FromExtensionJson_t.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FromExtensionJson/Entity/FromExtensionJson_t.java new file mode 100644 index 0000000..ecd0cc8 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FromExtensionJson/Entity/FromExtensionJson_t.java @@ -0,0 +1,20 @@ +package com.realnet.FromExtensionJson.Entity; + import lombok.*; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + @Entity + @Data + public class FromExtensionJson_t{ + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String form_code; + private String account_id; + @Lob + private String jsonObject; + + } \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FromExtensionJson/Repository/FromExtensionJson_Repository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FromExtensionJson/Repository/FromExtensionJson_Repository.java new file mode 100644 index 0000000..4c1596f --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FromExtensionJson/Repository/FromExtensionJson_Repository.java @@ -0,0 +1,23 @@ +package com.realnet.FromExtensionJson.Repository; + + +import java.util.List; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.stereotype.Repository; + + +import com.realnet.FromExtensionJson.Entity.FromExtensionJson_t; + +@Repository +public interface FromExtensionJson_Repository extends JpaRepository { + + + @Query(value="SELECT * FROM from_extension_json_t WHERE form_code = ?1", nativeQuery = true) + FromExtensionJson_t getdetailsbyFormCode(String formCode); + + @Query(value = "SELECT json_object FROM from_extension_json_t WHERE form_code = ?1", nativeQuery = true) + List getJsonObjectsByFormCode(String formCode); + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FromExtensionJson/Services/FromExtensionJson_Service.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FromExtensionJson/Services/FromExtensionJson_Service.java new file mode 100644 index 0000000..ac3946b --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/FromExtensionJson/Services/FromExtensionJson_Service.java @@ -0,0 +1,39 @@ +package com.realnet.FromExtensionJson.Services; + +import com.realnet.FromExtensionJson.Repository.FromExtensionJson_Repository; +import com.realnet.FromExtensionJson.Entity.FromExtensionJson_t; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class FromExtensionJson_Service { + @Autowired + private FromExtensionJson_Repository Repository; + + public FromExtensionJson_t Savedata(FromExtensionJson_t data) { + return Repository.save(data); + } + + public List getdetails() { + return (List) Repository.findAll(); + } + + public FromExtensionJson_t getdetailsbyId(Long id) { + return Repository.findById(id).get(); + } + + public void delete_by_id(Long id) { + Repository.deleteById(id); + } + + public FromExtensionJson_t update(FromExtensionJson_t data, Long id) { + FromExtensionJson_t old = Repository.findById(id).get(); + old.setForm_code(data.getForm_code()); + old.setAccount_id(data.getAccount_id()); + old.setJsonObject(data.getJsonObject()); + final FromExtensionJson_t test = Repository.save(old); + return test; + } +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Gaurav_testing/Controllers/Gaurav_testing_Controller.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Gaurav_testing/Controllers/Gaurav_testing_Controller.java new file mode 100644 index 0000000..9d92b7e --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Gaurav_testing/Controllers/Gaurav_testing_Controller.java @@ -0,0 +1,68 @@ +package com.realnet.Gaurav_testing.Controllers; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.Gaurav_testing.Entity.Gaurav_testing_t; +import com.realnet.Gaurav_testing.Services.Gaurav_testing_Service; + +@RequestMapping(value = "/Gaurav_testing") +@RestController +public class Gaurav_testing_Controller { + + @Autowired + private Gaurav_testing_Service Service; + + @PostMapping("/Gaurav_testing") + public Gaurav_testing_t Savedata(@RequestBody Gaurav_testing_t data) { + Gaurav_testing_t save = Service.Savedata(data); + return save; + } + + @GetMapping("/Gaurav_testing_custom") + public Gaurav_testing_t getdetail() { + Gaurav_testing_t get = Service.getdetailcustom(); + return get; + + } + + @PostMapping("/Gaurav_testing_custom") + public Gaurav_testing_t Savecustom(@RequestBody Gaurav_testing_t data) { + Gaurav_testing_t save = Service.savecustom(data); + return save; + } + + @GetMapping("/Gaurav_testing") + public List getdetails() { + List get = Service.getdetails(); + return get; + } + + @GetMapping("/Gaurav_testing/{id}") + public Gaurav_testing_t getdetailsbyId(@PathVariable Integer id) { + Gaurav_testing_t get = Service.getdetailsbyId(id); + return get; + + } + + @DeleteMapping("/Gaurav_testing/{id}") + public void delete_by_id(@PathVariable Integer id) { + Service.delete_by_id(id); + + } + + @PutMapping("/Gaurav_testing/{id}") + public Gaurav_testing_t update(@RequestBody Gaurav_testing_t data, @PathVariable Integer id) { + Gaurav_testing_t update = Service.update(data, id); + return update; + } +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Gaurav_testing/Entity/Gaurav_testing_t.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Gaurav_testing/Entity/Gaurav_testing_t.java new file mode 100644 index 0000000..ebc915e --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Gaurav_testing/Entity/Gaurav_testing_t.java @@ -0,0 +1,24 @@ +package com.realnet.Gaurav_testing.Entity; + +import lombok.*; +import javax.persistence.*; +import java.time.LocalDateTime; +import java.util.*; + +@Entity +@Data +public class Gaurav_testing_t { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private int id; + + private String name; + private String email; + private String mobno; + private String address; + private String pincode; + private String description; + + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Gaurav_testing/Repository/Gaurav_testing_Repository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Gaurav_testing/Repository/Gaurav_testing_Repository.java new file mode 100644 index 0000000..d96f9a1 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Gaurav_testing/Repository/Gaurav_testing_Repository.java @@ -0,0 +1,13 @@ +package com.realnet.Gaurav_testing.Repository; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +import com.realnet.Gaurav_testing.Entity.Gaurav_testing_t; + +@Repository +public interface Gaurav_testing_Repository extends JpaRepository { + + Gaurav_testing_t findTopByOrderByIdAsc(); + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Gaurav_testing/Services/Gaurav_testing_Service.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Gaurav_testing/Services/Gaurav_testing_Service.java new file mode 100644 index 0000000..0c884ab --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Gaurav_testing/Services/Gaurav_testing_Service.java @@ -0,0 +1,59 @@ +package com.realnet.Gaurav_testing.Services; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.realnet.Gaurav_testing.Entity.Gaurav_testing_t; +import com.realnet.Gaurav_testing.Repository.Gaurav_testing_Repository; + +@Service +public class Gaurav_testing_Service { + @Autowired + private Gaurav_testing_Repository Repository; + + public Gaurav_testing_t Savedata(Gaurav_testing_t data) { + return Repository.save(data); + } + + public List getdetails() { + return (List) Repository.findAll(); + } + + public Gaurav_testing_t getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + public Gaurav_testing_t getdetailcustom() { + return Repository.findTopByOrderByIdAsc(); + } + + public void delete_by_id(Integer id) { + Repository.deleteById(id); + } + + public Gaurav_testing_t update(Gaurav_testing_t data, Integer id) { + Gaurav_testing_t old = Repository.findById(id).get(); + old.setName(data.getName()); + old.setEmail(data.getEmail()); + old.setMobno(data.getMobno()); + old.setAddress(data.getAddress()); + old.setPincode(data.getPincode()); + old.setDescription(data.getDescription()); + final Gaurav_testing_t test = Repository.save(old); + return test; + } + + public Gaurav_testing_t savecustom(Gaurav_testing_t data) { + + Gaurav_testing_t old = new Gaurav_testing_t(); + old.setName(data.getName()); + old.setEmail(data.getEmail()); + old.setMobno(data.getMobno()); + old.setAddress(data.getAddress()); + old.setPincode(data.getPincode()); + final Gaurav_testing_t test = Repository.save(old); + return test; + } +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Notification/Controller/NotController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Notification/Controller/NotController.java new file mode 100644 index 0000000..05406a2 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Notification/Controller/NotController.java @@ -0,0 +1,36 @@ +package com.realnet.Notification.Controller; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.Notification.Entity.NotEntity; +import com.realnet.Notification.Repository.NotRepo; + +@RestController +@RequestMapping("/notification") +public class NotController { + + @Autowired + private NotRepo notRepo; + +// @PostMapping("/save_notification") +// public NotEntity Savedata(@RequestBody NotEntity entity) { +// NotEntity dash = notRepo.save(entity) ; +// return dash; +// } + + + @GetMapping("/get_notification") + public List getdetails() { + List dash = notRepo.findTopByOrderByd(); + return dash; + } + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Notification/Entity/NotEntity.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Notification/Entity/NotEntity.java new file mode 100644 index 0000000..4b2b296 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Notification/Entity/NotEntity.java @@ -0,0 +1,21 @@ +package com.realnet.Notification.Entity; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; + +import lombok.Data; + +@Data +@Entity +public class NotEntity { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String notification; + private String time; + private Long user_id; + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Notification/Entity/NotificationService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Notification/Entity/NotificationService.java new file mode 100644 index 0000000..977cdf9 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Notification/Entity/NotificationService.java @@ -0,0 +1,40 @@ +package com.realnet.Notification.Entity; + +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Calendar; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Service; + +import com.realnet.Notification.Repository.NotRepo; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; + +@Service +public class NotificationService { + + @Autowired + private NotRepo notRepo; + + @Autowired + private AppUserServiceImpl userService; + + public ResponseEntity setnotification(String jobType, String wireframeName) { + + DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); + Calendar cal = Calendar.getInstance(); + AppUser loggedInUser = userService.getLoggedInUser(); + + NotEntity notEntity = new NotEntity(); + notEntity.setTime(dateFormat.format(cal.getTime())); + notEntity.setNotification(loggedInUser.getUsername() + jobType + wireframeName); + notEntity.setUser_id(loggedInUser.getUserId()); + notRepo.save(notEntity); + + return new ResponseEntity<>("notification set", HttpStatus.CREATED); + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Notification/Repository/NotRepo.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Notification/Repository/NotRepo.java new file mode 100644 index 0000000..1028c35 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Notification/Repository/NotRepo.java @@ -0,0 +1,18 @@ +package com.realnet.Notification.Repository; + +import java.util.List; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.stereotype.Repository; + +import com.realnet.Notification.Entity.NotEntity; + +@Repository +public interface NotRepo extends JpaRepository{ + + @Query(value = "select * from not_entity order by id desc limit 10", nativeQuery = true) + List findTopByOrderByd(); + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Payment/Paytm/AppConfig.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Payment/Paytm/AppConfig.java new file mode 100644 index 0000000..22e6c0a --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Payment/Paytm/AppConfig.java @@ -0,0 +1,7 @@ +package com.realnet.Payment.Paytm; + +public class AppConfig { + public static final String MID="RHLBnF070397707073"; + public static final String MKEY="BXWmXtYo858BTG"; + public static final String WEBSITE="WEBSTAGING"; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Payment/Paytm/PaytmPageController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Payment/Paytm/PaytmPageController.java new file mode 100644 index 0000000..5929218 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Payment/Paytm/PaytmPageController.java @@ -0,0 +1,19 @@ +//package com.realnet.Payment.Paytm; +// +//import org.springframework.stereotype.Controller; +//import org.springframework.web.bind.annotation.RequestMapping; +// +//@Controller +//public class PaytmPageController { +// @RequestMapping("/") +// public String homePage() { +// System.out.println("Request for home page"); +// return "home"; +// } +// @RequestMapping("/about") +// public String aboutPage() { +// System.out.println("Request for about page"); +// return "about"; +// } +// +//} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Payment/Paytm/PaytmPayment.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Payment/Paytm/PaytmPayment.java new file mode 100644 index 0000000..44c7986 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Payment/Paytm/PaytmPayment.java @@ -0,0 +1,105 @@ +package com.realnet.Payment.Paytm; + +import java.net.URL; +import java.security.SecureRandom; +import java.util.Map; +import java.util.logging.Logger; + +import org.json.JSONObject; +import org.springframework.http.HttpEntity; +import org.springframework.http.HttpHeaders; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.client.RestTemplate; + +import com.paytm.pg.merchant.PaytmChecksum; + +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@RestController +@RequestMapping("/payment") +public class PaytmPayment { + + @PostMapping("/start") + public Map startPayment(@RequestBody Map data) { + + SecureRandom random = new SecureRandom(); + String orderId = "ORDER" + random.nextInt(10000000); + + // param created + JSONObject paytmParams = new JSONObject(); + + // body information + JSONObject body = new JSONObject(); + body.put("requestType", "Payment"); + body.put("mid", AppConfig.MID); + body.put("websiteName", AppConfig.WEBSITE); + body.put("orderId", orderId); + body.put("callbackUrl", "http://localhost:8081/payment-success"); + + JSONObject txnAmount = new JSONObject(); + txnAmount.put("value", data.get("amount")); + txnAmount.put("currency", "INR"); + + JSONObject userInfo = new JSONObject(); + userInfo.put("custId", "CUST_001"); + + body.put("txnAmount", txnAmount); + body.put("userInfo", userInfo); + + String responseData = ""; + ResponseEntity response = null; + + try { + + String checksum = PaytmChecksum.generateSignature(body.toString(), AppConfig.MKEY); + + JSONObject head = new JSONObject(); + head.put("signature", checksum); + + paytmParams.put("body", body); + paytmParams.put("head", head); + + String post_data = paytmParams.toString(); + + /* for Staging */ + URL url = new URL("https://securegw-stage.paytm.in/theia/api/v1/initiateTransaction?mid=" + AppConfig.MID + + "&orderId=" + orderId + ""); + + HttpHeaders headers = new HttpHeaders(); + headers.setContentType(MediaType.APPLICATION_JSON); + HttpEntity> httpEntity = new HttpEntity<>(paytmParams.toMap(), headers); + + // calling api + RestTemplate restTemplate = new RestTemplate(); + response = restTemplate.postForEntity(url.toString(), httpEntity, Map.class); + + System.out.println(response); + + } catch (Exception e) { + log.error(e.getLocalizedMessage()); + + } + + Map body1 = response.getBody(); + body1.put("orderId", orderId); + body1.put("amount", txnAmount.get("value")); + return body1; + } + + public void capturePayment() { + // get the data from client + + // verify the payment + + // database mein bhi update kar do ki payment ho chuka hai... + + // allow user to access the service + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Payment/Razorpay/RazorpayController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Payment/Razorpay/RazorpayController.java new file mode 100644 index 0000000..c46560a --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Payment/Razorpay/RazorpayController.java @@ -0,0 +1,89 @@ +package com.realnet.Payment.Razorpay; + +import com.razorpay.*; +import lombok.RequiredArgsConstructor; +import org.json.JSONObject; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; + +import java.util.Map; +import java.util.UUID; + +@RestController +@RequiredArgsConstructor +@RequestMapping("/payment/razorpay") +public class RazorpayController { + + @Autowired + private RazorpayRepo repo; + + @Value("${razorpay.api.key}") + private String razorpayApiKey; + + @Value("${razorpay.api.secret}") + private String razorpayApiSecret; + + @PostMapping("/create-order") + public void payOrder(@RequestBody Map data) throws RazorpayException { + + int amt = Integer.parseInt(data.get("amount").toString()); + amt = 50; + + RazorpayClient razorpayClient = new RazorpayClient(razorpayApiKey, razorpayApiSecret); + + String trnx = UUID.randomUUID().toString(); + JSONObject orderDetails = createOrderJSON(amt, "INR", "_INV/0001/2023"); + + Order order = razorpayClient.orders.create(orderDetails); + + System.out.println(order); + // Taking record into Our database + RazorpayDTO dto = RazorpayDTO.builder().orderId(order.get("order_id")).bodyField(String.valueOf(order)).build(); + repo.save(dto); + } + + @PostMapping("/verify-payment") + public ResponseEntity verifyPayment(@RequestParam("orderId") JSONObject orderId) { + try { + RazorpayClient razorpayClient = new RazorpayClient(razorpayApiKey, razorpayApiSecret); + Payment payment = razorpayClient.payments.fetch(orderId.get("order_id").toString()); + + boolean isSignatureValid = Utils.verifyPaymentSignature(orderId, razorpayApiSecret); + + if (payment != null && payment.get("status").equals("captured") && isSignatureValid) { + return ResponseEntity.ok("Payment successfully verified."); + } else { + return ResponseEntity.badRequest().body("Payment verification failed."); + } + } catch (Exception e) { + + return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR) + .body("An error occurred during payment verification."); + } + } + + @PostMapping("update-order") + public ResponseEntity updateOrder(@RequestBody Map data) { + + RazorpayDTO current_order = repo.findByOrderId(data.get("order_id").toString()); + current_order.setBodyField(data.toString()); + repo.save(current_order); + +// return ResponseEntity.ok(Map.of("msg", "updated")); + return ResponseEntity.ok("updated"); + + } + + public JSONObject createOrderJSON(Integer amount, String currency, String trxnId) { + JSONObject options = new JSONObject(); + options.put("amount", amount * 100); // amount in paise = Rs*100 + options.put("currency", currency); + options.put("receipt", trxnId); + + return options; + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Payment/Razorpay/RazorpayDTO.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Payment/Razorpay/RazorpayDTO.java new file mode 100644 index 0000000..6ec1674 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Payment/Razorpay/RazorpayDTO.java @@ -0,0 +1,27 @@ +package com.realnet.Payment.Razorpay; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import java.util.UUID; + +@Entity +@Data +@AllArgsConstructor +@NoArgsConstructor +@Builder +public class RazorpayDTO { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + private String orderId; + private String bodyField; + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Payment/Razorpay/RazorpayRepo.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Payment/Razorpay/RazorpayRepo.java new file mode 100644 index 0000000..d1595af --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Payment/Razorpay/RazorpayRepo.java @@ -0,0 +1,9 @@ +package com.realnet.Payment.Razorpay; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +@Repository +public interface RazorpayRepo extends JpaRepository { + RazorpayDTO findByOrderId(String orderId); +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/RealNetApp.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/RealNetApp.java new file mode 100644 index 0000000..0727b71 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/RealNetApp.java @@ -0,0 +1,31 @@ +package com.realnet; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.builder.SpringApplicationBuilder; +import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; +import org.springframework.cache.annotation.EnableCaching; +import org.springframework.data.jpa.repository.config.EnableJpaAuditing; +import org.springframework.transaction.annotation.EnableTransactionManagement; + +import springfox.documentation.swagger2.annotations.EnableSwagger2; + +@SpringBootApplication +@EnableSwagger2 +@EnableTransactionManagement +@EnableJpaAuditing +@EnableCaching +public class RealNetApp extends SpringBootServletInitializer{ + @Override + protected SpringApplicationBuilder configure(SpringApplicationBuilder builder){ + return builder.sources(RealNetApp.class); + } +// + public static void main(String[] args) { + SpringApplication.run(RealNetApp.class, args); + + + } +} + + diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder/Controllers/FileConverterController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder/Controllers/FileConverterController.java new file mode 100644 index 0000000..4ac3432 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder/Controllers/FileConverterController.java @@ -0,0 +1,229 @@ +package com.realnet.Rpt_builder.Controllers; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.StringWriter; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.List; +import java.util.Map; + +import org.apache.pdfbox.pdmodel.PDDocument; +import org.apache.pdfbox.pdmodel.PDPage; +import org.apache.pdfbox.pdmodel.PDPageContentStream; +import org.apache.pdfbox.pdmodel.font.PDType1Font; +import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.Row; +import org.apache.poi.ss.usermodel.Sheet; +import org.apache.poi.ss.usermodel.Workbook; +import org.apache.poi.xssf.usermodel.XSSFWorkbook; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.opencsv.CSVWriter; + + +@RestController +@RequestMapping("/rbbuilder/fileconverter") +public class FileConverterController { + +// @PostMapping("/downloadCsv") +// public ResponseEntity downloadCSV(@RequestBody List> dataList) { +// try { +// // Convert dataList to CSV format and provide download +// String csvContent = convertToCSV(dataList); +// +// // Set headers for response +// HttpHeaders headers = new HttpHeaders(); +// headers.add(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=data.csv"); +// +// // Send the CSV content as a response +// return new ResponseEntity<>(csvContent, headers, HttpStatus.OK); +// } catch (IOException e) { +// // Handle exception +// return new ResponseEntity<>("Error occurred while processing data", HttpStatus.INTERNAL_SERVER_ERROR); +// } +// } +// +// private String convertToCSV(List> dataList) throws IOException { +// StringWriter writer = new StringWriter(); +// CSVWriter csvWriter = new CSVWriter(writer); +// +// // Write headers +// if (!dataList.isEmpty()) { +// Map firstRow = dataList.get(0); +// String[] headers = firstRow.keySet().toArray(new String[0]); +// csvWriter.writeNext(headers); +// +// // Write data +// for (Map data : dataList) { +// String[] rowData = new String[headers.length]; +// for (int i = 0; i < headers.length; i++) { +// Object value = data.get(headers[i]); +// rowData[i] = (value != null) ? value.toString() : ""; +// } +// csvWriter.writeNext(rowData); +// } +// } +// +// // Close CSV writer +// csvWriter.close(); +// +// return writer.toString(); +// } + + @PostMapping("/downloadFile/{format}") + public ResponseEntity downloadFile(@RequestBody List> dataList,@PathVariable String format) { + try { + // Convert dataList to the requested format + byte[] fileContent; + String fileName; + String timestamp = new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()); + + if ("csv".equalsIgnoreCase(format)) { + fileContent = convertToCSV(dataList).getBytes(); + fileName = "data_" + timestamp + ".csv"; + } else if ("excel".equalsIgnoreCase(format)) { + fileContent = convertToExcel(dataList); + fileName = "data_" + timestamp + ".xlsx"; + } else if ("pdf".equalsIgnoreCase(format)) { + fileContent = convertToPDF(dataList); + fileName = "data_" + timestamp + ".pdf"; + } else { + return new ResponseEntity<>("Unsupported file format", HttpStatus.BAD_REQUEST); + } + // Set headers for response + HttpHeaders headers = new HttpHeaders(); + headers.add(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + fileName); + + // Send the file content as a response + return new ResponseEntity<>(fileContent, headers, HttpStatus.OK); + } catch (IOException e) { + // Handle exception + return new ResponseEntity<>("Error occurred while processing data", HttpStatus.INTERNAL_SERVER_ERROR); + } + } + + private String convertToCSV(List> dataList) throws IOException { + StringWriter writer = new StringWriter(); + CSVWriter csvWriter = new CSVWriter(writer); + + // Write headers + if (!dataList.isEmpty()) { + Map firstRow = dataList.get(0); + String[] headers = firstRow.keySet().toArray(new String[0]); + csvWriter.writeNext(headers); + + // Write data + for (Map data : dataList) { + String[] rowData = new String[headers.length]; + for (int i = 0; i < headers.length; i++) { + Object value = data.get(headers[i]); + rowData[i] = (value != null) ? value.toString() : ""; + } + csvWriter.writeNext(rowData); + } + } + + // Close CSV writer + csvWriter.close(); + + return writer.toString(); + } + + private byte[] convertToExcel(List> dataList) throws IOException { + Workbook workbook = new XSSFWorkbook(); + Sheet sheet = workbook.createSheet("Data"); + + // Write headers + if (!dataList.isEmpty()) { + Row headerRow = sheet.createRow(0); + Map firstRow = dataList.get(0); + int cellIndex = 0; + for (String header : firstRow.keySet()) { + Cell cell = headerRow.createCell(cellIndex++); + cell.setCellValue(header); + } + + // Write data + int rowIndex = 1; + for (Map data : dataList) { + Row dataRow = sheet.createRow(rowIndex++); + int columnIndex = 0; + for (Object value : data.values()) { + Cell cell = dataRow.createCell(columnIndex++); + if (value != null) { + if (value instanceof Number) { + cell.setCellValue(((Number) value).doubleValue()); + } else { + cell.setCellValue(value.toString()); + } + } + } + } + } + + // Convert workbook to byte array + ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); + workbook.write(outputStream); + workbook.close(); + return outputStream.toByteArray(); + } + + private byte[] convertToPDF(List> dataList) throws IOException { + try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); + PDDocument document = new PDDocument()) { + + PDPage page = new PDPage(); + document.addPage(page); + + try (PDPageContentStream contentStream = new PDPageContentStream(document, page)) { + // Set font and size (you can customize these) + contentStream.setFont(PDType1Font.HELVETICA_BOLD, 12); + float margin = 50; + float yStart = page.getMediaBox().getHeight() - margin; + float tableWidth = page.getMediaBox().getWidth() - 2 * margin; + float yPosition = yStart; + + // Write headers + Map firstRow = dataList.get(0); + int numberOfColumns = firstRow.size(); + float tableHeight = 20f; // Height of the table (you can adjust this) + + // Set column widths + float[] columnWidths = new float[numberOfColumns]; + float tableHeightStart = yStart - 2 * tableHeight; + float nextXStart = margin; + for (int i = 0; i < numberOfColumns; i++) { + columnWidths[i] = tableWidth / (float) numberOfColumns; + } + + // Write data + for (Map data : dataList) { + contentStream.beginText(); + contentStream.newLineAtOffset(nextXStart, yPosition); + int columnIndex = 0; + for (Object value : data.values()) { + contentStream.showText(value != null ? value.toString() : ""); + contentStream.newLineAtOffset(columnWidths[columnIndex], 0); + columnIndex++; + } + contentStream.endText(); + yPosition -= tableHeight; + } + } + + document.save(byteArrayOutputStream); + return byteArrayOutputStream.toByteArray(); + } catch (IOException e) { + // Handle PDF creation exception + return new byte[0]; + } + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder/Controllers/Rpt_builder_Controller.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder/Controllers/Rpt_builder_Controller.java new file mode 100644 index 0000000..975cda1 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder/Controllers/Rpt_builder_Controller.java @@ -0,0 +1,46 @@ +package com.realnet.Rpt_builder.Controllers; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import com.realnet.Rpt_builder.Entity.Rpt_builder_t; +import com.realnet.Rpt_builder.Services.Rpt_builder_Service; + +@RequestMapping(value = "/Rpt_builder") +@RestController +public class Rpt_builder_Controller { + + @Autowired + private Rpt_builder_Service Service; + + @PostMapping("/Rpt_builder") + public Rpt_builder_t Savedata(@RequestBody Rpt_builder_t data) { + Rpt_builder_t save = Service.Savedata(data); + return save; + } + + @GetMapping("/Rpt_builder") + public List getdetails() { + List get = Service.getdetails(); + return get; + } + + @GetMapping("/Rpt_builder/{id}") + public Rpt_builder_t getdetailsbyId(@PathVariable Long id) { + Rpt_builder_t get = Service.getdetailsbyId(id); + return get; + + } + + @DeleteMapping("/Rpt_builder/{id}") + public void delete_by_id(@PathVariable Long id) { + Service.delete_by_id(id); + + } + + @PutMapping("/Rpt_builder/{id}") + public Rpt_builder_t update(@RequestBody Rpt_builder_t data, @PathVariable Long id) { + Rpt_builder_t update = Service.update(data, id); + return update; + } +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder/Entity/Rpt_builder_t.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder/Entity/Rpt_builder_t.java new file mode 100644 index 0000000..1b87fd6 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder/Entity/Rpt_builder_t.java @@ -0,0 +1,24 @@ +package com.realnet.Rpt_builder.Entity; + +import lombok.*; +import javax.persistence.*; +import java.time.LocalDateTime; +import java.util.*; + +@Entity +@Data +public class Rpt_builder_t { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String name; + private String folder; + private String query; + private boolean date_param_flag; + private boolean adhoc_param_flag; + private String adhoc_param_string; + private String Std_param_json; + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder/Repository/Rpt_builder_Repository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder/Repository/Rpt_builder_Repository.java new file mode 100644 index 0000000..9f0e48d --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder/Repository/Rpt_builder_Repository.java @@ -0,0 +1,11 @@ +package com.realnet.Rpt_builder.Repository; + +import org.springframework.data.jpa.repository.JpaRepository; + +import org.springframework.stereotype.Repository; + +import com.realnet.Rpt_builder.Entity.Rpt_builder_t; + +@Repository +public interface Rpt_builder_Repository extends JpaRepository { +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder/Services/Rpt_builder_Service.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder/Services/Rpt_builder_Service.java new file mode 100644 index 0000000..1198249 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder/Services/Rpt_builder_Service.java @@ -0,0 +1,43 @@ +package com.realnet.Rpt_builder.Services; + +import com.realnet.Rpt_builder.Repository.Rpt_builder_Repository; +import com.realnet.Rpt_builder.Entity.Rpt_builder_t; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class Rpt_builder_Service { + @Autowired + private Rpt_builder_Repository Repository; + + public Rpt_builder_t Savedata(Rpt_builder_t data) { + return Repository.save(data); + } + + public List getdetails() { + return (List) Repository.findAll(); + } + + public Rpt_builder_t getdetailsbyId(Long id) { + return Repository.findById(id).get(); + } + + public void delete_by_id(Long id) { + Repository.deleteById(id); + } + + public Rpt_builder_t update(Rpt_builder_t data, Long id) { + Rpt_builder_t old = Repository.findById(id).get(); + old.setName(data.getName()); + old.setFolder(data.getFolder()); + old.setQuery(data.getQuery()); + old.setDate_param_flag(data.isDate_param_flag()); + old.setAdhoc_param_flag(data.isAdhoc_param_flag()); + old.setAdhoc_param_string(data.getAdhoc_param_string()); + old.setStd_param_json(data.getStd_param_json()); + final Rpt_builder_t test = Repository.save(old); + return test; + } +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder2/Controllers/ReportHtmlController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder2/Controllers/ReportHtmlController.java new file mode 100644 index 0000000..4840256 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder2/Controllers/ReportHtmlController.java @@ -0,0 +1,86 @@ +package com.realnet.Rpt_builder2.Controllers; +import java.io.IOException; +import java.util.Iterator; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import com.realnet.Rpt_builder2.Entity.Rpt_builder2_t; +import com.realnet.Rpt_builder2.Services.Rpt_builder2_Service; +import com.realnet.Rpt_builder2_lines.Entity.Rpt_builder2_lines_t; +import com.realnet.Rpt_builder2_lines.Repository.Rpt_builder2_lines_Repository; +@RestController +@RequestMapping("/Rpt_builder2/html") +public class ReportHtmlController { + @Autowired + private Rpt_builder2_Service builder2_Service; + @Autowired + private Rpt_builder2_lines_Repository line_repo; +// @GetMapping(value = "/build_report2/{id}") +// public ResponseEntity build_wireframe2(@PathVariable Long id) throws IOException { +// Rpt_builder2_t reportList = builder2_Service.getdetailsbyId(id); +// String std_param = reportList.getStd_param_html(); +// +// StringBuilder htmlFile = new StringBuilder(); +// +// // Start building the HTML code +// htmlFile.append("
\n"); +// +// // Remove the outer square brackets and split the std_param string to get +// // individual parameter values +// String[] params = std_param.substring(1, std_param.length() - 1).split("\",\""); +// +// for (int i = 0; i < params.length; i++) { +// String param = params[i].replaceAll("\"", ""); // Remove quotation marks from parameter value +// +// // Create the HTML code for each parameter, including the actual parameter value +// htmlFile.append("
\n") +// .append(" \n") +// .append(" \n").append("
\n"); +// } +// +// htmlFile.append("
"); +// +// // Return the HTML code as a response +// return ResponseEntity.ok(htmlFile.toString()); +// } + @GetMapping(value = "/build_report2/{rptbuilderid}") + public ResponseEntity build_wireframe2(@PathVariable Long rptbuilderid) throws IOException { + Rpt_builder2_lines_t rptlines = line_repo.getRpt_builder2_lines(rptbuilderid); + String model = rptlines.getModel(); + JsonParser parser = new JsonParser(); + JsonObject jsonObject = parser.parse(model).getAsJsonObject(); + String std_param = jsonObject.get("std_param_html").getAsString(); + StringBuilder htmlFile = new StringBuilder(); + // Start building the HTML code + htmlFile.append("
\n"); + // Remove the outer square brackets and split the std_param string to get + // individual parameter values + String[] params = std_param.substring(1, std_param.length() - 1).split("\",\""); + for (int i = 0; i < params.length; i++) { + String param = params[i].replaceAll("\"", ""); // Remove quotation marks from parameter value + // Create the HTML code for each parameter, including the actual parameter value + htmlFile.append("
\n") + .append(" \n") + .append(" \n").append("
\n"); + } + htmlFile.append("
"); + // Return the HTML code as a response + return ResponseEntity.ok(htmlFile.toString()); + } +} + + + + + + + diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder2/Controllers/RpDownloadController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder2/Controllers/RpDownloadController.java new file mode 100644 index 0000000..791d4c2 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder2/Controllers/RpDownloadController.java @@ -0,0 +1,184 @@ +package com.realnet.Rpt_builder2.Controllers; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.StringWriter; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.List; +import java.util.Map; + +import org.apache.pdfbox.pdmodel.PDDocument; +import org.apache.pdfbox.pdmodel.PDPage; +import org.apache.pdfbox.pdmodel.PDPageContentStream; +import org.apache.pdfbox.pdmodel.font.PDType1Font; +import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.Row; +import org.apache.poi.ss.usermodel.Sheet; +import org.apache.poi.ss.usermodel.Workbook; +import org.apache.poi.xssf.usermodel.XSSFWorkbook; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.opencsv.CSVWriter; + +@RestController +@RequestMapping(value = "rpt2") +public class RpDownloadController { + + + @PostMapping("/downloadFile/{format}") + public ResponseEntity downloadFile(@RequestBody List> dataList,@PathVariable String format) { + try { + // Convert dataList to the requested format + byte[] fileContent; + String fileName; + String timestamp = new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()); + + if ("csv".equalsIgnoreCase(format)) { + fileContent = convertToCSV(dataList).getBytes(); + fileName = "data_" + timestamp + ".csv"; + } else if ("excel".equalsIgnoreCase(format)) { + fileContent = convertToExcel(dataList); + fileName = "data_" + timestamp + ".xlsx"; + } else if ("pdf".equalsIgnoreCase(format)) { + fileContent = convertToPDF(dataList); + fileName = "data_" + timestamp + ".pdf"; + } else { + return new ResponseEntity<>("Unsupported file format", HttpStatus.BAD_REQUEST); + } + // Set headers for response + HttpHeaders headers = new HttpHeaders(); + headers.add(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + fileName); + + // Send the file content as a response + return new ResponseEntity<>(fileContent, headers, HttpStatus.OK); + } catch (IOException e) { + // Handle exception + return new ResponseEntity<>("Error occurred while processing data", HttpStatus.INTERNAL_SERVER_ERROR); + } + } + + private String convertToCSV(List> dataList) throws IOException { + StringWriter writer = new StringWriter(); + CSVWriter csvWriter = new CSVWriter(writer); + + // Write headers + if (!dataList.isEmpty()) { + Map firstRow = dataList.get(0); + String[] headers = firstRow.keySet().toArray(new String[0]); + csvWriter.writeNext(headers); + + // Write data + for (Map data : dataList) { + String[] rowData = new String[headers.length]; + for (int i = 0; i < headers.length; i++) { + Object value = data.get(headers[i]); + rowData[i] = (value != null) ? value.toString() : ""; + } + csvWriter.writeNext(rowData); + } + } + + // Close CSV writer + csvWriter.close(); + + return writer.toString(); + } + + private byte[] convertToExcel(List> dataList) throws IOException { + Workbook workbook = new XSSFWorkbook(); + Sheet sheet = workbook.createSheet("Data"); + + // Write headers + if (!dataList.isEmpty()) { + Row headerRow = sheet.createRow(0); + Map firstRow = dataList.get(0); + int cellIndex = 0; + for (String header : firstRow.keySet()) { + Cell cell = headerRow.createCell(cellIndex++); + cell.setCellValue(header); + } + + // Write data + int rowIndex = 1; + for (Map data : dataList) { + Row dataRow = sheet.createRow(rowIndex++); + int columnIndex = 0; + for (Object value : data.values()) { + Cell cell = dataRow.createCell(columnIndex++); + if (value != null) { + if (value instanceof Number) { + cell.setCellValue(((Number) value).doubleValue()); + } else { + cell.setCellValue(value.toString()); + } + } + } + } + } + + // Convert workbook to byte array + ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); + workbook.write(outputStream); + workbook.close(); + return outputStream.toByteArray(); + } + + private byte[] convertToPDF(List> dataList) throws IOException { + try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); + PDDocument document = new PDDocument()) { + + PDPage page = new PDPage(); + document.addPage(page); + + try (PDPageContentStream contentStream = new PDPageContentStream(document, page)) { + // Set font and size (you can customize these) + contentStream.setFont(PDType1Font.HELVETICA_BOLD, 12); + float margin = 50; + float yStart = page.getMediaBox().getHeight() - margin; + float tableWidth = page.getMediaBox().getWidth() - 2 * margin; + float yPosition = yStart; + + // Write headers + Map firstRow = dataList.get(0); + int numberOfColumns = firstRow.size(); + float tableHeight = 20f; // Height of the table (you can adjust this) + + // Set column widths + float[] columnWidths = new float[numberOfColumns]; + float tableHeightStart = yStart - 2 * tableHeight; + float nextXStart = margin; + for (int i = 0; i < numberOfColumns; i++) { + columnWidths[i] = tableWidth / (float) numberOfColumns; + } + + // Write data + for (Map data : dataList) { + contentStream.beginText(); + contentStream.newLineAtOffset(nextXStart, yPosition); + int columnIndex = 0; + for (Object value : data.values()) { + contentStream.showText(value != null ? value.toString() : ""); + contentStream.newLineAtOffset(columnWidths[columnIndex], 0); + columnIndex++; + } + contentStream.endText(); + yPosition -= tableHeight; + } + } + + document.save(byteArrayOutputStream); + return byteArrayOutputStream.toByteArray(); + } catch (IOException e) { + // Handle PDF creation exception + return new byte[0]; + } + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder2/Controllers/Rpt_builder2_Controller.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder2/Controllers/Rpt_builder2_Controller.java new file mode 100644 index 0000000..7aaec4d --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder2/Controllers/Rpt_builder2_Controller.java @@ -0,0 +1,46 @@ +package com.realnet.Rpt_builder2.Controllers; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import com.realnet.Rpt_builder2.Entity.Rpt_builder2_t; +import com.realnet.Rpt_builder2.Services.Rpt_builder2_Service; + +@RequestMapping(value = "/Rpt_builder2") +@RestController +public class Rpt_builder2_Controller { + + @Autowired + private Rpt_builder2_Service Service; + + @PostMapping("/Rpt_builder2") + public Rpt_builder2_t Savedata(@RequestBody Rpt_builder2_t data) { + Rpt_builder2_t save = Service.Savedata(data); + return save; + } + + @GetMapping("/Rpt_builder2") + public List getdetails() { + List get = Service.getdetails(); + return get; + } + + @GetMapping("/Rpt_builder2/{id}") + public Rpt_builder2_t getdetailsbyId(@PathVariable Long id) { + Rpt_builder2_t get = Service.getdetailsbyId(id); + return get; + + } + + @DeleteMapping("/Rpt_builder2/{id}") + public void delete_by_id(@PathVariable Long id) { + Service.delete_by_id(id); + + } + + @PutMapping("/Rpt_builder2/{id}") + public Rpt_builder2_t update(@RequestBody Rpt_builder2_t data, @PathVariable Long id) { + Rpt_builder2_t update = Service.update(data, id); + return update; + } +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder2/Entity/Rpt_builder2_t.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder2/Entity/Rpt_builder2_t.java new file mode 100644 index 0000000..8e8c614 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder2/Entity/Rpt_builder2_t.java @@ -0,0 +1,37 @@ +package com.realnet.Rpt_builder2.Entity; + +import java.util.ArrayList; +import java.util.List; + +import javax.persistence.CascadeType; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.OneToMany; + +import com.fasterxml.jackson.annotation.JsonManagedReference; +import com.realnet.Rpt_builder2_lines.Entity.Rpt_builder2_lines_t; + +import lombok.Data; + +@Entity +@Data +public class Rpt_builder2_t { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String reportName; + private String description; + private Boolean active; + private Boolean isSql; + + + @JsonManagedReference + @OneToMany(cascade = CascadeType.ALL,mappedBy = "rpt_builder2_t") + private List Rpt_builder2_lines = new ArrayList<>(); + + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder2/Repository/Rpt_builder2_Repository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder2/Repository/Rpt_builder2_Repository.java new file mode 100644 index 0000000..30f7a0f --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder2/Repository/Rpt_builder2_Repository.java @@ -0,0 +1,11 @@ +package com.realnet.Rpt_builder2.Repository; + +import org.springframework.data.jpa.repository.JpaRepository; + +import org.springframework.stereotype.Repository; + +import com.realnet.Rpt_builder2.Entity.Rpt_builder2_t; + +@Repository +public interface Rpt_builder2_Repository extends JpaRepository { +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder2/Services/Rpt_builder2_Service.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder2/Services/Rpt_builder2_Service.java new file mode 100644 index 0000000..2731b1f --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder2/Services/Rpt_builder2_Service.java @@ -0,0 +1,49 @@ +package com.realnet.Rpt_builder2.Services; + +import com.realnet.Rpt_builder2.Repository.Rpt_builder2_Repository; +import com.realnet.Rpt_builder2.Entity.Rpt_builder2_t; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class Rpt_builder2_Service { + @Autowired + private Rpt_builder2_Repository Repository; + + public Rpt_builder2_t Savedata(Rpt_builder2_t data) { + return Repository.save(data); + } + + public List getdetails() { + return (List) Repository.findAll(); + } + + public Rpt_builder2_t getdetailsbyId(Long id) { + return Repository.findById(id).get(); + } + + public void delete_by_id(Long id) { + Repository.deleteById(id); + } + + public Rpt_builder2_t update(Rpt_builder2_t data, Long id) { + Rpt_builder2_t old = Repository.findById(id).get(); +// old.setConn_name(data.getConn_name()); +// old.setDate_param_req(data.getDate_param_req()); +// old.setStd_param_html(data.getStd_param_html()); +// old.setAdhoc_param_html(data.getAdhoc_param_html()); +// old.setColumn_str(data.getColumn_str()); +// old.setSql_str(data.getSql_str()); + + old.setReportName(data.getReportName()); + old.setDescription(data.getDescription()); + old.setActive(data.getActive()); +// old.setFolderName(data.getFolderName()); + + + final Rpt_builder2_t test = Repository.save(old); + return test; + } +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder2_lines/Controllers/Rpt_builder2_lines_Controller.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder2_lines/Controllers/Rpt_builder2_lines_Controller.java new file mode 100644 index 0000000..0f97e9a --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder2_lines/Controllers/Rpt_builder2_lines_Controller.java @@ -0,0 +1,128 @@ +package com.realnet.Rpt_builder2_lines.Controllers; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.client.RestTemplate; + +import com.realnet.Rpt_builder2_lines.Entity.Rpt_builder2_lines_t; +import com.realnet.Rpt_builder2_lines.Repository.Rpt_builder2_lines_Repository; +import com.realnet.Rpt_builder2_lines.Services.Rpt_builder2_lines_Service; + +@RequestMapping(value = "/Rpt_builder2_lines") +@RestController +public class Rpt_builder2_lines_Controller { + + @Autowired + private Rpt_builder2_lines_Service Service; + + @Autowired + private Rpt_builder2_lines_Repository line_repo; + + @PostMapping("/Rpt_builder2_lines") + public Rpt_builder2_lines_t Savedata(@RequestBody Rpt_builder2_lines_t data) { + Rpt_builder2_lines_t save = Service.Savedata(data); + return save; + } + + @GetMapping("/Rpt_builder2_lines") + public List getdetails() { + List get = Service.getdetails(); + return get; + } + + @GetMapping("/Rpt_builder2_lines/{id}") + public Rpt_builder2_lines_t getdetailsbyId(@PathVariable Long id) { + Rpt_builder2_lines_t get = Service.getdetailsbyId(id); + return get; + + } + + @DeleteMapping("/Rpt_builder2_lines/{id}") + public void delete_by_id(@PathVariable Long id) { + Service.delete_by_id(id); + + } + + @PutMapping("/Rpt_builder2_lines/{id}") + public Rpt_builder2_lines_t update(@RequestBody Rpt_builder2_lines_t data, @PathVariable Long id) { + Rpt_builder2_lines_t update = Service.update(data, id); + return update; + } + + @PutMapping("/update/{id}") + public ResponseEntity updateById(@PathVariable Long id, @RequestBody Rpt_builder2_lines_t outgoing_data) { + Rpt_builder2_lines_t line = line_repo.findById(id).get(); + line.setHeader_id(outgoing_data.getHeader_id()); + line.setModel(outgoing_data.getModel()); + Rpt_builder2_lines_t save = line_repo.save(line); + return new ResponseEntity<>(save, HttpStatus.ACCEPTED); + } + + @GetMapping("/geturlkeybyurl") + public Set getKeysById(@RequestParam String url) { + ResponseEntity response = GET(url); + System.out.println("Response status code: " + response.getStatusCodeValue()); + // Check the class of the response body + if (response.getBody() != null) { + System.out.println("Response body class: " + response.getBody().getClass()); + } + // Check if the response body is an ArrayList + if (response.getBody() instanceof ArrayList) { + ArrayList responseBody = (ArrayList) response.getBody(); + // Assuming you want to extract keys from elements inside the ArrayList, + // you might need to iterate through the list and extract keys from each element. + Set keys = new HashSet<>(); + for (Object element : responseBody) { + if (element instanceof LinkedHashMap) { + LinkedHashMap elementMap = (LinkedHashMap) element; + keys.addAll(elementMap.keySet()); + } + } + return keys; + } else { + return null; + } + } + + public ResponseEntity GET(String get) { + org.springframework.web.client.RestTemplate restTemplate = new org.springframework.web.client.RestTemplate(); + ResponseEntity u = restTemplate.getForEntity(get, Object.class); + return u; + } + + @GetMapping("/fetch_data_url") + public ResponseEntity fetchURL(@RequestParam String url) { + try { + // Create an instance of RestTemplate + RestTemplate restTemplate = new RestTemplate(); + + // Send an HTTP GET request to the provided URL and retrieve the response body as a String + String responseBody = restTemplate.getForObject(url, String.class); + + // Create a Map to hold the URL and body data + Map responseMap = new HashMap<>(); + responseMap.put("url", url); + responseMap.put("body", responseBody); + + // Return the response map as JSON + return ResponseEntity.ok(responseMap); + } catch (Exception e) { + // Handle exceptions, such as invalid URLs or network errors + Map errorMap = new HashMap<>(); + errorMap.put("error", "Failed to fetch URL: " + e.getMessage()); + return ResponseEntity.badRequest().body(errorMap); + } + } + + + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder2_lines/Entity/Rpt_builder2_lines_t.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder2_lines/Entity/Rpt_builder2_lines_t.java new file mode 100644 index 0000000..4c3d0bb --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder2_lines/Entity/Rpt_builder2_lines_t.java @@ -0,0 +1,28 @@ +package com.realnet.Rpt_builder2_lines.Entity; + +import lombok.*; +import javax.persistence.*; + +import com.fasterxml.jackson.annotation.JsonBackReference; +import com.realnet.Rpt_builder2.Entity.Rpt_builder2_t; + +import java.time.LocalDateTime; +import java.util.*; + +@Entity +@Data +public class Rpt_builder2_lines_t { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String header_id; + @Lob + private String model; + + @JsonBackReference + @ManyToOne + private Rpt_builder2_t rpt_builder2_t; + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder2_lines/Repository/Rpt_builder2_lines_Repository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder2_lines/Repository/Rpt_builder2_lines_Repository.java new file mode 100644 index 0000000..3b35066 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder2_lines/Repository/Rpt_builder2_lines_Repository.java @@ -0,0 +1,15 @@ +package com.realnet.Rpt_builder2_lines.Repository; + + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.stereotype.Repository; + + +import com.realnet.Rpt_builder2_lines.Entity.Rpt_builder2_lines_t; + +@Repository +public interface Rpt_builder2_lines_Repository extends JpaRepository { + @Query(value = "SELECT * FROM rpt_builder2_lines_t where rpt_builder2_t_id =?1", nativeQuery = true) + Rpt_builder2_lines_t getRpt_builder2_lines(Long id); +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder2_lines/Services/Rpt_builder2_lines_Service.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder2_lines/Services/Rpt_builder2_lines_Service.java new file mode 100644 index 0000000..09fff0c --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/Rpt_builder2_lines/Services/Rpt_builder2_lines_Service.java @@ -0,0 +1,37 @@ +package com.realnet.Rpt_builder2_lines.Services; +import com.realnet.Rpt_builder2_lines.Repository.Rpt_builder2_lines_Repository; +import com.realnet.Rpt_builder2_lines.Entity.Rpt_builder2_lines_t;import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Service; + +@Service + public class Rpt_builder2_lines_Service { +@Autowired +private Rpt_builder2_lines_Repository Repository; +public Rpt_builder2_lines_t Savedata(Rpt_builder2_lines_t data) { + return Repository.save(data); + } + + +public List getdetails() { + return (List) Repository.findAll(); + } + + +public Rpt_builder2_lines_t getdetailsbyId(Long id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Long id) { + Repository.deleteById(id); +} + + +public Rpt_builder2_lines_t update(Rpt_builder2_lines_t data,Long id) { + Rpt_builder2_lines_t old = Repository.findById(id).get(); +old.setHeader_id(data.getHeader_id()); +old.setModel(data.getModel()); +final Rpt_builder2_lines_t test = Repository.save(old); + return test;}} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/SequenceGenerator/Controller/SequenceController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/SequenceGenerator/Controller/SequenceController.java new file mode 100644 index 0000000..6f78fb7 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/SequenceGenerator/Controller/SequenceController.java @@ -0,0 +1,182 @@ +package com.realnet.SequenceGenerator.Controller; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.SequenceGenerator.Entity.Sequence; +import com.realnet.SequenceGenerator.Service.SequenceService; +import com.realnet.SequenceGenerator.repo.SeqRepo; + +@RequestMapping(value = "/sureserve/sequence") +@RestController +public class SequenceController { +// +// @Autowired +// private SeqRepo seqRepo; +// +//// add data +// @PostMapping("/seq") +// public ResponseEntity post(@RequestBody Sequence j) { +// +// Sequence save = seqRepo.save(j); +// return new ResponseEntity<>(save, HttpStatus.OK); +// +// } +// +//// update data +// @PutMapping("/seq/{id}") +// public ResponseEntity update(@PathVariable Long id, @RequestBody Sequence j) { +// Sequence get = seqRepo.findById(id).get(); +// +// get.setCr_prefix(j.getCr_prefix()); +// get.setDate_format(j.getDate_format()); +// get.setIn_prefix(j.getIn_prefix()); +// get.setSequence_size(j.getSequence_size()); +// get.setPr_prefix(j.getPr_prefix()); +// get.setStating_no(j.getStating_no()); +// get.setCurrent_no(j.getCurrent_no()); +// get.setDemonstration(j.getDemonstration()); +// get.setImplementation(j.getImplementation()); +// get.setSequence_code(j.getSequence_code()); +// get.setSequence_name(j.getSequence_name()); +// get.setStating_no(j.getStating_no()); +// get.setSuffix(j.getSuffix()); +// +// Sequence save = seqRepo.save(get); +// return new ResponseEntity<>(save, HttpStatus.OK); +// +// } +// +// // get by id +// @GetMapping("/seq/{id}") +// public ResponseEntity get(@PathVariable Long id) { +// +// Sequence get = seqRepo.findById(id).get(); +// return new ResponseEntity<>(get, HttpStatus.OK); +// +// } +// +// // get all +// @GetMapping("/seq") +// public List getdetails() { +// List get = seqRepo.findAll(); +// return get; +// } +// +// // delete by id +// @DeleteMapping("/seq/{id}") +// public void delete_by_id(@PathVariable Long id) { +// seqRepo.deleteById(id); +// +// } + + + + + + @Autowired + private SeqRepo seqRepo; + + @Autowired + private SequenceService service; + + + @PostMapping("/seq") + public ResponseEntity Savedata(@RequestBody Sequence data) { +// AppUser loggedInUser = userService.getLoggedInUser(); +// Long userId = loggedInUser.getUserId(); +// data.setAccountId(userId); + service.Savedata(data); + return ResponseEntity.ok().build(); + } + + + //create sequence-series + @PostMapping("create") + public ResponseEntity createSequence( + @RequestBody Sequence seq + ) + { + Sequence old = seqRepo.findByPrefixAndSuffix(seq.getPrefix(), seq.getSuffix()).orElse(null); + if(old != null){ + String error = "\nPrefix: " + seq.getPrefix() + "\nSuffix: " + seq.getSuffix(); + return ResponseEntity.status(HttpStatus.CONFLICT).body("Sequence already exists with "+error); + } + + return new ResponseEntity(service.createSequence(seq), HttpStatus.CREATED); + } + + //Testing sequence generation + @GetMapping("/seq/test") + public String generate( + @RequestParam String pre, + @RequestParam(defaultValue = "#{T(java.time.Year).now().toString()}") String suf + ) + { + System.out.println(suf); + return service.GenerateSequence(pre,suf); + } + + + //update Data + @PutMapping("/seq/{id}") + public ResponseEntity updateSequence( + @PathVariable Long id, + @RequestBody Sequence seq + ) { + Sequence old = seqRepo.findById(id).orElse(null); + + if (old != null) { + old.setSequence_size(seq.getSequence_size()); + old.setStarting_no(seq.getStarting_no()); + old.setCurrent_no(seq.getCurrent_no()); + old.setDemonstration(seq.getDemonstration()); + old.setSequence_code(seq.getSequence_code()); + old.setSequence_name(seq.getSequence_name()); + old.setSuffix(seq.getSuffix()); + old.setPrefix(seq.getPrefix()); + old.setSeperator(seq.getSeperator()); + + Sequence savedSequence = seqRepo.save(old); + return new ResponseEntity<>(savedSequence, HttpStatus.OK); + } else { + return new ResponseEntity<>(HttpStatus.NOT_FOUND); + } + } + // get by id + @GetMapping("/seq/{id}") + public ResponseEntity get( + @PathVariable Long id + ) { + + Sequence get = seqRepo.findById(id).get(); + return new ResponseEntity<>(get, HttpStatus.OK); + + } + + // get all + @GetMapping("/seq") + public List getdetails() { + List get = seqRepo.findAll(); + return get; + } + + // delete by id + @DeleteMapping("/seq/{id}") + public void delete_by_id(@PathVariable Long id) { + seqRepo.deleteById(id); + + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/SequenceGenerator/Entity/Sequence.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/SequenceGenerator/Entity/Sequence.java new file mode 100644 index 0000000..c418611 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/SequenceGenerator/Entity/Sequence.java @@ -0,0 +1,78 @@ +package com.realnet.SequenceGenerator.Entity; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; + +import lombok.Data; + +@Data +@Entity +public class Sequence { + +// @Id +// @GeneratedValue(strategy = GenerationType.IDENTITY) +// private Long id; +// +// private int stating_no; +// +// private int current_no; +// +// private String date_format; +// +// private String sequence_size; +// +// private String in_prefix; +// private String pr_prefix; +// +// private String seperator; +// +// private String cr_prefix; +// +// private String sequence_name; +// +// private String sequence_code; +// +// private String implementation; +// +// private String suffix; +// private String demonstration; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + private String sequence_name; + private Integer sequence_size; + private Integer starting_no; + private Integer current_no; + private String prefix; + private String seperator; + private String sequence_code; + private String suffix; + + private String demonstration; + + public Sequence(Long id, String sequence_name, Integer sequence_size, Integer stating_no, Integer current_no, String prefix, String seperator, String sequence_code, String suffix, String demonstration) { + this.id = id; + this.sequence_name = sequence_name; + this.sequence_size = sequence_size; + this.starting_no = stating_no; + this.current_no = current_no; + this.prefix = prefix; + this.seperator = seperator; + this.sequence_code = sequence_code; + this.suffix = suffix; + this.demonstration = demonstration; + } + + public Sequence() { + this.sequence_name = "RIS-Seq"; + this.sequence_size = 5; + this.starting_no = 1; + this.current_no = 1; + this.prefix = "RIS"; + this.seperator = "/"; + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/SequenceGenerator/Service/SequenceService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/SequenceGenerator/Service/SequenceService.java new file mode 100644 index 0000000..56203f1 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/SequenceGenerator/Service/SequenceService.java @@ -0,0 +1,123 @@ +package com.realnet.SequenceGenerator.Service; + +import java.text.DateFormat; +import java.text.DecimalFormat; +import java.text.SimpleDateFormat; +import java.util.Date; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.realnet.SequenceGenerator.Entity.Sequence; +import com.realnet.SequenceGenerator.repo.SeqRepo; + +@Service +public class SequenceService { + +// +// @Autowired +// private SeqRepo seqRepo; +// +// public String GenerateSequence(String name, Long id) { +// +// String prefix ="PR"; +// int i =1; +// String format = ""; +// +// Sequence s = seqRepo.findById(id).get(); +// +// int starting_no = s.getStating_no(); +// String date_format = s.getDate_format(); +// String digit = s.getSequence_size(); +// String seperator = s.getSeperator(); +// int current_no = s.getCurrent_no(); +// +// if (name.equalsIgnoreCase("in_prefix")) { +// prefix=s.getIn_prefix(); +// } +// if (name.equalsIgnoreCase("pr_prefix")) { +// prefix=s.getPr_prefix(); +// } +// if (name.equalsIgnoreCase("cr_prefix")) { +// prefix=s.getCr_prefix(); +// } +// +// Date date = new Date(); +// +//// DateFormat dateFormat = new SimpleDateFormat("yyyy-MM"); +// DateFormat dateFormat = new SimpleDateFormat(date_format); +// +// String format2 = dateFormat.format(date); +// +//// final DecimalFormat decimalFormat = new DecimalFormat("0000"); +// final DecimalFormat decimalFormat = new DecimalFormat(digit); +// +// if (current_no != 0) { +// format = decimalFormat.format(current_no); +// +// }else { +// format = decimalFormat.format(starting_no); +// +// } +// +// String str = prefix + seperator + format2 + seperator + format; +// +// s.setCurrent_no(starting_no+1); +// s.setDemonstration(str); +// seqRepo.save(s); +// return str; +// } + + + @Autowired + private SeqRepo seqRepo; + + public Sequence createSequence(Sequence seq){ + return seqRepo.save(seq); + } + + + public Sequence Savedata(Sequence data) { + return seqRepo.save(data); + } + + public String GenerateSequence(String pre) { + return GenerateSequence(pre, String.valueOf(java.time.Year.now())); + } + + public String GenerateSequence(String pre, String suf) { + Sequence seq = seqRepo.findByPrefixAndSuffix(pre,suf).orElse(null); + + if(seq == null){ + return "Given Prefix: " + pre + " and Suffix: "+ suf + + "\nDoes not exist try creating the sequence first...."; + } + + String prefix = seq.getPrefix(); + Integer seq_size = seq.getSequence_size(); + + //Current Number Building Logic + if(seq.getCurrent_no() == null) { + seq.setCurrent_no(seq.getStarting_no()); + } + String current_no = String.valueOf( seq.getCurrent_no()+1 ); + if(seq_size == null) seq_size = 5; + while(current_no.length() < seq_size){ + current_no = "0" + current_no; + } + + String suffix = seq.getSuffix(); + String sep = seq.getSeperator(); + + //--- final Sequence --- + String new_seq = prefix + sep + current_no + sep + suffix; + seq.setDemonstration(new_seq); + + // Saving Current-Sequence-State into DataBase + seq.setCurrent_no(seq.getCurrent_no()+1); + seqRepo.save(seq); + return new_seq; + } + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/SequenceGenerator/repo/SeqRepo.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/SequenceGenerator/repo/SeqRepo.java new file mode 100644 index 0000000..9c657c5 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/SequenceGenerator/repo/SeqRepo.java @@ -0,0 +1,15 @@ +package com.realnet.SequenceGenerator.repo; + +import java.util.Optional; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +import com.realnet.SequenceGenerator.Entity.Sequence; +@Repository +public interface SeqRepo extends JpaRepository { + + + + Optional findByPrefixAndSuffix(String pre, String suf); +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/WhoColumn/Extension.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/WhoColumn/Extension.java new file mode 100644 index 0000000..6e63351 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/WhoColumn/Extension.java @@ -0,0 +1,34 @@ +package com.realnet.WhoColumn; + + +import lombok.*; +import javax.persistence.*; + +import org.springframework.data.jpa.domain.support.AuditingEntityListener; + +@Data +@MappedSuperclass +@EntityListeners(AuditingEntityListener.class) +public class Extension extends Who_column { + /** + * + */ + private static final long serialVersionUID = 1L; + + private String extn1; + private String extn2; + private String extn3; + private String extn4; + private String extn5; + private String extn6; + private String extn7; + private String extn8; + private String extn9; + private String extn10; + private String extn11; + private String extn12; + private String extn13; + private String extn14; + private String extn15; + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/WhoColumn/Who_column.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/WhoColumn/Who_column.java new file mode 100644 index 0000000..0fd69bb --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/WhoColumn/Who_column.java @@ -0,0 +1,45 @@ +package com.realnet.WhoColumn; + +import java.io.Serializable; +import java.util.Date; + +import javax.persistence.Column; +import javax.persistence.EntityListeners; +import javax.persistence.MappedSuperclass; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; + +import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.annotation.LastModifiedDate; +import org.springframework.data.jpa.domain.support.AuditingEntityListener; + +import lombok.Data; + +@Data +@MappedSuperclass +@EntityListeners(AuditingEntityListener.class) +public class Who_column implements Serializable { + + private static final long serialVersionUID = 1L; + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "CREATED_AT", nullable = false, updatable = false) + @CreatedDate + private Date createdAt; + + // @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime createdAt; + + @Column(name = "CREATED_BY", updatable = false) + private Long createdBy; + + @Column(name = "UPDATED_BY") + private Long updatedBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "UPDATED_AT", nullable = false) + @LastModifiedDate + private Date updatedAt; + + @Column(name = "ACCOUNT_ID") + private Long accountId; + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/api_registery/Controllers/Api_registery_headerController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/api_registery/Controllers/Api_registery_headerController.java new file mode 100644 index 0000000..37379ad --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/api_registery/Controllers/Api_registery_headerController.java @@ -0,0 +1,75 @@ +package com.realnet.api_registery.Controllers; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.api_registery.Entity.Api_registery_header; +import com.realnet.api_registery.Services.Api_registery_headerService; + +@RequestMapping(value = "/Api_registery_header") +//@CrossOrigin("*") +@RestController +public class Api_registery_headerController { + @Autowired + private Api_registery_headerService Service; + + @Value("${projectPath}") + private String projectPath; + + @PostMapping("/Api_registery_header") + public Api_registery_header Savedata(@RequestBody Api_registery_header data) { + Api_registery_header save = Service.Savedata(data); + + return save; + } + + @PutMapping("/Api_registery_header/{id}") + public Api_registery_header update(@RequestBody Api_registery_header data, @PathVariable Long id) { + Api_registery_header update = Service.update(data, id); + return update; + } + +// get all with pagination + @GetMapping("/Api_registery_header/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + + @GetMapping("/Api_registery_header") + public List getdetails() { + List get = Service.getdetails(); + return get; + } + + @GetMapping("/Api_registery_header/{id}") + public Api_registery_header getdetailsbyId(@PathVariable Long id) { + Api_registery_header get = Service.getdetailsbyId(id); + return get; + } + + @DeleteMapping("/Api_registery_header/{id}") + public void delete_by_id(@PathVariable Long id) { + Service.delete_by_id(id); + + } + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/api_registery/Controllers/Api_registery_lineController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/api_registery/Controllers/Api_registery_lineController.java new file mode 100644 index 0000000..6bfd0f9 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/api_registery/Controllers/Api_registery_lineController.java @@ -0,0 +1,82 @@ +package com.realnet.api_registery.Controllers; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.api_registery.Entity.Api_registery_line; +import com.realnet.api_registery.Services.Api_registery_lineService; + +@RequestMapping(value = "/Api_registery_line") +//@CrossOrigin("*") +@RestController +public class Api_registery_lineController { + @Autowired + private Api_registery_lineService Service; + + @Value("${projectPath}") + private String projectPath; + + @PostMapping("/Api_registery_line") + public Api_registery_line Savedata(@RequestBody Api_registery_line data) { + Api_registery_line save = Service.Savedata(data); + + return save; + } + + @PutMapping("/Api_registery_line/{id}") + public Api_registery_line update(@RequestBody Api_registery_line data, @PathVariable Integer id) { + Api_registery_line update = Service.update(data, id); + return update; + } + +// get all with pagination + @GetMapping("/Api_registery_line/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + + @GetMapping("/Api_registery_line") + public List getdetails() { + List get = Service.getdetails(); + return get; + } + + @GetMapping("/Api_registery_line/{id}") + public Api_registery_line getdetailsbyId(@PathVariable Integer id) { + Api_registery_line get = Service.getdetailsbyId(id); + return get; + } + + @DeleteMapping("/Api_registery_line/{id}") + public void delete_by_id(@PathVariable Integer id) { + Service.delete_by_id(id); + + } + +// get all by header id + @GetMapping("/header/Api_registery_line/{header_id}") + public List getallbyheaderId(@PathVariable Long header_id) { + List get = Service.getLinesbyHeaderid(header_id); + return get; + } + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/api_registery/Controllers/GeneratetokenController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/api_registery/Controllers/GeneratetokenController.java new file mode 100644 index 0000000..6686419 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/api_registery/Controllers/GeneratetokenController.java @@ -0,0 +1,50 @@ +package com.realnet.api_registery.Controllers; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.realnet.api_registery.Entity.Token_registery; +import com.realnet.api_registery.Services.GeneratetokenService; + +@RestController +@RequestMapping(value = "/apiregistery") +public class GeneratetokenController { + + @Autowired + private GeneratetokenService generatetokenService; + + @PostMapping("/generateToken") + public String generatetoken(@RequestParam String token_name) throws JsonProcessingException { + + String token = generatetokenService.generatetoken(token_name); + + return token; + + } + + @GetMapping("/getall") + public List getall() { + + List getall = generatetokenService.getall(); + + return getall; + + } + + @DeleteMapping("/delete") + public void delete(@PathVariable Integer id) { + + generatetokenService.delete(id); + + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/api_registery/Entity/Api_registery_header.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/api_registery/Entity/Api_registery_header.java new file mode 100644 index 0000000..2082334 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/api_registery/Entity/Api_registery_header.java @@ -0,0 +1,23 @@ +package com.realnet.api_registery.Entity; + +import lombok.*; +import com.realnet.WhoColumn.Extension; +import javax.persistence.*; +import java.time.LocalDateTime; +import java.util.*; + +@Entity +@Data +public class Api_registery_header extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String table_name; + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/api_registery/Entity/Api_registery_line.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/api_registery/Entity/Api_registery_line.java new file mode 100644 index 0000000..67a978b --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/api_registery/Entity/Api_registery_line.java @@ -0,0 +1,27 @@ +package com.realnet.api_registery.Entity; + +import lombok.*; +import com.realnet.WhoColumn.Extension; +import javax.persistence.*; +import java.time.LocalDateTime; +import java.util.*; + +@Entity +@Data +public class Api_registery_line extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + + private String url; + + private String method; + + private Long header_id; + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/api_registery/Entity/Token_registery.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/api_registery/Entity/Token_registery.java new file mode 100644 index 0000000..e1bcfb6 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/api_registery/Entity/Token_registery.java @@ -0,0 +1,26 @@ +package com.realnet.api_registery.Entity; + +import lombok.*; +import com.realnet.WhoColumn.Extension; +import javax.persistence.*; +import java.time.LocalDateTime; +import java.util.*; + +@Entity +@Data +public class Token_registery extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + + private String token_name; + + @Lob + private String token; + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/api_registery/Repository/Api_registery_headerRepository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/api_registery/Repository/Api_registery_headerRepository.java new file mode 100644 index 0000000..cbe6bcb --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/api_registery/Repository/Api_registery_headerRepository.java @@ -0,0 +1,13 @@ +package com.realnet.api_registery.Repository; + + +import org.springframework.data.jpa.repository.JpaRepository; + +import org.springframework.stereotype.Repository; + + +import com.realnet.api_registery.Entity.Api_registery_header; + +@Repository +public interface Api_registery_headerRepository extends JpaRepository { +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/api_registery/Repository/Api_registery_lineRepository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/api_registery/Repository/Api_registery_lineRepository.java new file mode 100644 index 0000000..548ddc6 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/api_registery/Repository/Api_registery_lineRepository.java @@ -0,0 +1,17 @@ +package com.realnet.api_registery.Repository; + +import java.util.List; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.stereotype.Repository; + +import com.realnet.api_registery.Entity.Api_registery_line; + +@Repository +public interface Api_registery_lineRepository extends JpaRepository { + + @Query(value = "select * from api_registery_line where header_id=?1", nativeQuery = true) + List getLinesbyheaderid(Long header_id); + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/api_registery/Repository/Token_registery_Repository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/api_registery/Repository/Token_registery_Repository.java new file mode 100644 index 0000000..c3d89eb --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/api_registery/Repository/Token_registery_Repository.java @@ -0,0 +1,17 @@ +package com.realnet.api_registery.Repository; + +import java.util.List; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.stereotype.Repository; + +import com.realnet.api_registery.Entity.Token_registery; + +@Repository +public interface Token_registery_Repository extends JpaRepository { + + @Query(value = "select * from token_registery where created_by=?1", nativeQuery = true) + + List getallbycreatedby(Long createdby); +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/api_registery/Services/Api_registery_headerService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/api_registery/Services/Api_registery_headerService.java new file mode 100644 index 0000000..3239189 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/api_registery/Services/Api_registery_headerService.java @@ -0,0 +1,59 @@ +package com.realnet.api_registery.Services; + +import java.util.List; +import java.util.Optional; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Service; + +import com.realnet.api_registery.Entity.Api_registery_header; +import com.realnet.api_registery.Repository.Api_registery_headerRepository; +import com.realnet.exceptions.ResourceNotFoundException; + +@Service +public class Api_registery_headerService { + @Autowired + private Api_registery_headerRepository Repository; + + public Api_registery_header Savedata(Api_registery_header data) { + + Api_registery_header save = Repository.save(data); + return save; + } + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll(page); + } + + public List getdetails() { + return (List) Repository.findAll(); + } + + public Api_registery_header getdetailsbyId(Long id) { + return Repository.findById(id).get(); + } + + public void delete_by_id(Long id) { + Repository.deleteById(id); + } + + public Api_registery_header update(Api_registery_header data, Long id) { + Optional old1 = Repository.findById(id); + + if (old1.isPresent()) { + + Api_registery_header old = old1.get(); + + old.setTable_name(data.getTable_name()); + + final Api_registery_header test = Repository.save(old); + return test; + } else { + throw new ResourceNotFoundException("not found"); + } + + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/api_registery/Services/Api_registery_lineService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/api_registery/Services/Api_registery_lineService.java new file mode 100644 index 0000000..c7a3777 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/api_registery/Services/Api_registery_lineService.java @@ -0,0 +1,67 @@ +package com.realnet.api_registery.Services; + +import java.util.List; +import java.util.Optional; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Service; + +import com.realnet.api_registery.Entity.Api_registery_line; +import com.realnet.api_registery.Repository.Api_registery_lineRepository; +import com.realnet.exceptions.ResourceNotFoundException; + +@Service +public class Api_registery_lineService { + @Autowired + private Api_registery_lineRepository Repository; + + public Api_registery_line Savedata(Api_registery_line data) { + + Api_registery_line save = Repository.save(data); + return save; + } + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll(page); + } + + public List getdetails() { + return (List) Repository.findAll(); + } + +// get lines by header id + public List getLinesbyHeaderid(Long header_id) { + + List list = Repository.getLinesbyheaderid(header_id); + return list; + } + + public Api_registery_line getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + public void delete_by_id(Integer id) { + Repository.deleteById(id); + } + + public Api_registery_line update(Api_registery_line data, Integer id) { + Optional old1 = Repository.findById(id); + + if (old1.isPresent()) { + Api_registery_line old = old1.get(); + old.setUrl(data.getUrl()); + + old.setMethod(data.getMethod()); + + old.setHeader_id(data.getHeader_id()); + + final Api_registery_line test = Repository.save(old); + return test; + } else { + throw new ResourceNotFoundException("not found"); + } + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/api_registery/Services/GeneratetokenService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/api_registery/Services/GeneratetokenService.java new file mode 100644 index 0000000..5401fff --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/api_registery/Services/GeneratetokenService.java @@ -0,0 +1,122 @@ +package com.realnet.api_registery.Services; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpEntity; +import org.springframework.http.HttpHeaders; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; +import org.springframework.stereotype.Service; +import org.springframework.web.client.RestTemplate; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import com.realnet.api_registery.Entity.Token_registery; +import com.realnet.api_registery.Repository.Token_registery_Repository; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; + +@Service +public class GeneratetokenService { + + @Autowired + private AppUserServiceImpl userServiceImpl; + + @Autowired + private BCryptPasswordEncoder bcryptEncoder; + + @Autowired + private Token_registery_Repository token_registery_Repository; + + public String generatetoken(String toekn_name) throws JsonProcessingException { + + AppUser loggedInUser = userServiceImpl.getLoggedInUser(); + + String username = loggedInUser.getUsername(); + + String userPassw = loggedInUser.getUserPassw(); + + StringBuilder builder = new StringBuilder(); + + builder.append( + "{\n" + " \"email\" :\"" + username + "\",\n" + " \"password\" : \"" + userPassw + "\"\n" + "}"); + + String url = "http://localhost:9292"; + String repo = "/token/session"; + + // ADD DATA IN GITEA + + System.out.println(builder.toString()); + + String job_url = url + repo; + + RestTemplate restTemplate = new RestTemplate(); + + String resourceUrl = job_url; + HttpHeaders headers = getHeaders(); + HttpEntity request = new HttpEntity(builder.toString(), headers); + + ResponseEntity res = restTemplate.postForEntity(resourceUrl, request, String.class); + Object object = res.getBody(); + + ObjectMapper mapper = new ObjectMapper(); + String str = mapper.writeValueAsString(object); + + JsonParser parser = new JsonParser(); + JsonElement element = parser.parse(str); + + JsonObject obj = element.getAsJsonObject(); + JsonObject item = obj.get("item").getAsJsonObject(); + + String token = item.get("token").getAsString(); + + Token_registery token_registery = new Token_registery(); + token_registery.setToken(token); + token_registery.setToken_name(toekn_name); + token_registery.setCreatedBy(loggedInUser.getUserId()); + + System.out.println("token is == " + token); + + return token; + + } + + public List getall() { + AppUser loggedInUser = userServiceImpl.getLoggedInUser(); + + Long userId = loggedInUser.getUserId(); + + List list = token_registery_Repository.getallbycreatedby(userId); + + return list; + + } + + public void delete(Integer id) { + + token_registery_Repository.deleteById(id); + + } + + private HttpHeaders getHeaders() { + HttpHeaders headers = new HttpHeaders(); + headers.set("Content-Type", MediaType.APPLICATION_JSON_VALUE); + headers.set("Accept", MediaType.APPLICATION_JSON_VALUE); + return headers; + } + + public ResponseEntity GET(String get) { + RestTemplate restTemplate = new RestTemplate(); + + ResponseEntity u = restTemplate.getForEntity(get, Object.class); + + return u; + + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/config/AppConfig.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/config/AppConfig.java new file mode 100644 index 0000000..cad8884 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/config/AppConfig.java @@ -0,0 +1,39 @@ +package com.realnet.config; + +import org.modelmapper.ModelMapper; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; +import com.realnet.logging.NoLogging; + +@Configuration +public class AppConfig { +// @Bean +// public HibernateJpaSessionFactoryBean sessionFactory() { +// return new HibernateJpaSessionFactoryBean(); +// } + + @NoLogging + @Bean + public ModelMapper modelMapper() { + return new ModelMapper(); + } + + @Bean + public MappingJackson2HttpMessageConverter mappingJackson2HttpMessageConverter() { + ObjectMapper mapper = new ObjectMapper(); + mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false); + MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter(mapper); + return converter; + } + + @Bean + public ObjectMapper objectMapper() { + return new ObjectMapper().disable(SerializationFeature.FAIL_ON_EMPTY_BEANS); + } + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/config/CorsFilter.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/config/CorsFilter.java new file mode 100644 index 0000000..1fd68ff --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/config/CorsFilter.java @@ -0,0 +1,56 @@ +package com.realnet.config; + +import java.io.IOException; + +import javax.servlet.FilterChain; +import javax.servlet.FilterConfig; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.realnet.logging.NoLogging; + + +public class CorsFilter implements javax.servlet.Filter { + @NoLogging + @Override + public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { + HttpServletResponse res = (HttpServletResponse) response; + HttpServletRequest req = (HttpServletRequest) request; + + res.setHeader("Access-Control-Allow-Origin", "*"); + res.setHeader("Access-Control-Allow-Credentials", "true"); + res.setHeader("Access-Control-Allow-Methods", "GET, POST, DELETE, PUT, OPTIONS"); + res.setHeader("Access-Control-Max-Age", "3600"); + res.setHeader("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept, Accept-Encoding, Accept-Language, Host, Referer, Connection, User-Agent, authorization, sw-useragent, sw-version"); + //res.setHeader("Access-Control-Allow-Headers", "Access-Control-Allow-Headers, Origin, Accept, X-Requested-With, Content-Type, Access-Control-Request-Method, Access-Control-Request-Headers"); + // Just REPLY OK if request method is OPTIONS for CORS (pre-flight) + if ( req.getMethod().equals("OPTIONS") ) { + res.setStatus(HttpServletResponse.SC_OK); + return; + } + chain.doFilter(request, response); + } + +// public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException { +// System.out.println("Filtering on..........................................................."); +// HttpServletResponse response = (HttpServletResponse) res; +// response.setHeader("Access-Control-Allow-Origin", "*"); +// response.setHeader("Access-Control-Allow-Credentials", "true"); +// response.setHeader("Access-Control-Allow-Methods", "POST, GET, PUT, OPTIONS, DELETE"); +// response.setHeader("Access-Control-Max-Age", "3600"); +// response.setHeader("Access-Control-Allow-Headers", "X-Requested-With, Content-Type, Authorization, Origin, Accept, Access-Control-Request-Method, Access-Control-Request-Headers"); +// +// chain.doFilter(req, res); +//} + + @NoLogging + @Override + public void destroy() {} + + @NoLogging + @Override + public void init(FilterConfig filterConfig) throws ServletException {} +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/config/EmailService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/config/EmailService.java new file mode 100644 index 0000000..78a7a49 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/config/EmailService.java @@ -0,0 +1,80 @@ +package com.realnet.config; + +import java.io.IOException; + +import javax.mail.MessagingException; +import javax.mail.internet.MimeMessage; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.mail.MailException; +import org.springframework.mail.SimpleMailMessage; +import org.springframework.mail.javamail.JavaMailSender; +import org.springframework.mail.javamail.MimeMessageHelper; +import org.springframework.stereotype.Service; + +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@Service +public class EmailService { + @Autowired + private JavaMailSender mailSender; + + public void sendSimpleMessage(String from, String to, String subject, String text) throws MailException { + SimpleMailMessage message = new SimpleMailMessage(); + log.debug("email to sent.."); + // message.setFrom(from); + message.setTo(to); + message.setSubject(subject); + message.setText(text); + mailSender.send(message); + log.debug("email sent successfully"); + } + + public void sendEmailWithAttachment(String to, String subject, String text) throws MessagingException, IOException { + + MimeMessage msg = mailSender.createMimeMessage(); + + // true = multipart message + MimeMessageHelper helper = new MimeMessageHelper(msg, true); + log.debug("email to sent.."); + helper.setTo(to); + + helper.setSubject(subject); + + // default = text/plain + // helper.setText("Check attachment for image!"); + + // true = text/html + // helper.setText("

Check attachment for image!

", true); + + helper.setText(text, true); + + // hard coded a file path + // FileSystemResource file = new FileSystemResource(new + // File("path/android.png")); + // helper.addAttachment("my_photo.png", new ClassPathResource("android.png")); + mailSender.send(msg); + log.debug("email sent successfully"); + } + + public void constructEmail(String em, String subject, String url) { + SimpleMailMessage email = new SimpleMailMessage(); + email.setSubject(subject); + email.setText(url); + email.setTo(em); + mailSender.send(email); + + } + + // FOR ADD USER VIA ADMIN + public void sendEmail(String sendTo, String subject, String body) { + SimpleMailMessage email = new SimpleMailMessage(); + email.setSubject(subject); + email.setText(body); + email.setTo(sendTo); + mailSender.send(email); + + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/config/HttpLoggingFilter.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/config/HttpLoggingFilter.java new file mode 100644 index 0000000..0db3a18 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/config/HttpLoggingFilter.java @@ -0,0 +1,521 @@ +//package com.realnet.config; +// +//import java.io.BufferedReader; +//import java.io.ByteArrayInputStream; +//import java.io.ByteArrayOutputStream; +//import java.io.File; +//import java.io.FileWriter; +//import java.io.IOException; +//import java.io.InputStream; +//import java.io.InputStreamReader; +//import java.io.OutputStream; +//import java.io.PrintWriter; +//import java.nio.file.FileSystems; +//import java.nio.file.Path; +//import java.nio.file.Paths; +//import java.text.DateFormat; +//import java.text.SimpleDateFormat; +//import java.util.Collection; +//import java.util.Date; +//import java.util.Enumeration; +//import java.util.HashMap; +//import java.util.Locale; +//import java.util.Map; +// +//import javax.servlet.Filter; +//import javax.servlet.FilterChain; +//import javax.servlet.FilterConfig; +//import javax.servlet.ReadListener; +//import javax.servlet.ServletException; +//import javax.servlet.ServletInputStream; +//import javax.servlet.ServletOutputStream; +//import javax.servlet.ServletRequest; +//import javax.servlet.ServletResponse; +//import javax.servlet.WriteListener; +//import javax.servlet.http.Cookie; +//import javax.servlet.http.HttpServletRequest; +//import javax.servlet.http.HttpServletRequestWrapper; +//import javax.servlet.http.HttpServletResponse; +//import javax.servlet.http.HttpSession; +// +//import org.apache.commons.io.output.TeeOutputStream; +//import org.slf4j.Logger; +//import org.slf4j.LoggerFactory; +//import org.springframework.beans.factory.ObjectFactory; +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.stereotype.Component; +//import org.springframework.web.context.request.RequestContextHolder; +//import org.springframework.web.context.request.ServletRequestAttributes; +// +//import com.realnet.logging1.service.LoggingService; +//import com.realnet.users.entity1.AppUser; +//import com.realnet.users.service1.AppUserServiceImpl; +// +// +// +//@Component +//public class HttpLoggingFilter implements Filter{ +// public static StringBuilder logInfo; +// public static boolean logged=false; +// private final Logger LOGGER = LoggerFactory.getLogger(getClass()); +// public static String sessionLogging = "no"; +// @Autowired +// ObjectFactory httpSessionFactory; +// private AppUserServiceImpl appUserServiceImpl; +// private LoggingService loggingService; +// +// public HttpLoggingFilter(ObjectFactory httpSessionFactory, AppUserServiceImpl appUserServiceImpl, +// LoggingService loggingService) { +// super(); +// this.httpSessionFactory = httpSessionFactory; +// this.appUserServiceImpl = appUserServiceImpl; +// this.loggingService=loggingService; +// } +// +// @Override +// public void init(FilterConfig filterConfig) throws ServletException { +// } +// +// @Override +// public void doFilter(ServletRequest request, ServletResponse response, +// FilterChain chain) throws IOException, ServletException { +// try { +// HttpServletRequest httpServletRequest = (HttpServletRequest) request; +// HttpServletResponse httpServletResponse = (HttpServletResponse) response; +// +// Map requestMap = this.getParameters(httpServletRequest); +// BufferedRequestWrapper bufferedRequest = new BufferedRequestWrapper( +// httpServletRequest); +// BufferedResponseWrapper bufferedResponse = new BufferedResponseWrapper( +// httpServletResponse); +// Date d = new Date(); +// DateFormat simple =new SimpleDateFormat("dd MMM yyyy HH:mm:ss"); +// String timeStamp = simple.format(d); +// String servletPath = httpServletRequest.getServletPath(); +// final StringBuilder logMessage = new StringBuilder( +// "["+timeStamp+"]") +// .append("REST Request - ").append("[HTTP METHOD:") +// .append(httpServletRequest.getMethod()) +// .append("] [PATH INFO:") +// .append(servletPath) +// .append("] [REQUEST PARAMETERS:").append(requestMap) +// .append("] [REQUEST BODY:") +// .append(bufferedRequest.getRequestBody()) +// .append("] [REMOTE ADDRESS:") +// .append(httpServletRequest.getRemoteAddr()).append("]"); +// +// logInfo=logMessage; +// +// chain.doFilter(bufferedRequest, bufferedResponse); +// +// if(!servletPath.startsWith("/token/") || !servletPath.startsWith("/api/")) +// { +// if(httpSessionFactory.getObject().getAttribute("generate_log")==null) { +// Long id = appUserServiceImpl.getLoggedInUser().getUserId(); +// if(loggingService.getOne(id)!=null) { +// httpSessionFactory.getObject().setAttribute("generate_log",loggingService.getOne(id).getGenerateLog()); +// httpSessionFactory.getObject().setAttribute("generate_log",loggingService.getOne(id).getLogLevel()); +// httpSessionFactory.getObject().setAttribute("generate_log",loggingService.getOne(id).getLogFileName()); +// }else { +// httpSessionFactory.getObject().setAttribute("generate_log","N"); +// } +// +// } +// if(!httpSessionFactory.getObject().getAttribute("generate_log").equals("N")) { +// try { +// logMessage.append(" [RESPONSE:").append(bufferedResponse.getContent()).append("]"); +// } catch (Exception ex) { +// System.out.println(ex); +// } +// System.out.println(httpSessionFactory.getObject().getAttribute("LogginLevel")); +// if (httpSessionFactory.getObject().getAttribute("LogginLevel").equals("info")) { +// AppUser u = appUserServiceImpl.getLoggedInUser(); +// if (u != null) { +// Path root = FileSystems.getDefault().getPath("").toAbsolutePath(); +// Path filePath = Paths.get(root.toString(),"logs",httpSessionFactory.getObject().getAttribute("LogFileName").toString()); +// File f=filePath.toFile(); +// // File f = new File("/home/jboss/EAP-7.1.0/logs/sysadmin2_5463783.log"); +// FileWriter fw = new FileWriter(f,true); +// logInfo = logMessage; +// fw.write(logInfo.toString() + "\n"); +// fw.close(); +// +// } +// } else if (httpSessionFactory.getObject().getAttribute("LogginLevel").equals("debug") && logged==false) { +// AppUser u = appUserServiceImpl.getLoggedInUser(); +// if (u != null) { +// Path root = FileSystems.getDefault().getPath("").toAbsolutePath(); +// Path filePath = Paths.get(root.toString(),"logs",httpSessionFactory.getObject().getAttribute("LogFileName").toString()); +// File f=filePath.toFile(); +// // File f = new File("/home/jboss/EAP-7.1.0/logs/sysadmin2_5463783.log"); +// FileWriter fw = new FileWriter(f,true); +// logInfo = logMessage; +// fw.write(logInfo.toString() + "\n"); +// fw.close(); +// } +// +// } else { +// +// } +// } +// } +// +// } catch (Exception a) { +// throw a; +// } +// +// } +// +// +// +// private Map getParameters(HttpServletRequest request) { +// Map typesafeRequestMap = new HashMap(); +// Enumeration requestParamNames = request.getParameterNames(); +// while (requestParamNames.hasMoreElements()) { +// String requestParamName = (String) requestParamNames.nextElement(); +// String requestParamValue; +// if (requestParamName.equalsIgnoreCase("password")) { +// requestParamValue = "****"; +// } else { +// requestParamValue = request.getParameter(requestParamName); +// } +// typesafeRequestMap.put(requestParamName, requestParamValue); +// } +// return typesafeRequestMap; +// } +// +// @Override +// public void destroy() { +// } +// +// private static final class BufferedRequestWrapper extends +// HttpServletRequestWrapper { +// +// private ByteArrayInputStream bais = null; +// private ByteArrayOutputStream baos = null; +// private BufferedServletInputStream bsis = null; +// private byte[] buffer = null; +// +// public BufferedRequestWrapper(HttpServletRequest req) +// throws IOException { +// super(req); +// // Read InputStream and store its content in a buffer. +// InputStream is = req.getInputStream(); +// this.baos = new ByteArrayOutputStream(); +// byte buf[] = new byte[1024]; +// int read; +// while ((read = is.read(buf)) > 0) { +// this.baos.write(buf, 0, read); +// } +// this.buffer = this.baos.toByteArray(); +// is.close(); +// } +// +// @Override +// public ServletInputStream getInputStream() { +// this.bais = new ByteArrayInputStream(this.buffer); +// this.bsis = new BufferedServletInputStream(this.bais); +// return this.bsis; +// } +// +// String getRequestBody() throws IOException { +// BufferedReader reader = new BufferedReader(new InputStreamReader( +// this.getInputStream())); +// String line = null; +// StringBuilder inputBuffer = new StringBuilder(); +// do { +// line = reader.readLine(); +// if (null != line) { +// inputBuffer.append(line.trim()); +// } +// } while (line != null); +// reader.close(); +// return inputBuffer.toString().trim(); +// } +// +// } +// +// private static final class BufferedServletInputStream extends +// ServletInputStream { +// +// private ByteArrayInputStream bais; +// +// public BufferedServletInputStream(ByteArrayInputStream bais) { +// this.bais = bais; +// } +// +// @Override +// public int available() { +// return this.bais.available(); +// } +// +// @Override +// public int read() { +// return this.bais.read(); +// } +// +// @Override +// public int read(byte[] buf, int off, int len) { +// return this.bais.read(buf, off, len); +// } +// +// @Override +// public boolean isFinished() { +// return false; +// } +// +// @Override +// public boolean isReady() { +// return true; +// } +// +// @Override +// public void setReadListener(ReadListener readListener) { +// +// } +// } +// +// public class TeeServletOutputStream extends ServletOutputStream { +// +// private final TeeOutputStream targetStream; +// +// public TeeServletOutputStream(OutputStream one, OutputStream two) { +// targetStream = new TeeOutputStream(one, two); +// } +// +// @Override +// public void write(int arg0) throws IOException { +// this.targetStream.write(arg0); +// } +// +// public void flush() throws IOException { +// super.flush(); +// this.targetStream.flush(); +// } +// +// public void close() throws IOException { +// super.close(); +// this.targetStream.close(); +// } +// +// @Override +// public boolean isReady() { +// return false; +// } +// +// @Override +// public void setWriteListener(WriteListener writeListener) { +// +// } +// } +// +// +// +//public class BufferedResponseWrapper implements HttpServletResponse { +// +// HttpServletResponse original; +// TeeServletOutputStream tee; +// ByteArrayOutputStream bos; +// +// public BufferedResponseWrapper(HttpServletResponse response) { +// original = response; +// } +// +// public String getContent() { +// return bos.toString(); +// } +// +// public PrintWriter getWriter() throws IOException { +// return original.getWriter(); +// } +// +// public ServletOutputStream getOutputStream() throws IOException { +// if (tee == null) { +// bos = new ByteArrayOutputStream(); +// tee = new TeeServletOutputStream(original.getOutputStream(), +// bos); +// } +// return tee; +// +// } +// +// @Override +// public String getCharacterEncoding() { +// return original.getCharacterEncoding(); +// } +// +// @Override +// public String getContentType() { +// return original.getContentType(); +// } +// +// @Override +// public void setCharacterEncoding(String charset) { +// original.setCharacterEncoding(charset); +// } +// +// @Override +// public void setContentLength(int len) { +// original.setContentLength(len); +// } +// +// @Override +// public void setContentLengthLong(long l) { +// original.setContentLengthLong(l); +// } +// +// @Override +// public void setContentType(String type) { +// original.setContentType(type); +// } +// +// @Override +// public void setBufferSize(int size) { +// original.setBufferSize(size); +// } +// +// @Override +// public int getBufferSize() { +// return original.getBufferSize(); +// } +// +// @Override +// public void flushBuffer() throws IOException { +// tee.flush(); +// } +// +// @Override +// public void resetBuffer() { +// original.resetBuffer(); +// } +// +// @Override +// public boolean isCommitted() { +// return original.isCommitted(); +// } +// +// @Override +// public void reset() { +// original.reset(); +// } +// +// @Override +// public void setLocale(Locale loc) { +// original.setLocale(loc); +// } +// +// @Override +// public Locale getLocale() { +// return original.getLocale(); +// } +// +// @Override +// public void addCookie(Cookie cookie) { +// original.addCookie(cookie); +// } +// +// @Override +// public boolean containsHeader(String name) { +// return original.containsHeader(name); +// } +// +// @Override +// public String encodeURL(String url) { +// return original.encodeURL(url); +// } +// +// @Override +// public String encodeRedirectURL(String url) { +// return original.encodeRedirectURL(url); +// } +// +// @SuppressWarnings("deprecation") +// @Override +// public String encodeUrl(String url) { +// return original.encodeUrl(url); +// } +// +// @SuppressWarnings("deprecation") +// @Override +// public String encodeRedirectUrl(String url) { +// return original.encodeRedirectUrl(url); +// } +// +// @Override +// public void sendError(int sc, String msg) throws IOException { +// original.sendError(sc, msg); +// } +// +// @Override +// public void sendError(int sc) throws IOException { +// original.sendError(sc); +// } +// +// @Override +// public void sendRedirect(String location) throws IOException { +// original.sendRedirect(location); +// } +// +// @Override +// public void setDateHeader(String name, long date) { +// original.setDateHeader(name, date); +// } +// +// @Override +// public void addDateHeader(String name, long date) { +// original.addDateHeader(name, date); +// } +// +// @Override +// public void setHeader(String name, String value) { +// original.setHeader(name, value); +// } +// +// @Override +// public void addHeader(String name, String value) { +// original.addHeader(name, value); +// } +// +// @Override +// public void setIntHeader(String name, int value) { +// original.setIntHeader(name, value); +// } +// +// @Override +// public void addIntHeader(String name, int value) { +// original.addIntHeader(name, value); +// } +// +// @Override +// public void setStatus(int sc) { +// original.setStatus(sc); +// } +// +// @SuppressWarnings("deprecation") +// @Override +// public void setStatus(int sc, String sm) { +// original.setStatus(sc, sm); +// } +// +// @Override +// public String getHeader(String arg0) { +// return original.getHeader(arg0); +// } +// +// @Override +// public Collection getHeaderNames() { +// return original.getHeaderNames(); +// } +// +// @Override +// public Collection getHeaders(String arg0) { +// return original.getHeaders(arg0); +// } +// +// @Override +// public int getStatus() { +// return original.getStatus(); +// } +// +// } +//} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/config/JWTConstant.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/config/JWTConstant.java new file mode 100644 index 0000000..2994c47 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/config/JWTConstant.java @@ -0,0 +1,22 @@ +package com.realnet.config; + +public class JWTConstant { + + // private static final long VALIDITY_TIME_MS = 10 * 24 * 60 * 60 * 1000;// 10 + // days Validity + public static final long VALIDITY_TIME_MS = 2 * 60 * 60 * 1000; // 2 hours validity + + public static final long ACCESS_TOKEN_VALIDITY_SECONDS = 30 * 24 * 60 * 60; + public static final String SECRET_KEY = "realnet"; + public static final String TOKEN_PREFIX = "Bearer "; + public static final String HEADER_STRING = "Authorization"; + public static final String AUTHORITIES_KEY = "scopes"; + + + public static final String JWT_ILLEGAL_ARGUMENT_MESSAGE = "An error occured during getting username from token"; + public static final String JWT_EXPIRED_MESSAGE = "The token is expired and not valid anymore"; + public static final String JWT_SIGNATURE_MESSAGE = "Authentication Failed. Username or Password not valid."; + public static final String UNAUTHORIZED_MESSAGE = "You are not authorized to view the resource"; + public static final String FORBIDDEN_MESSAGE = "You don't have the right to access to this resource"; + public static final String INVALID_DATA_MESSAGE = "One or many parameters in the request's body are invalid"; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/config/JwtAuthenticationEntryPoint.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/config/JwtAuthenticationEntryPoint.java new file mode 100644 index 0000000..12b4ddb --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/config/JwtAuthenticationEntryPoint.java @@ -0,0 +1,37 @@ +package com.realnet.config; + +import java.io.IOException; +import java.io.Serializable; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.security.core.AuthenticationException; +import org.springframework.security.web.AuthenticationEntryPoint; +import org.springframework.stereotype.Component; + +import com.realnet.logging.NoLogging; +import com.realnet.logging.SecurityNoLogging; + +@Component +public class JwtAuthenticationEntryPoint implements AuthenticationEntryPoint, Serializable { + + /** + * + */ + private static final long serialVersionUID = 1L; + + /* + * This is invoked when user tries to access a secured REST resource without supplying any credentials + * We should just send a 401 Unauthorized response because there is no 'login page' to redirect to + * Here you can place any message you want + * */ + @NoLogging + @Override + public void commence(HttpServletRequest request, HttpServletResponse response, + AuthenticationException authException) throws IOException { + + //response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Unauthorized"); + response.sendError(HttpServletResponse.SC_UNAUTHORIZED, authException.getMessage()); + } +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/config/JwtAuthenticationFilter.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/config/JwtAuthenticationFilter.java new file mode 100644 index 0000000..d5b889a --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/config/JwtAuthenticationFilter.java @@ -0,0 +1,104 @@ +package com.realnet.config; + +import java.io.IOException; + +import javax.servlet.FilterChain; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpMethod; +import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.security.core.userdetails.UserDetails; +import org.springframework.security.core.userdetails.UserDetailsService; +import org.springframework.security.web.authentication.WebAuthenticationDetailsSource; +import org.springframework.web.filter.OncePerRequestFilter; + +import com.realnet.logging.NoLogging; + +import io.jsonwebtoken.ExpiredJwtException; +import io.jsonwebtoken.SignatureException; + +public class JwtAuthenticationFilter extends OncePerRequestFilter { + + private static final Logger logger = LoggerFactory.getLogger(JwtAuthenticationFilter.class); + + @Autowired + private UserDetailsService userDetailsService; + + @Autowired + private TokenProvider jwtTokenUtil; + + + + protected void configure(HttpSecurity http) throws Exception + { + http + .csrf().disable() + .authorizeRequests() + .antMatchers(HttpMethod.OPTIONS,"/path/to/allow").permitAll()//allow CORS option calls + .antMatchers("/resources/**").permitAll() + .anyRequest().authenticated() + .and() + .formLogin() + .and() + .httpBasic(); + } + + + + + + + @NoLogging + @Override + protected void doFilterInternal(HttpServletRequest req, HttpServletResponse res, FilterChain chain) + throws IOException, ServletException { + String header = req.getHeader(JWTConstant.HEADER_STRING); + //System.out.println("HEADER => {}" + header); + String username = null; + String email = null; + String authToken = null; + if (header != null && header.startsWith(JWTConstant.TOKEN_PREFIX)) { + authToken = header.replace(JWTConstant.TOKEN_PREFIX, ""); + try { + username = jwtTokenUtil.getUsernameFromToken(authToken); + //logger.info("getting username from token : {}" + username); + email = jwtTokenUtil.getEmailFromToken(authToken); + //logger.info("getting email from token : {}" + email); + //System.out.println("email => {}" + email); + + } catch (IllegalArgumentException e) { + logger.error("an error occured during getting username from token", e); + } catch (ExpiredJwtException e) { + logger.warn("the token is expired and not valid anymore", e); + } catch (SignatureException e) { + logger.error("Authentication Failed. Username or Password not valid."); + } + } else { + logger.warn("couldn't find bearer string, will ignore the header"); + } + //if (username != null && SecurityContextHolder.getContext().getAuthentication() == null) { + if (email != null && SecurityContextHolder.getContext().getAuthentication() == null) { + + UserDetails userDetails = userDetailsService.loadUserByUsername(email); + + if (jwtTokenUtil.validateToken(authToken, userDetails)) { + UsernamePasswordAuthenticationToken authentication = jwtTokenUtil.getAuthentication(authToken, + SecurityContextHolder.getContext().getAuthentication(), userDetails); + // UsernamePasswordAuthenticationToken authentication = new + // UsernamePasswordAuthenticationToken(userDetails, null, Arrays.asList(new + // SimpleGrantedAuthority("ROLE_ADMIN"))); + authentication.setDetails(new WebAuthenticationDetailsSource().buildDetails(req)); + logger.debug("authenticated user " + email + ", setting security context"); + SecurityContextHolder.getContext().setAuthentication(authentication); + } + } + chain.doFilter(req, res); + } +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/config/MessageSourceConfig.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/config/MessageSourceConfig.java new file mode 100644 index 0000000..ced005e --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/config/MessageSourceConfig.java @@ -0,0 +1,32 @@ +package com.realnet.config; + +import org.springframework.context.MessageSource; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.support.ReloadableResourceBundleMessageSource; +import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean; + +import com.realnet.logging.NoLogging; + +@Configuration +public class MessageSourceConfig { + + @NoLogging + @Bean + public MessageSource messageSource() { + ReloadableResourceBundleMessageSource messageSource + = new ReloadableResourceBundleMessageSource(); + + messageSource.setBasename("classpath:messages"); + messageSource.setDefaultEncoding("UTF-8"); + return messageSource; + } + @NoLogging + @Bean + public LocalValidatorFactoryBean getValidator() { + LocalValidatorFactoryBean bean = new LocalValidatorFactoryBean(); + bean.setValidationMessageSource(messageSource()); + return bean; + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/config/MyCommandLineRunner.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/config/MyCommandLineRunner.java new file mode 100644 index 0000000..de32e5e --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/config/MyCommandLineRunner.java @@ -0,0 +1,49 @@ +package com.realnet.config; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.CommandLineRunner; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Component; +import org.springframework.web.client.RestTemplate; + +import com.realnet.Builders.Services.BuilderService; + +@Component +public class MyCommandLineRunner implements CommandLineRunner { + + @Autowired + private BuilderService builderService; + + @Override + public void run(String... args) throws Exception { + + System.out.println("call command line runner..."); + if (args.length == 0) { + System.err.println("Usage: java -jar your-app.jar proj_id profile_id addString"); + builderService.callotherService(); + + System.out.println("call other service"); + + return; + } + if (args.length == 1) { + System.err.println("Usage: java -jar your-app.jar proj_id profile_id addString"); + builderService.callotherService(); + + System.out.println("call other service"); + + return; + } + + } + + public ResponseEntity GET(String get) { + RestTemplate restTemplate = new RestTemplate(); + + ResponseEntity u = restTemplate.getForEntity(get, Object.class); + + return u; + + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/config/SecurityConfig.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/config/SecurityConfig.java new file mode 100644 index 0000000..a483ef8 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/config/SecurityConfig.java @@ -0,0 +1,204 @@ +package com.realnet.config; + +import java.util.Arrays; +import java.util.Collections; +import java.util.concurrent.TimeUnit; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.info.ProjectInfoProperties.Build; +import org.springframework.boot.web.servlet.FilterRegistrationBean; +import org.springframework.cache.CacheManager; +import org.springframework.cache.caffeine.CaffeineCacheManager; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.http.HttpMethod; +import org.springframework.security.authentication.AuthenticationManager; +import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; +import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.builders.WebSecurity; +import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; +import org.springframework.security.config.http.SessionCreationPolicy; +import org.springframework.security.core.userdetails.UserDetailsService; +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; +import org.springframework.security.web.access.channel.ChannelProcessingFilter; +import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; +import org.springframework.web.cors.CorsConfiguration; +import org.springframework.web.cors.CorsConfigurationSource; +import org.springframework.web.cors.UrlBasedCorsConfigurationSource; + +import com.github.benmanes.caffeine.cache.Caffeine; +import com.realnet.logging.NoLogging; + + +/* + * @EnableGlobalMethodSecurity annotation is what enables the @PreAuthorize annotation. + * */ +@Configuration +@EnableWebSecurity +@EnableGlobalMethodSecurity(prePostEnabled = true) + +public class SecurityConfig extends WebSecurityConfigurerAdapter { + + + + @Autowired + private UserDetailsService userDetailsService; + + @Autowired + private JwtAuthenticationEntryPoint unauthorizedHandler; + + + ///// + + public void configure12(WebSecurity web) throws Exception { + web.ignoring().antMatchers(HttpMethod.OPTIONS, "/**"); + } + + + + + @Bean + protected CorsConfigurationSource corsConfigurationSource() { + final CorsConfiguration configuration = new CorsConfiguration(); + + configuration.setAllowedOrigins(Collections.singletonList("http://localhost:3000")); + configuration.setAllowedMethods(Arrays.asList("HEAD", "GET", "POST", "PUT", "DELETE", "PATCH")); + + // NOTE: setAllowCredentials(true) is important, + // otherwise, the value of the 'Access-Control-Allow-Origin' header in the response + // must not be the wildcard '*' when the request's credentials mode is 'include'. + configuration.setAllowCredentials(true); + + // NOTE: setAllowedHeaders is important! + // Without it, OPTIONS preflight request will fail with 403 Invalid CORS request + configuration.setAllowedHeaders(Arrays.asList( + "Authorization", + "Accept", + "Cache-Control", + "Content-Type", + "Origin", + "ajax", // <-- This is needed for jQuery's ajax request. + "x-csrf-token", + "x-requested-with" + )); + + final UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); + source.registerCorsConfiguration("/**", configuration); + return source; + } + + + protected void configure123(HttpSecurity http) throws Exception + { + http + .csrf().disable() + .authorizeRequests() + .antMatchers("/resources/**").permitAll() + .anyRequest().authenticated() + .and() + .formLogin() + .and() + .httpBasic() + .and() + .oauth2Login() + .and() + .cors(); + + } + + + + + + + @NoLogging + @Override + @Bean + public AuthenticationManager authenticationManagerBean() throws Exception { + return super.authenticationManagerBean(); + } + + @NoLogging + @Autowired + public void globalUserDetails(AuthenticationManagerBuilder auth) throws Exception { + auth.userDetailsService(userDetailsService).passwordEncoder(encoder()); + } + + @NoLogging + @Bean + public JwtAuthenticationFilter authenticationTokenFilterBean() throws Exception { + return new JwtAuthenticationFilter(); + } + + @NoLogging + @Override + public void configure(WebSecurity web) throws Exception { + // Filters will not get executed for the resources + web.ignoring().antMatchers("/", "/resources/**", "/static/**", "/public/**", "/webui/**", "/h2-console/**", + "/configuration/**", "/swagger-ui/**", "/swagger-resources/**", "/webjars/**", "/api-docs", + "/api-docs/**", "/v2/api-docs/**", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/**/*.png", + "/**/*.jpg", "/**/*.gif", "/**/*.svg", "/**/*.ico", "/**/*.ttf", "/**/*.woff", "/**/*.otf"); + } + + +// } + + @NoLogging + @Override + protected void configure(HttpSecurity http) throws Exception { + http.csrf().disable() + // Add CORS Filter //http.cors().and().csrf().disable(). + .addFilterBefore(new CorsFilter(), ChannelProcessingFilter.class).authorizeRequests() + .antMatchers("/token/**").permitAll() + .antMatchers("/log2/**").permitAll() + .antMatchers("/api/**").permitAll() +// .antMatchers("/SqlworkbenchSqlcont/**").hasRole("ADMIN") + .anyRequest().authenticated() + .and().exceptionHandling() + .authenticationEntryPoint(unauthorizedHandler).and().sessionManagement() + .sessionCreationPolicy(SessionCreationPolicy.IF_REQUIRED); + http.addFilterBefore(authenticationTokenFilterBean(), UsernamePasswordAuthenticationFilter.class); + + + } + + /* + * http.csrf().disable().exceptionHandling().authenticationEntryPoint( + * unauthorizedHandler).and() + * .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS). + * and().authorizeRequests() .antMatchers("/token/**", + * "/signup").permitAll().antMatchers(HttpMethod.OPTIONS, "/**").permitAll() + * .anyRequest().authenticated(); + * + * http.addFilterBefore(authenticationTokenFilterBean(), + * UsernamePasswordAuthenticationFilter.class); + */ + + /* + * If You want to store encoded password in your databases and authenticate user + * based on encoded password then uncomment the below method and provde an + * encoder + */ + @NoLogging + @Bean + public BCryptPasswordEncoder encoder() { + return new BCryptPasswordEncoder(); + } + + + + @Bean + public Caffeine caffeineConfig() { + return Caffeine.newBuilder().expireAfterWrite(60, TimeUnit.MINUTES); + } + @Bean + public CacheManager cacheManager(Caffeine caffeine) { + CaffeineCacheManager caffeineCacheManager = new CaffeineCacheManager(); + caffeineCacheManager.setCaffeine(caffeine); + return caffeineCacheManager; + } + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/config/SwaggerConfig.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/config/SwaggerConfig.java new file mode 100644 index 0000000..6ca6c0c --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/config/SwaggerConfig.java @@ -0,0 +1,132 @@ +package com.realnet.config; + +import static com.google.common.collect.Lists.newArrayList; + +import java.util.Arrays; +import java.util.List; + +import org.joda.time.LocalDate; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.RequestMethod; + +import com.fasterxml.classmate.TypeResolver; +import com.realnet.logging.NoLogging; + +import springfox.documentation.builders.ApiInfoBuilder; +import springfox.documentation.builders.PathSelectors; +import springfox.documentation.builders.RequestHandlerSelectors; +import springfox.documentation.builders.ResponseMessageBuilder; +import springfox.documentation.service.ApiInfo; +import springfox.documentation.service.ApiKey; +import springfox.documentation.service.AuthorizationScope; +import springfox.documentation.service.SecurityReference; +import springfox.documentation.spi.DocumentationType; +import springfox.documentation.spi.service.contexts.SecurityContext; +import springfox.documentation.spring.web.plugins.Docket; +import springfox.documentation.swagger2.annotations.EnableSwagger2; + +@Configuration +@EnableSwagger2 +public class SwaggerConfig { + + @Autowired + private TypeResolver typeResolver; + + public static final String AUTHORIZATION_HEADER = "Authorization"; + public static final String DEFAULT_INCLUDE_PATTERN = "/api/.*"; + + @NoLogging + private ApiKey apiKey() { + // return new ApiKey("Authorization", "", "header"); // <<< === Create a Header + //return new ApiKey("JWT", "Authorization", "header"); + // (We are createing header named "Authorization" here) + return new ApiKey("JWT", AUTHORIZATION_HEADER, "header"); + + } + + // This path will be called when swagger is loaded first time to get a token + /* + * @Bean public UiConfiguration uiConfig() { return new + * UiConfiguration("session"); } + */ + + @NoLogging + private SecurityContext securityContext() { + return SecurityContext.builder().securityReferences(defaultAuth()).build(); + } + + @NoLogging + private List defaultAuth() { + AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything"); + AuthorizationScope[] authorizationScopes = new AuthorizationScope[1]; + authorizationScopes[0] = authorizationScope; + return Arrays.asList(new SecurityReference("JWT", authorizationScopes)); + } + +// ApiInfo apiInfo() { +// return new ApiInfoBuilder() +// .title("API Reference") +// .version("1.0.0") +// .build(); +// } + + @NoLogging + ApiInfo realItApiInfo() { + return new ApiInfoBuilder() + .title("RealIt APIs") + .version("1.0.0") + .build(); + } + +// @Bean +// public Docket customImplementation() { +// return new Docket(DocumentationType.SWAGGER_2) +// .groupName("public") +// .apiInfo(apiInfo()) +// .securityContexts(Arrays.asList(securityContext())) +// .securitySchemes(newArrayList(apiKey())) +// .select() +// .paths(PathSelectors.any()) +// // .apis(RequestHandlerSelectors.any()) // If you want to list all the apis +// // including springboots own +// .apis(RequestHandlerSelectors.basePackage("com.app.api")) +// .build() +// .pathMapping("/") +// .useDefaultResponseMessages(false) +// .directModelSubstitute(LocalDate.class, String.class) +// .genericModelSubstitutes(ResponseEntity.class); +// } + + @NoLogging + @Bean + public Docket realItCustomeImplementation() { + return new Docket(DocumentationType.SWAGGER_2) + .groupName("realit") + .apiInfo(realItApiInfo()) + .securityContexts(Arrays.asList(securityContext())) + .securitySchemes(newArrayList(apiKey())) + .select() + .paths(PathSelectors.any()) + .apis(RequestHandlerSelectors.basePackage("com.realnet")).build().pathMapping("/") + .useDefaultResponseMessages(false) + .globalResponseMessage(RequestMethod.GET, newArrayList( + new ResponseMessageBuilder() + .code(500) + .message("Internal Server Error").build(), + //.responseModel(new ModelRef("Error")).build(), + new ResponseMessageBuilder() + .code(403) + .message("Forbidden!").build(), + new ResponseMessageBuilder() + .code(400) + .message("Bad Request").build() + //.responseModel(new ModelRef("Error")).build() + )) + .directModelSubstitute(LocalDate.class, String.class) + .genericModelSubstitutes(ResponseEntity.class); + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/config/TokenProvider.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/config/TokenProvider.java new file mode 100644 index 0000000..fd3a47f --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/config/TokenProvider.java @@ -0,0 +1,135 @@ +package com.realnet.config; + +import java.io.Serializable; +import java.util.Arrays; +import java.util.Collection; +import java.util.Date; +import java.util.List; +import java.util.function.Function; +import java.util.stream.Collectors; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.GrantedAuthority; +import org.springframework.security.core.authority.SimpleGrantedAuthority; +import org.springframework.security.core.userdetails.UserDetails; +import org.springframework.stereotype.Component; + +import com.realnet.logging.NoLogging; + +import io.jsonwebtoken.Claims; +import io.jsonwebtoken.Jws; +import io.jsonwebtoken.JwtParser; +import io.jsonwebtoken.Jwts; +import io.jsonwebtoken.SignatureAlgorithm; + +@Component +public class TokenProvider implements Serializable { +// private static final Logger logger = LoggerFactory.getLogger(TokenProvider.class); + + /** + * + */ + private static final long serialVersionUID = 1L; + + // get subject (sub) from token + @NoLogging + public String getUsernameFromToken(String token) { + return getClaimFromToken(token, Claims::getSubject); + } + + @NoLogging + public String getEmailFromToken(String token) { + String email = null; + try { + Claims claims = getAllClaimsFromToken(token); + email = claims.getSubject(); + } catch (Exception e) { + email = null; + } + // logger.info("email = {} ", email); + return email; + } + + @NoLogging + public List getRolesFromToken(String token) { + List roles = null; + try { + Claims claims = getAllClaimsFromToken(token); + roles = Arrays.asList((String) claims.get(JWTConstant.AUTHORITIES_KEY)); + // logger.info("roles = {} ", roles); + } catch (Exception e) { + roles = null; + } + return roles; + } + + // get expiration (exp) from token + public Date getExpirationDateFromToken(String token) { + return getClaimFromToken(token, Claims::getExpiration); + } + + @NoLogging + public T getClaimFromToken(String token, Function claimsResolver) { + final Claims claims = getAllClaimsFromToken(token); + return claimsResolver.apply(claims); + } + + @NoLogging + private Claims getAllClaimsFromToken(String token) { + return Jwts.parser().setSigningKey(JWTConstant.SECRET_KEY).parseClaimsJws(token).getBody(); + } + + @NoLogging + private Boolean isTokenExpired(String token) { + final Date expiration = getExpirationDateFromToken(token); + return expiration.before(new Date()); + } + + @NoLogging + public String generateToken(Authentication authentication) { + final String authorities = authentication.getAuthorities().stream().map(GrantedAuthority::getAuthority) + .collect(Collectors.joining(",")); + // logger.info("authorities = {} ", authorities); + final List AuthorityList = authentication.getAuthorities().stream().map(GrantedAuthority::getAuthority) + .collect(Collectors.toList()); + //logger.info("authentication.getName() = {} ", authentication.getName()); + //logger.info("Authority List = {}", AuthorityList); + return Jwts.builder().setSubject(authentication.getName()) // USER NAME OR EMAIL + .claim(JWTConstant.AUTHORITIES_KEY, authorities) // ROLES + .signWith(SignatureAlgorithm.HS256, JWTConstant.SECRET_KEY).setIssuedAt(new Date(System.currentTimeMillis())) + .setExpiration(new Date(System.currentTimeMillis() + JWTConstant.ACCESS_TOKEN_VALIDITY_SECONDS * 1000)).compact(); + } + + @NoLogging + public Boolean validateToken(String token, UserDetails userDetails) { + // CustomUserDetails user = (CustomUserDetails) userDetails; + // System.out.println("validateToken -> jwtUser : " + user); + // return (username.equals(user.getUsername()) && !isTokenExpired(token)); + + // final String username = getUsernameFromToken(token); + final String email = getEmailFromToken(token); + return (email.equals(userDetails.getUsername()) && !isTokenExpired(token)); + + } + + @NoLogging + UsernamePasswordAuthenticationToken getAuthentication(final String token, final Authentication existingAuth, + final UserDetails userDetails) { + + final JwtParser jwtParser = Jwts.parser().setSigningKey(JWTConstant.SECRET_KEY); + + final Jws claimsJws = jwtParser.parseClaimsJws(token); + + final Claims claims = claimsJws.getBody(); + + final Collection authorities = Arrays + .stream(claims.get(JWTConstant.AUTHORITIES_KEY).toString().split(",")).map(SimpleGrantedAuthority::new) + .collect(Collectors.toList()); + + return new UsernamePasswordAuthenticationToken(userDetails, "", authorities); + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashboard_builder_authsec/Controllers/DashboardController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashboard_builder_authsec/Controllers/DashboardController.java new file mode 100644 index 0000000..08fab8f --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashboard_builder_authsec/Controllers/DashboardController.java @@ -0,0 +1,63 @@ +package com.realnet.dashboard_builder_authsec.Controllers; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.dashboard_builder_authsec.Entity.Dashboard; +import com.realnet.dashboard_builder_authsec.Services.DashboardService; + +@RequestMapping(value = "/Dashboard") +// @CrossOrigin("*") +@RestController +public class DashboardController { + @Autowired + private DashboardService Service; + + @Value("${projectPath}") + private String projectPath; + + public final String UPLOAD_DIREC = "/Files"; + + @PostMapping("/Dashboard") + public Dashboard Savedata(@RequestBody Dashboard data) { + Dashboard save = Service.Savedata(data); + + System.out.println(save); + return save; + } + + @PutMapping("/Dashboard/{id}") + public Dashboard update(@RequestBody Dashboard data, @PathVariable Integer id) { + Dashboard update = Service.update(data, id); + return update; + } + + @GetMapping("/Dashboard") + public List getdetails() { + List get = Service.getdetails(); + return get; + } + + @GetMapping("/Dashboard/{id}") + public Dashboard getdetailsbyId(@PathVariable Integer id) { + Dashboard get = Service.getdetailsbyId(id); + return get; + } + + @DeleteMapping("/Dashboard/{id}") + public void delete_by_id(@PathVariable Integer id) { + Service.delete_by_id(id); + + } + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashboard_builder_authsec/Entity/Dashboard.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashboard_builder_authsec/Entity/Dashboard.java new file mode 100644 index 0000000..0c70660 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashboard_builder_authsec/Entity/Dashboard.java @@ -0,0 +1,27 @@ +package com.realnet.dashboard_builder_authsec.Entity; + import lombok.*; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + @Entity + @Data + public class Dashboard extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String name; + +@Column(length = 5000) +private String model; + +private boolean isdashboard; + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashboard_builder_authsec/Entity/Extension.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashboard_builder_authsec/Entity/Extension.java new file mode 100644 index 0000000..ce6d181 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashboard_builder_authsec/Entity/Extension.java @@ -0,0 +1,34 @@ +package com.realnet.dashboard_builder_authsec.Entity; + import lombok.*; + +import lombok.*; +import javax.persistence.*; + +import org.springframework.data.jpa.domain.support.AuditingEntityListener; + +@Data +@MappedSuperclass +@EntityListeners(AuditingEntityListener.class) +public class Extension extends who_column { + /** + * + */ + private static final long serialVersionUID = 1L; + +private String extn1; + private String extn2; + private String extn3; + private String extn4; + private String extn5; + private String extn6; + private String extn7; + private String extn8; + private String extn9; + private String extn10; + private String extn11; + private String extn12; + private String extn13; + private String extn14; + private String extn15; + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashboard_builder_authsec/Entity/who_column.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashboard_builder_authsec/Entity/who_column.java new file mode 100644 index 0000000..a3a592a --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashboard_builder_authsec/Entity/who_column.java @@ -0,0 +1,46 @@ +package com.realnet.dashboard_builder_authsec.Entity; + import lombok.*; + import java.io.Serializable; +import java.util.Date; + +import javax.persistence.Column; +import javax.persistence.EntityListeners; +import javax.persistence.MappedSuperclass; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; + +import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.annotation.LastModifiedDate; +import org.springframework.data.jpa.domain.support.AuditingEntityListener; + +import lombok.Data; + +@Data +@MappedSuperclass +@EntityListeners(AuditingEntityListener.class) +public class who_column implements Serializable{ + + private static final long serialVersionUID = 1L; + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "CREATED_AT", nullable = false, updatable = false) + @CreatedDate + private Date createdAt; + + // @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime createdAt; + + + @Column(name = "CREATED_BY", updatable = false) + private Long createdBy; + + @Column(name = "UPDATED_BY") + private Long updatedBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "UPDATED_AT", nullable = false) + @LastModifiedDate + private Date updatedAt; + + @Column(name = "ACCOUNT_ID") + private Long accountId; + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashboard_builder_authsec/Repository/DashboardRepository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashboard_builder_authsec/Repository/DashboardRepository.java new file mode 100644 index 0000000..ad816bc --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashboard_builder_authsec/Repository/DashboardRepository.java @@ -0,0 +1,13 @@ +package com.realnet.dashboard_builder_authsec.Repository; + + +import org.springframework.data.jpa.repository.JpaRepository; + +import org.springframework.stereotype.Repository; + + +import com.realnet.dashboard_builder_authsec.Entity.Dashboard; + +@Repository +public interface DashboardRepository extends JpaRepository { +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashboard_builder_authsec/Services/DashboardService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashboard_builder_authsec/Services/DashboardService.java new file mode 100644 index 0000000..0a45ca7 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashboard_builder_authsec/Services/DashboardService.java @@ -0,0 +1,54 @@ +package com.realnet.dashboard_builder_authsec.Services; +import com.realnet.dashboard_builder_authsec.Repository.DashboardRepository; +import com.realnet.dashboard_builder_authsec.Entity.Dashboard;import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import com.realnet.SequenceGenerator.Service.SequenceService; + import org.springframework.stereotype.Service; + +@Service + public class DashboardService { +@Autowired +private DashboardRepository Repository; + + + + + + +public Dashboard Savedata(Dashboard data) { + + + + + + + return Repository.save(data); + } + + +public List getdetails() { + return (List) Repository.findAll(); + } + + +public Dashboard getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Dashboard update(Dashboard data,Integer id) { + Dashboard old = Repository.findById(id).get(); +old.setName(data.getName()); + +old.setModel(data.getModel()); + +old.setIsdashboard (data.isIsdashboard()); + +final Dashboard test = Repository.save(old); + return test;}} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/event_management/Controllers/Event_ManagementController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/event_management/Controllers/Event_ManagementController.java new file mode 100644 index 0000000..4c2689d --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/event_management/Controllers/Event_ManagementController.java @@ -0,0 +1,100 @@ +package com.realnet.event_management.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import org.springframework.beans.factory.annotation.*; +import com.realnet.event_management.Entity.Event_Management; +import com.realnet.event_management.Services.Event_ManagementService ; +@RequestMapping(value = "/Event_Management") + @CrossOrigin("*") +@RestController +public class Event_ManagementController { + @Autowired + private Event_ManagementService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + + + + + + + @PostMapping("/Event_Management") + public Event_Management Savedata(@RequestBody Event_Management data) { + Event_Management save = Service.Savedata(data) ; + + + + + + + + + + + + + + + return save; + } +@PutMapping("/Event_Management/{id}") + public Event_Management update(@RequestBody Event_Management data,@PathVariable Integer id ) { + Event_Management update = Service.update(data,id); + return update; + } +// get all with pagination + @GetMapping("/Event_Management/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Event_Management") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Event_Management") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Event_Management/{id}") + public Event_Management getdetailsbyId(@PathVariable Integer id ) { + Event_Management get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Event_Management/{id}") + public void delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + + } + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/event_management/Entity/Event_Management.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/event_management/Entity/Event_Management.java new file mode 100644 index 0000000..cbb9261 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/event_management/Entity/Event_Management.java @@ -0,0 +1,37 @@ +package com.realnet.event_management.Entity; + import lombok.*; +import com.realnet.WhoColumn.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + @Entity + @Data + public class Event_Management extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String practice_match; + +private String admin_name; + +private String ground; + +private String datetime; + +private String name; + + +@Column(length = 2000) +private String description; + +private boolean active; + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/event_management/Repository/Event_ManagementRepository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/event_management/Repository/Event_ManagementRepository.java new file mode 100644 index 0000000..2a9ed32 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/event_management/Repository/Event_ManagementRepository.java @@ -0,0 +1,13 @@ +package com.realnet.event_management.Repository; + + +import org.springframework.data.jpa.repository.JpaRepository; + +import org.springframework.stereotype.Repository; + + +import com.realnet.event_management.Entity.Event_Management; + +@Repository +public interface Event_ManagementRepository extends JpaRepository { +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/event_management/Services/Event_ManagementService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/event_management/Services/Event_ManagementService.java new file mode 100644 index 0000000..d4cb3be --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/event_management/Services/Event_ManagementService.java @@ -0,0 +1,86 @@ +package com.realnet.event_management.Services; +import com.realnet.event_management.Repository.Event_ManagementRepository; +import com.realnet.event_management.Entity.Event_Management;import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import com.realnet.SequenceGenerator.Service.SequenceService; +import com.realnet.Notification.Entity.NotificationService; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; + import org.springframework.stereotype.Service; + +@Service + public class Event_ManagementService { +@Autowired +private Event_ManagementRepository Repository; + + + + + + + + + + + + + + +public Event_Management Savedata(Event_Management data) { + + + + + + + + + + + + + + +Event_Management save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll(page); + } +public List getdetails() { + return (List) Repository.findAll(); + } + + +public Event_Management getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Event_Management update(Event_Management data,Integer id) { + Event_Management old = Repository.findById(id).get(); +old.setPractice_match(data.getPractice_match()); + +old.setAdmin_name(data.getAdmin_name()); + +old.setGround(data.getGround()); + +old.setDatetime(data.getDatetime()); + +old.setName(data.getName()); + +old.setDescription(data.getDescription()); + +old.setActive (data.isActive()); + +final Event_Management test = Repository.save(old); + return test;}} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/exceptions/InvalidUserDataException.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/exceptions/InvalidUserDataException.java new file mode 100644 index 0000000..6080b83 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/exceptions/InvalidUserDataException.java @@ -0,0 +1,12 @@ +package com.realnet.exceptions; + +public class InvalidUserDataException extends RuntimeException { + /** + * + */ + private static final long serialVersionUID = 1L; + + public InvalidUserDataException(String message) { + super(message); + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/exceptions/ResourceNotFoundException.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/exceptions/ResourceNotFoundException.java new file mode 100644 index 0000000..df4ba2d --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/exceptions/ResourceNotFoundException.java @@ -0,0 +1,14 @@ +package com.realnet.exceptions; + +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.ResponseStatus; + +@ResponseStatus(value = HttpStatus.NOT_FOUND) +public class ResourceNotFoundException extends RuntimeException { + private static final long serialVersionUID = 1L; + + public ResourceNotFoundException(String msg) { + super(msg); + } + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/exceptions/StorageException.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/exceptions/StorageException.java new file mode 100644 index 0000000..7326c1b --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/exceptions/StorageException.java @@ -0,0 +1,18 @@ +package com.realnet.exceptions; + +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.ResponseStatus; + +@ResponseStatus(value = HttpStatus.NOT_FOUND) +public class StorageException extends RuntimeException { + private static final long serialVersionUID = 1L; + + public StorageException(String message) { + super(message); + } + + public StorageException(String message, Throwable cause) { + super(message, cause); + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/controller/MainController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/controller/MainController.java new file mode 100644 index 0000000..956eec9 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/controller/MainController.java @@ -0,0 +1,17 @@ +package com.realnet.fnd.controller; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; + +import springfox.documentation.annotations.ApiIgnore; + +@ApiIgnore +@Controller // Dont use RestController as this method is mapping to a static file not a JSON +public class MainController { + + @GetMapping("/") + public String index() { + return "index.html"; + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/controller/Rn_DynamicTransactionController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/controller/Rn_DynamicTransactionController.java new file mode 100644 index 0000000..c52cf38 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/controller/Rn_DynamicTransactionController.java @@ -0,0 +1,119 @@ +package com.realnet.fnd.controller; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.validation.Valid; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.exceptions.ResourceNotFoundException; +import com.realnet.fnd.entity.Rn_Dynamic_Transaction; +import com.realnet.fnd.response.Rn_DynamicTransactionResponse; +import com.realnet.fnd.service.Rn_DynamicTransactionService; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; + +@RestController +@RequestMapping(value = "/api", produces = MediaType.APPLICATION_JSON_VALUE) +@Api(tags = { "Rn_Dynamic_Transaction" }) +public class Rn_DynamicTransactionController { + + @Autowired + private Rn_DynamicTransactionService rn_dynamicTransactionService; + +// @Autowired +// private TokenUtil tokenUtil; + + // GET ALL + @ApiOperation(value = "List of Dynamic Transaction", response = Rn_DynamicTransactionResponse.class) + @GetMapping("/dynamic_transaction/all") + public Rn_DynamicTransactionResponse getDynamicTx( + @RequestParam(value = "page", defaultValue = "0", required = false) int page, + @RequestParam(value = "size", defaultValue = "20", required = false) int size) { + + Rn_DynamicTransactionResponse resp = new Rn_DynamicTransactionResponse(); + Pageable paging = PageRequest.of(page, size); + Page result = rn_dynamicTransactionService.getAll(paging); + resp.setPageStats(result, true); + resp.setItems(result.getContent()); + return resp; + } + + // GET BY FROM ID (GRID) + @ApiOperation(value = "Get A Dynamic Transaction") + @GetMapping("/dynamic_transaction") + public ResponseEntity> getDynamicTxByFormId( + @RequestParam(value = "form_id") int form_id) { + List rn_dynamic_transaction = rn_dynamicTransactionService.getByFormId(form_id); + return ResponseEntity.ok().body(rn_dynamic_transaction); + } + + // SAVE + @ApiOperation(value = "Add A New Dynamic Transaction", response = Rn_DynamicTransactionResponse.class) + @PostMapping("/dynamic_transaction") + public ResponseEntity createDynamicTx( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, + @Valid @RequestBody Rn_Dynamic_Transaction rn_dynamic_transaction) { +// String userId = tokenUtil.getUserId(authToken); +// rn_dynamic_transaction.setCreatedBy(userId); +// rn_dynamic_transaction.setAccountId(userId); + Rn_Dynamic_Transaction savedRn_Dynamic_Transaction = rn_dynamicTransactionService.save(rn_dynamic_transaction); + if (savedRn_Dynamic_Transaction == null) { + throw new ResourceNotFoundException("Dynamic Transaction Is Not Saved"); + } + return ResponseEntity.status(HttpStatus.CREATED).body(savedRn_Dynamic_Transaction); + } + + // GET BY ID + @ApiOperation(value = "Get a Single Form", response = Rn_Dynamic_Transaction.class) + @GetMapping("/dynamic_transaction/{id}") + public ResponseEntity getById(@PathVariable(value = "id") int id, + @RequestParam(value = "form_id") int form_id) { + Rn_Dynamic_Transaction dynamicTransaction = rn_dynamicTransactionService.getByIdAndFormId(id, form_id); + return ResponseEntity.ok().body(dynamicTransaction); + } + + // UPDATE + @ApiOperation(value = "Update A Dynamic Transaction", response = Rn_Dynamic_Transaction.class) + @PutMapping("/dynamic_transaction/{id}") + public ResponseEntity updateDynamicTx( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, + @PathVariable(value = "id") int id, @RequestParam(value = "form_id") int form_id, + @Valid @RequestBody Rn_Dynamic_Transaction rn_dynamic_transaction) { +// String userId = tokenUtil.getUserId(authToken); +// rn_dynamic_transaction.setUpdatedBy(userId); + Rn_Dynamic_Transaction updatedDynamicTransaction = rn_dynamicTransactionService.updateByFormId(id, form_id, + rn_dynamic_transaction); + return ResponseEntity.status(HttpStatus.ACCEPTED).body(updatedDynamicTransaction); + } + + // DELETE + @DeleteMapping("/dynamic_transaction/{id}") + public ResponseEntity> deleteDynamicTx(@PathVariable(value = "id") int id) { + boolean deleted = rn_dynamicTransactionService.deleteById(id); + Map response = new HashMap<>(); + response.put("deleted", Boolean.TRUE); + // response.put("deleted", deleted); + return ResponseEntity.status(HttpStatus.OK).body(response); + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/controller/Rn_ExtensionController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/controller/Rn_ExtensionController.java new file mode 100644 index 0000000..8e03bb2 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/controller/Rn_ExtensionController.java @@ -0,0 +1,155 @@ +package com.realnet.fnd.controller; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.validation.Valid; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.FromExtensionJson.Entity.FromExtensionJson_t; +import com.realnet.FromExtensionJson.Services.FromExtensionJson_Service; +import com.realnet.exceptions.ResourceNotFoundException; +import com.realnet.fnd.entity.Rn_Ext_Fields; +import com.realnet.fnd.service.ExtFieldService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; + +@RestController +@RequestMapping(value = "/api", produces = MediaType.APPLICATION_JSON_VALUE) +@Api(tags = { "Extension Fields" }) +public class Rn_ExtensionController { + + @Value("${angularProjectPath}") + private String angularProjectPath; + + @Autowired + private ExtFieldService extFieldService; + + + @Autowired + private FromExtensionJson_Service formeExtensionJson_Service; + + @Autowired(required = false) + // private UserService userService; + private AppUserServiceImpl userService; + +// @Autowired +// private TokenUtil tokenUtil; + + // GET ALL + @ApiOperation(value = "List of Extensions") + @GetMapping("/extension") + public ResponseEntity> getExtensions() { + List result = extFieldService.getAll(); + return ResponseEntity.ok().body(result); + } + + // GET BY ID + @ApiOperation(value = "Get an Extension") + @GetMapping("/extension/{id}") + public ResponseEntity getExtensionById(@PathVariable(value = "id") int id) { + Rn_Ext_Fields rn_ext_fields = extFieldService.getById(id); + return ResponseEntity.ok().body(rn_ext_fields); + } + + // SAVE + @ApiOperation(value = "Add new Extension", response = Rn_Ext_Fields.class) + @PostMapping("/extension") + public ResponseEntity saveExtension( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, + @Valid @RequestBody Rn_Ext_Fields rn_ext_fields) { + // String userId = tokenUtil.getUserId(authToken); + AppUser loggedInUser = userService.getLoggedInUser(); + // rn_ext_fields.setCreated_by(loggedInUser.getUserId()); + rn_ext_fields.setAccount_id(loggedInUser.getAccount().getAccount_id()); + Rn_Ext_Fields savedRn_Ext_Fields = extFieldService.save(rn_ext_fields); + if (savedRn_Ext_Fields == null) { + throw new ResourceNotFoundException("Rn_Ext_Field is not saved"); + } + return ResponseEntity.status(HttpStatus.CREATED).body(savedRn_Ext_Fields); + } + + // UPDATE + @ApiOperation(value = "Update an Extension", response = Rn_Ext_Fields.class) + @PutMapping("/extension/{id}") + public ResponseEntity updateRn_Ext_Field( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, + @PathVariable(value = "id") int id, @Valid @RequestBody Rn_Ext_Fields rn_ext_fields) { +// String userId = tokenUtil.getUserId(authToken); +// // teacher.setAccountId(userId); +// rn_ext_fields.setUpdatedBy(userId); + Rn_Ext_Fields updatedRn_Ext_Field = extFieldService.updateById(id, rn_ext_fields); + return ResponseEntity.status(HttpStatus.ACCEPTED).body(updatedRn_Ext_Field); + } + + // DELETE + @DeleteMapping("/extension/{id}") + public ResponseEntity> deleteRn_Ext_Field(@PathVariable(value = "id") int id) { + boolean deleted = extFieldService.deleteById(id); + Map response = new HashMap<>(); + if (deleted) { + response.put("deleted", Boolean.TRUE); + return ResponseEntity.status(HttpStatus.OK).body(response); + } + return ResponseEntity.status(HttpStatus.NOT_FOUND).body(response); + } + +// @GetMapping("/lookup_values") +// public ResponseEntity> getLookUps() { +// List result = extFieldService.getLookupValues(); +// System.out.println(result); +// return ResponseEntity.ok().body(result); +// } +// +// @GetMapping("/datatypes") +// public ResponseEntity> getDataTypes() { +// List result = extFieldService.getDataTypeValues(); +// System.out.println(result); +// return ResponseEntity.ok().body(result); +// } + + @GetMapping("/extension_build/{formId}") + public ResponseEntity buildExtension(@RequestParam(value = "account_id", required = false) String account_id, + @RequestParam(value = "form_code", required = false) String form_code, @PathVariable Integer formId) { + + ArrayList list = new ArrayList<>(); + + System.out.println("Acc Id" + account_id + " Form Code = " + form_code); + String formCode = extFieldService.buildExtensionByFormCode(account_id, form_code,formId); + list.add(formCode); + Map res = new HashMap(); + res.put("build", true); + FromExtensionJson_t json_t = new FromExtensionJson_t(); + json_t.setAccount_id(account_id); + json_t.setForm_code(form_code); + + json_t.setJsonObject(formCode); + + formeExtensionJson_Service.Savedata(json_t); + + + return ResponseEntity.ok().body(list); + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/controller/Rn_Forms_Setup_Controller.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/controller/Rn_Forms_Setup_Controller.java new file mode 100644 index 0000000..4c7e642 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/controller/Rn_Forms_Setup_Controller.java @@ -0,0 +1,114 @@ +package com.realnet.fnd.controller; + +import java.util.HashMap; +import java.util.Map; + +import javax.validation.Valid; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.fnd.entity.Rn_Forms_Setup; +import com.realnet.fnd.response.Rn_Forms_SetupResponse; +import com.realnet.fnd.service.Rn_Forms_Setup_Service; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; + +@RestController +@RequestMapping(value = "/api", produces = MediaType.APPLICATION_JSON_VALUE) +@Api(tags = { "Rn_Forms_Setup" }) +public class Rn_Forms_Setup_Controller { + + @Autowired + private Rn_Forms_Setup_Service rn_forms_setup_service; + +// @Autowired +// private TokenUtil tokenUtil; + + // GET ALL + @ApiOperation(value = "List of Forms", response = Rn_Forms_SetupResponse.class) + @GetMapping("/form_setup") + public Rn_Forms_SetupResponse getForms( + @RequestParam(value = "page", defaultValue = "0", required = false) Integer page, + @RequestParam(value = "size", defaultValue = "20", required = false) Integer size) { + Rn_Forms_SetupResponse resp = new Rn_Forms_SetupResponse(); + Pageable paging = PageRequest.of(page, size); + Page result = rn_forms_setup_service.getAll(paging); + resp.setPageStats(result, true); + resp.setItems(result.getContent()); + return resp; + } + + // GET BY ID + @ApiOperation(value = "Get a Form", response = Rn_Forms_Setup.class) + @GetMapping("/form_setup/{id}") + public ResponseEntity getFormsById(@PathVariable(value = "id") int id) { + Rn_Forms_Setup rn_forms_setup = rn_forms_setup_service.getById(id); + return ResponseEntity.ok().body(rn_forms_setup); + } + + // SAVE + @ApiOperation(value = "Add A New Form", response = Rn_Forms_Setup.class) + @PostMapping("/form_setup") + public ResponseEntity createRn_Forms_Setup( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, + @Valid @RequestBody Rn_Forms_Setup rn_forms_setup) { +// String userId = tokenUtil.getUserId(authToken); +// rn_forms_setup.setCreatedBy(userId); +// rn_forms_setup.setAccountId(userId); + Rn_Forms_Setup savedRn_Forms_Setup = rn_forms_setup_service.save(rn_forms_setup); + return ResponseEntity.status(HttpStatus.CREATED).body(savedRn_Forms_Setup); + } + + // UPDATE + @ApiOperation(value = "Update A Form", response = Rn_Forms_Setup.class) + @PutMapping("/form_setup/{id}") + public ResponseEntity updateRn_Forms_Setup( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, + @PathVariable(value = "id") Integer id, @Valid @RequestBody Rn_Forms_Setup rn_forms_setup) { +// String userId = tokenUtil.getUserId(authToken); +// rn_forms_setup.setUpdatedBy(userId); + Rn_Forms_Setup updatedRn_Forms_Setup = rn_forms_setup_service.updateById(id, rn_forms_setup); + return ResponseEntity.status(HttpStatus.ACCEPTED).body(updatedRn_Forms_Setup); + } + + // DELETE + @DeleteMapping("/form_setup/{id}") + public ResponseEntity> deleteRn_Forms_Setup(@PathVariable(value = "id") Integer id) { + boolean deleted = rn_forms_setup_service.deleteById(id); + Map response = new HashMap<>(); + response.put("deleted", Boolean.TRUE); + // response.put("deleted", deleted); + return ResponseEntity.status(HttpStatus.OK).body(response); + } + + // BUILD DYNAMIC FORM + @GetMapping("/dynamic_form_build") + public ResponseEntity> buildDynamicForm(@RequestParam(value = "form_id", defaultValue = "0") int form_id) { + System.out.println("Dynamic form build form start"); + rn_forms_setup_service.buildDynamicForm(form_id); + Map response = new HashMap<>(); + response.put("deleted", Boolean.TRUE); + return ResponseEntity.status(HttpStatus.OK).body(response); + + } + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/controller/Rn_Function_Register_Controller.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/controller/Rn_Function_Register_Controller.java new file mode 100644 index 0000000..cc33c32 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/controller/Rn_Function_Register_Controller.java @@ -0,0 +1,105 @@ +package com.realnet.fnd.controller; + +import java.util.HashMap; +import java.util.Map; + +import javax.validation.Valid; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.fnd.entity.Rn_Function_Register; +import com.realnet.fnd.response.Rn_Function_Register_Response; +import com.realnet.fnd.service.Rn_Function_Register_Service; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; + +@RestController +@RequestMapping(value = "/api", produces = MediaType.APPLICATION_JSON_VALUE) +@Api(tags = { "Function Register" }) +public class Rn_Function_Register_Controller { + + @Autowired + private Rn_Function_Register_Service rn_menu_register_service; + +// @Autowired +// private TokenUtil tokenUtil; + + // GET ALL + @ApiOperation(value = "List of Functions", response = Rn_Function_Register_Response.class) + @GetMapping("/function-register") + public Rn_Function_Register_Response getFunctions( + @RequestParam(value = "page", defaultValue = "0", required = false) Integer page, + @RequestParam(value = "size", defaultValue = "20", required = false) Integer size) { + + // SORTED DATA + //Pageable paging = PageRequest.of(page, size, Sort.by("createdAt").descending()); + + Pageable paging = PageRequest.of(page, size); + Page result = rn_menu_register_service.getAll(paging); + Rn_Function_Register_Response resp = new Rn_Function_Register_Response(); + resp.setPageStats(result, true); + resp.setItems(result.getContent()); + return resp; + } + + // GET BY ID + @ApiOperation(value = "Get a Function", response = Rn_Function_Register.class) + @GetMapping("/function-register/{id}") + public ResponseEntity getFunctionById(@PathVariable(value = "id") Integer id) { + Rn_Function_Register rn_function_register = rn_menu_register_service.getById(id); + return ResponseEntity.ok().body(rn_function_register); + } + + // SAVE + @ApiOperation(value = "Add A New Function", response = Rn_Function_Register.class) + @PostMapping("/function-register") + public ResponseEntity createFunction( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, + @Valid @RequestBody Rn_Function_Register rn_function_register) { +// String userId = tokenUtil.getUserId(authToken); +// rn_function_register.setCreatedBy(userId); +// rn_function_register.setAccountId(userId); + Rn_Function_Register savedFunction = rn_menu_register_service.save(rn_function_register); + return ResponseEntity.status(HttpStatus.CREATED).body(savedFunction); + } + + // UPDATE + @ApiOperation(value = "Update A Function", response = Rn_Function_Register.class) + @PutMapping("/function-register/{id}") + public ResponseEntity updateFunction( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, + @PathVariable(value = "id") Integer id, @Valid @RequestBody Rn_Function_Register rn_function_register) { +// String userId = tokenUtil.getUserId(authToken); +// rn_function_register.setUpdatedBy(userId); + Rn_Function_Register updatedFunction = rn_menu_register_service.updateById(id, rn_function_register); + return ResponseEntity.status(HttpStatus.ACCEPTED).body(updatedFunction); + } + + // DELETE + @DeleteMapping("/function-register/{id}") + public ResponseEntity> deleteFunction(@PathVariable(value = "id") Integer id) { + boolean deleted = rn_menu_register_service.deleteById(id); + Map response = new HashMap<>(); + response.put("deleted", Boolean.TRUE); + // response.put("deleted", deleted); + return ResponseEntity.status(HttpStatus.OK).body(response); + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/controller/Rn_Main_Menu_Controller.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/controller/Rn_Main_Menu_Controller.java new file mode 100644 index 0000000..a753ba4 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/controller/Rn_Main_Menu_Controller.java @@ -0,0 +1,121 @@ +package com.realnet.fnd.controller; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.validation.Valid; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.fnd.entity.Rn_Main_Menu; +import com.realnet.fnd.response.Rn_Main_Menu_Response; +import com.realnet.fnd.service.Rn_Main_Menu_Service; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; + +@RestController +@RequestMapping(value = "/api", produces = MediaType.APPLICATION_JSON_VALUE) +@Api(tags = { "RealNet Menu" }) +public class Rn_Main_Menu_Controller { + + @Autowired + private Rn_Main_Menu_Service rn_main_menu_service; + +// @Autowired +// private TokenUtil tokenUtil; + + // GET ALL + @ApiOperation(value = "List of Menu", response = Rn_Main_Menu_Response.class) + @GetMapping("/realnet-menu") + public Rn_Main_Menu_Response getMenus( + @RequestParam(value = "page", defaultValue = "0", required = false) Integer page, + @RequestParam(value = "size", defaultValue = "20", required = false) Integer size) { + + // SORTED DATA : PageRequest.of(page, size,Sort.by("createdAt").descending()); + // UN-SORTED DATA : PageRequest.of(page, size); + + Pageable paging = PageRequest.of(page, size); + Page result = rn_main_menu_service.getAll(paging); + Rn_Main_Menu_Response resp = new Rn_Main_Menu_Response(); + resp.setPageStats(result, true); + resp.setItems(result.getContent()); + return resp; + } + + // GET BY ID + @ApiOperation(value = "Get a Menu", response = Rn_Main_Menu.class) + @GetMapping("/realnet-menu/{id}") + public ResponseEntity getMenuById(@PathVariable(value = "id") Integer id) { + Rn_Main_Menu rn_menu_register = rn_main_menu_service.getById(id); + return ResponseEntity.ok().body(rn_menu_register); + } + + // getByAccountId + // *** NEED MODIFICATION *** + // GET BY ACCOUNT_ID + @ApiOperation(value = "Get Menu By Accout Id", response = Rn_Main_Menu.class) + @GetMapping("/realnet-menu/user-menu") + public ResponseEntity> getMenuByAccountId( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken) { +// String accountId = tokenUtil.getUserId(authToken); +// System.out.println("get Menu List by Account Id --> " + accountId); + //List rn_menu_register = rn_main_menu_service.getByAccountId(accountId); + List rn_menu_register = rn_main_menu_service.getAll(); + return ResponseEntity.ok().body(rn_menu_register); + } + + // SAVE + @ApiOperation(value = "Add A New Menu", response = Rn_Main_Menu.class) + @PostMapping("/realnet-menu") + public ResponseEntity createMenu( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, + @Valid @RequestBody Rn_Main_Menu rn_main_menu) { +// String userId = tokenUtil.getUserId(authToken); +// rn_main_menu.setCreatedBy(userId); +// rn_main_menu.setAccountId(userId); + Rn_Main_Menu savedMenu = rn_main_menu_service.save(rn_main_menu); + return ResponseEntity.status(HttpStatus.CREATED).body(savedMenu); + } + + // UPDATE + @ApiOperation(value = "Update A Menu", response = Rn_Main_Menu.class) + @PutMapping("/realnet-menu/{id}") + public ResponseEntity updateMenu( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, + @PathVariable(value = "id") Integer id, @Valid @RequestBody Rn_Main_Menu rn_main_menu) { +// String userId = tokenUtil.getUserId(authToken); +// rn_main_menu.setUpdatedBy(userId); + Rn_Main_Menu updatedMenu = rn_main_menu_service.updateById(id, rn_main_menu); + return ResponseEntity.status(HttpStatus.ACCEPTED).body(updatedMenu); + } + + // DELETE + @DeleteMapping("/realnet-menu/{id}") + public ResponseEntity> deleteMenu(@PathVariable(value = "id") Integer id) { + boolean deleted = rn_main_menu_service.deleteById(id); + Map response = new HashMap<>(); + response.put("deleted", Boolean.TRUE); + // response.put("deleted", deleted); + return ResponseEntity.status(HttpStatus.OK).body(response); + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/controller/Rn_Menu_Group_Controller.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/controller/Rn_Menu_Group_Controller.java new file mode 100644 index 0000000..0c43dda --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/controller/Rn_Menu_Group_Controller.java @@ -0,0 +1,203 @@ +package com.realnet.fnd.controller; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.validation.Valid; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import org.springframework.data.domain.Sort; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.config.TokenProvider; +import com.realnet.fnd.entity.Rn_Function_Register; +import com.realnet.fnd.entity.Rn_Main_Menu; +import com.realnet.fnd.entity.Rn_Menu_Group_Header; +import com.realnet.fnd.entity.Rn_Menu_Group_Line; +import com.realnet.fnd.entity.Rn_Menu_Register; +import com.realnet.fnd.entity.Rn_Sub_Menu; +import com.realnet.fnd.response.Rn_Forms_SetupResponse; +import com.realnet.fnd.response.Rn_Menu_Group_Response; +import com.realnet.fnd.service.Rn_Function_Register_Service; +import com.realnet.fnd.service.Rn_Menu_Group_Service; +import com.realnet.fnd.service.Rn_Menu_Register_Service; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserService; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; + +@RestController +@RequestMapping(value = "/api", produces = MediaType.APPLICATION_JSON_VALUE) +@Api(tags = { "Rn_Menu_Group" }) +@CrossOrigin("*") +public class Rn_Menu_Group_Controller { + + @Autowired + private Rn_Menu_Group_Service rn_menu_group_service; + + @Autowired + private Rn_Menu_Register_Service rn_menu_register_service; + + @Autowired + private Rn_Function_Register_Service rn_function_register_service; + + @Autowired + private TokenProvider tokenProvider; + + @Autowired(required=false) + private AppUserService userService; + + // GET ALL + @ApiOperation(value = "List of Menu Group", response = Rn_Forms_SetupResponse.class) + @GetMapping("/menu-group") + public Rn_Menu_Group_Response getMenuGroups( + @RequestParam(value = "page", defaultValue = "0", required = false) Integer page, + @RequestParam(value = "size", defaultValue = "20", required = false) Integer size) { + // sorted data + Pageable paging = PageRequest.of(page, size, Sort.by("createdAt").descending()); + Page result = rn_menu_group_service.getAll(paging); + + Rn_Menu_Group_Response resp = new Rn_Menu_Group_Response(); + resp.setPageStats(result, true); + resp.setItems(result.getContent()); + return resp; + } + + // GET BY ID + @ApiOperation(value = "Get a Menu Group", response = Rn_Menu_Group_Header.class) + @GetMapping("/menu-group/{id}") + public ResponseEntity getMenuGroupById(@PathVariable(value = "id") Long id) { + Rn_Menu_Group_Header rn_menu_group = rn_menu_group_service.getById(id); + return ResponseEntity.ok().body(rn_menu_group); + } + + // SAVE + @ApiOperation(value = "Save A New Menu Group", response = Rn_Menu_Group_Header.class) + @PostMapping("/menu-group") + public ResponseEntity createMenuGroup( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, + @Valid @RequestBody Rn_Menu_Group_Header rn_menu_group_header) { +// String userId = tokenUtil.getUserId(authToken); +// rn_menu_group_header.setCreatedBy(userId); +// rn_menu_group_header.setAccountId(userId); + Rn_Menu_Group_Header savedMenu_group = rn_menu_group_service.save(rn_menu_group_header); + return ResponseEntity.status(HttpStatus.CREATED).body(savedMenu_group); + } + + // UPDATE + @ApiOperation(value = "Update A Menu Group", response = Rn_Menu_Group_Header.class) + @PutMapping("/menu-group/{id}") + public ResponseEntity updateMenuGroup( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, + @PathVariable(value = "id") Long id, @Valid @RequestBody Rn_Menu_Group_Header rn_menu_group_header) { +// String userId = tokenUtil.getUserId(authToken); +// rn_menu_group_header.setUpdatedBy(userId); + Rn_Menu_Group_Header updatedMenu_Group = rn_menu_group_service.updateById(id, rn_menu_group_header); + return ResponseEntity.status(HttpStatus.ACCEPTED).body(updatedMenu_Group); + } + + // DELETE + @DeleteMapping("/menu-group/{id}") + public ResponseEntity> deleteMenuGroup(@PathVariable(value = "id") Long id) { + boolean deleted = rn_menu_group_service.deleteById(id); + Map response = new HashMap<>(); + response.put("deleted", Boolean.TRUE); + // response.put("deleted", deleted); + return ResponseEntity.status(HttpStatus.OK).body(response); + } + + // ---- working code ---- + @ApiOperation(value = "Menus For Individual Group", response = Rn_Forms_SetupResponse.class) + @GetMapping("/load-menus") + public ResponseEntity getMenus( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken) { + //String userId = tokenProvider.getEmailFromToken(authToken); + AppUser user = userService.getLoggedInUser(); + System.out.println("getMenus controller " + user); + Long menu_group_id = user.getUsrGrp().getUsrGrp(); + System.out.println("getMenus() MENU GROUP ID = " + menu_group_id); + + // from user table, get menu_group_id + //int menu_group_id = 1; + + // rn_menu_group_service.loadmenuGroupByUser(menu_group_id); + // or + + // Rn_Main_Menu rn_main_menu = new Rn_Main_Menu(); + // Rn_Sub_Menu rn_sub_menu = new Rn_Sub_Menu(); + + List mainMenuList = new ArrayList(); + // List subMenuList = new ArrayList(); + + Rn_Menu_Group_Header menu_group_header = rn_menu_group_service.getById(menu_group_id); + List menu_group_lines = menu_group_header.getMenu_group_lines(); + + // menu_group loop start + for (Rn_Menu_Group_Line menu_group_line : menu_group_lines) { + // menu id will be diff + int menu_id = menu_group_line.getMenu_id(); + + // HEADER + Rn_Menu_Register rn_menu_register = rn_menu_register_service.getById(menu_id); + String main_menu_name = rn_menu_register.getMain_menu_name(); + String main_menu_action_name = rn_menu_register.getMain_menu_action_name(); + String main_menu_icon = rn_menu_register.getMain_menu_icon(); + // boolean main_menu_flag = rn_menu_register.getEnable_flag(); + + Rn_Main_Menu rn_main_menu = new Rn_Main_Menu(); + rn_main_menu.setMenu_name(main_menu_name); + rn_main_menu.setMenu_action_link(main_menu_action_name); + rn_main_menu.setMenu_icon(main_menu_icon); + + // LINE + // List subMenuList = new ArrayList(); + System.out.println("Before Fun Register"); + List functions = rn_function_register_service.getByMenuId(menu_id); + System.out.println("After Fun Register"); + if (!functions.isEmpty()) { + List subMenuList = new ArrayList(); + for (Rn_Function_Register function : functions) { + String function_name = function.getFunction_name(); + String function_action_name = function.getFunction_action_name(); + String function_icon = function.getFunction_icon(); + // LocalDate function_end_date = function.getEnd_date(); + // String function_flag = function.getEnable_flag(); + + Rn_Sub_Menu rn_sub_menu = new Rn_Sub_Menu(); + rn_sub_menu.setSub_menu_name(function_name); + rn_sub_menu.setSub_menu_action_link(function_action_name); + rn_sub_menu.setSub_menu_icon(function_icon); + + subMenuList.add(rn_sub_menu); + } // func loop end + rn_main_menu.setSub_menus(subMenuList); + } + // rn_main_menu.setSub_menus(sub_menus); + mainMenuList.add(rn_main_menu); + } // menu_group loop end + + + return ResponseEntity.ok().body(mainMenuList); + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/controller/Rn_Menu_Group_Line_Controller.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/controller/Rn_Menu_Group_Line_Controller.java new file mode 100644 index 0000000..059de2f --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/controller/Rn_Menu_Group_Line_Controller.java @@ -0,0 +1,57 @@ +package com.realnet.fnd.controller; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.fnd.entity.Rn_Menu_Group_Header; +import com.realnet.fnd.entity.Rn_Menu_Group_Line; +import com.realnet.fnd.service.RnGroupMenuLineServiec; + +import io.swagger.annotations.Api; + +@RestController +@RequestMapping(value = "/lines_m", produces = MediaType.APPLICATION_JSON_VALUE) +@Api(tags = { "Rn_Menu_Group" }) +@CrossOrigin("*") +public class Rn_Menu_Group_Line_Controller { + + @Autowired + private RnGroupMenuLineServiec rnGroupMenuLineServiec; + + @PostMapping("/create") + public ResponseEntity add(@RequestBody Rn_Menu_Group_Line rn_Menu_Group_Line){ + Rn_Menu_Group_Line addToDb = this.rnGroupMenuLineServiec.addToDb(rn_Menu_Group_Line); + return ResponseEntity.ok(addToDb); + } + + @GetMapping("/get-one/{id}") + public ResponseEntity getone(@PathVariable("id") int id){ + Rn_Menu_Group_Line getoneById = this.rnGroupMenuLineServiec.getoneById(id); + return ResponseEntity.ok(getoneById); + } + + @GetMapping("/get-all") + public List getAll(){ + List all = this.rnGroupMenuLineServiec.getAll(); + return all; + } + + @PutMapping("/update") + public ResponseEntity update(@RequestBody Rn_Menu_Group_Line rn_Menu_Group_Line){ + Rn_Menu_Group_Line addToDb = this.rnGroupMenuLineServiec.updateToDb(rn_Menu_Group_Line); + return ResponseEntity.ok(addToDb); + } + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/controller/Rn_Menu_Register_Controller.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/controller/Rn_Menu_Register_Controller.java new file mode 100644 index 0000000..119dc5e --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/controller/Rn_Menu_Register_Controller.java @@ -0,0 +1,125 @@ +package com.realnet.fnd.controller; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.validation.Valid; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.fnd.entity.Rn_Menu_Register; +import com.realnet.fnd.response.Rn_Menu_Register_Response; +import com.realnet.fnd.service.Rn_Menu_Register_Service; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; + +@RestController +@RequestMapping(value = "/api", produces = MediaType.APPLICATION_JSON_VALUE) +@Api(tags = { "Menu Register" }) +@CrossOrigin("*") +public class Rn_Menu_Register_Controller { + + @Autowired + private Rn_Menu_Register_Service rn_menu_register_service; + +// @Autowired +// private TokenUtil tokenUtil; + + // GET ALL + @ApiOperation(value = "List of Menu", response = Rn_Menu_Register_Response.class) + @GetMapping("/menu-register") + public Rn_Menu_Register_Response getRegisteredMenu( + @RequestParam(value = "page", defaultValue = "0", required = false) Integer page, + @RequestParam(value = "size", defaultValue = "20", required = false) Integer size) { + + // SORTED DATA + // Pageable paging = PageRequest.of(page, size, + // Sort.by("createdAt").descending()); + + Pageable paging = PageRequest.of(page, size); + Page result = rn_menu_register_service.getAll(paging); + Rn_Menu_Register_Response resp = new Rn_Menu_Register_Response(); + resp.setPageStats(result, true); + resp.setItems(result.getContent()); + return resp; + } + + // GET BY ID + @ApiOperation(value = "Get a Menu", response = Rn_Menu_Register.class) + @GetMapping("/menu-register/{id}") + public ResponseEntity getRegisteredMenuById(@PathVariable(value = "id") Integer id) { + Rn_Menu_Register rn_menu_register = rn_menu_register_service.getById(id); + return ResponseEntity.ok().body(rn_menu_register); + } + + // getByAccountId + // *** NEED MODIFICATION *** + // GET BY ACCOUNT_ID + @ApiOperation(value = "Get Menu By Accout Id", response = Rn_Menu_Register.class) + @GetMapping("/menu-register/user-menu") + public ResponseEntity> getRegisteredMenuByAccountId( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken) { +// String accountId = tokenUtil.getUserId(authToken); +// System.out.println("get Menu List by Account Id --> " + accountId); + // ** NEED TO MODIFY ** +// List rn_menu_register = rn_menu_register_service.getByAccountId(accountId); + List rn_menu_register = rn_menu_register_service.getAll(); + return ResponseEntity.ok().body(rn_menu_register); + } + + // SAVE + @ApiOperation(value = "Add A New Menu", response = Rn_Menu_Register.class) + @PostMapping("/menu-register") + public ResponseEntity SaveMenuRegister( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, + @Valid @RequestBody Rn_Menu_Register rn_menu_register) { +// String userId = tokenUtil.getUserId(authToken); +// rn_menu_register.setCreatedBy(userId); +// rn_menu_register.setAccountId(userId); + Rn_Menu_Register savedRn_Forms_Setup = rn_menu_register_service.save(rn_menu_register); + return ResponseEntity.status(HttpStatus.CREATED).body(savedRn_Forms_Setup); + } + + // UPDATE + @ApiOperation(value = "Update A Menu", response = Rn_Menu_Register.class) + @PutMapping("/menu-register/{id}") + public ResponseEntity updateMenu( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, + @PathVariable(value = "id") Integer id, @Valid @RequestBody Rn_Menu_Register rn_menu_register) { + // String userId = tokenUtil.getUserId(authToken); + // rn_menu_register.setUpdatedBy(userId); + Rn_Menu_Register updatedMenu = rn_menu_register_service.updateById(id, rn_menu_register); + return ResponseEntity.status(HttpStatus.ACCEPTED).body(updatedMenu); + } + + // DELETE + @DeleteMapping("/menu-register/{id}") + public ResponseEntity> deleteRn_Forms_Setup(@PathVariable(value = "id") Integer id) { + boolean deleted = rn_menu_register_service.deleteById(id); + Map response = new HashMap<>(); + response.put("deleted", Boolean.TRUE); + // response.put("deleted", deleted); + return ResponseEntity.status(HttpStatus.OK).body(response); + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/controller1/LoadMenuController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/controller1/LoadMenuController.java new file mode 100644 index 0000000..07e2197 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/controller1/LoadMenuController.java @@ -0,0 +1,283 @@ +package com.realnet.fnd.controller1; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Optional; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.realnet.fnd.entity1.GrpMenuAccess; +import com.realnet.fnd.entity1.MenuDet; +import com.realnet.fnd.repository1.GrpMenuAccessRepository; +import com.realnet.fnd.repository1.MenuDetRepository; +import com.realnet.fnd.service1.SecmenuDetailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.entity1.AppUserRole; +import com.realnet.users.repository1.AppUserRepository; +import com.realnet.users.repository1.AppUserRoleRepository; +import com.realnet.users.service1.AppUserServiceImpl; + +@RequestMapping(value = "/fndMenu", produces = MediaType.APPLICATION_JSON_VALUE) +@RestController +public class LoadMenuController { + + @Autowired + private AppUserRoleRepository appUserRoleRepository; + @Autowired + private MenuDetRepository menuDetRepository; + @Autowired + private GrpMenuAccessRepository grpMenuAccessRepository; + @Autowired + private AppUserServiceImpl userService; + + @Autowired + private AppUserRepository appUserRepository; + + @Autowired + private SecmenuDetailService secmenuDetailService; + + private static final Logger LOGGER = LoggerFactory.getLogger(LoadMenuController.class); + +// GROUP MENU ACCESS MENU LOAD BY USER + @GetMapping("/menuloadbyuser") + public ResponseEntity setmenuforuser() { + AppUser loggedInUser = userService.getLoggedInUser(); + Long usrGrp = loggedInUser.getUsrGrp().getUsrGrp(); + + List root = grpMenuAccessRepository.findAllRootsByMenuId(usrGrp); // menu id =0 + for (int i = 0; i < root.size(); i++) { + + // find menu item id by menu id =0 + List menu = grpMenuAccessRepository.findById(root.get(i).getUsrGrp().getUsrGrp(), + root.get(i).getMenuItemId().getMenuItemId()); // menuItem id will be unique + for (GrpMenuAccess g : menu) { + + // all submenu by menuid = menu itemid with status + List allSubmenu = grpMenuAccessRepository + .findAllSubmenuByMenuIdWithStatus(g.getMenuItemId().getMenuItemId(), g.getUsrGrp().getUsrGrp()); // find + + g.setSubMenus(allSubmenu); + } + + } + return new ResponseEntity<>(root, HttpStatus.OK); + } + +// GET LIST OF TABLE + @GetMapping("/loadcolumn/{TABLE_NAME}") + public List getcolumnname(@PathVariable Object TABLE_NAME) { + List colun = menuDetRepository.findcolumnbytablename(TABLE_NAME); + + return colun; + + } + +// GET LIST OF USRGRP + @GetMapping("/listofusrgrp") + public ResponseEntity listofusrgrp() { + AppUser loggedInUser = userService.getLoggedInUser(); + Long usrGrp = loggedInUser.getUsrGrp().getUsrGrp(); + + List root = grpMenuAccessRepository.findAllRootsByMenuId(usrGrp); + return new ResponseEntity<>(root, HttpStatus.OK); + + } + +// GET LIST OF USRGRP + @GetMapping("/getuser/{user_id}") + public ResponseEntity getuser(@PathVariable Long user_id) { + + AppUser root = appUserRepository.findById(user_id).orElseThrow(null); + return new ResponseEntity<>(root, HttpStatus.OK); + + } + +// SINK GRPMENU ACCESS TO SEC MENU DET SUBMENU BY PASSING GMENUID + @PutMapping("/sink/{gmenuid}") + public ResponseEntity sync(@PathVariable Long gmenuid, @RequestBody GrpMenuAccess gr) { + + List list = secmenuDetailService.sync(gmenuid, gr); + + return new ResponseEntity<>(list, HttpStatus.CREATED); + + } + +// COMPLETED +// SINK GRPMENU ACCESS FROM MENU DET BY PASSING MENU ITEM ID OF MENU BY LOGIN USER + @PutMapping("/sink1/{gmenuid}") + public ResponseEntity sink(@PathVariable Long gmenuid, @RequestBody GrpMenuAccess gr) { + + AppUser loggedInUser = userService.getLoggedInUser(); + Long usrGrp = loggedInUser.getUsrGrp().getUsrGrp(); + + List list = new ArrayList<>(); + MenuDet formenu = menuDetRepository.findById(gmenuid).orElseThrow(null); + + GrpMenuAccess a = grpMenuAccessRepository.findAllRootsByMenuIdAndGrp(gmenuid, usrGrp); + if (a != null) { + + a.setMenuItemId(formenu); + a.setItemSeq(formenu.getItemSeq()); + a.setMenuItemDesc(formenu.getMenuItemDesc()); + a.setModuleName(formenu.getModuleName()); + a.setStatus(formenu.getStatus()); + a.setMain_menu_action_name(formenu.getMain_menu_action_name()); + a.setMain_menu_icon_name(formenu.getMain_menu_icon_name()); + a.setMenuId(formenu.getMenuId()); + GrpMenuAccess save = grpMenuAccessRepository.save(a); + list.add(save); + + List submenu = menuDetRepository.findAllSubmenuByMenuId(gmenuid); + for (int i = 0; i < submenu.size(); i++) { + MenuDet m = menuDetRepository.findById(submenu.get(i).getMenuItemId()).orElseThrow(null); +// List listofsubmenu = grpMenuAccessRepository.findAllSubmenuByMenuitemidAndUsrGrp(gmenuid,usrGrp); +// for (int j = 0; j < listofsubmenu.size(); j++) { + GrpMenuAccess g = grpMenuAccessRepository.findById2(m.getMenuItemId(), usrGrp); + if (g != null) { + + g.setMenuItemId(m); + + g.setItemSeq(m.getItemSeq()); + g.setMenuItemDesc(m.getMenuItemDesc()); + g.setModuleName(m.getModuleName()); + g.setStatus(m.getStatus()); + g.setMain_menu_action_name(m.getMain_menu_action_name()); + g.setMain_menu_icon_name(m.getMain_menu_icon_name()); + g.setMenuId(m.getMenuId()); + + GrpMenuAccess save1 = grpMenuAccessRepository.save(g); + list.add(save1); + } else { + + AppUserRole app = appUserRoleRepository.findById(usrGrp).orElseThrow(null); + gr.setUsrGrp(app); + gr.setMenuItemId(m); + + gr.setItemSeq(m.getItemSeq()); + gr.setMenuItemDesc(m.getMenuItemDesc()); + gr.setModuleName(m.getModuleName()); + gr.setStatus(m.getStatus()); + gr.setMain_menu_action_name(m.getMain_menu_action_name()); + gr.setMain_menu_icon_name(m.getMain_menu_icon_name()); + gr.setMenuId(m.getMenuId()); + + gr.setMCreate("true"); + gr.setMDelete("true"); + gr.setMEdit("true"); + gr.setMQuery("true"); + gr.setMVisible("true"); + gr.setIsdisable("true"); + gr.setMexport("true"); + + gr.setCreatedAt(new Date()); + gr.setUpdatedAt(new Date()); + + GrpMenuAccess save2 = grpMenuAccessRepository.save(gr); + list.add(save2); + + } + + } + +// } + } else { + return new ResponseEntity<>(HttpStatus.BAD_REQUEST); + + } + + return new ResponseEntity<>(list, HttpStatus.CREATED); + } + +// DELETE MENU AND SUBMENU INCLUDING GRPMENU ACCESS by menuItemId + @DeleteMapping("/DelMenuWithSub/{menu_item_id}") + public void delete(@PathVariable Long menu_item_id) { + + // delete submenu + List submenu = menuDetRepository.findAllSubmenuByMenuId(menu_item_id); + for (int i = 0; i < submenu.size(); i++) { + MenuDet m = menuDetRepository.findById(submenu.get(i).getMenuItemId()).orElseThrow(null); + List li = grpMenuAccessRepository.findlist(m.getMenuItemId()); + + for (GrpMenuAccess g : li) { + grpMenuAccessRepository.delete(g); + } + menuDetRepository.delete(m); + } + + // delete menu + MenuDet formenu = menuDetRepository.findById(menu_item_id).orElseThrow(null); + + List all = grpMenuAccessRepository.findByGrpAndMenuid1(formenu.getMenuItemId()); + + for (GrpMenuAccess a : all) { + grpMenuAccessRepository.delete(a); + } + + menuDetRepository.delete(formenu); + + } + +////LOAD MENU DET' MENU AND SUBMENU BY USER ID +//@GetMapping("/loadmenu/{use_by}") +//public List getmenubyuserid(@PathVariable Long use_by) { +// List root = menuDetRepository.findAllrootsbyuseby(use_by); +// +// for(MenuDet m:root) { +// +// List allSubmenu = menuDetRepository.findAllSubmenuByMenuId(m.getMenuItemId()); +// MenuDet menu = menuDetRepository.findById(m.getMenuItemId()).orElse(null); +// menu.setSubMenus(allSubmenu); +// } +// +// return root; +//} + +////GROUP MENU ACCESS MENU LOAD BY USER +//@GetMapping("/menuloadbyuser") +//public ResponseEntity setmenuforuser(){ +// AppUser loggedInUser = userService.getLoggedInUser(); +// Long usrGrp = loggedInUser.getUsrGrp().getUsrGrp(); +// +// List root = grpMenuAccessRepository.findAllRootsbyusrGrp(usrGrp); +// for(int i =0; i allSubmenu = grpMenuAccessRepository.findAllSubmenu(root.get(i).getParent()); +// menu.setSubMenus(allSubmenu); +// } +// return new ResponseEntity<>(root, HttpStatus.OK); +//} + // DELETE MENU AND SUBMENU IN GRP MENU ACCESS BY MENU ITEM ID + @DeleteMapping("/DelMenu_WithSub1/{menu_item_id}/{usrGrp}") + public void deletemenuandsubmenu(@PathVariable Long menu_item_id, @PathVariable Long usrGrp) { +// AppUser loggedInUser = userService.getLoggedInUser(); +// Long usrGrp = loggedInUser.getUsrGrp().getUsrGrp(); + + // delete submenu + List li = grpMenuAccessRepository.findAllSubmenuByMenuId(menu_item_id, usrGrp); + for (GrpMenuAccess g : li) { + grpMenuAccessRepository.delete(g); + } + + // delete menu + GrpMenuAccess all = grpMenuAccessRepository.findSingle(usrGrp, menu_item_id); + grpMenuAccessRepository.delete(all); + + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/controller1/MenuController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/controller1/MenuController.java new file mode 100644 index 0000000..0efe67a --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/controller1/MenuController.java @@ -0,0 +1,404 @@ +package com.realnet.fnd.controller1; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.exceptions.ResourceNotFoundException; +import com.realnet.fnd.entity1.GrpMenuAccess; +import com.realnet.fnd.entity1.MenuDet; +import com.realnet.fnd.entity1.MixMenuNew; +import com.realnet.fnd.repository1.GrpMenuAccessRepository; +import com.realnet.fnd.repository1.MenuDetRepository; +import com.realnet.fnd.service1.GrpMenuAccessServiceImpl; +import com.realnet.fnd.service1.MenuDetServiceImpl; +import com.realnet.fnd.service1.SecmenuDetailService; +import com.realnet.users.entity1.AppUserRole; +import com.realnet.users.repository1.AppUserRepository; +import com.realnet.users.repository1.AppUserRoleRepository; +import com.realnet.users.service1.AppUserServiceImpl; + +import io.swagger.annotations.Api; + +@RestController +@RequestMapping(value = "/api1", produces = MediaType.APPLICATION_JSON_VALUE) +@Api(tags = { "Rn_Menu_Group" }) +@CrossOrigin("*") + +public class MenuController { + + + @Autowired + private AppUserServiceImpl userService; + + @Autowired + private AppUserRoleRepository appUserRoleRepository; + + @Autowired + private AppUserRepository appUserRepository; + + private MenuDetServiceImpl menuDetServiceImpl; + private GrpMenuAccessServiceImpl grpMenuAccessServiceImpl; + private AppUserServiceImpl appUserServiceImpl; + private MenuDetRepository menuDetRepository; + private GrpMenuAccessRepository grpMenuAccessRepository; + + @Autowired + public MenuController(MenuDetServiceImpl menuDetServiceImpl, GrpMenuAccessServiceImpl grpMenuAccessServiceImpl, + AppUserServiceImpl appUserServiceImpl, MenuDetRepository menuDetRepository, + GrpMenuAccessRepository grpMenuAccessRepository) { + super(); + this.menuDetServiceImpl = menuDetServiceImpl; + this.grpMenuAccessServiceImpl = grpMenuAccessServiceImpl; + this.appUserServiceImpl = appUserServiceImpl; + this.menuDetRepository = menuDetRepository; + this.grpMenuAccessRepository = grpMenuAccessRepository; + } + + @GetMapping("/allmenus") + public ResponseEntity getallmenu() { + List menu = menuDetRepository.getallmenu(); + return new ResponseEntity<>(menu, HttpStatus.OK); + } + +//// // ADD DATA FOR SEC MENU DETAIL + @PostMapping("/Sec_menuDet") + public ResponseEntity adddata(@RequestBody MenuDet menuDet) { + MenuDet save = menuDetRepository.save(menuDet); + return new ResponseEntity<>(save, HttpStatus.CREATED); + } + + +// GET BY MENU ITEM ID + @GetMapping("/Sec_menuDet/{menu_item_id}") + public ResponseEntity getdata(@PathVariable Long menu_item_id) { + MenuDet save = menuDetRepository.findById(menu_item_id) + .orElseThrow(() -> new ResourceNotFoundException("id not found")); + return new ResponseEntity<>(save, HttpStatus.CREATED); + } + +// GET MENU AND SUBMENU of MENU DET + @GetMapping("/submenu1") + public List submenu() { + List root = menuDetRepository.findAllRootsByMenuId(); + + for (MenuDet m : root) { + + List allSubmenu = menuDetRepository.findAllSubmenuByMenuId(m.getMenuItemId()); + MenuDet menu = menuDetRepository.findById(m.getMenuItemId()).orElse(null); + menu.setSubMenus(allSubmenu); + } + + return root; + } + +// Get Only SubMenu OF MENU DET + @GetMapping("/submenu1/{menu_item_id}") + public ResponseEntity getonlysubmenu(@PathVariable Long menu_item_id) { + List submenu = menuDetRepository.findAllSubmenuByMenuId(menu_item_id); + + return new ResponseEntity<>(submenu, HttpStatus.OK); + + } + +// GET MENU AND SUBMENU of GROUP MENU ACCESS + @GetMapping("/grpmenuandsubmenu") + public List GRPMENUACCESS() { + List root = grpMenuAccessRepository.findAllRoots(); + + for (int i = 0; i < root.size(); i++) { + + // find menu item id by menu id =0 + List menu = grpMenuAccessRepository.findById(root.get(i).getUsrGrp().getUsrGrp(), + root.get(i).getMenuItemId().getMenuItemId()); // menuItem id will be unique + for (GrpMenuAccess g : menu) { + + List allSubmenu = grpMenuAccessRepository + .findAllSubmenuByMenuId(g.getMenuItemId().getMenuItemId(), g.getUsrGrp().getUsrGrp()); // find + // all + // submenu + // by + // menuid + // = + // menu + // itemid + g.setSubMenus(allSubmenu); + } + + } + + return root; + } + +// Get Only SubMenu of GROUP MENU ACCESS + @GetMapping("/grpmenuandsubmenu/{menu_item_id}") + public ResponseEntity grpmenuaccess(@PathVariable Long menu_item_id) { + List submenu = grpMenuAccessRepository.findAllSubmenu(menu_item_id); + + return new ResponseEntity<>(submenu, HttpStatus.OK); + + } + +// update by menu_item_id + @PutMapping("/submenu1/{menu_item_id}") + public ResponseEntity updatedata(@RequestBody MenuDet d, @PathVariable Long menu_item_id) { + MenuDet menu = menuDetRepository.findById(menu_item_id).orElseThrow(null); + + menu.setItemSeq(d.getItemSeq()); + menu.setMain_menu_action_name(d.getMain_menu_action_name()); + menu.setMain_menu_icon_name(d.getMain_menu_icon_name()); + menu.setMenuId(d.getMenuId()); + menu.setMenuItemDesc(d.getMenuItemDesc()); + menu.setModuleName(d.getModuleName()); + menu.setStatus(d.getStatus()); + + MenuDet save = menuDetRepository.save(menu); + return new ResponseEntity<>(save, HttpStatus.CREATED); + } + +// delete DATA SEC MENU DET WITH GRPMENUACCESS by menuItemId + @DeleteMapping("/menu/{menu_item_id}") + public void delete(@PathVariable Long menu_item_id) { + + List findlist = grpMenuAccessRepository.findlist(menu_item_id); + for (GrpMenuAccess g : findlist) { + grpMenuAccessRepository.delete(g); + } + + MenuDet menu = menuDetRepository.findById(menu_item_id).orElseThrow(null); + menuDetRepository.delete(menu); + } + +// GET GROUP MENU ACCESS BY USR_GROUP with WITH SUBMENU + + @GetMapping("/grpmenuaccess/{usr_grp}") + public ResponseEntity GETGROUPMENU(@PathVariable Long usr_grp) { + + List list = new ArrayList<>(); + GrpMenuAccess grp = grpMenuAccessRepository.findByUsrGrp(usr_grp); + +// List sub = menuDetRepository.findAllSubmenuByMenuId(grp.getMenuItemId().getMenuItemId()); + List sub = menuDetRepository.findAllSubmenuforusrgrp(grp.getMenuItemId().getMenuItemId()); + + list.add(grp); + list.add(sub); + return new ResponseEntity<>(list, HttpStatus.OK); + + } + +// get all + @GetMapping("/getAllData") + public ResponseEntity> getAllGroupMenuAccess() { + List listgrp = grpMenuAccessRepository.findAll(); + return new ResponseEntity<>(listgrp, HttpStatus.OK); + } + +// get by USRGRP WITHOUT SUBMENU + +// @GetMapping("/getById/{userId}") +// public ResponseEntity getGrpMenuByUserId(@PathVariable Long userId){ +// GrpMenuAccess grpMenuAccess=grpMenuAccessRepository.findByUsrGrp(userId); +// if(grpMenuAccess==null)throw new ResourceNotFoundException("no resource found"); +// return new ResponseEntity<>(grpMenuAccess,HttpStatus.OK); +// } + +// update by usr grp id + @PutMapping("/updatemenuaccess/{userId}") + public ResponseEntity updateMenuAccess(@PathVariable Long userId, @RequestBody GrpMenuAccess grpMenuAccess) { + GrpMenuAccess g1 = grpMenuAccessRepository.findByUsrGrp(userId); + if (g1 == null) { + throw new ResourceNotFoundException("no resource found"); + } + g1.setMCreate(grpMenuAccess.getMCreate()); + g1.setMDelete(grpMenuAccess.getMDelete()); + g1.setMEdit(grpMenuAccess.getMEdit()); + g1.setMQuery(grpMenuAccess.getMQuery()); + g1.setMVisible(grpMenuAccess.getMVisible()); + g1.setMexport(grpMenuAccess.getMexport()); + + GrpMenuAccess grpMenuAccess2 = grpMenuAccessRepository.save(g1); + return new ResponseEntity<>(grpMenuAccess2, HttpStatus.OK); + } + +// delete by usrgrp + @DeleteMapping("/deleteMenuAcces/{userId}") + public void deleteMenuAccess(@PathVariable Long userId) { + GrpMenuAccess grpMenuAccess = grpMenuAccessRepository.findByUsrGrp(userId); + if (Objects.isNull(grpMenuAccess)) + throw new ResourceNotFoundException("no resource found"); + grpMenuAccessRepository.delete(grpMenuAccess); + } + +// ADD MULTIPLE DATA FOR GROUP MENU ACCESS + @PostMapping("/group") + public ResponseEntity addgroupmenuaccess(@RequestBody List grp) { + + for (GrpMenuAccess g : grp) { + MenuDet menu1 = menuDetRepository.findById(g.getGmenuid()).orElseThrow(null); + AppUserRole a = appUserRoleRepository.findById(g.getGrpid()).orElseThrow(null); + + g.setUsrGrp(a); + g.setMenuItemId(menu1); + } + List save = grpMenuAccessRepository.saveAll(grp); + return new ResponseEntity<>(save, HttpStatus.CREATED); + } + +// ADD DATA FOR group menu access + @PostMapping("/singlegroup") + public ResponseEntity addsinglegroup(@RequestBody GrpMenuAccess grp) { + + MenuDet menu1 = menuDetRepository.findById(grp.getGmenuid()).orElseThrow(null); + AppUserRole a = appUserRoleRepository.findById(grp.getGrpid()).orElseThrow(null); + + grp.setUsrGrp(a); + grp.setMenuItemId(menu1); + + GrpMenuAccess save = grpMenuAccessRepository.save(grp); + return new ResponseEntity<>(save, HttpStatus.CREATED); + } + +// NEWWWW post MENU AND SUBMENU IN GROUPMENUACCESS + + @PostMapping("/addgrpwithsubmenu") + public ResponseEntity adds(@RequestBody GrpMenuAccess g) { + + List list = new ArrayList<>(); + + Optional a = grpMenuAccessRepository.findbygrpandmenuid(g.getGmenuid(), g.getGrpid()); + if (!a.isPresent()) { + MenuDet me = menuDetRepository.findById(g.getGmenuid()).orElseThrow(null); + g.setMenuItemId(me); + g.setItemSeq(me.getItemSeq()); + g.setMenuItemDesc(me.getMenuItemDesc()); + g.setMenuItemDesc(me.getMenuItemDesc()); + g.setModuleName(me.getModuleName()); + g.setStatus(me.getStatus()); + g.setMain_menu_action_name(me.getMain_menu_action_name()); + g.setMain_menu_icon_name(me.getMain_menu_icon_name()); + g.setMenuId(me.getMenuId()); + + AppUserRole app1 = appUserRoleRepository.findById(g.getGrpid()).orElseThrow(null); + g.setUsrGrp(app1); + g.setMCreate("true"); + g.setMDelete("true"); + g.setMEdit("true"); + g.setMQuery("true"); + g.setMVisible("true"); + g.setIsdisable("true"); + g.setMexport("true"); + + g.setCreatedAt(new Date()); + g.setUpdatedAt(new Date()); + + GrpMenuAccess save1 = grpMenuAccessRepository.save(g); + list.add(save1); + + List submenu = menuDetRepository.findAllSubmenuByMenuId(g.getGmenuid()); + + for (int i = 0; i < submenu.size(); i++) { + MenuDet m = menuDetRepository.findById(submenu.get(i).getMenuItemId()).orElseThrow(null); + g.setMenuItemId(m); + g.setItemSeq(m.getItemSeq()); + g.setMenuItemDesc(m.getMenuItemDesc()); + g.setModuleName(m.getModuleName()); + g.setStatus(m.getStatus()); + g.setMain_menu_action_name(m.getMain_menu_action_name()); + g.setMain_menu_icon_name(m.getMain_menu_icon_name()); + g.setMenuId(m.getMenuId()); + + AppUserRole app = appUserRoleRepository.findById(g.getGrpid()).orElseThrow(null); + g.setUsrGrp(app); + g.setMCreate("true"); + g.setMDelete("true"); + g.setMEdit("true"); + g.setMQuery("true"); + g.setMVisible("true"); + g.setIsdisable("true"); + g.setMexport("true"); + + g.setCreatedAt(new Date()); + g.setUpdatedAt(new Date()); + + GrpMenuAccess save = grpMenuAccessRepository.save(g); + list.add(save); + } + + return new ResponseEntity<>(list, HttpStatus.CREATED); + + } else { + return new ResponseEntity<>("already added menu", HttpStatus.BAD_REQUEST); + } + + } + +// GET ALL GRPACCESS BY USRGRP + @GetMapping("getusracces1/{usr_grp}") + public ResponseEntity getallbyusrgrp(@PathVariable Long usr_grp) { + List list = grpMenuAccessRepository.findAllByUsrGrp(usr_grp); + return new ResponseEntity<>(list, HttpStatus.OK); + + } + +// UPDATE GRP MENU ACCESS BY MENU ITEMID + @PutMapping("/update/{menu_item_id}/{usr_grp}") + public ResponseEntity updateMenuGRPAccess(@PathVariable Long menu_item_id, @PathVariable Long usr_grp, + @RequestBody GrpMenuAccess grpMenuAccess) { + GrpMenuAccess g1 = grpMenuAccessRepository.findByUsrgrpAndMenuitemid(menu_item_id, usr_grp); + if (g1 == null) { + throw new ResourceNotFoundException("no resource found"); + } + g1.setMCreate(grpMenuAccess.getMCreate()); + g1.setMDelete(grpMenuAccess.getMDelete()); + g1.setMEdit(grpMenuAccess.getMEdit()); + g1.setMQuery(grpMenuAccess.getMQuery()); + g1.setMVisible(grpMenuAccess.getMVisible()); + g1.setIsdisable(grpMenuAccess.getIsdisable()); + g1.setItemSeq(grpMenuAccess.getItemSeq()); + g1.setMain_menu_action_name(grpMenuAccess.getMain_menu_action_name()); + g1.setMain_menu_icon_name(grpMenuAccess.getMain_menu_action_name()); + g1.setMenuId(grpMenuAccess.getMenuId()); + g1.setMenuItemDesc(grpMenuAccess.getMenuItemDesc()); + g1.setModuleName(grpMenuAccess.getModuleName()); + g1.setStatus(grpMenuAccess.getStatus()); + g1.setMexport(grpMenuAccess.getMexport()); + + GrpMenuAccess grpMenuAccess2 = grpMenuAccessRepository.save(g1); + return new ResponseEntity<>(grpMenuAccess2, HttpStatus.OK); + } + +// DELETE GRPMENU ACCESS BY MENUITEMID AND USRGRP + @DeleteMapping("/deleteGrpMenuAcces/{menu_item_id}/{usr_grp}") + public void deleteGrpMenuAccess(@PathVariable Long menu_item_id, @PathVariable Long usr_grp) { + GrpMenuAccess grpMenuAccess = grpMenuAccessRepository.findByUsrgrpAndMenuitemid(menu_item_id, usr_grp); + if (Objects.isNull(grpMenuAccess)) + throw new ResourceNotFoundException("no resource found"); + grpMenuAccessRepository.delete(grpMenuAccess); + } + +// GET GRPMENU ACCESS BY MENUITEM ID BUT NOT WORKING WITH SUBMENU + @GetMapping("/getsec/{menu_item_id}") + public ResponseEntity getgrpmenuaccess(@PathVariable Long menu_item_id) { + GrpMenuAccess get = grpMenuAccessRepository.findById1(menu_item_id); + + return new ResponseEntity<>(get, HttpStatus.CREATED); + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/controller1/TokenFreeController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/controller1/TokenFreeController.java new file mode 100644 index 0000000..875fd89 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/controller1/TokenFreeController.java @@ -0,0 +1,43 @@ +package com.realnet.fnd.controller1; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.Dashboard1.Entity.Dashbord_Header; +import com.realnet.Dashboard1.Service.HeaderService; +import com.realnet.fnd.entity1.MenuDet; +import com.realnet.fnd.service1.SecmenuDetailService; + +@RestController +@RequestMapping("/token") +public class TokenFreeController { + + @Autowired + private SecmenuDetailService secmenuDetailService; + + @Autowired + private HeaderService headerService; + +// add Custom sec menu detail + @PostMapping("/Sec_menuDet/custom") + public ResponseEntity addCustomMenu(@RequestParam String tableName, @RequestParam Long menuid) { + + MenuDet menuDet = secmenuDetailService.customsecmenuadd(tableName, menuid); + + return new ResponseEntity<>(menuDet, HttpStatus.CREATED); + } + +// add dashboard + @PostMapping("/dashboard") + public Dashbord_Header Savedata(@RequestBody Dashbord_Header dashbord_Header) { + Dashbord_Header dash = headerService.Savedata(dashbord_Header); + return dash; + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/DropDownDTO.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/DropDownDTO.java new file mode 100644 index 0000000..bb3f136 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/DropDownDTO.java @@ -0,0 +1,35 @@ +package com.realnet.fnd.entity; + +public class DropDownDTO { + private int id; + private String name; + + public DropDownDTO() { + super(); + // TODO Auto-generated constructor stub + } + + public DropDownDTO(int id, String name) { + super(); + this.id = id; + this.name = name; + } + + public int getId() { + return id; + } + public void setId(int id) { + this.id = id; + } + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + + @Override + public String toString() { + return "DropDownDTO [id=" + id + ", name=" + name + "]"; + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Error.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Error.java new file mode 100644 index 0000000..dcf2fc4 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Error.java @@ -0,0 +1,41 @@ +package com.realnet.fnd.entity; + +import java.io.Serializable; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +@JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" }) +public class Error implements Serializable { + + private static final long serialVersionUID = 1L; + + private String message; + + private String title; + + public String getMessage () + { + return message; + } + + public void setMessage (String message) + { + this.message = message; + } + + public String getTitle () + { + return title; + } + + public void setTitle (String title) + { + this.title = title; + } + + @Override + public String toString() + { + return "ClassPojo [message = "+message+", title = "+title+"]"; + } +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/ErrorPojo.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/ErrorPojo.java new file mode 100644 index 0000000..c99f3ec --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/ErrorPojo.java @@ -0,0 +1,38 @@ +package com.realnet.fnd.entity; + +import java.io.Serializable; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +@JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" }) +public class ErrorPojo implements Serializable { + + private static final long serialVersionUID = 1L; + + private Error error; + + public ErrorPojo() { + + } + + public ErrorPojo(Error error) { + this.error = error; + } + + public Error getError () + { + return error; + } + + public void setError (Error error) + { + this.error = error; + } + + @Override + public String toString() + { + return "ClassPojo [error = "+error+"]"; + } +} + diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/ModuleCopyDTO.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/ModuleCopyDTO.java new file mode 100644 index 0000000..3b60623 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/ModuleCopyDTO.java @@ -0,0 +1,12 @@ +package com.realnet.fnd.entity; + +import lombok.Data; + +@Data +public class ModuleCopyDTO { + private int from_projectId; + private int from_moduleId; + private String to_moduleName; + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Modulemini.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Modulemini.java new file mode 100644 index 0000000..888ff33 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Modulemini.java @@ -0,0 +1,8 @@ +package com.realnet.fnd.entity; + +public interface Modulemini { + + String getid(); + String getmodule_name(); + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/ProjectMini.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/ProjectMini.java new file mode 100644 index 0000000..f063c68 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/ProjectMini.java @@ -0,0 +1,7 @@ +package com.realnet.fnd.entity; + +public interface ProjectMini { + String getid(); + String getproject_name(); + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_AuditEntity.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_AuditEntity.java new file mode 100644 index 0000000..3c5431d --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_AuditEntity.java @@ -0,0 +1,82 @@ +package com.realnet.fnd.entity; + +import java.io.Serializable; +import java.util.Date; + +import javax.persistence.Column; +import javax.persistence.EntityListeners; +import javax.persistence.MappedSuperclass; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; + +import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.annotation.LastModifiedDate; +import org.springframework.data.jpa.domain.support.AuditingEntityListener; + +@MappedSuperclass +@EntityListeners(AuditingEntityListener.class) +public abstract class Rn_AuditEntity extends Rn_ExtensionEntity implements Serializable { + + private static final long serialVersionUID = 1L; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "CREATED_AT", nullable = false, updatable = false) + @CreatedDate + private Date createdAt; + + //@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime createdAt; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "UPDATED_AT", nullable = false) + @LastModifiedDate + private Date updatedAt; + + @Column(name = "CREATED_BY", updatable = false) + private String createdBy; + + @Column(name = "UPDATED_BY") + private String updatedBy; + + @Column(name = "ACCOUNT_ID") + private String accountId; + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public String getUpdatedBy() { + return updatedBy; + } + + public void setUpdatedBy(String updatedBy) { + this.updatedBy = updatedBy; + } + + public String getAccountId() { + return accountId; + } + + public void setAccountId(String accountId) { + this.accountId = accountId; + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_Dynamic_Transaction.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_Dynamic_Transaction.java new file mode 100644 index 0000000..aabeec7 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_Dynamic_Transaction.java @@ -0,0 +1,435 @@ +package com.realnet.fnd.entity; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Lob; +import javax.persistence.Table; + +@Entity +@Table(name = "RN_DYNAMIC_TRANSACTION") +public class Rn_Dynamic_Transaction extends Rn_Who_Columns { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "ID") + private int id; + + @Column(name = "FORM_ID") + private int form_id; + + @Column(name = "FORM_VERSION") + private int form_version; + + @Column(name = "COMP1") + private String comp1; + + @Column(name = "COMP2") + private String comp2; + + @Column(name = "COMP3") + private String comp3; + + @Column(name = "COMP4") + private String comp4; + + @Column(name = "COMP5") + private String comp5; + + @Column(name = "COMP6") + private String comp6; + + @Column(name = "COMP7") + private String comp7; + + @Column(name = "COMP8") + private String comp8; + + @Column(name = "COMP9") + private String comp9; + + @Column(name = "COMP10") + private String comp10; + + @Column(name = "COMP11") + private String comp11; + + @Column(name = "COMP12") + private String comp12; + + @Column(name = "COMP13") + private String comp13; + + @Column(name = "COMP14") + private String comp14; + + @Column(name = "COMP15") + private String comp15; + + @Column(name = "COMP16") + private String comp16; + + @Column(name = "COMP17") + private String comp17; + + @Column(name = "COMP18") + private String comp18; + + @Column(name = "COMP19") + private String comp19; + + @Column(name = "COMP20") + private String comp20; + + @Column(name = "COMP21") + private String comp21; + + @Column(name = "COMP22") + private String comp22; + + @Column(name = "COMP23") + private String comp23; + + @Column(name = "COMP24") + private String comp24; + + @Column(name = "COMP25") + private String comp25; + + // FOR LONG-TEXT FIELDS + @Lob + @Column(name = "COMP_L26", length = 100000) + private String comp_l26; + + @Lob + @Column(name = "COMP_L27", length = 100000) + private String comp_l27; + + @Lob + @Column(name = "COMP_L28", length = 100000) + private String comp_l28; + + @Lob + @Column(name = "COMP_L29", length = 100000) + private String comp_l29; + + @Lob + @Column(name = "COMP_L30", length = 100000) + private String comp_l30; + + public Rn_Dynamic_Transaction() { + super(); + } + + public Rn_Dynamic_Transaction(int id, int form_id, int form_version, String comp1, String comp2, String comp3, + String comp4, String comp5, String comp6, String comp7, String comp8, String comp9, String comp10, + String comp11, String comp12, String comp13, String comp14, String comp15, String comp16, String comp17, + String comp18, String comp19, String comp20, String comp21, String comp22, String comp23, String comp24, + String comp25, String comp_l26, String comp_l27, String comp_l28, String comp_l29, String comp_l30) { + super(); + this.id = id; + this.form_id = form_id; + this.form_version = form_version; + this.comp1 = comp1; + this.comp2 = comp2; + this.comp3 = comp3; + this.comp4 = comp4; + this.comp5 = comp5; + this.comp6 = comp6; + this.comp7 = comp7; + this.comp8 = comp8; + this.comp9 = comp9; + this.comp10 = comp10; + this.comp11 = comp11; + this.comp12 = comp12; + this.comp13 = comp13; + this.comp14 = comp14; + this.comp15 = comp15; + this.comp16 = comp16; + this.comp17 = comp17; + this.comp18 = comp18; + this.comp19 = comp19; + this.comp20 = comp20; + this.comp21 = comp21; + this.comp22 = comp22; + this.comp23 = comp23; + this.comp24 = comp24; + this.comp25 = comp25; + this.comp_l26 = comp_l26; + this.comp_l27 = comp_l27; + this.comp_l28 = comp_l28; + this.comp_l29 = comp_l29; + this.comp_l30 = comp_l30; + } + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public int getForm_id() { + return form_id; + } + + public void setForm_id(int form_id) { + this.form_id = form_id; + } + + public int getForm_version() { + return form_version; + } + + public void setForm_version(int form_version) { + this.form_version = form_version; + } + + public String getComp1() { + return comp1; + } + + public void setComp1(String comp1) { + this.comp1 = comp1; + } + + public String getComp2() { + return comp2; + } + + public void setComp2(String comp2) { + this.comp2 = comp2; + } + + public String getComp3() { + return comp3; + } + + public void setComp3(String comp3) { + this.comp3 = comp3; + } + + public String getComp4() { + return comp4; + } + + public void setComp4(String comp4) { + this.comp4 = comp4; + } + + public String getComp5() { + return comp5; + } + + public void setComp5(String comp5) { + this.comp5 = comp5; + } + + public String getComp6() { + return comp6; + } + + public void setComp6(String comp6) { + this.comp6 = comp6; + } + + public String getComp7() { + return comp7; + } + + public void setComp7(String comp7) { + this.comp7 = comp7; + } + + public String getComp8() { + return comp8; + } + + public void setComp8(String comp8) { + this.comp8 = comp8; + } + + public String getComp9() { + return comp9; + } + + public void setComp9(String comp9) { + this.comp9 = comp9; + } + + public String getComp10() { + return comp10; + } + + public void setComp10(String comp10) { + this.comp10 = comp10; + } + + public String getComp11() { + return comp11; + } + + public void setComp11(String comp11) { + this.comp11 = comp11; + } + + public String getComp12() { + return comp12; + } + + public void setComp12(String comp12) { + this.comp12 = comp12; + } + + public String getComp13() { + return comp13; + } + + public void setComp13(String comp13) { + this.comp13 = comp13; + } + + public String getComp14() { + return comp14; + } + + public void setComp14(String comp14) { + this.comp14 = comp14; + } + + public String getComp15() { + return comp15; + } + + public void setComp15(String comp15) { + this.comp15 = comp15; + } + + public String getComp16() { + return comp16; + } + + public void setComp16(String comp16) { + this.comp16 = comp16; + } + + public String getComp17() { + return comp17; + } + + public void setComp17(String comp17) { + this.comp17 = comp17; + } + + public String getComp18() { + return comp18; + } + + public void setComp18(String comp18) { + this.comp18 = comp18; + } + + public String getComp19() { + return comp19; + } + + public void setComp19(String comp19) { + this.comp19 = comp19; + } + + public String getComp20() { + return comp20; + } + + public void setComp20(String comp20) { + this.comp20 = comp20; + } + + public String getComp21() { + return comp21; + } + + public void setComp21(String comp21) { + this.comp21 = comp21; + } + + public String getComp22() { + return comp22; + } + + public void setComp22(String comp22) { + this.comp22 = comp22; + } + + public String getComp23() { + return comp23; + } + + public void setComp23(String comp23) { + this.comp23 = comp23; + } + + public String getComp24() { + return comp24; + } + + public void setComp24(String comp24) { + this.comp24 = comp24; + } + + public String getComp25() { + return comp25; + } + + public void setComp25(String comp25) { + this.comp25 = comp25; + } + + public String getComp_l26() { + return comp_l26; + } + + public void setComp_l26(String comp_l26) { + this.comp_l26 = comp_l26; + } + + public String getComp_l27() { + return comp_l27; + } + + public void setComp_l27(String comp_l27) { + this.comp_l27 = comp_l27; + } + + public String getComp_l28() { + return comp_l28; + } + + public void setComp_l28(String comp_l28) { + this.comp_l28 = comp_l28; + } + + public String getComp_l29() { + return comp_l29; + } + + public void setComp_l29(String comp_l29) { + this.comp_l29 = comp_l29; + } + + public String getComp_l30() { + return comp_l30; + } + + public void setComp_l30(String comp_l30) { + this.comp_l30 = comp_l30; + } + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_Ext_Fields.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_Ext_Fields.java new file mode 100644 index 0000000..1712b55 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_Ext_Fields.java @@ -0,0 +1,157 @@ +package com.realnet.fnd.entity; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; + +import lombok.Data; + +@Data +@Entity +@Table(name = "RN_EXT_FIELD_T") +public class Rn_Ext_Fields extends Rn_Who_Columns { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "ID") + private int id; + + @Column(name = "TYPE") + private String type; + + @Column(name = "FIELD_NAME") + private String field_name; + + @Column(name = "MAPPING") + private String mapping; + + @Column(name = "DATA_TYPE") + private String data_type; + + @Column(name = "FORM_CODE") + private String form_code; + + @Column(name = "IS_ACTIVE") + private boolean isActive; + + @Column(name = "ACCOUNT_ID") + private long account_id; + + + + + + + + +// @Column(name = "SP_NAME_FOR_AUTOCOMPLETE") +// private String sp_name_for_autocomplete; +// +// @Column(name = "SP_FOR_AUTOCOMPLETE") +// private String sp_for_autocomplete; +// +// @Column(name = "EXT_AUTO_ID") +// private String ext_auto_id; +// +// @Column(name = "EXT_DEPENDENT_ID") +// private String ext_dependent_id; +// +// @Column(name = "EXT_DD_ID") +// private String ext_dd_id; +// +// @Column(name = "SP_NAME") +// private String sp_name; +// +// @Column(name = "DROP_VALUE") +// private String drop_value; +// +// @Column(name = "DROPDOWN") +// private String dropdown; +// +// @Column(name = "MANDATORY") +// private String mandatory; +// +// @Column(name = "HIDDEN") +// private String hidden; +// +// @Column(name = "READONLY") +// private String readonly; +// +// @Column(name = "DEPENDENT") +// private String dependent; +// @Column(name = "SEQ_NAME") +// private String seq_name; +// +// @Column(name = "DEPENDENT_SP") +// private String dependent_sp; +// +// @Column(name = "DEPENDENT_SP_PARAM") +// private String dependent_sp_param; +// +// @Column(name = "VALIDATION_1") +// private String validation_1; +// +// @Column(name = "VAL_TYPE") +// private String val_type; +// +// @Column(name = "VAL_SP") +// private String val_sp; +// +// @Column(name = "VAL_SP_PARAM") +// private String val_sp_param; +// +// @Column(name = "SEQUENCE") +// private String sequence; +// +// @Column(name = "SEQ_SP") +// private String seq_sp; +// +// @Column(name = "SEQ_SP_PARAM") +// private String seq_sp_param; +// +// @Column(name = "DEFAULT_1") +// private String default_1; +// +// @Column(name = "DEFAULT_TYPE") +// private String default_type; +// +// @Column(name = "DEFAULT_VALUE") +// private String default_value; +// +// @Column(name = "DEFAULT_SP") +// private String default_sp; +// +// @Column(name = "DEFAULT_SP_PARAM") +// private String default_sp_param; +// +// @Column(name = "CALCULATED_FIELD") +// private String calculated_field; +// +// @Column(name = "CAL_SP") +// private String cal_sp; +// +// @Column(name = "CAL_SP_PARAM") +// private String cal_sp_param; +// +// @Column(name = "ADD_TO_GRID") +// private String add_to_grid; +// +// @Column(name = "DEPENDENT_ON") +// private String dependent_on; +// @Column(name = "RADIO") +// private String radio; +// @Column(name = "RADIO_OPTION") +// private String radio_option; + + + + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_ExtensionEntity.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_ExtensionEntity.java new file mode 100644 index 0000000..ed13b04 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_ExtensionEntity.java @@ -0,0 +1,183 @@ +package com.realnet.fnd.entity; + +import javax.persistence.Column; +import javax.persistence.MappedSuperclass; + +@MappedSuperclass +public class Rn_ExtensionEntity extends Rn_FlexEntity { + @Column(name = "EXTN1") + private String extn1; + @Column(name = "EXTN2") + private String extn2; + @Column(name = "EXTN3") + private String extn3; + @Column(name = "EXTN4") + private String extn4; + @Column(name = "EXTN5") + private String extn5; + @Column(name = "EXTN6") + private String extn6; + @Column(name = "EXTN7") + private String extn7; + @Column(name = "EXTN8") + private String extn8; + @Column(name = "EXTN9") + private String extn9; + @Column(name = "EXTN10") + private String extn10; + @Column(name = "EXTN11") + private String extn11; + @Column(name = "EXTN12") + private String extn12; + @Column(name = "EXTN13") + private String extn13; + @Column(name = "EXTN14") + private String extn14; + @Column(name = "EXTN15") + private String extn15; + + public Rn_ExtensionEntity() { + super(); + } + + public Rn_ExtensionEntity(String extn1, String extn2, String extn3, String extn4, String extn5, String extn6, + String extn7, String extn8, String extn9, String extn10, String extn11, String extn12, String extn13, + String extn14, String extn15) { + super(); + this.extn1 = extn1; + this.extn2 = extn2; + this.extn3 = extn3; + this.extn4 = extn4; + this.extn5 = extn5; + this.extn6 = extn6; + this.extn7 = extn7; + this.extn8 = extn8; + this.extn9 = extn9; + this.extn10 = extn10; + this.extn11 = extn11; + this.extn12 = extn12; + this.extn13 = extn13; + this.extn14 = extn14; + this.extn15 = extn15; + } + + public String getExtn1() { + return extn1; + } + + public void setExtn1(String extn1) { + this.extn1 = extn1; + } + + public String getExtn2() { + return extn2; + } + + public void setExtn2(String extn2) { + this.extn2 = extn2; + } + + public String getExtn3() { + return extn3; + } + + public void setExtn3(String extn3) { + this.extn3 = extn3; + } + + public String getExtn4() { + return extn4; + } + + public void setExtn4(String extn4) { + this.extn4 = extn4; + } + + public String getExtn5() { + return extn5; + } + + public void setExtn5(String extn5) { + this.extn5 = extn5; + } + + public String getExtn6() { + return extn6; + } + + public void setExtn6(String extn6) { + this.extn6 = extn6; + } + + public String getExtn7() { + return extn7; + } + + public void setExtn7(String extn7) { + this.extn7 = extn7; + } + + public String getExtn8() { + return extn8; + } + + public void setExtn8(String extn8) { + this.extn8 = extn8; + } + + public String getExtn9() { + return extn9; + } + + public void setExtn9(String extn9) { + this.extn9 = extn9; + } + + public String getExtn10() { + return extn10; + } + + public void setExtn10(String extn10) { + this.extn10 = extn10; + } + + public String getExtn11() { + return extn11; + } + + public void setExtn11(String extn11) { + this.extn11 = extn11; + } + + public String getExtn12() { + return extn12; + } + + public void setExtn12(String extn12) { + this.extn12 = extn12; + } + + public String getExtn13() { + return extn13; + } + + public void setExtn13(String extn13) { + this.extn13 = extn13; + } + + public String getExtn14() { + return extn14; + } + + public void setExtn14(String extn14) { + this.extn14 = extn14; + } + + public String getExtn15() { + return extn15; + } + + public void setExtn15(String extn15) { + this.extn15 = extn15; + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_FlexEntity.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_FlexEntity.java new file mode 100644 index 0000000..f498a5c --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_FlexEntity.java @@ -0,0 +1,72 @@ +package com.realnet.fnd.entity; + +import javax.persistence.Column; +import javax.persistence.MappedSuperclass; + +@MappedSuperclass +public class Rn_FlexEntity { + @Column(name = "FLEX1") + private String flex1; + @Column(name = "FLEX2") + private String flex2; + @Column(name = "FLEX3") + private String flex3; + @Column(name = "FLEX4") + private String flex4; + @Column(name = "FLEX5") + private String flex5; + + public Rn_FlexEntity() { + super(); + } + + public Rn_FlexEntity(String flex1, String flex2, String flex3, String flex4, String flex5) { + super(); + this.flex1 = flex1; + this.flex2 = flex2; + this.flex3 = flex3; + this.flex4 = flex4; + this.flex5 = flex5; + } + + public String getFlex1() { + return flex1; + } + + public void setFlex1(String flex1) { + this.flex1 = flex1; + } + + public String getFlex2() { + return flex2; + } + + public void setFlex2(String flex2) { + this.flex2 = flex2; + } + + public String getFlex3() { + return flex3; + } + + public void setFlex3(String flex3) { + this.flex3 = flex3; + } + + public String getFlex4() { + return flex4; + } + + public void setFlex4(String flex4) { + this.flex4 = flex4; + } + + public String getFlex5() { + return flex5; + } + + public void setFlex5(String flex5) { + this.flex5 = flex5; + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_Forms_Component_Setup.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_Forms_Component_Setup.java new file mode 100644 index 0000000..b3edae3 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_Forms_Component_Setup.java @@ -0,0 +1,124 @@ +package com.realnet.fnd.entity; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; + +import com.fasterxml.jackson.annotation.JsonBackReference; + +//@Data +//@EqualsAndHashCode(callSuper = false) +@Entity +@Table(name = "RN_FORMS_COMPONENT_SETUP_T") +public class Rn_Forms_Component_Setup extends Rn_Who_Columns { + private static final long serialVersionUID = 1L; + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "COMPONENT_ID") + private int component_id; + + @Column(name = "LABEL") + private String label; + + @Column(name = "TYPE") + private String type; + + @Column(name = "MAPPING") + private String mapping; + + @Column(name = "MANDATORY") + private String mandatory; + + @Column(name = "READONLY") + private String readonly; + + @Column(name = "DROP_VALUES") + private String drop_values; + + @Column(name = "SP") + private String sp; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn(name = "form_id", nullable = false) + @JsonBackReference + private Rn_Forms_Setup rn_forms_setup; + + public int getComponent_id() { + return component_id; + } + + public void setComponent_id(int component_id) { + this.component_id = component_id; + } + + public String getLabel() { + return label; + } + + public void setLabel(String label) { + this.label = label; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getMapping() { + return mapping; + } + + public void setMapping(String mapping) { + this.mapping = mapping; + } + + public String getMandatory() { + return mandatory; + } + + public void setMandatory(String mandatory) { + this.mandatory = mandatory; + } + + public String getReadonly() { + return readonly; + } + + public void setReadonly(String readonly) { + this.readonly = readonly; + } + + public String getDrop_values() { + return drop_values; + } + + public void setDrop_values(String drop_values) { + this.drop_values = drop_values; + } + + public String getSp() { + return sp; + } + + public void setSp(String sp) { + this.sp = sp; + } + + public Rn_Forms_Setup getRn_forms_setup() { + return rn_forms_setup; + } + + public void setRn_forms_setup(Rn_Forms_Setup rn_forms_setup) { + this.rn_forms_setup = rn_forms_setup; + } + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_Forms_Setup.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_Forms_Setup.java new file mode 100644 index 0000000..1391ade --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_Forms_Setup.java @@ -0,0 +1,102 @@ +package com.realnet.fnd.entity; + +import java.util.List; + +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.OneToMany; +import javax.persistence.Table; + +import com.fasterxml.jackson.annotation.JsonManagedReference; + +//@Data +//@EqualsAndHashCode(callSuper = false) +@Entity +@Table(name = "RN_FORMS_SETUP_T") +public class Rn_Forms_Setup extends Rn_Who_Columns { + private static final long serialVersionUID = 1L; + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "FORM_ID") + private int form_id; + + @Column(name = "FORM_NAME") + private String form_name; + + @Column(name = "FORM_DESC") + private String form_desc; + + @Column(name = "RELATED_TO") + private String related_to; + + @Column(name = "PAGE_EVENT") + private String page_event; + + @Column(name = "BUTTON_CAPTION") + private String button_caption; + + @OneToMany(mappedBy = "rn_forms_setup", cascade = CascadeType.ALL) + @JsonManagedReference + private List components; + + public int getForm_id() { + return form_id; + } + + public void setForm_id(int form_id) { + this.form_id = form_id; + } + + public String getForm_name() { + return form_name; + } + + public void setForm_name(String form_name) { + this.form_name = form_name; + } + + public String getForm_desc() { + return form_desc; + } + + public void setForm_desc(String form_desc) { + this.form_desc = form_desc; + } + + public String getRelated_to() { + return related_to; + } + + public void setRelated_to(String related_to) { + this.related_to = related_to; + } + + public String getPage_event() { + return page_event; + } + + public void setPage_event(String page_event) { + this.page_event = page_event; + } + + public String getButton_caption() { + return button_caption; + } + + public void setButton_caption(String button_caption) { + this.button_caption = button_caption; + } + + public List getComponents() { + return components; + } + + public void setComponents(List components) { + this.components = components; + } + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_Function_Register.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_Function_Register.java new file mode 100644 index 0000000..2e57239 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_Function_Register.java @@ -0,0 +1,111 @@ +package com.realnet.fnd.entity; + +import java.time.LocalDate; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; + +import com.fasterxml.jackson.annotation.JsonFormat; + +@Entity +@Table(name = "RN_FUNC_REGISTER") +public class Rn_Function_Register extends Rn_Who_Columns { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "ID") + private int id; + + @Column(name = "MENU_ID") + private int menu_id; + + @Column(name = "FUNCTION_NAME") + private String function_name; + + @Column(name = "FUNCTION_ACTION_NAME") + private String function_action_name; + + @Column(name = "FUNCTION_ICON") + private String function_icon; + + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "MM/dd/yyyy") + @Column(name = "END_DATE") + private LocalDate end_date; + + @Column(name = "ENABLE_FLAG") + private String enable_flag; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public int getMenu_id() { + return menu_id; + } + + public void setMenu_id(int menu_id) { + this.menu_id = menu_id; + } + + public String getFunction_name() { + return function_name; + } + + public void setFunction_name(String function_name) { + this.function_name = function_name; + } + + public String getFunction_action_name() { + return function_action_name; + } + + public void setFunction_action_name(String function_action_name) { + this.function_action_name = function_action_name; + } + + public String getFunction_icon() { + return function_icon; + } + + public void setFunction_icon(String function_icon) { + this.function_icon = function_icon; + } + + public LocalDate getEnd_date() { + return end_date; + } + + public void setEnd_date(LocalDate end_date) { + this.end_date = end_date; + } + + public String getEnable_flag() { + return enable_flag; + } + + public void setEnable_flag(String enable_flag) { + this.enable_flag = enable_flag; + } + +// @Column(name = "MENU_NAME") +// private String menu_name; +// public String getMenu_name() { +// return menu_name; +// } +// public void setMenu_name(String menu_name) { +// this.menu_name = menu_name; +// } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_Instance_Type.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_Instance_Type.java new file mode 100644 index 0000000..579154c --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_Instance_Type.java @@ -0,0 +1,37 @@ +package com.realnet.fnd.entity; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; + +@Entity +@Table(name = "RN_INSTANCE_TYPE_T") +public class Rn_Instance_Type { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "ID") + private Integer id; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + @Column(name = "INSTANCE_TYPE") + private String instanceType; + + public String getInstanceType() { + return instanceType; + } + + public void setInstanceType(String instanceType) { + this.instanceType = instanceType; + } + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_Lookup_Values.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_Lookup_Values.java new file mode 100644 index 0000000..e55cc87 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_Lookup_Values.java @@ -0,0 +1,201 @@ +package com.realnet.fnd.entity; + +import java.util.Date; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; + +@Entity +@Table(name = "RN_LOOKUP_VALUES_T") + +public class Rn_Lookup_Values extends Rn_Who_Columns { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "ID") + private Integer id; + + @Column(name = "LOOKUP_CODE") + private String lookupCode; + + @Column(name = "MEANING") + private String meaning; + + @Column(name = "DESCRIPTION") + private String description; + + @Column(name = "LOOKUP_TYPE") + private String lookupType; + + @Column(name = "ACTIVE_START_DATE") + private Date active_start_date; + + @Column(name = "ACTIVE_END_DATE") + private Date active_end_date; + + @Column(name = "DROP_VALUE") + private String dropValue; + + @Column(name = "ENABLED_FLAG") + private boolean enabled_flag; + + // +// @Column(name = "PATIENT_COUNTRY") +// private String patientCountry; +// +// +// +// @Column(name = "STATE_NAME") +// private String stateName; +// +// @Column(name = "CITY_NAME") +// private String cityName; +// +// @Column(name = "ZIP_CODE") +// private String zipCode; +// +// @Column(name = "COUNTRY_ID") +// private int country_id; + + public Rn_Lookup_Values() { + super(); + } + + + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getLookupCode() { + return lookupCode; + } + + public void setLookupCode(String lookupCode) { + this.lookupCode = lookupCode; + } + + public String getMeaning() { + return meaning; + } + + public void setMeaning(String meaning) { + this.meaning = meaning; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getLookupType() { + return lookupType; + } + + public void setLookupType(String lookupType) { + this.lookupType = lookupType; + } + + + + public String getDropValue() { + return dropValue; + } + + public void setDropValue(String dropValue) { + this.dropValue = dropValue; + } + + public Date getActive_start_date() { + return active_start_date; + } + + public void setActive_start_date(Date active_start_date) { + this.active_start_date = active_start_date; + } + + public Date getActive_end_date() { + return active_end_date; + } + + public void setActive_end_date(Date active_end_date) { + this.active_end_date = active_end_date; + } + + public boolean isEnabled_flag() { + return enabled_flag; + } + + public void setEnabled_flag(boolean enabled_flag) { + this.enabled_flag = enabled_flag; + } + +// @Column(name = "CREATED_BY") +// private int created_by; +// +// @DateTimeFormat(pattern = "dd/mm/yyyy") +// @Column(name = "CREATION_DATE") +// private Date creation_date = new java.sql.Date(new java.util.Date().getTime()); +// +// @Column(name = "LAST_UPDATED_BY") +// private int last_updated_by; +// +// @DateTimeFormat(pattern = "dd/mm/yyyy") +// @Column(name = "LAST_UPDATE_DATE") +// private Date last_update_date = new java.sql.Date(new java.util.Date().getTime()); + +// public String getPatientCountry() { +// return patientCountry; +// } +// +// public void setPatientCountry(String patientCountry) { +// this.patientCountry = patientCountry; +// } +// public String getStateName() { +// return stateName; +// } +// +// public void setStateName(String stateName) { +// this.stateName = stateName; +// } +// +// public String getCityName() { +// return cityName; +// } +// +// public void setCityName(String cityName) { +// this.cityName = cityName; +// } +// +// public String getZipCode() { +// return zipCode; +// } +// +// public void setZipCode(String zipCode) { +// this.zipCode = zipCode; +// } +// +// public int getCountry_id() { +// return country_id; +// } +// +// public void setCountry_id(int country_id) { +// this.country_id = country_id; +// } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_Main_Menu.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_Main_Menu.java new file mode 100644 index 0000000..f5ee817 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_Main_Menu.java @@ -0,0 +1,108 @@ +package com.realnet.fnd.entity; + +import java.util.List; + +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.OneToMany; +import javax.persistence.Table; + +import com.fasterxml.jackson.annotation.JsonManagedReference; + +@Entity +@Table(name = "RN_MAIN_MENU") +public class Rn_Main_Menu extends Rn_Who_Columns { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "ID") + private Integer id; + + @Column(name = "MENU_NAME") + private String menu_name; + + @Column(name = "MENU_ACTION_LINK") + private String menu_action_link; + + @Column(name = "MENU_ICON") + private String menu_icon; + + @Column(name = "MENU_TYPE") + private String menu_type; + + @OneToMany(mappedBy = "rn_main_menu", cascade = CascadeType.ALL) + @JsonManagedReference + private List sub_menus; + + public Rn_Main_Menu() { + super(); + } + + public Rn_Main_Menu(Integer id, String menu_name, String menu_action_link, String menu_icon, String menu_type, + List sub_menus) { + super(); + this.id = id; + this.menu_name = menu_name; + this.menu_action_link = menu_action_link; + this.menu_icon = menu_icon; + this.menu_type = menu_type; + this.sub_menus = sub_menus; + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getMenu_name() { + return menu_name; + } + + public void setMenu_name(String menu_name) { + this.menu_name = menu_name; + } + + public String getMenu_action_link() { + return menu_action_link; + } + + public void setMenu_action_link(String menu_action_link) { + this.menu_action_link = menu_action_link; + } + + public String getMenu_icon() { + return menu_icon; + } + + public void setMenu_icon(String menu_icon) { + this.menu_icon = menu_icon; + } + + public String getMenu_type() { + return menu_type; + } + + public void setMenu_type(String menu_type) { + this.menu_type = menu_type; + } + + public List getSub_menus() { + return sub_menus; + } + + public void setSub_menus(List sub_menus) { + this.sub_menus = sub_menus; + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_Menu_Group_Header.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_Menu_Group_Header.java new file mode 100644 index 0000000..d1d87d7 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_Menu_Group_Header.java @@ -0,0 +1,265 @@ +package com.realnet.fnd.entity; + +import java.time.LocalDate; +import java.util.List; + +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.OneToMany; +import javax.persistence.Table; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonManagedReference; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer; + +import lombok.Data; +import lombok.Getter; +import lombok.Setter; + +@Entity +@Table(name = "RN_MENU_GROUP_HEADER") +public class Rn_Menu_Group_Header extends Rn_Who_Columns { + /** + * + */ + private static final long serialVersionUID = 1L; + + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "ID") + private Long id; + + @Column(name = "MENU_NAME") + private String menu_name; + + @Column(name = "DESCRIPTION") + private String description; + + @Column(name = "ACTIVE") + private boolean active; + + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "MM/dd/yyyy") + @JsonSerialize(using = LocalDateSerializer.class) + @Column(name = "START_DATE") + private LocalDate start_date; + + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "MM/dd/yyyy") + @JsonSerialize(using = LocalDateSerializer.class) + @Column(name = "END_DATE") + private LocalDate end_date; + + private String start_date_1; + private String end_date_1; + + // header + @OneToMany(mappedBy = "menu_group_header", cascade = CascadeType.ALL) + @JsonManagedReference + private List menu_group_lines; + + + public Rn_Menu_Group_Header() { + super(); + } + + + public Long getId() { + return id; + } + + + public void setId(Long id) { + this.id = id; + } + + + public String getMenu_name() { + return menu_name; + } + + + public void setMenu_name(String menu_name) { + this.menu_name = menu_name; + } + + + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + + public boolean isActive() { + return active; + } + + + public void setActive(boolean active) { + this.active = active; + } + + + public LocalDate getStart_date() { + return start_date; + } + + + public void setStart_date(LocalDate start_date) { + this.start_date = start_date; + } + + + public LocalDate getEnd_date() { + return end_date; + } + + + public void setEnd_date(LocalDate end_date) { + this.end_date = end_date; + } + + + public String getStart_date_1() { + return start_date_1; + } + + + public void setStart_date_1(String start_date_1) { + this.start_date_1 = start_date_1; + } + + + public String getEnd_date_1() { + return end_date_1; + } + + + public void setEnd_date_1(String end_date_1) { + this.end_date_1 = end_date_1; + } + + + public List getMenu_group_lines() { + return menu_group_lines; + } + + + public void setMenu_group_lines(List menu_group_lines) { + this.menu_group_lines = menu_group_lines; + } + + + public static long getSerialversionuid() { + return serialVersionUID; + } + + + public Rn_Menu_Group_Header(Long id, String menu_name, String description, boolean active, LocalDate start_date, + LocalDate end_date, String start_date_1, String end_date_1, List menu_group_lines) { + super(); + this.id = id; + this.menu_name = menu_name; + this.description = description; + this.active = active; + this.start_date = start_date; + this.end_date = end_date; + this.start_date_1 = start_date_1; + this.end_date_1 = end_date_1; + this.menu_group_lines = menu_group_lines; + } + +// public Rn_Menu_Group_Header(int id, String menu_name, String description, boolean active, LocalDate start_date, +// LocalDate end_date, List menu_group_lines) { +// super(); +// this.id = id; +// this.menu_name = menu_name; +// this.description = description; +// this.active = active; +// this.start_date = start_date; +// this.end_date = end_date; +// this.menu_group_lines = menu_group_lines; +// } +// +// public int getId() { +// return id; +// } +// +// public void setId(int id) { +// this.id = id; +// } +// +// public String getMenu_name() { +// return menu_name; +// } +// +// public void setMenu_name(String menu_name) { +// this.menu_name = menu_name; +// } +// +// public String getDescription() { +// return description; +// } +// +// public void setDescription(String description) { +// this.description = description; +// } +// +// public boolean getActive() { +// return active; +// } +// +// public void setActive(boolean active) { +// this.active = active; +// } +// +// public LocalDate getStart_date() { +// return start_date; +// } +// +// public void setStart_date(LocalDate start_date) { +// this.start_date = start_date; +// } +// +// public LocalDate getEnd_date() { +// return end_date; +// } +// +// public void setEnd_date(LocalDate end_date) { +// this.end_date = end_date; +// } +// +// public List getMenu_group_lines() { +// return menu_group_lines; +// } +// +// public void setMenu_group_lines(List menu_group_lines) { +// this.menu_group_lines = menu_group_lines; +// } +// +// public String getStart_date_1() { +// return start_date_1; +// } +// +// public void setStart_date_1(String start_date_1) { +// this.start_date_1 = start_date_1; +// } +// +// public String getEnd_date_1() { +// return end_date_1; +// } +// +// public void setEnd_date_1(String end_date_1) { +// this.end_date_1 = end_date_1; +// } +// +// +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_Menu_Group_Line.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_Menu_Group_Line.java new file mode 100644 index 0000000..64fc465 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_Menu_Group_Line.java @@ -0,0 +1,137 @@ +package com.realnet.fnd.entity; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; + +import com.fasterxml.jackson.annotation.JsonBackReference; + +@Entity +@Table(name = "RN_MENU_GROUP_LINE") +// @Table(name = "rn_menu_group_line_1") +public class Rn_Menu_Group_Line extends Rn_Who_Columns { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "ID") + private int id; + + @Column(name = "MENU_ID") + private int menu_id; + + private String menu_name; + + + + @Column(name = "NAME") + private String name; + + @Column(name = "ACTIVE") + private boolean active; + + + @Column(name = "SEQ") + private int seq; + + @Column(name = "TYPE") + private String type; + + // line + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn(name = "menu_group_header_id", nullable = false) + @JsonBackReference + private Rn_Menu_Group_Header menu_group_header; + + public Rn_Menu_Group_Line() { + super(); + } + + public Rn_Menu_Group_Line(int id, String name, boolean active, int menu_id, + int seq, String type, Rn_Menu_Group_Header menu_group_header) { + super(); + this.id = id; + this.name = name; + this.active = active; + this.menu_id = menu_id; + this.seq = seq; + this.type = type; + this.menu_group_header = menu_group_header; + } + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public boolean getActive() { + return active; + } + + public void setActive(boolean active) { + this.active = active; + } + + + public int getMenu_id() { + return menu_id; + } + + public void setMenu_id(int menu_id) { + this.menu_id = menu_id; + } + + public int getSeq() { + return seq; + } + + public void setSeq(int seq) { + this.seq = seq; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Rn_Menu_Group_Header getMenu_group_header() { + return menu_group_header; + } + + public void setMenu_group_header(Rn_Menu_Group_Header menu_group_header) { + this.menu_group_header = menu_group_header; + } + + public String getMenu_name() { + return menu_name; + } + + public void setMenu_name(String menu_name) { + this.menu_name = menu_name; + } + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_Menu_Register.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_Menu_Register.java new file mode 100644 index 0000000..4c6e7ea --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_Menu_Register.java @@ -0,0 +1,109 @@ +package com.realnet.fnd.entity; + +import java.time.LocalDate; +import java.util.Date; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; + +import com.fasterxml.jackson.annotation.JsonFormat; + +@Entity +@Table(name = "RN_MENU_REGISTER") +public class Rn_Menu_Register extends Rn_Who_Columns { + + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "ID") + private int id; + + @Column(name = "MAIN_MENU_NAME") + private String main_menu_name; + + @Column(name = "MAIN_MENU_ACTION_NAME") + private String main_menu_action_name; + + @Column(name = "MAIN_MENU_ICON") + private String main_menu_icon; + + @Column(name = "ENABLE_FLAG") + private boolean enable_flag; + + // @DateTimeFormat(pattern = "dd/mm/yyyy") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "MM/dd/yyyy") + @Column(name = "END_DATE") + private LocalDate end_date; + + private String end_date_1; + + public Rn_Menu_Register() {} + + public boolean getEnable_flag() { + return enable_flag; + } + + public void setEnable_flag(boolean enable_flag) { + this.enable_flag = enable_flag; + } + + public LocalDate getEnd_date() { + return end_date; + } + + public void setEnd_date(LocalDate end_date) { + this.end_date = end_date; + } + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getMain_menu_name() { + return main_menu_name; + } + + public void setMain_menu_name(String main_menu_name) { + this.main_menu_name = main_menu_name; + } + + public String getMain_menu_action_name() { + return main_menu_action_name; + } + + public void setMain_menu_action_name(String main_menu_action_name) { + this.main_menu_action_name = main_menu_action_name; + } + + public String getMain_menu_icon() { + return main_menu_icon; + } + + public void setMain_menu_icon(String main_menu_icon) { + this.main_menu_icon = main_menu_icon; + } + + public String getEnd_date_1() { + return end_date_1; + } + + public void setEnd_date_1(String end_date_1) { + this.end_date_1 = end_date_1; + } + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_Sub_Menu.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_Sub_Menu.java new file mode 100644 index 0000000..7a10303 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_Sub_Menu.java @@ -0,0 +1,98 @@ +package com.realnet.fnd.entity; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; + +import com.fasterxml.jackson.annotation.JsonBackReference; + +@Entity +@Table(name = "RN_SUB_MENU") +public class Rn_Sub_Menu extends Rn_Who_Columns { + /** + * + */ + private static final long serialVersionUID = 1L; + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "ID") + private Integer id; + + @Column(name = "SUB_MENU_NAME") + private String sub_menu_name; + + @Column(name = "SUB_MENU_ICON") + private String sub_menu_icon; + + @Column(name = "SUB_MENU_ACTION_LINK") + private String sub_menu_action_link; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn(name = "MAIN_MENU_ID") + @JsonBackReference + private Rn_Main_Menu rn_main_menu; + + public Rn_Sub_Menu() { + super(); + } + + + + public Rn_Sub_Menu(Integer id, String sub_menu_name, String sub_menu_icon, String sub_menu_action_link, + Rn_Main_Menu rn_main_menu) { + super(); + this.id = id; + this.sub_menu_name = sub_menu_name; + this.sub_menu_icon = sub_menu_icon; + this.sub_menu_action_link = sub_menu_action_link; + this.rn_main_menu = rn_main_menu; + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getSub_menu_name() { + return sub_menu_name; + } + + public void setSub_menu_name(String sub_menu_name) { + this.sub_menu_name = sub_menu_name; + } + + public String getSub_menu_icon() { + return sub_menu_icon; + } + + public void setSub_menu_icon(String sub_menu_icon) { + this.sub_menu_icon = sub_menu_icon; + } + + public String getSub_menu_action_link() { + return sub_menu_action_link; + } + + public void setSub_menu_action_link(String sub_menu_action_link) { + this.sub_menu_action_link = sub_menu_action_link; + } + + public Rn_Main_Menu getRn_main_menu() { + return rn_main_menu; + } + + public void setRn_main_menu(Rn_Main_Menu rn_main_menu) { + this.rn_main_menu = rn_main_menu; + } + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_Who_AccId_Column.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_Who_AccId_Column.java new file mode 100644 index 0000000..ba025d4 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_Who_AccId_Column.java @@ -0,0 +1,81 @@ +package com.realnet.fnd.entity; + +import java.io.Serializable; +import java.util.Date; + +import javax.persistence.Column; +import javax.persistence.EntityListeners; +import javax.persistence.MappedSuperclass; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; + +import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.annotation.LastModifiedDate; +import org.springframework.data.jpa.domain.support.AuditingEntityListener; + +@MappedSuperclass +@EntityListeners(AuditingEntityListener.class) +public class Rn_Who_AccId_Column implements Serializable { + private static final long serialVersionUID = 1L; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "CREATED_AT", nullable = false, updatable = false) + @CreatedDate + private Date createdAt; + + // @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime createdAt; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "UPDATED_AT", nullable = false) + @LastModifiedDate + private Date updatedAt; + + @Column(name = "CREATED_BY", updatable = false) + private Long createdBy; + + @Column(name = "UPDATED_BY") + private Long updatedBy; + + @Column(name = "ACCOUNT_ID") + private Long accountId; + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Long getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(Long createdBy) { + this.createdBy = createdBy; + } + + public Long getUpdatedBy() { + return updatedBy; + } + + public void setUpdatedBy(Long updatedBy) { + this.updatedBy = updatedBy; + } + + public Long getAccountId() { + return accountId; + } + + public void setAccountId(Long accountId) { + this.accountId = accountId; + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_Who_Columns.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_Who_Columns.java new file mode 100644 index 0000000..b6a2d38 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Rn_Who_Columns.java @@ -0,0 +1,65 @@ +package com.realnet.fnd.entity; + +import java.io.Serializable; +import java.util.Date; + +import javax.persistence.Column; +import javax.persistence.EntityListeners; +import javax.persistence.MappedSuperclass; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; + +import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.annotation.LastModifiedDate; +import org.springframework.data.jpa.domain.support.AuditingEntityListener; + +@MappedSuperclass +@EntityListeners(AuditingEntityListener.class) +public class Rn_Who_Columns implements Serializable { + private static final long serialVersionUID = 1L; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "CREATED_AT", nullable = false, updatable = false) + @CreatedDate + private Date createdAt; + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "UPDATED_AT", nullable = false) + @LastModifiedDate + private Date updatedAt; + @Column(name = "CREATED_BY", updatable = false) + private Long createdBy; + @Column(name = "UPDATED_BY") + private Long updatedBy; + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Long getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(Long createdBy) { + this.createdBy = createdBy; + } + + public Long getUpdatedBy() { + return updatedBy; + } + + public void setUpdatedBy(Long updatedBy) { + this.updatedBy = updatedBy; + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/SingleSerise.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/SingleSerise.java new file mode 100644 index 0000000..10ade6b --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/SingleSerise.java @@ -0,0 +1,16 @@ +package com.realnet.fnd.entity; + +import java.math.BigDecimal; + +import lombok.Data; + +@Data +public class SingleSerise { + private String name; + private BigDecimal value; + + public SingleSerise( String name, BigDecimal value){ + this.name = name; + this.value = value; + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Success.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Success.java new file mode 100644 index 0000000..4061bc0 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Success.java @@ -0,0 +1,41 @@ +package com.realnet.fnd.entity; + +import java.io.Serializable; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +@JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" }) +public class Success implements Serializable { + + private static final long serialVersionUID = 1L; + + private String message; + + private String title; + + public String getMessage () + { + return message; + } + + public void setMessage (String message) + { + this.message = message; + } + + public String getTitle () + { + return title; + } + + public void setTitle (String title) + { + this.title = title; + } + + @Override + public String toString() + { + return "ClassPojo [message = "+message+", title = "+title+"]"; + } +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/SuccessPojo.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/SuccessPojo.java new file mode 100644 index 0000000..df220bb --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/SuccessPojo.java @@ -0,0 +1,36 @@ +package com.realnet.fnd.entity; + +import java.io.Serializable; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +@JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" }) +public class SuccessPojo implements Serializable { + + private static final long serialVersionUID = 1L; + + private Success success; + + public SuccessPojo() { + + } + + public SuccessPojo(Success success) { + this.success = success; + } + + + public Success getSuccess() { + return success; + } + + public void setSuccess(Success success) { + this.success = success; + } + + @Override + public String toString() + { + return "ClassPojo [success = "+success+"]"; + } +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Version.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Version.java new file mode 100644 index 0000000..95cb5c0 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/Version.java @@ -0,0 +1,32 @@ +package com.realnet.fnd.entity; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.session.entity.VersionModel; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiResponse; +import io.swagger.annotations.ApiResponses; + +@RestController +@RequestMapping(value = "/version", produces = { "application/json" }) +@Api(tags = {"Common"}) +public class Version { + @ApiOperation(value = "Gets the version of the REST API", notes = "", response = VersionModel.class) + @ApiResponses(value = { @ApiResponse(code = 200, message = "Returns the version info for the REST API.", response = VersionModel.class) }) + @RequestMapping( method = RequestMethod.GET) + public VersionModel getVersion() { + //Authentication ath = SecurityContextHolder.getContext().getAuthentication(); + //TokenUser usr = (TokenUser)ath.getDetails(); + //String customerId = usr.getUser().getCustomerId() + VersionModel r = new VersionModel(); + r.setVersion("1.0.0"); + r.setMajor(1); + r.setMinor(0); + r.setPatch(0); + return r; + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/WireFrameCopyDTO.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/WireFrameCopyDTO.java new file mode 100644 index 0000000..36b5d34 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/WireFrameCopyDTO.java @@ -0,0 +1,18 @@ +package com.realnet.fnd.entity; + +import lombok.Data; + +@Data +public class WireFrameCopyDTO { + private int from_projectId; + private int from_moduleId; + private int from_WireFrameId; + private String to_uiName; + + public WireFrameCopyDTO() { + super(); + } + + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/projectCopyDTO.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/projectCopyDTO.java new file mode 100644 index 0000000..a04cae9 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity/projectCopyDTO.java @@ -0,0 +1,12 @@ +package com.realnet.fnd.entity; + +import lombok.Data; + +@Data +public class projectCopyDTO { + private int from_projectId; + private String to_projectName; + private String to_tech_stack; + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity1/ExtensionModel.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity1/ExtensionModel.java new file mode 100644 index 0000000..63bec83 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity1/ExtensionModel.java @@ -0,0 +1,47 @@ +package com.realnet.fnd.entity1; + +import javax.persistence.Column; + +import lombok.Data; + +@Data +public class ExtensionModel { + + + + private String ext1; + private String ext2; + private String ext3; + private String ext4; + private String ext5; + private String ext6; + private String ext7; + private String ext8; + private String ext9; + private String ext10; + + @Column(length = 4000) + private String bigext1; + + @Column(length = 4000) + private String bigext2; + + @Column(length = 4000) + private String bigext3; + + @Column(length = 4000) + private String bigext4; + + @Column(length = 4000) + private String bigext5; + + private String flex1; + private String flex2; + + private String flex3; + private String flex4; + private String flex5; + + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity1/GrpMenuAccess.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity1/GrpMenuAccess.java new file mode 100644 index 0000000..8186c9d --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity1/GrpMenuAccess.java @@ -0,0 +1,90 @@ +package com.realnet.fnd.entity1; + + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.IdClass; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.OneToMany; +import javax.persistence.Table; +import javax.persistence.Transient; + +import com.realnet.users.entity1.AppUserRole; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + +@Entity +@Table(name="SEC_GRP_MENU_ACCESS") +@IdClass(GrpMenuAccesscompositeKey.class) +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@ToString +public class GrpMenuAccess { + @Id + @ManyToOne + @JoinColumn(name = "usr_grp") + private AppUserRole usrGrp; + @Id + @ManyToOne + @JoinColumn(name = "menu_item_id") + private MenuDet menuItemId; + private String mCreate; + private String mEdit; + private String mQuery; + private String mDelete; + private String mexport; + + + private Long menuId; + private String mVisible; + private String createby; + private Date createdAt; + private String updateby; + private Date updatedAt; + + private String isdisable; + + + @Column(name = "itemSeq") + private Long itemSeq; + + @Column(name = "MenuItemDesc") + private String menuItemDesc; + private String status; + + + @Column(name = "moduleName") + private String moduleName; + + + + @Column(name = "MainMenuActionName") + private String main_menu_action_name; + + @Column(name = "MainMenuIconName") + private String main_menu_icon_name; + + @Transient + private List subMenus=new ArrayList(); + + + @Transient + private Long grpid; + @Transient + private Long gmenuid; + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity1/GrpMenuAccesscompositeKey.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity1/GrpMenuAccesscompositeKey.java new file mode 100644 index 0000000..5fedd4e --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity1/GrpMenuAccesscompositeKey.java @@ -0,0 +1,25 @@ +package com.realnet.fnd.entity1; + +import java.io.Serializable; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +@Data +@Getter +@Setter +@EqualsAndHashCode +@AllArgsConstructor +@NoArgsConstructor +public class GrpMenuAccesscompositeKey implements Serializable{ + /** + * + */ + private static final long serialVersionUID = 1L; + private Long menuItemId; + private Long usrGrp; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity1/MIXMENUN.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity1/MIXMENUN.java new file mode 100644 index 0000000..2334163 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity1/MIXMENUN.java @@ -0,0 +1,33 @@ +package com.realnet.fnd.entity1; + +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.List; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + +@Data +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@ToString +public class MIXMENUN { + private long menuItemId; + private String menuItemDesc; + private long menuId; + + private String mainMenuActionName; + private String mainMenuIconName; + private String mCreate; + private String mEdit; + private String mQuery; + private String mDelete; + private String mVisible; + private List subMenus; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity1/MenuDet.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity1/MenuDet.java new file mode 100644 index 0000000..35c26f7 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity1/MenuDet.java @@ -0,0 +1,80 @@ +package com.realnet.fnd.entity1; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import javax.persistence.Transient; + +import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.annotation.LastModifiedDate; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + +@Entity +@Table(name = "SEC_MENU_DET") +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@ToString +public class MenuDet extends menudet_who{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private Long menuItemId; + + @Column(name = "itemSeq") + private Long itemSeq; + + @Column(name = "MenuItemDesc") + private String menuItemDesc; + private String status; + + private Long menuId; + + @Column(name = "moduleName") + private String moduleName; + + + + + + @Column(name = "MainMenuActionName") + private String main_menu_action_name; + + @Column(name = "MainMenuIconName") + private String main_menu_icon_name; + + @Transient + private List subMenus=new ArrayList();; + + + + + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity1/MixMenu.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity1/MixMenu.java new file mode 100644 index 0000000..72a0ee9 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity1/MixMenu.java @@ -0,0 +1,37 @@ +package com.realnet.fnd.entity1; + +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.List; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + +@Data +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@ToString +public class MixMenu { +// private BigDecimal menuItemId; + private BigInteger menuItemId; + + private String menuItemDesc; +// private BigDecimal menuId; + private BigInteger menuId; + + + private String mainMenuActionName; + private String mainMenuIconName; + private String mCreate; + private String mEdit; + private String mQuery; + private String mDelete; + private String mVisible; + private List subMenus; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity1/MixMenuNew.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity1/MixMenuNew.java new file mode 100644 index 0000000..72fcedd --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity1/MixMenuNew.java @@ -0,0 +1,17 @@ +package com.realnet.fnd.entity1; + +import java.math.BigDecimal; + +public interface MixMenuNew { + + BigDecimal getmenu_item_id(); + String getmenu_item_desc(); + BigDecimal getmenu_id(); + String getm_create(); + String getmain_menu_action_name(); + String getmain_menu_icon_name(); + String getm_edit(); + String getm_query(); + String getm_delete(); + String getm_visible(); +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity1/menudet_who.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity1/menudet_who.java new file mode 100644 index 0000000..d7de0ef --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/entity1/menudet_who.java @@ -0,0 +1,46 @@ +package com.realnet.fnd.entity1; + +import java.io.Serializable; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.EntityListeners; +import javax.persistence.MappedSuperclass; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.annotation.LastModifiedDate; +import org.springframework.data.jpa.domain.support.AuditingEntityListener; + +import lombok.Data; + +@Data +@MappedSuperclass +@EntityListeners(AuditingEntityListener.class) +public class menudet_who implements Serializable{ + + private static final long serialVersionUID = 1L; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "CREATED_AT", nullable = false, updatable = false) + @CreatedDate + private Date createdAt; + + // @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime createdAt; + + +// @Column(name = "CREATED_BY", updatable = false) +// private Long createdBy; + +// @Column(name = "UPDATED_BY") +// private Long updatedBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "UPDATED_AT", nullable = false) + @LastModifiedDate + private Date updatedAt; + +// @Column(name = "ACCOUNT_ID") +// private Long accountId; + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/repository/ExtFieldRepository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/repository/ExtFieldRepository.java new file mode 100644 index 0000000..d2d7daa --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/repository/ExtFieldRepository.java @@ -0,0 +1,17 @@ +package com.realnet.fnd.repository; + +import java.util.List; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; + +import com.realnet.fnd.entity.Rn_Ext_Fields; + +@Repository +public interface ExtFieldRepository extends JpaRepository { + + @Query(value= "SELECT * FROM rn_ext_field_t WHERE ACCOUNT_ID=:acc_id AND FORM_CODE=:f_code" , nativeQuery = true) + List getExtensionFieldByFormCode(@Param("acc_id")String accountId, @Param("f_code") String form_code); +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/repository/LookUpRepository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/repository/LookUpRepository.java new file mode 100644 index 0000000..a896224 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/repository/LookUpRepository.java @@ -0,0 +1,19 @@ +package com.realnet.fnd.repository; + +import java.util.List; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.stereotype.Repository; + +import com.realnet.fnd.entity.Rn_Lookup_Values; + +@Repository +public interface LookUpRepository extends JpaRepository { + + @Query(value = "SELECT LOOKUP_CODE FROM RN_LOOKUP_VALUES_T WHERE LOOKUP_TYPE ='Form_ext'" , nativeQuery = true) + List getLookupValues(); + + @Query(value = "SELECT LOOKUP_CODE FROM RN_LOOKUP_VALUES_T WHERE LOOKUP_TYPE ='DataType'" , nativeQuery = true) + List getDataTypeValues(); +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/repository/RnGroupLineRepository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/repository/RnGroupLineRepository.java new file mode 100644 index 0000000..c88de92 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/repository/RnGroupLineRepository.java @@ -0,0 +1,14 @@ +package com.realnet.fnd.repository; + +import java.util.List; + +import org.springframework.data.jpa.repository.JpaRepository; + +import com.realnet.fnd.entity.Rn_Menu_Group_Header; +import com.realnet.fnd.entity.Rn_Menu_Group_Line; + +public interface RnGroupLineRepository extends JpaRepository { + +// public List findByHeader(Rn_Menu_Group_Header menu_group_header); + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/repository/Rn_DynamicTransactionRepository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/repository/Rn_DynamicTransactionRepository.java new file mode 100644 index 0000000..9d25b05 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/repository/Rn_DynamicTransactionRepository.java @@ -0,0 +1,30 @@ +package com.realnet.fnd.repository; + +import java.util.List; +import java.util.Optional; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; + +import com.realnet.fnd.entity.Rn_Dynamic_Transaction; + +@Repository +public interface Rn_DynamicTransactionRepository extends JpaRepository { + + // JPQL + // @Query("SELECT e from RN_DYNAMIC_TRANSACTION e where e.FORM_ID =:form_id") + // @Query("SELECT e from RN_DYNAMIC_TRANSACTION e where e.FORM_ID =:form_id AND e.ID =:id") + + // NATIVE + // @Query(value = "SELECT * FROM RN_DYNAMIC_TRANSACTION WHERE FORM_ID =:form_id", nativeQuery = true) + // @Query(value = "SELECT * FROM RN_DYNAMIC_TRANSACTION WHERE ID =:id ANDFORM_ID =:form_id" , nativeQuery = true) + + @Query(value = "SELECT * FROM rn_dynamic_transaction WHERE FORM_ID =:form_id", nativeQuery = true) + List findByFormId(@Param("form_id") int form_id); + + @Query(value = "SELECT * FROM rn_dynamic_transaction WHERE ID =:id AND FORM_ID =:form_id", nativeQuery = true) + Optional findByIdAndFormId(@Param("id") int id, @Param("form_id") int form_id); + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/repository/Rn_Forms_Setup_Repository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/repository/Rn_Forms_Setup_Repository.java new file mode 100644 index 0000000..95df5fc --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/repository/Rn_Forms_Setup_Repository.java @@ -0,0 +1,24 @@ +package com.realnet.fnd.repository; + +import java.util.List; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; + +import com.realnet.fnd.entity.Rn_Forms_Setup; + +@Repository +public interface Rn_Forms_Setup_Repository extends JpaRepository { + + // JPQL: @Query("SELECT e from RN_FORMS_SETUP_T e where e.FORM_ID =:form_id") + // NATIVE : @Query(value = "SELECT * FROM RN_FORMS_SETUP_T WHERE FORM_ID=:form_id" , nativeQuery = true) + + @Query(value = "SELECT * FROM RN_FORMS_SETUP_T WHERE FORM_ID=:form_id", nativeQuery = true) + List findByFormId(@Param("form_id") int form_id); + + // @Query(value = "SELECT * FROM RN_DYNAMIC_TRANSACTION WHERE FORM_ID=:form_id", + // nativeQuery = true) + // Optional findByFormId(@Param("form_id") int form_id); +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/repository/Rn_Function_Register_Repository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/repository/Rn_Function_Register_Repository.java new file mode 100644 index 0000000..2fc624d --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/repository/Rn_Function_Register_Repository.java @@ -0,0 +1,22 @@ +package com.realnet.fnd.repository; + +import java.util.List; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; + +import com.realnet.fnd.entity.Rn_Function_Register; + +@Repository +public interface Rn_Function_Register_Repository extends JpaRepository { + // for pagination + Page findAll(Pageable p); + + @Query(value = "SELECT * FROM RN_FUNC_REGISTER WHERE MENU_ID =:menu_id" , nativeQuery = true) + List findByMenuId(@Param("menu_id") int menu_id); + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/repository/Rn_InstanceTypeRepository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/repository/Rn_InstanceTypeRepository.java new file mode 100644 index 0000000..3419ced --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/repository/Rn_InstanceTypeRepository.java @@ -0,0 +1,11 @@ +package com.realnet.fnd.repository; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +import com.realnet.fnd.entity.Rn_Instance_Type; + +@Repository +public interface Rn_InstanceTypeRepository extends JpaRepository { + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/repository/Rn_LookUpRepository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/repository/Rn_LookUpRepository.java new file mode 100644 index 0000000..aa3403d --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/repository/Rn_LookUpRepository.java @@ -0,0 +1,30 @@ +package com.realnet.fnd.repository; + +import java.io.IOException; +import java.util.List; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.stereotype.Repository; + +import com.realnet.fnd.entity.Rn_Lookup_Values; + +@Repository +public interface Rn_LookUpRepository extends JpaRepository { + // for pagination + Page findAll(Pageable p); + + @Query(value = "SELECT LOOKUP_CODE FROM RN_LOOKUP_VALUES_T WHERE LOOKUP_TYPE ='Form_ext'" , nativeQuery = true) + List findLookupValues(); + + @Query(value = "SELECT LOOKUP_CODE FROM RN_LOOKUP_VALUES_T WHERE LOOKUP_TYPE ='DataType'" , nativeQuery = true) + List findDataTypeValues(); + + + @Query(value = "SELECT * FROM RN_LOOKUP_VALUES_T WHERE LOOKUP_TYPE ='Form_ext'" , nativeQuery = true) + List findExtensions(); + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/repository/Rn_Main_Menu_Repository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/repository/Rn_Main_Menu_Repository.java new file mode 100644 index 0000000..1222879 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/repository/Rn_Main_Menu_Repository.java @@ -0,0 +1,21 @@ +package com.realnet.fnd.repository; + +import java.util.List; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; + +import com.realnet.fnd.entity.Rn_Main_Menu; + +@Repository +public interface Rn_Main_Menu_Repository extends JpaRepository { + // for pagination + Page findAll(Pageable p); + + @Query(value = "SELECT * FROM RN_MAIN_MENU WHERE ACCOUNT_ID =:acc_id" , nativeQuery = true) + List findByAccountId(@Param("acc_id") String account_id); // accountId +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/repository/Rn_Menu_Group_Repository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/repository/Rn_Menu_Group_Repository.java new file mode 100644 index 0000000..53c9f91 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/repository/Rn_Menu_Group_Repository.java @@ -0,0 +1,17 @@ +package com.realnet.fnd.repository; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +import com.realnet.fnd.entity.Rn_Menu_Group_Header; + +@Repository +public interface Rn_Menu_Group_Repository extends JpaRepository { + + // JPQL: @Query("SELECT e from RN_FORMS_SETUP_T e where e.FORM_ID =:form_id") + // NATIVE : @Query(value = "SELECT * FROM RN_FORMS_SETUP_T WHERE FORM_ID=:form_id" , nativeQuery = true) + +// @Query(value = "SELECT * FROM RN_FORMS_SETUP_T WHERE FORM_ID=:form_id", nativeQuery = true) +// List findByFormId(@Param("form_id") int form_id); + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/repository/Rn_Menu_Register_Repository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/repository/Rn_Menu_Register_Repository.java new file mode 100644 index 0000000..c0c8b3e --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/repository/Rn_Menu_Register_Repository.java @@ -0,0 +1,21 @@ +package com.realnet.fnd.repository; + +import java.util.List; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; + +import com.realnet.fnd.entity.Rn_Menu_Register; + +@Repository +public interface Rn_Menu_Register_Repository extends JpaRepository { + // for pagination + Page findAll(Pageable p); + + @Query(value = "SELECT * FROM RN_MENU_REGISTER WHERE ACCOUNT_ID =:acc_id" , nativeQuery = true) + List findByAccountId(@Param("acc_id") String account_id); // accountId +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/repository1/GrpMenuAccessRepository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/repository1/GrpMenuAccessRepository.java new file mode 100644 index 0000000..9cf5daa --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/repository1/GrpMenuAccessRepository.java @@ -0,0 +1,87 @@ +package com.realnet.fnd.repository1; + +import java.util.List; +import java.util.Optional; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; + +import com.realnet.fnd.entity1.GrpMenuAccess; +import com.realnet.fnd.entity1.GrpMenuAccesscompositeKey; + +@Repository +public interface GrpMenuAccessRepository extends JpaRepository{ + + @Query(value="SELECT * FROM sec_grp_menu_access a where a.usr_grp= ?1", nativeQuery = true) + GrpMenuAccess findByUsrGrp(Long usr_grp); + + @Query(value="SELECT * FROM sec_grp_menu_access a where a.usr_grp= ?1 ORDER BY item_seq", nativeQuery = true) + List< GrpMenuAccess> findAllByUsrGrp(Long usr_grp); + + @Query(value="SELECT * FROM sec_grp_menu_access a where a.menu_item_id=?1",nativeQuery = true) + GrpMenuAccess findbymenuitemid(Long menu_item_id); + + @Query(value="SELECT * FROM sec_grp_menu_access where child = 0 ", nativeQuery = true) + List findAllRoots(); + + @Query(value="SELECT * FROM sec_grp_menu_access a where a.child=:parent", nativeQuery = true) + List findAllSubmenu(@Param("parent") Long parent); +// @Query(value="SELECT * FROM sec_grp_menu_access a where a.parent=:parent", nativeQuery = true) +// GrpMenuAccess findById(@Param("parent") Long parent); + +// @Query(value="SELECT * FROM sec_grp_menu_access where child = 0 and created_for =:created_for ", nativeQuery = true) +// List findAllRootsbyusrGrp(@Param("created_for") Long created_for); + + @Query(value="SELECT * FROM sec_grp_menu_access where child = 0 and usr_grp =:usr_grp ", nativeQuery = true) + List findAllRootsbyusrGrp(@Param("usr_grp") Long usr_grp); + + @Query(value="SELECT * FROM sec_grp_menu_access where menu_id = 0 and status= 'Enable' and usr_grp =:usr_grp ORDER BY item_seq;", nativeQuery = true) + List findAllRootsByMenuId(@Param("usr_grp") Long usr_grp); + + @Query(value="SELECT * FROM sec_grp_menu_access a where a.menu_id=:menu_item_id and a.usr_grp =:usr_grp ORDER BY item_seq", nativeQuery = true) + List findAllSubmenuByMenuId(@Param("menu_item_id") Long menu_item_id,@Param("usr_grp") Long usr_grp); + + @Query(value="SELECT * FROM sec_grp_menu_access a where a.status= 'Enable' and a.menu_id=:menu_item_id and a.usr_grp =:usr_grp ORDER BY item_seq", nativeQuery = true) + List findAllSubmenuByMenuIdWithStatus(@Param("menu_item_id") Long menu_item_id,@Param("usr_grp") Long usr_grp); + + + @Query(value="SELECT * FROM sec_grp_menu_access a where a.menu_item_id=:menu_item_id", nativeQuery = true) + GrpMenuAccess findById1(@Param("menu_item_id") Long menu_item_id); + + @Query(value="SELECT * FROM sec_grp_menu_access a where a.menu_item_id=:menu_item_id", nativeQuery = true) + List findlist(@Param("menu_item_id") Long menu_item_id); + + @Query(value="SELECT * FROM sec_grp_menu_access a where a.menu_item_id=:menu_item_id && a.usr_grp =:usr_grp", nativeQuery = true) + GrpMenuAccess findById2(@Param("menu_item_id") Long menu_item_id, @Param("usr_grp") Long usr_grp); + + @Query(value="SELECT * FROM sec_grp_menu_access a where a.menu_item_id=:menu_item_id && a.usr_grp =:usr_grp", nativeQuery = true) + Optional findbygrpandmenuid(@Param("menu_item_id") Long menu_item_id,@Param("usr_grp") Long usr_grp); + + @Query(value="SELECT * FROM sec_grp_menu_access a where a.usr_grp =:usr_grp and a.menu_item_id=:menu_item_id", nativeQuery = true) + List findById(@Param("usr_grp") Long usr_grp,@Param("menu_item_id") Long menu_item_id); + + @Query(value="SELECT * FROM sec_grp_menu_access a where a.usr_grp =:usr_grp and a.menu_item_id=:menu_item_id", nativeQuery = true) + GrpMenuAccess findSingle(@Param("usr_grp") Long usr_grp,@Param("menu_item_id") Long menu_item_id); + + + @Query(value="SELECT * FROM sec_grp_menu_access a where a.menu_item_id=:menu_item_id && a.usr_grp =:usr_grp", nativeQuery = true) + GrpMenuAccess findByUsrgrpAndMenuitemid(@Param("menu_item_id") Long menu_item_id,@Param("usr_grp") Long usr_grp); + + @Query(value="SELECT * FROM sec_grp_menu_access a where a.menu_item_id=:menu_item_id", nativeQuery = true) + List findByGrpAndMenuid1(@Param("menu_item_id") Long menu_item_id); + + @Query(value="SELECT * FROM sec_grp_menu_access a where a.menu_id = 0 && a.usr_grp =:usr_grp && a.menu_item_id=:menu_item_id ORDER BY item_seq;", nativeQuery = true) + GrpMenuAccess findAllRootsByMenuIdAndGrp(@Param("menu_item_id") Long menu_item_id,@Param("usr_grp") Long usr_grp); + + @Query(value="SELECT * FROM sec_grp_menu_access a where a.menu_id=:menu_item_id", nativeQuery = true) + List findAllSubmenuByMenuitemid(@Param("menu_item_id") Long menu_item_id); + + @Query(value="SELECT * FROM sec_grp_menu_access a where a.menu_id=:menu_item_id && a.usr_grp =:usr_grp ORDER BY item_seq", nativeQuery = true) + List findAllSubmenuByMenuitemidAndUsrGrp(@Param("menu_item_id") Long menu_item_id,@Param("usr_grp") Long usr_grp); + + @Query(value="SELECT * FROM sec_grp_menu_access a where a.menu_item_id=:menu_item_id", nativeQuery = true) + List findAllById(@Param("menu_item_id") Long menu_item_id); + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/repository1/MenuDetRepository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/repository1/MenuDetRepository.java new file mode 100644 index 0000000..e2ecf69 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/repository1/MenuDetRepository.java @@ -0,0 +1,274 @@ +package com.realnet.fnd.repository1; + +import java.util.List; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; + +import com.realnet.fnd.entity1.GrpMenuAccess; +import com.realnet.fnd.entity1.MIXMENUN; +import com.realnet.fnd.entity1.MenuDet; +import com.realnet.fnd.entity1.MixMenuNew; + +@Repository +public interface MenuDetRepository extends JpaRepository{ + @Query(value="select a.menu_item_id,a.menu_item_desc, \n" + + " a.menu_id,b.m_create,b.m_visible,\n" + + " b.m_edit,b.m_query,b.m_delete\n" + + "from sec_menu_det a,sec_grp_menu_access b\n" + + "where b.menu_item_id=a.menu_item_id\n" + + "order by a.item_seq", + countQuery="select count(*) " + + "from sec_menu_det a,sec_grp_menu_access b\n" + + "where b.menu_item_id=a.menu_item_id\n" + + "order by a.item_seq",nativeQuery=true) + Page getAll(Pageable page); + + @Query(value="select a.menu_item_id,a.menu_item_desc, \n" + + " a.menu_id,b.m_create,b.m_visible,\n" + + " b.m_edit,b.m_query,b.m_delete\n" + + "from sec_menu_det a,sec_grp_menu_access b\n" + + "where b.menu_item_id=a.menu_item_id\n" + + "and b.usr_grp = ?1 " + + "and a.menu_id = ?2 " + + "order by a.item_seq",countQuery="select count(*) " + + "from sec_menu_det a,sec_grp_menu_access b\n" + + "where b.menu_item_id=a.menu_item_id\n" + + "and b.usr_grp = ?1 " + + "and a.menu_id = ?2 " + + "order by a.item_seq;" + ,nativeQuery = true) + List getById(Long usr_grp,Long menu_id); + +// @Query(value="select a.menu_item_id,a.menu_item_desc,\n" +// + " a.menu_id,b.m_create,b.m_visible,\n" +// + " b.m_edit,b.m_query,b.m_delete,\n" +// + " a.main_menu_action_name,a.main_menu_icon_name " +// + "from sec_menu_det a,sec_grp_menu_access b\n" +// + "where b.menu_item_id=a.menu_item_id\n" +// + "and b.usr_grp = ?1\n" +// + "and a.menu_id= ?2 " +// + "order by a.item_seq", +// countQuery="select count(*) " +// + "from sec_menu_det a,sec_grp_menu_access b\n" +// + "where b.menu_item_id=a.menu_item_id\n" +// + "and b.usr_grp = ?1" +// + "and a.menu_id= ?2 " +// + "order by a.item_seq", +// nativeQuery=true) +// List getByUserId(Long usr_grp,Long menu_id); + + + @Query(value="select a.menu_item_id menu_item_id,a.menu_item_desc menu_item_desc,\n" + + " a.menu_id menu_id,b.m_create m_create,b.m_visible m_visible,\n" + + " b.m_edit m_edit,b.m_query m_query,b.m_delete m_delete,\n" + + " a.main_menu_action_name main_menu_action_name,a.main_menu_icon_name main_menu_icon_name " + + "from sec_menu_det a,sec_grp_menu_access b\n" + + "where b.menu_item_id=a.menu_item_id\n" + + "and b.usr_grp =:usr_grp\n" + + "and a.menu_id=:menu_id " + + "order by a.item_seq", +// countQuery="select count(*) " +// + "from sec_menu_det a,sec_grp_menu_access b\n" +// + "where b.menu_item_id=a.menu_item_id\n" +// + "and b.usr_grp = ?1" +// + "and a.menu_id= ?2 " +// + "order by a.item_seq", + nativeQuery=true) + List getByUserId(Long usr_grp,Long menu_id); + + @Query(value="select a.menu_item_id menu_item_id,a.menu_item_desc menu_item_desc,\r\n" + + " a.menu_id menu_id,b.m_create m_create,b.m_visible m_visible,\r\n" + + " b.m_edit m_edit,b.m_query m_query,b.m_delete m_delete,\r\n" + + " a.main_menu_action_name main_menu_action_name,a.main_menu_icon_name main_menu_icon_name \r\n" + + " from sec_menu_det a,sec_grp_menu_access b \r\n" + , + nativeQuery=true) + List getallmenu(); + + @Query(value="select a.menu_item_id menu_item_id,a.menu_item_desc menu_item_desc,\r\n" + + " a.menu_id menu_id,b.m_create m_create,b.m_visible m_visible,\r\n" + + " b.m_edit m_edit,b.m_query m_query,b.m_delete m_delete\r\n" +// + " a.main_menu_action_name main_menu_action_name,a.main_menu_icon_name main_menu_icon_name \r\n" + + " from sec_menu_det a,sec_grp_menu_access b \r\n" + , + nativeQuery=true) + List allmenu(); + + + + @Query(value="select a.menu_item_id,a.menu_item_desc,\r\n" + + " a.menu_id,b.m_create,b.m_visible,\r\n" + + " b.m_edit,b.m_query,b.m_delete,\r\n" + + " a.main_menu_action_name,a.main_menu_icon_name \r\n" + + " from sec_menu_det a,sec_grp_menu_access b\r\n" + + " where a.menu_id=100", + nativeQuery = true) + List findEqual100(); + + @Query(value="select a.menu_item_id,a.menu_item_desc,\r\n" + + " a.menu_id,b.m_create,b.m_visible,\r\n" + + " b.m_edit,b.m_query,b.m_delete,\r\n" + + " a.main_menu_action_name,a.main_menu_icon_name \r\n" + + " from sec_menu_det a,sec_grp_menu_access b \r\n" + + " where a.menu_id=ANY(SELECT menu_id from sec_menu_det where menu_id >100 && menu_id< 200);", + nativeQuery = true) + List findGreater100(); + + @Query(value="select a.menu_item_id,a.menu_item_desc,\r\n" + + " a.menu_id,b.m_create,b.m_visible,\r\n" + + " b.m_edit,b.m_query,b.m_delete,\r\n" + + " a.main_menu_action_name,a.main_menu_icon_name \r\n" + + " from sec_menu_det a,sec_grp_menu_access b\r\n" + + " where a.menu_id=200", + nativeQuery = true) + List findEqual200(); + + @Query(value="select a.menu_item_id,a.menu_item_desc,\r\n" + + " a.menu_id,b.m_create,b.m_visible,\r\n" + + " b.m_edit,b.m_query,b.m_delete,\r\n" + + " a.main_menu_action_name,a.main_menu_icon_name \r\n" + + " from sec_menu_det a,sec_grp_menu_access b \r\n" + + " where a.menu_id=ANY(SELECT menu_id from sec_menu_det where menu_id >200 && menu_id< 300);", + nativeQuery = true) + List findGreater200(); + + + @Query(value="select a.menu_item_id,a.menu_item_desc,\r\n" + + " a.menu_id,b.m_create,b.m_visible,\r\n" + + " b.m_edit,b.m_query,b.m_delete,\r\n" + + " a.main_menu_action_name,a.main_menu_icon_name \r\n" + + " from sec_menu_det a,sec_grp_menu_access b\r\n" + + " where a.menu_id=300", + nativeQuery = true) + List findEqual300(); + + @Query(value="select a.menu_item_id,a.menu_item_desc,\r\n" + + " a.menu_id,b.m_create,b.m_visible,\r\n" + + " b.m_edit,b.m_query,b.m_delete,\r\n" + + " a.main_menu_action_name,a.main_menu_icon_name \r\n" + + " from sec_menu_det a,sec_grp_menu_access b \r\n" + + " where a.menu_id=ANY(SELECT menu_id from sec_menu_det where menu_id >300 && menu_id< 400);", + nativeQuery = true) + List findGreater300(); + + + @Query(value="select a.menu_item_id,a.menu_item_desc,\r\n" + + " a.menu_id,b.m_create,b.m_visible,\r\n" + + " b.m_edit,b.m_query,b.m_delete,\r\n" + + " a.main_menu_action_name,a.main_menu_icon_name \r\n" + + " from sec_menu_det a,sec_grp_menu_access b\r\n" + + " where a.menu_id=400", + nativeQuery = true) + List findEqual400(); + + @Query(value="select a.menu_item_id,a.menu_item_desc,\r\n" + + " a.menu_id,b.m_create,b.m_visible,\r\n" + + " b.m_edit,b.m_query,b.m_delete,\r\n" + + " a.main_menu_action_name,a.main_menu_icon_name \r\n" + + " from sec_menu_det a,sec_grp_menu_access b \r\n" + + " where a.menu_id=ANY(SELECT menu_id from sec_menu_det where menu_id >400 && menu_id< 500);", + nativeQuery = true) + List findGreater400(); + + @Query(value="select a.menu_item_id,a.menu_item_desc,\r\n" + + " a.menu_id,b.m_create,b.m_visible,\r\n" + + " b.m_edit,b.m_query,b.m_delete,\r\n" + + " a.main_menu_action_name,a.main_menu_icon_name \r\n" + + " from sec_menu_det a,sec_grp_menu_access b\r\n" + + " where a.menu_id=500", + nativeQuery = true) + List findEqual500(); + + @Query(value="select a.menu_item_id,a.menu_item_desc,\r\n" + + " a.menu_id,b.m_create,b.m_visible,\r\n" + + " b.m_edit,b.m_query,b.m_delete,\r\n" + + " a.main_menu_action_name,a.main_menu_icon_name \r\n" + + " from sec_menu_det a,sec_grp_menu_access b \r\n" + + " where a.menu_id=ANY(SELECT menu_id from sec_menu_det where menu_id >500 && menu_id< 600);", + nativeQuery = true) + List findGreater500(); + + @Query(value="select a.menu_item_id,a.menu_item_desc,\r\n" + + " a.menu_id,b.m_create,b.m_visible,\r\n" + + " b.m_edit,b.m_query,b.m_delete,\r\n" + + " a.main_menu_action_name,a.main_menu_icon_name \r\n" + + " from sec_menu_det a,sec_grp_menu_access b\r\n" + + " where a.menu_id=600", + nativeQuery = true) + List findEqual600(); + + @Query(value="select a.menu_item_id,a.menu_item_desc,\r\n" + + " a.menu_id,b.m_create,b.m_visible,\r\n" + + " b.m_edit,b.m_query,b.m_delete,\r\n" + + " a.main_menu_action_name,a.main_menu_icon_name \r\n" + + " from sec_menu_det a,sec_grp_menu_access b \r\n" + + " where a.menu_id=ANY(SELECT menu_id from sec_menu_det where menu_id >600 && menu_id< 700);", + nativeQuery = true) + List findGreater600(); + + @Query(value="SELECT * FROM sec_menu_det where menu_id=100", nativeQuery = true) + MenuDet findequalto100(); + + @Query(value="SELECT * FROM sec_menu_det a where a.menu_id=ANY(SELECT menu_id from sec_menu_det where menu_id >100 && menu_id< 200)", nativeQuery = true) + List findgreaterthan100(); + + @Query(value="SELECT * FROM sec_menu_det where menu_id=200", nativeQuery = true) + MenuDet findequalto200(); + + @Query(value="SELECT * FROM sec_menu_det a where a.menu_id=ANY(SELECT menu_id from sec_menu_det where menu_id >200 && menu_id< 300)", nativeQuery = true) + List findgreaterthan200(); + + @Query(value="SELECT * FROM sec_menu_det where menu_id=300", nativeQuery = true) + MenuDet findequalto300(); + + @Query(value="SELECT * FROM sec_menu_det a where a.menu_id=ANY(SELECT menu_id from sec_menu_det where menu_id >300 && menu_id< 400)", nativeQuery = true) + List findgreaterthan300(); + + @Query(value="SELECT * FROM sec_menu_det where menu_id=400", nativeQuery = true) + MenuDet findequalto400(); + + @Query(value="SELECT * FROM sec_menu_det a where a.menu_id=ANY(SELECT menu_id from sec_menu_det where menu_id >400 && menu_id< 500)", nativeQuery = true) + List findgreaterthan400(); + + @Query(value="SELECT * FROM sec_menu_det where menu_id=500", nativeQuery = true) + MenuDet findequalto500(); + + @Query(value="SELECT * FROM sec_menu_det a where a.menu_id=ANY(SELECT menu_id from sec_menu_det where menu_id >500 && menu_id< 600)", nativeQuery = true) + List findgreaterthan500(); + + @Query(value="SELECT * FROM sec_menu_det where menu_id=600", nativeQuery = true) + MenuDet findequalto600(); + + @Query(value="SELECT * FROM sec_menu_det a where a.menu_id=ANY(SELECT menu_id from sec_menu_det where menu_id >600 && menu_id< 700)", nativeQuery = true) + List findgreaterthan600(); + + @Query(value="SELECT * FROM sec_menu_det a where a.menu_id=?1", nativeQuery = true) + List findAllById(Long menu_id); + + @Query(value="SELECT * FROM sec_menu_det a where a.root_menudet_id is null", nativeQuery = true) + List findAllRoots(); + + @Query(value="SELECT * FROM sec_menu_det a where a.root_menudet_id=:menu_item_id", nativeQuery = true) + List findAllSubmenu(@Param("menu_item_id") Long menu_item_id); + + @Query(value="SELECT * FROM sec_menu_det a where a.root_menudet_id=:menu_item_id", nativeQuery = true) + List findAllSubCategoriesInRoot(@Param("menu_item_id") List menu_item_id); + + @Query(value="SELECT * FROM sec_menu_det a where a.menu_id = 0 ORDER BY item_seq ASC", nativeQuery = true) + List findAllRootsByMenuId(); + + @Query(value="SELECT * FROM sec_menu_det a where a.menu_id=:menu_item_id ORDER BY item_seq ASC", nativeQuery = true) + List findAllSubmenuByMenuId(@Param("menu_item_id") Long menu_item_id); + + @Query(value="select * from sec_menu_det where menu_item_id = :menu_item_id UNION select * from sec_menu_det where menu_id = :menu_item_id", nativeQuery = true) + List findAllSubmenuforusrgrp(@Param("menu_item_id") Long menu_item_id); + + @Query(value="SELECT `COLUMN_NAME` FROM `INFORMATION_SCHEMA`.`COLUMNS` WHERE `TABLE_SCHEMA`='realnet_CNSBE' AND `TABLE_NAME`=:TABLE_NAME", nativeQuery = true) + List findcolumnbytablename(@Param("TABLE_NAME") Object TABLE_NAME); + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/response/CustomResponse.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/response/CustomResponse.java new file mode 100644 index 0000000..b5274ce --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/response/CustomResponse.java @@ -0,0 +1,15 @@ +package com.realnet.fnd.response; + +import java.util.List; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper = false) +public class CustomResponse extends PageResponse { + @ApiModelProperty(required = true, value = "") + private List items; + //private List items; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/response/EntityResponse.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/response/EntityResponse.java new file mode 100644 index 0000000..8bb7ab2 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/response/EntityResponse.java @@ -0,0 +1,15 @@ +package com.realnet.fnd.response; + +import lombok.Data; + +@Data +public class EntityResponse { + + private String msg; + + public EntityResponse(String msg) { + super(); + this.msg = msg; + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/response/OperationResponse.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/response/OperationResponse.java new file mode 100644 index 0000000..b1ab421 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/response/OperationResponse.java @@ -0,0 +1,19 @@ +/** + This is the common structure for all responses + if the response contains a list(array) then it will have 'items' field + if the response contains a single item then it will have 'item' field + */ + + +package com.realnet.fnd.response; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data //for getters and setters +public class OperationResponse { + public enum ResponseStatusEnum {SUCCESS, ERROR, WARNING, NO_ACCESS}; + @ApiModelProperty(required = true) + private ResponseStatusEnum operationStatus; + private String operationMessage; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/response/PageResponse.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/response/PageResponse.java new file mode 100644 index 0000000..9cb000b --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/response/PageResponse.java @@ -0,0 +1,53 @@ +package com.realnet.fnd.response; + +import java.util.List; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Sort; + +import lombok.Getter; +import lombok.Setter; + +//@Data //for getters and setters +public class PageResponse extends OperationResponse { + @Getter @Setter private boolean first; + @Getter @Setter private boolean last; + @Getter @Setter private int currentPageNumber; + @Getter @Setter private int itemsInPage; + @Getter @Setter private int pageSize; + @Getter @Setter private int totalPages; + @Getter @Setter private long totalItems; + @Getter @Setter private Sort sort; + private List items; + + public void setPageStats(Page pg, boolean setDefaultMessage){ + this.first = pg.isFirst(); + this.last = pg.isLast(); + this.currentPageNumber = pg.getNumber(); + this.itemsInPage = pg.getNumberOfElements(); + this.pageSize = pg.getSize(); + this.totalPages = pg.getTotalPages(); + this.totalItems = pg.getTotalElements(); + //this.items = pg.getContent(); + this.sort = pg.getSort(); + if (setDefaultMessage == true){ + this.setOperationStatus(ResponseStatusEnum.SUCCESS); + this.setOperationMessage("Page " + (pg.getNumber()+ 1 ) + " of " + pg.getTotalPages() ); + } + } + + public void setPageTotal(int count, boolean setDefaultMessage){ + //this.items = list; + this.first = true; + this.last = true; + this.itemsInPage = count; + this.totalItems = count; + this.totalPages = 1; + this.pageSize = count; + if (setDefaultMessage == true){ + this.setOperationStatus(ResponseStatusEnum.SUCCESS); + this.setOperationMessage("Total " + count + " items "); + } + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/response/Rn_DynamicTransactionResponse.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/response/Rn_DynamicTransactionResponse.java new file mode 100644 index 0000000..aab0da1 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/response/Rn_DynamicTransactionResponse.java @@ -0,0 +1,16 @@ +package com.realnet.fnd.response; + +import java.util.List; + +import com.realnet.fnd.entity.Rn_Dynamic_Transaction; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper=false) +public class Rn_DynamicTransactionResponse extends PageResponse { + @ApiModelProperty(required = true, value = "") + private List items; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/response/Rn_Forms_SetupResponse.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/response/Rn_Forms_SetupResponse.java new file mode 100644 index 0000000..2c5f1fd --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/response/Rn_Forms_SetupResponse.java @@ -0,0 +1,16 @@ +package com.realnet.fnd.response; + +import java.util.List; + +import com.realnet.fnd.entity.Rn_Forms_Setup; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper=false) +public class Rn_Forms_SetupResponse extends PageResponse { + @ApiModelProperty(required = true, value = "") + private List items; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/response/Rn_Function_Register_Response.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/response/Rn_Function_Register_Response.java new file mode 100644 index 0000000..b7a0733 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/response/Rn_Function_Register_Response.java @@ -0,0 +1,16 @@ +package com.realnet.fnd.response; + +import java.util.List; + +import com.realnet.fnd.entity.Rn_Function_Register; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper = false) +public class Rn_Function_Register_Response extends PageResponse { + @ApiModelProperty(required = true, value = "") + private List items; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/response/Rn_Main_Menu_Response.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/response/Rn_Main_Menu_Response.java new file mode 100644 index 0000000..70c3a4a --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/response/Rn_Main_Menu_Response.java @@ -0,0 +1,16 @@ +package com.realnet.fnd.response; + +import java.util.List; + +import com.realnet.fnd.entity.Rn_Main_Menu; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper=false) +public class Rn_Main_Menu_Response extends PageResponse { + @ApiModelProperty(required = true, value = "") + private List items; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/response/Rn_Menu_Group_Response.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/response/Rn_Menu_Group_Response.java new file mode 100644 index 0000000..c536780 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/response/Rn_Menu_Group_Response.java @@ -0,0 +1,16 @@ +package com.realnet.fnd.response; + +import java.util.List; + +import com.realnet.fnd.entity.Rn_Menu_Group_Header; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper=false) +public class Rn_Menu_Group_Response extends PageResponse { + @ApiModelProperty(required = true, value = "") + private List items; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/response/Rn_Menu_Register_Response.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/response/Rn_Menu_Register_Response.java new file mode 100644 index 0000000..70a0e65 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/response/Rn_Menu_Register_Response.java @@ -0,0 +1,16 @@ +package com.realnet.fnd.response; + +import java.util.List; + +import com.realnet.fnd.entity.Rn_Menu_Register; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper=false) +public class Rn_Menu_Register_Response extends PageResponse { + @ApiModelProperty(required = true, value = "") + private List items; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/response/SingleDataSeriseResponse.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/response/SingleDataSeriseResponse.java new file mode 100644 index 0000000..26223d8 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/response/SingleDataSeriseResponse.java @@ -0,0 +1,16 @@ +//This is a common http response model for providing data series + +package com.realnet.fnd.response; + +import java.util.List; + +import com.realnet.fnd.entity.SingleSerise; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper=false) +public class SingleDataSeriseResponse extends OperationResponse { + private List items; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/ExtFieldService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/ExtFieldService.java new file mode 100644 index 0000000..847a2ad --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/ExtFieldService.java @@ -0,0 +1,26 @@ +package com.realnet.fnd.service; + +import java.util.List; + +import com.realnet.fnd.entity.Rn_Ext_Fields; + +public interface ExtFieldService { + List getAll(); + //Page getAll(Pageable p); + Rn_Ext_Fields getById(int id); + Rn_Ext_Fields save(Rn_Ext_Fields rn_ext_fields); + Rn_Ext_Fields updateById(int id, Rn_Ext_Fields rn_ext_fields); + boolean deleteById(int id); + +// // LOOKUP FIELDS (ATTRIBUTE, FLEX) +// List getLookupValues(); +// +// // TEXTFIELD, DROPDOWN ETC... +// List getDataTypeValues(); + + // BUILD HTML FOR EXTENSION + String buildExtensionByFormCode(String acc_id, String f_code, Integer formId); + + String stringReplace(String str, String start, String end, String replaceWith); + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/ExtFieldServiceImpl.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/ExtFieldServiceImpl.java new file mode 100644 index 0000000..b06699a --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/ExtFieldServiceImpl.java @@ -0,0 +1,260 @@ +package com.realnet.fnd.service; + +import java.util.List; +import java.util.Optional; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; + +import com.realnet.exceptions.ResourceNotFoundException; +import com.realnet.fnd.entity.Rn_Ext_Fields; +import com.realnet.fnd.repository.ExtFieldRepository; +import com.realnet.fnd.repository.Rn_LookUpRepository; +import com.realnet.utils.WireFrameConstant; + +@Service +public class ExtFieldServiceImpl implements ExtFieldService { + + @Value("${angularProjectPath}") + private String angularProjectPath; + + @Value("${projectPath}") + private String projectPath; + + @Autowired + private ExtFieldRepository extFieldRepository; + + @Autowired + Rn_LookUpRepository lookUpRepository1; + + @Override + public List getAll() { + return extFieldRepository.findAll(); + } + +// @Override +// public Page getAll(Pageable page) { +// return extFieldRepository.findAll(page); +// } + + @Override + public Rn_Ext_Fields getById(int id) { + Rn_Ext_Fields rn_ext_fields = extFieldRepository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Extension Field not found :: " + id)); + return rn_ext_fields; + } + + @Override + public Rn_Ext_Fields save(Rn_Ext_Fields rn_ext_fields) { + Rn_Ext_Fields savedRn_Ext_Fields = extFieldRepository.save(rn_ext_fields); + return savedRn_Ext_Fields; + } + + @Override + public Rn_Ext_Fields updateById(int id, Rn_Ext_Fields extensionRequest) { + Rn_Ext_Fields old_ext_field = extFieldRepository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Extension Field not found :: " + id)); + + old_ext_field.setField_name(extensionRequest.getField_name()); + old_ext_field.setMapping(extensionRequest.getMapping()); + old_ext_field.setData_type(extensionRequest.getData_type()); + old_ext_field.setType(extensionRequest.getType()); + old_ext_field.setActive(extensionRequest.isActive()); + final Rn_Ext_Fields updated_ext_field = extFieldRepository.save(old_ext_field); + return updated_ext_field; + } + + @Override + public boolean deleteById(int id) { + if (!extFieldRepository.existsById(id)) { + throw new ResourceNotFoundException("Extension Field not found :: " + id); + } + Rn_Ext_Fields rn_ext_fields = extFieldRepository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Extension Field not found :: " + id)); + extFieldRepository.delete(rn_ext_fields); + return true; + } + +// @Override +// public List getLookupValues() { +// return lookUpRepository.findLookupValues(); +// } +// +// @Override +// public List getDataTypeValues() { +// return lookUpRepository.findDataTypeValues(); +// } + + @Override + public String buildExtensionByFormCode(String acc_id, String f_code, Integer formId) { + + Optional extensions = extFieldRepository.findById(formId); +// List extensions = extFieldRepository.getExtensionFieldByFormCode(acc_id, f_code); + StringBuilder extension_grid_form = new StringBuilder(); + StringBuilder extension_entry_form = new StringBuilder(); + + if (extensions == null || !extensions.isPresent()) { + throw new ResourceNotFoundException("Extension Fields Not Found"); + } else { + +// extension_entry_form.append("\n"); + // extension_code.append("
\n" + "
\n"); + +// for (Rn_Ext_Fields extension : extensions) { + // String form_code = extension.getForm_code(); + Rn_Ext_Fields extension = extensions.get(); + String type = extension.getType(); // ho, hl + String data_type = extension.getData_type(); + String mapping = extension.getMapping(); + String field_name = extension.getField_name(); + + String ext = ",\"extValue\":\"" + mapping + "\""; + + if (WireFrameConstant.DT_TEXTFIELD.equals(data_type)) { +// extension_entry_form.append("
\r\n" + " \r\n" +// + " \r\n" + " \n"); + + extension_entry_form.append("{\"fieldName\":\"" + field_name + + "\",\"fieldType\":\"text\",\"fieldValue\":\"\",\"formCode\":\"" + f_code + "\"" + ext + "},"); + } + + if (WireFrameConstant.DT_DATE.equals(data_type)) { +// extension_entry_form.append(" \r\n" + " \r\n" +// + " \r\n" + " \n"); + extension_entry_form.append("{\"fieldName\":\"" + field_name + + "\",\"fieldType\":\"date\",\"fieldValue\":\"\",\"formCode\":\"" + f_code + "\"" + ext + "},"); + + } + + if (WireFrameConstant.DT_LONGTEXT.equals(data_type)) { +// extension_entry_form.append(" \r\n" + " \r\n" +// + " \r\n" + " \n"); +// + extension_entry_form.append("{\"fieldName\":\"" + field_name + + "\",\"fieldType\":\"textarea\",\"fieldValue\":\"\",\"formCode\":\"" + f_code + "\"" + ext + + "},"); + + } + + if (WireFrameConstant.FIELD_CHECKBOX.equals(data_type)) { +// extension_entry_form.append(" \r\n" + " \r\n" +// + " \r\n" + " \n"); + extension_entry_form.append("{\"fieldName\":\"" + field_name + + "\",\"fieldType\":\"checkbox\",\"fieldValue\":\"\",\"formCode\":\"" + f_code + "\"" + ext + + "},"); + + } + +// if (TypeConstants.FIELD_CHECKBOX.equals(data_type)) { +// extension_entry_form.append(" \r\n" + " \r\n" +// + " \r\n" + " \n"); +// } + if (WireFrameConstant.FIELD_AUTOCOMPLETE.equals(data_type)) { +// extension_entry_form.append(" \r\n" + " \r\n" +// + " \r\n" + " \n"); + extension_entry_form.append("{\"fieldName\":\"" + field_name + + "\",\"fieldType\":\"text\",\"fieldValue\":\"\",\"formCode\":\"" + f_code + "\"" + ext + "},"); + } + + // extension grid-view code + extension_grid_form.append("{prop: \"" + mapping + "\", name: \"" + field_name + "\", width: 200},\n"); + + // extension read-only code + + // extension update code + + } + extension_entry_form.deleteCharAt(extension_entry_form.length() - 1); + // extension_code.append("\n\n
" + field_name +// + "
" + field_name +// + "
" + field_name +// + "
" + field_name +// + "
" + field_name +// + "
" + field_name +// + "
"); +// extension_entry_form.append("\n"); + +// FileWriter fw = null; +// BufferedWriter bw = null; +// try { +// +// // ENTRY FORM +//// String ngExtEntryPath = angularProjectPath +//// + "/src/app/pages/university/teacher/extensions/add-ext/teacher-add-extension.component.html"; +// +// String path = projectPath + "/cns-portal/pages"; +// +// String ngExtEntryPath = path + File.separator + f_code + "_ext.html"; +// +// File ngExtEntryFile1 = new File(path); +// if (!ngExtEntryFile1.exists()) { +// ngExtEntryFile1.mkdir(); +// } +// +// File ngExtEntryFile = new File(ngExtEntryPath); +// if (!ngExtEntryFile.exists()) { +// ngExtEntryFile.createNewFile(); +// } +// fw = new FileWriter(ngExtEntryFile.getAbsoluteFile()); +// bw = new BufferedWriter(fw); +// bw.write(extension_entry_form.toString()); +// bw.close(); +// +// // GRID VIEW FORM +//// final String start = "// EXTENSION COLUMN START"; +//// final String end = "// EXTENSION COLUMN END"; +//// String replaceWith = extension_grid_form.toString(); +//// +//// String ngExtGridPath = path + "/teacher-add-extension.component.ts"; +//// File ngExtGridFile = new File(ngExtGridPath); +//// String fileString = FileUtils.readFileToString(ngExtGridFile, StandardCharsets.UTF_8); +//// String finalString = stringReplace(fileString, start, end, replaceWith); +//// +//// bw = new BufferedWriter(new FileWriter(ngExtGridFile, false)); // replaced string +//// bw.write(finalString); +//// bw.close(); +// +// // UPDATE FORM +// +// // READ-ONLY FORM +// +// } catch (IOException e) { +// e.printStackTrace(); +// } + + return extension_entry_form.toString(); + } + + @Override + public String stringReplace(String str, String start, String end, String replaceWith) { + int i = str.indexOf(start); + while (i != -1) { + int j = str.indexOf(end, i + 1); + if (j != -1) { + /* + * @Include starting and ending string String data = str.substring(0, i + + * start.length()) + "\n" + replaceWith + "\n"; String temp = str.substring(j); + * + * @Not Include starting and ending string String data = str.substring(0, i) + + * "\n" + replaceWith + "\n"; String temp = str.substring(j + end.length()); + */ + String data = str.substring(0, i + start.length()) + "\n" + replaceWith + "\n"; + String temp = str.substring(j); + data += temp; + str = data; + i = str.indexOf(start, i + replaceWith.length() + end.length() + 1); + } else { + break; + } + } + return str; + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/FileStorageService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/FileStorageService.java new file mode 100644 index 0000000..a385565 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/FileStorageService.java @@ -0,0 +1,136 @@ +package com.realnet.fnd.service; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.nio.file.StandardCopyOption; + +import org.apache.commons.io.FilenameUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; +import org.springframework.web.multipart.MultipartFile; + +//import com.realnet.codeextractor.service.Rn_Bcf_Extractor_Service; +import com.realnet.exceptions.StorageException; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; + +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@Service +public class FileStorageService { + + //private static final Logger logger = LoggerFactory.getLogger(FileStorageService.class); + + @Autowired + private AppUserServiceImpl userService; + + @Autowired +// private Rn_Bcf_Extractor_Service extractorService; + + @Value("${projectPath}") + private String projectPath; + + public void uploadProfilePicture(MultipartFile file, String location) { + if (file.isEmpty()) { + throw new StorageException("Failed to store empty file"); + } + // create path for every new File + // File fileLoc = new File(location); + try { +// if(!fileLoc.exists()) { +// fileLoc.mkdir(); +// //System.out.println("Path Created..."); +// } + AppUser user = userService.getLoggedInUser(); + String UserId = String.valueOf(user.getUserId()); + String fileName = file.getOriginalFilename(); + + String ext = fileName.substring(fileName.lastIndexOf(".")); + String extension = FilenameUtils.getExtension(fileName); // lol + String newName = "profile-pic-" + UserId + ext; + + System.out.println(System.getProperty("java.io.tmpdir")); + File convFile = new File(System.getProperty("java.io.tmpdir")+System.getProperty("file.separator")+newName); + file.transferTo(convFile); + } catch (IOException e) { + String msg = String.format("Failed to store file %s", file.getName()); + log.info(msg); + throw new StorageException("Failed to store file ", e); + } + + } + + // ========================== BCF EXTRACTOR ============================= + // max size 100 mb + public void uploadFile(MultipartFile file, String location) { + if (file.isEmpty()) { + throw new StorageException("Failed to store empty file"); + } + try { + String fileName = file.getOriginalFilename(); + InputStream is = file.getInputStream(); + Files.copy(is, Paths.get(location + fileName), StandardCopyOption.REPLACE_EXISTING); + } catch (IOException e) { + String msg = String.format("Failed to store file : %s", file.getName()); + log.debug(msg); + throw new StorageException("Failed to store file", e); + } + + } + +// private static ArrayList fileList = new ArrayList(); +// +// public ArrayList listOFiles(String directory) throws IOException { +// File destDir = new File(directory); +// System.out.println("Destination Folder Path = " + directory); +// // ArrayList files = new ArrayList(); +// // Get all files from a directory. +// File[] fList = destDir.listFiles(); +// if (fList != null) { +// for (File file : fList) { +// if (file.isFile()) { +// fileList.add(file.getAbsolutePath()); +// // System.out.println("directory:" + file.getAbsolutePath()); +// } else if (file.isDirectory()) { +// listOFiles(file.getAbsolutePath()); +// } +// } +// } +// return fileList; +// } + + // =============== MOVE FILE FROM ONE DIRECTORY TO ANTHER ============== +// public void move(String fromDir, String toDir) throws IOException { +// File fromDirFile = new File(fromDir); +// File moveToFile = new File(toDir); +// +// String fileName = fromDirFile.getName(); +// +// // MOVE ALL FILES INTO PARENT DIRECTORY +// System.out.println("File name = " + fileName + "\n" + "Move to = " + toDir); +// fromDirFile.renameTo(new File(moveToFile, fromDirFile.getName())); +// } + + // ============== DELETE EMPTY DIRECTORY =========== +// public static void deleteEmptyDirectory(File dir) { +// if (dir.isDirectory()) { +// File[] fList = dir.listFiles(); +// if (fList != null) { +// for (File file : fList) { +// if (!file.isFile()) { +// System.out.println("Removing empty directory : " + file.getName()); +// file.delete(); +// deleteEmptyDirectory(file); +// } +// } +// dir.delete(); +// } +// } +// } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/RnGroupMenuLineServiec.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/RnGroupMenuLineServiec.java new file mode 100644 index 0000000..beb5c17 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/RnGroupMenuLineServiec.java @@ -0,0 +1,19 @@ +package com.realnet.fnd.service; + +import java.util.List; + +import com.realnet.fnd.entity.Rn_Menu_Group_Header; +import com.realnet.fnd.entity.Rn_Menu_Group_Line; + +public interface RnGroupMenuLineServiec { + + public Rn_Menu_Group_Line addToDb(Rn_Menu_Group_Line rn_Menu_Group_Line); + + public Rn_Menu_Group_Line getoneById(int id); + + public List getAll(); + + public Rn_Menu_Group_Line updateToDb(Rn_Menu_Group_Line rn_Menu_Group_Line); + +// public List getLinesByHeader(Rn_Menu_Group_Header rn_Menu_Group_Header); +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/RnGroupMenuLineServiecImpl.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/RnGroupMenuLineServiecImpl.java new file mode 100644 index 0000000..1ef3ca6 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/RnGroupMenuLineServiecImpl.java @@ -0,0 +1,49 @@ +package com.realnet.fnd.service; + +import java.util.List; +import java.util.Optional; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.realnet.fnd.entity.Rn_Menu_Group_Header; +import com.realnet.fnd.entity.Rn_Menu_Group_Line; +import com.realnet.fnd.repository.RnGroupLineRepository; + +@Service +public class RnGroupMenuLineServiecImpl implements RnGroupMenuLineServiec { + + @Autowired + private RnGroupLineRepository r; + + @Override + public Rn_Menu_Group_Line addToDb(Rn_Menu_Group_Line rn_Menu_Group_Line) { + Rn_Menu_Group_Line addToDb = this.r.save(rn_Menu_Group_Line); + return addToDb; + } + + @Override + public Rn_Menu_Group_Line getoneById(int id) { + Optional findById = this.r.findById(id); + return findById.get(); + } + + @Override + public List getAll() { + List all = this.r.findAll(); + return all; + } + + @Override + public Rn_Menu_Group_Line updateToDb(Rn_Menu_Group_Line rn_Menu_Group_Line) { + Rn_Menu_Group_Line addToDb = this.r.save(rn_Menu_Group_Line); + return addToDb; + } + +// @Override +// public List getLinesByHeader(Rn_Menu_Group_Header rn_Menu_Group_Header) { +// List lineByHeader = this.r.findLineByHeader(rn_Menu_Group_Header); +// return lineByHeader; +// } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/Rn_DynamicTransactionService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/Rn_DynamicTransactionService.java new file mode 100644 index 0000000..732171e --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/Rn_DynamicTransactionService.java @@ -0,0 +1,26 @@ +package com.realnet.fnd.service; + +import java.util.List; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; + +import com.realnet.fnd.entity.Rn_Dynamic_Transaction; + +public interface Rn_DynamicTransactionService { + List getAll(); + + Page getAll(Pageable p); + + List getByFormId(int form_id); + + Rn_Dynamic_Transaction getByIdAndFormId(int id, int form_id); + + + Rn_Dynamic_Transaction save(Rn_Dynamic_Transaction rn_dynamic_transaction); + + Rn_Dynamic_Transaction updateByFormId(int id, int form_id, Rn_Dynamic_Transaction rn_dynamic_transaction); + + boolean deleteById(int id); + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/Rn_DynamicTransactionServiceImpl.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/Rn_DynamicTransactionServiceImpl.java new file mode 100644 index 0000000..4ab937c --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/Rn_DynamicTransactionServiceImpl.java @@ -0,0 +1,105 @@ +package com.realnet.fnd.service; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Service; + +import com.realnet.exceptions.ResourceNotFoundException; +import com.realnet.fnd.entity.Rn_Dynamic_Transaction; +import com.realnet.fnd.repository.Rn_DynamicTransactionRepository; + +@Service +public class Rn_DynamicTransactionServiceImpl implements Rn_DynamicTransactionService { + + @Autowired + private Rn_DynamicTransactionRepository rn_dynamic_transactionRepository; + + @Override + public List getAll() { + return rn_dynamic_transactionRepository.findAll(); + } + + @Override + public Page getAll(Pageable page) { + return rn_dynamic_transactionRepository.findAll(page); + } + + @Override + public List getByFormId(int form_id) { + // Rn_Dynamic_Transaction rn_dynamic_transaction = + // rn_dynamic_transactionRepository.findById(id) + List rn_dynamic_transaction = rn_dynamic_transactionRepository.findByFormId(form_id); + return rn_dynamic_transaction; + } + + @Override + public Rn_Dynamic_Transaction save(Rn_Dynamic_Transaction rn_dynamic_transaction) { + Rn_Dynamic_Transaction savedRn_Dynamic_Transaction = rn_dynamic_transactionRepository + .save(rn_dynamic_transaction); + return savedRn_Dynamic_Transaction; + } + + @Override + public Rn_Dynamic_Transaction updateByFormId(int id, int form_id, Rn_Dynamic_Transaction txRequest) { + Rn_Dynamic_Transaction rn_dynamic_transaction = rn_dynamic_transactionRepository.findByIdAndFormId(id, form_id) + .orElseThrow(() -> new ResourceNotFoundException("Extension Field not found :: " + form_id)); + rn_dynamic_transaction.setUpdatedBy(txRequest.getUpdatedBy()); + // rn_dynamic_transaction.setForm_id(txRequest.getForm_id()); // modify needed + rn_dynamic_transaction.setForm_version(txRequest.getForm_version()); + + rn_dynamic_transaction.setComp1(txRequest.getComp1()); + rn_dynamic_transaction.setComp2(txRequest.getComp2()); + rn_dynamic_transaction.setComp3(txRequest.getComp3()); + rn_dynamic_transaction.setComp4(txRequest.getComp4()); + rn_dynamic_transaction.setComp5(txRequest.getComp5()); + rn_dynamic_transaction.setComp6(txRequest.getComp6()); + rn_dynamic_transaction.setComp7(txRequest.getComp7()); + rn_dynamic_transaction.setComp8(txRequest.getComp8()); + rn_dynamic_transaction.setComp9(txRequest.getComp9()); + rn_dynamic_transaction.setComp10(txRequest.getComp10()); + rn_dynamic_transaction.setComp11(txRequest.getComp11()); + rn_dynamic_transaction.setComp12(txRequest.getComp12()); + rn_dynamic_transaction.setComp13(txRequest.getComp13()); + rn_dynamic_transaction.setComp14(txRequest.getComp14()); + rn_dynamic_transaction.setComp15(txRequest.getComp15()); + rn_dynamic_transaction.setComp16(txRequest.getComp16()); + rn_dynamic_transaction.setComp17(txRequest.getComp17()); + rn_dynamic_transaction.setComp18(txRequest.getComp18()); + rn_dynamic_transaction.setComp19(txRequest.getComp19()); + rn_dynamic_transaction.setComp20(txRequest.getComp20()); + rn_dynamic_transaction.setComp21(txRequest.getComp21()); + rn_dynamic_transaction.setComp22(txRequest.getComp22()); + rn_dynamic_transaction.setComp23(txRequest.getComp23()); + rn_dynamic_transaction.setComp24(txRequest.getComp24()); + rn_dynamic_transaction.setComp25(txRequest.getComp25()); + rn_dynamic_transaction.setComp_l26(txRequest.getComp_l26()); + rn_dynamic_transaction.setComp_l27(txRequest.getComp_l27()); + rn_dynamic_transaction.setComp_l28(txRequest.getComp_l28()); + rn_dynamic_transaction.setComp_l29(txRequest.getComp_l29()); + rn_dynamic_transaction.setComp_l30(txRequest.getComp_l30()); + final Rn_Dynamic_Transaction updated_ext_field = rn_dynamic_transactionRepository.save(rn_dynamic_transaction); + return updated_ext_field; + } + + @Override + public boolean deleteById(int id) { + if (!rn_dynamic_transactionRepository.existsById(id)) { + throw new ResourceNotFoundException("Data not Exist = " + id); + } + Rn_Dynamic_Transaction rn_dynamic_transaction = rn_dynamic_transactionRepository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Data not found :: " + id)); + rn_dynamic_transactionRepository.delete(rn_dynamic_transaction); + return true; + } + + @Override + public Rn_Dynamic_Transaction getByIdAndFormId(int id, int form_id) { + Rn_Dynamic_Transaction rn_dynamic_transaction = rn_dynamic_transactionRepository.findByIdAndFormId(id, form_id) + .orElseThrow(() -> new ResourceNotFoundException("Data not found with id :: " + id + " and form_id ::" + form_id)); + return rn_dynamic_transaction; + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/Rn_Forms_Setup_Service.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/Rn_Forms_Setup_Service.java new file mode 100644 index 0000000..3ce6485 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/Rn_Forms_Setup_Service.java @@ -0,0 +1,29 @@ +package com.realnet.fnd.service; + +import java.util.List; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; + +import com.realnet.fnd.entity.Rn_Forms_Setup; + +public interface Rn_Forms_Setup_Service { + List getAll(); + + Page getAll(Pageable p); + + Rn_Forms_Setup getById(int id); + + Rn_Forms_Setup save(Rn_Forms_Setup rn_forms_setup); + + Rn_Forms_Setup updateById(int id, Rn_Forms_Setup rn_forms_setup); + + boolean deleteById(int id); + + List getByFormId(int form_id); + + void buildDynamicForm(int form_id); + + String stringReplace(String str, String start, String end, String replaceWith); + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/Rn_Forms_Setup_ServiceImpl.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/Rn_Forms_Setup_ServiceImpl.java new file mode 100644 index 0000000..0d8063b --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/Rn_Forms_Setup_ServiceImpl.java @@ -0,0 +1,302 @@ +package com.realnet.fnd.service; + +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.List; + +import org.apache.commons.io.FileUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Service; + +import com.realnet.exceptions.ResourceNotFoundException; +import com.realnet.fnd.entity.Rn_Forms_Component_Setup; +import com.realnet.fnd.entity.Rn_Forms_Setup; +import com.realnet.fnd.repository.Rn_Forms_Setup_Repository; +import com.realnet.utils.WireFrameConstant; + +@Service +public class Rn_Forms_Setup_ServiceImpl implements Rn_Forms_Setup_Service { + + @Value("${angularProjectPath}") + private String angularProjectPath; + + @Autowired + private Rn_Forms_Setup_Repository rn_forms_setup_repository; + + @Override + public List getAll() { + return rn_forms_setup_repository.findAll(); + } + + @Override + public Page getAll(Pageable page) { + return rn_forms_setup_repository.findAll(page); + } + + @Override + public Rn_Forms_Setup getById(int id) { + Rn_Forms_Setup rn_forms_setup = rn_forms_setup_repository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Rn_Forms_Setup not found :: " + id)); + return rn_forms_setup; + } + + @Override + public Rn_Forms_Setup save(Rn_Forms_Setup rn_forms_setup) { + Rn_Forms_Setup savedRn_Forms_Setup = rn_forms_setup_repository.save(rn_forms_setup); + return savedRn_Forms_Setup; + } + + @Override + public Rn_Forms_Setup updateById(int id, Rn_Forms_Setup rn_forms_setupRequest) { + Rn_Forms_Setup old_rn_forms_setup = rn_forms_setup_repository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Rn_Forms_Setup not found :: " + id)); + old_rn_forms_setup.setButton_caption(rn_forms_setupRequest.getButton_caption()); + old_rn_forms_setup.setForm_desc(rn_forms_setupRequest.getForm_desc()); + old_rn_forms_setup.setForm_name(rn_forms_setupRequest.getForm_name()); + old_rn_forms_setup.setPage_event(rn_forms_setupRequest.getPage_event()); + old_rn_forms_setup.setRelated_to(rn_forms_setupRequest.getRelated_to()); + // line part + old_rn_forms_setup.setComponents(rn_forms_setupRequest.getComponents()); + // updated by + old_rn_forms_setup.setUpdatedBy(rn_forms_setupRequest.getUpdatedBy()); + final Rn_Forms_Setup updated_rn_forms_setup = rn_forms_setup_repository.save(old_rn_forms_setup); + return updated_rn_forms_setup; + } + + @Override + public boolean deleteById(int id) { + Rn_Forms_Setup rn_forms_setup = rn_forms_setup_repository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Rn_Forms_Setup not found :: " + id)); + rn_forms_setup_repository.delete(rn_forms_setup); + return true; + } + + @Override + public List getByFormId(int form_id) { + return rn_forms_setup_repository.findByFormId(form_id); + } + + @Override + public void buildDynamicForm(int form_id) + { + //HEADER + Rn_Forms_Setup rn_forms_setup = rn_forms_setup_repository.findById(form_id) + .orElseThrow(() -> new ResourceNotFoundException("Rn_Forms_Setup not found :: " + form_id)); + + //LINE + List components = rn_forms_setup.getComponents(); + String form_name = rn_forms_setup.getForm_name(); + String form_name_upper = form_name.toUpperCase(); + String buttonCaption = rn_forms_setup.getButton_caption(); + + StringBuilder dynamic_entry_form_html = new StringBuilder(); + StringBuilder dynamic_grid_view_form = new StringBuilder(); + StringBuilder dynamic_read_only_form = new StringBuilder(); + StringBuilder dynamic_edit_form = new StringBuilder(); + // add + dynamic_entry_form_html.append("
\r\n" + + "

ENTRY FORM

\r\n" + + "\r\n" + + "
\r\n" + + "

studen info

\r\n" + + "
\n" + + " \r\n" + + "
\r\n" + + " \r\n"); + + + // edit + dynamic_edit_form.append("
\r\n" + + "

EDIT FORM

\r\n" + + "
\r\n" + + "

" + form_name_upper + "

\r\n" + + "\r\n" + + "
\r\n" + + " \r\n" + + "
\n"); + + // read-only + dynamic_read_only_form.append("
\n"); + + int loopCount = 0; + for(Rn_Forms_Component_Setup component: components) + { + int i = ++loopCount; + String label = component.getLabel(); + String type = component.getType(); + boolean mandatory = Boolean.parseBoolean(component.getMandatory()); + boolean readonly = Boolean.parseBoolean(component.getReadonly()); + //boolean b1=Boolean.parseBoolean(string); + String drop_value = component.getDrop_values(); + + System.out.println("Label Name::" + label); + // FOR MODIFICATION REFER : com.realnet.wfb.service: SpringMVCFieldTypeServiceImpl.java + if(WireFrameConstant.DT_TEXTFIELD.equalsIgnoreCase(type)) { + // ENTRY FORM (.html) + dynamic_entry_form_html.append("\r\n" + + " \r\n" + + " \r\n" + + " \r\n"); + } else if (readonly) { + dynamic_entry_form_html.append(" style=\"width:180px\" readonly>\r\n" + + " \r\n" + + " \r\n"); + } else { + dynamic_entry_form_html.append(" style=\"width:180px\">\r\n" + + " \r\n" + + " \r\n"); + } + + // UPDATE FORM + dynamic_edit_form.append("\r\n" + + " \r\n" + + " \r\n" + + " \r\n"); + + } + + if(WireFrameConstant.DT_LONGTEXT.equalsIgnoreCase(type)) { + System.out.println("LONG TEXT i =" + i); + dynamic_entry_form_html.append(" \r\n" + + " \r\n" + + " \r\n" + + " \n"); + } + + + if (WireFrameConstant.FIELD_CHECKBOX.equalsIgnoreCase(type)) { + dynamic_entry_form_html.append(" \r\n" + + " \r\n" + + " \r\n" + " \n"); + } + + if (WireFrameConstant.FIELD_AUTOCOMPLETE.equalsIgnoreCase(type)) { + dynamic_entry_form_html.append(" \r\n" + " \r\n" + + " \r\n" + " \n"); + } + + // GRID VIEW FORM (.ts) + dynamic_grid_view_form.append("{prop:\"comp" + i + "\" , name: \"" + label + "\" , width:120 },\r\n"); + + // READ-ONLY FORM + dynamic_read_only_form.append("\r\n" + + " \r\n" + + " \r\n" + + " \r\n"); + + } // LOOP END + + // ADD + dynamic_entry_form_html.append("\n
" + label + ": \r\n" + + " \r\n" + + "
" + label + ":
" + label + ":
" + label + + "
" + label + + "
" + label + " {{ dynamicForm.comp" + i + " }}
\r\n" + + "
\r\n" + + " \r\n" + + "
\r\n" + + "
\r\n" + + "
\r\n"); + + + // UPDATE + dynamic_edit_form.append(" \r\n" + + "
\r\n" + + " \r\n" + + " \r\n" + + " \r\n" + + "\r\n"); + + // READ-ONLY + dynamic_read_only_form.append(" \r\n"); + + FileWriter fw = null; + BufferedWriter bw = null; + try { + + // ENTRY FORM + String ngDynamicEntryFormHtmlPath = angularProjectPath + + "/src/app/pages/dynamic-form/add/add-dynamic-form.component.html"; + File ngDynamicEntryFormHtmlFile = new File(ngDynamicEntryFormHtmlPath); + if (!ngDynamicEntryFormHtmlFile.exists()) { + ngDynamicEntryFormHtmlFile.createNewFile(); + } + fw = new FileWriter(ngDynamicEntryFormHtmlFile.getAbsoluteFile()); + bw = new BufferedWriter(fw); + bw.write(dynamic_entry_form_html.toString()); + bw.close(); + + // UPDATE FORM + String ngDynamicEditFormHtmlPath = angularProjectPath + + "/src/app/pages/dynamic-form/edit/edit-dynamic-form.component.html"; + File ngDynamicEditFormHtmlFile = new File(ngDynamicEditFormHtmlPath); + if (!ngDynamicEditFormHtmlFile.exists()) { + ngDynamicEditFormHtmlFile.createNewFile(); + } + fw = new FileWriter(ngDynamicEditFormHtmlFile.getAbsoluteFile()); + bw = new BufferedWriter(fw); + bw.write(dynamic_edit_form.toString()); + bw.close(); + + // GRID VIEW FORM + final String grid_form_start = "// DYNAMIC FORM GRID START"; + final String grid_form_end = "// DYNAMIC FORM GRID END"; + String grid_form_replaceWith = dynamic_grid_view_form.toString(); + String ngDynamicGridFormTsPath = angularProjectPath + + "/src/app/pages/dynamic-form/all/all-dynamic-form.component.ts"; + File ngDynamicGridFormTsFile = new File(ngDynamicGridFormTsPath); + String grid_fileString = FileUtils.readFileToString(ngDynamicGridFormTsFile, StandardCharsets.UTF_8); + String grid_finalString = stringReplace(grid_fileString, grid_form_start, grid_form_end, grid_form_replaceWith); + + bw = new BufferedWriter(new FileWriter(ngDynamicGridFormTsFile, false)); // replaced string + bw.write(grid_finalString); + bw.close(); + + // READ-ONLY FORM + final String read_only_form_start = ""; + final String read_only_form_end = ""; + String read_only_form_replaceWith = dynamic_read_only_form.toString(); + String ngDynamicReadOnlyFormHtmlPath = angularProjectPath + + "/src/app/pages/dynamic-form/read-only/read-only-dynamic-form.component.html"; + File ngDynamicReadOnlyFormHtmlFile = new File(ngDynamicReadOnlyFormHtmlPath); + String read_only_fileString = FileUtils.readFileToString(ngDynamicReadOnlyFormHtmlFile, StandardCharsets.UTF_8); + String read_only_finalString = stringReplace(read_only_fileString, read_only_form_start, read_only_form_end, read_only_form_replaceWith); + + bw = new BufferedWriter(new FileWriter(ngDynamicReadOnlyFormHtmlFile, false)); // replaced string + bw.write(read_only_finalString); + bw.close(); + + } catch (IOException e) { + System.out.println("error is .." + e); + } + } + + @Override + public String stringReplace(String str, String start, String end, String replaceWith) { + int i = str.indexOf(start); + while (i != -1) { + int j = str.indexOf(end, i + 1); + if (j != -1) { + String data = str.substring(0, i + start.length()) + "\n" + replaceWith + "\n"; + String temp = str.substring(j); + data += temp; + str = data; + i = str.indexOf(start, i + replaceWith.length() + end.length() + 1); + } else { + break; + } + } + return str; + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/Rn_Function_Register_Service.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/Rn_Function_Register_Service.java new file mode 100644 index 0000000..3e3e185 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/Rn_Function_Register_Service.java @@ -0,0 +1,21 @@ +package com.realnet.fnd.service; + +import java.util.List; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; + +import com.realnet.fnd.entity.Rn_Function_Register; + +public interface Rn_Function_Register_Service { + List getAll(); + Page getAll(Pageable p); + Rn_Function_Register getById(int id); + Rn_Function_Register save(Rn_Function_Register rn_function_register); + Rn_Function_Register updateById(int id, Rn_Function_Register rn_function_register); + boolean deleteById(int id); + + List getByMenuId(int menu_id); + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/Rn_Function_Register_ServiceImpl.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/Rn_Function_Register_ServiceImpl.java new file mode 100644 index 0000000..298d828 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/Rn_Function_Register_ServiceImpl.java @@ -0,0 +1,81 @@ +package com.realnet.fnd.service; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Service; + +import com.realnet.exceptions.ResourceNotFoundException; +import com.realnet.fnd.entity.Rn_Function_Register; +import com.realnet.fnd.repository.Rn_Function_Register_Repository; + +@Service +public class Rn_Function_Register_ServiceImpl implements Rn_Function_Register_Service { + + @Autowired + private Rn_Function_Register_Repository rn_function_register_repository; + + @Override + public List getAll() { + return rn_function_register_repository.findAll(); + } + + @Override + public Page getAll(Pageable page) { + return rn_function_register_repository.findAll(page); + } + + @Override + public Rn_Function_Register getById(int id) { + Rn_Function_Register rn_function_register = rn_function_register_repository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Menu not found :: " + id)); + return rn_function_register; + } + + @Override + public Rn_Function_Register save(Rn_Function_Register rn_function_register) { + Rn_Function_Register savedRn_Function_Register = rn_function_register_repository.save(rn_function_register); + return savedRn_Function_Register; + } + + @Override + public Rn_Function_Register updateById(int id, Rn_Function_Register functionRequest) { + Rn_Function_Register old_function = rn_function_register_repository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Menu not found :: " + id)); + + old_function.setMenu_id(functionRequest.getMenu_id()); + old_function.setFunction_name(functionRequest.getFunction_name()); + old_function.setFunction_action_name(functionRequest.getFunction_action_name()); + old_function.setFunction_icon(functionRequest.getFunction_icon()); + old_function.setEnd_date(functionRequest.getEnd_date()); + old_function.setEnable_flag(functionRequest.getEnable_flag()); + //This is for line part + // old_function.setStudents(functionRequest.getStudents()); // need to improve + old_function.setUpdatedBy(functionRequest.getUpdatedBy()); + final Rn_Function_Register updated_function = rn_function_register_repository.save(old_function); + return updated_function; + } + + @Override + public boolean deleteById(int id) { + if (!rn_function_register_repository.existsById(id)) { + throw new ResourceNotFoundException("Rn_Menu not exist"); + } + Rn_Function_Register rn_function_register = rn_function_register_repository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Menu not found :: " + id)); + rn_function_register_repository.delete(rn_function_register); + return true; + } + + @Override + public List getByMenuId(int menu_id) { +// List functions = rn_function_register_repository.findByMenuId(menu_id); +// if(functions.isEmpty()) { +// throw new ResourceNotFoundException("Rn_Function_Register Is Empty"); +// } + return rn_function_register_repository.findByMenuId(menu_id); + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/Rn_Main_Menu_Service.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/Rn_Main_Menu_Service.java new file mode 100644 index 0000000..4029dec --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/Rn_Main_Menu_Service.java @@ -0,0 +1,25 @@ +package com.realnet.fnd.service; + +import java.util.List; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; + +import com.realnet.fnd.entity.Rn_Main_Menu; + +public interface Rn_Main_Menu_Service { + List getAll(); + + Page getAll(Pageable p); + + List getByAccountId(String account_id); + + Rn_Main_Menu getById(int id); + + Rn_Main_Menu save(Rn_Main_Menu rn_Main_Menu); + + Rn_Main_Menu updateById(int id, Rn_Main_Menu rn_main_menu); + + boolean deleteById(int id); + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/Rn_Main_Menu_ServiceImpl.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/Rn_Main_Menu_ServiceImpl.java new file mode 100644 index 0000000..9ab3f64 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/Rn_Main_Menu_ServiceImpl.java @@ -0,0 +1,79 @@ +package com.realnet.fnd.service; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Service; + +import com.realnet.exceptions.ResourceNotFoundException; +import com.realnet.fnd.entity.Rn_Main_Menu; +import com.realnet.fnd.repository.Rn_Main_Menu_Repository; + +@Service +public class Rn_Main_Menu_ServiceImpl implements Rn_Main_Menu_Service { + + @Autowired + private Rn_Main_Menu_Repository rn_menu_register_repository; + + @Override + public List getAll() { + return rn_menu_register_repository.findAll(); + } + + @Override + public Page getAll(Pageable page) { + return rn_menu_register_repository.findAll(page); + } + + @Override + public List getByAccountId(String account_id) { + List rn_menu_register = rn_menu_register_repository.findByAccountId(account_id); + if (rn_menu_register.isEmpty()) { + throw new ResourceNotFoundException("Menu not found With Account id :: " + account_id); + } + return rn_menu_register; + } + + @Override + public Rn_Main_Menu getById(int id) { + Rn_Main_Menu rn_menu_register = rn_menu_register_repository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Menu not found :: " + id)); + return rn_menu_register; + } + + @Override + public Rn_Main_Menu save(Rn_Main_Menu rn_menu_register) { + Rn_Main_Menu savedRn_Main_Menu = rn_menu_register_repository.save(rn_menu_register); + return savedRn_Main_Menu; + } + + @Override + public Rn_Main_Menu updateById(int id, Rn_Main_Menu menuRequest) { + Rn_Main_Menu old_menu = rn_menu_register_repository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Menu not found :: " + id)); + + old_menu.setMenu_name(menuRequest.getMenu_name()); + old_menu.setMenu_action_link(menuRequest.getMenu_action_link()); + old_menu.setMenu_icon(menuRequest.getMenu_icon()); + old_menu.setMenu_type(menuRequest.getMenu_type()); + // This is for line part // need to improve + old_menu.setSub_menus(menuRequest.getSub_menus()); + old_menu.setUpdatedBy(menuRequest.getUpdatedBy()); + final Rn_Main_Menu updated_menu = rn_menu_register_repository.save(old_menu); + return updated_menu; + } + + @Override + public boolean deleteById(int id) { + if (!rn_menu_register_repository.existsById(id)) { + throw new ResourceNotFoundException("Rn_Menu not exist"); + } + Rn_Main_Menu rn_menu_register = rn_menu_register_repository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Menu not found :: " + id)); + rn_menu_register_repository.delete(rn_menu_register); + return true; + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/Rn_Menu_Group_Service.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/Rn_Menu_Group_Service.java new file mode 100644 index 0000000..a343d60 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/Rn_Menu_Group_Service.java @@ -0,0 +1,29 @@ +package com.realnet.fnd.service; + +import java.util.List; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; + +import com.realnet.fnd.entity.Rn_Menu_Group_Header; + +public interface Rn_Menu_Group_Service { + List getAll(); + + Page getAll(Pageable p); + + Rn_Menu_Group_Header getById(Long id); + + Rn_Menu_Group_Header save(Rn_Menu_Group_Header rn_menu_group_header); + + Rn_Menu_Group_Header updateById(Long id, Rn_Menu_Group_Header rn_menu_group_header); + + boolean deleteById(Long id); + + //List getByFormId(int form_id); + + //Rn_Main_Menu loadmenuGroupByUser(int menu_group_id); + + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/Rn_Menu_Group_ServiceImpl.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/Rn_Menu_Group_ServiceImpl.java new file mode 100644 index 0000000..1fdddad --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/Rn_Menu_Group_ServiceImpl.java @@ -0,0 +1,86 @@ +package com.realnet.fnd.service; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Service; + +import com.realnet.exceptions.ResourceNotFoundException; +import com.realnet.fnd.entity.Rn_Menu_Group_Header; +import com.realnet.fnd.repository.Rn_Menu_Group_Repository; + +@Service +public class Rn_Menu_Group_ServiceImpl implements Rn_Menu_Group_Service { + + + @Autowired + private Rn_Menu_Group_Repository rn_menu_group_repository; + + @Override + public List getAll() { + return rn_menu_group_repository.findAll(); + } + + @Override + public Page getAll(Pageable page) { + return rn_menu_group_repository.findAll(page); + } + + @Override + public Rn_Menu_Group_Header getById(Long id) { + Rn_Menu_Group_Header rn_forms_setup = rn_menu_group_repository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Rn_Menu_Group not found :: " + id)); + return rn_forms_setup; + } + + @Override + public Rn_Menu_Group_Header save(Rn_Menu_Group_Header rn_menu_group_header) { + Rn_Menu_Group_Header savedMenu_Group = rn_menu_group_repository.save(rn_menu_group_header); + return savedMenu_Group; + } + + @Override + public Rn_Menu_Group_Header updateById(Long id, Rn_Menu_Group_Header menu_groupRequest) { + Rn_Menu_Group_Header old_rn_menu_group = rn_menu_group_repository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Rn_Menu_Group not found :: " + id)); + old_rn_menu_group.setMenu_name(menu_groupRequest.getMenu_name()); + old_rn_menu_group.setDescription(menu_groupRequest.getDescription()); +// old_rn_menu_group.setActive(menu_groupRequest.getActive()); + old_rn_menu_group.setStart_date(menu_groupRequest.getStart_date()); + old_rn_menu_group.setEnd_date(menu_groupRequest.getEnd_date()); + // line part + old_rn_menu_group.setMenu_group_lines(menu_groupRequest.getMenu_group_lines()); + // updated by + old_rn_menu_group.setUpdatedBy(menu_groupRequest.getUpdatedBy()); + final Rn_Menu_Group_Header updated_rn_forms_setup = rn_menu_group_repository.save(old_rn_menu_group); + return updated_rn_forms_setup; + } + + @Override + public boolean deleteById(Long id) { + Rn_Menu_Group_Header rn_forms_setup = rn_menu_group_repository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Rn_Menu_Group_Header not found :: " + id)); + rn_menu_group_repository.delete(rn_forms_setup); + return true; + } + + // this is not done +// @Override +// public Rn_Main_Menu loadmenuGroupByUser(int menu_group_id) { +// Rn_Menu_Group_Header menu_group_header = getById(menu_group_id); +// List menu_group_lines = menu_group_header.getMenu_group_lines(); +// for(Rn_Menu_Group_Line menu_group_line : menu_group_lines) { +// int menu_id = menu_group_line.getMenu_id(); +// +// } +// return null; +// } + + /* + * @Override public List getByFormId(int form_id) { return + * rn_menu_group_repository.findByFormId(form_id); } + */ + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/Rn_Menu_Register_Service.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/Rn_Menu_Register_Service.java new file mode 100644 index 0000000..6d92595 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/Rn_Menu_Register_Service.java @@ -0,0 +1,19 @@ +package com.realnet.fnd.service; + +import java.util.List; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; + +import com.realnet.fnd.entity.Rn_Menu_Register; + +public interface Rn_Menu_Register_Service { + List getAll(); + Page getAll(Pageable p); + List getByAccountId(String account_id); + Rn_Menu_Register getById(int id); + Rn_Menu_Register save(Rn_Menu_Register rn_Menu_Register); + Rn_Menu_Register updateById(int id, Rn_Menu_Register rn_Menu_Register); + boolean deleteById(int id); + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/Rn_Menu_Register_ServiceImpl.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/Rn_Menu_Register_ServiceImpl.java new file mode 100644 index 0000000..9d346b4 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service/Rn_Menu_Register_ServiceImpl.java @@ -0,0 +1,82 @@ +package com.realnet.fnd.service; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Service; + +import com.realnet.exceptions.ResourceNotFoundException; +import com.realnet.fnd.entity.Rn_Menu_Register; +import com.realnet.fnd.repository.Rn_Menu_Register_Repository; + +@Service +public class Rn_Menu_Register_ServiceImpl implements Rn_Menu_Register_Service { + + @Autowired + private Rn_Menu_Register_Repository rn_menu_register_repository; + + @Override + public List getAll() { + return rn_menu_register_repository.findAll(); + } + + @Override + public Page getAll(Pageable page) { + return rn_menu_register_repository.findAll(page); + } + + @Override + public List getByAccountId(String account_id) { + List rn_menu_register = rn_menu_register_repository.findByAccountId(account_id); + if(rn_menu_register.isEmpty()) { + throw new ResourceNotFoundException("Menus not found With Account id :: " + account_id); + } + return rn_menu_register; + } + + @Override + public Rn_Menu_Register getById(int id) { + Rn_Menu_Register rn_menu_register = rn_menu_register_repository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Menu not found :: " + id)); + return rn_menu_register; + } + + @Override + public Rn_Menu_Register save(Rn_Menu_Register rn_menu_register) { + Rn_Menu_Register savedRn_Menu_Register = rn_menu_register_repository.save(rn_menu_register); + return savedRn_Menu_Register; + } + + @Override + public Rn_Menu_Register updateById(int id, Rn_Menu_Register menuRequest) { + Rn_Menu_Register old_menu = rn_menu_register_repository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Menu not found :: " + id)); + + old_menu.setMain_menu_name(menuRequest.getMain_menu_name()); + old_menu.setMain_menu_action_name(menuRequest.getMain_menu_action_name()); + old_menu.setMain_menu_icon(menuRequest.getMain_menu_icon()); + old_menu.setEnable_flag(menuRequest.getEnable_flag()); + old_menu.setEnd_date(menuRequest.getEnd_date()); + //This is for line part + // old_menu.setStudents(menuRequest.getStudents()); // need to improve + old_menu.setUpdatedBy(menuRequest.getUpdatedBy()); + final Rn_Menu_Register updated_menu = rn_menu_register_repository.save(old_menu); + return updated_menu; + } + + @Override + public boolean deleteById(int id) { + if (!rn_menu_register_repository.existsById(id)) { + throw new ResourceNotFoundException("Rn_Menu not exist"); + } + Rn_Menu_Register rn_menu_register = rn_menu_register_repository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Menu not found :: " + id)); + rn_menu_register_repository.delete(rn_menu_register); + return true; + } + + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service1/GrpMenuAccessServiceImpl.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service1/GrpMenuAccessServiceImpl.java new file mode 100644 index 0000000..0c26709 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service1/GrpMenuAccessServiceImpl.java @@ -0,0 +1,25 @@ +package com.realnet.fnd.service1; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Service; + +import com.realnet.fnd.entity1.GrpMenuAccess; +import com.realnet.fnd.repository1.GrpMenuAccessRepository; + +@Service +public class GrpMenuAccessServiceImpl { + private GrpMenuAccessRepository grpMenuAccessRepository; + @Autowired + public GrpMenuAccessServiceImpl(GrpMenuAccessRepository grpMenuAccessRepository) { + super(); + this.grpMenuAccessRepository = grpMenuAccessRepository; + } + public List getAll(Pageable page){ + List l = grpMenuAccessRepository.findAll(page).getContent(); + return l; + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service1/MenuDetServiceImpl.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service1/MenuDetServiceImpl.java new file mode 100644 index 0000000..04bea5c --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service1/MenuDetServiceImpl.java @@ -0,0 +1,33 @@ +package com.realnet.fnd.service1; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Service; + +import com.realnet.fnd.entity1.MenuDet; +import com.realnet.fnd.repository1.MenuDetRepository; + +@Service +public class MenuDetServiceImpl { + private MenuDetRepository menuDetRepository; + @Autowired + public MenuDetServiceImpl(MenuDetRepository menuDetRepository) { + super(); + this.menuDetRepository = menuDetRepository; + } + public List getAll(){ + return menuDetRepository.findAll(); + } + public List getAllObject(Pageable page){ + List l = menuDetRepository.getAll(page).getContent(); + return l; + } + public List getById(Long usrGrp,Long menuId){ + return menuDetRepository.getById(usrGrp, menuId); + } + public List getByUserId(Long usrGrp,Long menuId) { + return menuDetRepository.getByUserId(usrGrp,menuId); + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service1/SecmenuDetailService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service1/SecmenuDetailService.java new file mode 100644 index 0000000..0290839 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/fnd/service1/SecmenuDetailService.java @@ -0,0 +1,135 @@ +package com.realnet.fnd.service1; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; + +import com.realnet.fnd.entity1.GrpMenuAccess; +import com.realnet.fnd.entity1.MenuDet; +import com.realnet.fnd.repository1.GrpMenuAccessRepository; +import com.realnet.fnd.repository1.MenuDetRepository; +import com.realnet.users.entity1.AppUserRole; +import com.realnet.users.repository1.AppUserRoleRepository; + +@Service +public class SecmenuDetailService { + + @Autowired + private MenuDetRepository menuDetRepository; + + @Autowired + private AppUserRoleRepository appUserRoleRepository; + + @Autowired + private GrpMenuAccessRepository grpMenuAccessRepository; + + public MenuDet customsecmenuadd(String tablename, Long menuId) { + + MenuDet menuDet = new MenuDet(); + String origTableName = tablename.replaceAll("_", " "); + + menuDet.setMenuId(menuId); + menuDet.setItemSeq(8001l); + menuDet.setMain_menu_icon_name(tablename); + menuDet.setMenuItemDesc(origTableName); + menuDet.setModuleName(tablename); + menuDet.setMain_menu_action_name(tablename); + + menuDet.setStatus("Enable"); + + MenuDet save = menuDetRepository.save(menuDet); + + sync(menuId, new GrpMenuAccess()); + + return save; + + } + +// sync service + public List sync(Long gmenuid, GrpMenuAccess gr) { + + List list = new ArrayList<>(); + MenuDet formenu = menuDetRepository.findById(gmenuid).orElseThrow(null); + + List all = grpMenuAccessRepository.findByGrpAndMenuid1(formenu.getMenuItemId()); + + for (GrpMenuAccess a : all) { + + a.setMenuItemId(formenu); + a.setItemSeq(formenu.getItemSeq()); + a.setMenuItemDesc(formenu.getMenuItemDesc()); + a.setModuleName(formenu.getModuleName()); + a.setStatus(formenu.getStatus()); + a.setMain_menu_action_name(formenu.getMain_menu_action_name()); + a.setMain_menu_icon_name(formenu.getMain_menu_icon_name()); + a.setMenuId(formenu.getMenuId()); + GrpMenuAccess save = grpMenuAccessRepository.save(a); + list.add(save); + } + + List submenu = menuDetRepository.findAllSubmenuByMenuId(gmenuid); + for (int i = 0; i < submenu.size(); i++) { + MenuDet m = menuDetRepository.findById(submenu.get(i).getMenuItemId()).orElseThrow(null); + List li = grpMenuAccessRepository.findlist(m.getMenuItemId()); + + if (li.isEmpty()) { + List grp = grpMenuAccessRepository.findAllById(gmenuid); + + for (GrpMenuAccess a : grp) { + AppUserRole app = appUserRoleRepository.findById(a.getUsrGrp().getUsrGrp()).orElseThrow(null); + gr.setUsrGrp(app); + gr.setMenuItemId(m); + + gr.setItemSeq(m.getItemSeq()); + gr.setMenuItemDesc(m.getMenuItemDesc()); + gr.setModuleName(m.getModuleName()); + gr.setStatus(m.getStatus()); + gr.setMain_menu_action_name(m.getMain_menu_action_name()); + gr.setMain_menu_icon_name(m.getMain_menu_icon_name()); + gr.setMenuId(m.getMenuId()); + + gr.setMCreate("true"); + gr.setMDelete("true"); + gr.setMEdit("true"); + gr.setMQuery("true"); + gr.setMVisible("true"); + gr.setIsdisable("true"); + gr.setMexport("true"); + + gr.setCreatedAt(new Date()); + gr.setUpdatedAt(new Date()); + + GrpMenuAccess save2 = grpMenuAccessRepository.save(gr); + list.add(save2); + } + + } + + else { + for (GrpMenuAccess g : li) { + + g.setMenuItemId(m); + + g.setItemSeq(m.getItemSeq()); + g.setMenuItemDesc(m.getMenuItemDesc()); + g.setModuleName(m.getModuleName()); + g.setStatus(m.getStatus()); + g.setMain_menu_action_name(m.getMain_menu_action_name()); + g.setMain_menu_icon_name(m.getMain_menu_icon_name()); + g.setMenuId(m.getMenuId()); + + GrpMenuAccess save1 = grpMenuAccessRepository.save(g); + list.add(save1); + } + } + } + return list; + + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/logging/LogEntity.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/logging/LogEntity.java new file mode 100644 index 0000000..096563b --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/logging/LogEntity.java @@ -0,0 +1,31 @@ +package com.realnet.logging; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; + +import lombok.Data; + +@Data +@Entity +@Table(name= "LOGS") +public class LogEntity { + + @Id + @Column(name="USER_ID") + private Long userId; + + @Column(name="DATED") + private String dated; + + @Column(name="LOGGER") + private String logger; + + @Column(name="LAVEL") + private String lavel; + + @Column(name="MESSAGE") + private String message; + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/logging/LogExecutionTime.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/logging/LogExecutionTime.java new file mode 100644 index 0000000..4743378 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/logging/LogExecutionTime.java @@ -0,0 +1,12 @@ +package com.realnet.logging; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target(ElementType.METHOD) +@Retention(RetentionPolicy.RUNTIME) +public @interface LogExecutionTime { + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/logging/LoggingAspect.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/logging/LoggingAspect.java new file mode 100644 index 0000000..c775758 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/logging/LoggingAspect.java @@ -0,0 +1,145 @@ +package com.realnet.logging; + +import java.util.concurrent.TimeUnit; + +import org.aspectj.lang.JoinPoint; +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.annotation.AfterReturning; +import org.aspectj.lang.annotation.AfterThrowing; +import org.aspectj.lang.annotation.Around; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Pointcut; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; + +import lombok.Data; + +@Data +@Component +public class LoggingAspect { + + Logger logger = LoggerFactory.getLogger(LoggingAspect.class); + + // static Logger logger = LogManager.getLogger(LoggingAspect.class.getName()); + + /* + * 1. (..) zero or more || (*) one or more args + * 2. @Before("execution(* com.realnet.*.*(..))") + * 3. getTarger() returns the Object name + */ + +// @Before("packagePointcut()") +// public void beforeMethodCall(JoinPoint joinPoint) throws JsonProcessingException { +// String className = joinPoint.getTarget().getClass().toString(); // com.realnet.controller.Rn_InstructorController +// String methodName = joinPoint.getSignature().getName(); //// getInstructors +// String methodSignature = joinPoint.getSignature().toString(); +// +// // Rn_InstructorResponse com.realnet.controller.Rn_InstructorController.getInstructors(Integer,Integer) +// //System.out.println(methodSignature); +// String method = getMethodSignature(methodSignature); +// logger.info("Executing " + className + " : " + method); +// +// Object[] args = joinPoint.getArgs(); +// // object into json format +// ObjectMapper mapper = new ObjectMapper(); +// String json = mapper.writeValueAsString(args); +// logger.debug("Arguments: " + json); +// } + + // handle before after together + @Around("anyClasses()") + public Object LoggingAdvice(ProceedingJoinPoint pjp) throws Throwable { + String className = pjp.getTarget().getClass().toString(); + // String methodName = pjp.getSignature().getName(); + String methodSignature = pjp.getSignature().toString(); + String methodName = methodSignature(methodSignature); + Object[] args = pjp.getArgs(); + // object into json format + ObjectMapper mapper = new ObjectMapper(); + String json = mapper.writeValueAsString(args); + logger.info("Executing : " + className + " : " + methodName); + logger.debug("Arguments: " + args); + Object object = pjp.proceed(); + logger.info("Execution complete: " + className + " : " + methodName); + logger.debug(className + " : " + methodName + " Response: " + json); + return object; + } + + + @AfterReturning("anyClasses()") + public void afterMethodCall(JoinPoint joinPoint) throws JsonProcessingException { + String className = joinPoint.getTarget().getClass().toString(); + String methodSignature = joinPoint.getSignature().toString(); + String methodName = methodSignature(methodSignature); + Object[] args = joinPoint.getArgs(); + // object into json format + ObjectMapper mapper = new ObjectMapper(); + String json = mapper.writeValueAsString(args); + logger.info("Successfully Executed: " + className + " : " + methodName); + } + + // handle exception + @AfterThrowing(pointcut = "anyClasses()", throwing = "ex") + public void errorHandling(JoinPoint joinPoint, Exception ex) throws JsonProcessingException { + String className = joinPoint.getTarget().getClass().toString(); + // String methodName = joinPoint.getSignature().getName(); + String methodSignature = joinPoint.getSignature().toString(); + String methodName = methodSignature(methodSignature); + Object[] args = joinPoint.getArgs(); + // object into json format + ObjectMapper mapper = new ObjectMapper(); + String json = mapper.writeValueAsString(args); + logger.debug(className + " : " + methodName + "Arguments: " + json); + logger.error("Some Exception Happens: " + className + " : " + methodName); + logger.error(ex.getMessage()); + } + + // any package, any class, any method inside com.realnet + @Pointcut("execution(* com.realnet.*.*.*(..)) && !@annotation(com.realnet.logging.NoLogging)") + public void packagePointcut() { + } + // any public class + @Pointcut("within(com.realnet..*) && !@annotation(com.realnet.logging.NoLogging)") + private void anyClasses() {} + + + // problem in config class + @Pointcut("!within(com.realnet.config..*)") + private void configOperations() { + } + + @Around("@annotation(com.realnet.logging.LogExecutionTime)") + public Object logExecutionTime(ProceedingJoinPoint joinPoint) throws Throwable { + long start = System.currentTimeMillis(); + + Object proceed = joinPoint.proceed(); + + long executionTime = System.currentTimeMillis() - start; + + long seconds = TimeUnit.MILLISECONDS.toSeconds(executionTime); + long minutes = (executionTime/1000)/60; + + System.out.println(joinPoint.getSignature() + " executed in " + seconds + "sec(" + minutes + " Mins)"); + return proceed; + } + + + + + static String methodSignature(String name) { + name = name.substring(name.lastIndexOf(".") + 1); + return name; + } + + + +// // any public class +// @Pointcut("execution(public * *(..))") +// private void anyPublicOperation() {} +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/logging/NoLogging.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/logging/NoLogging.java new file mode 100644 index 0000000..bebdce1 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/logging/NoLogging.java @@ -0,0 +1,11 @@ +package com.realnet.logging; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target(ElementType.METHOD) +@Retention(RetentionPolicy.RUNTIME) +public @interface NoLogging { +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/logging/SecurityNoLogging.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/logging/SecurityNoLogging.java new file mode 100644 index 0000000..933716b --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/logging/SecurityNoLogging.java @@ -0,0 +1,11 @@ +package com.realnet.logging; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target(ElementType.TYPE) +@Retention(RetentionPolicy.RUNTIME) +public @interface SecurityNoLogging { +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/logging1/ExceptionLoggingController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/logging1/ExceptionLoggingController.java new file mode 100644 index 0000000..cd8da91 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/logging1/ExceptionLoggingController.java @@ -0,0 +1,92 @@ +//package com.realnet.logging1; +// +//import java.io.File; +//import java.io.FileWriter; +//import java.nio.file.FileSystems; +//import java.nio.file.Path; +//import java.nio.file.Paths; +// +//import javax.servlet.http.HttpSession; +// +//import org.slf4j.Logger; +//import org.slf4j.LoggerFactory; +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.boot.web.servlet.error.ErrorController; +//import org.springframework.http.HttpStatus; +//import org.springframework.http.ResponseEntity; +//import org.springframework.web.bind.annotation.ExceptionHandler; +//import org.springframework.web.bind.annotation.RestControllerAdvice; +// +//import com.realnet.config.HttpLoggingFilter; +//import com.realnet.users.service1.AppUserServiceImpl; +// +//@RestControllerAdvice +//public class ExceptionLoggingController implements ErrorController{ +// private static final String ERROR_PATH = "/error"; +// private final Logger LOGGER = LoggerFactory.getLogger(getClass()); +// @Autowired +// private AppUserServiceImpl appUserServiceImpl; +// +// public ExceptionLoggingController(AppUserServiceImpl appUserServiceImpl) { +// super(); +// this.appUserServiceImpl = appUserServiceImpl; +// } +// +// @ExceptionHandler(Exception.class) +// public ResponseEntity internalServerEror(Exception exception,HttpSession session){ +// StackTraceElement[] e = exception.getStackTrace(); +// System.out.println(e[0].getMethodName()); +// System.out.println(e[0].getClassName()); +// LOGGER.error("Unhandled Error By "+appUserServiceImpl.getLoggedInUser().getUsername()+" = "+exception.getMessage()); +// LOGGER.error("Request Info = "+HttpLoggingFilter.logInfo+"Error at Mehod= "+e[0].getMethodName()+" In Class= "+e[0].getClassName()); +// if(session.getAttribute("generate_log").equals("Y")) { +// try { +// if (session.getAttribute("LogginLevel").equals("error")) { +// Path root = FileSystems.getDefault().getPath("").toAbsolutePath(); +// Path filePath = Paths.get(root.toString(),"logs",session.getAttribute("LogFileName").toString()); +// File f=filePath.toFile(); +// // File f = new File("/home/jboss/EAP-7.1.0/logs/sysadmin2_5463783.log"); +// FileWriter fw = new FileWriter(f,true); +// StringBuilder logInfo = HttpLoggingFilter.logInfo; +// logInfo.append(" [RESPONSE:").append(" ERROR]").append(" [ERROR AT ").append(e[0].getMethodName()) +// .append(" IN CLASS ").append(e[0].getClassName()).append("]"); +// fw.write(logInfo + "\n"); +// fw.close(); +// } else if (session.getAttribute("LogginLevel").equals("debug")) { +// Path root = FileSystems.getDefault().getPath("").toAbsolutePath(); +// Path filePath = Paths.get(root.toString(),"logs",session.getAttribute("LogFileName").toString()); +// File f=filePath.toFile(); +// // File f = new File("/home/jboss/EAP-7.1.0/logs/sysadmin2_5463783.log"); +// FileWriter fw = new FileWriter(f,true); +// StringBuilder logInfo = HttpLoggingFilter.logInfo; +// logInfo.append(" [RESPONSE:").append(" DEBUG]").append(" [ERROR AT ").append(e[0].getMethodName()) +// .append(" IN CLASS ").append(e[0].getClassName()).append("]"); +// fw.write(logInfo + "\n"); +// fw.close(); +// HttpLoggingFilter.logged=true; +// } else if (session.getAttribute("LogginLevel").equals("warn")) { +// Path root = FileSystems.getDefault().getPath("").toAbsolutePath(); +// Path filePath = Paths.get(root.toString(),"logs",session.getAttribute("LogFileName").toString()); +// File f=filePath.toFile(); +// // File f = new File("/home/jboss/EAP-7.1.0/logs/sysadmin2_5463783.log"); +// FileWriter fw = new FileWriter(f,true); +// StringBuilder logInfo = HttpLoggingFilter.logInfo; +// logInfo.append(" [RESPONSE:").append(" WARN]").append(" [ERROR AT ").append(e[0].getMethodName()) +// .append(" IN CLASS ").append(e[0].getClassName()).append("]"); +// fw.write(logInfo + "\n"); +// fw.close(); +// } +// } catch (Exception e1) { +// +// } +// } +// return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR); +// } +// +// @Override +// public String getErrorPath() { +// // TODO Auto-generated method stub +// return ERROR_PATH; +// } +// +//} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/logging1/PatternLayoutWithUserContext.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/logging1/PatternLayoutWithUserContext.java new file mode 100644 index 0000000..55f1f0e --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/logging1/PatternLayoutWithUserContext.java @@ -0,0 +1,12 @@ +package com.realnet.logging1; + +import ch.qos.logback.classic.PatternLayout; + +public class PatternLayoutWithUserContext extends PatternLayout { + static { + PatternLayout.defaultConverterMap.put( + "user", UserConverter.class.getName()); + PatternLayout.defaultConverterMap.put( + "session", SessionConverter.class.getName()); + } +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/logging1/SessionConverter.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/logging1/SessionConverter.java new file mode 100644 index 0000000..52954cd --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/logging1/SessionConverter.java @@ -0,0 +1,18 @@ +package com.realnet.logging1; + +import org.springframework.web.context.request.RequestAttributes; +import org.springframework.web.context.request.RequestContextHolder; + +import ch.qos.logback.classic.pattern.ClassicConverter; +import ch.qos.logback.classic.spi.ILoggingEvent; + +public class SessionConverter extends ClassicConverter { + @Override + public String convert(ILoggingEvent event) { + RequestAttributes attrs = RequestContextHolder.getRequestAttributes(); + if (attrs != null) { + return attrs.getSessionId(); + } + return "NO_SESSION"; + } +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/logging1/UserConverter.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/logging1/UserConverter.java new file mode 100644 index 0000000..f72cbe2 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/logging1/UserConverter.java @@ -0,0 +1,18 @@ +package com.realnet.logging1; + +import org.springframework.security.core.Authentication; +import org.springframework.security.core.context.SecurityContextHolder; + +import ch.qos.logback.classic.pattern.ClassicConverter; +import ch.qos.logback.classic.spi.ILoggingEvent; + +public class UserConverter extends ClassicConverter { + @Override + public String convert(ILoggingEvent event) { + Authentication auth = SecurityContextHolder.getContext().getAuthentication(); + if (auth != null) { + return auth.getName(); + } + return "NO_USER"; + } +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/logging1/controller/AppUserLogController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/logging1/controller/AppUserLogController.java new file mode 100644 index 0000000..ddc9cea --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/logging1/controller/AppUserLogController.java @@ -0,0 +1,183 @@ +package com.realnet.logging1.controller; + +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.time.Instant; +import java.util.Date; +import java.util.List; + +import javax.servlet.http.HttpSession; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.logging1.entity.AppUserLog; +import com.realnet.logging1.service.LoggingService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; + +@RestController +@CrossOrigin(origins = "*", maxAge = 3600) +@RequestMapping(value="/log" ) +public class AppUserLogController { + private LoggingService loggingService; + private AppUserServiceImpl appUserServiceImpl; + @Autowired + public AppUserLogController(LoggingService loggingService, + AppUserServiceImpl appUserServiceImpl) { + super(); + this.loggingService = loggingService; + this.appUserServiceImpl=appUserServiceImpl; + } + + @GetMapping("/getAll") + public ResponseEntity getAllLog(){ + List l = loggingService.getAll(); + return new ResponseEntity<>(l,HttpStatus.OK); + } + @GetMapping("/getOne/{id}") + public ResponseEntity getOne(@PathVariable("id") Long id){ + AppUserLog a = loggingService.getOne(id); + if(a!=null) { + return new ResponseEntity<>(a,HttpStatus.OK); + } + return new ResponseEntity<>("Not Found",HttpStatus.BAD_REQUEST); + } + @GetMapping("/startLogging/{username}/{mode}") + public ResponseEntity addOne(@PathVariable("username") String username,@PathVariable("mode")String mode,HttpSession session){ + AppUser a = appUserServiceImpl.getByUserName(username).orElse(null); + DateFormat simple =new SimpleDateFormat("dd MMM yyyy HH:mm:ss"); + if(a!=null) { + AppUserLog l = loggingService.getOne(a.getUserId()); + if(l!=null) { + l.setGenerateLog("Y"); + if(mode!=null) { + l.setLogLevel(mode); + } + loggingService.update(l); + session.setAttribute("generate_log","Y"); + Object a1 = new Object() { + private String message="Will now Start logging"; + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + }; + return new ResponseEntity<>(a1,HttpStatus.OK); + }else { + long ut1 = Instant.now().getEpochSecond(); + AppUserLog p =new AppUserLog(); + p.setUserName(a.getUsername()); + p.setGenerateLog("Y"); + p.setLogFileName(a.getUsername()+ut1+".log"); + p.setLogLevel("info"); + if(mode!=null) { + p.setLogLevel(mode); + } + p.setGenerateLog("Y"); + p.setCreatedOn(new Date()); + p.setCreatedOnFormated(simple.format(new Date())); + loggingService.add(p); + session.setAttribute("generate_log","Y"); + Object a1 = new Object() { + private String message="Will now Start logging"; + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + }; + return new ResponseEntity<>(a1,HttpStatus.OK); + } + } + Object a1 = new Object() { + private String message="No user found with this username"; + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + }; + return new ResponseEntity<>(a1,HttpStatus.OK); + } + @GetMapping("/stopLogging/{username}") + public ResponseEntity stopLog(@PathVariable("username") String username,HttpSession session){ + AppUser a = appUserServiceImpl.getByUserName(username).orElse(null); + DateFormat simple =new SimpleDateFormat("dd MMM yyyy HH:mm:ss"); + if(a!=null) { + AppUserLog l = loggingService.getOne(a.getUserId()); + if(l!=null) { + l.setGenerateLog("N"); + loggingService.add(l); + session.setAttribute("generate_log","N"); + Object a1 = new Object() { + private String message="Will now Stop logging from next session"; + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + }; + return new ResponseEntity<>(a1,HttpStatus.OK); + }else { + long ut1 = Instant.now().getEpochSecond(); + //AppUserLog p = new AppUserLog(c,a.getUsername(),"Y",a.getUsername()+ut1+".log","info",null,null); + AppUserLog p =new AppUserLog(); + p.setUserName(a.getUsername()); + p.setLogFileName(a.getUsername()+ut1+".log"); + p.setLogLevel("info"); + p.setGenerateLog("N"); + p.setCreatedOn(new Date()); + p.setCreatedOnFormated(simple.format(new Date())); + loggingService.add(p); + session.setAttribute("generate_log","N"); + Object a1 = new Object() { + private String message="Will now Stop logging from next session"; + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + }; + return new ResponseEntity<>(a1,HttpStatus.OK); + } + } + Object a1 = new Object() { + private String message="No user found with this username"; + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + }; + return new ResponseEntity<>(a1,HttpStatus.OK); + } + + + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/logging1/controller/AppUserLogController2.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/logging1/controller/AppUserLogController2.java new file mode 100644 index 0000000..8960bd9 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/logging1/controller/AppUserLogController2.java @@ -0,0 +1,75 @@ +package com.realnet.logging1.controller; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; +import java.io.IOException; + +import javax.servlet.http.HttpServletRequest; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.core.io.Resource; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + + +import com.realnet.logging1.entity.AppUserLog; +import com.realnet.logging1.repository.AppUserLogginRepository; +import com.realnet.logging1.service.LoggingService; +import com.realnet.utils.Constant; + +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@RestController +@CrossOrigin(origins = "*", maxAge = 3600) +@RequestMapping(value = "/log2") +public class AppUserLogController2 { + private LoggingService loggingService; + + @Value("${projectPath}") + private String projectPath; + + @Autowired + private AppUserLogginRepository logginRepository; + + @Autowired + public AppUserLogController2(LoggingService loggingService) { + super(); + this.loggingService = loggingService; + } + + @GetMapping("/downloadLog/{filename}") + public ResponseEntity sendFile(@PathVariable("filename") String filename, HttpServletRequest request) + throws Exception { + // AppUser a = appUserServiceImpl.getByUserName(username).orElse(null); + Resource resource = loggingService.loadFileAsResource(filename); + if (resource != null) { + String contentType = null; + try { + contentType = request.getServletContext().getMimeType(resource.getFile().getAbsolutePath()); + } catch (IOException ex) { + throw new Exception("Could not find log file for file: " + filename); + } + // Fallback to the default content type if type could not be determined + if (contentType == null) { + contentType = "application/octet-stream"; + } + return ResponseEntity.ok().contentType(MediaType.parseMediaType(contentType)) + .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"" + resource.getFilename() + "\"") + .body(resource); + } else { + return new ResponseEntity<>("File could not be loaded", HttpStatus.BAD_REQUEST); + } + } + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/logging1/entity/AppUserLog.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/logging1/entity/AppUserLog.java new file mode 100644 index 0000000..0a0aa9e --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/logging1/entity/AppUserLog.java @@ -0,0 +1,46 @@ +package com.realnet.logging1.entity; + +import java.sql.Blob; +import java.util.Date; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.SequenceGenerator; +import javax.persistence.Table; +import javax.persistence.Transient; + +import lombok.AllArgsConstructor; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + +@Entity +@Table(name="app_user_log") +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@EqualsAndHashCode +@ToString +public class AppUserLog { + @Id + @GeneratedValue(generator = "appUserLog_gen") + @SequenceGenerator(name="appUserLog_gen", sequenceName="app_user_log_sequence",initialValue = 1, allocationSize = 1) + private Long logId; + @Column(unique = true) + private String userName; + private String generateLog="N"; + private String logFileName; + private String logLevel="info"; + private Date createdOn; + @Transient + private Blob file; + @Transient + private Long filesizeCurrent; + @Transient + private String createdOnFormated; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/logging1/repository/AppUserLogginRepository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/logging1/repository/AppUserLogginRepository.java new file mode 100644 index 0000000..d4e4f2d --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/logging1/repository/AppUserLogginRepository.java @@ -0,0 +1,16 @@ +package com.realnet.logging1.repository; + +import java.util.List; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.stereotype.Repository; + +import com.realnet.logging1.entity.AppUserLog; + +@Repository +public interface AppUserLogginRepository extends JpaRepository{ + List findByUserName(String userName); +// @Query(value="select Max(*) from app") +// long getMax(); +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/logging1/service/LoggingService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/logging1/service/LoggingService.java new file mode 100644 index 0000000..395ad1c --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/logging1/service/LoggingService.java @@ -0,0 +1,125 @@ +package com.realnet.logging1.service; + +import java.io.File; +import java.io.IOException; +import java.net.MalformedURLException; +import java.nio.file.FileSystems; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.sql.Blob; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.List; + +import javax.sql.rowset.serial.SerialBlob; + +import org.apache.commons.io.FileUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.io.Resource; +import org.springframework.core.io.UrlResource; +import org.springframework.stereotype.Service; + +import com.realnet.logging1.entity.AppUserLog; +import com.realnet.logging1.repository.AppUserLogginRepository; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; + +@Service +public class LoggingService { + + + private AppUserLogginRepository appUserLogginRepository; + private AppUserServiceImpl appUserServiceImpl; + + @Autowired + public LoggingService(AppUserLogginRepository appUserLogginRepository, AppUserServiceImpl appUserServiceImpl) { + super(); + this.appUserLogginRepository = appUserLogginRepository; + this.appUserServiceImpl = appUserServiceImpl; + } + + public AppUserLog generate(AppUser appUser) throws IOException { + long id = 1; + List l = appUserLogginRepository.findByUserName(appUser.getUsername()); + if (l.size() > 0) { + AppUserLog log = l.get(0); + if (log != null) { + // For local machine testing + Path root = FileSystems.getDefault().getPath("").toAbsolutePath(); + Path filePath = Paths.get(root.toString(), "logs", log.getLogFileName()); + File f = new File(filePath.toString()); + // For prod server + // File f = new File("/home/jboss/EAP-7.1.0/logs/"+this.user_log_file_nam); + if (!f.exists()) { + f.createNewFile(); + } + + return log; + + } + } + + return null; + } + + public AppUserLog add(AppUserLog appUserLog) { + return appUserLogginRepository.save(appUserLog); + } + + public List getAll() { + List a = appUserLogginRepository.findAll(); + DateFormat simple = new SimpleDateFormat("dd MMM yyyy HH:mm:ss"); + a.forEach(o -> { + try { + byte[] fileContent = null; + Path root = FileSystems.getDefault().getPath("").toAbsolutePath(); + Path filePath = Paths.get(root.toString(), "logs", o.getLogFileName()); + File f = new File(filePath.toString()); + fileContent = FileUtils.readFileToByteArray(f); + long size_kb = (Files.size(filePath)) / 1024; + long size_mb = size_kb / 1024; + o.setFilesizeCurrent(size_mb); + Blob b = new SerialBlob(fileContent); + o.setCreatedOnFormated(simple.format(o.getCreatedOn())); + o.setFile(b); + } catch (Exception e) { + o.setFile(null); + o.setFilesizeCurrent(null); + o.setCreatedOnFormated(null); + } + }); + return a; + } + + public AppUserLog getOne(Long id) { + AppUser user = appUserServiceImpl.getById(id).orElse(null); + if (user != null) { + List l = appUserLogginRepository.findByUserName(user.getUsername()); + if (l.size() > 0) { + return l.get(0); + } + } + return null; + } + + public AppUserLog update(AppUserLog appUserLog) { + return appUserLogginRepository.save(appUserLog); + } + + public Resource loadFileAsResource(String fileName) { + try { + Path root = FileSystems.getDefault().getPath("").toAbsolutePath(); + Path filePath = Paths.get(root.toString(), "logs", fileName); + Resource resource = new UrlResource(filePath.toUri()); + if (resource.exists()) { + return resource; + } else { + return null; + } + } catch (MalformedURLException ex) { + return null; + } + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/report_builder/Controller/Report_buildercontroller.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/report_builder/Controller/Report_buildercontroller.java new file mode 100644 index 0000000..b0ddf79 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/report_builder/Controller/Report_buildercontroller.java @@ -0,0 +1,144 @@ +package com.realnet.report_builder.Controller; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.report_builder.Entity.ReportQueryDataDTO; +import com.realnet.report_builder.Entity.Rp_Line; +import com.realnet.report_builder.Entity.Rp_builder; +import com.realnet.report_builder.Repository.ReportRepository; +import com.realnet.report_builder.Service.Report_builderService; + +@RestController +public class Report_buildercontroller { + + @Autowired + private Report_builderService report_builderService; + + @Autowired + private ReportRepository reportRepository; + + // save report builder + @PostMapping("/Report_builder") + + public Rp_builder Savedata(@RequestBody Rp_builder dashbord_Header) { + Rp_builder dash = report_builderService.Savedata(dashbord_Header) ; + return dash; + } + + // get all report builder + @GetMapping("/Report_builder") + public List getdetails() { + List dash = report_builderService.getdetails(); + return dash; + } + + // get all report line + @GetMapping("/Report_line") + public List get_all_lines() { + List dash = report_builderService.get_all_lines(); + return dash; + } + + + + // get report builder by module id + @GetMapping("/get_by_module_id") + public List get_by_module_id(@RequestParam(value = "module_id") int module_id) { + + List module = report_builderService.get_by_module_id(module_id); + return module; + + } + + // get report builder by id + @GetMapping("/Report_builder/{id}") + public Rp_builder getdetailsbyId(@PathVariable int id ) { + Rp_builder dash = report_builderService.getdetailsbyId(id); + return dash; + } + + // update report builder by id + @PutMapping("/Report_builder/{id}") + public Rp_builder update_dashboard_header(@PathVariable int id,@RequestBody Rp_builder dashbord_Header) { + Rp_builder dash = report_builderService.update_dashboard_header(id,dashbord_Header); + return dash; + } + +// update report builder line by id + + @PutMapping("/Report_line/{id}") + public Rp_Line update_Dashbord1_Lineby_id(@PathVariable int id, + @RequestBody Rp_Line dashbord1_Line ) { + + Rp_Line dash = report_builderService.update_Dashbord1_Lineby_id(id,dashbord1_Line); + return dash; + + } + + // save report line + @PostMapping("/Report_line") + public Rp_Line update_Dashbord1_Line(@RequestBody Rp_Line dashbord1_Line ) { + Rp_Line dash1 = report_builderService.update_Dashbord1_Line(dashbord1_Line); + return dash1; + } + + // delete report builder by id + @DeleteMapping("/Report_builder/{id}") + public void delete_by_id(@PathVariable int id ) { + report_builderService.delete_by_id(id); + + } + +// GET NUMBERS OF IDLIST of report builder + + @GetMapping("/GetReportBuilderOb") + public List getobject() { + return this.reportRepository.findCount(); + + } + + @PostMapping("/getQuery") + public ResponseEntity getQueryBydata(@RequestBody ReportQueryDataDTO data){ + List tables = data.getTables(); + List columns = data.getColumns(); + List conditions = data.getConditions(); + + String Query = "SELECT "; + for(int i=0;i tables; + private List columns; + private List conditions; + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/report_builder/Entity/Rp_Line.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/report_builder/Entity/Rp_Line.java new file mode 100644 index 0000000..3538f34 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/report_builder/Entity/Rp_Line.java @@ -0,0 +1,40 @@ +package com.realnet.report_builder.Entity; + + + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import com.fasterxml.jackson.annotation.JsonBackReference; + +import lombok.Data; +import lombok.ToString; +@ToString(exclude = {"rp_builder"}) +@Data +@Entity +@Table +public class Rp_Line extends Rp_Who_collumn { + + + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + + private String header_id; + + @Column(length = 5000) + private String Model; + + @JsonBackReference + @ManyToOne + private Rp_builder rp_builder; + + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/report_builder/Entity/Rp_Who_collumn.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/report_builder/Entity/Rp_Who_collumn.java new file mode 100644 index 0000000..10f00df --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/report_builder/Entity/Rp_Who_collumn.java @@ -0,0 +1,46 @@ +package com.realnet.report_builder.Entity; + +import java.io.Serializable; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.EntityListeners; +import javax.persistence.MappedSuperclass; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.annotation.LastModifiedDate; +import org.springframework.data.jpa.domain.support.AuditingEntityListener; + +import lombok.Data; + +@Data +@MappedSuperclass +@EntityListeners(AuditingEntityListener.class) +public class Rp_Who_collumn implements Serializable{ + + private static final long serialVersionUID = 1L; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "CREATED_AT", nullable = false, updatable = false) + @CreatedDate + private Date createdAt; + + // @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime createdAt; + + + @Column(name = "CREATED_BY", updatable = false) + private Long createdBy; + + @Column(name = "UPDATED_BY") + private Long updatedBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "UPDATED_AT", nullable = false) + @LastModifiedDate + private Date updatedAt; + + @Column(name = "ACCOUNT_ID") + private Long accountId; + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/report_builder/Entity/Rp_builder.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/report_builder/Entity/Rp_builder.java new file mode 100644 index 0000000..d769a61 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/report_builder/Entity/Rp_builder.java @@ -0,0 +1,69 @@ +package com.realnet.report_builder.Entity; + + + +import java.util.ArrayList; +import java.util.List; + +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.OneToMany; + +import com.fasterxml.jackson.annotation.JsonManagedReference; + +import lombok.Data; +import lombok.ToString; + +@ToString(exclude = {"rp_Line"}) +@Entity +@Data +public class Rp_builder extends Rp_Who_collumn{ + + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "ID") + private Integer id; + + +// ============================== + @Column(name = "IS_BUILD") + private boolean build; + + @Column(name = "MENU_NAME") + private String menuName; + + @Column(name = "IS_UPDATED") + private boolean updated; + + private String tech_Stack; + + private String report_builder_name; + + private int module_id; + + private String description; + + private String secuirity_profile; + + private String page_size; + + + + @JsonManagedReference + @OneToMany( cascade=CascadeType.ALL, mappedBy ="rp_builder" ) + private List rp_Line = new ArrayList<>(); + + + + + + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/report_builder/Repository/ReportRepository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/report_builder/Repository/ReportRepository.java new file mode 100644 index 0000000..6fb79f0 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/report_builder/Repository/ReportRepository.java @@ -0,0 +1,25 @@ +package com.realnet.report_builder.Repository; + +import java.util.List; + +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.CrudRepository; +import org.springframework.stereotype.Repository; + +import com.realnet.report_builder.Entity.Rp_builder; + +@Repository +public interface ReportRepository extends CrudRepository { + + Rp_builder findById(int id); + + @Query(value = " select * from rp_builder where module_id=?1", nativeQuery = true) + List findbyModule(int module_id); + + @Query(value = "select count(id) from rp_builder", nativeQuery = true) + public List findCount(); + + @Query(value = "SELECT count(id) FROM rp_builder where module_id=?1", nativeQuery = true) + Object count_report(Integer moduleId); + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/report_builder/Repository/Rp_lineRepository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/report_builder/Repository/Rp_lineRepository.java new file mode 100644 index 0000000..400a032 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/report_builder/Repository/Rp_lineRepository.java @@ -0,0 +1,13 @@ +package com.realnet.report_builder.Repository; + +import org.springframework.data.repository.CrudRepository; +import org.springframework.stereotype.Repository; + +import com.realnet.report_builder.Entity.Rp_Line; + +@Repository +public interface Rp_lineRepository extends CrudRepository { + + Rp_Line findById(int id); + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/report_builder/Service/Report_builderService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/report_builder/Service/Report_builderService.java new file mode 100644 index 0000000..dd8e6d0 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/report_builder/Service/Report_builderService.java @@ -0,0 +1,81 @@ +package com.realnet.report_builder.Service; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.realnet.report_builder.Entity.Rp_Line; +import com.realnet.report_builder.Entity.Rp_builder; +import com.realnet.report_builder.Repository.ReportRepository; +import com.realnet.report_builder.Repository.Rp_lineRepository; + +@Service +public class Report_builderService { + + @Autowired + private ReportRepository reportRepository; + + @Autowired + private Rp_lineRepository rp_lineRepository; + + public Rp_builder Savedata(Rp_builder dashbord_Header) { + return reportRepository.save(dashbord_Header); + } + + public List getdetails() { + // TODO Auto-generated method stub + return (List) reportRepository.findAll(); + } + + public Rp_builder getdetailsbyId(int id) { + // TODO Auto-generated method stub + return reportRepository.findById(id); + } + + public void delete_by_id(int id) { + // TODO Auto-generated method stub + reportRepository.deleteById(id); + } + + public Rp_builder update_dashboard_header(int id, Rp_builder rp) { + Rp_builder bi = reportRepository.findById(id); + + bi.setAccountId(rp.getAccountId()); + bi.setDescription(rp.getDescription()); + bi.setMenuName(rp.getMenuName()); + bi.setModule_id(rp.getModule_id()); + bi.setPage_size(rp.getPage_size()); + bi.setReport_builder_name(rp.getReport_builder_name()); + + return reportRepository.save(bi); + } + + public Rp_Line update_Dashbord1_Line(Rp_Line dashbord1_Line) { + // TODO Auto-generated method stub + return rp_lineRepository.save(dashbord1_Line); + } + + public List get_by_module_id(int module_id) { + // TODO Auto-generated method stub + return (List) reportRepository.findbyModule(module_id); + } + + public List get_all_lines() { + // TODO Auto-generated method stub + return (List) rp_lineRepository.findAll(); + } + + public Rp_Line update_Dashbord1_Lineby_id(int id, Rp_Line dashbord1_Line) { + + Rp_Line oldline = rp_lineRepository.findById(id); +// .orElseThrow(() -> new ResourceNotFoundException(Constant.NOT_FOUND_EXCEPTION + " :" + id)); + + oldline.setAccountId(dashbord1_Line.getAccountId()); + oldline.setHeader_id(dashbord1_Line.getHeader_id()); + oldline.setModel(dashbord1_Line.getModel()); + final Rp_Line newline = rp_lineRepository.save(oldline); + return newline; + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/retired/Controllers/RetiredController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/retired/Controllers/RetiredController.java new file mode 100644 index 0000000..ba31975 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/retired/Controllers/RetiredController.java @@ -0,0 +1,88 @@ +package com.realnet.retired.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import org.springframework.beans.factory.annotation.*; +import com.realnet.retired.Entity.Retired; +import com.realnet.retired.Services.RetiredService ; +@RequestMapping(value = "/Retired") + @CrossOrigin("*") +@RestController +public class RetiredController { + @Autowired + private RetiredService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + @PostMapping("/Retired") + public Retired Savedata(@RequestBody Retired data) { + Retired save = Service.Savedata(data) ; + + + + + + + + + return save; + } +@PutMapping("/Retired/{id}") + public Retired update(@RequestBody Retired data,@PathVariable Integer id ) { + Retired update = Service.update(data,id); + return update; + } +// get all with pagination + @GetMapping("/Retired/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Retired") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Retired") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Retired/{id}") + public Retired getdetailsbyId(@PathVariable Integer id ) { + Retired get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Retired/{id}") + public void delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + + } + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/retired/Entity/Retired.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/retired/Entity/Retired.java new file mode 100644 index 0000000..4f4504c --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/retired/Entity/Retired.java @@ -0,0 +1,30 @@ +package com.realnet.retired.Entity; + import lombok.*; +import com.realnet.WhoColumn.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + @Entity + @Data + public class Retired extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +@Column(length = 2000) +private String description; + +private boolean active; + +private String player_name; + + private String can_batter_bat_again; + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/retired/Repository/RetiredRepository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/retired/Repository/RetiredRepository.java new file mode 100644 index 0000000..91a7f4a --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/retired/Repository/RetiredRepository.java @@ -0,0 +1,13 @@ +package com.realnet.retired.Repository; + + +import org.springframework.data.jpa.repository.JpaRepository; + +import org.springframework.stereotype.Repository; + + +import com.realnet.retired.Entity.Retired; + +@Repository +public interface RetiredRepository extends JpaRepository { +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/retired/Services/RetiredService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/retired/Services/RetiredService.java new file mode 100644 index 0000000..22b8ed9 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/retired/Services/RetiredService.java @@ -0,0 +1,68 @@ +package com.realnet.retired.Services; +import com.realnet.retired.Repository.RetiredRepository; +import com.realnet.retired.Entity.Retired;import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import com.realnet.SequenceGenerator.Service.SequenceService; +import com.realnet.Notification.Entity.NotificationService; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; + import org.springframework.stereotype.Service; + +@Service + public class RetiredService { +@Autowired +private RetiredRepository Repository; + + + + + + + + +public Retired Savedata(Retired data) { + + + + + + + + +Retired save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll(page); + } +public List getdetails() { + return (List) Repository.findAll(); + } + + +public Retired getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Retired update(Retired data,Integer id) { + Retired old = Repository.findById(id).get(); +old.setDescription(data.getDescription()); + +old.setActive (data.isActive()); + +old.setPlayer_name(data.getPlayer_name()); + +old.setCan_batter_bat_again(data.getCan_batter_bat_again()); + +final Retired test = Repository.save(old); + return test;}} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/retired_out/Controllers/Retired_outController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/retired_out/Controllers/Retired_outController.java new file mode 100644 index 0000000..e2ee6d0 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/retired_out/Controllers/Retired_outController.java @@ -0,0 +1,84 @@ +package com.realnet.retired_out.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import org.springframework.beans.factory.annotation.*; +import com.realnet.retired_out.Entity.Retired_out; +import com.realnet.retired_out.Services.Retired_outService ; +@RequestMapping(value = "/Retired_out") + @CrossOrigin("*") +@RestController +public class Retired_outController { + @Autowired + private Retired_outService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + @PostMapping("/Retired_out") + public Retired_out Savedata(@RequestBody Retired_out data) { + Retired_out save = Service.Savedata(data) ; + + + + + + + return save; + } +@PutMapping("/Retired_out/{id}") + public Retired_out update(@RequestBody Retired_out data,@PathVariable Integer id ) { + Retired_out update = Service.update(data,id); + return update; + } +// get all with pagination + @GetMapping("/Retired_out/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Retired_out") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Retired_out") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Retired_out/{id}") + public Retired_out getdetailsbyId(@PathVariable Integer id ) { + Retired_out get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Retired_out/{id}") + public void delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + + } + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/retired_out/Entity/Retired_out.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/retired_out/Entity/Retired_out.java new file mode 100644 index 0000000..70ee40b --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/retired_out/Entity/Retired_out.java @@ -0,0 +1,28 @@ +package com.realnet.retired_out.Entity; + import lombok.*; +import com.realnet.WhoColumn.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + @Entity + @Data + public class Retired_out extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +@Column(length = 2000) +private String description; + +private boolean active; + +private String player_name; + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/retired_out/Repository/Retired_outRepository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/retired_out/Repository/Retired_outRepository.java new file mode 100644 index 0000000..3818496 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/retired_out/Repository/Retired_outRepository.java @@ -0,0 +1,13 @@ +package com.realnet.retired_out.Repository; + + +import org.springframework.data.jpa.repository.JpaRepository; + +import org.springframework.stereotype.Repository; + + +import com.realnet.retired_out.Entity.Retired_out; + +@Repository +public interface Retired_outRepository extends JpaRepository { +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/retired_out/Services/Retired_outService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/retired_out/Services/Retired_outService.java new file mode 100644 index 0000000..03a8c3c --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/retired_out/Services/Retired_outService.java @@ -0,0 +1,62 @@ +package com.realnet.retired_out.Services; +import com.realnet.retired_out.Repository.Retired_outRepository; +import com.realnet.retired_out.Entity.Retired_out;import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import com.realnet.SequenceGenerator.Service.SequenceService; +import com.realnet.Notification.Entity.NotificationService; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; + import org.springframework.stereotype.Service; + +@Service + public class Retired_outService { +@Autowired +private Retired_outRepository Repository; + + + + + + +public Retired_out Savedata(Retired_out data) { + + + + + + +Retired_out save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll(page); + } +public List getdetails() { + return (List) Repository.findAll(); + } + + +public Retired_out getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Retired_out update(Retired_out data,Integer id) { + Retired_out old = Repository.findById(id).get(); +old.setDescription(data.getDescription()); + +old.setActive (data.isActive()); + +old.setPlayer_name(data.getPlayer_name()); + +final Retired_out test = Repository.save(old); + return test;}} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/select_team/Controllers/Select_TeamController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/select_team/Controllers/Select_TeamController.java new file mode 100644 index 0000000..595d236 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/select_team/Controllers/Select_TeamController.java @@ -0,0 +1,80 @@ +package com.realnet.select_team.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import org.springframework.beans.factory.annotation.*; +import com.realnet.select_team.Entity.Select_Team; +import com.realnet.select_team.Services.Select_TeamService ; +@RequestMapping(value = "/Select_Team") + @CrossOrigin("*") +@RestController +public class Select_TeamController { + @Autowired + private Select_TeamService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + @PostMapping("/Select_Team") + public Select_Team Savedata(@RequestBody Select_Team data) { + Select_Team save = Service.Savedata(data) ; + + + + + return save; + } +@PutMapping("/Select_Team/{id}") + public Select_Team update(@RequestBody Select_Team data,@PathVariable Integer id ) { + Select_Team update = Service.update(data,id); + return update; + } +// get all with pagination + @GetMapping("/Select_Team/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Select_Team") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Select_Team") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Select_Team/{id}") + public Select_Team getdetailsbyId(@PathVariable Integer id ) { + Select_Team get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Select_Team/{id}") + public void delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + + } + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/select_team/Entity/Select_Team.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/select_team/Entity/Select_Team.java new file mode 100644 index 0000000..d3a35c4 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/select_team/Entity/Select_Team.java @@ -0,0 +1,26 @@ +package com.realnet.select_team.Entity; + import lombok.*; +import com.realnet.WhoColumn.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + @Entity + @Data + public class Select_Team extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +@Column(length = 2000) +private String team_name; + + + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/select_team/Repository/Select_TeamRepository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/select_team/Repository/Select_TeamRepository.java new file mode 100644 index 0000000..b01a964 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/select_team/Repository/Select_TeamRepository.java @@ -0,0 +1,13 @@ +package com.realnet.select_team.Repository; + + +import org.springframework.data.jpa.repository.JpaRepository; + +import org.springframework.stereotype.Repository; + + +import com.realnet.select_team.Entity.Select_Team; + +@Repository +public interface Select_TeamRepository extends JpaRepository { +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/select_team/Services/Select_TeamService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/select_team/Services/Select_TeamService.java new file mode 100644 index 0000000..7dd2c6c --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/select_team/Services/Select_TeamService.java @@ -0,0 +1,56 @@ +package com.realnet.select_team.Services; +import com.realnet.select_team.Repository.Select_TeamRepository; +import com.realnet.select_team.Entity.Select_Team;import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import com.realnet.SequenceGenerator.Service.SequenceService; +import com.realnet.Notification.Entity.NotificationService; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; + import org.springframework.stereotype.Service; + +@Service + public class Select_TeamService { +@Autowired +private Select_TeamRepository Repository; + + + + +public Select_Team Savedata(Select_Team data) { + + + + +Select_Team save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll(page); + } +public List getdetails() { + return (List) Repository.findAll(); + } + + +public Select_Team getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Select_Team update(Select_Team data,Integer id) { + Select_Team old = Repository.findById(id).get(); +old.setTeam_name(data.getTeam_name()); + +old.setTeam_name(data.getTeam_name()); + +final Select_Team test = Repository.save(old); + return test;}} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/session/controller/SessionController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/session/controller/SessionController.java new file mode 100644 index 0000000..eba4a74 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/session/controller/SessionController.java @@ -0,0 +1,385 @@ +package com.realnet.session.controller; + +import java.io.IOException; +import java.net.InetAddress; +import java.net.NetworkInterface; +import java.net.UnknownHostException; +import java.security.SecureRandom; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Set; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpSession; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.slf4j.MDC; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.mail.javamail.JavaMailSender; +import org.springframework.security.authentication.AuthenticationManager; +import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; +import org.springframework.util.StringUtils; +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.context.request.RequestContextHolder; + +import com.realnet.config.EmailService; +import com.realnet.config.TokenProvider; +import com.realnet.fnd.response.EntityResponse; +import com.realnet.fnd.response.OperationResponse; +import com.realnet.fnd.response.OperationResponse.ResponseStatusEnum; +import com.realnet.logging1.entity.AppUserLog; +import com.realnet.logging1.service.LoggingService; +import com.realnet.session.entity.AboutWork; +import com.realnet.session.entity.SessionItem; +import com.realnet.session.response.SessionResponse; +import com.realnet.users.entity.LoginUser; +import com.realnet.users.entity.Role; +import com.realnet.users.entity.Sys_Accounts; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.entity1.AppUserSessions; +import com.realnet.users.entity1.Registration; +import com.realnet.users.repository.CompanyRepo; +import com.realnet.users.repository1.AppUserRepository; +import com.realnet.users.repository1.AppUserSessionsRepository; +import com.realnet.users.response.MessageResponse; +import com.realnet.users.service.AboutWorkService; +import com.realnet.users.service1.AppUserServiceImpl; +import com.realnet.users.service1.AppUserSessionsServiceImpl; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiResponse; +import io.swagger.annotations.ApiResponses; + +/* +This is a dummy rest controller, for the purpose of documentation (/session) path is map to a filter + - This will only be invoked if security is disabled + - If Security is enabled then SessionFilter.java is invoked + - Enabling and Disabling Security is done at config/applicaton.properties 'security.ignored=/**' +*/ + +@Api(tags = { "Authentication" }) +//@CrossOrigin(origins = "http://localhost:4200", maxAge = 3600) +@CrossOrigin("*") +@RestController +@RequestMapping(value = "/token", produces = MediaType.APPLICATION_JSON_VALUE) +public class SessionController { + + private final Logger LOGGER = LoggerFactory.getLogger(getClass()); + @Autowired + private AuthenticationManager authenticationManager; + @Autowired + private LoggingService loggingService; + @Autowired + private TokenProvider jwtTokenUtil; + + @Autowired + private AppUserRepository appUserRepository; + + @Autowired + private AppUserServiceImpl appUserServiceImpl; + + @Autowired + private AppUserSessionsRepository appUserSessionsRepository; + + @Autowired + private AppUserServiceImpl userService; + +// @Autowired +// private CompanyService companyService; + + @Autowired + private EmailService emailService; + + @Autowired + private JavaMailSender mailSender; + + @Autowired + private AboutWorkService aboutworkservice; + + @Autowired + private CompanyRepo sysrepo; + + @Autowired + private BCryptPasswordEncoder bcryptEncoder; + + @Autowired + private AppUserSessionsServiceImpl appUserSessionsServiceImpl; + + @ApiResponses(value = { + @ApiResponse(code = 200, message = "Will return a security token, which must be passed in every request", response = SessionResponse.class) }) + @RequestMapping(value = "/session", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE) + @ResponseBody + public SessionResponse newSession(@RequestBody LoginUser loginRequest, HttpServletRequest request, + HttpSession session1) { + + try { + + final Authentication authentication = authenticationManager.authenticate( + new UsernamePasswordAuthenticationToken(loginRequest.getEmail(), loginRequest.getPassword())); + + SecurityContextHolder.getContext().setAuthentication(authentication); + + final String token = jwtTokenUtil.generateToken(authentication); + + System.out.println("authentication.getName() =>" + authentication.getName()); // email + + AppUser loggedInUser = userService.getLoggedInUser(); + MDC.put("USER", loggedInUser.getUsername()); + // System.out.println("/session logged in user -> " + loggedInUser); + +// List loggedInUserRoles = new ArrayList(); + StringBuilder roleString = new StringBuilder(); + roleString.append(loggedInUser.getUsrGrp().getGroupName()); +// .forEach(role -> { +//// loggedInUserRoles.add(role.getName()); +// roleString.append(role.getName() + ", "); +// }); + // String role = roleString.toString().substring(0, + // roleString.toString().lastIndexOf(",")); + // List roleList = Arrays.asList(role.split("\\s*,\\s*")); + + SessionResponse resp = new SessionResponse(); + SessionItem sessionItem = new SessionItem(); + sessionItem.setToken(token); + sessionItem.setUserId(loggedInUser.getUserId()); + sessionItem.setFullname(loggedInUser.getFullName()); + sessionItem.setFirstName(loggedInUser.getFullName()); + // sessionItem.setUsername(loggedInUser.getUsername()); + sessionItem.setEmail(loggedInUser.getEmail()); + // sessionItem.setRoles(roleList); + Set roles = loggedInUser.getRoles(); + List roleList = new ArrayList<>(); + for (Role ro : roles) { + roleList.add(ro.getDescription()); + } + sessionItem.setRoles(roleList); + // sessionItem.setRoles(loggedInUser.getUsrGrp().getGroupName()); + resp.setOperationStatus(ResponseStatusEnum.SUCCESS); + resp.setOperationMessage("Login Success"); + resp.setItem(sessionItem); + + InetAddress ip; + StringBuilder sb = new StringBuilder(); + try { + ip = InetAddress.getLocalHost(); + System.out.println("Current IP address : " + ip.getHostAddress()); + NetworkInterface network = NetworkInterface.getByInetAddress(ip); + byte[] mac = network.getHardwareAddress(); + System.out.print("Current MAC address : "); + + for (int i = 0; i < mac.length; i++) { + sb.append(String.format("%02X%s", mac[i], (i < mac.length - 1) ? ":" : "")); + } + System.out.println(sb.toString()); + } catch (Exception e) { + System.out.println("error is .." + e); + } + + AppUserSessions session = new AppUserSessions(); + + session.setUserId(loggedInUser); + session.setLastAccessDate(new Date()); + session.setLogintime(new Date()); +// session.setLogouttime(new Date()); + session.setSessionId(RequestContextHolder.currentRequestAttributes().getSessionId()); + // String ip = request.getHeader("X-Forward-For"); + // String ip = getClientIp(); + // String ip = getClientIp(request); + String ip1 = request.getRemoteAddr(); + session.setClientIp(ip1); + session.setMacid(sb.toString()); + appUserSessionsServiceImpl.add(session); + AppUserLog s = loggingService.generate(loggedInUser); + // AppUserLog s = null; + if (s != null) { + session1.setAttribute("LogginLevel", s.getLogLevel()); + session1.setAttribute("generate_log", s.getGenerateLog()); + session1.setAttribute("LogFileName", s.getLogFileName()); + } else { + session1.setAttribute("generate_log", "N"); + } + return resp; + } catch (Exception e) { + LOGGER.error("Login Failed " + e.getMessage()); + System.out.print(e.getMessage()); + SessionResponse resp = new SessionResponse(); + resp.setOperationStatus(ResponseStatusEnum.ERROR); + resp.setOperationMessage("Login Failed"); + return resp; + } + + } + + // logout + @GetMapping("/logout") + public ResponseEntity logoutUser(HttpSession session2) throws IOException { + +// if(session1.getAttribute("generate_log").equals("Y")) { +// Path root = FileSystems.getDefault().getPath("").toAbsolutePath(); +// Path filePath = Paths.get(root.toString(),"logs",session1.getAttribute("LogFileName").toString()); +// File f=filePath.toFile(); +// FileWriter fw = new FileWriter(f,true); +// fw.write("Logout\n"); +// fw.close(); +// } + +// String sessionId = RequestContextHolder.currentRequestAttributes().getSessionId(); +// AppUserSessions session = appUserSessionsRepository.findBySessionId(session2.toString()); +// session.setLogouttime(new Date()); +// appUserSessionsServiceImpl.add(session); + return new ResponseEntity<>("Logged out succesfully", HttpStatus.OK); + } + // logout + + public String getClientIp(HttpServletRequest request) { + final String LOCALHOST_IPV4 = "127.0.0.1"; + final String LOCALHOST_IPV6 = "0:0:0:0:0:0:0:1"; + String ipAddress = request.getHeader("X-Forwarded-For"); + if (StringUtils.isEmpty(ipAddress) || "unknown".equalsIgnoreCase(ipAddress)) { + ipAddress = request.getHeader("Proxy-Client-IP"); + } + + if (StringUtils.isEmpty(ipAddress) || "unknown".equalsIgnoreCase(ipAddress)) { + ipAddress = request.getHeader("WL-Proxy-Client-IP"); + } + + if (StringUtils.isEmpty(ipAddress) || "unknown".equalsIgnoreCase(ipAddress)) { + ipAddress = request.getRemoteAddr(); + if (LOCALHOST_IPV4.equals(ipAddress) || LOCALHOST_IPV6.equals(ipAddress)) { + try { + InetAddress inetAddress = InetAddress.getLocalHost(); + ipAddress = inetAddress.getHostAddress(); + } catch (UnknownHostException e) { + System.out.println("error is .." + e); + } + } + } + + if (!StringUtils.isEmpty(ipAddress) && ipAddress.length() > 15 && ipAddress.indexOf(",") > 0) { + ipAddress = ipAddress.substring(0, ipAddress.indexOf(",")); + } + + return ipAddress; + } + + @PostMapping("/addOneAppUser") + public ResponseEntity addOneUser(@RequestBody Registration reg) { + System.out.println(reg); +// if (appUserRepository.findByEmail(reg.getEmail()) != null) { +// return ResponseEntity.badRequest().body(new MessageResponse("email already exist")); +// } + AppUser a = appUserServiceImpl.addOneUser(reg); + return new ResponseEntity<>(a, HttpStatus.OK); + } + + @ApiOperation(value = "Send Email For OTP") + @PostMapping("/user/send_email") + public ResponseEntity userviaadmin(HttpServletRequest request, @RequestBody Registration reg) { + String email = reg.getEmail(); + AppUser appUser = new AppUser(); + + AppUser user = userService.findUserByEmail(email); + if (user != null && user.isIsComplete()) { + return ResponseEntity.badRequest().body(new MessageResponse(email + " already exist")); + } else { + if (user != null && !user.isIsComplete()) { + appUser = user; + } +// Random random = new Random(); + SecureRandom random = new SecureRandom(); + + int otp = 100000 + random.nextInt(900000); + userService.adduserbyemail(appUser, String.valueOf(otp), email); + + String subject = "Email Verification"; + String url = String.valueOf(otp); + emailService.sendEmail(email, subject, url); + return new ResponseEntity<>(new EntityResponse("Otp send successfully"), HttpStatus.OK); + } + + } + +// RESEND OTP + @PostMapping("/user/resend_otp") + public ResponseEntity resendotp(@RequestParam String email) { + + AppUser user = userService.findUserByEmail(email); + if (user == null) { + return ResponseEntity.badRequest().body(new MessageResponse(email + " not exist")); + } else { +// Random random = new Random(); + SecureRandom random = new SecureRandom(); + + int otp = 100000 + random.nextInt(900000); + userService.resendotp(otp, email); + String subject = "Email Verification"; + String url = String.valueOf(otp); + emailService.sendEmail(email, subject, url); + return new ResponseEntity<>(new EntityResponse("resend Otp send successfully"), HttpStatus.OK); + } + + } + +// OTP VERIFICATION + @PostMapping("/user/otp_verification") + public ResponseEntity otpverfication(@RequestParam String email, @RequestParam String otp) { + email = email.replaceAll(" ", "+"); + AppUser user = userService.findUserByEmail(email); + if (user == null) { + return ResponseEntity.badRequest().body(new MessageResponse(user + " not exist")); + } + String random_no = user.getRandom_no(); + if (random_no.equalsIgnoreCase(otp)) { + return new ResponseEntity<>(new EntityResponse("OTP Verified"), HttpStatus.OK); + } else { + return new ResponseEntity<>(new EntityResponse("Wrong OTP"), HttpStatus.BAD_REQUEST); + } + } + + @ApiOperation(value = "Add new cluodnsure", response = OperationResponse.class) + @PostMapping("/aboutwork") + public AppUser addNewCustomer(@RequestBody AboutWork aboutWork) { + + System.out.println("about work controller started"); + + // save acccount info + AboutWork about = aboutworkservice.adddata(aboutWork); + Sys_Accounts sys = new Sys_Accounts(); + sys.setAccount_id(about.getId()); + sysrepo.save(sys); + + // save user with accout id + AppUser user = new AppUser(); + user.setChangePassw(aboutWork.getPassword()); + user.setEmail(aboutWork.getEmail()); + user.setMob_no(aboutWork.getMobile()); + AppUser userResister = userService.userResister(user, about.getId()); + return userResister; + } + + // GET USER BY USERID // TOKEN FREE + @GetMapping("/getuser/{id}") + public ResponseEntity getChatUserById(@PathVariable Long id) { + AppUser u = appUserServiceImpl.getById(id).get(); + return new ResponseEntity<>(u, HttpStatus.OK); + } + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/session/entity/AboutWork.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/session/entity/AboutWork.java new file mode 100644 index 0000000..e154e88 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/session/entity/AboutWork.java @@ -0,0 +1,32 @@ +package com.realnet.session.entity; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; + +import lombok.Data; + +@Data +@Entity +@Table(name = "Accounts") +public class AboutWork { + + + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private Long id ; + private String name; + + private String password; + private Long mobile; + private String email; + private String companyname; + private String pancard; + private String working; + private String managing_work; +// @OneToOne(mappedBy = "user",fetch = FetchType.LAZY, +// cascade = CascadeType.ALL) +// private User user; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/session/entity/SessionItem.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/session/entity/SessionItem.java new file mode 100644 index 0000000..95cc277 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/session/entity/SessionItem.java @@ -0,0 +1,18 @@ +package com.realnet.session.entity; + +import java.util.List; + +import lombok.Data; + +@Data +public class SessionItem { + private String token; + private Long userId; + private String fullname; + private String username; + private String email; + private String firstName; + private List roles; + //private String roles; + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/session/entity/VersionModel.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/session/entity/VersionModel.java new file mode 100644 index 0000000..db25839 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/session/entity/VersionModel.java @@ -0,0 +1,11 @@ +package com.realnet.session.entity; + +import lombok.Data; + +@Data // For Getters and Setters +public class VersionModel { + private String version = null; + private Integer major = null; + private Integer minor = null; + private Integer patch = null; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/session/response/SessionResponse.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/session/response/SessionResponse.java new file mode 100644 index 0000000..181aa16 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/session/response/SessionResponse.java @@ -0,0 +1,15 @@ +package com.realnet.session.response; + +import com.realnet.fnd.response.OperationResponse; +import com.realnet.session.entity.SessionItem; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper=false) +public class SessionResponse extends OperationResponse { + @ApiModelProperty(required = true, value = "") + private SessionItem item; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/start_inning/Controllers/Start_inningController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/start_inning/Controllers/Start_inningController.java new file mode 100644 index 0000000..486701d --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/start_inning/Controllers/Start_inningController.java @@ -0,0 +1,88 @@ +package com.realnet.start_inning.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import org.springframework.beans.factory.annotation.*; +import com.realnet.start_inning.Entity.Start_inning; +import com.realnet.start_inning.Services.Start_inningService ; +@RequestMapping(value = "/Start_inning") + @CrossOrigin("*") +@RestController +public class Start_inningController { + @Autowired + private Start_inningService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + @PostMapping("/Start_inning") + public Start_inning Savedata(@RequestBody Start_inning data) { + Start_inning save = Service.Savedata(data) ; + + + + + + + + + return save; + } +@PutMapping("/Start_inning/{id}") + public Start_inning update(@RequestBody Start_inning data,@PathVariable Integer id ) { + Start_inning update = Service.update(data,id); + return update; + } +// get all with pagination + @GetMapping("/Start_inning/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Start_inning") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Start_inning") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Start_inning/{id}") + public Start_inning getdetailsbyId(@PathVariable Integer id ) { + Start_inning get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Start_inning/{id}") + public void delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + + } + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/start_inning/Entity/Start_inning.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/start_inning/Entity/Start_inning.java new file mode 100644 index 0000000..7f625a0 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/start_inning/Entity/Start_inning.java @@ -0,0 +1,29 @@ +package com.realnet.start_inning.Entity; + import lombok.*; +import com.realnet.WhoColumn.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + @Entity + @Data + public class Start_inning extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String select_match; + +private String select_team; + +private String select_player; + +private String datetime_field; + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/start_inning/Repository/Start_inningRepository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/start_inning/Repository/Start_inningRepository.java new file mode 100644 index 0000000..8af180d --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/start_inning/Repository/Start_inningRepository.java @@ -0,0 +1,13 @@ +package com.realnet.start_inning.Repository; + + +import org.springframework.data.jpa.repository.JpaRepository; + +import org.springframework.stereotype.Repository; + + +import com.realnet.start_inning.Entity.Start_inning; + +@Repository +public interface Start_inningRepository extends JpaRepository { +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/start_inning/Services/Start_inningService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/start_inning/Services/Start_inningService.java new file mode 100644 index 0000000..e5a706e --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/start_inning/Services/Start_inningService.java @@ -0,0 +1,68 @@ +package com.realnet.start_inning.Services; +import com.realnet.start_inning.Repository.Start_inningRepository; +import com.realnet.start_inning.Entity.Start_inning;import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import com.realnet.SequenceGenerator.Service.SequenceService; +import com.realnet.Notification.Entity.NotificationService; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; + import org.springframework.stereotype.Service; + +@Service + public class Start_inningService { +@Autowired +private Start_inningRepository Repository; + + + + + + + + +public Start_inning Savedata(Start_inning data) { + + + + + + + + +Start_inning save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll(page); + } +public List getdetails() { + return (List) Repository.findAll(); + } + + +public Start_inning getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Start_inning update(Start_inning data,Integer id) { + Start_inning old = Repository.findById(id).get(); +old.setSelect_match(data.getSelect_match()); + +old.setSelect_team(data.getSelect_team()); + +old.setSelect_player(data.getSelect_player()); + +old.setDatetime_field(data.getDatetime_field()); + +final Start_inning test = Repository.save(old); + return test;}} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/sysparameter/controller/SysParamController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/sysparameter/controller/SysParamController.java new file mode 100644 index 0000000..ff51ce0 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/sysparameter/controller/SysParamController.java @@ -0,0 +1,227 @@ +package com.realnet.sysparameter.controller; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpSession; +import javax.validation.Valid; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.common.net.HttpHeaders; +import com.realnet.exceptions.ResourceNotFoundException; +import com.realnet.sysparameter.entity.SysParamEntity; +import com.realnet.sysparameter.entity.SysParamUpload; +import com.realnet.sysparameter.repository.SysParamRepository; +import com.realnet.sysparameter.repository.SysparamUploadRepo; +import com.realnet.sysparameter.service.SysParamService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; + +@RestController +@RequestMapping(value = "/sysparam") +@Api(tags = { "sysparameter" }) +public class SysParamController { + + @Autowired + private AppUserServiceImpl userService; + + @Autowired + private SysParamService sysparamService; + + @Autowired + private SysparamUploadRepo sysparamUploadRepo; + + @Autowired + private SysParamRepository sysParamRepo; + + @Value("${projectPath}") + private String projectPath; + + // GET BY ID + @ApiOperation(value = "Get A system parameters", response = SysParamEntity.class) + @GetMapping("/getSysParams/{id}") + public ResponseEntity getSystemParamDetails(@PathVariable(value = "id") int id) { + SysParamEntity sysparameter = sysparamService.getById(id); + if (sysparameter == null) { + throw new ResourceNotFoundException("system parameter not found with id " + id); + } + return ResponseEntity.ok().body(sysparameter); + } + + // ADD SYSTEM PARAMETER + @ApiOperation(value = "Add New system parameters") + @PostMapping(value = "/addSysParams", consumes = { "application/json" }) + public ResponseEntity saveFavourite(@RequestBody SysParamEntity sysparam, HttpSession session1) + throws IOException { + + SysParamEntity savedsysparam = sysparamService.save(sysparam); + System.out.println("save system parameter id" + savedsysparam); + + if (savedsysparam == null) { + throw new ResourceNotFoundException("system parameter not saved "); + } + return ResponseEntity.ok().body(savedsysparam); + } + + // UPDATE + @ApiOperation(value = "update a system parameters", response = SysParamEntity.class) + @PutMapping("/updateSysParams/{id}") + public ResponseEntity updateSystemParameter( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, + @PathVariable(value = "id") Integer id, @Valid @RequestBody SysParamEntity sysparam) { + SysParamEntity updatedsale = sysparamService.updateSysParamById(id, sysparam); + if (updatedsale == null || id != updatedsale.getId()) { + throw new ResourceNotFoundException("system parameter not found with id " + id); + } + return ResponseEntity.status(HttpStatus.ACCEPTED).body(updatedsale); + } + + // UPDATE logo on project + @PutMapping("/logo/updateSysParams/{sys_id}") + public ResponseEntity updateLogo(@PathVariable(value = "sys_id") Integer sys_id, + @Valid @RequestBody SysParamEntity sysparam) + throws JsonProcessingException { + SysParamEntity updatedsale = sysparamService.updatelogo(sys_id, sysparam); + if (updatedsale == null || sys_id != updatedsale.getId()) { + throw new ResourceNotFoundException("system parameter not found with id " + sys_id); + } + return ResponseEntity.status(HttpStatus.ACCEPTED).body(updatedsale); + } + + @PostMapping("/uploadimage") +// public ResponseEntity fileupload( +// +// @RequestParam("image") MultipartFile image) throws IOException { +// +// String filename = this.sysparamService.uplaodImage(path,image); +//// System.out.println("Original Image Byte Size - " + file.getBytes().length); +//// CardImage img = new CardImage(file.getOriginalFilename(), file.getContentType(), +//// compressBytes(file.getBytes())); +//// this.imageRepository.save(img); +// +// return new ResponseEntity<>(filename, HttpStatus.OK); +// } + + public ResponseEntity uploadProfilePic(@RequestParam("imageFile") MultipartFile file) throws IOException { + SysParamEntity sys = new SysParamEntity(); + String uploadPath = projectPath.concat("/src/main/resources/logo/"); + System.out.println("UPLOAD PATH = " + uploadPath); + + boolean success = sysparamService.upload_logo(file, uploadPath); + + String fileName = file.getOriginalFilename(); +// String head = fileName.substring(0, fileName.indexOf(".")); + String ext = fileName.substring(fileName.lastIndexOf(".")); + String fileNewName = "profile-pic-" + ext; + + System.out.println( + "UPLOAD PATH = " + uploadPath + "\nFILE NAME = " + fileNewName + "\nFile Size = " + file.getSize()); + sys.setUpload_Logo(fileNewName); + Map res = new HashMap(); + if (success) { + res.put("success", success); + return new ResponseEntity<>(res, HttpStatus.OK); + } else { + res.put("success", success); + return new ResponseEntity<>(res, HttpStatus.BAD_REQUEST); + } + } + +// save data nad upload files + @PostMapping("/Sysupload") + public ResponseEntity add(@RequestParam String o1, @RequestParam Map attachmentsfile) + throws IOException { + SysParamEntity sysParamEntity; + sysParamEntity = new ObjectMapper().readValue(o1, SysParamEntity.class); + SysParamEntity order = sysparamService.save(sysParamEntity); + + if (!attachmentsfile.isEmpty()) { +// long cLong = 1; + ArrayList attachments = new ArrayList(); + for (Map.Entry e : attachmentsfile.entrySet()) { + + System.out.println(e.getKey()); + SysParamUpload a = new SysParamUpload(); + a.setSysParamEntity(order); + a.setAttachmentId(order.getId()); + a.setAttachment(e.getValue().getBytes()); + a.setAttachmentType(e.getValue().getContentType()); + a.setAttachmentFilename(e.getValue().getOriginalFilename()); + attachments.add(a); + order.setUpload_Logo(a.getAttachmentFilename()); +// cLong++; + + } + sysparamService.addallattachments(attachments); + + } + + return new ResponseEntity<>(order, HttpStatus.OK); + + } + + @PutMapping("/Sysupload/{id}") + public ResponseEntity update(@RequestParam String o1, @RequestParam Map attachmentsfile, + @PathVariable int id) throws IOException { + SysParamEntity sysparam; + sysparam = new ObjectMapper().readValue(o1, SysParamEntity.class); + SysParamEntity order = sysparamService.updateSysParamById(id, sysparam); + + if (!attachmentsfile.isEmpty()) { +// long cLong = 1; + ArrayList attachments = new ArrayList(); + for (Map.Entry e : attachmentsfile.entrySet()) { + + System.out.println(e.getKey()); + SysParamUpload a = new SysParamUpload(); + a.setSysParamEntity(order); + a.setAttachmentId(order.getId()); + a.setAttachment(e.getValue().getBytes()); + a.setAttachmentType(e.getValue().getContentType()); + a.setAttachmentFilename(e.getValue().getOriginalFilename()); + attachments.add(a); + order.setUpload_Logo(a.getAttachmentFilename()); +// cLong++; + + } + sysparamService.addallattachments(attachments); + + } + + return new ResponseEntity<>(order, HttpStatus.OK); + + } + +// GET JSON WITH PHOTO BY ID + @GetMapping("/sysparam/{id}") + + public ResponseEntity GETSYS(@PathVariable int id) { + SysParamEntity pm = sysParamRepo.findById(id).orElseThrow(() -> new ResourceNotFoundException("id not found")); + + List attachments = sysparamService.getallattachmentsbyid(id); + pm.setSysParamUploads(attachments); + + return new ResponseEntity<>(pm, HttpStatus.OK); + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/sysparameter/entity/SysParamEntity.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/sysparameter/entity/SysParamEntity.java new file mode 100644 index 0000000..e51d6d3 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/sysparameter/entity/SysParamEntity.java @@ -0,0 +1,118 @@ +package com.realnet.sysparameter.entity; + +import java.util.List; + +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.OneToMany; +import javax.persistence.Table; +import javax.persistence.Transient; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + +@Entity +@Table(name = "System_paramaters") +@ToString +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class SysParamEntity { + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + @Column(name = "ID") + private int id; + + @Column(name = "SCHEDULER_TIME") + private int schedulerTime; + + @Column(name = "LEASE_TAX_CODE") + private String leaseTaxCode; + + @Column(name = "VESSEL_CONF_PROCESSLIMIT") + private int vesselConfProcessLimit; + + @Column(name = "ROW_TO_DISPLAY") + private int rowToDisplay; + + @Column(name = "LINK_TO_DISPLAY") + private int linkToDisplay; + + @Column(name = "ROW_TO_ADD") + private int rowToAdd; + + @Column(name = "LOV_ROW_TO_DISPLAY") + private int lovRowToDisplay; + + @Column(name = "LOV_LINK_TO_DISPLAY") + private int lovLinkToDisplay; + + @Column(name = "OID_SERVER_NAME") + private String oidserverName; + + @Column(name = "OID_BASE") + private String oidBase; + + @Column(name = "OID_ADMIN_USER") + private String oidAdminUser; + + @Column(name = "OID_SERVER_PORT") + private int oidServerPort; + + @Column(name = "USER_DEFAULT_GROUP") + private int userDefaultGroup; + + @Column(name = "DEFAULT_DEPARTMENT") + private String defaultDepartment; + + @Column(name = "DEFAULT_POSITION") + private String defaultPosition; + + @Column(name = "SINGLE_CHARGE") + private String singleCharge; + + @Column(name = "FIRST_DAYOF_THE_WEEK") + private String firstDayOftheWeek; + + @Column(name = "HOUR_PER_SHIFT") + private int hourPerShift; + + @Column(name = "CN_BILLING_FREQUENCY") + private int cnBillingFrequency; + + @Column(name = "BILLING_DEPARTMENT_CODE") + private String billingDepartmentCode; + + @Column(name = "BASE_PRICE_LIST") + private String basePriceList; + + @Column(name = "NONCONTAINER_SERVICEORDER_AUTO_APPDEPCODE") + private String nonContainerServiceOrder; + + @Column(name = "EDI_MAE_SCHEDULER_ONOFF") + private int EdiMaeSchedulerONOFF; + + @Column(name = "EDI_SCHEDULER_ONOFF") + private String EdiSchedulerONOFF; + + private String upload_Logo; + private String upload_Logo_name; + + private String upload_Logo_path; + + private String Company_Display_Name; + + private boolean isRegitrationAllowed=true; + + @Transient + @OneToMany(cascade = CascadeType.ALL) + private List sysParamUploads; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/sysparameter/entity/SysParamUpload.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/sysparameter/entity/SysParamUpload.java new file mode 100644 index 0000000..a9f3644 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/sysparameter/entity/SysParamUpload.java @@ -0,0 +1,46 @@ +package com.realnet.sysparameter.entity; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Lob; +import javax.persistence.ManyToOne; + + + +import lombok.Data; + +@Entity +@Data +public class SysParamUpload { + + + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private int attachmentId; + + @Lob + @Column(nullable = true) + private byte[] attachment; + + @Column(nullable = true) + private String attachmentType; + + @Column(nullable = true) + private String attachmentFilename; + + @Column(nullable = false) + private String cancelStatus="N"; + +// private String createdBy; + + @Column(nullable = true) + private String updatedBy; + + private String externalFlag; + + @ManyToOne + private SysParamEntity sysParamEntity; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/sysparameter/repository/SysParamRepository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/sysparameter/repository/SysParamRepository.java new file mode 100644 index 0000000..fa51e22 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/sysparameter/repository/SysParamRepository.java @@ -0,0 +1,11 @@ +package com.realnet.sysparameter.repository; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +import com.realnet.sysparameter.entity.SysParamEntity; + +@Repository +public interface SysParamRepository extends JpaRepository { + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/sysparameter/repository/SysparamUploadRepo.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/sysparameter/repository/SysparamUploadRepo.java new file mode 100644 index 0000000..6a03f25 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/sysparameter/repository/SysparamUploadRepo.java @@ -0,0 +1,16 @@ +package com.realnet.sysparameter.repository; + +import java.util.List; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.stereotype.Repository; + +import com.realnet.sysparameter.entity.SysParamUpload; + +@Repository +public interface SysparamUploadRepo extends JpaRepository { + @Query(value= "SELECT * FROM sys_param_upload WHERE sys_param_entity_id=?1", nativeQuery=true) + List findAllById(int sys_param_entity_id); + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/sysparameter/response/SysParamResponse.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/sysparameter/response/SysParamResponse.java new file mode 100644 index 0000000..6bef6ac --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/sysparameter/response/SysParamResponse.java @@ -0,0 +1,18 @@ +package com.realnet.sysparameter.response; + +import java.util.List; + +import com.realnet.fnd.response.PageResponse; +import com.realnet.sysparameter.entity.SysParamEntity; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper = false) +public class SysParamResponse extends PageResponse{ + + @ApiModelProperty(required = true, value = "") + private List systemParam; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/sysparameter/service/SysParamService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/sysparameter/service/SysParamService.java new file mode 100644 index 0000000..7c60d72 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/sysparameter/service/SysParamService.java @@ -0,0 +1,28 @@ +package com.realnet.sysparameter.service; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import org.springframework.web.multipart.MultipartFile; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.realnet.sysparameter.entity.SysParamEntity; +import com.realnet.sysparameter.entity.SysParamUpload; + +public interface SysParamService { + + public SysParamEntity getById(int id); + + SysParamEntity save(SysParamEntity sysparam); + + public SysParamEntity updateSysParamById(int id, SysParamEntity sysparam); + + public SysParamEntity updatelogo(int id, SysParamEntity sysparam) throws JsonProcessingException ; + + public boolean upload_logo(MultipartFile file, String uploadPath); + + public List addallattachments(List attachments); + + public List getallattachmentsbyid(int id); +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/sysparameter/service/SysParamServiceImpl.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/sysparameter/service/SysParamServiceImpl.java new file mode 100644 index 0000000..fa0ccaa --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/sysparameter/service/SysParamServiceImpl.java @@ -0,0 +1,177 @@ +package com.realnet.sysparameter.service; + +import java.io.File; +import java.io.IOException; +import java.util.List; + +import org.apache.commons.io.FilenameUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.web.multipart.MultipartFile; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.realnet.exceptions.ResourceNotFoundException; +import com.realnet.exceptions.StorageException; +import com.realnet.sysparameter.entity.SysParamEntity; +import com.realnet.sysparameter.entity.SysParamUpload; +import com.realnet.sysparameter.repository.SysParamRepository; +import com.realnet.sysparameter.repository.SysparamUploadRepo; + +import jnr.ffi.Struct.int16_t; +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@Service +public class SysParamServiceImpl implements SysParamService { + + @Autowired + private SysParamRepository sysParamRepo; + + @Autowired + private SysparamUploadRepo sysparamUploadRepo; + + @Override + public SysParamEntity getById(int id) { + // TODO Auto-generated method stub + SysParamEntity sysparam = sysParamRepo.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("favourite not found :: " + id)); + return sysparam; + } + + @Override + public SysParamEntity save(SysParamEntity sysparam) { + // TODO Auto-generated method stub + SysParamEntity savedParam = sysParamRepo.save(sysparam); + return savedParam; + } + + @Override + public SysParamEntity updateSysParamById(int id, SysParamEntity sysparam) { + // TODO Auto-generated method stub + SysParamEntity NewSysparam = sysParamRepo.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("sysprameter not found :: " + id)); + NewSysparam.setRegitrationAllowed(sysparam.isRegitrationAllowed()); + + NewSysparam.setSchedulerTime(sysparam.getSchedulerTime()); + NewSysparam.setLeaseTaxCode(sysparam.getLeaseTaxCode()); + NewSysparam.setVesselConfProcessLimit(sysparam.getVesselConfProcessLimit()); + NewSysparam.setRowToDisplay(sysparam.getRowToDisplay()); + NewSysparam.setLinkToDisplay(sysparam.getLinkToDisplay()); + NewSysparam.setRowToAdd(sysparam.getRowToAdd()); + NewSysparam.setLovRowToDisplay(sysparam.getLovRowToDisplay()); + NewSysparam.setLovLinkToDisplay(sysparam.getLovLinkToDisplay()); + NewSysparam.setOidserverName(sysparam.getOidserverName()); + NewSysparam.setOidBase(sysparam.getOidBase()); + NewSysparam.setOidAdminUser(sysparam.getOidAdminUser()); + NewSysparam.setOidServerPort(sysparam.getOidServerPort()); + NewSysparam.setUserDefaultGroup(sysparam.getUserDefaultGroup()); + NewSysparam.setDefaultDepartment(sysparam.getDefaultDepartment()); + NewSysparam.setDefaultPosition(sysparam.getDefaultPosition()); + NewSysparam.setSingleCharge(sysparam.getSingleCharge()); + NewSysparam.setFirstDayOftheWeek(sysparam.getFirstDayOftheWeek()); + NewSysparam.setHourPerShift(sysparam.getHourPerShift()); + NewSysparam.setCnBillingFrequency(sysparam.getCnBillingFrequency()); + NewSysparam.setBillingDepartmentCode(sysparam.getBillingDepartmentCode()); + NewSysparam.setBasePriceList(sysparam.getBasePriceList()); + NewSysparam.setNonContainerServiceOrder(sysparam.getNonContainerServiceOrder()); + NewSysparam.setEdiMaeSchedulerONOFF(sysparam.getEdiMaeSchedulerONOFF()); + NewSysparam.setEdiSchedulerONOFF(sysparam.getEdiSchedulerONOFF()); + NewSysparam.setCompany_Display_Name(sysparam.getCompany_Display_Name()); + sysParamRepo.save(NewSysparam); + + return NewSysparam; + } + + @Override + public SysParamEntity updatelogo(int id, SysParamEntity sysparam) throws JsonProcessingException { + // TODO Auto-generated method stub + SysParamEntity NewSysparam = sysParamRepo.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("sysprameter not found :: " + id)); + +// Rn_Project_Setup project_Setup = rn_ProjectSetup_Service.getById(project_id); + + if (sysparam.getUpload_Logo_name() != null && sysparam.getUpload_Logo_path() != null) { + + NewSysparam.setUpload_Logo_name(sysparam.getUpload_Logo_name()); + NewSysparam.setUpload_Logo_path(sysparam.getUpload_Logo_path()); + +// project_Setup.setUpload_Logo_name(sysparam.getUpload_Logo_name()); +// project_Setup.setUpload_Logo_path(sysparam.getUpload_Logo_path()); + } + if (sysparam.getCompany_Display_Name() != null) { + + NewSysparam.setCompany_Display_Name(sysparam.getCompany_Display_Name()); + +// project_Setup.setCompany_Display_Name(sysparam.getCompany_Display_Name()); + + } + + SysParamEntity save = sysParamRepo.save(NewSysparam); + + return save; + } + + @Override + public boolean upload_logo(MultipartFile file, String uploadPath) { + if (file.isEmpty()) { + throw new StorageException("Failed to store empty file"); + } + try { + String fileName = file.getOriginalFilename(); + + String ext = fileName.substring(fileName.lastIndexOf(".")); + String extension = FilenameUtils.getExtension(fileName); // lol + String newName = "profile-pic-" + ext; + + System.out.println(System.getProperty("java.io.tmpdir")); + File convFile = new File( + System.getProperty("java.io.tmpdir") + System.getProperty("file.separator") + newName); + file.transferTo(convFile); + return true; + } catch (IOException e) { + String msg = String.format("Failed to store file %s", file.getName()); + log.info(msg); + return false; + } + + } + + @Override + public List addallattachments(List attachments) { + + for (SysParamUpload at : attachments) { + sysparamUploadRepo.save(at); + } + return attachments; + } + + @Override + + public List getallattachmentsbyid(int sys_param_entity_id) { + + List list = sysparamUploadRepo.findAllById(sys_param_entity_id); + return list; + } + + public SysParamEntity updateCompNameAndLogo(int id, SysParamEntity sysparam) throws JsonProcessingException { + // TODO Auto-generated method stub + SysParamEntity NewSysparam = sysParamRepo.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("sysprameter not found :: " + id)); + + if (sysparam.getUpload_Logo() != null) { + + NewSysparam.setUpload_Logo(sysparam.getUpload_Logo()); + + } + if (sysparam.getCompany_Display_Name() != null) { + + NewSysparam.setCompany_Display_Name(sysparam.getCompany_Display_Name()); + + } + + SysParamEntity save = sysParamRepo.save(NewSysparam); + + return save; + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/team/Controllers/TeamList_ListFilter1Controller.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/team/Controllers/TeamList_ListFilter1Controller.java new file mode 100644 index 0000000..216fbf5 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/team/Controllers/TeamList_ListFilter1Controller.java @@ -0,0 +1,24 @@ +package com.realnet.team.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import com.realnet.team.Entity.TeamList_ListFilter1; +import com.realnet.team.Services.TeamList_ListFilter1Service ; +@RequestMapping(value = "/TeamList_ListFilter1") +@RestController +public class TeamList_ListFilter1Controller { + + @Autowired + private TeamList_ListFilter1Service Service; + + @GetMapping("/TeamList_ListFilter1") + public List getlist() { + List get = Service.getlistbuilder(); + return get; +} + @GetMapping("/TeamList_ListFilter11") + public List getlistwithparam( ) { + List get = Service.getlistbuilderparam( ); + return get; +} +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/team/Controllers/TeamsController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/team/Controllers/TeamsController.java new file mode 100644 index 0000000..1d25e59 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/team/Controllers/TeamsController.java @@ -0,0 +1,96 @@ +package com.realnet.team.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import org.springframework.beans.factory.annotation.*; +import com.realnet.team.Entity.Teams; +import com.realnet.team.Services.TeamsService ; +@RequestMapping(value = "/Teams") + @CrossOrigin("*") +@RestController +public class TeamsController { + @Autowired + private TeamsService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + + + + + @PostMapping("/Teams") + public Teams Savedata(@RequestBody Teams data) { + Teams save = Service.Savedata(data) ; + + + + + + + + + + + + + return save; + } +@PutMapping("/Teams/{id}") + public Teams update(@RequestBody Teams data,@PathVariable Integer id ) { + Teams update = Service.update(data,id); + return update; + } +// get all with pagination + @GetMapping("/Teams/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Teams") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Teams") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Teams/{id}") + public Teams getdetailsbyId(@PathVariable Integer id ) { + Teams get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Teams/{id}") + public void delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + + } + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/team/Entity/TeamList_ListFilter1.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/team/Entity/TeamList_ListFilter1.java new file mode 100644 index 0000000..d39b7e6 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/team/Entity/TeamList_ListFilter1.java @@ -0,0 +1,14 @@ +package com.realnet.team.Entity; + import lombok.*; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + @Data + public class TeamList_ListFilter1 { + + private Integer id; + + + private String team_name; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/team/Entity/Teams.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/team/Entity/Teams.java new file mode 100644 index 0000000..07ae6d4 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/team/Entity/Teams.java @@ -0,0 +1,36 @@ +package com.realnet.team.Entity; + import lombok.*; +import com.realnet.WhoColumn.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + @Entity + @Data + public class Teams extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String team_name; + +private String logoname; +private String logopath ; + + +@Column(length = 2000) +private String description; + +private String members; + +private String matches; + +private boolean active; + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/team/Repository/TeamsRepository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/team/Repository/TeamsRepository.java new file mode 100644 index 0000000..71abb7b --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/team/Repository/TeamsRepository.java @@ -0,0 +1,13 @@ +package com.realnet.team.Repository; + + +import org.springframework.data.jpa.repository.JpaRepository; + +import org.springframework.stereotype.Repository; + + +import com.realnet.team.Entity.Teams; + +@Repository +public interface TeamsRepository extends JpaRepository { +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/team/Services/TeamList_ListFilter1Service.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/team/Services/TeamList_ListFilter1Service.java new file mode 100644 index 0000000..ceff8b4 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/team/Services/TeamList_ListFilter1Service.java @@ -0,0 +1,47 @@ +package com.realnet.team.Services; +import java.util.*; +import com.realnet.team.Repository.TeamsRepository; +import com.realnet.team.Entity.Teams; + +import com.realnet.team.Entity.TeamList_ListFilter1; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Service; + +@Service + public class TeamList_ListFilter1Service { +@Autowired +private TeamsRepository Repository; + + + + + public List getlistbuilder() { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Teams data : list) { +{ +TeamList_ListFilter1 dummy = new TeamList_ListFilter1(); + dummy.setId(data.getId()); + dummy.setTeam_name(data.getTeam_name()); + l.add(dummy); +} +} +return l;} + + + + public List getlistbuilderparam( ) { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Teams data : list) { +{ +TeamList_ListFilter1 dummy = new TeamList_ListFilter1(); + dummy.setId(data.getId()); + dummy.setTeam_name(data.getTeam_name()); + l.add(dummy); +} +} +return l;} +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/team/Services/TeamsService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/team/Services/TeamsService.java new file mode 100644 index 0000000..c8c6c8f --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/team/Services/TeamsService.java @@ -0,0 +1,80 @@ +package com.realnet.team.Services; +import com.realnet.team.Repository.TeamsRepository; +import com.realnet.team.Entity.Teams;import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import com.realnet.SequenceGenerator.Service.SequenceService; +import com.realnet.Notification.Entity.NotificationService; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; + import org.springframework.stereotype.Service; + +@Service + public class TeamsService { +@Autowired +private TeamsRepository Repository; + + + + + + + + + + + + +public Teams Savedata(Teams data) { + + + + + + + + + + + + +Teams save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll(page); + } +public List getdetails() { + return (List) Repository.findAll(); + } + + +public Teams getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Teams update(Teams data,Integer id) { + Teams old = Repository.findById(id).get(); +old.setTeam_name(data.getTeam_name()); + + + +old.setDescription(data.getDescription()); + +old.setMembers(data.getMembers()); + +old.setMatches(data.getMatches()); + +old.setActive (data.isActive()); + +final Teams test = Repository.save(old); + return test;}} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/template/controller/DynamicTemplateController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/template/controller/DynamicTemplateController.java new file mode 100644 index 0000000..d3e4455 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/template/controller/DynamicTemplateController.java @@ -0,0 +1,332 @@ +package com.realnet.template.controller; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.Row; +import org.apache.poi.ss.usermodel.Sheet; +import org.apache.poi.ss.usermodel.Workbook; +import org.apache.poi.ss.usermodel.WorkbookFactory; +import org.apache.poi.xssf.usermodel.XSSFWorkbook; +import org.json.simple.JSONObject; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.io.ByteArrayResource; +import org.springframework.core.io.InputStreamResource; +import org.springframework.core.io.Resource; +import org.springframework.dao.DataIntegrityViolationException; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.mock.web.MockMultipartFile; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import com.realnet.template.entity.TemplateFileUpload; +import com.realnet.template.repository.TemplatedataRepo; +import com.realnet.template.service.DynamicTemplateService; + +@RestController +@RequestMapping("api/dynamic") +public class DynamicTemplateController { + @Autowired + private JdbcTemplate jdbcTemplate; + @Autowired + private TemplatedataRepo temprepo; + @Autowired + private DynamicTemplateService dynamicTemplateService; + + @PostMapping("/templatetojsondata") + public ResponseEntity> saveTemplateInJson(@RequestParam("file") MultipartFile file) + throws IOException { + List jsonList = dynamicTemplateService.processTemplate(file); + return new ResponseEntity<>(jsonList, HttpStatus.OK); + } + + @PostMapping("/templatetojson/{id}") + public ResponseEntity convertFileToJson(@PathVariable Long id) throws IOException { + // Retrieve the TemplateFileUpload entity based on the provided ID + Optional fileUploadOptional = temprepo.findById(id); + + TemplateFileUpload fileUpload = fileUploadOptional.get(); + String location = fileUpload.getFile_location(); + String fileName = fileUpload.getFile_changed_name() + ".xlsx"; + String filePath = location + File.separator + "processingfile" + File.separator + fileName; + File file = new File(filePath); + if (!file.exists()) { + // Handle the case where the file is not found in the specified location + return ResponseEntity.notFound().build(); + } + MultipartFile multipartFile = new MockMultipartFile(fileName, new FileInputStream(file)); + List jsonList = dynamicTemplateService.processTemplate(multipartFile); + return ResponseEntity.ok(jsonList); + + } + + @GetMapping("/getHeaders/{id}") + public ResponseEntity> getFileHeaders(@PathVariable Long id) throws IOException { + Optional fileUploadOptional = temprepo.findById(id); + + TemplateFileUpload fileUpload = fileUploadOptional.get(); + String location = fileUpload.getFile_location(); + String fileName = fileUpload.getFile_changed_name() + ".xlsx"; + String filePath = location + File.separator + "processingfile" + File.separator + fileName; + File file = new File(filePath); + if (!file.exists()) { + return ResponseEntity.notFound().build(); + } + Workbook workbook = WorkbookFactory.create(file); + Sheet sheet = workbook.getSheetAt(0); + Row headerRow = sheet.getRow(0); + List headers = new ArrayList<>(); + for (Cell cell : headerRow) { + String header = cell.getStringCellValue(); + headers.add(header); + } + workbook.close(); + return ResponseEntity.ok(headers); + } + + @PostMapping("/jsonkeychange") + public ResponseEntity changeKeysOfJson(@RequestParam String newjson, @RequestParam String body) + throws IOException { + JsonParser parser = new JsonParser(); + JsonArray newKeysArray = parser.parse(newjson).getAsJsonArray(); + JsonElement bodyElement = parser.parse(body); + JsonArray bodyArray = bodyElement.getAsJsonArray(); + List> jsonList = new ArrayList<>(); // Use Object type to handle booleans + for (JsonElement bodyElement1 : bodyArray) { + JsonObject bodyObject = bodyElement1.getAsJsonObject(); + Map map = new HashMap<>(); // Use Object type to handle booleans + for (JsonElement newKeyElement : newKeysArray) { + JsonObject newKeyObject = newKeyElement.getAsJsonObject(); + String originalKey = newKeyObject.get("headerName").getAsString(); + String newKey = newKeyObject.get("value").getAsString(); + if (bodyObject.has(originalKey)) { + JsonElement valueElement = bodyObject.get(originalKey); + // Check if the value is a string representation of boolean + if (valueElement.isJsonPrimitive() && valueElement.getAsJsonPrimitive().isString()) { + String value = valueElement.getAsString().toLowerCase(); // Convert to lowercase + // Convert "true" or "false" to boolean type + if (value.equals("true") || value.equals("false")) { + boolean boolValue = Boolean.parseBoolean(value); + map.put(newKey, boolValue); + continue; // Skip further processing for this key + } + } + String value = valueElement.getAsString(); + map.put(newKey, value); + } + } + jsonList.add(map); + } + return new ResponseEntity<>(jsonList, HttpStatus.ACCEPTED); + } + + @PostMapping("/DownloadExcel/{entityName}") + public ResponseEntity importdatadownloadexcel(@PathVariable String entityName, + @RequestBody List> data) { + List> processedData = new ArrayList<>(); + try { + String convertedTableName = entityName; + String sql = getInsertQuery1(convertedTableName, data.get(0)); + for (int i = 0; i < data.size(); i++) { + Map row = data.get(i); + Map processedRow = new HashMap<>(); + try { + Object[] values = new Object[row.size() + 5]; // +5 for the additional columns + int index = 0; + for (Object value : row.values()) { + values[index++] = value; + } + values[index++] = new Timestamp(System.currentTimeMillis()); // created_at + values[index++] = null; // created_by + values[index++] = null; // updated_by + values[index++] = new Timestamp(System.currentTimeMillis()); // updated_at + values[index] = null; // account_id + jdbcTemplate.update(sql, values); + processedRow.putAll(row); + processedRow.put("Status", "Success"); + processedRow.put("Exception", "NA"); + } catch (DataIntegrityViolationException e) { + processedRow.putAll(row); + processedRow.put("Status", "Error"); + String exceptionMessage = extractExceptionMessage1(e); + processedRow.put("Exception", exceptionMessage); + } + processedData.add(processedRow); + } + if (!processedData.isEmpty()) { + Workbook workbook = new XSSFWorkbook(); + Sheet sheet = workbook.createSheet("Failed Records"); + // Add column headers to the worksheet + Row headerRow = sheet.createRow(0); + int columnIndex = 0; + for (String key : processedData.get(0).keySet()) { + Cell cell = headerRow.createCell(columnIndex++); + cell.setCellValue(key); + } + // Add data rows to the worksheet + int rowIndex = 1; + for (Map row : processedData) { + Row dataRow = sheet.createRow(rowIndex++); + columnIndex = 0; + for (Object value : row.values()) { + Cell cell = dataRow.createCell(columnIndex++); + cell.setCellValue(value.toString()); + } + } + // Write the workbook to a file + ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); + workbook.write(outputStream); + ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray()); + HttpHeaders headers = new HttpHeaders(); + headers.setContentType(MediaType.parseMediaType("application/vnd.ms-excel")); + headers.set(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=failed_records.xlsx"); + Resource resource = new InputStreamResource(inputStream); + return ResponseEntity.ok().headers(headers).body(resource); + } + return ResponseEntity.ok().body(null); + } catch (Exception e) { + return ResponseEntity.badRequest().body(null); + } + } + + private String extractExceptionMessage1(DataIntegrityViolationException e) { + String errorMessage = e.getMessage(); + int startIndex = errorMessage.indexOf("Incorrect "); + int endIndex = errorMessage.indexOf("at row"); + if (startIndex != -1 && endIndex != -1) { + return errorMessage.substring(startIndex, endIndex).trim(); + } + return errorMessage; + } + + private String convertTableName1(String tableName) { + switch (tableName.toLowerCase()) { + case "priority": + return "sr_priority2_t"; + case "impact": + return "sr_impact2_t"; + case "urgency": + return "Sr_urgency_t"; + case "category": + return "sr_category2_t"; + case "state": + return "sr_state_t"; + case "contact_type": + return "sr_contact_type_t"; + case "customer": + return "sr_customer_t"; + case "handler": + return "sr_handler_t"; + default: + return tableName; + } + } + + private String getInsertQuery1(String tableName, Map data) { + StringBuilder sqlBuilder = new StringBuilder(); + sqlBuilder.append("INSERT INTO "); + sqlBuilder.append(tableName); + sqlBuilder.append(" ("); + sqlBuilder.append(String.join(", ", data.keySet())); + sqlBuilder.append(", created_at, created_by, updated_by, updated_at, account_id) VALUES ("); + sqlBuilder.append(String.join(", ", Collections.nCopies(data.size(), "?"))); + sqlBuilder.append(", ?, ?, ?, ?, ?)"); + return sqlBuilder.toString(); + } + + private void createTableIfNotExists(String tableName, Map data) { + StringBuilder sqlBuilder = new StringBuilder(); + sqlBuilder.append("CREATE TABLE IF NOT EXISTS "); + sqlBuilder.append(tableName); + sqlBuilder.append(" ("); + // Check if "id" field exists in the data map + if (data.containsKey("id")) { + // Add "id" column as the first column + sqlBuilder.append("id INT PRIMARY KEY, "); + } + for (Map.Entry entry : data.entrySet()) { + String columnName = entry.getKey(); + Object columnValue = entry.getValue(); + // Skip adding "id" field again + if (columnName.equalsIgnoreCase("id")) { + continue; + } + if (columnName.equalsIgnoreCase("date") || columnName.equalsIgnoreCase("dob")) { + sqlBuilder.append(columnName).append(" DATE, "); + } else { + sqlBuilder.append(columnName).append(" VARCHAR(255), "); + } + } + sqlBuilder.delete(sqlBuilder.length() - 2, sqlBuilder.length()); // Remove the last comma and space + sqlBuilder.append(")"); + jdbcTemplate.execute(sqlBuilder.toString()); + } + + @GetMapping("/columns/{tableName}") + public List getColumnNames(@PathVariable String tableName) { + Set columnNamesSet = new HashSet<>(); + String convertedTableName = convertTableName(tableName); + List columnNames = jdbcTemplate.queryForList( + "SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = ?", + new Object[] { convertedTableName }, String.class); + // Exclude specific column names + List excludedColumns = Arrays.asList("id", "account_id", "updated_at", "created_at", "created_by", + "updated_by"); + for (String columnName : columnNames) { + if (!excludedColumns.contains(columnName)) { + columnNamesSet.add(columnName); + } + } + return new ArrayList<>(columnNamesSet); + } + + private String convertTableName(String tableName) { + switch (tableName.toLowerCase()) { + case "customer": + return "customer_master_t"; + case "impact": + return "sr_impact2_t"; + case "urgency": + return "Sr_urgency_t"; + case "category": + return "sr_category2_t"; + case "state": + return "sr_state_t"; + case "contact_type": + return "sr_contact_type_t"; + + case "handler": + return "sr_handler_t"; + default: + return tableName; + } + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/template/controller/ExcelController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/template/controller/ExcelController.java new file mode 100644 index 0000000..e58988b --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/template/controller/ExcelController.java @@ -0,0 +1,327 @@ +//package com.realnet.excel.controller; +package com.realnet.template.controller; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; + +import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.Row; +import org.apache.poi.ss.usermodel.Sheet; +import org.apache.poi.ss.usermodel.Workbook; +import org.apache.poi.xssf.usermodel.XSSFWorkbook; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.core.io.FileSystemResource; +import org.springframework.core.io.InputStreamResource; +import org.springframework.core.io.Resource; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.template.entity.TemplateFileUpload; +import com.realnet.template.repository.TemplatedataRepo; +import com.realnet.template.service.CSVService; +import com.realnet.template.service.FileUploadService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; + +@RestController +@RequestMapping("api/template") +public class ExcelController { + @Autowired + private TemplatedataRepo temprepo; + + @Autowired + FileUploadService fileupload; + @Autowired + private AppUserServiceImpl userService; +// +// @Autowired +// private FileUploadService fileUploadService; + +// @Autowired +// private CommFileuploadhelper fileuploadhelper; + + @GetMapping("/demo/download/{file_type}") + public ResponseEntity demoTemplate(@PathVariable String file_type) throws IOException { + + if (file_type.equalsIgnoreCase("Customer")) { + + String filename = "Customer" + ".xlsx"; + String[] header = { "Priority Name", "Description", "Is Active", "Effective Start Date", + "Effective End date" }; + ByteArrayInputStream in = demoTemplate(header, file_type); + InputStreamResource file = new InputStreamResource(in); + return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + filename) + .contentType(MediaType.parseMediaType("application/vnd.ms-excel")).body(file); + + } else if (file_type.equalsIgnoreCase("impact")) { + + String filename = "Sr_impact2_t" + ".xlsx"; + String[] header = { "Impact Name", "Description", "Is Active", "Effective Start Date", + "Effective End date" }; + ByteArrayInputStream in = demoTemplate(header, file_type); + InputStreamResource file = new InputStreamResource(in); + return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + filename) + .contentType(MediaType.parseMediaType("application/vnd.ms-excel")).body(file); + + } + + return new ResponseEntity("Not Found", HttpStatus.BAD_REQUEST); + + } + + public static ByteArrayInputStream demoTemplate(String[] HEADERs, String file_type) throws IOException { + String SHEET = file_type; + Workbook workbook = new XSSFWorkbook(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + Sheet sheet = workbook.createSheet(SHEET); + Row headerRow = sheet.createRow(0); + for (int col = 0; col < HEADERs.length; col++) { + Cell cell = headerRow.createCell(col); + cell.setCellValue(HEADERs[col]); + } + workbook.write(out); + return new ByteArrayInputStream(out.toByteArray()); + + } + + @Autowired + private CSVService csvService; + @Value("${projectPath}") + private String projectpath; + +// download Template In Excel + @GetMapping("/download-csv") + public ResponseEntity downloadCSV(@RequestParam String tableName) throws IOException { + + System.out.println("downloading start.."); + String processString = processString(tableName); + String filename = csvService.generateCSV(processString.toLowerCase()); + + System.out.println("file generate.."); + + String baseFilePath = projectpath + File.separator + filename; + + Path zipFilePath = Paths.get(baseFilePath); + try { + byte[] Content = Files.readAllBytes(zipFilePath); + + ByteArrayInputStream in = new ByteArrayInputStream(Content); + InputStreamResource file = new InputStreamResource(in); +// ByteArrayResource resource = new ByteArrayResource(zipContent); + + HttpHeaders headers = new HttpHeaders(); + headers.add(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + filename); + headers.setContentType(MediaType.APPLICATION_OCTET_STREAM); + + return ResponseEntity.ok().headers(headers).contentLength(Content.length).body(file); + } catch (IOException e) { + e.printStackTrace(); + return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null); + } + + } + + public String processString(String input) { + if (input == null || input.isEmpty()) { + return input; + } + + StringBuilder result = new StringBuilder(); + result.append(input.charAt(0)); // Append the first character as is + + for (int i = 1; i < input.length(); i++) { + char currentChar = input.charAt(i); + char prevChar = input.charAt(i - 1); + + if (Character.isUpperCase(currentChar) && prevChar == '_') { + result.append(Character.toLowerCase(currentChar)); + } else if (Character.isUpperCase(currentChar)) { + result.append('_').append(Character.toLowerCase(currentChar)); + } else { + result.append(currentChar); + } + } + + return result.toString(); + } + +// @PostMapping("/save/{filetype}") +// public ResponseEntity uploadFile(@RequestParam MultipartFile file, @PathVariable String filetype) +// throws IOException, ParseException { +// BufferedReader br; +// InputStream is = file.getInputStream(); +// br = new BufferedReader(new InputStreamReader(is)); +// String file_name = file.getOriginalFilename(); +// AppUser loggedInUser = userService.getLoggedInUser(); +// +// if (filetype.equalsIgnoreCase("priority")) { +// +// if (file_name.contains("Sr_priority2_t")) { +// +// String[] header = { "Priority Name", "Description", "Is Active", "Effective Start Date", +// "Effective End date" }; +// ArrayList prioritylist = new ArrayList(); +// +// Workbook workbook = WorkbookFactory.create(is); +// +//// Create a DataFormatter to format and get each cell's value as String +// DataFormatter dataFormatter = new DataFormatter(); +// +// Sheet sheet = workbook.getSheetAt(0); +// +// // Getting number of columns in the Sheet +// int cols = sheet.getRow(0).getLastCellNum(); +// +// fileupload.uploadFile(file, loggedInUser.getUserId(), filetype); +// +// for (Row row : sheet) { +// +// if (row.getRowNum() == 0) { +// for (int i = 0; i < cols; i++) { +// String value = dataFormatter.formatCellValue(row.getCell(i)); +// +// if (!header[i].equalsIgnoreCase(value)) { +// +// return new ResponseEntity<>( +// "priority file Should have \"" + header + " \"in the header in excel file", +// HttpStatus.BAD_REQUEST); +// } +// } +// +// } +// +// if (row.getRowNum() != 0) { +// Date date = row.getCell(3).getDateCellValue(); +// Date date2 = row.getCell(4).getDateCellValue(); +// +// Sr_priority2_t priority = new Sr_priority2_t(); +// priority.setPriority_name(dataFormatter.formatCellValue(row.getCell(0))); +// priority.setDescription(dataFormatter.formatCellValue(row.getCell(1))); +// priority.setActive(Boolean.valueOf(dataFormatter.formatCellValue(row.getCell(2)))); +// +// priority.setEffective_start_date(date); +// priority.setEffective_end_date(date2); +// priorityrepo.save(priority); +// +// prioritylist.add(priority); +// } +// +// } +//// priorityrepo.saveAll(prioritylist); +// workbook.close(); +// +//// +// +// return new ResponseEntity<>("File Uploaded", HttpStatus.ACCEPTED); +// } +// return new ResponseEntity<>("File name should contain Sr_priority2_t", HttpStatus.BAD_REQUEST); +// +// } +// +// return new ResponseEntity<>("Something Went Wrong please try again....!!!!! ", HttpStatus.BAD_REQUEST); +// +// } +// +//// Download template data in excel Files +// +// @GetMapping("/download/{file_type}") +// +// public ResponseEntity getFile(@PathVariable String file_type) throws IOException { +// +// if (file_type.equalsIgnoreCase("priority")) { +// +// String filename = "Sr_priority2_t" + ".xlsx"; +// String[] header = { "Priority Name", "Description", "Is Active", "Effective Start Date", +// "Effective End date" }; +// List findAll = priorityrepo.findAll(); +// ByteArrayInputStream in = templateByte(findAll, header); +// InputStreamResource file = new InputStreamResource(in); +// return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + filename) +// .contentType(MediaType.parseMediaType("application/vnd.ms-excel")).body(file); +// +// } else if (file_type.equalsIgnoreCase("impact")) { +// +// String filename = "Sr_impact2_t" + ".xlsx"; +// String[] header = { "Impact Name", "Description", "Is Active", "Effective Start Date", +// "Effective End date" }; +// List findAll = impactrepo.findAll(); +// ByteArrayInputStream in = templateByte3(findAll, header); +// InputStreamResource file = new InputStreamResource(in); +// return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + filename) +// .contentType(MediaType.parseMediaType("application/vnd.ms-excel")).body(file); +// +// } +// +// return new ResponseEntity("Not Found", HttpStatus.BAD_REQUEST); +// +// } + + @GetMapping("/getalltemplate") + public ResponseEntity getALlTemplate() { + return new ResponseEntity<>(temprepo.findAll(), HttpStatus.ACCEPTED); + } + + @GetMapping("/gettemplatebyid/{id}") + public ResponseEntity getTemplateById(@PathVariable Long id) { + return new ResponseEntity<>(fileupload.getTemplatebyid(id), HttpStatus.ACCEPTED); + } + + @PostMapping("/save/{entityName}/{name}") + public ResponseEntity post(@RequestParam(required = false) MultipartFile file, @PathVariable String entityName, + @PathVariable String name) throws JsonMappingException, JsonProcessingException { + + TemplateFileUpload job; + AppUser loggedInUser = userService.getLoggedInUser(); + +// job = new ObjectMapper().readValue(entityName, TemplateFileUpload.class); + + if (file != null) { + System.out.println(file.getOriginalFilename()); + +// boolean f = +// fileUploadService.uploadFile(file); + + fileupload.uploadFile(file, loggedInUser.getUserId(), entityName, name); + + } + + else { + System.out.println("erro"); + } + +// TemplateFileUpload save = temprepo.save(job); + + return new ResponseEntity<>(HttpStatus.OK); + + } + + @DeleteMapping("/deletetemplate/{id}") + public ResponseEntity deleteTemplateFileUploadById(@PathVariable Long id) { + try { + fileupload.deleteTemplateFileUploadById(id); + return ResponseEntity.ok("Template file deleted successfully"); + } catch (Exception e) { + // Handle exceptions, e.g., if the entity with the given ID is not found + return ResponseEntity.badRequest().body("Failed to delete template file: " + e.getMessage()); + } + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/template/controller/HtmlToPngController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/template/controller/HtmlToPngController.java new file mode 100644 index 0000000..928e30e --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/template/controller/HtmlToPngController.java @@ -0,0 +1,150 @@ +package com.realnet.template.controller; + +import java.io.FileOutputStream; +import java.io.IOException; + +import org.jsoup.Jsoup; +import org.jsoup.nodes.Document; +import org.jsoup.nodes.Element; +import org.jsoup.select.Elements; +import org.springframework.util.Base64Utils; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("/token") +public class HtmlToPngController { + +// @PostMapping(value = "/generate-file", produces = MediaType.TEXT_PLAIN_VALUE) +// public ResponseEntity generateFileFromHtml(@RequestParam String fileType, @RequestBody String htmlContent) { +// try { +// String fileExtension = ""; +// String renderedContent = ""; +// +// // Determine file extension and render content based on the fileType parameter +// if ("png".equalsIgnoreCase(fileType)) { +// fileExtension = "png"; +// BufferedImage image = renderHtmlToImage(htmlContent); +// File outputfile = new File("output.png"); +// ImageIO.write(image, "png", outputfile); +// renderedContent = "Image"; +// } else { +// return ResponseEntity.status(HttpStatus.BAD_REQUEST).body("Unsupported file type."); +// } +// +// // Return the file path or URL in the response +// String filePath = "output." + fileExtension; +// if (!StringUtils.isEmpty(filePath)) { +// return ResponseEntity.ok().body(renderedContent + " saved successfully at: " + filePath); +// } else { +// return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("Failed to save the " + renderedContent + "."); +// } +// } catch (IOException e) { +// e.printStackTrace(); +// return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("Error occurred while saving the file."); +// } +// } +// +// private BufferedImage renderHtmlToImage(String htmlContent) { +// JEditorPane editorPane = new JEditorPane(); +// editorPane.setContentType("text/html"); +// editorPane.setText(htmlContent); +// +// // Wait for the component to be rendered +// editorPane.setSize(new Dimension(1200, 800)); +// editorPane.setPreferredSize(new Dimension(1200, 800)); +// editorPane.setMinimumSize(new Dimension(1200, 800)); +// editorPane.setMaximumSize(new Dimension(1200, 800)); +// +// BufferedImage image = new BufferedImage(1200, 800, BufferedImage.TYPE_INT_ARGB); +// Graphics2D g2d = image.createGraphics(); +// editorPane.print(g2d); +// g2d.dispose(); +// +// return image; +// } + + + @PostMapping("/saveImageFromHtml") + public String saveImageFromHtml(@RequestBody String html) { + try { + // Parse HTML string + Document doc = Jsoup.parse(html); + + // Find img elements + Elements imgElements = doc.select("img"); + + // Iterate through img elements + for (Element imgElement : imgElements) { + // Get Base64 encoded image data from src attribute + String src = imgElement.attr("src"); + String base64Data = src.replaceFirst("^data:image/png;base64,", ""); + + // Decode Base64 string to byte array + byte[] imageData = Base64Utils.decodeFromString(base64Data); + + // Write byte array to PNG file + FileOutputStream fos = new FileOutputStream("image.png"); + fos.write(imageData); + fos.close(); + } + + return "Image saved successfully!"; + } catch (IOException e) { + e.printStackTrace(); + return "Failed to save image!"; + } + } + + + @PostMapping("/saveImageFromHtmlFileType") + public String saveImageFromHtml( + @RequestParam String fileType, + @RequestBody String html + ) { + try { + // Parse HTML string + Document doc = Jsoup.parse(html); + + // Find img elements + Elements imgElements = doc.select("img"); + + // Iterate through img elements + for (Element imgElement : imgElements) { + // Get Base64 encoded image data from src attribute + String src = imgElement.attr("src"); + String base64Data = src.replaceFirst("^data:image/png;base64,", ""); + + // Decode Base64 string to byte array + byte[] imageData = Base64Utils.decodeFromString(base64Data); + + // Determine file extension and content type + String fileExtension; + String contentType; + if ("png".equalsIgnoreCase(fileType)) { + fileExtension = ".png"; + contentType = "image/png"; + } else if ("svg".equalsIgnoreCase(fileType)) { + fileExtension = ".svg"; + contentType = "image/svg+xml"; + } else { + return "Unsupported file type!"; + } + + // Write byte array to file + String filename = "image" + fileExtension; + FileOutputStream fos = new FileOutputStream(filename); + fos.write(imageData); + fos.close(); + } + + return "Image saved successfully!"; + } catch (IOException e) { + e.printStackTrace(); + return "Failed to save image!"; + } + } +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/template/controller/ImageUploadController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/template/controller/ImageUploadController.java new file mode 100644 index 0000000..28c5374 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/template/controller/ImageUploadController.java @@ -0,0 +1,111 @@ +package com.realnet.template.controller; + +import java.util.Date; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.realnet.FileUpload.helper.Fileupload_helper; +import com.realnet.template.entity.ImageUpload; +import com.realnet.template.service.ImageUploadService; + + +@RequestMapping("api/template/imageUpload") +@RestController +public class ImageUploadController { + + @Autowired + private JdbcTemplate jdbcTemplate; + + @Value("${projectPath}") + private String projectPath; + + public final String UPLOAD_DIREC = "/Files"; + + @Autowired + private Fileupload_helper fileuploadhelper; + + @Autowired + private ImageUploadService imageUploadService; + + @PostMapping("/ImageUpload") + public ResponseEntity save(@RequestParam String data, @RequestParam MultipartFile file) throws Exception { + + Date date = new Date(); + String str = date.getTime() + "_"; + + ImageUpload docs; + + docs = new ObjectMapper().readValue(data, ImageUpload.class); + + if (!file.isEmpty()) { + System.out.println(file.getOriginalFilename()); + + boolean f = fileuploadhelper.uploadFilewithtimestamp(file, str); + + if (f) { + System.out.println("file uploaded successfully"); + int lastIndexOf = file.getOriginalFilename().lastIndexOf("."); + String filetype = file.getOriginalFilename().substring(lastIndexOf + 1); + docs.setFilename(str + file.getOriginalFilename()); + + docs.setFilePath(projectPath + UPLOAD_DIREC); + + } + + else { + docs.setFilename("No file uploaded"); + System.out.println(" no file uploaded "); + + } + + } else { + docs.setFilename("No file found"); + System.out.println(" no file uploaded "); + + } + ImageUpload saveddata = imageUploadService.Savedata(docs); + + return new ResponseEntity<>(saveddata, HttpStatus.OK); + } + + @GetMapping("/ImageUpload") + public List getdetails() { + List get = imageUploadService.getdetails(); + return get; + } + + @GetMapping("/ImageUpload/{id}") + public ImageUpload getdetailsbyId(@PathVariable Long id) { + ImageUpload get = imageUploadService.getdetailsbyId(id); + return get; + + } + + @DeleteMapping("/ImageUpload/{id}") + public void delete_by_id(@PathVariable Long id) { + imageUploadService.delete_by_id(id); + + } + + @PutMapping("/ImageUpload/{id}") + public ImageUpload update(@RequestBody ImageUpload data, @PathVariable Long id) { + ImageUpload update = imageUploadService.update(data, id); + return update; + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/template/controller/ImportDataRequest.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/template/controller/ImportDataRequest.java new file mode 100644 index 0000000..bb25bb4 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/template/controller/ImportDataRequest.java @@ -0,0 +1,25 @@ +package com.realnet.template.controller; + +import java.util.List; +import java.util.Map; + +public class ImportDataRequest { + private List> Site; + private List> Customer; + + public List> getSite() { + return Site; + } + + public void setSite(List> site) { + Site = site; + } + + public List> getCustomer() { + return Customer; + } + + public void setCustomer(List> customer) { + Customer = customer; + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/template/entity/ImageUpload.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/template/entity/ImageUpload.java new file mode 100644 index 0000000..ebe0b34 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/template/entity/ImageUpload.java @@ -0,0 +1,34 @@ +package com.realnet.template.entity; + + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; + + + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@Entity +@AllArgsConstructor +@NoArgsConstructor +public class ImageUpload { + + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private Long user_id; + + private String dataImportName; + + private String filename; + + private String filePath; + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/template/entity/TemplateFileUpload.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/template/entity/TemplateFileUpload.java new file mode 100644 index 0000000..f8d3522 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/template/entity/TemplateFileUpload.java @@ -0,0 +1,36 @@ +package com.realnet.template.entity; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; + +import com.realnet.WhoColumn.Who_column; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@Entity +@AllArgsConstructor +@NoArgsConstructor +public class TemplateFileUpload extends Who_column { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private Long user_id; + private String file_name; + private String file_changed_name; + private String file_location; + private String file_type; + private Integer status; + private String entity_name; + private boolean isProcessed; + + private String DownloadfileName; + private String DownloadfileLocation; + + private String name; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/template/repository/ImageUploadRepo.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/template/repository/ImageUploadRepo.java new file mode 100644 index 0000000..bcaea8f --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/template/repository/ImageUploadRepo.java @@ -0,0 +1,11 @@ +package com.realnet.template.repository; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +import com.realnet.template.entity.ImageUpload; + +@Repository +public interface ImageUploadRepo extends JpaRepository { + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/template/repository/TemplatedataRepo.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/template/repository/TemplatedataRepo.java new file mode 100644 index 0000000..7beb311 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/template/repository/TemplatedataRepo.java @@ -0,0 +1,19 @@ +package com.realnet.template.repository; + +import java.util.List; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; + +import com.realnet.template.entity.TemplateFileUpload; + +public interface TemplatedataRepo extends JpaRepository { + + @Query(value = "select * from template_file_upload where file_name =?1", nativeQuery = true) + TemplateFileUpload getbyFileName(String fileName); + + @Query("SELECT t FROM TemplateFileUpload t WHERE t.entity_name IS NOT NULL AND t.isProcessed = false ORDER BY t.id ASC") + List findUnprocessedRecordsOrderedByIdAsc(); + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/template/service/CSVService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/template/service/CSVService.java new file mode 100644 index 0000000..08785f0 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/template/service/CSVService.java @@ -0,0 +1,58 @@ +package com.realnet.template.service; + +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.util.List; + +import javax.persistence.EntityManager; +import javax.persistence.Query; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; + +import com.opencsv.CSVWriter; + +@Service +public class CSVService { + + @Value("${projectPath}") + private String projectpath; + @Autowired + private EntityManager entityManager; + + public String generateCSV(String tableName) throws IOException { + // Get column names dynamically + String columnQuery = "SELECT column_name FROM information_schema.columns WHERE table_name = :tableName"; + Query query = entityManager.createNativeQuery(columnQuery); + query.setParameter("tableName", tableName); + + List columnNames = query.getResultList(); + + // Query the table data +// String dataQuery = "SELECT * FROM " + tableName; // for all record + String dataQuery = "SELECT * FROM " + tableName + " LIMIT 1"; // for only one record + + Query dataQueryExec = entityManager.createNativeQuery(dataQuery); + List resultList = dataQueryExec.getResultList(); + + // Write to CSV + String pathString = projectpath; + String filename = "file" + System.currentTimeMillis() + ".csv"; + String filePath = pathString + File.separator + filename; // Update this path as needed + try (CSVWriter writer = new CSVWriter(new FileWriter(filePath))) { + writer.writeNext(columnNames.toArray(new String[0])); + + for (Object[] row : resultList) { + String[] rowArray = new String[row.length]; + for (int i = 0; i < row.length; i++) { + rowArray[i] = row[i] != null ? row[i].toString() : ""; + } + writer.writeNext(rowArray); + } + } + + return filename; + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/template/service/DynamicTemplateService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/template/service/DynamicTemplateService.java new file mode 100644 index 0000000..6600186 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/template/service/DynamicTemplateService.java @@ -0,0 +1,105 @@ +package com.realnet.template.service; + +import org.apache.poi.ss.usermodel.*; +import org.json.simple.JSONObject; +import org.springframework.stereotype.Service; +import org.springframework.web.multipart.MultipartFile; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.util.ArrayList; +import java.util.List; + +@Service +public class DynamicTemplateService { + +// public List processTemplate(MultipartFile file) throws IOException { +// BufferedReader br; +// InputStream is = file.getInputStream(); +// br = new BufferedReader(new InputStreamReader(is)); +// +// Workbook workbook = WorkbookFactory.create(is); +// +// DataFormatter dataFormatter = new DataFormatter(); +// +// Sheet sheet = workbook.getSheetAt(0); +// +// int cols = sheet.getRow(0).getLastCellNum(); +// int firstRowNum = sheet.getFirstRowNum(); +// +// List keys = new ArrayList<>(); +// List jsonList = new ArrayList<>(); +// +// for (Row row : sheet) { +// if (row.getRowNum() == firstRowNum) { +// for (int i = 0; i < cols; i++) { +// String value = dataFormatter.formatCellValue(row.getCell(i)); +// keys.add(value); +// } +// } else { +// JSONObject object = new JSONObject(); +// +// for (int i = 0; i < cols; i++) { +// String key = keys.get(i); +// String value = dataFormatter.formatCellValue(row.getCell(i)); +// object.put(key, value); +// } +// +// jsonList.add(object); +// } +// } +// +// workbook.close(); +// +// return jsonList; +// } +// String fromSheet=dh; +// String fromacolumn= + + + public List processTemplate(MultipartFile file) throws IOException { + InputStream is = file.getInputStream(); + Workbook workbook = WorkbookFactory.create(is); + Sheet sheet = workbook.getSheetAt(0); + DataFormatter dataFormatter = new DataFormatter(); + + List keys = new ArrayList<>(); + List jsonList = new ArrayList<>(); + + for (Row row : sheet) { + if (row.getRowNum() == 0) { + // Read the header row and populate the keys list + for (Cell cell : row) { + String value = dataFormatter.formatCellValue(cell); + keys.add(value); + } + } else { + // Skip the row if all cells are empty + boolean allCellsEmpty = true; + JSONObject object = new JSONObject(); + + for (int i = 0; i < keys.size(); i++) { + String key = keys.get(i); + Cell cell = row.getCell(i); + String value = dataFormatter.formatCellValue(cell); + + object.put(key, value); + + if (!value.isEmpty()) { + allCellsEmpty = false; + } + } + + if (!allCellsEmpty) { + jsonList.add(object); + } + } + } + + workbook.close(); + return jsonList; + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/template/service/ExcelDataService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/template/service/ExcelDataService.java new file mode 100644 index 0000000..4154748 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/template/service/ExcelDataService.java @@ -0,0 +1,96 @@ +//package com.realnet.excel.service; +// +//import java.io.IOException; +//import java.util.ArrayList; +//import java.util.List; +// +//import org.apache.poi.EncryptedDocumentException; +//import org.apache.poi.ss.usermodel.Cell; +//import org.apache.poi.ss.usermodel.DataFormatter; +//import org.apache.poi.ss.usermodel.Row; +//import org.apache.poi.ss.usermodel.Sheet; +//import org.apache.poi.ss.usermodel.Workbook; +//import org.apache.poi.ss.usermodel.WorkbookFactory; +//import org.springframework.stereotype.Service; +// +//import com.realnet.excel.entity.ExcelFileUpload; +// +//@Service +//public class ExcelDataService { +// +// Workbook workbook; +// +// public List getExcelDataAsList() { +// +// List list = new ArrayList(); +// +// // Create a DataFormatter to format and get each cell's value as String +// DataFormatter dataFormatter = new DataFormatter(); +// +// // Create the Workbook +//// try { +//// workbook = WorkbookFactory.create(); +//// } catch (EncryptedDocumentException | IOException e) { +//// e.printStackTrace(); +//// } +// +// // Retrieving the number of sheets in the Workbook +// System.out.println("-------Workbook has '" + workbook.getNumberOfSheets() + "' Sheets-----"); +// +// // Getting the Sheet at index zero +// Sheet sheet = workbook.getSheetAt(0); +// +// // Getting number of columns in the Sheet +// int noOfColumns = sheet.getRow(0).getLastCellNum(); +// System.out.println("-------Sheet has '"+noOfColumns+"' columns------"); +// +// // Using for-each loop to iterate over the rows and columns +// for (Row row : sheet) { +// for (Cell cell : row) { +// String cellValue = dataFormatter.formatCellValue(cell); +// list.add(cellValue); +// } +// } +// +// // filling excel data and creating list as List +// List invList = createList(list, noOfColumns); +// +// // Closing the workbook +// try { +// workbook.close(); +// } catch (IOException e) { +// // TODO Auto-generated catch block +// e.printStackTrace(); +// } +// +// return invList; +// } +// +// private List createList(List excelData, int noOfColumns) { +// +// ArrayList invList = new ArrayList(); +// +// int i = noOfColumns; +// do { +// ExcelFileUpload inv = new ExcelFileUpload(); +// +//// inv.setName(excelData.get(i)); +//// inv.setAmount(Double.valueOf(excelData.get(i + 1))); +//// inv.setNumber(excelData.get(i + 2)); +//// inv.setReceivedDate(excelData.get(i + 3)); +// +// invList.add(inv); +// i = i + (noOfColumns); +// +// } while (i < excelData.size()); +// return invList; +// } +// +//// public int saveExcelData(List invoices) { +//// invoices = repo.saveAll(invoices); +//// return invoices.size(); +//// } +// + + +//} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/template/service/FileUploadService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/template/service/FileUploadService.java new file mode 100644 index 0000000..3ad9286 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/template/service/FileUploadService.java @@ -0,0 +1,115 @@ +package com.realnet.template.service; + +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.StandardCopyOption; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.core.io.ClassPathResource; +import org.springframework.core.io.Resource; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Service; +import org.springframework.util.StringUtils; +import org.springframework.web.multipart.MultipartFile; + + +import com.realnet.template.entity.TemplateFileUpload; +import com.realnet.template.repository.TemplatedataRepo; + +@Service +public class FileUploadService { + + @Autowired + private TemplatedataRepo repo; + + @Value("${projectPath}") + private String projectPath; + + public String uploadFile(MultipartFile file, Long user_id, String file_type, String name) { + try { + + String filepath = "import-data"; + + String file_name = file.getOriginalFilename(); + String substring = file_name.substring(0, file_name.lastIndexOf(".")); + + String str = substring + System.currentTimeMillis(); + +// String location =System.getProperty("user.dir")+filepath; + String location = projectPath + File.separator + filepath; + File dir2 = new File(location); + if (!dir2.exists()) { + dir2.mkdir(); + } + + String file_name2 = file.getOriginalFilename(); + + File staticdir2 = new File(location + "/incomingfile"); + if (!staticdir2.exists()) { + staticdir2.mkdir(); + } + String getpath2 = staticdir2.getAbsolutePath(); + System.out.println(getpath2); + + Path copyLocation2 = Paths.get(staticdir2 + File.separator + StringUtils.cleanPath(file_name2)); + + Files.copy(file.getInputStream(), copyLocation2, StandardCopyOption.REPLACE_EXISTING); + + File staticdir = new File(location + "/processingfile"); + if (!staticdir.exists()) { + staticdir.mkdir(); + } + String getpath = staticdir.getAbsolutePath(); + System.out.println(getpath); + + Path copyLocation = Paths.get(staticdir + File.separator + StringUtils.cleanPath(str + ".xlsx")); + + Files.copy(file.getInputStream(), copyLocation, StandardCopyOption.REPLACE_EXISTING); + + TemplateFileUpload exceldata = new TemplateFileUpload(); + exceldata.setFile_location(location); + + exceldata.setFile_name(file.getOriginalFilename()); + exceldata.setFile_changed_name(str); + // exceldata.setFile_type(file_type); + exceldata.setEntity_name(file_type); + exceldata.setName(name); + exceldata.setUser_id(user_id); + repo.save(exceldata); + + System.out.println("-----------------------saving data----------------"); + return location; + } catch (Exception e) { + e.printStackTrace(); + throw new RuntimeException("Could not store file " + file.getOriginalFilename() + ". Please try again!"); + } + + } + + + + + + public TemplateFileUpload getTemplatebyid(Long Id) { + TemplateFileUpload one = repo.getOne(Id); + return one; + + } + + public void deleteTemplateFileUploadById(Long id) { + // Check if the entity with the given ID exists + if (repo.existsById(id)) { + repo.deleteById(id); + } + } + + + + public TemplateFileUpload getFileById(Long id) { + // Use your JPA repository to retrieve the file by its ID + return repo.findById(id).orElse(null); + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/template/service/ImageUploadService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/template/service/ImageUploadService.java new file mode 100644 index 0000000..d984e50 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/template/service/ImageUploadService.java @@ -0,0 +1,41 @@ +package com.realnet.template.service; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.realnet.template.entity.ImageUpload; +import com.realnet.template.repository.ImageUploadRepo; + +@Service +public class ImageUploadService { + + @Autowired + private ImageUploadRepo Repository; + + public ImageUpload Savedata(ImageUpload data) { + return Repository.save(data); + } + + public List getdetails() { + return (List) Repository.findAll(); + } + + public ImageUpload getdetailsbyId(Long id) { + return Repository.findById(id).get(); + } + + public void delete_by_id(Long id) { + Repository.deleteById(id); + } + + public ImageUpload update(ImageUpload data, Long id) { + ImageUpload old = Repository.findById(id).get(); + // old.setTransactionDate(data.getTransactionDate()); +// old.setTransactionAmount(data.isTransactionAmount()); + final ImageUpload test = Repository.save(old); + return test; + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/CompanyDto.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/CompanyDto.java new file mode 100644 index 0000000..0000a61 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/CompanyDto.java @@ -0,0 +1,15 @@ +package com.realnet.userDTO; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class CompanyDto implements Serializable { + private static final long serialVersionUID = 1L; + private String userEmail; // for load the user who is responsible + private String companyName; + private String workspace; + private String gstNumber; + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/Email.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/Email.java new file mode 100644 index 0000000..5ea7e2d --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/Email.java @@ -0,0 +1,94 @@ +package com.realnet.userDTO; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +@AllArgsConstructor +@NoArgsConstructor +@Getter +@Setter +public class Email extends Rn_Who_Columns { + + /** + * + */ + private static final long serialVersionUID = 1L; + private Long userId; + private String email1; + private String email2; + private String email3; + private String email4; + + private Long id; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + +// private String password; + +// @ManyToOne(fetch = FetchType.LAZY) +// @JoinColumn(name = "ACCOUNT_ID") +// @JsonBackReference +// private Sys_Accounts sys_account; + + //public String getPassword() { +// return password; +// } +// public void setPassword(String password) { +// this.password = password; +// } + // public Sys_Accounts getSys_account() { +// return sys_account; +// } +// public void setSys_account(Sys_Accounts sys_account) { +// this.sys_account = sys_account; +// } + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public String getEmail1() { + return email1; + } + + public void setEmail1(String email1) { + this.email1 = email1; + } + + public String getEmail2() { + return email2; + } + + public void setEmail2(String email2) { + this.email2 = email2; + } + + public String getEmail3() { + return email3; + } + + public void setEmail3(String email3) { + this.email3 = email3; + } + + public String getEmail4() { + return email4; + } + + public void setEmail4(String email4) { + this.email4 = email4; + } + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/EmailRequest.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/EmailRequest.java new file mode 100644 index 0000000..240a638 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/EmailRequest.java @@ -0,0 +1,8 @@ +package com.realnet.userDTO; + +import lombok.Data; + +@Data +public class EmailRequest { + private String email; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/Login.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/Login.java new file mode 100644 index 0000000..ce469c0 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/Login.java @@ -0,0 +1,13 @@ +package com.realnet.userDTO; + + +import lombok.Data; + +@Data +public class Login { + + private String username = ""; + + private String password = ""; + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/LoginUser.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/LoginUser.java new file mode 100644 index 0000000..094cf50 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/LoginUser.java @@ -0,0 +1,37 @@ +package com.realnet.userDTO; + +public class LoginUser { + + //private String username; + private String email; + private String password; + + /* + * public String getUsername() { return username; } + * + * public void setUsername(String username) { this.username = username; } + */ + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + +// @Override +// public String toString() { +// return "LoginUser [email=" + email + ", password=" + password + "]"; +// } + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/PasswordResetRequest.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/PasswordResetRequest.java new file mode 100644 index 0000000..f0033cd --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/PasswordResetRequest.java @@ -0,0 +1,9 @@ +package com.realnet.userDTO; + +import lombok.Data; + +@Data +public class PasswordResetRequest { + private String oldPassword; + private String newPassword; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/Provider.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/Provider.java new file mode 100644 index 0000000..1e9b1b1 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/Provider.java @@ -0,0 +1,5 @@ +package com.realnet.userDTO; + +public enum Provider { + LOCAL, GOOGLE +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/Rn_Who_AccId_Column.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/Rn_Who_AccId_Column.java new file mode 100644 index 0000000..0c97887 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/Rn_Who_AccId_Column.java @@ -0,0 +1,76 @@ +package com.realnet.userDTO; + +import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.annotation.LastModifiedDate; +import org.springframework.data.jpa.domain.support.AuditingEntityListener; + +import javax.persistence.*; +import java.io.Serializable; +import java.util.Date; + +@MappedSuperclass +@EntityListeners(AuditingEntityListener.class) +public class Rn_Who_AccId_Column implements Serializable { + private static final long serialVersionUID = 1L; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "CREATED_AT", nullable = false, updatable = false) + @CreatedDate + private Date createdAt; + + // @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime createdAt; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "UPDATED_AT", nullable = false) + @LastModifiedDate + private Date updatedAt; + + @Column(name = "CREATED_BY", updatable = false) + private Long createdBy; + + @Column(name = "UPDATED_BY") + private Long updatedBy; + + @Column(name = "ACCOUNT_ID") + private Long accountId; + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Long getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(Long createdBy) { + this.createdBy = createdBy; + } + + public Long getUpdatedBy() { + return updatedBy; + } + + public void setUpdatedBy(Long updatedBy) { + this.updatedBy = updatedBy; + } + + public Long getAccountId() { + return accountId; + } + + public void setAccountId(Long accountId) { + this.accountId = accountId; + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/Rn_Who_Columns.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/Rn_Who_Columns.java new file mode 100644 index 0000000..98cec7c --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/Rn_Who_Columns.java @@ -0,0 +1,60 @@ +package com.realnet.userDTO; + +import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.annotation.LastModifiedDate; +import org.springframework.data.jpa.domain.support.AuditingEntityListener; + +import javax.persistence.*; +import java.io.Serializable; +import java.util.Date; + +@MappedSuperclass +@EntityListeners(AuditingEntityListener.class) +public class Rn_Who_Columns implements Serializable { + private static final long serialVersionUID = 1L; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "CREATED_AT", nullable = false, updatable = false) + @CreatedDate + private Date createdAt; + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "UPDATED_AT", nullable = false) + @LastModifiedDate + private Date updatedAt; + @Column(name = "CREATED_BY", updatable = false) + private Long createdBy; + @Column(name = "UPDATED_BY") + private Long updatedBy; + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Long getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(Long createdBy) { + this.createdBy = createdBy; + } + + public Long getUpdatedBy() { + return updatedBy; + } + + public void setUpdatedBy(Long updatedBy) { + this.updatedBy = updatedBy; + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/Role.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/Role.java new file mode 100644 index 0000000..c3740f7 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/Role.java @@ -0,0 +1,59 @@ +package com.realnet.userDTO; + +import java.util.Set; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +@AllArgsConstructor +@NoArgsConstructor +@Getter +@Setter +public class Role { + private Long id; + + private String name; + + private String description; + + private Set users; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public Set getUsers() { + return users; + } + + public void setUsers(Set users) { + this.users = users; + } + + + + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/RoleUpdateDto.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/RoleUpdateDto.java new file mode 100644 index 0000000..aaac0fe --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/RoleUpdateDto.java @@ -0,0 +1,36 @@ +package com.realnet.userDTO; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class RoleUpdateDto { + + private Long userId; + + private String[] roles; + + public Long getUserId() { + return userId; + } + + public RoleUpdateDto setUserId(Long userId) { + this.userId = userId; + return this; + } + + public String[] getRoles() { + return roles; + } + + public RoleUpdateDto setRoles(String[] roles) { + this.roles = roles; + return this; + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/Sys_Accounts.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/Sys_Accounts.java new file mode 100644 index 0000000..c0e9989 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/Sys_Accounts.java @@ -0,0 +1,23 @@ +package com.realnet.userDTO; + +import java.util.List; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + +@Data +@ToString(exclude="users") +@EqualsAndHashCode(callSuper=false) +public class Sys_Accounts { + private Long id; + + private String companyName; + + private String workspace; + + private String gstNumber; + + private List users; + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/User.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/User.java new file mode 100644 index 0000000..91b1fa5 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/User.java @@ -0,0 +1,98 @@ +package com.realnet.userDTO; + +import java.util.Set; + +import lombok.AllArgsConstructor; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + +//@Data +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@ToString(exclude = "sys_account") +@EqualsAndHashCode(callSuper = false) +public class User extends Rn_Who_Columns { // implements Comparable + /** + * + */ + private static final long serialVersionUID = 1L; + + + private Long userId; + + private String firstName; + + private String lastName; + + private String fullName; + + private String email; + + private String username; + + private String password; + + // added = 7.12.20 + private int menu_group_id; + + private String status; // for invitation + + private String department; + + private String about; + private String photos; + + private String role; + + // private String company; + + private int securityProviderId; + + private int defaultCustomerId; + + private String phone; + + private String address1; + + private String address2; + private String country; + + private String postal; + + private boolean enabled; + private boolean isBlocked; + private String secretQuestion; + private String secretAnswer; + private boolean enableBetaTesting; + private boolean enableRenewal; + private String pancard; + + private String working; + + private String managing_work; + + private Long checknumber; + + private Provider provider; + + private Set roles; + + + private Sys_Accounts sys_account; + + +// public void setChecknumber(long nextLong) { +// this.checknumber=nextLong; +// +// } + +// @Column(name = "Accounts_id") +// private int account_id; + + +} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/UserDto.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/UserDto.java new file mode 100644 index 0000000..3b0a0fc --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/UserDto.java @@ -0,0 +1,26 @@ +package com.realnet.userDTO; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; +import java.util.Set; + +@Data +public class UserDto implements Serializable { + private static final long serialVersionUID = 1L; +// private String username; +// private String password; + private String firstName; + private String lastName; + private String password; + private String email; + private String fullName; + private String department; + private int menuGroupId; + @JsonIgnore + private String phone; + @JsonIgnore + private Set roles; + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/UserProfileDTO.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/UserProfileDTO.java new file mode 100644 index 0000000..8f64f14 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userDTO/UserProfileDTO.java @@ -0,0 +1,21 @@ +package com.realnet.userDTO; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class UserProfileDTO implements Serializable { + /** + * + */ + private static final long serialVersionUID = 1L; + + private String fullName; + private String pronounce; + private String role; + private String department; + private String about; + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userlist/controller/UserListController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userlist/controller/UserListController.java new file mode 100644 index 0000000..6c3eed5 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userlist/controller/UserListController.java @@ -0,0 +1,175 @@ +package com.realnet.userlist.controller; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.util.List; +import java.util.Optional; +import java.util.zip.DataFormatException; +import java.util.zip.Deflater; +import java.util.zip.Inflater; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.http.ResponseEntity.BodyBuilder; +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +import com.realnet.userlist.entity.UserImage; +import com.realnet.userlist.entity.UserList; +import com.realnet.userlist.repository.UserImageRepository; +import com.realnet.userlist.service.UserListService; + +import io.swagger.annotations.Api; + +@RestController +@CrossOrigin(origins = "http://localhost:4200", maxAge = 3600) +//@CrossOrigin("*") +@RequestMapping(value = "/user_list", produces=org.springframework.http.MediaType.APPLICATION_JSON_VALUE) +@Api(tags = {"/user_list"}) +public class UserListController { + + @Autowired + private UserImageRepository userImageRepository; + + @Autowired + private UserListService userListService; + + @PostMapping("/create") + public ResponseEntity add(@RequestBody UserList user){ + UserList addToDb = this.userListService.addToDb(user); + return ResponseEntity.ok(addToDb); + } + + @PutMapping("/update") + public ResponseEntity update(@RequestBody UserList user){ + UserList updateToDb = this.userListService.updateToDb(user); + return ResponseEntity.ok(updateToDb); + } + + @GetMapping("/get-one/{id}") + public ResponseEntity getOne(@PathVariable("id") Long id){ + UserList oneById = this.userListService.getOneById(id); + return ResponseEntity.ok(oneById); + } + + @GetMapping("/get-all") + public List getAll(){ + List allFromDb = this.userListService.getAllFromDb(); + return allFromDb; + } + + @DeleteMapping("/delete/{id}") + public void delete(@PathVariable("id") Long id) { + System.out.println("Request came to delete API.."); + + // parsing Long value into String and then call get image by user's id API. + String rawId = String.valueOf(id); + Optional findByUser = this.userImageRepository.findByUser(rawId); + + // delete users image before deleting user. + this.userImageRepository.deleteById(findByUser.get().getId()); + + // delete user after deleting profile image. + this.userListService.deleteFromDbById(id); + } + + @PostMapping("/upload") + public BodyBuilder uplaodImage(@RequestParam("imageFile") MultipartFile file, + @RequestParam("user_id") Long user_id) throws IOException { + + System.out.println("Original Image Byte Size - " + file.getBytes().length); + UserImage file1 = new UserImage(file.getOriginalFilename(), file.getContentType(), + compressBytes(file.getBytes())); + + file1.setFilename(file.getOriginalFilename()); + file1.setType(file.getContentType()); + file1.setUser_id(String.valueOf(user_id)); + + this.userImageRepository.save(file1); + return ResponseEntity.status(HttpStatus.OK); + } + + @GetMapping("/get/{user}") + public UserImage getImage(@PathVariable("user") Integer user_id) throws Exception { + + System.out.println("Id of User is: " + user_id); + String rawId = String.valueOf(user_id); + + Optional retrievedImage = null; + try { + retrievedImage = userImageRepository.findByUser(rawId); + } catch (Exception e) { + System.out.println("No image found for this user"); + } + +// if(retrievedImage == null) { +// throw new Exception("No image found for this user"); +// } + UserImage img = new UserImage(retrievedImage.get().getFilename(), retrievedImage.get().getType(), + decompressBytes(retrievedImage.get().getPicByte())); + return img; + } + +// @GetMapping("/get/{imageName}") +// public UserImage getImage(@PathVariable("imageName") String imageName) throws IOException { +// +// System.out.println("Name of file is: " + imageName); +// +// final Optional retrievedImage = userImageRepository.findByFilename(imageName); +// UserImage img = new UserImage(retrievedImage.get().getFilename(), retrievedImage.get().getType(), +// decompressBytes(retrievedImage.get().getPicByte())); +// return img; +// } +// + // compress the image bytes before storing it in the database + public static byte[] compressBytes(byte[] data) { + Deflater deflater = new Deflater(); + deflater.setInput(data); + deflater.finish(); + + ByteArrayOutputStream outputStream = new ByteArrayOutputStream(data.length); + byte[] buffer = new byte[1024]; + while (!deflater.finished()) { + int count = deflater.deflate(buffer); + outputStream.write(buffer, 0, count); + } + try { + outputStream.close(); + } catch (IOException e) { + } + System.out.println("Compressed Image Byte Size - " + outputStream.toByteArray().length); + + return outputStream.toByteArray(); + } + + // uncompress the image bytes before returning it to the angular application + public static byte[] decompressBytes(byte[] data) { + Inflater inflater = new Inflater(); + inflater.setInput(data); + ByteArrayOutputStream outputStream = new ByteArrayOutputStream(data.length); + byte[] buffer = new byte[1024]; + try { + while (!inflater.finished()) { + int count = inflater.inflate(buffer); + outputStream.write(buffer, 0, count); + } + outputStream.close(); + } catch (IOException ioe) { + } catch (DataFormatException e) { + } + return outputStream.toByteArray(); + } + + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userlist/entity/UserImage.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userlist/entity/UserImage.java new file mode 100644 index 0000000..acc7000 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userlist/entity/UserImage.java @@ -0,0 +1,89 @@ +package com.realnet.userlist.entity; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.ManyToOne; +import javax.persistence.Table; + +@Entity +@Table(name = "user_image") +public class UserImage { + + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private Long id; + private String filename; + private String type; + private String user; + + @Column(name = "picByte", length = 5000) + private byte[] picByte; + +// @ManyToOne(fetch = FetchType.EAGER) +// private UserList userlist; + + public UserImage() { + + } + + public UserImage(String name, String type, byte[] picByte) { + this.filename = name; + this.type = type; + this.picByte = picByte; + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getFilename() { + return filename; + } + + public void setFilename(String filename) { + this.filename = filename; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getUser_id() { + return user; + } + + public void setUser_id(String user_id) { + this.user = user_id; + } + + public byte[] getPicByte() { + return picByte; + } + + public void setPicByte(byte[] picByte) { + this.picByte = picByte; + } + +// public UserList getUserlist() { +// return userlist; +// } +// +// public void setUserlist(UserList userlist) { +// this.userlist = userlist; +// } + +// + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userlist/entity/UserList.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userlist/entity/UserList.java new file mode 100644 index 0000000..1771acf --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userlist/entity/UserList.java @@ -0,0 +1,411 @@ +package com.realnet.userlist.entity; + +import java.util.ArrayList; +import java.util.List; + +import javax.persistence.CascadeType; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.OneToMany; +import javax.persistence.Table; + +import com.fasterxml.jackson.annotation.JsonIgnore; + +@Entity +@Table(name = "user_list") +public class UserList { + + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private Long id; + + private String user_id; + private String name; + private String gender; + private String dob; + private String email; + private String username; + private String password; + private String firstname; + private String lastname; + private String security_provider_id; + private String default_customer_id; + private String company; + private String phone; + private String address1; + private String address2; + private String country; + private String postal; + private String role; + private String other_roles; + private boolean is_active; + private boolean is_blocked; + private String secret_question; + private String secret_answer; + private boolean enable_beta_testing; + private boolean enable_renewal; + private String created_at; + private String created_by; + private String updated_at; + private String updated_by; + private String about; + private String department; + private String fullname; + private String photos; + private String status; + private String account_id; + private String checknumber; + private String managing_work; + private String pancard; + private String working; + private int menu_group; + +// @OneToMany(mappedBy = "userlist", cascade = CascadeType.ALL, fetch = FetchType.LAZY) +// @JsonIgnore +// private List img = new ArrayList<>(); + + public UserList() {} + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + + public int getMenu_group() { + return menu_group; + } + + public void setMenu_group(int menu_group) { + this.menu_group = menu_group; + } + + public String getUser_id() { + return user_id; + } + + public void setUser_id(String user_id) { + this.user_id = user_id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getGender() { + return gender; + } + + public void setGender(String gender) { + this.gender = gender; + } + + public String getDob() { + return dob; + } + + public void setDob(String dob) { + this.dob = dob; + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getFirstname() { + return firstname; + } + + public void setFirstname(String firstname) { + this.firstname = firstname; + } + + public String getLastname() { + return lastname; + } + + public void setLastname(String lastname) { + this.lastname = lastname; + } + + public String getSecurity_provider_id() { + return security_provider_id; + } + + public void setSecurity_provider_id(String security_provider_id) { + this.security_provider_id = security_provider_id; + } + + public String getDefault_customer_id() { + return default_customer_id; + } + + public void setDefault_customer_id(String default_customer_id) { + this.default_customer_id = default_customer_id; + } + + public String getCompany() { + return company; + } + + public void setCompany(String company) { + this.company = company; + } + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public String getAddress1() { + return address1; + } + + public void setAddress1(String address1) { + this.address1 = address1; + } + + public String getAddress2() { + return address2; + } + + public void setAddress2(String address2) { + this.address2 = address2; + } + + public String getCountry() { + return country; + } + + public void setCountry(String country) { + this.country = country; + } + + public String getPostal() { + return postal; + } + + public void setPostal(String postal) { + this.postal = postal; + } + + public String getRole() { + return role; + } + + public void setRole(String role) { + this.role = role; + } + + public String getOther_roles() { + return other_roles; + } + + public void setOther_roles(String other_roles) { + this.other_roles = other_roles; + } + + public boolean isIs_active() { + return is_active; + } + + public void setIs_active(boolean is_active) { + this.is_active = is_active; + } + + public boolean isIs_blocked() { + return is_blocked; + } + + public void setIs_blocked(boolean is_blocked) { + this.is_blocked = is_blocked; + } + + public String getSecret_question() { + return secret_question; + } + + public void setSecret_question(String secret_question) { + this.secret_question = secret_question; + } + + public String getSecret_answer() { + return secret_answer; + } + + public void setSecret_answer(String secret_answer) { + this.secret_answer = secret_answer; + } + + public boolean isEnable_beta_testing() { + return enable_beta_testing; + } + + public void setEnable_beta_testing(boolean enable_beta_testing) { + this.enable_beta_testing = enable_beta_testing; + } + + public boolean isEnable_renewal() { + return enable_renewal; + } + + public void setEnable_renewal(boolean enable_renewal) { + this.enable_renewal = enable_renewal; + } + + public String getCreated_at() { + return created_at; + } + + public void setCreated_at(String created_at) { + this.created_at = created_at; + } + + public String getCreated_by() { + return created_by; + } + + public void setCreated_by(String created_by) { + this.created_by = created_by; + } + + public String getUpdated_at() { + return updated_at; + } + + public void setUpdated_at(String updated_at) { + this.updated_at = updated_at; + } + + public String getUpdated_by() { + return updated_by; + } + + public void setUpdated_by(String updated_by) { + this.updated_by = updated_by; + } + + public String getAbout() { + return about; + } + + public void setAbout(String about) { + this.about = about; + } + + public String getDepartment() { + return department; + } + + public void setDepartment(String department) { + this.department = department; + } + + public String getFullname() { + return fullname; + } + + public void setFullname(String fullname) { + this.fullname = fullname; + } + + public String getPhotos() { + return photos; + } + + public void setPhotos(String photos) { + this.photos = photos; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getAccount_id() { + return account_id; + } + + public void setAccount_id(String account_id) { + this.account_id = account_id; + } + + public String getChecknumber() { + return checknumber; + } + + public void setChecknumber(String checknumber) { + this.checknumber = checknumber; + } + + public String getManaging_work() { + return managing_work; + } + + public void setManaging_work(String managing_work) { + this.managing_work = managing_work; + } + + public String getPancard() { + return pancard; + } + + public void setPancard(String pancard) { + this.pancard = pancard; + } + + public String getWorking() { + return working; + } + + public void setWorking(String working) { + this.working = working; + } + +// public List getImg() { +// return img; +// } +// +// public void setImg(List img) { +// this.img = img; +// } + + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userlist/repository/UserImageRepository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userlist/repository/UserImageRepository.java new file mode 100644 index 0000000..7f89bf5 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userlist/repository/UserImageRepository.java @@ -0,0 +1,17 @@ +package com.realnet.userlist.repository; + +import java.util.Optional; + +import org.springframework.data.jpa.repository.JpaRepository; + +import com.realnet.userlist.entity.UserImage; + +public interface UserImageRepository extends JpaRepository { + + Optional findByid(String user_id); + + Optional findByFilename(String filename); + + Optional findByUser(String user); + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userlist/repository/UserListRepository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userlist/repository/UserListRepository.java new file mode 100644 index 0000000..cc876a5 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userlist/repository/UserListRepository.java @@ -0,0 +1,9 @@ +package com.realnet.userlist.repository; + +import org.springframework.data.jpa.repository.JpaRepository; + +import com.realnet.userlist.entity.UserList; + +public interface UserListRepository extends JpaRepository { + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userlist/service/UserListService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userlist/service/UserListService.java new file mode 100644 index 0000000..dd4cdb7 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userlist/service/UserListService.java @@ -0,0 +1,20 @@ +package com.realnet.userlist.service; + +import java.util.List; + +import com.realnet.userlist.entity.UserList; + + +public interface UserListService { + + public UserList addToDb(UserList userList); + + public UserList updateToDb(UserList userList); + + public UserList getOneById(Long id); + + public List getAllFromDb(); + + public void deleteFromDbById(Long id); + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userlist/service/impl/UserListServiceImpl.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userlist/service/impl/UserListServiceImpl.java new file mode 100644 index 0000000..0c61f13 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/userlist/service/impl/UserListServiceImpl.java @@ -0,0 +1,49 @@ +package com.realnet.userlist.service.impl; + +import java.util.List; +import java.util.Optional; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.realnet.userlist.entity.UserList; +import com.realnet.userlist.repository.UserListRepository; +import com.realnet.userlist.service.UserListService; + +@Service +public class UserListServiceImpl implements UserListService { + + @Autowired + private UserListRepository userListRepository; + + @Override + public UserList addToDb(UserList userList) { + UserList save = this.userListRepository.save(userList); + return save; + } + + @Override + public UserList updateToDb(UserList userList) { + UserList save = this.userListRepository.save(userList); + return save; + } + + @Override + public UserList getOneById(Long id) { + Optional findById = this.userListRepository.findById(id); + return findById.get(); + } + + @Override + public List getAllFromDb() { + List findAll = this.userListRepository.findAll(); + return findAll; + } + + @Override + public void deleteFromDbById(Long id) { + this.userListRepository.deleteById(id); + System.out.println("Deletion success..."); + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/controller/RoleController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/controller/RoleController.java new file mode 100644 index 0000000..5b9b023 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/controller/RoleController.java @@ -0,0 +1,138 @@ +package com.realnet.users.controller; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.users.entity.Role; +import com.realnet.users.repository.RoleRepo; +import com.realnet.users.service.RoleService; +import com.realnet.users.service1.AppUserService; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@RestController +@RequestMapping(value = "/api") // , produces = MediaType.APPLICATION_JSON_VALUE) +@Api(tags = { "Role Assignment" }) +public class RoleController { + + @Autowired(required=false) + private AppUserService userService; + + @Autowired + private RoleService roleService; + + @Autowired + private RoleRepo roleRepo; + + // GET profile details + @ApiOperation(value = "Gets All Roles", response = Role.class) + @GetMapping("/roles") + public ResponseEntity getAllRoles(@RequestParam(value = "page", defaultValue = "0", required = false) Integer page, + @RequestParam(value = "size", defaultValue = "20", required = false) Integer size) { + //Pageable paging = PageRequest.of(page, size, Sort.by("created_at").descending()); + //Page result = roleService.getAll(paging); + List roles = roleService.getRoles(); + return ResponseEntity.ok().body(roles); + } + + // GET USER BY ID ADDED BY ADMIN + @ApiOperation(value = "Get Roles Id", response = Role.class) + @GetMapping("/roles/{id}") + public ResponseEntity getRolesById(@PathVariable(value = "id") Long id) { + Role role = roleService.getRoleById(id); + return ResponseEntity.ok().body(role); + } + + /* ========WORKING CODE ======= */ + // add or remove a Role on a user + @GetMapping("org-users/{id}/add-roles/{roleId}") + public ResponseEntity addRole(@PathVariable("id") Long id, @PathVariable("roleId") Long roleId) { + roleService.addRole(id, roleId); + Map res = new HashMap(); + res.put("message", "Role Added Succcessfully"); + return ResponseEntity.ok(res); + } + + @GetMapping("org-users/{id}/remove-roles/{roleId}") + public ResponseEntity removeRole(@PathVariable("id") Long id, @PathVariable("roleId") Long roleId) { + roleService.removeRole(id, roleId); + Map res = new HashMap(); + res.put("message", "Role removed Succcessfully"); + return ResponseEntity.ok(res); + } + +// ADD NEW ROLE + @PostMapping("/roles") + public ResponseEntity add(@RequestBody Role role) { + Role save = roleRepo.save(role); + + return ResponseEntity.ok(save); + } + + // =================================== + +// @ApiOperation(value = "Assign roles to an user", response = ServiceResponse.class) +// @ApiResponses(value = { +// @ApiResponse(code = 200, message = "Roles successfully assigned to user!"), //response = UserResponse.class), +// @ApiResponse(code = 401, message = Constants.UNAUTHORIZED_MESSAGE), //response = BadRequestResponse.class), +// @ApiResponse(code = 403, message = Constants.FORBIDDEN_MESSAGE), //response = BadRequestResponse.class), +// @ApiResponse(code = 422, message = Constants.INVALID_DATA_MESSAGE) //, response = InvalidDataResponse.class), +// }) +// @PreAuthorize("hasRole('ROLE_ADMIN')") +// @PutMapping("/assign") +// public ResponseEntity assignRoles(@Valid @RequestBody RoleUpdateDto roleUpdateDto) { +// User user = userService.getById(roleUpdateDto.getUserId()); +// +// Arrays.stream(roleUpdateDto.getRoles()).forEach(role -> { +// Role roleObject = roleRepo.findByName(role); +// //if (roleObject != null && !user.hasRole(role)) { +// user.addRole(roleObject); +// } +// }); +// +// userService.update(user); +// +// return ResponseEntity.ok().body(user); +// } +// +// @ApiOperation(value = "Assign roles to an user", response = ServiceResponse.class) +// @ApiResponses(value = { +// @ApiResponse(code = 200, message = "Roles successfully assigned to user!"), // response = UserResponse.class), +// @ApiResponse(code = 401, message = Constants.UNAUTHORIZED_MESSAGE), // response = BadRequestResponse.class), +// @ApiResponse(code = 403, message = Constants.FORBIDDEN_MESSAGE), //response = BadRequestResponse.class), +// @ApiResponse(code = 422, message = Constants.INVALID_DATA_MESSAGE)//, response = InvalidDataResponse.class), +// }) +// @PreAuthorize("hasRole('ROLE_ADMIN')") +// @PutMapping("/revoke") +// public ResponseEntity revokeRoles(@Valid @RequestBody RoleUpdateDto roleUpdateDto) { +// User user = userService.findById(roleUpdateDto.getUserId()); +// +// Arrays.stream(roleUpdateDto.getRoles()).forEach(role -> { +// Role roleObject = roleService.findByName(role); +// +// if (roleObject != null && user.hasRole(role)) { +// user.removeRole(roleObject); +// } +// }); +// +// userService.update(user); +// +// return ResponseEntity.ok().body(user); +// } +//} + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/controller/UserController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/controller/UserController.java new file mode 100644 index 0000000..d000651 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/controller/UserController.java @@ -0,0 +1,448 @@ +package com.realnet.users.controller; + +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.util.Base64; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; + +import javax.servlet.http.HttpServletRequest; +import javax.validation.Valid; + +import org.apache.commons.io.FilenameUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +import com.realnet.config.EmailService; +import com.realnet.fnd.service.FileStorageService; +import com.realnet.users.entity.PasswordResetRequest; +import com.realnet.users.entity.PasswordResetToken; +import com.realnet.users.entity.Sys_Accounts; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.repository1.AppUserRepository; +import com.realnet.users.repository1.passwordTokenRepository; +import com.realnet.users.response.MessageResponse; +import com.realnet.users.service1.AppUserServiceImpl; +import com.realnet.utils.Port_Constant; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@RestController +@RequestMapping(value = "/api") // , produces = MediaType.APPLICATION_JSON_VALUE) +@Api(tags = { "User Mnagement" }) +public class UserController { + + @Autowired + private AppUserServiceImpl userService; + @Autowired + private AppUserRepository appUserRepository; + + @Autowired + private BCryptPasswordEncoder bcryptEncoder; + + @Autowired + private passwordTokenRepository passwordTokenRepository; + + @Autowired + private FileStorageService fileStorageService; + + private EmailService emailService; + + @Autowired + public UserController(AppUserServiceImpl appUserServiceImpl, EmailService emailService) { + super(); + this.emailService = emailService; + } + + @Value("${projectPath}") + private String projectPath; + + // GET profile details (ADMIN, USER BOTH, WHO IS LOGGED IN) + @ApiOperation(value = "Gets current user information", response = AppUser.class) + @GetMapping("/user-profile") + public ResponseEntity getUserProfile() { + AppUser user = userService.getLoggedInUser(); + return ResponseEntity.ok().body(user); + } + + // UPDATE (ADMIN, USER BOTH, WHO IS LOGGED IN) +// @ApiOperation(value = "Update current user information", response = User.class) +// @PutMapping("/user-profile") +// public ResponseEntity updateUserProfile(@Valid @RequestBody UserProfileDTO userRequest) { +// String loggedInUserEmail = userService.getLoggedInUserEmail(); +// AppUser user = userService.updateAppUserDto(userRequest); +// return new ResponseEntity<>(user, HttpStatus.ACCEPTED); +// } + + // UPLOAD IMAGE + @PostMapping("/upload") + public ResponseEntity uploadProfilePic(@RequestParam("imageFile") MultipartFile file) throws IOException { + AppUser user = userService.getLoggedInUser(); + // String userId = Long.toString(user.getUserId()); + String userId = String.valueOf(user.getUserId()); + System.out.println("USER ID = " + userId); + // String uploadPath = + // projectPath.concat("/src/main/resources/uploaded-picture/" + userId + "/"); + String uploadPath = projectPath.concat("/src/main/resources/uploaded-picture/"); + System.out.println("UPLOAD PATH = " + uploadPath); + + fileStorageService.uploadProfilePicture(file, uploadPath); + + String fileName = file.getOriginalFilename(); + // String head = fileName.substring(0, fileName.indexOf(".")); + String ext = fileName.substring(fileName.lastIndexOf(".")); + String fileNewName = "profile-pic-" + userId + ext; + + System.out.println( + "UPLOAD PATH = " + uploadPath + "\nFILE NAME = " + fileNewName + "\nFile Size = " + file.getSize()); + user.setPhotoName(fileNewName); + boolean success = userService.insertOrSaveUser(user); + Map res = new HashMap(); + if (success) { + res.put("success", success); + return new ResponseEntity<>(res, HttpStatus.OK); + } else { + res.put("success", success); + return new ResponseEntity<>(res, HttpStatus.BAD_REQUEST); + } + } + + // GET IMAGE + @GetMapping("/retrieve-image") + public ResponseEntity getProfilePic() { + AppUser user = userService.getLoggedInUser(); + String imageName = user.getPhotoName(); + String imagePath = System.getProperty("java.io.tmpdir") + System.getProperty("file.separator") + imageName; + File file = new File(imagePath); + Map res = new HashMap(); + + String encodeBase64 = null; + try { + String ext = FilenameUtils.getExtension(file.getName()); + FileInputStream fis = new FileInputStream(file); + // byte[] media = IOUtils.toByteArray(fis); + byte[] bytes = new byte[(int) file.length()]; + fis.read(bytes); + encodeBase64 = Base64.getEncoder().encodeToString(bytes); + String data = "data:/image/" + ext + ";base64," + encodeBase64; + fis.close(); + res.put("image", data); + return new ResponseEntity<>(res, HttpStatus.OK); + } catch (IOException e) { + log.debug("File Not Found Exception Handled: {}", e.getMessage()); + res.put("image", "Not Found"); + return new ResponseEntity<>(res, HttpStatus.NOT_FOUND); + } + } + + // ====================USER ACCOUNT DETAILS================ + // ########## NEED MOD ########## + // GET ADMIN profile details (admin accounts) + @ApiOperation(value = "Get User Account Details", response = Sys_Accounts.class) + @GetMapping("/user-account") + public ResponseEntity getUserAccountDetails() { + AppUser user = userService.getLoggedInUser(); + Sys_Accounts sys_account = user.getAccount(); + System.out.println("Company Details : " + sys_account); + return ResponseEntity.ok().body(sys_account); + } + + // =========== reset password ============= + @ApiOperation(value = "Reset Password", response = PasswordResetRequest.class) + @PostMapping("/reset-password") + public ResponseEntity resetPassword(@Valid @RequestBody PasswordResetRequest passwordResetReq) { + AppUser reset = userService.resetPassword(passwordResetReq.getUserId(), passwordResetReq.getHash(), + passwordResetReq.getNewPassword()); + System.out.println("resetPassword() Controller : RESET ? " + reset); + Map res = new HashMap(); + if (reset != null) { + res.put("reset", reset); + return new ResponseEntity<>(res, HttpStatus.ACCEPTED); + } else { + res.put("reset", reset); + return new ResponseEntity<>(res, HttpStatus.BAD_REQUEST); + } + } +// new Reset password +// by Gaurav + + @ApiOperation(value = "Reset Password", response = PasswordResetRequest.class) + @PostMapping("/reset_password") + public ResponseEntity resetPasswordnew(@Valid @RequestBody PasswordResetRequest passwordResetReq) { + AppUser reset = userService.resetPasswordnew(passwordResetReq); + System.out.println("resetPassword() Controller : RESET ? " + reset); + Map res = new HashMap(); + if (reset != null) { + res.put("reset", reset); + return new ResponseEntity<>(res, HttpStatus.ACCEPTED); + } else { + res.put("reset", reset); + return new ResponseEntity<>(res, HttpStatus.BAD_REQUEST); + } + } + + @ApiOperation(value = "Forgot password", response = PasswordResetRequest.class) + @PostMapping("/forgot_password") + public ResponseEntity forgotpassword(@Valid @RequestBody PasswordResetRequest passwordResetReq) { + AppUser reset = userService.forgotpassword(passwordResetReq); + System.out.println("resetPassword() Controller : RESET ? " + reset); + Map res = new HashMap(); + if (reset != null) { + res.put("reset", reset); + return new ResponseEntity<>(res, HttpStatus.ACCEPTED); + } else { + res.put("reset", reset); + return new ResponseEntity<>(res, HttpStatus.BAD_REQUEST); + } + } + +// Reset password by email sending + @PostMapping("/resources/forgotpassword") + public ResponseEntity resetPassword(HttpServletRequest request, @RequestParam("email") String email) { + AppUser user = userService.findUserByEmail(email); + if (user == null) { + return ResponseEntity.badRequest().body(new MessageResponse(email + " not found")); + } else { + String token = UUID.randomUUID().toString(); + userService.createPasswordResetTokenForUser(user, token); + + String em = user.getEmail(); + String subject = "Pass reset"; + String url = "http://" + Port_Constant.LOCAL_HOST + ":" + Port_Constant.FRONTEND_PORT_9191 + + "/#/forgotresetpassword/" + token; + // String url = "http://surecns.ml:30165/#/forgotresetpassword/" + token; +// String url = "http://localhost:9191/api" + "/resources/savePassword/" + token; + emailService.constructEmail(em, subject, url); + return new ResponseEntity<>("Email sent success", HttpStatus.OK); + } + + } + + // get email save link + @PostMapping("/resources/savePassword/{token}") + public ResponseEntity savePassword(@PathVariable String token, + @Valid @RequestBody PasswordResetRequest passwordResetReq) { + + PasswordResetToken resetToken = passwordTokenRepository.findByToken(token); + if (resetToken == null) { + return ResponseEntity.badRequest().body(new MessageResponse("Token expire")); + } + +// AppUser a = appUserRepository.findById(resetToken.getUser().getUserId()).orElse(null); + AppUser a = appUserRepository.findByEmail(resetToken.getUser().getEmail()); + + if (a != null) { + + if (passwordResetReq.getNewPassword().equals(passwordResetReq.getConfirmPassword())) { + + a.setUserPassw(bcryptEncoder.encode(passwordResetReq.getNewPassword())); + a.setPwdChangedCnt(a.getPwdChangedCnt() != null ? (long) 1 + a.getPwdChangedCnt() : (long) 1); + a.setLastPwdChangedDate(new Date()); + a.setChangePassw(passwordResetReq.getNewPassword()); + + appUserRepository.save(a); + passwordTokenRepository.delete(resetToken); + return new ResponseEntity<>(a, HttpStatus.OK); + } + return ResponseEntity.badRequest().body(new MessageResponse("password and confirm password not match")); + } + return ResponseEntity.badRequest().body(new MessageResponse("user not found")); + } + +// String result = userService.validatePasswordResetToken(token); +// +// +// if(result != null) { +// return null; +// } +// AppUser reset = userService.forgotpassword(passwordResetReq); +// System.out.println("resetPassword() Controller : RESET ? " + reset); +// Map res = new HashMap(); +// if (reset!=null) { +// res.put("reset", reset); +// return new ResponseEntity<>(res, HttpStatus.ACCEPTED); +// } else { +// res.put("reset", reset); +// return new ResponseEntity<>(res, HttpStatus.BAD_REQUEST); +// } + +// } + +// AppUser user = userService.getUserByPasswordResetToken(token); +// +// +//// AppUser user = userService.getUserByPasswordResetToken(passwordDto.getToken()); +// if(user != null) { +// userService.changeUserPassword(user, passwordDto.getNewPassword()); +// +// } +// +// return new ResponseEntity<>(user,HttpStatus.OK); +// } + + @GetMapping("/get-one/{userId}") + public ResponseEntity getOne(@PathVariable("userId") Long userId) { + AppUser byId = this.userService.getById(userId).orElse(null); + return ResponseEntity.ok(byId); + } + // ############=== NEED MODIFICATION ========###### + + // GET profile details (user ADDED BY ADMIN) +// @ApiOperation(value = "Get Company User Details", response = User.class) +// @GetMapping("/org-users") +// public ResponseEntity getUsersByAccount(@RequestParam(value = "page", defaultValue = "0", required = false) Integer page, +// @RequestParam(value = "size", defaultValue = "20", required = false) Integer size) { +// AppUser adminUser = userService.getLoggedInUser(); +// // Sys_Accounts Sys_Account = adminUser.getCompany(); +// Sys_Accounts sys_account = adminUser.getSys_account(); +//// Long account_id = Sys_Account.getId(); +// +//// List users = userService.getUsersByAccountId(account_id); +// // OR +//// Sys_Accounts company = companyService.getById(account_id); +//// List users = company.getUsers(); +// System.out.println("Company Details : " + sys_account); +// Long accId = adminUser.getSys_account().getId(); +// Pageable paging = PageRequest.of(page, size, Sort.by("created_at").descending()); +// +// // invited user list will show here +// List invitedUsers = userRepo.findByAccountIdAndStatus(accId, UserConstant.STATUS_INVITED, paging); +// +// +// return ResponseEntity.ok().body(invitedUsers); +// } + + // GET USER BY ID (ADDED BY ADMIN) +// @ApiOperation(value = "Get Company User By Id", response = User.class) +// @GetMapping("/org-users/{id}") +// public ResponseEntity getUserById(@PathVariable(value = "id") Long id) { +// User user = userService.getById(id); +// if (user == null) { +// throw new ResourceNotFoundException("User Not Found ::" + id); +// } +// return ResponseEntity.ok().body(user); +// } + + // SAVE A USER BY ADMIN +// @ApiOperation(value = "Add A New Company User", response = User.class) +// @PostMapping("/org-users") +// public ResponseEntity createUser(@Valid @RequestBody User userReq) throws MessagingException, IOException { +// +// // admin will invite and create user with default value +// User user = userService.createUserByAdmin(userReq); +// +// // ====EMAIL CODE==== +// User admin = userService.getLoggedInUser(); +// String from = admin.getEmail(); // from is not working +// String to = userReq.getEmail(); +// String subject = "Invitation To Collaborate"; +// String text = "Dear " + userReq.getFirstName() + ",
" + "You have an Invitation from " +// + admin.getFullName() + ". Please Follow the steps below.
" +// + "1. Log on to https://localhost:4200/login
" +// + "2. Log on to the system with the following User Name and Password.
" +// + "3. User Name : " + userReq.getEmail() + " Password : " + userReq.getPassword() + "
" +// + "4. Change the existing system generated password and coninue."; +//// try { +//// //emailService.sendSimpleMessage(from, to, subject, text); +//// } catch (MailException mailException) { +//// System.out.println(mailException); +//// } +// emailService.sendEmailWithAttachment(to, subject, text); +// +// return ResponseEntity.status(HttpStatus.CREATED).body(user); +// } + + // UPDATE USER ADDED BY ADMIN +// @ApiOperation(value = "Update A Company User", response = User.class) +// @PutMapping("/org-users/{id}") +// public ResponseEntity updateUser(@PathVariable(value = "id") Long id, @Valid @RequestBody User user) { +// User updatedUser = userService.updateById(id, user); +// return ResponseEntity.status(HttpStatus.ACCEPTED).body(updatedUser); +// } + + // DELETE USER ADDED BY ADMIN +// @DeleteMapping("/org-users/{id}") +// public ResponseEntity> deleteUser(@PathVariable(value = "id") Long id) { +// boolean deleted = userService.deleteById(id); +// Map response = new HashMap<>(); +// response.put("deleted", Boolean.TRUE); +// // response.put("deleted", deleted); +// return ResponseEntity.status(HttpStatus.OK).body(response); +// } +// // ==== access by admin done + +// @ApiOperation(value = "Gets current user information", response = UserResponse.class) +// @RequestMapping(value = "/user", method = RequestMethod.GET, produces = {"application/json"}) +// public UserResponse getUserInformation(@RequestParam(value = "name", required = false) String userIdParam, HttpServletRequest req) { +// +// String loggedInUserName = userService.getLoggedInUserName(); +// +// User user; +// boolean provideUserDetails = false; +// +// if (Strings.isNullOrEmpty(userIdParam)) { +// provideUserDetails = true; +// user = userService.getLoggedInUser(); +// } +// else if (loggedInUserName.equals(userIdParam)) { +// provideUserDetails = true; +// user = userService.getLoggedInUser(); +// } +// else { +// //Check if the current user is superuser then provide the details of requested user +// provideUserDetails = true; +// user = userService.getUserInfoByUserId(userIdParam); +// } +// +// UserResponse resp = new UserResponse(); +// if (provideUserDetails) { +// resp.setOperationStatus(ResponseStatusEnum.SUCCESS); +// } +// else { +// resp.setOperationStatus(ResponseStatusEnum.NO_ACCESS); +// resp.setOperationMessage("No Access"); +// } +// resp.setData(user); +// return resp; +// } +// +// +// +// // @Secured({"ROLE_ADMIN", "ROLE_USER"}) +// @PreAuthorize("hasRole('ADMIN')") +// @RequestMapping(value = "/users", method = RequestMethod.GET) +// public List listUser() { +// return userService.getAll(); +// } +// +// // @Secured("ROLE_USER") +// // @PreAuthorize("hasRole('USER')") +// // @PreAuthorize("hasAnyRole('USER', 'ADMIN')") +// // @PreAuthorize("hasRole('ADMIN') && hasRole('USER')") +// @PreAuthorize("hasRole('USER')") +// @RequestMapping(value = "/users/{id}", method = RequestMethod.GET) +// public User getOne(@PathVariable(value = "id") Long id) { +// return userService.getById(id); +// } + /* + * @RequestMapping(value = "/signup", method = RequestMethod.POST) public User + * saveUser(@RequestBody UserDto user) { return userService.save(user); } + */ +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/controller1/AppUserController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/controller1/AppUserController.java new file mode 100644 index 0000000..74dc750 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/controller1/AppUserController.java @@ -0,0 +1,336 @@ +package com.realnet.users.controller1; + +import java.util.Date; +import java.util.HashSet; +import java.util.List; +import java.util.Optional; +import java.util.Set; +import java.util.UUID; + +import javax.servlet.http.HttpServletRequest; +import javax.validation.Valid; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.realnet.config.EmailService; +import com.realnet.userDTO.User; +import com.realnet.users.entity.PasswordResetRequest; +import com.realnet.users.entity.Role; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.entity1.AppUserDto; +import com.realnet.users.entity1.AppUserRole; +import com.realnet.users.entity1.Registration; +import com.realnet.users.entity1.SignUp; +import com.realnet.users.repository.RoleRepo; +import com.realnet.users.repository1.AppUserRepository; +import com.realnet.users.repository1.AppUserRoleRepository; +import com.realnet.users.response.MessageResponse; +import com.realnet.users.service1.AppUserServiceImpl; +import com.realnet.utils.Port_Constant; + +import io.swagger.annotations.ApiOperation; + +@RestController +@RequestMapping(value = "/api") +public class AppUserController { + + @Autowired + private AppUserServiceImpl userService; + @Autowired + private BCryptPasswordEncoder bcryptEncoder; + @Autowired + private AppUserRepository appUserRepository; + + @Autowired + private RoleRepo roleRepo; + @Autowired + private AppUserRoleRepository appUserRoleRepository; + + private AppUserServiceImpl appUserServiceImpl; + + @Autowired + private EmailService emailService; + + @Autowired + public AppUserController(AppUserServiceImpl appUserServiceImpl, EmailService emailService) { + super(); + this.appUserServiceImpl = appUserServiceImpl; + this.emailService = emailService; + } + +// get all active users + @GetMapping("/getAllAppUser") + public ResponseEntity getAllUsers( + @RequestParam(value = "page", defaultValue = "0", required = false) Integer page, + @RequestParam(value = "size", defaultValue = "1000", required = false) Integer size) { + Pageable p = PageRequest.of(page, size); + List u = appUserServiceImpl.getAllAppUsers(p); + return new ResponseEntity<>(u, HttpStatus.OK); + } + +// get all users including inactive + @GetMapping("/all-users") + public List getAll() { + System.out.println("Request came to API.."); + List usersAll = this.userService.getAllUsers(); + return usersAll; + } + + @GetMapping("/getOneAppUser/{id}") + public ResponseEntity getOneAppUser(@PathVariable("id") Long id) { + Optional a = appUserServiceImpl.getOneUser(id); + if (a.get() != null) { + return new ResponseEntity<>(a.get(), HttpStatus.OK); + } + return new ResponseEntity<>("User not found", HttpStatus.OK); + } + + @PostMapping("/addOneAppUser") + public ResponseEntity addOneUser(@RequestBody Registration reg) { + if (appUserRepository.findByEmail(reg.getEmail()) != null) { + return ResponseEntity.badRequest().body(new MessageResponse("email already exist")); + } + AppUser a = appUserServiceImpl.addOneUser(reg); + return new ResponseEntity<>(a, HttpStatus.OK); + } + + @GetMapping("/test") + public void test() { + System.out.println("Aaa"); + } + + @PostMapping("/addOneAppUserCustom") + public ResponseEntity addOneUserCustom(@RequestBody User appUser) { + System.out.println("aaaaa"); + System.out.println(appUser); + AppUser a = appUserServiceImpl.addOneUserCustom(appUser); + System.out.println(a); + return new ResponseEntity<>(HttpStatus.OK); + } + + @PutMapping("/updateAppUser") + public ResponseEntity updateOneUser(@RequestBody AppUser appUser) { + AppUser a = appUserServiceImpl.updateOneUser(appUser); + return new ResponseEntity<>(a, HttpStatus.OK); + } + +// update app user + @PutMapping("/updateAppUserDto/{userId}") + public ResponseEntity updateAppUser(@PathVariable Long userId, @RequestBody AppUserDto appUserDto) { + AppUser a = appUserServiceImpl.updateAppUserDto(userId, appUserDto); + if (a != null) { + return new ResponseEntity<>(a, HttpStatus.OK); + } + return new ResponseEntity<>("No user found", HttpStatus.BAD_REQUEST); + } + + @PostMapping("/resetPasswordEmail/{userId}") + public ResponseEntity sendEmailForResetPassword(@PathVariable("userId") Long userId) { + AppUser a = appUserServiceImpl.getUserInfoByUserId(userId); + // random string + String hash = appUserServiceImpl.generateRandomHash(8); + if (a != null) { + String email = a.getEmail(); + String subject = "Pass reset"; + String link = "http://" + hash + "/" + String.valueOf(a.getUserId()); + emailService.sendSimpleMessage(null, email, subject, link); + return new ResponseEntity<>("Email sent success", HttpStatus.OK); + } + return new ResponseEntity<>("User not found", HttpStatus.BAD_REQUEST); + } + + @PostMapping("/resetPassword/{userId}/{hash}") + public ResponseEntity resetPassword(@PathVariable("userId") Long userId, @PathVariable("hash") String hash, + @RequestBody PasswordResetRequest passwordResetRequest) { + + AppUser a = appUserServiceImpl.resetPassword(userId, hash, passwordResetRequest.getNewPassword()); + if (a != null) { + return new ResponseEntity<>("Password Reset Successfull", HttpStatus.OK); + } + return new ResponseEntity<>("Password Not changed", HttpStatus.BAD_REQUEST); + } + + @GetMapping("/token/getchatuser_byid/{id}") + public ResponseEntity getChatUserById(@PathVariable Long id) { + AppUser u = appUserRepository.findByUserId(id); + return new ResponseEntity<>(u, HttpStatus.OK); + } + + @DeleteMapping("/delete_usr/{user_id}") + public ResponseEntity deleteusr(@PathVariable Long user_id) { + Optional r = appUserRepository.findById(user_id); + r.get().setActive(false); + AppUser save = appUserRepository.save(r.get()); + + return new ResponseEntity<>(save, HttpStatus.OK); + + } + + // By Gk + // ADD USER VIA ADMIN + @ApiOperation(value = "Add user Via Admin") + @PostMapping("/userviaadmin") + public ResponseEntity userviaadmin(HttpServletRequest request, @RequestParam("email") String email) + throws JsonProcessingException { + AppUser loggedInUser = userService.getLoggedInUser(); + String fullName = loggedInUser.getFullName(); + Long account_id = loggedInUser.getAccount().getAccount_id(); + + AppUser user = userService.findUserByEmail(email); + if (user != null) { + return ResponseEntity.badRequest().body(new MessageResponse(email + " already exist")); + } else { + String token = UUID.randomUUID().toString(); + AppUser appUser = new AppUser(); + userService.adduserviaadmin(appUser, token, email, account_id); + + String subject = "add user"; + + String url = Port_Constant.FRONTEND_PORTAL_DOMAIN + "/#/adduser/" + token; + // String url = "http://localhost:4200/#/adduser/" +token; + // String url = "http://surecns.ml:30165/#/adduser/" +token; +// String url = "http://" + Port_Constant.LOCAL_HOST + ":" + Port_Constant.BACKEND_PORT_9191 + "/api" +// + "/admin/adduser/" + token; + + emailService.sendEmail(email, subject, url); + return new ResponseEntity<>("Email sent success", HttpStatus.OK); + } + + } + + // get email make user VIA ADMIN + @PostMapping("/admin/adduser/{token}") + public ResponseEntity saveuser(@PathVariable String token, @Valid @RequestBody SignUp signUp) { + + AppUser a = appUserRepository.findByToken(token); + + if (a != null) { + + if (signUp.getPassword().equals(signUp.getConfirm_password())) { + + a.setFullName(signUp.getFirst_name() + " " + signUp.getLast_name()); + a.setMob_no(signUp.getMob_no()); + a.setUserPassw(bcryptEncoder.encode(signUp.getPassword())); + a.setPwdChangedCnt(a.getPwdChangedCnt() != null ? (long) 1 + a.getPwdChangedCnt() : (long) 1); + a.setLastPwdChangedDate(new Date()); + a.setChangePassw(signUp.getPassword()); + a.setIsComplete(true); + a.setActive(true); + + long r = 42; + AppUserRole grp = appUserRoleRepository.findById(r).orElse(null); + a.setUsrGrp(grp); +// Set strRoles = a.getRoles(); + Set roles = new HashSet<>(); + +// if (strRoles == null) { + String role1 = "ROLE_Developer"; + Role userRole = roleRepo.findByName(role1); + roles.add(userRole); + a.setRoles(roles); +// } + a.setRandom_no(null); + AppUser save = appUserRepository.save(a); + return new ResponseEntity<>(save, HttpStatus.CREATED); + + } + return ResponseEntity.badRequest().body(new MessageResponse("password and confirm password not match")); + } + + return ResponseEntity.ok().body(new MessageResponse("registration already done")); + } + + // By Gk + // ADD GUEST VIA ADMIN + @ApiOperation(value = "Add user Via Admin") + @PostMapping("/guest_via_admin") + public ResponseEntity guestviaadmin(HttpServletRequest request, @RequestParam("email") String email) + throws JsonProcessingException { + + AppUser loggedInUser = userService.getLoggedInUser(); + String fullName = loggedInUser.getFullName(); + Long account_id = loggedInUser.getAccount().getAccount_id(); + if (email.contains(" ")) { + // Replace whitespace with '+' + email = email.replace(" ", "+"); + } + + AppUser user = userService.findUserByEmail(email); + if (user != null) { + return ResponseEntity.badRequest().body(new MessageResponse(email + " already exist")); + } else { + String token = UUID.randomUUID().toString(); + AppUser appUser = new AppUser(); + userService.addguestviaadmin(appUser, token, email, account_id); + +// String subject = "add guest"; + String url = Port_Constant.FRONTEND_PORTAL_DOMAIN + "/#/addguest/" + token; + + // String url = "http://localhost:4200/#/addguest/" +token; + // String url = "http://surecns.ml:30165/#/addguest/" +token; +// String url = "http://" + Port_Constant.LOCAL_HOST + ":" + Port_Constant.BACKEND_PORT_9191 + "/api" +// + "/admin/addguest/" + token; + + String subject = "Guest Registration.."; + emailService.sendEmail(email, subject, url); + return new ResponseEntity<>("Email sent success", HttpStatus.OK); + } + + } + + // get email ADD GUEST VIA ADMIN + @PostMapping("/admin/addguest/{token}") + public ResponseEntity saveguest(@PathVariable String token, @Valid @RequestBody SignUp signUp) { + + AppUser a = appUserRepository.findByToken(token); + + if (a != null) { + + if (signUp.getPassword().equals(signUp.getConfirm_password())) { + + a.setFullName(signUp.getFirst_name() + " " + signUp.getLast_name()); + a.setMob_no(signUp.getMob_no()); + a.setUserPassw(bcryptEncoder.encode(signUp.getPassword())); + a.setPwdChangedCnt(a.getPwdChangedCnt() != null ? (long) 1 + a.getPwdChangedCnt() : (long) 1); + a.setLastPwdChangedDate(new Date()); + a.setChangePassw(signUp.getPassword()); + a.setIsComplete(true); + a.setActive(true); + long r = 45; + AppUserRole grp = appUserRoleRepository.findById(r).orElse(null); + a.setUsrGrp(grp); +// Set strRoles = a.getRoles(); + Set roles = new HashSet<>(); + +// if (strRoles == null) { + String role1 = "ROLE_GUEST"; + Role userRole = roleRepo.findByName(role1); + roles.add(userRole); + a.setRoles(roles); +// } + a.setRandom_no(null); + AppUser save = appUserRepository.save(a); + return new ResponseEntity<>(save, HttpStatus.CREATED); + + } + return ResponseEntity.badRequest().body(new MessageResponse("password and confirm password not match")); + } + + return ResponseEntity.ok().body(new MessageResponse("registration already done")); + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/controller1/AppUserGrpController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/controller1/AppUserGrpController.java new file mode 100644 index 0000000..34b1be5 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/controller1/AppUserGrpController.java @@ -0,0 +1,88 @@ +package com.realnet.users.controller1; + +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.List; +import java.util.Optional; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.users.entity1.AppUserRole; +import com.realnet.users.repository1.AppUserRoleRepository; +import com.realnet.users.service1.AppUserRoleServiceImpl; + +@RestController +@RequestMapping(value = "/api") +public class AppUserGrpController { + private AppUserRoleServiceImpl appUserRoleServiceImpl; + + @Autowired + private AppUserRoleRepository appUserRoleRepository; + + + @Autowired + public AppUserGrpController(AppUserRoleServiceImpl appUserRoleServiceImpl) { + super(); + this.appUserRoleServiceImpl = appUserRoleServiceImpl; + } + + @GetMapping("/getAllUsrGrp") + public ResponseEntity getAll() { + DateFormat simple = new SimpleDateFormat("dd MMM yyyy HH:mm:ss"); + List l = appUserRoleServiceImpl.getAll(); + for (AppUserRole o : l) { + if (o.getCreatedate() != null) { + o.setCreateDateFormated(simple.format(o.getCreatedate())); + } + if (o.getUpdatedate() != null) { + o.setUpdateDateFormated(simple.format(o.getUpdatedate())); + } + } + return new ResponseEntity<>(l, HttpStatus.OK); + } + + @GetMapping("/getOneUsrGrp/{id}") + public ResponseEntity getOne(@PathVariable("id") Long id) { + DateFormat simple = new SimpleDateFormat("dd MMM yyyy HH:mm:ss"); + Optional r = appUserRoleServiceImpl.getOne(id); + if (r.get() != null) { + if (r.get().getCreatedate() != null) { + r.get().setCreateDateFormated(simple.format(r.get().getCreatedate())); + } + if (r.get().getUpdatedate() != null) { + r.get().setUpdateDateFormated(simple.format(r.get().getUpdatedate())); + } + return new ResponseEntity<>(r.get(), HttpStatus.OK); + } + return new ResponseEntity<>("not found", HttpStatus.BAD_REQUEST); + } + + @PostMapping("/addOneUsrGrp") + public ResponseEntity addOne(@RequestBody AppUserRole appUserRole) { + AppUserRole a = appUserRoleServiceImpl.addOne(appUserRole); + return new ResponseEntity<>(a, HttpStatus.OK); + } + + @PostMapping("/updateOneUsrGrp") + public ResponseEntity updateOne(@RequestBody AppUserRole appUserRole) { + AppUserRole a = appUserRoleServiceImpl.addOne(appUserRole); + return new ResponseEntity<>(a, HttpStatus.OK); + } + + @DeleteMapping("/delete_usrgrp/{id}") + public ResponseEntity deleteusrgroup(@PathVariable("id") Long id) { + AppUserRole r = appUserRoleServiceImpl.getOne(id).get(); + appUserRoleRepository.delete(r); + + return new ResponseEntity<>("deleted", HttpStatus.OK); + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/controller1/AppuserSessionController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/controller1/AppuserSessionController.java new file mode 100644 index 0000000..5481a2c --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/controller1/AppuserSessionController.java @@ -0,0 +1,61 @@ +package com.realnet.users.controller1; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.fnd.entity.Error; +import com.realnet.fnd.entity.ErrorPojo; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.entity1.AppUserSessions; +import com.realnet.users.repository1.AppUserSessionsRepository; +import com.realnet.utils.Constant; + +@RestController +@RequestMapping(value = "/user1/session") // , produces = MediaType.APPLICATION_JSON_VALUE) +public class AppuserSessionController { + + @Value("${projectPath}") + private String projectPath; + + @Autowired + private AppUserSessionsRepository sessionsRepository; + + + + //get all app user session + @GetMapping("/getAll") + public ResponseEntity getAllLog() { + List l = sessionsRepository.findAll(); + return new ResponseEntity<>(l, HttpStatus.OK); + } + + //delete session by userid + @DeleteMapping("/delete/{userId}") + public ResponseEntity getOne(@PathVariable("userId") AppUser userId) { + List a = sessionsRepository.findByUserId(userId); + + for (AppUserSessions appUserSessions : a) { + sessionsRepository.delete(appUserSessions); + } + + if (a != null) { + return new ResponseEntity<>("deleted", HttpStatus.OK); + } + return new ResponseEntity<>("Not Found", HttpStatus.BAD_REQUEST); + } + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/controller1/PositonAndDepartmentController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/controller1/PositonAndDepartmentController.java new file mode 100644 index 0000000..619bb5f --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/controller1/PositonAndDepartmentController.java @@ -0,0 +1,53 @@ +package com.realnet.users.controller1; + +import java.util.List; +import java.util.Optional; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.users.entity1.AppUserDepartment; +import com.realnet.users.entity1.AppUserPosition; +import com.realnet.users.service1.PositionAndDepartmentServiceImpl; + +@RestController +@RequestMapping(value = "/api") +public class PositonAndDepartmentController { + private PositionAndDepartmentServiceImpl positionAndDepartmentServiceImpl; + @Autowired + public PositonAndDepartmentController(PositionAndDepartmentServiceImpl positionAndDepartmentServiceImpl) { + super(); + this.positionAndDepartmentServiceImpl = positionAndDepartmentServiceImpl; + } + @GetMapping("/getAllDepartments") + public ResponseEntity getAll(){ + List l = positionAndDepartmentServiceImpl.getAll(); + return new ResponseEntity<>(l,HttpStatus.OK); + } + @GetMapping("/getDepartment/{id}") + public ResponseEntity getOne(@PathVariable("id") String id){ + Optional o = positionAndDepartmentServiceImpl.getOne(id); + if(o.get()!=null) { + return new ResponseEntity<>(o.get(),HttpStatus.OK); + } + return new ResponseEntity<>("Department not found",HttpStatus.BAD_REQUEST); + } + @GetMapping("/getAllPositions") + public ResponseEntity getAllPosition(){ + List l = positionAndDepartmentServiceImpl.getAllPosition(); + return new ResponseEntity<>(l,HttpStatus.OK); + } + @GetMapping("/getPosition/{id}") + public ResponseEntity getOnePosition(@PathVariable("id") String id){ + Optional o = positionAndDepartmentServiceImpl.getOnePosition(id); + if(o.get()!=null) { + return new ResponseEntity<>(o.get(),HttpStatus.OK); + } + return new ResponseEntity<>("Position not found",HttpStatus.BAD_REQUEST); + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/controller1/SysAccountController.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/controller1/SysAccountController.java new file mode 100644 index 0000000..f66106f --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/controller1/SysAccountController.java @@ -0,0 +1,66 @@ +package com.realnet.users.controller1; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.session.entity.AboutWork; +import com.realnet.users.entity.Sys_Accounts; +import com.realnet.users.repository.AboutWorkRepo; +import com.realnet.users.repository.SysAccountRepo; + +@RequestMapping("/token/users/sysaccount") +@RestController +public class SysAccountController { + + @Autowired + private SysAccountRepo sysAccountRepo; + + @Autowired + private AboutWorkRepo aboutWorkRepo; + + @PostMapping("/savesysaccount") + public Sys_Accounts save(@RequestBody Sys_Accounts sys_Accounts) { + Sys_Accounts save = sysAccountRepo.save(sys_Accounts); + + System.out.println("created account data is .." + save); + return save; + } + + @PostMapping("/addaccountcusto") + public AboutWork addaccountcusto(@RequestBody AboutWork aWork) { + + System.out.println("Here"); + AboutWork work = new AboutWork(); + work.setCompanyname(aWork.getCompanyname()); + work.setEmail(aWork.getEmail()); + work.setManaging_work(aWork.getManaging_work()); + work.setMobile(aWork.getMobile()); + work.setName(aWork.getName()); + work.setPancard(aWork.getPancard()); + work.setPassword(aWork.getPassword()); + work.setWorking(aWork.getWorking()); + + AboutWork save = aboutWorkRepo.save(work); + return save; + } + + @GetMapping("/sysaccount") + public List getall() { + + List getall = sysAccountRepo.findAll(); + return getall; + } + + @DeleteMapping("/deleteaccount") + public void deleteaccount() { + aboutWorkRepo.deleteAll(); + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/controller1/WorkSpaceController1.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/controller1/WorkSpaceController1.java new file mode 100644 index 0000000..e8d0bb4 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/controller1/WorkSpaceController1.java @@ -0,0 +1,137 @@ +//package com.realnet.users.controller1; +// +//import java.util.List; +// +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.http.HttpStatus; +//import org.springframework.http.ResponseEntity; +//import org.springframework.web.bind.annotation.DeleteMapping; +//import org.springframework.web.bind.annotation.GetMapping; +//import org.springframework.web.bind.annotation.PathVariable; +//import org.springframework.web.bind.annotation.PostMapping; +//import org.springframework.web.bind.annotation.RequestBody; +//import org.springframework.web.bind.annotation.RequestMapping; +//import org.springframework.web.bind.annotation.RestController; +// +//import com.realnet.Workspaceuser.Entity.Sec_team_members; +//import com.realnet.Workspaceuser.Entity.Sec_teams; +//import com.realnet.Workspaceuser.Repository.SecWorkspaceUserRepo; +//import com.realnet.Workspaceuser.Repository.Sec_team_MemberRepository; +//import com.realnet.Workspaceuser.Repository.Sec_teams_Repository; +//import com.realnet.users.entity1.AppUser; +//import com.realnet.users.repository1.AppUserRepository; +//import com.realnet.users.response.MessageResponse; +//import com.realnet.users.service1.AppUserServiceImpl; +// +//@RestController +//@RequestMapping("/User_workSpace") +//public class WorkSpaceController1 { +// @Autowired +// private AppUserServiceImpl userService; +// +// @Autowired +// private AppUserRepository appUserRepository; +// @Autowired +// private Sec_teams_Repository sec_teams_Repository; +// +// @Autowired +// private Sec_team_MemberRepository memberRepository; +// +// @Autowired +// private SecWorkspaceUserRepo secWorkspaceUserRepo; +// +// //GET ALL USER attach from login id +// @GetMapping("/GetAll") +// public ResponseEntity getall(){ +// AppUser loggedInUser = userService.getLoggedInUser(); +// Long account_id = loggedInUser.getAccount().getAccount_id(); +// +// List li = appUserRepository.getall(account_id); +// return new ResponseEntity<>(li,HttpStatus.OK); +// } +// +// //ADD USER TO SPECIFIC TEAM +// @PostMapping("/add_team/{id}/{userId}") +// public ResponseEntity addteam(@RequestBody Sec_team_members team_mem, +// @PathVariable int id,@PathVariable Long userId){ +// Sec_team_members members = memberRepository.findteammember(id,userId); +// if(members == null) { +// +// Sec_teams team = sec_teams_Repository.findById(id); +// if(team != null) { +// +// AppUser user = appUserRepository.findById(userId).orElseThrow(null); +// +// team_mem.setTeam_id(team.getId()); +// team_mem.setMember_name(user.getFullName()); +// team_mem.setMember_id(user.getUserId()); +// Sec_team_members save = memberRepository.save(team_mem); +// +// +// return new ResponseEntity<>(save, HttpStatus.OK); +// +// } +// else +// return ResponseEntity.badRequest().body(new MessageResponse("team not found")); +// } +// else +// return ResponseEntity.badRequest().body(new MessageResponse("member already added")); +// } +// +// //REMOVE MEMBER FROM TEAM +// @DeleteMapping("/RemoveMember/{id}/{userId}") +// public MessageResponse removemember(@PathVariable int id,@PathVariable Long userId){ +// Sec_team_members members = memberRepository.findteammember(id,userId); +// if(members != null) { +// memberRepository.delete(members); +// return new MessageResponse("deleted"); +// }else +// +// return new MessageResponse("member not found"); +// } +// +// +// //GET ALL USER ADD BY ADMIN +// @GetMapping("/GetAllUser") +// public ResponseEntity GetUser(){ +// AppUser loggedInUser = userService.getLoggedInUser(); +// Long account_id = loggedInUser.getAccount().getAccount_id(); +// +// List li = appUserRepository.getalluser(account_id); +// return new ResponseEntity<>(li,HttpStatus.OK); +// } +// +// //GET ALL GUEST ADD BY ADMIN +// @GetMapping("/GetAllGuest") +// public ResponseEntity Getguest(){ +// AppUser loggedInUser = userService.getLoggedInUser(); +// Long account_id = loggedInUser.getAccount().getAccount_id(); +// +// List li = appUserRepository.getallguest(account_id); +// return new ResponseEntity<>(li,HttpStatus.OK); +// } +// +// //GET ALL TEAM MEMBER FROM SPECIFIC TEAM +// @GetMapping("/GetAllMember/{team_id}") +// public ResponseEntity GetAllteamMember(@PathVariable int team_id){ +// +// +// List li = memberRepository.getallteam(team_id); +// if(li == null) { +// return ResponseEntity.badRequest().body(new MessageResponse("team not found")); +// }else +// return new ResponseEntity<>(li,HttpStatus.OK); +// } +// +// +// +// +// +// +// +// +// +// +// +// +//} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/CompanyDto.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/CompanyDto.java new file mode 100644 index 0000000..4fccdc4 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/CompanyDto.java @@ -0,0 +1,15 @@ +package com.realnet.users.entity; + +import java.io.Serializable; + +import lombok.Data; + +@Data +public class CompanyDto implements Serializable { + private static final long serialVersionUID = 1L; + private String userEmail; // for load the user who is responsible + private String companyName; + private String workspace; + private String gstNumber; + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/CustomUserDetails.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/CustomUserDetails.java new file mode 100644 index 0000000..49c56a7 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/CustomUserDetails.java @@ -0,0 +1,77 @@ +//package com.realnet.users.entity; +// +//import java.util.Collection; +//import java.util.HashSet; +//import java.util.Set; +// +//import org.springframework.security.core.GrantedAuthority; +//import org.springframework.security.core.authority.SimpleGrantedAuthority; +//import org.springframework.security.core.userdetails.UserDetails; +// +//import com.fasterxml.jackson.annotation.JsonIgnore; +//import com.realnet.users.entity1.AppUser; +// +//import lombok.ToString; +// +//@ToString +//public class CustomUserDetails implements UserDetails { +// private static final long serialVersionUID = 3163073361116831556L; +// +// private AppUser user; +//// public User getUser() { +//// return user; +//// } +//// public void setUser(User user) { +//// this.user = user; +//// } +// +// public CustomUserDetails(AppUser user) { +// super(); +// this.user = user; +// } +// +// @Override +// public Collection getAuthorities() { +// Set authorities = new HashSet<>(); +// user.getRoles().forEach(role -> { +// authorities.add(new SimpleGrantedAuthority("ROLE_" + role.getName())); +// }); +// return authorities; +// } +// +// @Override +// public String getPassword() { +// return user.getPassword(); +// } +// +// @Override +// public String getUsername() { +// //return user.getUsername(); +// return user.getEmail(); +// } +// +// @JsonIgnore +// @Override +// public boolean isAccountNonExpired() { +// return true; +// } +// +// @JsonIgnore +// @Override +// public boolean isAccountNonLocked() { +// return true; +// } +// +// @JsonIgnore +// @Override +// public boolean isCredentialsNonExpired() { +// return true; +// } +// +// @JsonIgnore +// @Override +// public boolean isEnabled() { +// return true; +// } +// +//} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/ERole.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/ERole.java new file mode 100644 index 0000000..5d7cacf --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/ERole.java @@ -0,0 +1,14 @@ +package com.realnet.users.entity; + +public enum ERole { + ROLE_USER, + ROLE_ADMIN, + ROLE_REVIEWER, + ROLE_COLLABORATOR, + ROLE_ProjectManager, + ROLE_Scum_master, + ROLE_Developer, + ROLE_Tester, + ROLE_DevOps + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/Email.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/Email.java new file mode 100644 index 0000000..78d46b5 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/Email.java @@ -0,0 +1,89 @@ +package com.realnet.users.entity; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; + +import com.fasterxml.jackson.annotation.JsonBackReference; +import com.realnet.fnd.entity.Rn_Who_Columns; + +import lombok.Data; + + +@Entity +public class Email extends Rn_Who_Columns { + + @Id + @Column(name = "user_id") + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long userId; + private String email1; + private String email2; + private String email3; + private String email4; + + private Long id; + public Long getId() { + return id; + } + public void setId(Long id) { + this.id = id; + } + +// private String password; + +// @ManyToOne(fetch = FetchType.LAZY) +// @JoinColumn(name = "ACCOUNT_ID") +// @JsonBackReference +// private Sys_Accounts sys_account; + +//public String getPassword() { +// return password; +// } +// public void setPassword(String password) { +// this.password = password; +// } + // public Sys_Accounts getSys_account() { +// return sys_account; +// } +// public void setSys_account(Sys_Accounts sys_account) { +// this.sys_account = sys_account; +// } + public Long getUserId() { + return userId; + } + public void setUserId(Long userId) { + this.userId = userId; + } + public String getEmail1() { + return email1; + } + public void setEmail1(String email1) { + this.email1 = email1; + } + public String getEmail2() { + return email2; + } + public void setEmail2(String email2) { + this.email2 = email2; + } + public String getEmail3() { + return email3; + } + public void setEmail3(String email3) { + this.email3 = email3; + } + public String getEmail4() { + return email4; + } + public void setEmail4(String email4) { + this.email4 = email4; + } + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/EmailRequest.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/EmailRequest.java new file mode 100644 index 0000000..fb55795 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/EmailRequest.java @@ -0,0 +1,8 @@ +package com.realnet.users.entity; + +import lombok.Data; + +@Data +public class EmailRequest { + private String email; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/GenericResponse.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/GenericResponse.java new file mode 100644 index 0000000..f58d128 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/GenericResponse.java @@ -0,0 +1,20 @@ +package com.realnet.users.entity; + +public class GenericResponse { + private String message; + private String error; + + + + public GenericResponse(String message) { + super(); + this.message = message; + } + + public GenericResponse(String message, String error) { + super(); + this.message = message; + this.error = error; + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/Login.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/Login.java new file mode 100644 index 0000000..e306b9f --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/Login.java @@ -0,0 +1,15 @@ +package com.realnet.users.entity; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +public class Login { + + @ApiModelProperty(example = "demo", required = true) + private String username = ""; + + @ApiModelProperty(example = "demo", required = true) + private String password = ""; + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/LoginUser.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/LoginUser.java new file mode 100644 index 0000000..6b4e45b --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/LoginUser.java @@ -0,0 +1,37 @@ +package com.realnet.users.entity; + +public class LoginUser { + + //private String username; + private String email; + private String password; + + /* + * public String getUsername() { return username; } + * + * public void setUsername(String username) { this.username = username; } + */ + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + +// @Override +// public String toString() { +// return "LoginUser [email=" + email + ", password=" + password + "]"; +// } + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/PasswordResetRequest.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/PasswordResetRequest.java new file mode 100644 index 0000000..6dfaf3b --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/PasswordResetRequest.java @@ -0,0 +1,16 @@ +package com.realnet.users.entity; + +import lombok.Data; + +@Data +public class PasswordResetRequest { + + private Long userId; + private String email; + + private String oldPassword; + private String newPassword; + private String token; + private String hash; + private String confirmPassword; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/PasswordResetToken.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/PasswordResetToken.java new file mode 100644 index 0000000..2092a2f --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/PasswordResetToken.java @@ -0,0 +1,52 @@ +package com.realnet.users.entity; + +import java.util.Date; + +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.OneToOne; + +import com.realnet.users.entity1.AppUser; + +import lombok.Data; +@Data +@Entity +public class PasswordResetToken { + + private static final int EXPIRATION = 60 * 24; + + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private Long id; + + private String token; + + @OneToOne(targetEntity = AppUser.class, fetch = FetchType.EAGER) +// @JoinColumn(nullable = false, name = "user_id") + private AppUser user; + + private Date expiryDate; + + public PasswordResetToken( AppUser user,String token) { + super(); + this.token = token; + this.user = user; + } + public PasswordResetToken( String token) { + super(); + this.token = token; +// this.user = user; + } + + public PasswordResetToken() { + super(); + // TODO Auto-generated constructor stub + } + + + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/Role.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/Role.java new file mode 100644 index 0000000..013d6b4 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/Role.java @@ -0,0 +1,98 @@ +package com.realnet.users.entity; + +import java.util.Set; + +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.ManyToMany; + +import com.fasterxml.jackson.annotation.JsonBackReference; +import com.realnet.users.entity1.AppUser; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + +@Data +@Entity +public class Role { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + @Column + private String name; + + @Column + private String description; + +// @JsonBackReference +// @ManyToMany(fetch = FetchType.EAGER, mappedBy = "roles", cascade = { CascadeType.PERSIST, CascadeType.DETACH, +// CascadeType.MERGE, CascadeType.REFRESH }) +// private Set users; + + @JsonBackReference + @ManyToMany(fetch = FetchType.EAGER, mappedBy = "roles", cascade = { CascadeType.PERSIST, CascadeType.DETACH, + CascadeType.MERGE, CascadeType.REFRESH }) + private Set appusers; + + +// public Long getId() { +// return id; +// } +// +// public void setId(Long id) { +// this.id = id; +// } +// +// public String getName() { +// return name; +// } +// +// public void setName(String name) { +// this.name = name; +// } +// +// public String getDescription() { +// return description; +// } +// +// public void setDescription(String description) { +// this.description = description; +// } +// +// public Set getUsers() { +// return users; +// } +// +// public void setUsers(Set users) { +// this.users = users; +// } +// +// public Role(Long id, String name, String description, Set users) { +// super(); +// this.id = id; +// this.name = name; +// this.description = description; +// this.users = users; +// } + + public Role() { + + // TODO Auto-generated constructor stub + } + + + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/RoleUpdateDto.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/RoleUpdateDto.java new file mode 100644 index 0000000..c5b5152 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/RoleUpdateDto.java @@ -0,0 +1,36 @@ +package com.realnet.users.entity; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotEmpty; + +import io.swagger.annotations.ApiModelProperty; + +public class RoleUpdateDto { + + @ApiModelProperty(notes = "User identifier", required = true) + @NotBlank(message = "The userId is required") + private Long userId; + + @ApiModelProperty(notes = "Array of roles to give to an user", required = true) + @NotEmpty(message = "The field must have at least one item") + private String[] roles; + + public Long getUserId() { + return userId; + } + + public RoleUpdateDto setUserId(Long userId) { + this.userId = userId; + return this; + } + + public String[] getRoles() { + return roles; + } + + public RoleUpdateDto setRoles(String[] roles) { + this.roles = roles; + return this; + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/Sys_Accounts.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/Sys_Accounts.java new file mode 100644 index 0000000..6c34eda --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/Sys_Accounts.java @@ -0,0 +1,53 @@ +package com.realnet.users.entity; + +import java.util.List; + +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.OneToMany; +import javax.persistence.Table; + +import com.fasterxml.jackson.annotation.JsonManagedReference; +import com.realnet.users.entity1.AppUser; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + +@Data +@ToString(exclude="users") +@EqualsAndHashCode(callSuper=false) +@Entity +@Table(name = "sys_accounts") +public class Sys_Accounts { + @Id + @Column(name = "id") + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long account_id; + + @Column(name = "company_name") + private String companyName; + + @Column(name = "workspace") + private String workspace; + + @Column(name = "gst_no") + private String gstNumber; + + private String mobile; + private String email; + + private String pancard; + private String working; + + + @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY) + @JsonManagedReference + private List users; + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/UserDto.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/UserDto.java new file mode 100644 index 0000000..a677c12 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/UserDto.java @@ -0,0 +1,27 @@ +package com.realnet.users.entity; + +import java.io.Serializable; +import java.util.Set; + +import com.fasterxml.jackson.annotation.JsonIgnore; + +import lombok.Data; + +@Data +public class UserDto implements Serializable { + private static final long serialVersionUID = 1L; +// private String username; +// private String password; + private String firstName; + private String lastName; + private String password; + private String email; + private String fullName; + private String department; + private int menuGroupId; + @JsonIgnore + private String phone; + @JsonIgnore + private Set roles; + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/UserProfileDTO.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/UserProfileDTO.java new file mode 100644 index 0000000..6d26cc8 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity/UserProfileDTO.java @@ -0,0 +1,21 @@ +package com.realnet.users.entity; + +import java.io.Serializable; + +import lombok.Data; + +@Data +public class UserProfileDTO implements Serializable { + /** + * + */ + private static final long serialVersionUID = 1L; + + private String fullName; + private String pronounce; + private String role; + private String department; + private String about; + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity1/AppUser.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity1/AppUser.java new file mode 100644 index 0000000..eda9287 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity1/AppUser.java @@ -0,0 +1,165 @@ +package com.realnet.users.entity1; + +import java.io.Serializable; +import java.sql.Blob; +import java.time.LocalDateTime; +import java.util.Date; +import java.util.Set; + +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.JoinTable; +import javax.persistence.ManyToMany; +import javax.persistence.ManyToOne; +import javax.persistence.SequenceGenerator; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import javax.persistence.Transient; + +import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.annotation.LastModifiedDate; + +import com.fasterxml.jackson.annotation.JsonBackReference; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.realnet.users.entity.PasswordResetToken; +import com.realnet.users.entity.Role; +import com.realnet.users.entity.Sys_Accounts; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + +@Entity +@Table(name = "SEC_USERS") +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@ToString +public class AppUser implements Serializable { + /** + * + */ + private static final long serialVersionUID = 1L; + @Id + @Column(name = "user_id") + @GeneratedValue(generator = "SecUsers_gen") + @SequenceGenerator(name = "SecUsers_gen", sequenceName = "sec_users_sequencs", initialValue = 10007300, allocationSize = 1) + private Long userId; + + @Column(name = "user_name", unique = true) + private String username; + + private String userPassw; + private String title; + private String shortName; + private String fullName; + private Date expiryDate; + private String daysMth; + private Long noDaysMth; + private String status; + private String changePassw; + + private String createby; + +// @Temporal(TemporalType.TIMESTAMP) + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss") + @Column(name = "createdate", nullable = false, updatable = false) + @CreatedDate + private LocalDateTime createdate; + + private String updateby; + + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss") + @Temporal(TemporalType.TIMESTAMP) + @LastModifiedDate + private Date updatedate; + + @ManyToOne + @JoinColumn(name = "usr_grp") + private AppUserRole usrGrp; + + private String langCode; + + private String firstLogin; + + @ManyToOne + @JoinColumn(name = "position_code") + private AppUserPosition positionCode; + + @ManyToOne + @JoinColumn(name = "department_code") + private AppUserDepartment departmentCode; + + @JsonBackReference + @ManyToOne + private Sys_Accounts Account; + + private String email; + private String notification; + private Long customerId; + private String password1; + private String password2; + private String password3; + private String password4; + private Long pwdChangedCnt; + private Date lastPwdChangedDate; + private Blob photo; + private String photoName; + + private String provider; + private String country; + private String depString; + private boolean isBlocked; + private String about; + private Long checknumber; + private String working; + private String accesstype; +// private Integer access_duration; +// +// @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "dd-mm-yyyy") +// private Date access_till_date; + + private String random_no; + private Long mob_no; + + private boolean IsComplete; + + private boolean active; + + @Transient + private String customerNumer; + @Transient + private String positionCodeString; + @Transient + private String departmentCodeString; + + // @Transient + private Long usrGrpId; + @Transient + private String confirmPassword; + @Transient + private String usrGrpName; + @Transient + private StringBuilder totalLogInfo; + + @Transient + @JsonIgnore + private PasswordResetToken pass; + + @ManyToMany(targetEntity = Role.class, fetch = FetchType.EAGER, cascade = { CascadeType.PERSIST, CascadeType.DETACH, + CascadeType.ALL, CascadeType.REFRESH }) + @JoinTable(name = "SECUSER_ROLES", joinColumns = { @JoinColumn(name = "SECUSER_ID") }, inverseJoinColumns = { + @JoinColumn(name = "ROLE_ID") }) + private Set roles; + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity1/AppUserDepartment.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity1/AppUserDepartment.java new file mode 100644 index 0000000..f37f77c --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity1/AppUserDepartment.java @@ -0,0 +1,39 @@ +package com.realnet.users.entity1; + +import java.util.Date; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + +@Entity +@Table(name="DEPARTMENT") +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@ToString +public class AppUserDepartment { + @Id + @Column(name="department_code") + private String departmentCode; + private String active; + private String description; + @Column(name="created_on") + private Date createdOn; + @Column(name="created_by") + private String createdBy; + @Column(name="created_on",updatable = false,insertable = false) + private Date updatedOn; + @Column(name="updated_by") + private String updatedBy; + private Long id; + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity1/AppUserDto.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity1/AppUserDto.java new file mode 100644 index 0000000..4f8af42 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity1/AppUserDto.java @@ -0,0 +1,25 @@ +package com.realnet.users.entity1; + +import lombok.Data; + +@Data +public class AppUserDto { + private Long userId; + private String username; + private String userPassw; + private String title; + private String shortName; + private String fullName; + private String status; + + private String positionCodeId; + private String departmentCodeId; + private Long usrGrpId; + private Long customerId; + private String email; + private String notification; + private Long mob_no; + private boolean active; + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity1/AppUserLoginHist.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity1/AppUserLoginHist.java new file mode 100644 index 0000000..6da367b --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity1/AppUserLoginHist.java @@ -0,0 +1,42 @@ +package com.realnet.users.entity1; + +import java.io.Serializable; +import java.util.Date; + +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.OneToOne; +import javax.persistence.Table; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + +@Entity +@Table(name="USERLOGINHIST") +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@ToString +public class AppUserLoginHist implements Serializable{ + /** + * + */ + private static final long serialVersionUID = 1L; + @Id + @OneToOne + @JoinColumn(name="user_id") + private AppUser userId; + private Date lastLoginDate; + private Date lastPasswordChgDate; + private Long lastPasswordFailNo; + private String createBy; + private Date createDate; + private String updateBy; + private Date updateDate; + private Long expiryReminder; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity1/AppUserPasswlog.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity1/AppUserPasswlog.java new file mode 100644 index 0000000..9cc84b9 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity1/AppUserPasswlog.java @@ -0,0 +1,45 @@ +package com.realnet.users.entity1; + +import java.io.Serializable; +import java.util.Date; + +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.IdClass; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; + +import lombok.AllArgsConstructor; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + +@Entity +@Table(name="USERPASSWLOG") +@IdClass(AppUserPasswlogCompositeKey.class) +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@ToString +@EqualsAndHashCode +public class AppUserPasswlog implements Serializable{ + /** + * + */ + private static final long serialVersionUID = 1L; + @Id + @ManyToOne + @JoinColumn(name="user_id") + private AppUser userId; + @Id + private String userPassw; + private String createBy; + @Id + private Date createDate; + private String updateBy; + private Date updateDate; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity1/AppUserPasswlogCompositeKey.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity1/AppUserPasswlogCompositeKey.java new file mode 100644 index 0000000..19aebcc --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity1/AppUserPasswlogCompositeKey.java @@ -0,0 +1,27 @@ +package com.realnet.users.entity1; + +import java.io.Serializable; +import java.util.Date; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +@Data +@Getter +@Setter +@EqualsAndHashCode +@AllArgsConstructor +@NoArgsConstructor +public class AppUserPasswlogCompositeKey implements Serializable{ + /** + * + */ + private static final long serialVersionUID = 1L; + private Long userId; + private String userPassw; + private Date createDate; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity1/AppUserPosition.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity1/AppUserPosition.java new file mode 100644 index 0000000..813871e --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity1/AppUserPosition.java @@ -0,0 +1,31 @@ +package com.realnet.users.entity1; + +import java.util.Date; + +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + +@Entity +@Table(name="POSITION") +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@ToString +public class AppUserPosition { + @Id + private String positionCode; + private String active; + private String description; + private Date createdOn; + private String createdBy; + private Date updatedOn; + private String updatedBy; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity1/AppUserPrinciple.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity1/AppUserPrinciple.java new file mode 100644 index 0000000..f6c1f2d --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity1/AppUserPrinciple.java @@ -0,0 +1,105 @@ +package com.realnet.users.entity1; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; + +import org.springframework.security.core.GrantedAuthority; +import org.springframework.security.core.authority.SimpleGrantedAuthority; +import org.springframework.security.core.userdetails.UserDetails; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.realnet.users.entity.Role; + +public class AppUserPrinciple implements UserDetails{ + + /** + * + */ + private static final long serialVersionUID = 1L; + private AppUser u; + public AppUserPrinciple(AppUser u) { + super(); + this.u = u; + } + + +// private String username; +// @JsonIgnore +// private String password; +// private String role; +// +// public AppUserPrinciple( String username, String password,String role +// ) { +// this.username = username; +// this.password = password; +// this.role = role; +// } + + + + @Override + public Collection getAuthorities() { +// Set authorities = new HashSet<>(); +// authorities.add(new SimpleGrantedAuthority("ROLE_"+u.getUsrGrp().getGroupName())); +//// u.getUsrGrp().forEach(role->{ +//// authorities.add(new SimpleGrantedAuthority("ROLE_"+role.getGroupName())); +//// }); +// return authorities; + + //FROM GK +// List authorities = u.getRoles().stream().map(role-> new SimpleGrantedAuthority(role.getName())).collect(Collectors.toList()); +// authorities.add(new SimpleGrantedAuthority("ROLE_"+role)); +// return authorities; + + Set roles = u.getRoles(); + List authorities = new ArrayList<>(); + + for (Role role : roles) { +// authorities.add(new SimpleGrantedAuthority(role.getName().getDeclaringClass().getName())); + authorities.add(new SimpleGrantedAuthority(role.getName())); + } + + return authorities; + } + + @Override + public String getPassword() { + // TODO Auto-generated method stub + return u.getUserPassw(); + } + + @Override + public String getUsername() { + // TODO Auto-generated method stub + return u.getUsername(); + } + + @Override + public boolean isAccountNonExpired() { + // TODO Auto-generated method stub + return true; + } + + @Override + public boolean isAccountNonLocked() { + // TODO Auto-generated method stub + return true; + } + + @Override + public boolean isCredentialsNonExpired() { + // TODO Auto-generated method stub + return true; + } + + @Override + public boolean isEnabled() { + // TODO Auto-generated method stub + return true; + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity1/AppUserRole.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity1/AppUserRole.java new file mode 100644 index 0000000..7b8f96a --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity1/AppUserRole.java @@ -0,0 +1,67 @@ +package com.realnet.users.entity1; + +import java.io.Serializable; +import java.util.Date; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EntityListeners; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.SequenceGenerator; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import javax.persistence.Transient; + +import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.annotation.LastModifiedDate; +import org.springframework.data.jpa.domain.support.AuditingEntityListener; +import org.springframework.data.jpa.repository.config.EnableJpaAuditing; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + +@Entity +@Table(name="SEC_USER_GROUP") +@EnableJpaAuditing +@EntityListeners(AuditingEntityListener.class) +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@ToString +public class AppUserRole implements Serializable{ + /** + * + */ + private static final long serialVersionUID = 1L; + @Id + @Column(name="usr_grp") + @GeneratedValue(generator = "SecUserGrp_gen") + @SequenceGenerator(name="SecUserGrp_gen", sequenceName="sec_user_group_id",initialValue = 40, allocationSize = 1) + private Long usrGrp; //auto generate +// @Transient +// @ManyToOne(fetch=FetchType.LAZY,cascade = CascadeType.ALL) +// private AppUser appUser; + private String groupName; //will come + private String groupDesc; //will come + private String createby; + @Temporal(TemporalType.TIMESTAMP) + @CreatedDate + private Date createdate; + @Temporal(TemporalType.TIMESTAMP) + @LastModifiedDate + private Date updatedate; + private String updateby; + private String status; //will come but need to change + private Long groupLevel; //will come + @Transient + private String createDateFormated; + @Transient + private String updateDateFormated; + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity1/AppUserSessions.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity1/AppUserSessions.java new file mode 100644 index 0000000..94e08c3 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity1/AppUserSessions.java @@ -0,0 +1,51 @@ +package com.realnet.users.entity1; + +import java.io.Serializable; +import java.util.Date; + +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.IdClass; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import lombok.AllArgsConstructor; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + +@Entity +@Table(name="SEC_USER_SESSIONS") +@IdClass(AppUserSessionsCompositeKey.class) +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@ToString +@EqualsAndHashCode +public class AppUserSessions implements Serializable{ + /** + * + */ + private static final long serialVersionUID = 1L; + @Id + @ManyToOne + @JoinColumn(name="user_id") + private AppUser userId; + @Id + private String sessionId; + @Id + private String clientIp; + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss") + private Date lastAccessDate; + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss") + private Date logintime; + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss") + private Date logouttime; + private String macid; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity1/AppUserSessionsCompositeKey.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity1/AppUserSessionsCompositeKey.java new file mode 100644 index 0000000..6ec8958 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity1/AppUserSessionsCompositeKey.java @@ -0,0 +1,26 @@ +package com.realnet.users.entity1; + +import java.io.Serializable; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +@Data +@Getter +@Setter +@EqualsAndHashCode +@AllArgsConstructor +@NoArgsConstructor +public class AppUserSessionsCompositeKey implements Serializable{ + /** + * + */ + private static final long serialVersionUID = 1L; + private Long userId; + private String sessionId; + private String clientIp; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity1/AppUser_who_column.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity1/AppUser_who_column.java new file mode 100644 index 0000000..1bbc16f --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity1/AppUser_who_column.java @@ -0,0 +1,52 @@ +package com.realnet.users.entity1; + +import java.io.Serializable; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.EntityListeners; +import javax.persistence.MappedSuperclass; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.annotation.LastModifiedDate; +import org.springframework.data.jpa.domain.support.AuditingEntityListener; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import lombok.Data; + +@Data +@MappedSuperclass +@EntityListeners(AuditingEntityListener.class) +public class AppUser_who_column implements Serializable{ + + private static final long serialVersionUID = 1L; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "CREATED_AT", nullable = false, updatable = false) + @CreatedDate + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss") + private Date createdAt; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "UPDATED_AT", nullable = false) + @LastModifiedDate + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss") + private Date updatedAt; + + // @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime createdAt; + + +// @Column(name = "CREATED_BY", updatable = false) +// private Long createdBy; + +// @Column(name = "UPDATED_BY") +// private Long updatedBy; + + + +// @Column(name = "ACCOUNT_ID") +// private Long accountId; + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity1/Registration.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity1/Registration.java new file mode 100644 index 0000000..16dc1a0 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity1/Registration.java @@ -0,0 +1,35 @@ +package com.realnet.users.entity1; + +import javax.persistence.Lob; +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.Size; + +import lombok.Data; + +@Data +public class Registration { + + private String first_name; + + private String last_name; + + private Long mob_no; + + private String email; + + private Long account_id; + + private Long usrGrpId; + + @NotBlank + @Size(min = 6, max = 40) + private String new_password; + + private String confirm_password; + private String accesstype; + + private String gender; + private String date_of_birth; + @Lob + private String how_you_know_aboutus; +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity1/SignUp.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity1/SignUp.java new file mode 100644 index 0000000..b52a808 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/entity1/SignUp.java @@ -0,0 +1,24 @@ +package com.realnet.users.entity1; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.Size; + +import lombok.Data; + +@Data +public class SignUp { + + private String first_name; + + private String last_name; + + private Long mob_no; + +// private Set role; + @NotBlank + @Size(min = 6, max = 40) + private String password; + + private String confirm_password; + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/repository/AboutWorkRepo.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/repository/AboutWorkRepo.java new file mode 100644 index 0000000..0f3dfe6 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/repository/AboutWorkRepo.java @@ -0,0 +1,19 @@ +package com.realnet.users.repository; + +import java.util.Optional; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +import com.realnet.session.entity.AboutWork; +import com.realnet.users.entity.Email; + +@Repository +public interface AboutWorkRepo extends JpaRepository{ + + +// Optional findById(Long id); + + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/repository/CompanyRepo.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/repository/CompanyRepo.java new file mode 100644 index 0000000..82a9037 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/repository/CompanyRepo.java @@ -0,0 +1,10 @@ +package com.realnet.users.repository; + +import org.springframework.data.jpa.repository.JpaRepository; + +import com.realnet.users.entity.Sys_Accounts; + +public interface CompanyRepo extends JpaRepository { + Sys_Accounts findByCompanyName(String company_name); + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/repository/RoleRepo.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/repository/RoleRepo.java new file mode 100644 index 0000000..4238333 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/repository/RoleRepo.java @@ -0,0 +1,15 @@ +package com.realnet.users.repository; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; + +import com.realnet.users.entity.Role; + +public interface RoleRepo extends JpaRepository { + // for pagination + Page findAll(Pageable p); + Role findByName(String name); + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/repository/SysAccountRepo.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/repository/SysAccountRepo.java new file mode 100644 index 0000000..c5f9bfb --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/repository/SysAccountRepo.java @@ -0,0 +1,13 @@ +package com.realnet.users.repository; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +import com.realnet.users.entity.Sys_Accounts; + +@Repository +public interface SysAccountRepo extends JpaRepository { + + Sys_Accounts findByEmail(String email); + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/repository/UserRepo.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/repository/UserRepo.java new file mode 100644 index 0000000..e0df3ae --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/repository/UserRepo.java @@ -0,0 +1,47 @@ +//package com.realnet.users.repository; +// +//import java.util.List; +//import java.util.Optional; +// +//import javax.validation.Valid; +// +//import org.springframework.data.domain.Pageable; +//import org.springframework.data.jpa.repository.JpaRepository; +//import org.springframework.data.jpa.repository.Query; +//import org.springframework.data.repository.query.Param; +// +//import com.realnet.session.entity.AboutWork; +//import com.realnet.users.entity.User; +//import com.realnet.users.entity1.AppUser; +// +//public interface UserRepo extends JpaRepository { +// User findByUsername(String username); +// +// User findByEmail(String email); +// +// Optional findByUsernameAndPassword(String username, String password); +// // @Query("SELECT CASE WHEN COUNT(c) > 0 THEN true ELSE false END FROM User p WHERE p.email = :email") +// +// Boolean existsByEmail(String email); +// +// // need modification +// @Query(value = "SELECT * FROM USER WHERE ACCOUNT_ID =:accId AND STATUS =:status", nativeQuery = true) +// List findByAccountIdAndStatus(@Param("accId") Long id, @Param("status") String status, Pageable pageable); +// +// @Query(value = "delete from user_roles where users_id= :user_id", nativeQuery = true) +// void deleteRelation(@Param("user_id") Long user_id); +// +// +// @Query(value = "SELECT * FROM USER WHERE user_id =:user_id AND checknumber =:checknumber", nativeQuery = true) +// User exitbychecknumber(@Param("user_id") Long user_id,@Param("checknumber") Long checknumber); +// +// // List findByAccountIdAndStatus(Long id, String status); +// +//// @Query("SELECT CASE WHEN COUNT(c) > 0 THEN true ELSE false END FROM User c WHERE c.name = :name") +//// Boolean existsByName(@Param("name") String name); +// +//// User findById(int acc_id); +// +//// public List findAll(); +// +//} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/repository1/AppUserDepartmentRepository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/repository1/AppUserDepartmentRepository.java new file mode 100644 index 0000000..c896a37 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/repository1/AppUserDepartmentRepository.java @@ -0,0 +1,11 @@ +package com.realnet.users.repository1; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +import com.realnet.users.entity1.AppUserDepartment; + +@Repository +public interface AppUserDepartmentRepository extends JpaRepository{ + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/repository1/AppUserPositionRepository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/repository1/AppUserPositionRepository.java new file mode 100644 index 0000000..41497fc --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/repository1/AppUserPositionRepository.java @@ -0,0 +1,11 @@ +package com.realnet.users.repository1; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +import com.realnet.users.entity1.AppUserPosition; + +@Repository +public interface AppUserPositionRepository extends JpaRepository{ + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/repository1/AppUserRepository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/repository1/AppUserRepository.java new file mode 100644 index 0000000..e001203 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/repository1/AppUserRepository.java @@ -0,0 +1,73 @@ +package com.realnet.users.repository1; + +import java.math.BigDecimal; +import java.util.List; +import java.util.Optional; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; + +import com.realnet.fnd.entity1.GrpMenuAccess; +import com.realnet.userlist.entity.UserList; +import com.realnet.users.entity1.AppUser; + +@Repository +public interface AppUserRepository extends JpaRepository { + + Optional findByUsername(String username); + +// AppUser findByEmail(String email); + + Optional findByUsernameAndUserPassw(String username, String userPassw); + + Boolean existsByEmail(String email); + + @Query(value = "SELECT customer_number FROM be_cust_master WHERE customer_id = ?1", countQuery = "SELECT count(*) FROM be_cust_master WHERE customer_id = ?1", nativeQuery = true) + String getCustomerNumber(BigDecimal customerId); + + @Query(value = "select refcodedesc from refcodedet where reftype = ?1 and refcode = ?2", countQuery = "select refcodedesc from refcodedet where reftype = ?1 and refcode = ?2", nativeQuery = true) + String getStatus(String tableName, String code); + + @Query(value = "SELECT * FROM sec_users a where a.email =?1", nativeQuery = true) + AppUser findByEmail(String email); + + @Query(value = "SELECT * FROM sec_users a where a.user_name =?1", nativeQuery = true) + AppUser findByUserName(String email); + + @Query(value = "SELECT * FROM sec_users a where a.random_no = ?1", nativeQuery = true) + AppUser findByToken(String random_no); + + @Query(value = "SELECT * FROM sec_grp_menu_access a where a.usr_grp= ?1", nativeQuery = true) + GrpMenuAccess findByUsrGrp(Long usr_grp); + + @Query(value = "SELECT * FROM sec_users a where a.account_id =?1", nativeQuery = true) + List getall(Long account_id); + + @Query(value = "SELECT * FROM sec_users a where a.usr_grp=42 and a.account_id =?1", nativeQuery = true) + List getalluser(Long account_id); + + @Query(value = "SELECT * FROM sec_users a where a.usr_grp=45 and a.account_id =?1", nativeQuery = true) + List getallguest(Long account_id); + + @Query(value = "SELECT * FROM sec_users a where a.user_id =?1", nativeQuery = true) + AppUser findByUserId(Long id); + + @Query(value = "SELECT * FROM sec_users where user_name LIKE %:keyword% ", nativeQuery = true) + List SearchByKeyword(@Param("keyword") String keyword); + + @Query(value = "SELECT * FROM sec_users a where a.active =true", nativeQuery = true) + Page getallusers(Pageable page); + + @Query(value = "SELECT * FROM sec_users a where a.user_id =?1 && access_till_date >= NOW();", nativeQuery = true) + AppUser findusertilldate(Long id); + + List findByFullNameContaining(String keyword); + +// @Query(value = "SELECT * FROM realnet_CNSBE.secuser_roles a.secuser_id =?1", nativeQuery = true) +// List getseuserroles(Long secuser_id); + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/repository1/AppUserRoleRepository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/repository1/AppUserRoleRepository.java new file mode 100644 index 0000000..3af437e --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/repository1/AppUserRoleRepository.java @@ -0,0 +1,11 @@ +package com.realnet.users.repository1; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +import com.realnet.users.entity1.AppUserRole; + +@Repository +public interface AppUserRoleRepository extends JpaRepository{ + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/repository1/AppUserSessionsRepository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/repository1/AppUserSessionsRepository.java new file mode 100644 index 0000000..b60d9a0 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/repository1/AppUserSessionsRepository.java @@ -0,0 +1,20 @@ +package com.realnet.users.repository1; + +import java.util.List; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.stereotype.Repository; + +import com.realnet.users.entity1.AppUser; +import com.realnet.users.entity1.AppUserSessions; +import com.realnet.users.entity1.AppUserSessionsCompositeKey; + +@Repository +public interface AppUserSessionsRepository extends JpaRepository{ + + List findByUserId(AppUser userId); + + @Query(value = "SELECT * FROM realnet_CNSBE.sec_user_sessions where session_id = ?1",nativeQuery = true) + AppUserSessions findBySessionId(String sessionId); +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/repository1/passwordTokenRepository.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/repository1/passwordTokenRepository.java new file mode 100644 index 0000000..cbda7bf --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/repository1/passwordTokenRepository.java @@ -0,0 +1,23 @@ +package com.realnet.users.repository1; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.query.Param; + +import com.realnet.users.entity.PasswordResetToken; + +public interface passwordTokenRepository extends JpaRepository { + +// @Query(value = "SELECT * FROM password_reset_token a where a.token =?1", nativeQuery = true) +// +// Optional findByToken(String token); + +// @Query(value = "SELECT * FROM password_reset_token a where a.token = ?1", nativeQuery = true) +// +// PasswordResetToken findByToken(String token); + + @Query(value="SELECT * FROM password_reset_token a where a.token=:token", nativeQuery = true) + PasswordResetToken findByToken(@Param("token") String token); + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/response/MessageResponse.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/response/MessageResponse.java new file mode 100644 index 0000000..21acd23 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/response/MessageResponse.java @@ -0,0 +1,17 @@ +package com.realnet.users.response; + +public class MessageResponse { + private String message; + + public MessageResponse(String message) { + this.message = message; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/response/ServiceResponse.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/response/ServiceResponse.java new file mode 100644 index 0000000..ce53ae5 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/response/ServiceResponse.java @@ -0,0 +1,29 @@ +package com.realnet.users.response; + +public class ServiceResponse { + private int status; + + private Object data; + + public ServiceResponse(int status, Object data) { + this.status = status; + this.data = data; + } + + public int getStatus() { + return status; + } + + public void setStatus(int status) { + this.status = status; + } + + public Object getData() { + return data; + } + + public void setData(Object result) { + this.data = result; + } + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/response/UserItem.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/response/UserItem.java new file mode 100644 index 0000000..44acb0a --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/response/UserItem.java @@ -0,0 +1,12 @@ +package com.realnet.users.response; + +import lombok.Data; + +@Data +public class UserItem { + private Long userId; + private String firstName; + private String fullname; + private String email; + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/response/UserResponse.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/response/UserResponse.java new file mode 100644 index 0000000..6c67d88 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/response/UserResponse.java @@ -0,0 +1,15 @@ +package com.realnet.users.response; + +import com.realnet.fnd.response.OperationResponse; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper = false) +public class UserResponse extends OperationResponse { + @ApiModelProperty(required = true, value = "") + private UserItem item; + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/service/AboutServiceImple.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/service/AboutServiceImple.java new file mode 100644 index 0000000..63fc28e --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/service/AboutServiceImple.java @@ -0,0 +1,132 @@ +package com.realnet.users.service; + +import javax.validation.Valid; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; +import org.springframework.stereotype.Service; + +import com.realnet.exceptions.ResourceNotFoundException; +import com.realnet.session.entity.AboutWork; +import com.realnet.users.entity.Email; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.repository.AboutWorkRepo; +import com.realnet.utils.Constant; + + +@Service +public class AboutServiceImple implements AboutWorkService { + + @Autowired + private AboutWorkRepo aboutworkrepo; + + @Autowired + private BCryptPasswordEncoder bcryptEncoder; + + @Override + public AboutWork adddata(AboutWork data) { + // TODO Auto-generated method stub + + AboutWork a=new AboutWork(); + a.setId(data.getId()); + a.setName(data.getName()); + + + AppUser user =new AppUser(); + user.setChangePassw(data.getPassword()); + user.setEmail(data.getEmail()); +// user.setPhone(data.getMobile()); + + + + AboutWork about=aboutworkrepo.save(a); + + + return about; + } + + @Override + public AboutWork updateById(Long id, @Valid AboutWork about) { + AboutWork oldUser = aboutworkrepo.findById(id) + .orElseThrow(() -> new ResourceNotFoundException(Constant.NOT_FOUND_EXCEPTION + " :" + id)); + oldUser.setName(about.getName()); + oldUser.setMobile(about.getMobile()); + oldUser.setEmail(about.getEmail()); + oldUser.setPassword(bcryptEncoder.encode(about.getPassword())); + oldUser.setCompanyname(about.getCompanyname()); + oldUser.setPancard(about.getPancard()); + AboutWork updatedUser = aboutworkrepo.save(oldUser); + return updatedUser; + } + + @Override + public AboutWork updateById2(Long id, @Valid AboutWork about) { + AboutWork oldUser = aboutworkrepo.findById(id) + .orElseThrow(() -> new ResourceNotFoundException(Constant.NOT_FOUND_EXCEPTION + " :" + id)); + + oldUser.setCompanyname(about.getCompanyname()); + oldUser.setPancard(about.getPancard()); + AboutWork updatedUser = aboutworkrepo.save(oldUser); + return updatedUser; + } + + + @Override + public AboutWork updateById3(Long id, @Valid AboutWork about) { + AboutWork oldUser = aboutworkrepo.findById(id) + .orElseThrow(() -> new ResourceNotFoundException(Constant.NOT_FOUND_EXCEPTION + " :" + id)); + oldUser.setWorking(about.getWorking()); + AboutWork updatedUser = aboutworkrepo.save(oldUser); + return updatedUser; + } + + + @Override + public AboutWork adddata(Email email) { + // TODO Auto-generated method stub + AboutWork a=new AboutWork(); + a.setId(email.getId()); + + AboutWork about=aboutworkrepo.save(a); + return about; + } + +// @Override +// public AboutWork adddata(Email email) { +// +// AboutWork a=new AboutWork(); +// a.setId(email.getUserId()); +// a.setName(email.getEmail1()); +// a.setName(email.getEmail2()); +// a.setName(email.getEmail3()); +// a.setName(email.getEmail4()); +// +// +// +// User user =new User(); +// user.setPassword(email.getPassword()); +// user.setEmail(email.getEmail1()); +// user.setEmail(email.getEmail2()); +// user.setEmail(email.getEmail3()); +// user.setEmail(email.getEmail4()); +//AboutWork about=aboutworkrepo.save(a); +// +// +// return about; +// } + +// @Override +// public AboutWork updateById(Long id, @Valid AboutWork aboutWork) { +// // TODO Auto-generated method stub +// +// AboutWork oldUser = aboutworkrepo.findById(id) +// .orElseThrow(() -> new ResourceNotFoundException(Constant.NOT_FOUND_EXCEPTION + " :" + id)); +// +// oldUser.setCompanyname(aboutWork.getCompanyname()); +// +// final AboutWork updatedUser = aboutworkrepo.save(oldUser); +// return updatedUser; +// } + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/service/AboutWorkService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/service/AboutWorkService.java new file mode 100644 index 0000000..e4ee966 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/service/AboutWorkService.java @@ -0,0 +1,23 @@ +package com.realnet.users.service; + +import com.realnet.session.entity.AboutWork; +import com.realnet.users.entity.Email; + +public interface AboutWorkService { + public AboutWork adddata(AboutWork data); + + public AboutWork updateById(Long id, AboutWork about); + public AboutWork updateById2(Long id, AboutWork about); + public AboutWork updateById3(Long id, AboutWork about); + + public AboutWork adddata(Email email); + +// public AboutWork adddata(Email email); + +// public AboutWork adddata(Email email); + +// public AboutWork updateById(Long id, @Valid AboutWork aboutWork); + +// User adddata(User data); + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/service/CompanyService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/service/CompanyService.java new file mode 100644 index 0000000..db2198b --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/service/CompanyService.java @@ -0,0 +1,21 @@ +package com.realnet.users.service; + +import java.util.List; + +import com.realnet.users.entity.CompanyDto; +import com.realnet.users.entity.Sys_Accounts; + +public interface CompanyService { + // creating new company + Sys_Accounts companyResister(CompanyDto company); + + public boolean insertOrSaveCompany(Sys_Accounts company); + // company registration + + List getAll(); + + public Sys_Accounts getById(Long id); + + void delete(long id); + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/service/CompanyServiceImpl.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/service/CompanyServiceImpl.java new file mode 100644 index 0000000..67c1901 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/service/CompanyServiceImpl.java @@ -0,0 +1,98 @@ +//package com.realnet.users.service; +// +//import java.util.List; +// +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.stereotype.Service; +// +//import com.realnet.users.entity.CompanyDto; +//import com.realnet.users.entity.Sys_Accounts; +//import com.realnet.users.entity.User; +//import com.realnet.users.repository.CompanyRepo; +//import com.realnet.users.repository.RoleRepo; +//import com.realnet.users.repository.UserRepo; +// +//import lombok.extern.slf4j.Slf4j; +// +//@Slf4j +//@Service +//public class CompanyServiceImpl implements CompanyService { +// +// @Autowired +// private UserRepo userRepo; +// +// @Autowired +// private RoleRepo roleRepo; +// +// @Autowired +// private CompanyRepo companyRepo; +// +// public List getAll() { +// return companyRepo.findAll(); +// +// } +// +// @Override +// public void delete(long id) { +// companyRepo.deleteById(id); +// } +// +// @Override +// public Sys_Accounts getById(Long id) { +// return companyRepo.findById(id).get(); +// } +// +// public boolean addNewCompany(Sys_Accounts company) { +// boolean exists = companyRepo.existsById(company.getAccount_id()); +// if (exists) { +// return false; +// } else { +// return this.insertOrSaveCompany(company); +// +// } +// } +// +//// public User resister(UserDto user) { +//// User newUser = new User(); +//// newUser.setEmail(user.getEmail()); +//// newUser.setFirstName(user.getFirstName()); +//// newUser.setLastName(user.getLastName()); +//// Role admin_role = roleRepo.findByName("ADMIN"); +//// Role user_role = roleRepo.findByName("USER"); +//// Role billing_role = roleRepo.findByName("BILLING"); +//// Set roles = new HashSet(); +//// roles.add(admin_role); +//// roles.add(user_role); +//// roles.add(billing_role); +//// newUser.setRoles(roles); +//// return userRepo.save(newUser); +//// } +// +// //########## MOD NEEDED ########## +// @Override +// public Sys_Accounts companyResister(CompanyDto company) { +// Sys_Accounts newCompany = new Sys_Accounts(); +// newCompany.setCompanyName(company.getCompanyName()); +// newCompany.setGstNumber(company.getGstNumber()); +// newCompany.setWorkspace(company.getWorkspace()); +// log.info("companyResister() -> CompanyDto : {}", newCompany); +// Sys_Accounts savedCompany = companyRepo.save(newCompany); +// log.info("companyResister() -> savedCompany : {}", savedCompany); +// +// String userEmail = company.getUserEmail(); +// log.info("companyResister() -> userEmail : {}", userEmail); +// User user = userRepo.findByEmail(userEmail); +// //user.setCompany(savedCompany); +// user.setSys_account(savedCompany); +// userRepo.save(user); +// log.info("companyResister() -> savedUser : {}", user); +// return savedCompany; +// } +// +// @Override +// public boolean insertOrSaveCompany(Sys_Accounts company) { +// this.companyRepo.save(company); +// return true; +// } +// +//} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/service/RoleService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/service/RoleService.java new file mode 100644 index 0000000..da25b0d --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/service/RoleService.java @@ -0,0 +1,29 @@ +package com.realnet.users.service; + +import java.util.List; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.http.ResponseEntity; + +import com.realnet.users.entity.Role; +import com.realnet.users.entity1.AppUser; + +public interface RoleService { + + public List getRoles(); + + public Page getAll(Pageable page); + + public Role getRoleById(Long id); + + ResponseEntity addRole(Role role); + + ResponseEntity deleteRole(Long id); + + ResponseEntity updateRole(Long id, Role role); + + // add or remove a Role on a user + public AppUser addRole(Long id, Long roleId); + public AppUser removeRole(Long id, Long roleId); +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/service/RoleServiceImpl.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/service/RoleServiceImpl.java new file mode 100644 index 0000000..b271a97 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/service/RoleServiceImpl.java @@ -0,0 +1,173 @@ +package com.realnet.users.service; + +import java.util.HashSet; +import java.util.List; +import java.util.Optional; +import java.util.Set; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Service; + +import com.realnet.exceptions.InvalidUserDataException; +import com.realnet.exceptions.ResourceNotFoundException; +import com.realnet.users.entity.Role; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.repository.RoleRepo; +import com.realnet.users.repository1.AppUserRepository; +import com.realnet.users.service1.AppUserService; + +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@Service +public class RoleServiceImpl implements RoleService { // UserDetailsService, + + @Autowired + private AppUserRepository userRepository; + @Autowired(required=false) + private AppUserService userService; + + + + @Autowired + private RoleRepo roleRepository; + + @Override + public List getRoles() { + return roleRepository.findAll(); + } + + @Override + public Page getAll(Pageable page) { + return roleRepository.findAll(page); + } + + @Override + public Role getRoleById(Long id) { + Role role = roleRepository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Role not found :: " + id)); + return role; + } + + @Override + public ResponseEntity addRole(Role role) { + Role newRole = new Role(); + newRole.setName(role.getName()); + newRole.setDescription(role.getDescription()); + Set roleList = new HashSet<>(); + roleList.add(newRole); + // for(int i=0; i< role.getUsers().size(); i++){ + for (AppUser user : role.getAppusers()) { + // if(!userRepository.findByEmail(role.getUsers().get(i).getEmail()).isPresent()) + // { + AppUser usr = userRepository.findByEmail(user.getEmail()); + if (usr != null) { + AppUser newUser = user; + newUser.setRoles(roleList); + AppUser savedUser = userRepository.save(newUser); + if (!userRepository.findById(savedUser.getUserId()).isPresent()) + return ResponseEntity.unprocessableEntity().body("Role Creation Failed"); + } else + return ResponseEntity.unprocessableEntity().body("User with email Id is already Present"); + } + return ResponseEntity.ok("Successfully created Role"); + + } + + @Override + public ResponseEntity deleteRole(Long id) { + if (roleRepository.findById(id).isPresent()) { + if (roleRepository.getOne(id).getAppusers().size() == 0) { + roleRepository.deleteById(id); + if (roleRepository.findById(id).isPresent()) { + return ResponseEntity.unprocessableEntity().body("Failed to delete the specified record"); + } else + return ResponseEntity.ok().body("Successfully deleted specified record"); + } else + return ResponseEntity.unprocessableEntity() + .body("Failed to delete, Please delete the users associated with this role"); + } else + return ResponseEntity.unprocessableEntity().body("No Records Found"); + } + + @Override + public ResponseEntity updateRole(Long id, Role role) { + if (roleRepository.findById(id).isPresent()) { + Role newRole = roleRepository.findById(id).get(); + newRole.setName(role.getName()); + newRole.setDescription(role.getDescription()); + Role savedRole = roleRepository.save(newRole); + if (roleRepository.findById(savedRole.getId()).isPresent()) + return ResponseEntity.accepted().body("Role saved successfully"); + else + return ResponseEntity.badRequest().body("Failed to update Role"); + } else + return ResponseEntity.unprocessableEntity().body("Specified Role not found"); + } + + + public void addUserRole(AppUser user, long roleId) { + Optional roleOpt = roleRepository.findById(roleId); + if (!roleOpt.isPresent()) { + throw new ResourceNotFoundException("Role cannot be null"); + } + user.getRoles().add(roleOpt.get()); + } + + /* ==== WORKING CODE ==== */ + @Override + public AppUser addRole(Long id, Long roleId) { + // check user + Optional userOpt = userRepository.findById(id); + if (!userOpt.isPresent()) { + throw new ResourceNotFoundException(String.format("User not found with Id = %s", id)); + } + AppUser user = userOpt.get(); + // check role + Optional roleOpt = roleRepository.findById(roleId); + if (!roleOpt.isPresent()) { + throw new ResourceNotFoundException(String.format("Role not found with Id = %s", roleId)); + } + Role role = roleOpt.get(); + + // ==== MOD ==== + // check if user already have that role... + if(user.getRoles().contains(role)) { + throw new InvalidUserDataException(String.format("Role %s already exists with the User = %s", roleId, id)); + } + user.getRoles().add(role); +// user.setUpdateby(userService.getLoggedInUserId()); + userRepository.save(user); + log.info(String.format("Added role %s on user id = %s", role.getName(), user.getUserId())); + return user; + } + @Override + public AppUser removeRole(Long id, Long roleId) { + // check user + Optional userOpt = userRepository.findById(id); + if (!userOpt.isPresent()) { + throw new ResourceNotFoundException(String.format("User not found with Id = %s", id)); + } + AppUser user = userOpt.get(); + // check role + Optional roleOpt = roleRepository.findById(roleId); + if (!roleOpt.isPresent()) { + throw new ResourceNotFoundException(String.format("Role not found with Id = %s", roleId)); + } + Role role = roleOpt.get(); + user.getRoles().remove(role); + + // === MOD NEEDED + if(user.getRoles().isEmpty()) { + throw new InvalidUserDataException(String.format("User %s Must Have a Single Role", id)); + //user.setRoles(roleRepository.findByName("USER")); + } +// user.setUpdatedBy(userService.getLoggedInUserId()); + userRepository.save(user); + log.info(String.format("Removed role %s on user id = %s", role.getName(), user.getUserId())); + return user; + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/service/UserService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/service/UserService.java new file mode 100644 index 0000000..22b630c --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/service/UserService.java @@ -0,0 +1,94 @@ +//package com.realnet.users.service; +// +//import java.util.List; +// +//import javax.validation.Valid; +// +//import com.realnet.session.entity.AboutWork; +//import com.realnet.users.entity.User; +//import com.realnet.users.entity.UserDto; +//import com.realnet.users.entity.UserProfileDTO; +// +//public interface UserService { +// public boolean insertOrSaveUser(User user); +// +// public List getAllUsers(); +// +// // company registration +// List getAll(); +// +// void delete(long id); +// +// // Optional getByUserNameAndPassword(String username, String password); +// User getByUserNameAndPassword(String username, String password); +// +// User getByUserName(String username); +// +// User getByEmail(String email); +// +// User getById(Long id); +// +// boolean existsByEmail(String email); +// +// // update by username +// User updateByEmail(String email, UserProfileDTO userProfile); +// +// // get logged in user details +// String getLoggedInUserEmail(); +// +// Long getLoggedInUserId(); +// +// Long getLoggedInUserAccountId(); +// +// User getLoggedInUser(); +// +// User getUserInfoByUserId(Long userId); +// +// // creating new user (sign up user as ADMIN) +// User userResister(UserDto user); +// +// // --- USERS ADDED BY ADMIN --- +// User createUserByAdmin(User user); +//// List getUsersByAccountId(Long id); +// //List getUsersByCompanyId(Long id); // need mod +// public User updateById(Long id, User UserRequest); +// boolean deleteById(Long id); +// +// boolean changePassword(String oldPassword, String newPassword); +// +// public void sendEmail(String email,Long id,Long checkNo); +// +// public User adddata(AboutWork about); +// +// public User updateById(Long id, @Valid AboutWork aboutWork); +// public User updateById2(Long id, @Valid AboutWork aboutWork); +// +// public User userResister(User user, Long id); +// +// +// User updateByIdWorkingId(Long id, @Valid AboutWork aboutWork); +// +// User updateByMangingWork(Long id, @Valid AboutWork aboutWork); +// +// public User userResisteremail(User user); +// +// public void sendEmail2(String email1, Long userId, Long checknumber); +// +// public void sendEmail3(String email2, Long userId, Long checknumber); +// +// public void sendEmail4(String email3, Long userId, Long checknumber); +// +// public void sendEmail5(String email4, Long userId, Long checknumber); +// +// //public boolean exitbychecknumber(Long userId, Long checknumber); +// public User exitbychecknumber(Long userId, Long checknumber); +// +// public User save(User user); +// +// +// +//// public List save(List about); +// +// +// +//} \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/service1/AppUserRoleServiceImpl.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/service1/AppUserRoleServiceImpl.java new file mode 100644 index 0000000..9860598 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/service1/AppUserRoleServiceImpl.java @@ -0,0 +1,44 @@ +package com.realnet.users.service1; + +import java.util.List; +import java.util.Optional; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Sort; +import org.springframework.stereotype.Service; + +import com.realnet.users.entity1.AppUserRole; +import com.realnet.users.repository1.AppUserRoleRepository; + +@Service +public class AppUserRoleServiceImpl { + private AppUserRoleRepository appUserRoleRepository; + private AppUserServiceImpl appUserServiceImpl; + @Autowired + public AppUserRoleServiceImpl(AppUserRoleRepository appUserRoleRepository, + AppUserServiceImpl appUserServiceImpl) { + super(); + this.appUserRoleRepository = appUserRoleRepository; + this.appUserServiceImpl = appUserServiceImpl; + + } + public List getAll(){ + + return appUserRoleRepository.findAll(Sort.by(Sort.Direction.ASC, "usrGrp")); + } + public Optional getOne(Long id){ + return appUserRoleRepository.findById(id); + } + public AppUserRole addOne(AppUserRole appUserRole) { +// String createdBy = appUserServiceImpl.getLoggedInUser().getUsername(); +// String updatedBy = createdBy; +// appUserRole.setCreateby(createdBy); +// appUserRole.setUpdateby(updatedBy); + return appUserRoleRepository.save(appUserRole); + } + public AppUserRole updateOne(AppUserRole appUserRole) { + String updatedBy = appUserServiceImpl.getLoggedInUser().getUsername(); + appUserRole.setUpdateby(updatedBy); + return appUserRoleRepository.save(appUserRole); + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/service1/AppUserService.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/service1/AppUserService.java new file mode 100644 index 0000000..7af18ee --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/service1/AppUserService.java @@ -0,0 +1,85 @@ +package com.realnet.users.service1; + +import java.util.List; +import java.util.Optional; + + +import com.realnet.users.entity1.AppUser; + +public interface AppUserService { + public boolean insertOrSaveUser(AppUser appUser); + + public List getAllUsers(); + + // company registration + List getAll(); + + void delete(long id); + + // Optional getByUserNameAndPassword(String username, String password); + AppUser getByUserNameAndPassword(String username, String userPassw); + + Optional getByUserName(String username); + + AppUser getByEmail(String email); + + Optional getById(Long id); + + boolean existsByEmail(String email); + + // update by username +// User updateByEmail(String email, UserProfileDTO userProfile); + + // get logged in user details + String getLoggedInUserEmail(); + + Long getLoggedInUserId(); + + Long getLoggedInUserAccountId(); + + AppUser getLoggedInUser(); + + AppUser getUserInfoByUserId(Long userId); + + // creating new user (sign up user as ADMIN) + AppUser userResister(AppUser appUser); + + // --- USERS ADDED BY ADMIN --- + AppUser createUserByAdmin(AppUser appUser); +// List getUsersByAccountId(Long id); + //List getUsersByCompanyId(Long id); // need mod +// public User updateById(Long id, User UserRequest); + boolean deleteById(Long id); + +// boolean changePassword(String oldPassword, String newPassword); + + public void sendEmail(String email,Long id,Long checkNo); + + //public User adddata(AboutWork about); + +// public User updateById(Long id, @Valid AboutWork aboutWork); +// public User updateById2(Long id, @Valid AboutWork aboutWork); + + public AppUser userResister(AppUser user, Long id); + + +// User updateByIdWorkingId(Long id, @Valid AboutWork aboutWork); + +// User updateByMangingWork(Long id, @Valid AboutWork aboutWork); + +// public User userResisteremail(User user); +// +// public void sendEmail2(String email1, Long userId, Long checknumber); +// +// public void sendEmail3(String email2, Long userId, Long checknumber); +// +// public void sendEmail4(String email3, Long userId, Long checknumber); +// +// public void sendEmail5(String email4, Long userId, Long checknumber); +// + //public boolean exitbychecknumber(Long userId, Long checknumber); + //public User exitbychecknumber(Long userId, Long checknumber); + +// public User save(User user); + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/service1/AppUserServiceImpl.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/service1/AppUserServiceImpl.java new file mode 100644 index 0000000..5d61d93 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/service1/AppUserServiceImpl.java @@ -0,0 +1,616 @@ +package com.realnet.users.service1; + +import java.math.BigDecimal; +import java.security.SecureRandom; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.HashSet; +import java.util.List; +import java.util.Optional; +import java.util.Set; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.security.core.userdetails.UserDetails; +import org.springframework.security.core.userdetails.UserDetailsService; +import org.springframework.security.core.userdetails.UsernameNotFoundException; +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; +import org.springframework.stereotype.Service; +import org.springframework.util.StringUtils; + +import com.realnet.exceptions.ResourceNotFoundException; +import com.realnet.userDTO.User; +import com.realnet.users.entity.PasswordResetRequest; +import com.realnet.users.entity.PasswordResetToken; +import com.realnet.users.entity.Role; +import com.realnet.users.entity.Sys_Accounts; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.entity1.AppUserDepartment; +import com.realnet.users.entity1.AppUserDto; +import com.realnet.users.entity1.AppUserPosition; +import com.realnet.users.entity1.AppUserPrinciple; +import com.realnet.users.entity1.AppUserRole; +import com.realnet.users.entity1.Registration; +import com.realnet.users.repository.RoleRepo; +import com.realnet.users.repository.SysAccountRepo; +import com.realnet.users.repository1.AppUserDepartmentRepository; +import com.realnet.users.repository1.AppUserPositionRepository; +import com.realnet.users.repository1.AppUserRepository; +import com.realnet.users.repository1.AppUserRoleRepository; +import com.realnet.users.repository1.passwordTokenRepository; + +import lombok.extern.slf4j.Slf4j; + +@Service +@Slf4j +public class AppUserServiceImpl implements UserDetailsService, AppUserService { + + @Autowired + private RoleRepo roleRepo; + + @Autowired + private SysAccountRepo sysAccountRepo; + + private passwordTokenRepository passwordTokenRepository; + private AppUserRepository appUserRepository; + private AppUserRoleRepository appUserRoleRepository; + private AppUserPositionRepository appUserPositionRepository; + private AppUserDepartmentRepository appUserDepartmentRepository; + private BCryptPasswordEncoder bcryptEncoder; + + @Autowired + public AppUserServiceImpl(AppUserRepository appUserRepository, BCryptPasswordEncoder bCryptPasswordEncoder, + AppUserRoleRepository appUserRoleRepository, AppUserPositionRepository appUserPositionRepository, + AppUserDepartmentRepository appUserDepartmentRepository, passwordTokenRepository passwordTokenRepository) { + super(); + this.appUserRepository = appUserRepository; + this.bcryptEncoder = bCryptPasswordEncoder; + this.appUserRoleRepository = appUserRoleRepository; + this.appUserPositionRepository = appUserPositionRepository; + this.appUserDepartmentRepository = appUserDepartmentRepository; + this.passwordTokenRepository = passwordTokenRepository; + } + + @Override + public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { + Optional user = appUserRepository.findByUsername(username); + if (user.get() == null) { + throw new UsernameNotFoundException("Invalid Email or password."); + } + AppUserPrinciple appUserPrinciple = new AppUserPrinciple(user.get()); + + return appUserPrinciple; + } + + public List getAllAppUsers(Pageable page) { + Page p = appUserRepository.getallusers(page); + List l = p.getContent(); + for (AppUser o : l) { + if (o.getCustomerId() != null) { + o.setCustomerNumer(appUserRepository.getCustomerNumber(BigDecimal.valueOf(o.getCustomerId()))); + } + if (o.getUsrGrp() != null) { + o.setUsrGrpId(o.getUsrGrp().getUsrGrp()); + o.setUsrGrpName(o.getUsrGrp().getGroupName()); + o.setUsrGrp(null); + } + if (o.getPositionCode() != null) { + o.setPositionCodeString(o.getPositionCode().getPositionCode()); + o.setPositionCode(null); + } + if (o.getDepartmentCode() != null) { + o.setDepartmentCodeString(o.getDepartmentCode().getDepartmentCode()); + o.setDepartmentCode(null); + } +// if(o.getStatus()!=null) { +// String s = getStatus("USRST",o.getStatus()); +// if(s!=null) { +// o.setStatus(s); +// } +// } + } + return l; + } + + public AppUser addOneUser(Registration reg) { + AppUser appUser = findUserByEmail(reg.getEmail()); + if (reg.getNew_password().equals(reg.getConfirm_password())) { + +// appUser.setEmail(reg.getEmail()); + appUser.setUsername(reg.getEmail()); + + AppUserRole r = null; + if (reg.getUsrGrpId() != null) { + r = appUserRoleRepository.findById(reg.getUsrGrpId()).orElse(null); + } + + if (r != null) { + appUser.setUsrGrp(r); + } + + Sys_Accounts account = sysAccountRepo.findById(reg.getAccount_id()).orElseThrow(null); + appUser.setAccount(account); + appUser.setFullName(reg.getFirst_name() + " " + reg.getLast_name()); + appUser.setMob_no(reg.getMob_no()); + appUser.setChangePassw(reg.getNew_password()); + appUser.setUserPassw(bcryptEncoder.encode(reg.getNew_password())); + appUser.setIsComplete(true); + appUser.setActive(true); + + appUser.setAccesstype(reg.getAccesstype()); + Set strRoles = appUser.getRoles(); + Set roles = new HashSet<>(); + + if (strRoles.isEmpty()) { + String role1 = "ROLE_ADMIN"; + Role userRole = roleRepo.findByName(role1); + roles.add(userRole); + appUser.setRoles(roles); + } + } + + AppUser save = appUserRepository.save(appUser); +// System.out.println("saved user is .." + save); + + return save; + } + + public AppUser addOneUserCustom(User ppUser) { + AppUser appUser = new AppUser(); + appUser.setUsername(ppUser.getUsername()); + appUser.setFullName(ppUser.getFullName()); + appUser.setEmail(ppUser.getEmail()); + appUser.setUserPassw(bcryptEncoder.encode(ppUser.getPassword())); + appUser.setChangePassw(ppUser.getPassword()); + appUser.setShortName(ppUser.getFirstName()); + appUser.setUsrGrpName(ppUser.getRole()); + appUser.setAbout(ppUser.getAbout()); +// appUser.setProvider( ppUser.getProvider().name()); + appUser.setCountry(ppUser.getCountry()); + appUser.setBlocked(false); + appUser.setIsComplete(true); + appUser.setActive(true); + + appUser.setChecknumber(ppUser.getChecknumber()); + appUser.setUsrGrp(appUserRoleRepository.findById(42l).get()); + Sys_Accounts account = sysAccountRepo.findByEmail(ppUser.getEmail()); + if (account != null) { + appUser.setAccount(account); + } else { + appUser.setAccount(sysAccountRepo.findById(1l).get()); + + } + + appUser.setUsrGrp(appUserRoleRepository.findById(46l).orElse(null)); + + Set roles = new HashSet<>(); + String role1 = "ROLE_ADMIN"; + Role userRole = roleRepo.findByName(role1); + roles.add(userRole); + appUser.setRoles(roles); + if (appUserRepository.findByEmail(ppUser.getEmail()) != null) { + return null; + } + return appUserRepository.save(appUser); + } + + public Optional getOneUser(Long id) { + Optional o = appUserRepository.findById(id); + if (o.get() != null) { + // o.get().setCustomerNumer(appUserRepository.getCustomerNumber(o.get().getCustomerId())); + if (o.get().getCustomerId() != null) { + o.get().setCustomerNumer( + appUserRepository.getCustomerNumber(BigDecimal.valueOf(o.get().getCustomerId()))); + } + if (o.get().getUsrGrp() != null) { + o.get().setUsrGrpId(o.get().getUsrGrp().getUsrGrp()); + o.get().setUsrGrpName(o.get().getUsrGrp().getGroupName()); + o.get().setUsrGrp(null); + } + if (o.get().getPositionCode() != null) { + o.get().setPositionCodeString(o.get().getPositionCode().getPositionCode()); + o.get().setPositionCode(null); + } + if (o.get().getDepartmentCode() != null) { + o.get().setDepartmentCodeString(o.get().getDepartmentCode().getDepartmentCode()); + o.get().setDepartmentCode(null); + } + } + return o; + } + + @Override + public boolean insertOrSaveUser(AppUser appUser) { + // TODO Auto-generated method stub + appUserRepository.save(appUser); + return true; + } + + @Override + public List getAllUsers() { + // TODO Auto-generated method stub + List users = appUserRepository.findAll(); + // users.forEach(o->o.setCustomerNumer(appUserRepository.getCustomerNumber(o.getCustomerId()))); + return users; + } + + @Override + public List getAll() { + // TODO Auto-generated method stub + List list = new ArrayList<>(); + appUserRepository.findAll().iterator().forEachRemaining(list::add); + // list.forEach(o->o.setCustomerNumer(appUserRepository.getCustomerNumber(o.getCustomerId()))); + return list; + } + + @Override + public void delete(long id) { + appUserRepository.deleteById(id); + } + + @Override + public AppUser getByUserNameAndPassword(String username, String password) { + // TODO Auto-generated method stub + String userPassw = bcryptEncoder.encode(password); + AppUser user = appUserRepository.findByUsernameAndUserPassw(username, userPassw).orElse(null); + return user; + } + + @Override + public Optional getByUserName(String username) { + // TODO Auto-generated method stub + return appUserRepository.findByUsername(username); + } + + @Override + public AppUser getByEmail(String email) { + // TODO Auto-generated method stub + AppUser user = appUserRepository.findByEmail(email); + return user; + } + + @Override + public Optional getById(Long id) { + // TODO Auto-generated method stub + return appUserRepository.findById(id); + } + + @Override + public boolean existsByEmail(String email) { + // TODO Auto-generated method stub + return appUserRepository.existsByEmail(email); + } + + @Override + public String getLoggedInUserEmail() { + // TODO Auto-generated method stub + Authentication auth = SecurityContextHolder.getContext().getAuthentication(); + if (auth == null) { + return "noSession"; + } + return auth.getName(); + } + + @Override + public Long getLoggedInUserId() { + // TODO Auto-generated method stub + String loggedInUserEmail = this.getLoggedInUserEmail(); + AppUser appUser = appUserRepository.findByEmail(loggedInUserEmail); + Long id = appUser.getUserId(); + return id; + } + + @Override + public Long getLoggedInUserAccountId() { + // TODO Auto-generated method stub + return null; + } + + @Override + public AppUser getLoggedInUser() { + String loggedInUserName = this.getLoggedInUserEmail(); + Optional user = appUserRepository.findByUsername(loggedInUserName); +// log.info("getLoggedInUser() : {} ", user.get()); + return user.get(); + } + + @Override + public AppUser getUserInfoByUserId(Long userId) { + // TODO Auto-generated method stub + AppUser user = appUserRepository.findById(userId).orElse(null); + return user; + } + + @Override + public AppUser userResister(AppUser appUser) { + // TODO Auto-generated method stub + appUser.setUserPassw(bcryptEncoder.encode(appUser.getUserPassw())); + return appUserRepository.save(appUser); + } + + @Override + public AppUser createUserByAdmin(AppUser appUser) { + appUser.setUserPassw(bcryptEncoder.encode(appUser.getUserPassw())); + return appUserRepository.save(appUser); + } + + @Override + public boolean deleteById(Long id) { + // TODO Auto-generated method stub + if (!appUserRepository.existsById(id)) { + throw new ResourceNotFoundException("User not exists"); + } + appUserRepository.deleteById(id); + return true; + } + + @Override + public void sendEmail(String email, Long id, Long checkNo) { + // TODO Auto-generated method stub + + } + + public User userResister(User user, Long id) { + // TODO Auto-generated method stub + return null; + } + + public AppUser updateOneUser(AppUser appUser) { + return appUserRepository.save(appUser); + } + + public AppUser updateAppUserDto(Long userId, AppUserDto appUserDto) { + AppUser a = appUserRepository.findById(userId).orElse(null); + if (a != null) { + String encodedPass1 = bcryptEncoder.encode(appUserDto.getUserPassw()); + if (a.getUserPassw() != encodedPass1) { + a.setUserPassw(encodedPass1); + a.setPwdChangedCnt((long) 0); + a.setPwdChangedCnt(a.getPwdChangedCnt() + 1); + a.setLastPwdChangedDate(new Date()); + } + a.setUsername(appUserDto.getUsername() != null ? appUserDto.getUsername() : a.getUsername()); + a.setTitle(appUserDto.getTitle() != null ? appUserDto.getTitle() : a.getTitle()); + a.setShortName(appUserDto.getShortName() != null ? appUserDto.getShortName() : a.getShortName()); + a.setFullName(appUserDto.getFullName() != null ? appUserDto.getFullName() : a.getFullName()); + a.setStatus(appUserDto.getStatus() != null ? appUserDto.getStatus() : a.getStatus()); + a.setCustomerId(appUserDto.getCustomerId() != null ? appUserDto.getCustomerId() : a.getCustomerId()); + a.setEmail(appUserDto.getEmail() != null ? appUserDto.getEmail() : a.getEmail()); + a.setNotification( + appUserDto.getNotification() != null ? appUserDto.getNotification() : a.getNotification()); + + a.setMob_no(appUserDto.getMob_no()); + a.setActive(appUserDto.isActive()); + + if (appUserDto.getUsrGrpId() != null) { + if (a.getUsrGrp().getUsrGrp() != appUserDto.getUsrGrpId()) { + AppUserRole role = appUserRoleRepository.findById(appUserDto.getUsrGrpId()).orElse(null); + if (role != null) { + a.setUsrGrp(role); + } + } + } + if (appUserDto.getPositionCodeId() != null) { + if (!a.getPositionCode().getPositionCode().equals(appUserDto.getPositionCodeId())) { + AppUserPosition position = appUserPositionRepository.findById(appUserDto.getPositionCodeId()) + .orElse(null); + if (position != null) { + a.setPositionCode(position); + } + } + } + if (appUserDto.getDepartmentCodeId() != null) { + if (!a.getDepartmentCode().getDepartmentCode().equals(appUserDto.getDepartmentCodeId())) { + AppUserDepartment department = appUserDepartmentRepository + .findById(appUserDto.getDepartmentCodeId()).orElse(null); + if (department != null) { + a.setDepartmentCode(department); + } + } + } + a.setUpdateby(getLoggedInUser().getFullName()); + appUserRepository.save(a); + return a; + } + return null; + } + + public AppUser resetPassword(Long userId, String hash, String newPassword) { + AppUser a = appUserRepository.findById(userId).orElse(null); + if (a != null) { + if (a.getPassword4().equals(hash)) { + a.setUserPassw(bcryptEncoder.encode(newPassword)); + a.setPwdChangedCnt(a.getPwdChangedCnt() != null ? (long) 1 + a.getPwdChangedCnt() : (long) 1); + a.setLastPwdChangedDate(new Date()); +// a.setPassword4(null); + appUserRepository.save(a); + return a; + } + return null; + } + return null; + } + +// By Gaurav +// RESET PASSWORD WITH CONFIRM PASSWORD + + public AppUser resetPasswordnew(PasswordResetRequest p) { + AppUser a = appUserRepository.findById(p.getUserId()).orElse(null); + + if (a != null) { + if (bcryptEncoder.matches(p.getOldPassword(), a.getUserPassw())) { + + if (p.getNewPassword().equals(p.getConfirmPassword())) { + + a.setUserPassw(bcryptEncoder.encode(p.getNewPassword())); + a.setPwdChangedCnt(a.getPwdChangedCnt() != null ? (long) 1 + a.getPwdChangedCnt() : (long) 1); + a.setLastPwdChangedDate(new Date()); + a.setChangePassw(p.getNewPassword()); + + appUserRepository.save(a); + return a; + } + return null; + } + return null; + } + return null; + } + +// By Gaurav +// FORGOT PASSWORD + + public AppUser forgotpassword(PasswordResetRequest p) { + AppUser a = appUserRepository.findById(p.getUserId()).orElse(null); + + if (a != null) { + + if (p.getNewPassword().equals(p.getConfirmPassword())) { + + a.setUserPassw(bcryptEncoder.encode(p.getNewPassword())); + a.setPwdChangedCnt(a.getPwdChangedCnt() != null ? (long) 1 + a.getPwdChangedCnt() : (long) 1); + a.setLastPwdChangedDate(new Date()); + a.setChangePassw(p.getNewPassword()); + + appUserRepository.save(a); + return a; + } + return null; + } + return null; + + } + + public String generateRandomHash(int len) { + String chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijk" + "lmnopqrstuvwxyz!@#$%&"; +// Random rnd = new Random(); + SecureRandom rnd = new SecureRandom(); + + StringBuilder sb = new StringBuilder(len); + for (int i = 0; i < len; i++) + sb.append(chars.charAt(rnd.nextInt(chars.length()))); + return sb.toString(); + } + + public String getStatus(String tableName, String code) { + String s = appUserRepository.getStatus(tableName, code); + if (StringUtils.hasText(s)) { + return s; + } + return null; + } + + @Override + public AppUser userResister(AppUser user, Long id) { + // TODO Auto-generated method stub + return null; + } + + // method for forgot password by email + + public AppUser findUserByEmail(String email) { + AppUser user = appUserRepository.findByEmail(email); + + return user; + } + +// public void createPasswordResetTokenForUser(AppUser user, String token) { +// PasswordResetToken myToken = new PasswordResetToken(user,token); +// passwordTokenRepository.save(myToken); +// } + + public void createPasswordResetTokenForUser(AppUser user, String token) { + AppUser user1 = appUserRepository.findByEmail(user.getEmail()); + + PasswordResetToken myToken = new PasswordResetToken(token); + myToken.setUser(user1); + passwordTokenRepository.save(myToken); + } + + // ADD USER VIA ADMIN + public void adduserbyemail(AppUser user, String token, String email) { + + user.setRandom_no(token); + user.setUsername(email); + user.setEmail(email); + + appUserRepository.save(user); + + } + +// resend otp for verification + public void resendotp(int otp, String email) { + AppUser user = findUserByEmail(email); + + user.setRandom_no(String.valueOf(otp)); + + appUserRepository.save(user); + + } + + // ADD USER VIA ADMIN + public void adduserviaadmin(AppUser user, String token, String email, Long account_id) { + Sys_Accounts accounts = sysAccountRepo.findById(account_id).orElseThrow(null); + + user.setRandom_no(token); + user.setUsername(email); + user.setEmail(email); + user.setAccount(accounts); + + appUserRepository.save(user); + + } + + // ADD GUEST VIA ADMIN + public void addguestviaadmin(AppUser user, String token, String email, Long account_id) { + Sys_Accounts accounts = sysAccountRepo.findById(account_id).orElseThrow(null); + + user.setRandom_no(token); + user.setUsername(email); + user.setEmail(email); + user.setAccount(accounts); +// user.setAccess_duration(access_duration); +// +// Calendar c = Calendar.getInstance(); +// c.setTime(new Date()); +// c.add(Calendar.DATE, access_duration); +// +//// SimpleDateFormat dateFormat = new SimpleDateFormat(); +//// String format = dateFormat.format(c.getTime()); +// +// user.setAccess_till_date(c.getTime()); + appUserRepository.save(user); + + } + + public String validatePasswordResetToken(String token) { + final PasswordResetToken passToken = passwordTokenRepository.findByToken(token); + + return !isTokenFound(passToken) ? "invalidToken" : isTokenExpired(passToken) ? "expired" : null; + } + + private boolean isTokenFound(PasswordResetToken passToken) { + return passToken != null; + } + + private boolean isTokenExpired(PasswordResetToken passToken) { + final Calendar cal = Calendar.getInstance(); + return passToken.getExpiryDate().before(cal.getTime()); + } + + public void changeUserPassword(AppUser user, String newPassword) { + user.setUserPassw(bcryptEncoder.encode(newPassword)); + appUserRepository.save(user); + } + + public AppUser getUserByPasswordResetToken(String token) { + AppUser token2 = appUserRepository.findByToken(token); + return token2; + } + + // end method for forgot password +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/service1/AppUserSessionsServiceImpl.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/service1/AppUserSessionsServiceImpl.java new file mode 100644 index 0000000..fa1c700 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/service1/AppUserSessionsServiceImpl.java @@ -0,0 +1,23 @@ +package com.realnet.users.service1; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.realnet.users.entity1.AppUserSessions; +import com.realnet.users.repository1.AppUserSessionsRepository; + +@Service +public class AppUserSessionsServiceImpl { + private AppUserSessionsRepository appUserSessionsRepository; + @Autowired + public AppUserSessionsServiceImpl(AppUserSessionsRepository appUserSessionsRepository) { + super(); + this.appUserSessionsRepository = appUserSessionsRepository; + } + public AppUserSessions newSession(AppUserSessions appUserSessions) { + return appUserSessionsRepository.save(appUserSessions); + } + public AppUserSessions add(AppUserSessions session) { + return appUserSessionsRepository.save(session); + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/service1/PositionAndDepartmentServiceImpl.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/service1/PositionAndDepartmentServiceImpl.java new file mode 100644 index 0000000..ae759e9 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/users/service1/PositionAndDepartmentServiceImpl.java @@ -0,0 +1,37 @@ +package com.realnet.users.service1; + +import java.util.List; +import java.util.Optional; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.realnet.users.entity1.AppUserDepartment; +import com.realnet.users.entity1.AppUserPosition; +import com.realnet.users.repository1.AppUserDepartmentRepository; +import com.realnet.users.repository1.AppUserPositionRepository; + +@Service +public class PositionAndDepartmentServiceImpl { + private AppUserDepartmentRepository appUserDepartmentRepository; + private AppUserPositionRepository appUserPositionRepository; + @Autowired + public PositionAndDepartmentServiceImpl(AppUserDepartmentRepository appUserDepartmentRepository, + AppUserPositionRepository appUserPositionRepository) { + super(); + this.appUserDepartmentRepository = appUserDepartmentRepository; + this.appUserPositionRepository = appUserPositionRepository; + } + public List getAll(){ + return appUserDepartmentRepository.findAll(); + } + public List getAllPosition(){ + return appUserPositionRepository.findAll(); + } + public Optional getOne(String departmentCode){ + return appUserDepartmentRepository.findById(departmentCode); + } + public Optional getOnePosition(String positionCode){ + return appUserPositionRepository.findById(positionCode); + } +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/utils/Constant.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/utils/Constant.java new file mode 100644 index 0000000..b93f5e1 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/utils/Constant.java @@ -0,0 +1,283 @@ +package com.realnet.utils; + +public final class Constant { + + // SORT BY + public final static String SORT_BY_CREATION_DATE = "createdAt"; + public final static String SORT_BY_CREATION_DATE_NATIVE_QUERY = "created_at"; + + // --------------------------------------Error Type + public final static String ERROR_TYPE_HIBERNATE = "Hibernate Exception"; + public final static String ERROR_TYPE_DB = "Database Exception"; + public final static String ERROR_TYPE_EXCEPTION = "Other Exception"; + public final static String ERROR_TYPE_CONTROLLER = "Controller Exception"; + public final static String ERROR_TYPE_HTTP = "HTTP Error"; + + public final static String NOT_FOUND_EXCEPTION = "Data Not Found "; + public final static String NOT_EXIST_EXCEPTION = "Data Not Exist "; + + // --------------------------------------Error Status + public final static String ERROR_LEVEL_FAILURE = "Failure"; + public final static String ERROR_LEVEL_SUCCESS = "Success"; + + // --------------------------------------DB Error Code + public final static int ERROR_CODE_SERVER = 404; + public final static int ERROR_CODE_SERVER_AUTH = 401; + public final static int ERROR_CODE_DB = 500; + public final static int ERROR_CODE_DATA = 201; + public final static int SUCCESS_CODE = 200; + public final static int ERROR_CODE_VALIDATION = 301; + public final static int ERROR_CODE_VERYFICATION = 403; + + // --------------------------------------REAL IT API RESPONSE MESSEGES + public final static String EXTRACTOR_API_TITLE = "Extractor"; + public final static String EXTRACTOR_CREATED_SUCCESSFULLY = "Extractor added Successfully !"; + public final static String EXTRACTOR_UPDATED_SUCCESSFULLY = "Extractor updated Successfully !"; + public final static String EXTRACTOR_DELETED_SUCCESSFULLY = "Extractor deleted Successfully !"; + public final static String EXTRACTOR_NOT_DELETED = "Extractor not deleted"; + public final static String EXTRACTOR_NOT_CREATED = "Extractor not Added !"; + public final static String EXTRACTOR_NOT_UPDATED = "Extractor not updated !"; + + + public final static String STATIC_EXTRACTION_SUCCESS = "Static Extraction Completed !"; + public final static String DYNAMIC_EXTRACTION_SUCCESS = "Dynamic Extraction Completed !"; + public final static String STATIC_EXTRACTION_FAILED = "Static Extraction Failed !"; + public final static String DYNAMIC_EXTRACTION_FAILED = "Dynamic Extraction Failed !"; + + // RULE + public final static String RULE_LIBRARY_API_TITLE = "Rule Library"; + public final static String RULE_CREATED_SUCCESSFULLY = "Rule added Successfully !"; + public final static String RULE_UPDATED_SUCCESSFULLY = "Ruler updated Successfully !"; + public final static String RULE_DELETED_SUCCESSFULLY = "Rule deleted Successfully !"; + public final static String RULE_NOT_DELETED = "Rule not deleted"; + public final static String RULE_NOT_CREATED = "Rule not Added !"; + public final static String RULE_NOT_UPDATED = "Rule not updated !"; + + // EXCEPTION RULE + public final static String EXCEPTION_RULE_LIBRARY_API_TITLE = "Exception Rule Library"; + public final static String EXCEPTION_RULE_CREATED_SUCCESSFULLY = "Exception Rule added Successfully !"; + public final static String EXCEPTION_RULE_UPDATED_SUCCESSFULLY = "Exception Rule updated Successfully !"; + public final static String EXCEPTION_RULE_DELETED_SUCCESSFULLY = "Exception Rule deleted Successfully !"; + + public final static String EXCEPTION_RULE_NOT_DELETED = "Exception Rule not deleted"; + public final static String EXCEPTION_RULE_NOT_CREATED = "Exception Rule not Added !"; + public final static String EXCEPTION_RULE_NOT_UPDATED = "Exception Rule not updated !"; + + // TECHNOLOGY STACK + public final static String TECHNOLOGY_STACK_API_TITLE = "Technology Stack"; + public final static String TECHNOLOGY_STACK_CREATED_SUCCESSFULLY = "Technology Stack saved Successfully !"; + public final static String TECHNOLOGY_STACK_UPDATED_SUCCESSFULLY = "Technology Stack updated Successfully !"; + public final static String TECHNOLOGY_STACK_DELETED_SUCCESSFULLY = "Technology Stack deleted Successfully !"; + public final static String TECHNOLOGY_STACK_NOT_DELETED = "Technology Stack not deleted"; + public final static String TECHNOLOGY_STACK_NOT_CREATED = "Technology Stack not Added !"; + public final static String TECHNOLOGY_STACK_NOT_UPDATED = "Technology Stack not updated !"; + public final static String UNZIP_EXCEPTION = "There is a problem while Unziping"; + + // PROJECT SETUP + public final static String PROJECT_SETUP_API_TITLE = "Project Setup"; + public final static String PROJECT_CREATED_SUCCESSFULLY = "Project saved Successfully !"; + public final static String PROJECT__UPDATED_SUCCESSFULLY = "Project updated Successfully !"; + public final static String PROJECT_DELETED_SUCCESSFULLY = "Project deleted Successfully !"; + public final static String PROJECT_NOT_DELETED = "Project not deleted"; + public final static String PROJECT_NOT_CREATED = "Project not Added !"; + public final static String PROJECT_NOT_UPDATED = "Project not updated !"; + public final static String PROJECT_COPY_SUCCESS = "Project Copy Success !"; + public final static String PROJECT_COPY_FAILURE = "Project Copy Failed !"; + + // MODULE SETUP + public final static String MODULE_SETUP_API_TITLE = "Module Setup"; + public final static String MODULE_CREATED_SUCCESSFULLY = "Module saved Successfully !"; + public final static String MODULE_UPDATED_SUCCESSFULLY = "Module updated Successfully !"; + public final static String MODULE_DELETED_SUCCESSFULLY = "Module deleted Successfully !"; + public final static String MODULE_NOT_DELETED = "Module not deleted"; + public final static String MODULE_NOT_CREATED = "Module not Added !"; + public final static String MODULE_NOT_UPDATED = "Module not updated !"; + public final static String MODULE_COPY_SUCCESS = "Module Copy Success !"; + public final static String MODULE_COPY_FAILURE = "Module Copy Failed !"; + + // WIREFRAME APIS + public final static String WIREFRAME_API_TITLE = "Wireframe Setup"; + public final static String WIREFRAME_CREATED_SUCCESSFULLY = "Wireframe saved Successfully !"; + public final static String WIREFRAME_UPDATED_SUCCESSFULLY = "Wireframe updated Successfully !"; + public final static String WIREFRAME_DELETED_SUCCESSFULLY = "Wireframe deleted Successfully !"; + public final static String WIREFRAME_NOT_DELETED = "Wireframe not deleted"; + public final static String WIREFRAME_NOT_CREATED = "Wireframe not Added !"; + public final static String WIREFRAME_NOT_UPDATED = "Wireframe not updated !"; + + //REPORT APIS + public final static String REPORT_API_TITLE = "report Setup"; + public final static String REPORT_CREATED_SUCCESSFULLY = "Report saved Successfully !"; + public final static String REPORT_UPDATED_SUCCESSFULLY = "Report updated Successfully !"; + public final static String REPORT_DELETED_SUCCESSFULLY = "Report deleted Successfully !"; + public final static String REPORT_NOT_DELETED = "Report not deleted"; + public final static String REPORT_NOT_CREATED = "Report not Added !"; + public final static String REPORT_NOT_UPDATED = "Report not updated !"; + + + + public final static String WIREFRAME_BUTTON_ADDED = "Wireframe Button Added !"; + public final static String WIREFRAME_SECTION_ADDED = "Wireframe Section Added !"; + public final static String WIREFRAME_FIELD_ADDED_IN_SECTION = "Wireframe Field Added In Section !"; + public final static String WIREFRAME_FIELD_NOT_ADDED_IN_SECTION = "Wireframe Field Not Added"; + public final static String WIREFRAME_FIELD_NAME_CHANGE_SUCCESS = "Wireframe Field Name Changed"; + public final static String WIREFRAME_FIELD_NAME_CHANGE_FAILURE = "Wireframe Field Name Not Changed"; + public final static String WIREFRAME_COPY_SUCCESS = "Wireframe Copy Success !"; + public final static String WIREFRAME_COPY_FAILURE = "Wireframe Copy Failed !"; + + public final static String WIREFRAME_SECTION_DELETE_SUCCESS = "Section Deleted Successfully !"; + public final static String WIREFRAME_SECTION_DELETE_FAILURE = "Section Deletion Failure !"; + public final static String WIREFRAME_FIELD_DELETE_SUCCESS = "Section Deleted Successfully !"; + public final static String WIREFRAME_FIELD_DELETE_FAILURE = "Section Deletion Failure !"; + + // LOOKUP + public final static String LOOKUP_API_TITLE = "Lookup"; + public final static String LOOKUP_CREATED_SUCCESSFULLY = "Lookup saved Successfully !"; + public final static String LOOKUP_UPDATED_SUCCESSFULLY = "Lookup updated Successfully !"; + public final static String LOOKUP_DELETED_SUCCESSFULLY = "Lookup deleted Successfully !"; + public final static String LOOKUP_NOT_DELETED = "Lookup not deleted"; + public final static String LOOKUP_NOT_CREATED = "Lookup not Added !"; + public final static String LOOKUP_NOT_UPDATED = "Lookup not updated !"; + + // ACTION BUILDER + public final static String ACTION_BUILDER_API_TITLE = "Action Builder"; + public final static String ACTION_CREATED_SUCCESSFULLY = "Action saved Successfully !"; + public final static String ACTION_UPDATED_SUCCESSFULLY = "Action updated Successfully !"; + public final static String ACTION_DELETED_SUCCESSFULLY = "Action deleted Successfully !"; + public final static String ACTION_NOT_DELETED = "Action not deleted"; + public final static String ACTION_NOT_CREATED = "Action not Added !"; + public final static String ACTION_NOT_UPDATED = "Action not updated !"; + public final static String ACTION_CFF_LAYOUT_SUCCESS = "Layout Created Successfully!"; + public final static String ACTION_CFF_LAYOUT_FAILURE = "Layout Not Created!"; + public final static String ACTION_CFF_DATA_SUCCESS = "Data Added Successfully!"; + public final static String ACTION_CFF_DATA_FAILURE = "Data Not Added!"; + + // MASTER BUILDER CONTROLLER + public final static String MASTER_BUILDER_API_TITLE = "Master Builder"; + public final static String MASTER_BUILDER_SUCCESS = "Master Builder created Successfully!"; + public final static String MASTER_BUILDER_FAILURE = "Master Builder Not Created!"; + + // FORM BUILDER + public final static String FORM_BUILDER_API_TITLE = "Form Builder"; + public final static String FORM_BUILD_SUCCESS = "Form created Successfully!"; + public final static String FORM_BUILD_FAILURE = "Form Not Created!"; + public final static String FORM_DELETE_SUCCESS = "Form Deleted!"; + public final static String FORM_DELETE_FAILURE = "Form Not Delete!"; + + // QUERY BUILDER + public final static String QUERY_API_TITLE = "Create Query"; + public final static String QUERY_CREATE_SUCCESS = "Table created Successfully!"; + public final static String QUERY_CREATE_FAILURE = "Table Not Created!"; + + // FILE OPERATION + public final static String FILE_OPERATION_API_TITLE = "File Operation"; + public final static String FILE_CODE_SAVE_SUCCESSFULLY = "Code Save Successfully!"; + public final static String FILE_NOT_FOUND_EXCEPTION = "File Not Found!"; + public final static String FILE_CODE_SAVE_FAILURE = "Code Not Saved!"; + public final static String FILE_LIST_API_TITLE = "File List"; + public final static String FILE_LIST_IS_EMPTY = "File List Is Empty"; + + // FLF + public final static String FLF_API_TITLE = "FLF"; + public final static String FLF_CREATED_SUCCESSFULLY = "FLF saved Successfully !"; + public final static String FLF_UPDATED_SUCCESSFULLY = "FLF updated Successfully !"; + public final static String FLF_DELETED_SUCCESSFULLY = "FLF deleted Successfully !"; + public final static String FLF_NOT_DELETED = "FLF not deleted"; + public final static String FLF_NOT_CREATED = "FLF not Added !"; + public final static String FLF_NOT_UPDATED = "FLF not updated !"; + + + + + // --------------------------------------Success another + public final static String USER_ADDED_SUCCESSFULLY = "User added Successfully !"; + public final static String USER_INFO_UPDATED_SUCCESSFULLY = "User info update successfully !"; + public final static String ERROR_MESSAGE_SAME_OLD_NEW_PWD = "Old and New Password are same"; + public final static String USER_DOES_NOT_EXIST = "UserName does not exist."; + public final static String USER_DELETE_TITLE = "User Deleted"; + public final static String USER_DELETED_SUCCESSFULLY = "User deleted Successfully !"; + public final static String ERROR_MESSAGE_AUTH_FAILED = "Authentication failed"; + public final static String ERROR_MESSAGE_USER_NAME_AND_PASS = "Please check username and password"; + public final static String USER_LOFOUT_TITLE = "Auth Session"; + public final static String USER_LOG_OUT_SUCCESSFULLY = "User Loged Out successfully !"; + public final static String ERROR_LOG_OUT_MESSAGE = "Session does not exist."; + public final static String ERROR_MOBILE_NO_VERIFICATION = "Mobile number is not register."; + public final static String VERYFICATION_CODE_ACCEPTED = "Code accepted. Phone now marked verified"; + public final static String ERROR_VERYFICATION_MESSAGE = "Code not accepted or Invalide OTP"; + public final static String PROFILE_PIC_ADDED_SUCCESSFULLY = "Pic added Successfully !"; + public final static String ERROR_PROFILE_PIC_FAILED_TO_UPLOAD = "Pic failed to add."; + public final static String FAILED_TO_DELETED_USER = "User info does not exist."; + public final static String PICTURE_TITLE = "Picture"; + +// public final static String PROFILE_PIC_DELETED_SUCCESSFULLY = "Pic delted Successfully !"; +// public final static String PROFILE_API_TITLE = "Profile Pic"; +// public final static String ERROR_PROFILE_PIC_FAILED_TO_DELETE = "Profile Picture does not exist"; +// +// public final static String CONTACT_API_TITLE = "Contacts Uploaded"; +// public final static String CONTACTS_UPLOADED_SUCCESS_MESSAGE = "Contacts uploaded successfully !"; +// public final static String FAILED_TO_UPLOADED_CONTACTS = "Failed to uploaded contacts"; +// +// public final static String GROUP_WITH_USERS_CREATED_SUCCESSFULLY = "Group with users created Successfully !"; +// public final static String FAILED_TO_CREATE_GROUP_WITH_USERS = "Failed to create group with users."; +// +// public final static String GROUP_API_TITLE = "Group"; +// public final static String GROUP_NOT_FOUND_MSG = "There is no any group."; +// public final static String GROUP_CREATED_SUCCESSFULLY_MESSAGE = "Group added Successfully !"; +// public final static String FAILED_TO_CREATE_GROUP_MESSAGE = "Failed to create group."; +// public final static String GROUP_NAME_UPDATED_SUCCESSFULLY = "Group name updated Successfully !"; +// public final static String FAILED_TO_UPDATE_GROUP_NAME_MESSAGE = "Failed to upload group name."; +// public final static String USER_DELETED_FROM_GROUP_SUCCESSFULLY = "User deleted from group Successfully !"; +// public final static String FAILED_TO_DELETE_USER_FROM_GROUP = "Failed to delete user from group."; +// public final static String GROUP_DELETED_SUCCESSFULLY = "User deleted from group Successfully !"; +// public final static String FAILED_TO_DELETE_GROUP = "Failed to delete group."; +// +// public final static String CHAT_MESSAGE_TITLE = "Message"; +// public final static String MESSAGE_SEND_SUCCESSFULLY = "Message sent Successfully !"; +// public final static String FAILED_TO_SEND_MESSAGE = "Failed to send message."; +// public final static String FAILED_TO_DELETE_MESSAGE = "Failed to Delete"; +// +// public final static String NOTIFICATIONS_MESSAGE_TITLE = "Notification"; +// public final static String NOTIFICATIONS_MESSAGE_SET_SUCCESSFULLY = "Notifications preferences set successfully !"; +// public final static String NOTIFICATIONS_FAILED_TO_SET_MESSAGE = "Failed to set preferences."; +// +// public final static String SOCIAL_MESSAGE_TITLE = "Social Network"; +// public final static String SOCIAL_FAILED_TO_SET_MESSAGE = "Failed to link social network site."; +// +// public final static String LIVE_LOCATION_MESSAGE_TITLE = "Live Location"; +// public final static String LIVE_LOCATION_FAILED_TO_SET_MESSAGE = "Failed to set current location."; +// public final static String LIVE_LOCATION_FAILED_TO_GET_MESSAGE = "There is no active sharing sessions."; +// public final static String LIVE_LOCATION_DELETED = "Current live location sharing session deleted."; + + public final static String PIC_UPLOADED_TITLE = "Profile Picture"; + public final static String PIC_UPLOAD_FAILED = "You failed to upload "; + + public final static String PICTURE_CATEGORY = "full"; + public final static String IMAGE_STORAGE_PATH = "D:\\image\\cyooTempFiles\\"; + + public final static String USER_TITLE = "User"; + public final static String USER_NAME_EMAIL_IN_USE = "Username/Email already taken."; + public final static String USER_NAME_EMAIL_NOT_IN_USE = "Username/Email not taken."; + public final static String EMAIL_ID_IN_USE = "Email already taken."; + public final static String USER_NOT_IN_USE = "Username not taken."; + public final static String EMAIL_NOT_IN_USE = "Email not taken."; + + // ======================================================================================== + + /* + * Group group = new Group(); group.setGroupId(2); + * group.setGroupName("friends"); group.setCreatedBy("Munta"); + * group.setCreatedDateTime("2014-11-22 12:45:34"); group.setIsDelete(0); + * + * Set grList = new HashSet(); + * + * GroupUser groupUser = new GroupUser(); groupUser.setId(1); + * groupUser.setGroupId(4); groupUser.setUserName("Jake4"); + * groupUser.setAddedDateTime("2014-11-22 12:45:34"); grList.add(groupUser); + * + * groupUser = new GroupUser(); groupUser.setId(5); groupUser.setGroupId(2); + * groupUser.setUserName("Jake5"); + * groupUser.setAddedDateTime("2014-11-22 12:45:34"); grList.add(groupUser); + * + * group.setGroupUserList(grList); + */ + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/utils/Port_Constant.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/utils/Port_Constant.java new file mode 100644 index 0000000..43df63a --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/utils/Port_Constant.java @@ -0,0 +1,23 @@ +package com.realnet.utils; + +public class Port_Constant { + + + + public final static String LOCAL_HOST = "43.205.154.152"; + public final static String FRONTEND_PORT_9191 = "30165"; + + + + public final static String GITEA_IP_ADDRESS = "try.gitea"; + public final static String GITEA_PORT = "io"; + public final static String SURE_VAULT_DOMAIN = "http://34.198.218.30:30150"; + public final static String SUREVAULT_DEPLOYMENT_TYPE ="32"; + public static String FRONTEND_PORTAL_DOMAIN; + + + + + + +} diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/utils/WireFrameConstant.java b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/utils/WireFrameConstant.java new file mode 100644 index 0000000..542e305 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/java/com/realnet/utils/WireFrameConstant.java @@ -0,0 +1,54 @@ +package com.realnet.utils; + +public class WireFrameConstant { + + public static enum FormType { + header_only, + line_only, + header_line, + multiline + } + + public static final String HEADER_ONLY = "header_only"; + public static final String LINE_ONLY = "line_only"; + public static final String HEADER_LINE = "header_line"; + public static final String MULTILINE = "multiline"; + + public static final String HEADER_TYPE = "header"; + public static final String LINE_TYPE = "line"; + + public static final String ID = "id"; + public static final String DT_PK = "PRI"; + public static final String DT_INTEGER = "int"; + public static final String DT_DOUBLE = "double"; + public static final String DT_LONGTEXT = "longtext"; + public static final String DT_VARCHAR = "varchar"; + public static final String DT_DATE_TIME = "datetime"; + public static final String DT_NULL = "N"; + + public static final String SECTION = "section"; + public static final String LINE_SECTION = "line_section"; + public static final String LABEL = "label"; + public static final String COLUMN = "column"; + public static final String BUTTON = "button"; + + + + public static final String DT_TEXTFIELD = "textfield"; + public static final String DT_LINE_TEXTFIELD = "l_textfield"; +// public static final String DT_LONGTEXT = "longtext"; + public static final String DT_DATE = "date"; + public static final String FIELD_CHECKBOX = "checkbox"; + public static final String FIELD_RADIOBUTTON = "radiobutton"; + public static final String FIELD_AUTOCOMPLETE = "autocomplete"; + + public static final String BASIC = "basic"; + public static final String ADDITIONAL = "addtional"; + + public static final String DT_MULTISELECT = "multiselect"; + + + + +} + diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/resources/MyprojectUI_view.properties b/prod116rb-back-b/authsec_springboot/backend/src/main/resources/MyprojectUI_view.properties new file mode 100644 index 0000000..e69de29 diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/resources/application.properties b/prod116rb-back-b/authsec_springboot/backend/src/main/resources/application.properties new file mode 100644 index 0000000..09e8dbf --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/resources/application.properties @@ -0,0 +1,97 @@ +# File is used by sprigboot +server.contextPath=/* +server.port=9292 +spring.resources.static-locations=classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/,classpath:/webui/ + +spring.banner.location=classpath:banner_txt.txt + +#Temporary disable security to enable it remove this +#security.ignored=/** + +springfox.documentation.swagger.v2.path=/api-docs +spring.jackson.date-format=yyyy-MM-dd + + + +System.Net.ServicePointManager.Expect100Continue = false; + +#spring.jpa.hibernate.ddl-auto=none +#spring.jpa.hibernate.ddl-auto=update +#spring.datasource.continue-on-error=false + +# **** MY SQL DATABASE CONNECTION **** + +spring.datasource.url=jdbc:mysql://realnet.cdas4e08uugj.us-east-1.rds.amazonaws.com:3306/realnet_CNSBENEW?createDatabaseIfNotExist=true +spring.datasource.username=cnsdev +spring.datasource.password=cnsdev2407 + +spring.datasource.driverClassName = com.mysql.cj.jdbc.Driver + +spring.jpa.hibernate.ddl-auto=update +spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5InnoDBDialect +# Prefix Path + +#spring.jpa.show-sql=true +spring.jpa.properties.hibernate.format_sql=true +spring.jpa.properties.hibernate.proc.param_null_passing=true + +# **********paytm dependency ****** +razorpay.api.key=rzp_test_xVnrBUjJWTEH0r +razorpay.api.secret=evTXkIFcgpVtiLa1P7M7CIox + +#***** MAIL SENDER +spring.mail.host=smtp.gmail.com +spring.mail.username=realitmailsender@gmail.com +spring.mail.password=epnmhzsccotnyozf +spring.mail.port=587 +#spring.mail.properties.mail.smtp.auth=true +spring.mail.properties.mail.smtp.starttls.enable=true +spring.mail.properties.mail.smtp.starttls.required=true + +# JACKSON +spring.jackson.serialization.FAIL_ON_EMPTY_BEANS=false + + +spring.mail.properties.mail.smtp.auth = true +spring.mail.properties.mail.smtp.socketFactory.port = 465 +spring.mail.properties.mail.smtp.socketFactory.class = javax.net.ssl.SSLSocketFactory +spring.mail.properties.mail.smtp.socketFactory.fallback = false + +#******* MULTIPART RESOLVER +spring.servlet.multipart.enabled=true +spring.servlet.multipart.max-file-size=100MB +spring.servlet.multipart.max-request-size=100MB + +#***************OAUTH2 SOCIAL LOGIN ********* +# Social login provider props +spring.security.oauth2.client.registration.google.clientId=437023664181-0lm0ipgip3qbhga4nd7o4128jv4g2nv9.apps.googleusercontent.com +spring.security.oauth2.client.registration.google.clientSecret=I1HPyUqdJ9UONu45W1_wwfww +spring.security.oauth2.client.registration.google.scope=profile, email + + +spring.security.oauth2.client.registration.linkedin.clientId= +spring.security.oauth2.client.registration.linkedin.clientSecret= +spring.security.oauth2.client.registration.linkedin.client-authentication-method=post +spring.security.oauth2.client.registration.linkedin.authorization-grant-type=authorization_code +spring.security.oauth2.client.registration.linkedin.scope=r_liteprofile, r_emailaddress +spring.security.oauth2.client.registration.linkedin.redirect-uri={baseUrl}/login/oauth2/code/{registrationId} +spring.security.oauth2.client.registration.linkedin.client-name=Linkedin +spring.security.oauth2.client.registration.linkedin.provider=linkedin +spring.security.oauth2.client.provider.linkedin.authorization-uri=https://www.linkedin.com/oauth/v2/authorization +spring.security.oauth2.client.provider.linkedin.token-uri=https://www.linkedin.com/oauth/v2/accessToken +spring.security.oauth2.client.provider.linkedin.user-info-uri=https://api.linkedin.com/v2/me +spring.security.oauth2.client.provider.linkedin.user-name-attribute=id +linkedin.email-address-uri=https://api.linkedin.com/v2/emailAddress?q=members&projection=(elements*(handle~)) +app.auth.tokenSecret=926D96C90030DD58429D2751AC1BDBBC +app.auth.tokenExpirationMsec=864000000 + # After successfully authenticating with the OAuth2 Provider, + # we'll be generating an auth token for the user and sending the token to the + # redirectUri mentioned by the frontend client in the /oauth2/authorization request. + # We're not using cookies because they won't work well in mobile clients. +app.oauth2.authorizedRedirectUris=http://localhost:8081/oauth2/redirect,myandroidapp://oauth2/redirect,myiosapp://oauth2/redirect + + +projectPath=@project.basedir@ +angularProjectPath=@project.basedir@/webui + + diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/resources/banner_txt.txt b/prod116rb-back-b/authsec_springboot/backend/src/main/resources/banner_txt.txt new file mode 100644 index 0000000..5c9c817 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/resources/banner_txt.txt @@ -0,0 +1,11 @@ +******************************************************************* +******************************************************************* + __ _ ____ __ __ __ + / \ \ | |__****** / ___| **** ****_ \ \ \ \ \ \ + / / \ \ | '_ \ / _ \ \___ \| | | | '__|/ _ \ \ \ \ \ \ \ + \ \ / / | |_) | __/ ___) | |_| | | | __/ / / / / / / + \ /_/ |_.__/ \___| |____/ \__,_|_| \___| /_/ /_/ /_/ + *** *** ***** +******************************************************************* +::SPRING BOOT:: CNS Version::v1.1.0 RELEASE +******************************************************************* \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/resources/data.sql b/prod116rb-back-b/authsec_springboot/backend/src/main/resources/data.sql new file mode 100644 index 0000000..77daec5 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/resources/data.sql @@ -0,0 +1,2023 @@ +/* Instructor */ +insert into RN_INSTRUCTOR (ID, FIRST_NAME, LAST_NAME, EMAIL, CREATED_AT, UPDATED_AT) values + (1, 'rajdeep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (2, 'sandipan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (3, 'niladri', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (4, 'abhishek', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (5, 'sayandeep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (6, 'titas', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (7, 'dip', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (8, 'asif', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (9, 'anushree', 'sanyal', 'anus@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (10, 'trisha', 'das', 'trisha@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (11, 'avijit', 'chakraborty', 'avijit@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (12, 'dona', 'sen', 'dona@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (13, 'disha', 'maitra', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (14, 'sasa', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (15, 'vvvv', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (16, 'qqqq', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (17, 'saaaaayasndeep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (18, 'lllll', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (19, 'kkkkk', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (20, 'ffffff', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (21, 'rajaaQdesep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (22, 'sandaaQipsan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (23, 'nilaaQadri', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (24, 'abQhaaishek', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (25, 'sayanaadeep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (26, 'tiaatas', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (27, 'dittp', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (28, 'attsif', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (29, 'anutttshree', 'sanyal', 'anus@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (30, 'trigggsha', 'das', 'trisha@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (31, 'avijgggit', 'chakraborty', 'avijit@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (32, 'dogggna', 'sen', 'dona@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (33, 'rgggajdeep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (34, 'sangggdipan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (35, 'nifgfladri', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (36, 'abhisfgfhek', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (37, 'safgfgyandeep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (38, 'titfgfas', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (39, 'dfgfip', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (40, 'asifgff', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (41, 'fggfrajdeep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (42, 'fgfgsandipan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (43, 'ncxilgbgadri', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (44, 'adghghbhishek', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (45, 'sayandhyyueep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (46, 'teritas', 'mereaity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (47, 'dipere', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (48, 'asifcc', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (49, 'anushrccee', 'sanyal', 'anus@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (50, 'trishawww', 'das', 'trisha@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (51, 'avijiqqt', 'chakraborty', 'avijit@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (52, 'qqqdona', 'sen', 'dona@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (53, 'rajqqqdeep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (54, 'sandipqqqqan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (55, 'niladriwww', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (56, 'abhishewwwk', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (57, 'sayandeepbbb', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (58, 'tbbbitas', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (59, 'dbbbip', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (60, 'asbbbif', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (61, 'rajdeAFep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (62, 'sanSDFipan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (63, 'nilaSDFdri', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (64, 'abhiSDFshek', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (65, 'sayaSDndeep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (66, 'tiAStas', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (67, 'diASp', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (68, 'aASsif', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (69, 'anuASshree', 'sanyal', 'anus@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (70, 'triASsha', 'das', 'trisha@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (71, 'avASCijit', 'chakraborty', 'avijit@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (72, 'donVa', 'sen', 'dona@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (73, 'rajCVdeep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (74, 'saVndipan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (75, 'nilVadri', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (76, 'abChishek', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (77, 'saCyandeep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (78, 'titCas', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (79, 'diCp', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (80, 'asCif', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (81, 'rajdeCep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (82, 'saSndCipan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (83, 'nilCadri', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (84, 'abhSCshek', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (85, 'saSyCandeep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (86, 'titSasCE', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (87, 'diCp', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (88, 'asEif', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (89, 'anEushree', 'sanyal', 'anus@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (90, 'triEsha', 'das', 'trisha@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (91, 'avEijit', 'chakraborty', 'avijit@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (92, 'donEa', 'sen', 'dona@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (93, 'raEjdeep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (94, 'sanEdipan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (95, 'niladEri', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (96, 'abhEishek', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (97, 'sayEandeep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (98, 'tEitas', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (99, 'dEip', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (100, 'aEsif', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (101, 'rajSSdeep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (102, 'sandSSipan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (103, 'nilaLSSdri', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (104, 'abLhishek', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (105, 'saLyandeep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (106, 'tLitas', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (107, 'diLp', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (108, 'aLsif', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (109, 'anLushree', 'sanyal', 'anus@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (110, 'triLsha', 'das', 'trisha@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (111, 'aviLjit', 'chakraborty', 'avijit@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (112, 'doLna', 'sen', 'dona@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (113, 'rajLdeep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (114, 'sandLipan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (115, 'niULladri', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (116, 'aLbhUishek', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (117, 'sLLUayandeep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (118, 'tiLUtas', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (119, 'diUp', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (120, 'asUif', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'); + + +/* User */ +insert into user (user_id, password, first_name, last_name, email, company, phone, address1, address2, country, postal, role, is_active, is_blocked, security_provider_id, default_customer_id, secret_question, secret_answer, enable_beta_testing, enable_renewal) values +('demo' , 'demo' , 'Mrinmoy' , 'Majumdar', 'arivera2@joomla.org' , 'Abshire Inc', '7-(740)701-4547', '80429 Garrison Crossing', '4967' , 'USA' , '64890', 'USER' , 1, 0, 10001, 20000, 'Diverse' , 'Yellow' , 0, 0), +('admin' , '$2b$10$AkngMoFbJhllHomzUFdwAehsPzbHxY31XXtWTr0Cnpo9OYs7enn0q' , 'Theresa' , 'Russell' , 'trussell1@about.me' , 'Glover, Adams and Bins', '383-(779)851-3208', '30874 Graceland Terrace', '99152' , 'USA' , '51065', 'ADMIN', 1, 0, 10001, 20000, 'knowledge base', 'Mauv' , 1, 0), +('user' , '$2b$10$AK/siGGl4ITIq0dZHDck0uAyLJHkGPOeLBSAyUL8j5OU5vlf79wjq' , 'Virginia' , 'Reynolds', 'vreynolds0@slashdot.org', 'Rippin, Osinski and Beatty', '84-(228)809-9998', '0118 Burrows Plaza', '496' , 'USA' , '94086', 'USER' , 1, 0, 10001, 20000, 'Innovative' , 'Turquoise', 1, 1), +('jowens3' , 'jowens3' , 'Judy' , 'Owens' , 'jowens3@hp.com' , 'Altenwerth, Fisher and Heidenreich', '30-(772)268-8227', '98 Loeprich Way', '447', 'Greece' , null , 'USER' , 0, 0, 10001, 20001, 'capacity' , 'Fuscia' , 1, 1), +('kburns4' , 'kburns4' , 'Kelly' , 'Burns' , 'kburns4@icio.us' , 'McCullough-Morar', '86-(857)185-5740', '1638 Basil Alley', '56297' , 'China' , null , 'ADMIN', 1, 0, 10000, 20002, 'user-facing' , 'Crimson', 1, 1), +('jshaw5' , 'jshaw5' , 'Julie' , 'Shaw' , 'jshaw5@opera.com' , 'Steuber-Okuneva', '1-(871)375-6188', '389 Myrtle Pass', '41444' , 'Canada' , null , 'ADMIN', 1, 1, 10000, 20000, 'software' , 'Green' , 0, 1), +('pgilbert6' , 'pgilbert6', 'Peter' , 'Gilbert' , 'pgilbert6@eepurl.com' , 'Robel Inc', '52-(372)555-4687', '11522 Fuller Avenue', '5' , 'Mexico' , '39230', 'ADMIN', 1, 1, 10000, 20000, 'multi-state' , 'Puce' , 1, 1), +('jjacobs7' , 'jjacobs7' , 'Justin' , 'Jacobs' , 'jjacobs7@google.co.uk' , 'Harris-Bashirian', '963-(199)359-2552', '95012 Hanover Street', '2377' , 'India' , null , 'USER' , 1, 0, 10000, 20002, 'motivating' , 'Crimson', 1, 0), +('kbennett8' , 'kbennett8', 'Kevin' , 'Bennett' , 'kbennett8@hostgator.com', 'Leannon Inc', '62-(892)710-5713', '459 Coleman Drive', '397' , 'Indonesia' , null , 'ADMIN', 0, 0, 10001, 20000, 'Exclusive' , 'Purple' , 1, 1), +('cmurphy9' , 'cmurphy9' , 'Chris' , 'Murphy' , 'cmurphy9@over-blog.com' , 'Mosciski LLC', '64-(272)961-0086', '2 Ludington Point', '7' , 'New Zealand', null , 'ADMIN', 0, 1, 10000, 20000, 'empowering' , 'Maroon' , 0, 1); + +/* Employees */ +insert into employees (id, last_name, first_name, email, phone, address1, address2, city, state, postal_code, country, avatar, job_title, department, manager_id) values + (201, 'Harris' , 'George' , 'gharris0@pagesperso-orange.fr', '1-(210)270-8536', '2 Bayside Drive', null, 'San Antonio', 'Texas', '78240', 'United States', 'https://robohash.org/modilaboriosammolestiae.bmp?size=50x50&set=set1', 'Administrative Assistant I', 'Toys', null) +,(202, 'Hayes' , 'Rachel' , 'rhayes1@si.edu', '1-(971)797-2729', '30 Anhalt Street', null, 'Portland', 'Oregon', '97232', 'United States', 'https://robohash.org/seddistinctiodolorem.jpg?size=50x50&set=set1', 'Design Engineer', 'Books', null) +,(203, 'Palmer' , 'Anthony', 'apalmer2@posterous.com', '1-(702)984-2108', '02809 4th Pass', null, 'North Las Vegas', 'Nevada', '89036', 'United States', 'https://robohash.org/vitaererumdolore.png?size=50x50&set=set1', 'Health Coach II', 'Toys', null) +,(204, 'Alvarez' , 'Laura' , 'lalvarez3@time.com', '1-(518)328-2658', '647 Lakeland Road', null, 'Albany', 'New York', '12210', 'United States', 'https://robohash.org/nobisplaceatquisquam.jpg?size=50x50&set=set1', 'Computer Systems Analyst II', 'Health', null) +,(205, 'Reynolds', 'Annie' , 'areynolds4@nasa.gov', '1-(775)838-2203', '163 Carey Street', null, 'Reno', 'Nevada', '89550', 'United States', 'https://robohash.org/praesentiumdoloremrerum.png?size=50x50&set=set1', 'Senior Quality Engineer', 'Kids', null) +,(206, 'Henry' , 'Joe' , 'jhenry5@bbb.org', '1-(682)563-2229', '1 Harper Circle', null, 'Fort Worth', 'Texas', '76178', 'United States', 'https://robohash.org/earumiurevoluptas.jpg?size=50x50&set=set1', 'Chief Design Engineer', 'Electronics', null) +,(207, 'Willis' , 'Willie' , 'wwillis6@berkeley.edu', '1-(317)654-6888', '641 Kropf Parkway', null, 'Indianapolis', 'Indiana', '46216', 'United States', 'https://robohash.org/suntsitnecessitatibus.png?size=50x50&set=set1', 'Structural Analysis Engineer', 'Shoes', null) +,(208, 'Lawrence', 'Keith' , 'klawrence7@discovery.com', '1-(501)583-8851', '2184 Melby Crossing', null, 'Little Rock', 'Arkansas', '72222', 'United States', 'https://robohash.org/delenitiomnisconsequatur.jpg?size=50x50&set=set1', 'VP Quality Control', 'Outdoors', null) +,(209, 'Johnston', 'Tina' , 'tjohnston8@alexa.com', '1-(901)128-9976', '72 Hauk Road', null, 'Memphis', 'Tennessee', '38114', 'United States', 'https://robohash.org/voluptasautmaiores.png?size=50x50&set=set1', 'Assistant Media Planner', 'Electronics', null) +,(210, 'Burns' , 'Lisa' , 'lburns9@taobao.com', '1-(585)113-8402', '99 Manufacturers Drive', null, 'Rochester', 'New York', '14624', 'United States', 'https://robohash.org/illumsinttempore.jpg?size=50x50&set=set1', 'Operator', 'Industrial', null) +,(211, 'Stone' , 'Howard' , 'hstonea@ucsd.edu', '1-(202)958-2516', '03 Anthes Center', null, 'Washington', 'District of Columbia', '20425', 'United States', 'https://robohash.org/eautet.bmp?size=50x50&set=set1', 'Account Executive', 'Electronics', null) +,(212, 'Brown' , 'Julie' , 'jbrownb@squidoo.com', '1-(217)741-6449', '37574 4th Drive', null, 'Springfield', 'Illinois', '62705', 'United States', 'https://robohash.org/laborumtotameveniet.png?size=50x50&set=set1', 'Analog Circuit Design manager', 'Electronics', null) +,(213, 'Turner' , 'Edward' , 'eturnerc@theatlantic.com', '1-(701)353-1996', '3 Bultman Circle', null, 'Fargo', 'North Dakota', '58122', 'United States', 'https://robohash.org/sedutporro.png?size=50x50&set=set1', 'Structural Engineer', 'Computers', null) +,(214, 'Nichols' , 'Douglas', 'dnicholsd@fda.gov', '1-(302)771-6486', '5150 Holmberg Way', null, 'Wilmington', 'Delaware', '19805', 'United States', 'https://robohash.org/blanditiiscommodiet.png?size=50x50&set=set1', 'Editor', 'Outdoors', null) +,(215, 'Gilbert' , 'Jessica', 'jgilberte@infoseek.co.jp', '1-(320)607-0289', '32 Summit Park', null, 'Saint Cloud', 'Minnesota', '56372', 'United States', 'https://robohash.org/providentaccusamussed.bmp?size=50x50&set=set1', 'Account Executive', 'Baby', null) +,(216, 'Hernandez', 'Kathy' , 'khernandezf@shinystat.com', '1-(210)733-3380', '24 Merrick Way', null, 'San Antonio', 'Texas', '78225', 'United States', 'https://robohash.org/utfaciliset.png?size=50x50&set=set1', 'Junior Executive', 'Movies', null) +,(217, 'Sullivan', 'Lillian', 'lsullivang@flavors.me', '1-(904)885-2053', '42 Manufacturers Pass', null, 'Jacksonville', 'Florida', '32215', 'United States', 'https://robohash.org/quiaetaut.jpg?size=50x50&set=set1', 'Engineer I', 'Sports', null) +,(218, 'Jenkins' , 'Frances', 'fjenkinsh@huffingtonpost.com', '1-(512)764-3809', '69255 Dakota Plaza', null, 'Austin', 'Texas', '78769', 'United States', 'https://robohash.org/voluptatemnamaliquam.bmp?size=50x50&set=set1', 'Developer IV', 'Baby', null) +,(219, 'Myers' , 'Roger' , 'rmyersi@alexa.com', '1-(480)583-9583', '3 Eagle Crest Place', null, 'Gilbert', 'Arizona', '85297', 'United States', 'https://robohash.org/consequaturutquo.png?size=50x50&set=set1', 'Account Executive', 'Beauty', null) +,(220, 'Hunter' , 'Bonnie' , 'bhunterj@ucsd.edu', '1-(320)933-5140', '99 Arapahoe Terrace', null, 'Saint Cloud', 'Minnesota', '56372', 'United States', 'https://robohash.org/etfacilisquo.bmp?size=50x50&set=set1', 'Analog Circuit Design manager', 'Baby', null); + +/* Products */ +insert into products (id, product_code, product_name, description, standard_cost, list_price, target_level, reorder_level, minimum_reorder_quantity, quantity_per_unit, discontinued, category) values + (601, 'P1' , 'Nikon D810' , null, 1167.09, 1123.39, 75 , 10, 10, 50, 1, 'Camera') +,(602, 'P2' , 'Canon EOS 5D Mark IV' , null, 1382.83, 1293.84, 90 , 15, 15, 56, 0, 'Camera') +,(603, 'P3' , 'Dell XPS 13' , null, 1482.83, 1393.84, 95 , 20, 30, 56, 0, 'Laptop') +,(604, 'P4' , 'iPad Air' , null, 382.83 , 293.84 , 180, 75, 50, 56, 0, 'Tablet') +,(605, 'P5' , 'Acer Aspire S 13' , null, 882.83 , 793.84 , 40 , 15, 15, 56, 0, 'Laptop') +,(606, 'P6' , 'Nexus 6' , null, 633.88 , 511.7 , 75 , 10, 20, 79, 1, 'Phone' ) +,(607, 'P7' , 'ThinkPad T365' , null, 1441.02, 1308.98, 100, 30, 10, 92, 1, 'Laptop') +,(608, 'P8' , 'Moto Z' , null, 538.44 , 462.34 , 75 , 20, 20, 54, 1, 'Phone' ) +,(609, 'P9' , 'HTC 10' , null, 547.58 , 481.83 , 50 , 5 , 15, 58, 1, 'Tablet') +,(610, 'P10', 'MacBook Pro 13.3' , null, 1625.81, 1576.61, 120, 40, 30, 11, 1, 'Laptop') +,(611, 'P11', 'Nikon D500' , null, 867.09 , 723.39 , 75 , 25, 15, 50, 1, 'Camera') +,(612, 'P12', 'Pentax K-1' , null, 882.83 , 793.84 , 50 , 10, 5 , 56, 0, 'Camera') +,(613, 'P13', 'Asus Zenbook Ux305' , null, 1182.83, 1093.84, 55 , 10, 5 , 56, 0, 'Laptop') +,(614, 'P14', 'HP Envy m7-n109dx 17.3', null, 1382.83, 1293.84, 50 , 10, 10, 56, 0, 'Laptop') +,(615, 'P15', 'Microsft Surface Book' , null, 1682.83, 1593.84, 200, 80, 50, 56, 0, 'Tablet') +,(616, 'P16', 'Apple iPhone 7' , null, 833.88 , 711.76 , 250, 100,50, 79, 1, 'Phone' ) +,(617, 'P17', 'Google Pixel' , null, 641.02 , 608.98 , 100, 30 ,20, 92, 1, 'Phone' ) +,(618, 'P18', 'Samsung Galaxy S7' , null, 538.44 , 562.34 , 75 , 15, 10, 54, 1, 'Phone' ) +,(619, 'P19', 'Samasung Note' , null, 547.58 , 481.83 , 75 , 15, 15, 58, 1, 'Tablet') +,(620, 'P20', 'Chromebook 11.6' , null, 1078.81, 1008.61, 80 , 14, 10, 11, 1, 'Laptop'); + +/* Customers */ +insert into customers (id, last_name, first_name, email, company, phone, address1, address2, city, state, postal_code, country) values + (1 , 'Gray' , 'Clarence' , 'cgray0@rambler.ru' , 'Jetpulse' , '1-(260)615-5114', '02937 Merrick Avenue' , null, 'Fort Wayne', 'Indiana', '46805', 'United States') +,(2 , 'Cooper' , 'Emily' , 'ecooper1@macromedia.com' , 'Skippad' , '1-(251)614-5034', '60 Forster Crossing' , null, 'Mobile', 'Alabama', '36605', 'United States') +,(3 , 'Wilson' , 'George' , 'gwilson2@xinhuanet.com' , 'Riffpath' , '1-(901)445-9881', '52 Browning Center' , null, 'Memphis', 'Tennessee', '38181', 'United States') +,(4 , 'Mcdonald', 'Michael' , 'mmcdonald3@twitter.com' , 'Feedfire' , '1-(419)743-7314', '85093 Jackson Park' , null, 'Toledo', 'Ohio', '43610', 'United States') +,(5 , 'Tucker' , 'Lori' , 'ltucker4@etsy.com' , 'Oyondu' , '1-(202)381-2663', '0706 Heffernan Pass' , null, 'Washington', 'District of Columbia', '20380', 'United States') +,(6 , 'Hansen' , 'Lois' , 'lhansen5@stumbleupon.com', 'Yozio' , '1-(315)385-6866', '2 Ruskin Pass' , null, 'Syracuse', 'New York', '13251', 'United States') +,(7 , 'Grant' , 'Frances' , 'fgrant6@yale.edu' , 'Eire' , '1-(863)799-9068', '61402 Morning Court' , null, 'Lakeland', 'Florida', '33811', 'United States') +,(8 , 'Lewis' , 'Catherine', 'clewis7@unesco.org' , 'Realpoint', '1-(915)208-4997', '775 Messerschmidt Junction', null, 'El Paso', 'Texas', '88563', 'United States') +,(9 , 'Rogers' , 'Edward' , 'erogers8@guardian.co.uk' , 'Quinu' , '1-(971)934-2404', '7074 Montana Place' , null, 'Portland', 'Oregon', '97271', 'United States') +,(10, 'Owens' , 'Tina' , 'towens9@earthlink.net' , 'Blogtag' , '1-(712)989-9002', '59039 Sachtjen Street', null, 'Sioux City', 'Iowa', '51105', 'United States') +,(11, 'Peterson', 'Fred' , 'fpetersona@home.pl' , 'Meedoo' , '1-(202)228-9380', '55 Knutson Street', null, 'Washington', 'District of Columbia', '20099', 'United States') +,(12, 'Cox' , 'Jason' , 'jcoxb@slashdot.org' , 'Tagcat' , '1-(651)991-0172', '19 Hoffman Avenue', null, 'Saint Paul', 'Minnesota', '55114', 'United States') +,(13, 'Perez' , 'Paul' , 'pperezc@ask.com' , 'Kazu' , '1-(405)290-7944', '6336 Continental Circle', null, 'Oklahoma City', 'Oklahoma', '73167', 'United States') +,(14, 'Duncan' , 'Anthony' , 'aduncand@disqus.com' , 'Aibox' , '1-(727)705-8400', '17794 Northport Point', null, 'Clearwater', 'Florida', '33763', 'United States') +,(15, 'Graham' , 'Sean' , 'sgrahame@google.com.br' , 'Tekfly' , '1-(901)443-0731', '47493 Reinke Drive', null, 'Memphis', 'Tennessee', '38131', 'United States') +,(16, 'Simpson' , 'Jose' , 'jsimpsonf@youtube.com' , 'Youspan' , '1-(518)381-4659', '498 Carey Lane', null, 'Albany', 'New York', '12262', 'United States') +,(17, 'Simmons' , 'Frances' , 'fsimmonsg@webster.com' ,'Feednation', '1-(251)473-1327', '44102 Montana Crossing', null, 'Mobile', 'Alabama', '36641', 'United States') +,(18, 'Schmidt' , 'John' , 'jschmidth@vinaora.com' , 'Topicblab', '1-(202)945-2079', '384 Goodland Pass', null, 'Washington', 'District of Columbia', '20210', 'United States') +,(19, 'West' , 'Roger' , 'rwesti@cornell.edu' , 'Skilith' , '1-(716)707-3907', '74 Nancy Pass', null, 'Buffalo', 'New York', '14215', 'United States') +,(20, 'Fields' , 'Jesse' , 'jfieldsj@shop-pro.jp' , 'Vinte' , '1-(617)810-9493', '602 Laurel Park', null, 'Boston', 'Massachusetts', '02203', 'United States') +,(21, 'Patterson', 'Kathy' , 'kpattersonk@machines.org', 'Brainverse', '1-(806)803-9725', '67063 Spenser Junction', null, 'Amarillo', 'Texas', '79188', 'United States') +,(22, 'Bell' , 'Stephanie', 'sbelll@gravatar.com' , 'DabZ' , '1-(801)924-1975', '05 Gina Crossing', null, 'Salt Lake City', 'Utah', '84145', 'United States') +,(23, 'Turner' , 'Martha' , 'mturnerm@hp.com' , 'Yadel' , '1-(225)880-9134', '97789 Scofield Point', null, 'Baton Rouge', 'Louisiana', '70894', 'United States') +,(24, 'Ross' , 'Richard' , 'rrossn@weebly.com' , 'Voolith' , '1-(415)690-1916', '19 Briar Crest Alley', null, 'San Francisco', 'California', '94164', 'United States') +,(25, 'Stephens', 'Stephanie', 'sstephenso@times.co.uk' , 'BlogXS' , '1-(501)827-1408', '63291 Huxley Drive', null, 'North Little Rock', 'Arkansas', '72118', 'United States') +,(26, 'Sanchez' , 'Diane' , 'dsanchezp@sun.com' , 'Tagtune' , '1-(315)979-6793', '13 Oneill Junction', null, 'Syracuse', 'New York', '13224', 'United States') +,(27, 'Lawrence', 'Douglas' , 'dlawrenceq@flickr.com' , 'Browsetype', '1-(610)622-4045', '83224 Mallard Center', null, 'Philadelphia', 'Pennsylvania', '19109', 'United States') +,(28, 'Hansen' , 'Lori' , 'lhansenr@patch.com' , 'Einti' , '1-(915)266-1989', '48410 Westport Circle', null, 'El Paso', 'Texas', '88546', 'United States') +,(29, 'Medina' , 'Robert' , 'rmedinas@uiuc.edu' , 'Tambee' , '1-(216)752-7216', '0562 Muir Trail', null, 'Cleveland', 'Ohio', '44197', 'United States') +,(30, 'Harrison', 'Shawn' , 'sharrisont@webnode.com' , 'Youopia' , '1-(205)595-8085', '20 Mayer Center', null, 'Birmingham', 'Alabama', '35205', 'United States') +,(31, 'Alexander', 'Julia' , 'jalexanderu@netsol.com' , 'Oodoo' , '1-(864)349-2185', '61859 West Point', null, 'Greenville', 'South Carolina', '29610', 'United States') +,(32, 'Stanley', 'Victor' , 'vstanleyv@wikipedia.org' , 'Centimia' , '1-(561)507-7317', '08229 Glacier Hill Avenue', null, 'Boynton Beach', 'Florida', '33436', 'United States') +,(33, 'Wheeler', 'Dennis' , 'dwheelerw@indiatimes.com', 'Dynabox' , '1-(419)889-2883', '409 American Ash Plaza', null, 'Lima', 'Ohio', '45807', 'United States') +,(34, 'Frazier', 'Rachel' , 'rfrazierx@sfgate.com' , 'Skivee' , '1-(314)249-1796', '7 Waxwing Court', null, 'Saint Louis', 'Missouri', '63131', 'United States') +,(35, 'Brooks' , 'Shawn' , 'sbrooksy@mediafire.com' , 'Omba' , '1-(971)854-8478', '614 Monica Terrace', null, 'Portland', 'Oregon', '97240', 'United States') +,(36, 'Coleman', 'Frank' , 'fcolemanz@un.org' , 'Agimba' , '1-(318)446-4337', '4 Browning Park', null, 'Shreveport', 'Louisiana', '71151', 'United States') +,(37, 'Wright' , 'Frank' , 'fwright10@flickr.com' , 'Meedoo' , '1-(504)852-2553', '03446 Sheridan Trail', null, 'New Orleans', 'Louisiana', '70183', 'United States') +,(38, 'Perkins', 'Tina' , 'tperkins11@va.gov' , 'Rhybox' , '1-(571)497-0755', '62 Grayhawk Lane', null, 'Fairfax', 'Virginia', '22036', 'United States') +,(39, 'Griffin', 'Ruth' , 'rgriffin12@pcworld.com' , 'Trudoo' , '1-(504)312-7448', '29701 Jenifer Junction', null, 'Metairie', 'Louisiana', '70033', 'United States') +,(40, 'Sanchez', 'Sean' , 'ssanchez13@bandcamp.com' , 'Chatterpoint', '1-(316)535-7647', '10 Stuart Road', null, 'Wichita', 'Kansas', '67260', 'United States') +,(41, 'Harris' , 'Linda' , 'lharris14@ask.com' , 'Blogpad' , '1-(913)258-6547', '17635 Elka Alley', null, 'Shawnee Mission', 'Kansas', '66205', 'United States') +,(42, 'Wood' , 'George' , 'gwood15@imdb.com' , 'Feednation' , '1-(865)482-7169', '210 Anhalt Drive', null, 'Knoxville', 'Tennessee', '37924', 'United States') +,(43, 'Bennett', 'Nancy' , 'nbennett16@netsol.com' , 'Yodo' , '1-(210)749-3167', '97861 Harper Pass', null, 'San Antonio', 'Texas', '78260', 'United States') +,(44, 'Pierce' , 'Jesse' , 'jpierce17@cyberchimps.com', 'Divanoodle' , '1-(501)518-2300', '0 Columbus Terrace', null, 'Little Rock', 'Arkansas', '72231', 'United States') +,(45, 'Larson' , 'Jerry' , 'jlarson18@ustream.tv' , 'Kazu' , '1-(916)702-0977', '0422 Merry Court', null, 'Sacramento', 'California', '95852', 'United States') +,(46, 'Williams', 'Norma' , 'nwilliams19@spiegel.de' , 'Yacero' , '1-(562)631-4036', '5779 Burning Wood Crossing', null, 'Long Beach', 'California', '90847', 'United States') +,(47, 'Kelley' , 'Louis' , 'lkelley1a@wsj.com' , 'Linkbuzz' , '1-(432)286-2200', '04321 Northport Pass', null, 'Odessa', 'Texas', '79764', 'United States') +,(48, 'Mason' , 'Ruby' , 'rmason1b@census.gov' , 'Trudeo' , '1-(763)835-7627', '99219 5th Place', null, 'Monticello', 'Minnesota', '55565', 'United States') +,(49, 'Carr' , 'Nicole' , 'ncarr1c@yellowbook.com' , 'Plajo' , '1-(330)154-9245', '41 Monica Parkway', null, 'Youngstown', 'Ohio', '44511', 'United States') +,(50, 'Franklin', 'Michelle' , 'mfranklin1d@ucoz.com' , 'Wikivu' , '1-(405)751-8906', '62 Rutledge Alley', null, 'Oklahoma City', 'Oklahoma', '73147', 'United States') +,(51, 'Hawkins', 'Larry' , 'lhawkins1e@typepad.com' , 'Tagpad' , '1-(240)796-9270', '48 Columbus Road', null, 'Hagerstown', 'Maryland', '21747', 'United States') +,(52, 'Adams' , 'Lillian' , 'ladams1f@smugmug.com' , 'Avamm' , '1-(419)394-2363', '69708 West Avenue', null, 'Toledo', 'Ohio', '43605', 'United States') +,(53, 'Williamson', 'Janice' , 'jwilliamson1g@sbwire.com', 'Wordware' , '1-(212)576-0309', '311 Clemons Crossing', null, 'New York City', 'New York', '10090', 'United States') +,(54, 'Mitchell', 'Lisa' , 'lmitchell1h@live.com' , 'Trudoo' , '1-(225)794-6979', '17242 Eagan Terrace', null, 'Baton Rouge', 'Louisiana', '70820', 'United States') +,(55, 'Lawrence', 'Anna' , 'alawrence1i@manage.com' , 'Pixope' , '1-(818)505-8262', '51241 Tennessee Point', null, 'Santa Monica', 'California', '90405', 'United States') +,(56, 'Scott' , 'Margaret' , 'mscott1j@arizona.edu' , 'Mynte' , '1-(202)265-0994', '117 Arapahoe Crossing', null, 'Washington', 'District of Columbia', '20051', 'United States') +,(57, 'Harper' , 'Timothy' , 'tharper1k@loc.gov' , 'Trudoo' , '1-(212)348-5025', '137 Commercial Court', null, 'New York City', 'New York', '10175', 'United States') +,(58, 'Frazier' , 'Mary' , 'mfrazier1l@mapy.cz' , 'Photobug' , '1-(214)939-0299', '281 Briar Crest Way', null, 'Garland', 'Texas', '75049', 'United States') +,(59, 'Young' , 'Margaret' , 'myoung1m@ehow.com' , 'Realmix' , '1-(318)144-2666', '537 Memorial Way', null, 'Shreveport', 'Louisiana', '71105', 'United States') +,(60, 'Sullivan', 'Phyllis' , 'psullivan1n@jiathis.com' , 'Demivee' , '1-(518)361-7505', '117 Onsgard Crossing', null, 'Albany', 'New York', '12227', 'United States') +,(61, 'Knight' , 'Roy' , 'rknight1o@qq.com' , 'Meezzy' , '1-(478)438-2599', '60 Kinsman Drive', null, 'Macon', 'United Kingdom', '31210', 'United States') +,(62, 'Ruiz' , 'Andrea' , 'aruiz1p@domainmarket.com', 'Fivespan' , '1-(415)374-7204', '55455 Heffernan Plaza', null, 'San Francisco', 'California', '94142', 'United States') +,(63, 'Hayes' , 'Heather' , 'hhayes1q@odnoklasniki.ru', 'Twitternation', '1-(615)919-6350', '31 Banding Plaza', null, 'Jackson', 'Mississippi', '39296', 'United States') +,(64, 'Chapman' , 'Roy' , 'rchapman1r@theguardian.com', 'BlogXS' , '1-(941)329-4488', '27487 Fair Oaks Crossing', null, 'Sarasota', 'Florida', '34233', 'United States') +,(65, 'Moore' , 'Daniel' , 'dmoore1s@google.co.uk' , 'Twitterbridge', '1-(408)838-8747', '52377 Everett Court', null, 'San Jose', 'California', '95194', 'United States') +,(66, 'Day' , 'Amy' , 'aday1t@indiegogo.com' , 'Brainverse' , '1-(336)903-6679', '50107 Northport Circle', null, 'Winston Salem', 'North Carolina', '27157', 'United States') +,(67, 'Kelley' , 'Jesse' , 'jkelley1u@who.int' , 'Zoomzone' , '1-(304)183-6041', '31740 Bayside Trail', null, 'Huntington', 'West Virginia', '25711', 'United States') +,(68, 'Andrews' , 'Andrea' , 'aandrews1v@patch.com' , 'Fanoodle' , '1-(206)996-3516', '544 Lakewood Gardens Alley', null, 'Seattle', 'Washington', '98148', 'United States') +,(69, 'Willis' , 'Robert' , 'rwillis1w@si.edu' , 'Tazz' , '1-(678)738-3382', '0998 Bellgrove Circle', null, 'Duluth', 'United Kingdom', '30195', 'United States') +,(70, 'Reid' , 'Daniel' , 'dreid1x@miitbeian.gov.cn', 'Babbleblab', '1-(786)539-0220', '2 New Castle Avenue', null, 'Miami', 'Florida', '33111', 'United States') +,(71, 'Roberts' , 'Louise' , 'lroberts1y@cpanel.net' , 'Skippad' , '1-(316)418-5043', '598 Mayfield Road', null, 'Wichita', 'Kansas', '67210', 'United States') +,(72, 'Harrison', 'Margaret' , 'mharrison1z@globe.ne.jp' , 'Zoovu' , '1-(775)625-5357', '636 Maple Point', null, 'Reno', 'Nevada', '89550', 'United States') +,(73, 'Chapman' , 'Peter' , 'pchapman20@eventbrite.com', 'Linkbuzz' , '1-(574)707-4449', '1 Vermont Plaza', null, 'South Bend', 'Indiana', '46620', 'United States') +,(74, 'Tucker' , 'Willie' , 'wtucker21@hubpages.com' , 'Eazzy' , '1-(814)593-2963', '3 Dryden Trail', null, 'Erie', 'Pennsylvania', '16505', 'United States') +,(75, 'Bradley' , 'Adam' , 'abradley22@cnet.com' , 'Yabox' , '1-(903)334-0845', '15 Veith Center', null, 'Tyler', 'Texas', '75705', 'United States') +,(76, 'Armstrong', 'Juan' , 'jarmstrong23@archive.org', 'Gevee' , '1-(916)285-8157', '95 Claremont Crossing', null, 'Sacramento', 'California', '95865', 'United States') +,(77, 'Payne' , 'Kenneth' , 'kpayne24@com.com' , 'Skinte' , '1-(770)150-8423', '75 Beilfuss Court', null, 'Alpharetta', 'United Kingdom', '30022', 'United States') +,(78, 'Jacobs' , 'Louis' , 'ljacobs25@intel.com' , 'Photolist' , '1-(404)386-3449', '542 Browning Park', null, 'Atlanta', 'United Kingdom', '30343', 'United States') +,(79, 'Cooper' , 'Marilyn' , 'mcooper26@whitehouse.gov', 'Yotz' , '1-(520)875-3539', '03 Transport Point', null, 'Tucson', 'Arizona', '85710', 'United States') +,(80, 'Watkins' , 'William' , 'wwatkins27@pbs.org' , 'Brightbean', '1-(719)568-3678', '0316 La Follette Drive', null, 'Colorado Springs', 'Colorado', '80920', 'United States') +,(81, 'Baker' , 'Douglas' , 'dbaker28@exblog.jp' , 'Voonix' , '1-(619)121-6070', '99 Kedzie Terrace', null, 'Chula Vista', 'California', '91913', 'United States') +,(82, 'Cunningham','Daniel' , 'dcunningham29@oakley.com', 'Leexo' , '1-(619)609-6206', '53540 Hallows Place', null, 'San Diego', 'California', '92137', 'United States') +,(83, 'Mitchell', 'Edward' , 'emitchell2a@amazon.com' , 'Jatri' , '1-(502)427-5275', '3 Jana Junction', null, 'Louisville', 'Kentucky', '40280', 'United States') +,(84, 'Matthews', 'Adam' , 'amatthews2b@live.com' , 'Muxo' , '1-(316)764-9074', '5 Arapahoe Plaza', null, 'Wichita', 'Kansas', '67220', 'United States') +,(85, 'Jacobs' , 'Diane' , 'djacobs2c@jimdo.com' , 'Youspan' , '1-(804)398-4775', '6 Moose Street', null, 'Richmond', 'Virginia', '23285', 'United States') +,(86, 'Frazier' , 'Mary' , 'mfrazier2d@forbes.com' , 'Zoomdog' , '1-(716)502-4243', '713 Continental Trail', null, 'Buffalo', 'New York', '14210', 'United States') +,(87, 'Howard' , 'Anthony' , 'ahoward2e@disqus.com' , 'Katz' , '1-(805)800-7968', '006 Elka Center', null, 'Bakersfield', 'California', '93311', 'United States') +,(88, 'Kelly' , 'Anna' , 'akelly2f@unc.edu' , 'Trilia' , '1-(804)117-9707', '292 Browning Circle', null, 'Richmond', 'Virginia', '23228', 'United States') +,(89, 'Clark' , 'Kathy' , 'kclark2g@businesswire.com' , 'Gigabox' , '1-(831)755-4869', '45 Walton Parkway', null, 'Salinas', 'California', '93907', 'United States') +,(90, 'Carpenter', 'Gerald' , 'gcarpenter2h@foxnews.com' , 'Yakidoo' , '1-(213)344-9608', '84560 Stephen Parkway', null, 'Los Angeles', 'California', '90055', 'United States') +,(91, 'Hart' , 'Albert' , 'ahart2i@scribd.com' , 'Jaloo' , '1-(415)201-5281', '0 Washington Place', null, 'Oakland', 'California', '94611', 'United States') +,(92, 'Young' , 'Julia' , 'jyoung2j@craigslist.org' , 'Oloo' , '1-(615)660-1203', '0623 Gale Drive', null, 'Jackson', 'Mississippi', '39210', 'United States') +,(93, 'Pierce' , 'Tammy' , 'tpierce2k@psu.edu' , 'Ntags' , '1-(703)772-3155', '501 Leroy Parkway', null, 'Washington', 'District of Columbia', '20041', 'United States') +,(94, 'Washington', 'Ronald' , 'rwashington2l@drupal.org' , 'Livetube' , '1-(202)828-6093', '6220 Del Sol Alley', null, 'Washington', 'District of Columbia', '20551', 'United States') +,(95, 'Carter' , 'Alan' , 'acarter2m@simplemachines.org', 'Centizu' , '1-(952)234-1678', '043 Sunnyside Center', null, 'Young America', 'Minnesota', '55551', 'United States') +,(96, 'Freeman' , 'Stephanie', 'sfreeman2n@redcross.org' , 'Feednation' , '1-(504)126-8245', '1120 Veith Parkway', null, 'New Orleans', 'Louisiana', '70165', 'United States') +,(97, 'Price' , 'Sara' , 'sprice2o@irs.gov' , 'Izio' , '1-(415)668-5714', '96394 Bonner Hill', null, 'San Francisco', 'California', '94116', 'United States') +,(98, 'Parker' , 'Emily' , 'eparker2p@4shared.com' , 'Skalith' , '1-(330)637-4894', '0 Old Shore Center', null, 'Akron', 'Ohio', '44310', 'United States') +,(99, 'Chavez' , 'Jeremy' , 'jchavez2q@businessweek.com' , 'Topicware' , '1-(515)769-2045', '8584 Jay Street', null, 'Des Moines', 'Iowa', '50335', 'United States') +,(100, 'Kim' , 'Pamela' , 'pkim2r@stumbleupon.com' , 'Photolist' , '1-(510)144-4318', '3688 Gerald Trail', null, 'Sacramento', 'California', '95823', 'United States'); + +/* LOOK UP VALUES */ + + +/* orders */ +insert into orders (id, employee_id, customer_id, order_date, shipped_date, ship_name, ship_address1, ship_address2, ship_city, ship_state, ship_postal_code, ship_country, shipping_fee, payment_type, paid_date, order_status) values + (4001, 204, 40, '2016-04-05', '2016-11-06', 'Jean Fuller', '93 Spohn Place', null, 'Manggekompo', null, null, 'Indonesia', 8.14, 'Card', '2016-10-12', 'On Hold') +,(4002, 204, 95, '2017-01-29', '2016-05-28', 'Diane Holmes', '46 Eliot Trail', null, 'Virginia Beach', 'Virginia', '23459', 'United States', 1.55, 'Check', '2016-06-27', 'Shipped') +,(4003, 218, 54, '2016-08-19', '2016-12-08', 'Jerry Frazier', '23 Sundown Junction', null, 'Obodivka', null, null, 'Ukraine', 2.29, 'Cash', '2016-09-27', 'On Hold') +,(4004, 204, 69, '2016-09-25', '2016-12-24', 'Denise Freeman', '4909 Beilfuss Hill', null, 'Nova Venécia', null, '29830-000', 'Brazil', 4.77, 'Check', '2016-07-04', 'New') +,(4005, 215, 10, '2017-03-14', '2016-03-19', 'Jonathan Gordon', '7 Ludington Court', null, 'Sukamaju', null, null, 'Indonesia', 8.78, 'Check', '2016-03-22', 'On Hold') +,(4006, 211, 23, '2016-08-14', '2016-12-05', 'Sean Carter', '859 Dahle Plaza', null, 'Dayou', null, null, 'China', 9.43, 'Cash', '2016-08-21', 'New') +,(4007, 204, 92, '2017-01-02', '2016-07-09', 'Alice Warren', '5 Fuller Center', null, 'Log pri Brezovici', null, '1358', 'India', 3.25, 'Cash', '2016-03-24', 'Shipped') +,(4008, 205, 20, '2016-05-15', '2016-09-12', 'Andrea Hamilton', '99 Blue Bill Park Junction', null, 'Liangshui', null, null, 'China', 7.04, 'Check', '2016-09-02', 'On Hold') +,(4009, 219, 58, '2016-11-27', '2017-03-02', 'Wanda Hill', '907 Sundown Court', null, 'Pedra Azul', null, '39970-000', 'Brazil', 4.35, 'Cash', '2016-09-27', 'On Hold') +,(4010, 218, 57, '2016-09-11', '2017-02-26', 'Carolyn Foster', '0 Charing Cross Court', null, 'Chicago', 'Illinois', '60609', 'United States', 1.23, 'Cash', '2016-08-09', 'Complete') +,(4011, 207, 3 , '2017-03-01', '2016-08-04', 'Timothy Warren', '19 John Wall Parkway', null, 'Lyon', 'Rhône-Alpes', '69362 CEDEX 07', 'France', 9.57, 'Card', '2016-05-08', 'Complete') +,(4012, 210, 59, '2016-12-31', '2016-08-08', 'Kathleen Marshall', '2 Swallow Circle', null, 'Cunliji', null, null, 'China', 9.03, 'Cash', '2016-04-23', 'On Hold') +,(4013, 204, 57, '2017-01-11', '2017-02-13', 'Jane Ortiz', '1136 Kedzie Alley', null, 'Eirado', 'Viana do Castelo', '4990-540', 'Portugal', 8.9, 'Check', '2016-10-26', 'Shipped') +,(4014, 212, 26, '2016-09-23', '2016-05-13', 'Carolyn Martinez', '954 Kropf Court', null, 'Ibitinga', null, '14940-000', 'Brazil', 4.57, 'Card', '2016-09-11', 'New') +,(4015, 201, 86, '2016-11-04', '2016-10-03', 'Debra Willis', '89 Grasskamp Road', null, 'San Francisco', null, '8501', 'Philippines', 3.53, 'Card', '2016-10-05', 'New') +,(4016, 208, 17, '2016-04-17', '2016-03-22', 'Sharon Little', '27501 Sommers Junction', null, 'San Juan Opico', null, null, 'India', 6.87, 'Card', '2017-01-08', 'Complete') +,(4017, 205, 73, '2016-07-03', '2016-09-26', 'Nancy Hughes', '1 John Wall Avenue', null, 'La Libertad', null, null, 'Argentina', 4.67, 'Check', '2017-02-01', 'New') +,(4018, 213, 16, '2016-12-01', '2016-06-08', 'Sara Knight', '98248 Tony Pass', null, 'Val-d''Or', 'Québec', 'J9P', 'Canada', 9.52, 'Card', '2016-08-06', 'New') +,(4019, 209, 10, '2016-04-18', '2016-04-25', 'Russell Wood', '3 Commercial Point', null, 'Rokietnica', null, '62-090', 'Poland', 6.8, 'Card', '2017-01-20', 'On Hold') +,(4020, 216, 1 , '2016-07-23', '2017-02-23', 'Aaron Grant', '15477 Farwell Circle', null, 'Yongyang', null, null, 'China', 3.17, 'Cash', '2016-08-11', 'Complete') +,(4021, 209, 38, '2016-12-16', '2017-02-14', 'Ryan Foster', '9218 Leroy Avenue', null, 'Mogapinyana', null, null, 'India', 3.34, 'Cash', '2016-06-21', 'On Hold') +,(4022, 207, 91, '2016-07-18', '2016-04-06', 'Peter Montgomery', '570 Londonderry Pass', null, 'Mathakola', null, null, 'India', 8.11, 'Card', '2016-10-27', 'New') +,(4023, 209, 39, '2016-07-15', '2017-02-02', 'Lawrence Schmidt', '371 Acker Drive', null, 'Mesa', 'Arizona', '85205', 'United States', 1.39, 'Cash', '2016-10-27', 'Complete') +,(4024, 219, 51, '2016-12-08', '2017-01-03', 'Eric Gray', '4608 Farmco Point', null, 'Gemblengmulyo', null, null, 'Indonesia', 8.76, 'Card', '2016-05-13', 'Complete') +,(4025, 204, 77, '2016-09-24', '2017-01-20', 'Gloria Green', '62 Sunnyside Park', null, 'Itararé', null, '18460-000', 'Brazil', 7.75, 'Cash', '2017-02-06', 'On Hold') +,(4026, 215, 73, '2016-09-15', '2016-12-24', 'Nicholas Price', '5672 Ruskin Hill', null, 'Maimará', null, '4624', 'Argentina', 9.11, 'Card', '2016-07-22', 'On Hold') +,(4027, 208, 98, '2016-05-31', '2016-07-14', 'Doris Watson', '133 Gina Street', null, 'Bantiran', null, null, 'Indonesia', 3.0, 'Cash', '2016-10-08', 'Complete') +,(4028, 217, 39, '2016-05-10', '2016-04-07', 'Linda Foster', '40382 4th Terrace', null, 'Agrelo', 'Braga', '4730-300', 'Portugal', 2.39, 'Cash', '2016-09-11', 'Complete') +,(4029, 212, 52, '2016-09-14', '2016-12-21', 'Anthony Spencer', '02 Esker Junction', null, 'El Ocotón', null, null, 'Canada', 7.72, 'Check', '2016-09-23', 'Shipped') +,(4030, 218, 74, '2016-05-08', '2016-07-21', 'James Kennedy', '7460 Westport Hill', null, 'Köln', 'Nordrhein-Westfalen', '51107', 'Germany', 6.16, 'Cash', '2016-11-27', 'Shipped') +,(4031, 214, 4 , '2016-05-31', '2017-03-03', 'Theresa Robinson', '44 Havey Way', null, 'Qingtong', null, null, 'China', 5.02, 'Check', '2017-03-15', 'New') +,(4032, 201, 81, '2016-07-05', '2016-11-18', 'Jesse Ray', '68 Derek Hill', null, 'Azogues', null, null, 'Argentina', 5.41, 'Check', '2016-10-16', 'New') +,(4033, 203, 15, '2016-09-07', '2016-06-09', 'Harold Fields', '2 Vermont Terrace', null, 'Mogocha', null, '673732', 'Russia', 2.38, 'Check', '2016-03-30', 'Complete') +,(4034, 217, 11, '2016-08-19', '2016-12-08', 'Larry Watkins', '629 Waxwing Avenue', null, 'Krasnyy Oktyabr’', null, '398526', 'Russia', 5.23, 'Cash', '2016-07-01', 'On Hold') +,(4035, 205, 51, '2016-11-29', '2016-09-02', 'Debra Marshall', '23578 Arizona Junction', null, 'Juhut', null, null, 'Indonesia', 1.59, 'Card', '2016-06-17', 'Shipped') +,(4036, 217, 56, '2016-10-21', '2017-02-13', 'Todd Stephens', '63633 Columbus Avenue', null, 'Paccho', null, null, 'Peru', 5.09, 'Cash', '2016-04-25', 'New') +,(4037, 219, 60, '2016-09-22', '2016-11-08', 'Jean Webb', '0916 Grover Way', null, 'Kuršėnai', null, '81001', 'Denmark', 8.66, 'Cash', '2016-09-30', 'Shipped') +,(4038, 213, 3 , '2016-06-01', '2016-10-07', 'Heather Snyder', '44 Grayhawk Court', null, 'Haenam', null, null, 'Finland', 5.33, 'Cash', '2016-06-30', 'Complete') +,(4039, 201, 28, '2017-02-19', '2016-11-25', 'Janet Howard', '5351 Barby Trail', null, 'Shanghu', null, null, 'China', 9.18, 'Check', '2017-03-16', 'On Hold') +,(4040, 215, 74, '2016-09-14', '2016-06-23', 'Aaron Wheeler', '08 Burrows Avenue', null, 'Tân Sơn', null, null, 'Vietnam', 3.36, 'Card', '2017-03-05', 'New') +,(4041, 204, 79, '2016-09-27', '2017-02-15', 'Lori Watkins', '3 Pennsylvania Court', null, 'Victoria', null, 'VCT', 'India', 9.41, 'Card', '2016-08-12', 'New') +,(4042, 205, 92, '2016-11-03', '2016-05-11', 'Alice Miller', '7895 Amoth Avenue', null, 'Mae Lao', null, '57250', 'Thailand', 2.11, 'Cash', '2016-08-06', 'Shipped') +,(4043, 212, 82, '2016-11-17', '2016-04-19', 'Marilyn Nguyen', '25203 Meadow Ridge Plaza', null, 'Nine', 'Braga', '4775-446', 'Portugal', 6.03, 'Cash', '2016-05-07', 'On Hold') +,(4044, 218, 55, '2016-06-26', '2016-08-15', 'Ashley West', '08621 Porter Lane', null, 'Kingsport', 'Tennessee', '37665', 'United States', 8.23, 'Cash', '2016-12-17', 'New') +,(4045, 217, 53, '2016-05-07', '2017-02-25', 'Julia Fernandez', '91519 Harbort Way', null, 'Issoire', 'Auvergne', '63504 CEDEX', 'France', 1.14, 'Check', '2016-10-27', 'Complete') +,(4046, 211, 78, '2016-12-11', '2017-02-15', 'Willie Sims', '683 Caliangt Parkway', null, 'Balazar', 'Braga', '4805-005', 'Portugal', 6.57, 'Card', '2017-02-13', 'On Hold') +,(4047, 201, 77, '2016-05-20', '2017-02-19', 'Samuel Burke', '25 Grover Lane', null, 'Housuo', null, null, 'China', 6.99, 'Cash', '2016-08-12', 'New') +,(4048, 217, 72, '2016-11-06', '2016-09-29', 'Patricia Green', '29791 Thierer Street', null, 'Campamento', null, '052027', 'Argentina', 3.33, 'Check', '2016-03-24', 'Complete') +,(4049, 210, 98, '2016-08-24', '2016-04-16', 'Nicole Washington', '68 Monica Point', null, 'Cikaung', null, null, 'Indonesia', 5.78, 'Check', '2016-04-30', 'Complete') +,(4050, 215, 26, '2016-10-07', '2016-11-03', 'Marie Bryant', '36611 Schlimgen Place', null, 'Villa Francisca', null, '10215', 'Canada', 4.11, 'Check', '2016-07-29', 'Complete') +,(4051, 212, 51, '2016-05-19', '2017-03-16', 'Brandon Lane', '5 Duke Center', null, 'Soutinho', 'Porto', '4650-530', 'Portugal', 9.62, 'Check', '2016-11-28', 'Shipped') +,(4052, 205, 9 , '2016-07-19', '2016-09-05', 'Pamela Ferguson', '0 Mockingbird Crossing', null, 'Jefferson City', 'Missouri', '65105', 'United States', 9.98, 'Card', '2016-12-08', 'Shipped') +,(4053, 210, 42, '2016-04-09', '2017-02-05', 'Gloria Edwards', '8275 Sage Plaza', null, 'Yilkiqi', null, null, 'China', 5.21, 'Cash', '2016-11-10', 'On Hold') +,(4054, 211, 70, '2017-02-28', '2017-02-11', 'John Cole', '4679 Trailsway Circle', null, 'Sanlanbahai', null, null, 'China', 4.42, 'Card', '2017-01-06', 'Complete') +,(4055, 208, 65, '2017-01-11', '2017-02-14', 'Bobby Butler', '314 Jenna Crossing', null, 'Malusac', null, '2005', 'Philippines', 7.37, 'Cash', '2017-03-15', 'Shipped') +,(4056, 220, 15, '2016-07-12', '2016-09-06', 'Anthony Lane', '1 Packers Avenue', null, 'Batambak', null, null, 'Indonesia', 5.41, 'Card', '2016-11-21', 'On Hold') +,(4057, 220, 76, '2016-05-05', '2016-04-19', 'Karen Ray', '891 Raven Street', null, 'Chinju', null, null, 'Finland', 4.71, 'Cash', '2017-02-11', 'On Hold') +,(4058, 216, 90, '2017-01-26', '2016-12-19', 'Martha Gonzalez', '8695 Mandrake Place', null, 'Maythalūn', null, null, 'India', 1.75, 'Card', '2017-03-16', 'On Hold') +,(4059, 212, 43, '2016-09-20', '2017-02-11', 'Judy Daniels', '154 Lukken Court', null, 'Luoqiao', null, null, 'China', 4.63, 'Check', '2016-11-09', 'On Hold') +,(4060, 207, 80, '2016-04-29', '2016-07-01', 'Jane Stevens', '43 Kingsford Pass', null, 'Dobruševo', null, '7514', 'Denmark', 1.96, 'Cash', '2016-09-02', 'On Hold') +,(4061, 214, 89, '2016-10-09', '2016-09-09', 'Emily Miller', '5 Pearson Lane', null, 'East London', null, '5688', 'South Africa', 2.14, 'Card', '2016-06-10', 'Complete') +,(4062, 220, 8 , '2016-12-01', '2017-03-09', 'Sarah Johnson', '30 Chinook Lane', null, 'Selishche', null, '180536', 'Russia', 3.76, 'Card', '2016-11-18', 'On Hold') +,(4063, 220, 48, '2017-03-05', '2016-11-30', 'Carolyn Reyes', '72 Michigan Pass', null, 'Sukasenang', null, null, 'Indonesia', 6.52, 'Cash', '2016-05-20', 'Shipped') +,(4064, 214, 31, '2016-07-19', '2016-08-16', 'Kathryn Coleman', '43358 Packers Court', null, 'Przystajń', null, '42-141', 'Poland', 1.68, 'Card', '2016-12-13', 'Complete') +,(4065, 205, 41, '2016-12-09', '2016-03-20', 'Clarence Graham', '1675 Starling Point', null, 'Zangbawa', null, null, 'China', 5.82, 'Cash', '2016-07-08', 'Complete') +,(4066, 205, 41, '2016-05-25', '2016-11-15', 'David Harris', '00 Warner Court', null, 'Kabba', null, null, 'Netherlands', 7.24, 'Cash', '2016-09-24', 'New') +,(4067, 218, 13, '2016-07-24', '2016-12-06', 'Ruth Fields', '88567 Golf Course Plaza', null, 'Mauá', null, '09300-000', 'Brazil', 6.82, 'Cash', '2017-01-26', 'New') +,(4068, 206, 11, '2016-05-04', '2016-07-10', 'Todd Butler', '88 Graedel Point', null, 'Jablah', null, null, 'India', 3.83, 'Cash', '2016-06-17', 'On Hold') +,(4069, 215, 55, '2016-12-22', '2016-03-28', 'Catherine Perkins', '95 Troy Parkway', null, 'Frampol', null, '23-440', 'Poland', 7.6, 'Check', '2016-08-24', 'Shipped') +,(4070, 220, 40, '2016-10-17', '2016-12-01', 'Jeffrey Rodriguez', '3393 Weeping Birch Court', null, 'Burunday', null, null, 'Denmark', 2.52, 'Cash', '2016-09-06', 'Shipped') +,(4071, 218, 70, '2017-03-16', '2016-12-09', 'Rachel Butler', '79327 Ridgeway Circle', null, 'Dupnitsa', null, '2680', 'Denmark', 6.25, 'Check', '2016-04-02', 'Complete') +,(4072, 205, 45, '2017-01-22', '2016-05-15', 'Robin Fisher', '0 Susan Court', null, 'Morohongō', null, '357-0211', 'Japan', 4.42, 'Card', '2017-03-06', 'Complete') +,(4073, 217, 94, '2017-01-25', '2016-04-11', 'Ruth Carpenter', '4 Glacier Hill Road', null, 'Ngrejo', null, null, 'Indonesia', 4.9, 'Cash', '2016-08-13', 'On Hold') +,(4074, 219, 27, '2017-01-06', '2017-01-03', 'Irene Kelly', '0 Comanche Junction', null, 'Chao', null, null, 'Peru', 5.32, 'Check', '2016-11-20', 'On Hold') +,(4075, 214, 44, '2016-06-24', '2016-12-20', 'Douglas Sims', '81709 Helena Park', null, 'Dongmaku', null, null, 'China', 3.35, 'Card', '2017-02-27', 'Complete') +,(4076, 216, 27, '2016-09-23', '2016-10-05', 'Kenneth Rose', '5316 Dottie Way', null, 'Olszówka', null, '62-641', 'Poland', 2.63, 'Cash', '2016-05-27', 'Shipped') +,(4077, 211, 84, '2016-11-24', '2016-08-04', 'Jimmy Morgan', '42187 Shoshone Center', null, 'Saltsjöbaden', 'Stockholm', '133 41', 'Sweden', 1.11, 'Cash', '2016-09-09', 'On Hold') +,(4078, 202, 57, '2016-05-28', '2016-06-02', 'Annie Vasquez', '5 Lien Junction', null, 'Al Qaţn', null, null, 'South Africa', 2.73, 'Check', '2016-11-14', 'On Hold') +,(4079, 202, 64, '2016-07-05', '2016-05-20', 'Henry Mccoy', '58 Nelson Circle', null, 'Tsaghkahovit', null, null, 'India', 3.29, 'Card', '2016-08-18', 'Shipped') +,(4080, 216, 44, '2017-02-20', '2016-10-08', 'Norma Graham', '27 Heffernan Pass', null, 'Cairima', null, null, 'China', 7.02, 'Check', '2017-03-06', 'Complete') +,(4081, 218, 60, '2017-03-16', '2016-08-06', 'Albert Wright', '572 Vahlen Place', null, 'Drahovo', null, null, 'Ukraine', 4.92, 'Check', '2017-01-29', 'New') +,(4082, 219, 15, '2016-12-26', '2017-02-17', 'Jane Wells', '21 Merchant Way', null, 'Acacías', null, '507009', 'Argentina', 6.53, 'Card', '2016-06-04', 'Complete') +,(4083, 212, 61, '2016-06-24', '2016-03-23', 'Jesse Mitchell', '4060 Carioca Drive', null, 'Ntoroko', null, null, 'South Africa', 9.41, 'Cash', '2016-10-19', 'On Hold') +,(4084, 216, 3 , '2016-08-20', '2017-02-15', 'Carlos Brooks', '868 Pankratz Trail', null, 'Bat Khela', null, '18351', 'Iran', 1.0, 'Check', '2016-12-22', 'On Hold') +,(4085, 209, 25, '2016-12-03', '2016-06-01', 'Christopher Williamson', '8874 Starling Plaza', null, 'Tarbes', 'Midi-Pyrénées', '65951 CEDEX 9', 'France', 4.15, 'Card', '2017-02-04', 'New') +,(4086, 205, 2 , '2016-06-19', '2016-08-26', 'Joseph Wells', '7223 Carpenter Road', null, 'Chitral', null, '17200', 'Iran', 5.31, 'Card', '2016-07-22', 'Shipped') +,(4087, 216, 96, '2016-06-04', '2016-12-31', 'Teresa Thomas', '908 Ramsey Junction', null, 'Dzerzhinskiy', null, '140083', 'Russia', 4.29, 'Cash', '2017-03-03', 'Shipped') +,(4088, 203, 35, '2016-09-21', '2017-01-08', 'Scott Gomez', '70537 Tennessee Crossing', null, 'Bồng Sơn', null, null, 'Vietnam', 6.93, 'Cash', '2017-01-01', 'New') +,(4089, 210, 18, '2017-02-17', '2016-10-28', 'Nicole Miller', '0 Jackson Place', null, 'Šilheřovice', null, '747 15', 'Czech Republic', 5.64, 'Card', '2016-11-17', 'On Hold') +,(4090, 201, 8 , '2016-11-12', '2016-06-02', 'Donald Nguyen', '7320 Bunting Pass', null, 'Namioka', null, '953-0062', 'Japan', 7.07, 'Cash', '2016-09-29', 'Complete') +,(4091, 212, 67, '2016-04-08', '2016-11-21', 'Shawn Myers', '1844 Esch Plaza', null, 'Gračec', null, '10370', 'Canada', 4.84, 'Card', '2016-03-17', 'New') +,(4092, 220, 16, '2017-01-12', '2016-08-04', 'Daniel Armstrong', '2 Donald Alley', null, 'La Colorada', null, null, 'Denmark', 2.98, 'Check', '2016-12-08', 'Shipped') +,(4093, 203, 60, '2016-04-17', '2016-05-10', 'Henry Gonzales', '23848 6th Center', null, 'Guayatá', null, '153047', 'Argentina', 1.54, 'Check', '2016-04-18', 'New') +,(4094, 209, 37, '2016-08-07', '2016-04-26', 'Stephanie Snyder', '1152 Morning Park', null, 'Zhitan', null, null, 'China', 9.76, 'Card', '2016-05-23', 'New') +,(4095, 205, 46, '2016-09-01', '2017-02-25', 'Joan Butler', '98050 Mitchell Point', null, 'Bun Barat', null, null, 'Indonesia', 9.57, 'Card', '2017-01-25', 'Shipped') +,(4096, 211, 92, '2017-01-02', '2016-12-06', 'Gloria Murray', '8 Vidon Terrace', null, 'Rumenka', null, null, 'India', 5.33, 'Card', '2016-12-28', 'Shipped') +,(4097, 210, 66, '2016-07-04', '2016-05-30', 'Dorothy Simpson', '0 Pearson Point', null, 'Yevpatoriya', null, null, 'Ukraine', 3.52, 'Check', '2016-04-28', 'Complete') +,(4098, 219, 59, '2016-09-27', '2016-12-17', 'Katherine Brooks', '921 Anhalt Place', null, 'Rietavas', null, '90018', 'Denmark', 5.29, 'Check', '2016-12-19', 'Complete') +,(4099, 207, 65, '2016-07-06', '2016-10-11', 'Linda Reid', '89712 Dryden Point', null, 'Bronnitsy', null, '142451', 'Russia', 5.68, 'Card', '2016-07-08', 'New') +,(4100, 212, 61, '2016-04-14', '2016-05-02', 'Richard Carpenter', '17032 Melrose Crossing', null, 'White River', null, '1256', 'South Africa', 7.22, 'Card', '2016-08-03', 'Shipped') +,(4101, 206, 23, '2016-03-28', '2016-12-01', 'Clarence Coleman', '9167 Valley Edge Point', null, 'Guocun', null, null, 'China', 5.86, 'Check', '2016-08-19', 'Shipped') +,(4102, 202, 16, '2016-07-26', '2017-01-18', 'Kevin Dunn', '178 Park Meadow Avenue', null, 'Mlonggo', null, null, 'Indonesia', 4.15, 'Check', '2016-08-03', 'Complete') +,(4103, 211, 65, '2017-01-17', '2016-11-09', 'Keith Lopez', '689 Anthes Pass', null, 'Cibanten', null, null, 'Indonesia', 8.25, 'Check', '2016-10-15', 'Shipped') +,(4104, 218, 86, '2017-03-12', '2016-05-25', 'Chris Wright', '57974 Riverside Junction', null, 'Ban Mai', null, '80000', 'Thailand', 4.85, 'Cash', '2016-05-08', 'New') +,(4105, 215, 57, '2016-07-03', '2016-05-03', 'Michael Snyder', '93 Ohio Hill', null, 'Bryan', 'Texas', '77806', 'United States', 3.54, 'Card', '2016-08-10', 'Shipped') +,(4106, 210, 2 , '2017-03-07', '2016-09-18', 'David Day', '5024 Summerview Circle', null, 'Itapira', null, '13970-000', 'Brazil', 3.6, 'Cash', '2017-01-20', 'On Hold') +,(4107, 218, 4 , '2016-10-10', '2016-09-02', 'Lisa Kim', '4892 Huxley Center', null, 'Tanjungagung', null, null, 'Indonesia', 6.23, 'Cash', '2016-06-11', 'On Hold') +,(4108, 214, 26, '2016-06-02', '2016-10-05', 'Teresa Ellis', '1569 Mariners Cove Terrace', null, 'Maszkienice', null, '32-854', 'Poland', 7.65, 'Check', '2016-04-14', 'On Hold') +,(4109, 201, 51, '2016-10-07', '2017-02-02', 'Jimmy Lawson', '2165 Bluestem Center', null, 'Kampungbaru', null, null, 'Indonesia', 1.73, 'Check', '2016-09-30', 'Shipped') +,(4110, 215, 4 , '2016-08-21', '2017-02-05', 'Jerry Murray', '40070 Anderson Court', null, 'Vicente Guerrero', 'Veracruz Llave', '92440', 'Mexico', 1.57, 'Card', '2016-06-26', 'New') +,(4111, 210, 56, '2016-07-06', '2016-09-19', 'Joan Adams', '5322 Goodland Avenue', null, 'Paris 17', 'Île-de-France', '75853 CEDEX 17', 'France', 7.52, 'Cash', '2016-05-07', 'New') +,(4112, 214, 77, '2016-09-04', '2016-10-19', 'Chris Young', '7 Clove Center', null, 'Gongjiahe', null, null, 'China', 3.31, 'Card', '2016-11-06', 'New') +,(4113, 217, 62, '2016-07-18', '2016-09-30', 'Norma Oliver', '6002 Rieder Road', null, 'Lingbei', null, null, 'China', 8.85, 'Check', '2016-09-25', 'Complete') +,(4114, 213, 72, '2016-08-01', '2016-09-12', 'Douglas Day', '88 Helena Drive', null, 'Alcoutim', 'Faro', '8970-055', 'Portugal', 5.52, 'Card', '2016-12-19', 'New') +,(4115, 220, 6 , '2016-11-13', '2017-02-22', 'Janet James', '820 Westend Place', null, 'Springfield', 'Massachusetts', '01129', 'United States', 4.72, 'Cash', '2016-03-21', 'On Hold') +,(4116, 201, 72, '2016-09-01', '2016-09-07', 'Martha Lee', '2 Donald Hill', null, 'Majiang', null, null, 'China', 4.39, 'Cash', '2016-12-10', 'Shipped') +,(4117, 202, 40, '2017-02-04', '2016-12-09', 'Benjamin Cruz', '02989 Morningstar Avenue', null, 'Gīvī', null, null, 'Iran', 1.77, 'Check', '2017-01-29', 'Complete') +,(4118, 213, 48, '2016-12-24', '2017-01-06', 'Diane Porter', '7 Kensington Center', null, 'Pingyi', null, null, 'China', 4.69, 'Check', '2016-05-31', 'On Hold') +,(4119, 205, 69, '2016-06-30', '2016-05-01', 'Brandon Myers', '80411 Victoria Center', null, 'Punsu', null, null, 'Indonesia', 7.8, 'Cash', '2016-12-28', 'New') +,(4120, 220, 63, '2016-11-11', '2016-10-30', 'Beverly Garza', '2750 Sullivan Place', null, 'San Jose', null, '8427', 'Philippines', 8.15, 'Check', '2016-09-23', 'Shipped') +,(4121, 220, 32, '2016-05-05', '2016-09-05', 'Cynthia Simpson', '0731 Clarendon Point', null, 'Pomichna', null, null, 'Ukraine', 5.56, 'Card', '2017-02-23', 'On Hold') +,(4122, 201, 38, '2016-04-24', '2016-07-30', 'Janet West', '4800 Dottie Parkway', null, 'Tân Kỳ', null, null, 'Vietnam', 2.63, 'Cash', '2016-06-17', 'On Hold') +,(4123, 214, 24, '2016-04-04', '2016-06-11', 'Kevin Stone', '85 Duke Avenue', null, 'Shemonaīkha', null, null, 'Denmark', 9.99, 'Card', '2016-09-24', 'On Hold') +,(4124, 210, 9 , '2016-09-01', '2016-06-18', 'Amy Austin', '80663 Almo Park', null, 'Zaječov', null, '267 63', 'Czech Republic', 3.58, 'Card', '2016-08-29', 'Complete') +,(4125, 206, 78, '2017-02-09', '2016-07-07', 'Gregory Greene', '6 Commercial Junction', null, 'Hudong', null, null, 'China', 7.34, 'Cash', '2016-12-26', 'New') +,(4126, 215, 48, '2016-07-30', '2016-12-25', 'Laura Woods', '115 Ramsey Plaza', null, 'Allentown', 'Pennsylvania', '18105', 'United States', 4.92, 'Check', '2016-09-28', 'On Hold') +,(4127, 220, 19, '2016-03-29', '2016-05-27', 'Stephanie Reed', '452 Grayhawk Way', null, 'Sicheng', null, null, 'China', 1.1, 'Card', '2017-03-14', 'Shipped') +,(4128, 208, 64, '2016-06-03', '2016-08-13', 'Craig Gonzalez', '6028 West Street', null, 'Kliteh', null, null, 'Indonesia', 1.73, 'Cash', '2016-06-23', 'Complete') +,(4129, 201, 28, '2016-09-05', '2016-04-03', 'Raymond Gomez', '4 Stone Corner Place', null, 'Chechenglu', null, null, 'China', 4.32, 'Card', '2016-06-29', 'Complete') +,(4130, 215, 83, '2016-11-14', '2016-09-13', 'Kenneth Taylor', '7 Nevada Way', null, 'Alīpur', null, '34451', 'Iran', 5.07, 'Card', '2016-11-28', 'Complete') +,(4131, 203, 76, '2017-02-01', '2017-01-04', 'Jose Peters', '2493 Saint Paul Crossing', null, 'Bofuer', null, null, 'Indonesia', 9.85, 'Card', '2016-11-18', 'New') +,(4132, 207, 67, '2016-09-02', '2017-03-10', 'Martin West', '7251 Prairieview Place', null, 'Espinillo', null, '3460', 'Argentina', 7.9, 'Card', '2017-02-05', 'New') +,(4133, 208, 78, '2016-08-27', '2016-12-26', 'Louise Dunn', '4076 East Trail', null, 'Caramanta', null, '056047', 'Argentina', 1.28, 'Cash', '2016-12-22', 'Shipped') +,(4134, 209, 93, '2016-06-27', '2016-04-10', 'Gregory Stanley', '67 Namekagon Crossing', null, 'Pasarkayu', null, null, 'Indonesia', 2.83, 'Check', '2016-09-17', 'Complete') +,(4135, 206, 60, '2016-03-23', '2016-06-19', 'Ronald Palmer', '21 Old Shore Place', null, 'Tujing', null, null, 'China', 9.01, 'Check', '2016-12-22', 'New') +,(4136, 209, 10, '2016-11-07', '2016-11-21', 'Harry Robinson', '740 Toban Court', null, 'Liujiage', null, null, 'China', 7.13, 'Card', '2016-09-20', 'New') +,(4137, 214, 83, '2016-05-20', '2016-04-08', 'Joan Torres', '5167 Laurel Drive', null, 'Nirji', null, null, 'China', 9.81, 'Card', '2016-09-13', 'Complete') +,(4138, 207, 47, '2016-07-17', '2016-10-03', 'Carlos Jones', '4 Fuller Lane', null, 'Detroit', 'Michigan', '48258', 'United States', 8.02, 'Card', '2016-11-16', 'On Hold') +,(4139, 214, 92, '2016-07-17', '2017-01-23', 'Terry Freeman', '738 Vernon Road', null, 'Veverská Bítýška', null, '664 71', 'Czech Republic', 1.93, 'Check', '2016-04-04', 'Complete') +,(4140, 204, 92, '2016-06-09', '2016-05-06', 'Rose Hunt', '3242 Bunting Trail', null, 'Schaumburg', 'Illinois', '60193', 'United States', 7.65, 'Check', '2016-07-03', 'On Hold') +,(4141, 214, 12, '2016-11-19', '2017-03-16', 'Harry Reid', '395 Hauk Road', null, 'Rudky', null, null, 'Ukraine', 5.23, 'Card', '2017-01-18', 'On Hold') +,(4142, 212, 88, '2016-12-25', '2016-12-14', 'Fred Olson', '9311 Old Gate Park', null, 'Hejiabao', null, null, 'China', 4.02, 'Check', '2016-05-16', 'New') +,(4143, 217, 79, '2016-06-14', '2016-08-25', 'Paul Arnold', '08347 Comanche Pass', null, 'Bukovec', null, '739 84', 'Czech Republic', 6.02, 'Card', '2016-05-08', 'New') +,(4144, 216, 56, '2016-06-03', '2016-07-22', 'Carolyn Woods', '55 Stoughton Pass', null, 'Shengmi', null, null, 'China', 7.32, 'Card', '2016-07-27', 'New') +,(4145, 218, 84, '2016-07-02', '2016-11-05', 'Craig Schmidt', '2 Stephen Plaza', null, 'Arhust', null, null, 'Japan', 3.31, 'Check', '2016-06-17', 'New') +,(4146, 219, 13, '2016-09-02', '2017-01-29', 'Antonio Jordan', '452 Clemons Court', null, 'København', 'Region Hovedstaden', '1787', 'Denmark', 4.84, 'Card', '2016-11-10', 'Complete') +,(4147, 212, 51, '2016-10-19', '2017-01-20', 'Carol Evans', '1649 Crescent Oaks Road', null, 'Roubaix', 'Nord-Pas-de-Calais', '59100', 'France', 7.71, 'Card', '2017-03-08', 'On Hold') +,(4148, 217, 26, '2016-04-16', '2016-11-28', 'Steven Torres', '73679 Morning Drive', null, 'Ayotupas', null, null, 'Japan', 7.0, 'Card', '2016-06-12', 'On Hold') +,(4149, 215, 1 , '2017-02-06', '2016-10-27', 'Louis Watson', '03 Golf View Way', null, 'Madaoua', null, null, 'United Kingdom', 4.45, 'Check', '2016-07-22', 'Complete') +,(4150, 210, 100,'2017-01-14', '2016-11-12', 'Robin Reynolds', '5 Hagan Hill', null, 'Huacaschuque', null, null, 'Peru', 7.37, 'Check', '2017-02-09', 'New') +,(4151, 217, 24, '2016-09-06', '2016-10-11', 'Julia Gilbert', '3 Manitowish Avenue', null, 'Passos', 'Viana do Castelo', '4990-770', 'Portugal', 1.76, 'Card', '2016-07-16', 'New') +,(4152, 210, 90, '2016-05-26', '2016-07-14', 'Chris Chavez', '0 Birchwood Plaza', null, 'Odivelas', 'Lisboa', '2675-080', 'Portugal', 8.35, 'Cash', '2017-02-05', 'On Hold') +,(4153, 220, 79, '2016-10-27', '2016-08-14', 'Adam Morrison', '04510 West Circle', null, 'Weda', null, null, 'Japan', 8.84, 'Check', '2016-10-05', 'On Hold') +,(4154, 210, 57, '2017-02-21', '2016-09-28', 'Doris Snyder', '37027 Hintze Parkway', null, 'Vakhrushi', null, '613110', 'Russia', 2.75, 'Cash', '2016-12-02', 'Complete') +,(4155, 202, 24, '2017-02-03', '2016-08-03', 'Lisa Fisher', '919 Warner Circle', null, 'Kanbe', null, null, 'India', 2.48, 'Check', '2016-12-23', 'New') +,(4156, 213, 89, '2017-01-26', '2016-06-25', 'Gloria Murphy', '6750 Hansons Center', null, 'Saint Petersburg', null, '190990', 'Russia', 2.88, 'Cash', '2017-01-31', 'On Hold') +,(4157, 219, 83, '2016-08-03', '2016-06-15', 'Sara Mcdonald', '88365 Namekagon Park', null, 'Maofan', null, null, 'China', 4.69, 'Cash', '2016-09-22', 'New') +,(4158, 202, 79, '2016-08-13', '2016-10-08', 'John Barnes', '41 Springs Plaza', null, 'Carangola', null, '36800-000', 'Brazil', 4.84, 'Check', '2016-11-25', 'New') +,(4159, 215, 84, '2016-11-30', '2017-02-27', 'Bobby Matthews', '39153 Kipling Trail', null, 'Now Zād', null, null, 'Germany', 7.56, 'Cash', '2016-09-25', 'Shipped') +,(4160, 216, 40, '2016-07-27', '2016-12-05', 'Robin Greene', '899 Waubesa Alley', null, 'Vellinge', 'Skåne', '235 93', 'Sweden', 4.17, 'Card', '2016-12-22', 'New') +,(4161, 211, 91, '2017-03-12', '2016-09-11', 'Joseph Long', '3 Nobel Terrace', null, 'Bukabu', null, null, 'Japan', 2.26, 'Card', '2016-10-26', 'On Hold') +,(4162, 204, 94, '2016-10-08', '2016-09-26', 'Lisa Rodriguez', '880 Arizona Terrace', null, 'Elena', null, '5815', 'Argentina', 3.13, 'Cash', '2016-06-15', 'Shipped') +,(4163, 208, 49, '2017-02-23', '2016-06-05', 'Douglas Parker', '79 Mariners Cove Plaza', null, 'Şafāshahr', null, null, 'Iran', 1.83, 'Cash', '2016-10-26', 'On Hold') +,(4164, 201, 23, '2016-10-31', '2017-01-07', 'Laura Stewart', '97911 Meadow Ridge Road', null, 'Hexi', null, null, 'China', 1.24, 'Check', '2017-03-08', 'Shipped') +,(4165, 202, 27, '2017-01-07', '2016-10-05', 'Matthew Jordan', '29 Lakewood Trail', null, 'Kalkal Barat', null, null, 'Japan', 9.19, 'Card', '2016-09-03', 'Shipped') +,(4166, 218, 61, '2016-03-31', '2017-03-03', 'Denise Mason', '79 Carberry Alley', null, 'Vạn Giã', null, null, 'Vietnam', 7.78, 'Card', '2016-03-23', 'New') +,(4167, 220, 56, '2016-11-12', '2016-06-18', 'Phillip Castillo', '9910 Reindahl Parkway', null, 'Shangyanzhuang', null, null, 'China', 2.48, 'Card', '2016-07-14', 'Complete') +,(4168, 201, 41, '2016-07-10', '2016-07-29', 'Dorothy Nelson', '8 Hermina Terrace', null, 'Petrolina', null, '56300-000', 'Brazil', 1.52, 'Check', '2016-11-11', 'Shipped') +,(4169, 218, 100,'2016-12-18', '2016-12-02', 'Lawrence Willis', '21 Northland Trail', null, 'Bukor', null, null, 'India', 2.28, 'Card', '2017-01-06', 'New') +,(4170, 218, 6 , '2016-10-31', '2016-10-20', 'Jonathan Banks', '5748 Kings Hill', null, 'Tianning', null, null, 'China', 5.71, 'Check', '2016-06-02', 'Shipped') +,(4171, 211, 93, '2016-11-16', '2017-01-20', 'Gary Green', '001 Straubel Point', null, 'Huangshapu', null, null, 'China', 3.6, 'Cash', '2016-12-12', 'Complete') +,(4172, 203, 46, '2016-10-16', '2016-09-08', 'Nancy Bryant', '367 Gateway Park', null, 'Zhutang', null, null, 'China', 2.19, 'Cash', '2017-02-15', 'Shipped') +,(4173, 208, 72, '2016-08-27', '2016-04-09', 'Jeremy Rose', '8 Service Lane', null, 'Jinshandian', null, null, 'China', 8.09, 'Check', '2017-01-18', 'On Hold') +,(4174, 212, 88, '2016-06-25', '2016-08-21', 'Rebecca Gibson', '74 American Crossing', null, 'Canmang', null, null, 'China', 1.31, 'Card', '2017-02-08', 'New') +,(4175, 208, 75, '2017-02-28', '2017-01-03', 'Marilyn Hanson', '676 Service Crossing', null, 'Racławice', null, '32-222', 'Poland', 2.88, 'Check', '2017-02-18', 'New') +,(4176, 204, 1 , '2016-09-23', '2016-08-16', 'Denise Hanson', '8 Lakewood Crossing', null, 'Huaizhong', null, null, 'China', 9.48, 'Card', '2016-12-30', 'On Hold') +,(4177, 204, 20, '2017-03-02', '2016-12-27', 'John Shaw', '4752 Meadow Ridge Lane', null, 'Sosnovo-Ozerskoye', null, '612955', 'Russia', 7.17, 'Check', '2016-06-21', 'On Hold') +,(4178, 202, 30, '2016-03-20', '2016-10-17', 'Russell Fernandez', '5941 Esch Lane', null, 'Shuiyang', null, null, 'China', 1.04, 'Check', '2017-01-05', 'On Hold') +,(4179, 202, 27, '2017-01-14', '2016-07-31', 'Annie Ruiz', '67778 Butterfield Trail', null, 'Qalyūb', null, null, 'Germany', 5.51, 'Card', '2016-05-12', 'Shipped') +,(4180, 208, 1 , '2017-03-16', '2016-04-04', 'Ashley Gonzales', '88504 Johnson Street', null, 'Salingogan', null, '6417', 'Philippines', 7.56, 'Check', '2016-07-26', 'Shipped') +,(4181, 203, 70, '2016-03-25', '2016-11-06', 'Richard George', '54 3rd Circle', null, 'Haibeitou', null, null, 'China', 1.99, 'Cash', '2016-09-05', 'New') +,(4182, 219, 69, '2016-04-11', '2017-02-03', 'David Harris', '2 Menomonie Pass', null, 'Oslo', 'Oslo', '0188', 'Greece', 1.93, 'Check', '2016-11-30', 'Shipped') +,(4183, 211, 25, '2016-12-08', '2016-11-16', 'Catherine Reynolds', '302 Autumn Leaf Parkway', null, 'Lameiras', 'Lisboa', '2715-145', 'Portugal', 6.68, 'Cash', '2016-04-02', 'Shipped') +,(4184, 217, 73, '2016-06-19', '2016-11-29', 'Donald Moreno', '690 Laurel Park', null, 'Sinisian', null, '4212', 'Philippines', 3.1, 'Check', '2017-01-06', 'New') +,(4185, 210, 34, '2016-07-03', '2016-05-23', 'Ryan Thomas', '45044 Harper Place', null, 'Madīnat Lab‘ūs', null, null, 'South Africa', 6.31, 'Cash', '2016-06-27', 'Complete') +,(4186, 206, 91, '2016-05-26', '2016-09-09', 'Ruby Lynch', '8350 Karstens Parkway', null, 'Puyo', null, null, 'Argentina', 6.07, 'Check', '2016-05-10', 'Shipped') +,(4187, 208, 64, '2016-05-31', '2016-10-16', 'Linda Robinson', '6069 Chive Plaza', null, 'Joutseno', null, '54101', 'Finland', 3.11, 'Card', '2016-05-15', 'Shipped') +,(4188, 216, 41, '2017-02-07', '2016-03-28', 'Bonnie Morris', '2611 Comanche Junction', null, 'Lacombe', 'Alberta', 'T4L', 'Canada', 2.53, 'Check', '2016-08-31', 'New') +,(4189, 206, 51, '2016-12-20', '2016-12-08', 'Dennis Gardner', '2348 Blue Bill Park Crossing', null, 'Ngkiong', null, null, 'Japan', 5.1, 'Check', '2016-11-28', 'New') +,(4190, 220, 54, '2016-08-06', '2016-08-27', 'Carolyn Matthews', '817 Ohio Point', null, 'Orekhovo-Zuyevo', null, '142609', 'Russia', 7.52, 'Card', '2016-03-22', 'On Hold') +,(4191, 207, 96, '2016-07-03', '2016-06-18', 'Jesse Parker', '3 Eastwood Terrace', null, 'Berezovo', null, null, 'Ukraine', 6.64, 'Check', '2016-05-07', 'New') +,(4192, 216, 18, '2016-06-05', '2017-01-11', 'Ann Gilbert', '6 Oak Valley Lane', null, 'Caijiang', null, null, 'China', 3.72, 'Cash', '2016-11-17', 'On Hold') +,(4193, 208, 22, '2016-06-26', '2017-02-22', 'Martha Hawkins', '57581 Union Road', null, 'Ilinden', null, '1041', 'Denmark', 5.64, 'Cash', '2016-05-23', 'On Hold') +,(4194, 207, 42, '2017-02-03', '2017-01-08', 'Jeffrey Hart', '83 Green Ridge Point', null, 'Wangcheng', null, null, 'China', 1.15, 'Check', '2016-12-07', 'Shipped') +,(4195, 217, 28, '2016-10-18', '2016-05-01', 'Joseph Riley', '54373 Coleman Street', null, 'Karangbungur', null, null, 'Japan', 5.9, 'Cash', '2016-04-23', 'Complete') +,(4196, 207, 78, '2016-07-09', '2016-07-15', 'Brian Dean', '9 Stone Corner Hill', null, 'Dambulla', null, '21100', 'United Kingdom', 5.15, 'Check', '2016-07-09', 'On Hold') +,(4197, 204, 38, '2016-07-19', '2016-04-13', 'Christine Campbell', '47302 Porter Junction', null, 'Dananshan', null, null, 'China', 6.74, 'Card', '2016-11-07', 'Complete') +,(4198, 201, 7 , '2017-03-02', '2016-08-16', 'Ruth Mcdonald', '401 Erie Avenue', null, 'Borkowice', null, '26-422', 'Poland', 3.24, 'Cash', '2016-04-17', 'New') +,(4199, 216, 87, '2016-12-14', '2017-03-05', 'Jean Armstrong', '450 Sullivan Avenue', null, 'Carpenter', null, '2009', 'Philippines', 4.25, 'Cash', '2016-07-11', 'Complete') +,(4200, 218, 8 , '2017-02-01', '2016-04-17', 'Gary Price', '775 Butterfield Lane', null, 'Vaasa', null, '66999', 'Finland', 5.36, 'Card', '2016-07-09', 'Shipped') +,(4201, 217, 77, '2016-11-10', '2016-11-13', 'Carolyn Scott', '5878 Badeau Lane', null, 'Kazanskaya', null, '396614', 'Russia', 7.94, 'Card', '2016-12-09', 'New') +,(4202, 204, 10, '2016-08-12', '2016-03-21', 'Earl Anderson', '9 Roth Court', null, 'Governor’s Harbour', null, null, 'Canada', 2.47, 'Card', '2016-08-06', 'Complete') +,(4203, 204, 54, '2016-05-26', '2016-04-18', 'Elizabeth Kelley', '70 Burrows Street', null, 'Fucheng', null, null, 'China', 9.94, 'Cash', '2016-08-24', 'Shipped') +,(4204, 208, 58, '2017-03-09', '2016-04-17', 'Julia Wilson', '46476 Burning Wood Crossing', null, 'Koper', null, '6600', 'India', 3.82, 'Card', '2016-08-26', 'New') +,(4205, 208, 85, '2016-05-04', '2016-03-18', 'Jeffrey Oliver', '39 Tennessee Avenue', null, 'Jejkowice', null, '44-290', 'Poland', 7.22, 'Card', '2016-09-23', 'Shipped') +,(4206, 220, 8 , '2016-06-16', '2017-01-03', 'Angela Walker', '579 Miller Street', null, 'Hà Tĩnh', null, null, 'Vietnam', 1.04, 'Check', '2016-05-18', 'Complete') +,(4207, 212, 55, '2016-07-04', '2016-11-09', 'Karen Hansen', '953 Manufacturers Pass', null, 'Lysekil', 'Västra Götaland', '453 35', 'Sweden', 8.81, 'Check', '2016-03-18', 'New') +,(4208, 217, 96, '2016-10-26', '2016-07-11', 'Patricia West', '1 Browning Alley', null, 'Huayang', null, null, 'China', 7.54, 'Card', '2016-09-15', 'New') +,(4209, 203, 71, '2016-08-04', '2017-01-01', 'Phillip Gardner', '30438 Mariners Cove Way', null, 'Phu Khiao', null, '36110', 'Thailand', 3.03, 'Check', '2016-03-31', 'Shipped') +,(4210, 207, 30, '2017-03-08', '2016-07-21', 'Fred Howard', '45981 Hovde Trail', null, 'Suncheon', null, null, 'Finland', 1.13, 'Check', '2016-07-14', 'On Hold') +,(4211, 217, 57, '2016-05-28', '2017-03-11', 'George Wagner', '24863 Messerschmidt Road', null, 'Ningzhong', null, null, 'China', 6.5, 'Check', '2016-07-26', 'New') +,(4212, 213, 19, '2016-11-28', '2016-06-09', 'Clarence Russell', '85 Kropf Circle', null, 'Ouro Branco', null, '59347-000', 'Brazil', 6.88, 'Check', '2016-04-02', 'On Hold') +,(4213, 217, 51, '2016-06-25', '2016-05-25', 'Jane Johnston', '1708 Corscot Pass', null, 'Şafāshahr', null, null, 'Iran', 9.16, 'Cash', '2016-10-12', 'Complete') +,(4214, 203, 88, '2017-02-19', '2016-03-25', 'John Adams', '100 Hollow Ridge Way', null, 'Satita', null, null, 'India', 3.01, 'Cash', '2016-11-19', 'Shipped') +,(4215, 202, 12, '2017-01-26', '2016-10-07', 'Diana Graham', '12 Esch Park', null, 'Krasnokamensk', null, '662955', 'Russia', 9.29, 'Check', '2016-06-10', 'Shipped') +,(4216, 211, 66, '2016-07-19', '2016-11-30', 'John Henry', '448 Hanover Trail', null, 'Phitsanulok', null, '65000', 'Thailand', 7.23, 'Card', '2016-09-22', 'Shipped') +,(4217, 218, 98, '2016-11-20', '2016-11-12', 'Donna Bradley', '92136 Arkansas Avenue', null, 'Balong Wetan', null, null, 'Japan', 7.79, 'Card', '2016-12-18', 'New') +,(4218, 206, 5 , '2016-05-04', '2016-08-19', 'Kevin Harper', '2911 Laurel Point', null, 'Patapan', null, null, 'Japan', 1.52, 'Card', '2016-03-20', 'On Hold') +,(4219, 205, 76, '2016-11-15', '2016-12-12', 'Margaret Hanson', '9603 Northridge Junction', null, 'Mwembe', null, null, 'India', 4.76, 'Cash', '2017-03-14', 'Shipped') +,(4220, 206, 62, '2016-12-30', '2016-10-23', 'Henry Bradley', '84 Lake View Plaza', null, 'Zheleznovodsk', null, '357408', 'Russia', 8.08, 'Cash', '2017-02-23', 'Complete') +,(4221, 218, 91, '2016-08-07', '2016-08-31', 'Jane Fowler', '2484 Hoepker Hill', null, 'Huangcun', null, null, 'China', 9.34, 'Card', '2017-01-10', 'Complete') +,(4222, 207, 19, '2016-05-22', '2016-06-25', 'Kimberly Peterson', '5851 Carey Crossing', null, 'Pochuta', null, '04008', 'Japan', 9.16, 'Card', '2016-04-25', 'Shipped') +,(4223, 203, 69, '2017-02-13', '2016-09-18', 'Nicholas Simpson', '9 Hudson Way', null, 'Chashan', null, null, 'China', 5.37, 'Check', '2017-01-01', 'On Hold') +,(4224, 214, 71, '2017-02-28', '2016-06-18', 'Carol Rodriguez', '78 Grayhawk Place', null, 'Luntas', null, null, 'Indonesia', 1.76, 'Card', '2016-10-06', 'Shipped') +,(4225, 207, 34, '2017-03-06', '2016-07-20', 'Jessica Mason', '65 Merrick Lane', null, 'Křižanov', null, '789 01', 'Czech Republic', 9.75, 'Card', '2016-12-28', 'New') +,(4226, 209, 74, '2016-06-04', '2017-01-15', 'Jeffrey Sims', '05441 Wayridge Pass', null, 'Rennes', 'Bretagne', '35047 CEDEX 9', 'France', 9.09, 'Check', '2016-05-19', 'Shipped') +,(4227, 205, 74, '2016-09-09', '2017-01-06', 'Arthur Simmons', '733 Logan Circle', null, 'Dzhankoy', null, null, 'Ukraine', 2.51, 'Check', '2017-01-25', 'New') +,(4228, 207, 52, '2017-01-30', '2017-01-08', 'Kevin Williams', '3561 6th Trail', null, 'Narganá', null, null, 'Denmark', 7.32, 'Cash', '2016-06-24', 'On Hold') +,(4229, 209, 76, '2016-05-05', '2016-07-11', 'Joe Stewart', '0314 Ryan Parkway', null, 'San Jose', 'Oaxaca', '69570', 'Mexico', 9.28, 'Check', '2016-05-06', 'Shipped') +,(4230, 214, 2 , '2016-09-19', '2016-09-08', 'Walter Barnes', '80695 Stone Corner Road', null, 'Busdi', null, '6210', 'Philippines', 5.97, 'Check', '2016-07-19', 'Shipped') +,(4231, 211, 55, '2016-08-27', '2016-10-04', 'Sean Holmes', '91 Becker Drive', null, 'Gezan', null, null, 'China', 3.81, 'Check', '2016-06-14', 'Shipped') +,(4232, 209, 14, '2016-04-01', '2017-03-06', 'Sandra Perez', '45373 Buhler Park', null, 'Ust’-Kut', null, '162176', 'Russia', 4.25, 'Cash', '2017-01-22', 'Shipped') +,(4233, 205, 96, '2016-09-27', '2016-07-03', 'Sara Kelly', '73457 Buhler Court', null, 'Sima', null, null, 'Canada', 7.2, 'Card', '2016-12-14', 'Complete') +,(4234, 217, 74, '2016-11-22', '2017-01-18', 'Edward Reid', '02 Westport Trail', null, 'Tchaourou', null, null, 'India', 3.5, 'Cash', '2016-12-25', 'New') +,(4235, 206, 69, '2016-03-17', '2016-10-29', 'Betty Cook', '83578 Ohio Avenue', null, 'Stockholm', 'Stockholm', '101 22', 'Sweden', 6.17, 'Check', '2016-09-02', 'On Hold') +,(4236, 217, 97, '2017-02-06', '2016-07-01', 'Diana Ellis', '49 Jenna Circle', null, 'Yanshan', null, null, 'China', 6.06, 'Check', '2016-07-16', 'Complete') +,(4237, 216, 17, '2016-11-30', '2016-10-02', 'Donald Miller', '8581 Farragut Junction', null, 'Yosowilangun', null, null, 'Indonesia', 8.9, 'Check', '2016-11-01', 'Complete') +,(4238, 203, 21, '2017-02-09', '2016-12-14', 'Eric Coleman', '9242 Badeau Street', null, 'Caiyuan', null, null, 'China', 4.1, 'Check', '2016-06-07', 'Shipped') +,(4239, 213, 23, '2016-09-15', '2016-11-04', 'Heather Vasquez', '454 Gale Hill', null, 'Susoh', null, null, 'Indonesia', 1.59, 'Check', '2016-10-25', 'New') +,(4240, 208, 2 , '2016-05-28', '2016-05-21', 'Martin Sims', '30 Bunting Center', null, 'Efeng', null, null, 'China', 1.92, 'Cash', '2016-12-15', 'Complete') +,(4241, 202, 85, '2017-02-05', '2016-08-13', 'Catherine Washington', '637 Hermina Court', null, 'San Francisco', 'Jalisco', '46175', 'Mexico', 6.49, 'Card', '2016-12-20', 'On Hold') +,(4242, 204, 17, '2016-10-04', '2016-05-13', 'Gary Kennedy', '2 Grasskamp Point', null, 'Famaillá', null, '4132', 'Argentina', 9.78, 'Card', '2016-12-03', 'Complete') +,(4243, 205, 86, '2016-04-15', '2016-05-25', 'Pamela Parker', '43642 Utah Point', null, 'Santa Rosa', 'Nuevo Leon', '67803', 'Mexico', 1.78, 'Card', '2017-02-16', 'Shipped') +,(4244, 208, 3 , '2016-08-02', '2017-03-13', 'Michelle Russell', '947 Jenna Place', null, 'Kinshasa', null, null, 'Canada', 8.43, 'Cash', '2016-04-13', 'New') +,(4245, 210, 32, '2016-06-16', '2016-07-14', 'Lois Jenkins', '1 Pepper Wood Road', null, 'Kallinge', 'Blekinge', '372 53', 'Sweden', 4.77, 'Cash', '2016-03-17', 'On Hold') +,(4246, 203, 39, '2017-02-04', '2016-08-08', 'Kelly Ramirez', '20490 Eagle Crest Circle', null, 'Baraba', null, '623509', 'Russia', 8.65, 'Cash', '2016-10-04', 'Complete') +,(4247, 202, 24, '2016-05-05', '2016-11-26', 'Harold Gray', '9033 Elmside Plaza', null, 'N’dalatando', null, null, 'Netherlands', 2.78, 'Cash', '2016-07-24', 'New') +,(4248, 210, 16, '2017-01-27', '2017-03-14', 'Dennis Fisher', '4 Sage Road', null, 'Niederanven', null, 'L-6948', 'United Kingdom', 1.26, 'Check', '2016-05-12', 'On Hold') +,(4249, 203, 20, '2016-07-21', '2016-12-08', 'Antonio Wells', '99743 Algoma Hill', null, 'Mūdīyah', null, null, 'South Africa', 4.36, 'Card', '2016-05-28', 'Complete') +,(4250, 217, 88, '2016-05-31', '2016-10-17', 'William Gonzales', '3258 Holy Cross Way', null, 'Yangdun', null, null, 'China', 7.06, 'Check', '2016-04-13', 'New') +,(4251, 211, 1 , '2017-03-04', '2016-10-27', 'Ronald Ward', '5 Logan Terrace', null, 'Tanahmerah', null, null, 'Indonesia', 4.38, 'Card', '2016-09-22', 'On Hold') +,(4252, 217, 87, '2016-12-29', '2016-09-18', 'Gloria Boyd', '10 Grayhawk Hill', null, 'Boromlya', null, null, 'Ukraine', 4.84, 'Cash', '2016-08-01', 'On Hold') +,(4253, 212, 99, '2017-02-02', '2016-04-28', 'Raymond Scott', '3 Donald Trail', null, 'Lakshmīpur', null, '1553', 'Canada', 8.37, 'Cash', '2016-12-06', 'On Hold') +,(4254, 201, 7 , '2016-11-28', '2016-04-11', 'Arthur Hamilton', '95 Doe Crossing Avenue', null, 'Purwosari', null, null, 'Indonesia', 6.84, 'Card', '2016-06-14', 'Shipped') +,(4255, 220, 100,'2016-09-30', '2016-10-08', 'Jean Wagner', '5690 Meadow Valley Alley', null, 'Svedala', 'Skåne', '233 94', 'Sweden', 8.57, 'Check', '2017-01-06', 'Shipped') +,(4256, 218, 78, '2016-04-28', '2016-04-03', 'Kimberly Rose', '6067 Twin Pines Hill', null, 'Capinzal', null, '89665-000', 'Brazil', 6.07, 'Check', '2016-05-18', 'New') +,(4257, 213, 44, '2016-11-04', '2016-03-28', 'Doris Foster', '170 Chive Court', null, 'Lang', null, null, 'China', 1.72, 'Card', '2016-10-20', 'Shipped') +,(4258, 208, 46, '2017-01-11', '2016-09-25', 'Teresa Reynolds', '3 Prairie Rose Alley', null, 'Tashang', null, null, 'China', 4.84, 'Card', '2016-10-16', 'On Hold') +,(4259, 215, 89, '2016-07-07', '2016-12-29', 'Christine Turner', '0746 Heffernan Center', null, 'Henggang', null, null, 'China', 6.81, 'Cash', '2016-08-21', 'New') +,(4260, 210, 23, '2016-10-26', '2017-02-10', 'Jimmy Jordan', '903 Anniversary Trail', null, 'Elaiochóri', null, null, 'Greece', 9.66, 'Cash', '2017-01-10', 'Complete') +,(4261, 207, 20, '2016-11-07', '2017-02-17', 'Andrew Baker', '3 Pennsylvania Park', null, 'Kansas City', 'Missouri', '64130', 'United States', 5.46, 'Cash', '2016-11-20', 'Complete') +,(4262, 203, 32, '2017-02-21', '2016-11-17', 'Diana Dixon', '18520 Maryland Drive', null, 'Santa Catalina', null, '2701', 'Philippines', 4.66, 'Card', '2017-01-09', 'On Hold') +,(4263, 210, 10, '2017-02-28', '2017-02-26', 'Karen Miller', '5608 Moose Court', null, 'Torres Vedras', 'Lisboa', '2560-234', 'Portugal', 5.71, 'Card', '2016-11-30', 'New') +,(4264, 214, 39, '2017-01-09', '2016-10-24', 'Angela Austin', '9659 Vera Point', null, 'Santiaoshi', null, null, 'China', 6.59, 'Check', '2016-05-07', 'Shipped') +,(4265, 203, 3 , '2016-11-11', '2016-11-22', 'Steve Snyder', '7626 Hoepker Junction', null, 'Wulan Hada', null, null, 'China', 5.67, 'Cash', '2017-01-01', 'New') +,(4266, 218, 94, '2016-04-06', '2016-10-02', 'Kevin Daniels', '24 Chinook Point', null, 'Bhairāhawā', null, null, 'United Kingdom', 8.21, 'Card', '2016-05-12', 'Shipped') +,(4267, 203, 58, '2016-11-14', '2016-03-28', 'Patricia Welch', '60375 Corry Street', null, 'Solidaridad', 'Veracruz Llave', '94330', 'Mexico', 2.77, 'Card', '2017-02-02', 'On Hold') +,(4268, 218, 2 , '2016-07-02', '2016-08-14', 'Wanda Reynolds', '965 Calypso Circle', null, 'Dera Bugti', null, '80100', 'Iran', 8.86, 'Check', '2017-01-30', 'On Hold') +,(4269, 216, 47, '2017-03-11', '2016-07-16', 'Harold Williamson', '14332 Texas Junction', null, 'Mzimba', null, null, 'India', 2.47, 'Cash', '2016-06-01', 'Shipped') +,(4270, 213, 62, '2016-11-09', '2017-02-07', 'Juan Fox', '17 Eagan Crossing', null, 'Xiayang', null, null, 'China', 7.63, 'Card', '2017-02-17', 'Shipped') +,(4271, 211, 70, '2016-04-16', '2016-04-26', 'Ryan Long', '0 Harper Circle', null, 'Blagoveshchenka', null, '658670', 'Russia', 3.2, 'Card', '2016-09-10', 'Complete') +,(4272, 206, 29, '2016-03-25', '2016-10-07', 'Frank Cole', '07 Westend Place', null, 'Laixi', null, null, 'China', 1.93, 'Cash', '2016-05-01', 'New') +,(4273, 209, 25, '2016-05-06', '2016-04-13', 'Tammy Wilson', '74278 Grim Pass', null, 'Åkersberga', 'Stockholm', '184 70', 'Sweden', 2.83, 'Card', '2016-10-29', 'Complete') +,(4274, 206, 82, '2017-02-07', '2017-03-06', 'Joan Gonzales', '40 Stephen Street', null, 'Tlogoagung', null, null, 'Indonesia', 3.44, 'Check', '2016-10-14', 'Complete') +,(4275, 203, 91, '2016-10-10', '2016-11-04', 'Jeffrey Hughes', '38 Toban Plaza', null, 'Privas', 'Rhône-Alpes', '07004 CEDEX', 'France', 8.33, 'Card', '2016-04-23', 'On Hold') +,(4276, 210, 89, '2016-05-14', '2016-09-03', 'Rachel Martin', '08 Lake View Hill', null, 'Sandgerði', null, '245', 'India', 2.07, 'Cash', '2016-06-07', 'Complete') +,(4277, 208, 97, '2016-04-06', '2016-07-02', 'Laura Harper', '1 Dexter Street', null, 'Xintaimen', null, null, 'China', 8.08, 'Check', '2016-05-11', 'Shipped') +,(4278, 215, 3 , '2017-03-04', '2017-03-08', 'Annie Rivera', '5975 Debra Park', null, 'Canchaque', null, null, 'Peru', 5.65, 'Check', '2016-04-09', 'Complete') +,(4279, 201, 6 , '2017-03-01', '2016-08-06', 'Pamela Graham', '2 Monument Avenue', null, 'Danxi', null, null, 'China', 2.05, 'Check', '2016-05-23', 'New') +,(4280, 202, 35, '2017-02-04', '2016-06-09', 'Joseph Jenkins', '00001 Fairfield Center', null, 'Mashtūl as Sūq', null, null, 'Germany', 5.32, 'Card', '2016-12-28', 'New') +,(4281, 203, 76, '2016-05-19', '2016-07-29', 'Eugene Garcia', '8308 Onsgard Lane', null, 'Limoncito', null, null, 'India', 4.07, 'Card', '2016-10-20', 'Shipped') +,(4282, 204, 27, '2016-07-20', '2016-09-26', 'Kevin Anderson', '8 Thierer Center', null, 'Saint-Étienne', 'Rhône-Alpes', '42963 CEDEX 9', 'France', 4.88, 'Card', '2016-07-21', 'Complete') +,(4283, 214, 50, '2016-11-27', '2016-06-14', 'Robin Parker', '51949 Forster Parkway', null, 'Laval', 'Pays de la Loire', '53009 CEDEX', 'France', 1.04, 'Check', '2016-04-20', 'Complete') +,(4284, 214, 74, '2016-11-29', '2016-12-08', 'Kelly Palmer', '2 Hauk Hill', null, 'Östersund', 'Jämtland', '831 17', 'Sweden', 4.26, 'Card', '2016-10-08', 'Complete') +,(4285, 214, 76, '2016-10-22', '2016-05-05', 'Diane Freeman', '5441 Petterle Way', null, 'El Tambo', null, null, 'Peru', 7.17, 'Check', '2016-09-27', 'New') +,(4286, 209, 96, '2016-11-08', '2016-08-26', 'Kathleen Adams', '423 Talisman Point', null, 'Kurume', null, '963-8846', 'Japan', 1.99, 'Cash', '2016-05-19', 'On Hold') +,(4287, 204, 76, '2016-10-18', '2017-01-15', 'Teresa Mendoza', '818 Atwood Lane', null, 'Mosteiro', 'Viana do Castelo', '4980-125', 'Portugal', 3.29, 'Cash', '2016-10-03', 'On Hold') +,(4288, 210, 45, '2016-10-15', '2016-12-14', 'Irene Anderson', '4 Rutledge Alley', null, 'Saparua', null, null, 'Indonesia', 4.35, 'Card', '2016-10-13', 'On Hold') +,(4289, 209, 61, '2017-02-12', '2016-07-15', 'Terry Bennett', '351 Johnson Circle', null, 'Quiling', null, '2902', 'Philippines', 6.77, 'Card', '2016-07-20', 'New') +,(4290, 203, 1 , '2017-03-02', '2016-08-25', 'Ronald Mccoy', '73609 Waywood Center', null, 'Zheleznodorozhnyy', null, '238411', 'Russia', 1.05, 'Cash', '2016-06-10', 'New') +,(4291, 211, 73, '2016-09-13', '2016-04-17', 'Andrew Matthews', '820 Lawn Crossing', null, 'Japeri', null, '26400-000', 'Brazil', 1.22, 'Cash', '2016-09-08', 'New') +,(4292, 215, 15, '2016-12-26', '2016-10-04', 'Melissa Chapman', '88384 Ohio Park', null, 'Dayr al Ghuşūn', null, null, 'India', 9.89, 'Check', '2016-08-14', 'Shipped') +,(4293, 210, 18, '2016-11-23', '2016-12-12', 'Russell Griffin', '6 Eliot Lane', null, 'Changshu City', null, null, 'China', 9.37, 'Check', '2016-05-10', 'On Hold') +,(4294, 206, 95, '2016-06-24', '2017-01-21', 'Jeffrey Gray', '04078 Hudson Drive', null, 'Luangwa', null, null, 'India', 2.58, 'Cash', '2016-06-15', 'Shipped') +,(4295, 215, 85, '2016-10-23', '2017-01-29', 'Lori Frazier', '724 Logan Drive', null, 'Gent', 'Vlaanderen', '9052', 'Denmark', 8.59, 'Cash', '2017-01-01', 'New') +,(4296, 217, 83, '2016-04-08', '2017-02-07', 'Joan Ortiz', '90 Merchant Avenue', null, 'Irasan', null, '3120', 'Philippines', 4.64, 'Card', '2016-09-01', 'Complete') +,(4297, 211, 29, '2016-07-13', '2017-02-06', 'John Stanley', '680 Artisan Pass', null, 'Borås', 'Västra Götaland', '504 75', 'Sweden', 1.77, 'Cash', '2016-07-12', 'On Hold') +,(4298, 208, 65, '2016-12-28', '2016-04-19', 'Dorothy Bell', '397 Kim Place', null, 'Zhongxin', null, null, 'China', 1.2, 'Check', '2017-01-28', 'On Hold') +,(4299, 201, 43, '2017-01-12', '2016-08-07', 'Doris Ramirez', '181 Prentice Terrace', null, 'Severnyy', null, '141707', 'Russia', 2.65, 'Card', '2016-08-13', 'Shipped') +,(4300, 207, 27, '2016-11-10', '2016-11-01', 'Elizabeth Harrison', '067 Talisman Trail', null, 'Guangang', null, null, 'China', 4.78, 'Check', '2016-04-30', 'On Hold') +,(4301, 206, 64, '2016-08-14', '2017-01-13', 'Judith Howard', '55095 Sloan Alley', null, 'Longhua', null, null, 'China', 1.93, 'Card', '2016-10-29', 'New') +,(4302, 213, 33, '2017-01-19', '2016-05-23', 'Julia Simpson', '87375 Londonderry Parkway', null, 'Fufang', null, null, 'China', 9.23, 'Card', '2016-11-15', 'Shipped') +,(4303, 220, 49, '2016-08-01', '2016-04-23', 'Elizabeth Bell', '60 Ridgeview Trail', null, 'Infantas', 'Braga', '4810-578', 'Portugal', 3.22, 'Check', '2017-02-01', 'Complete') +,(4304, 217, 56, '2016-09-07', '2016-08-13', 'Ernest Andrews', '231 Graceland Terrace', null, 'Pindamonhangaba', null, '12400-000', 'Brazil', 2.77, 'Card', '2016-04-04', 'On Hold') +,(4305, 219, 44, '2016-06-11', '2016-03-27', 'Jeffrey Lopez', '76434 Havey Court', null, 'Khvalovo', null, '187435', 'Russia', 8.84, 'Cash', '2016-04-14', 'Shipped') +,(4306, 212, 16, '2016-05-29', '2016-12-31', 'Ralph Weaver', '15 Armistice Alley', null, 'Odienné', null, null, 'Canada', 7.1, 'Card', '2017-01-09', 'Shipped') +,(4307, 210, 16, '2016-10-19', '2017-01-10', 'Mary Stevens', '1928 Aberg Park', null, 'Dzwola', null, '23-304', 'Poland', 4.04, 'Card', '2016-08-24', 'Complete') +,(4308, 220, 50, '2016-09-23', '2016-09-16', 'Douglas Welch', '9 Ryan Circle', null, 'Babakanloa', null, null, 'Indonesia', 1.11, 'Card', '2016-10-13', 'Shipped') +,(4309, 217, 99, '2016-10-17', '2017-01-01', 'Raymond Cruz', '0402 Burning Wood Alley', null, 'Bucay', null, '2805', 'Philippines', 9.27, 'Cash', '2016-06-02', 'Complete') +,(4310, 219, 65, '2016-04-14', '2016-05-14', 'Sara Frazier', '43 Truax Terrace', null, 'Halton', 'England', 'LS9', 'United Kingdom', 5.56, 'Check', '2016-12-04', 'New') +,(4311, 220, 17, '2017-02-03', '2016-07-09', 'Sarah Lane', '414 Gina Point', null, 'Fulong', null, null, 'China', 3.35, 'Cash', '2016-12-27', 'New') +,(4312, 205, 77, '2017-02-27', '2016-04-10', 'Michelle Bradley', '16664 Towne Point', null, 'Yangchun', null, null, 'China', 8.64, 'Cash', '2017-01-28', 'Complete') +,(4313, 210, 68, '2016-08-29', '2016-10-27', 'Marie Porter', '7802 Hovde Plaza', null, 'Redakodi', null, null, 'Indonesia', 1.97, 'Cash', '2016-11-08', 'Complete') +,(4314, 207, 41, '2016-08-08', '2016-08-31', 'Melissa Moore', '438 Mendota Way', null, 'Bensonville', null, null, 'United Kingdom', 7.97, 'Cash', '2017-01-17', 'New') +,(4315, 212, 96, '2016-08-08', '2016-07-27', 'Katherine Bell', '76 Manley Park', null, 'Xagmakajor', null, null, 'China', 7.49, 'Cash', '2016-03-29', 'New') +,(4316, 209, 67, '2016-09-26', '2017-02-03', 'Katherine Elliott', '86 Nelson Point', null, 'Boavista', 'Aveiro', '4520-104', 'Portugal', 1.92, 'Card', '2016-04-28', 'Complete') +,(4317, 219, 40, '2016-10-09', '2016-12-21', 'Dorothy Rose', '75962 Basil Drive', null, 'Pécs', 'Baranya', '7610', 'Denmark', 3.23, 'Card', '2017-02-21', 'Shipped') +,(4318, 209, 68, '2017-01-15', '2017-01-03', 'Larry Hicks', '5985 Crest Line Road', null, 'Lingqiao', null, null, 'China', 2.77, 'Check', '2017-01-20', 'Complete') +,(4319, 214, 55, '2016-07-14', '2017-03-05', 'Paula Rodriguez', '6 Lawn Court', null, 'Simajia', null, null, 'China', 6.33, 'Check', '2016-04-08', 'Shipped') +,(4320, 203, 83, '2016-12-26', '2016-10-07', 'Sharon Richards', '43297 Rigney Avenue', null, 'Salto', null, null, 'India', 7.32, 'Check', '2016-09-14', 'Complete') +,(4321, 215, 29, '2016-12-27', '2016-07-21', 'Craig Day', '22 Thierer Center', null, 'Alberton', 'Prince Edward Island', 'P7K', 'Canada', 5.32, 'Check', '2016-04-02', 'On Hold') +,(4322, 207, 80, '2016-12-06', '2016-05-21', 'Donna Butler', '4149 Bartelt Point', null, 'Carbonear', 'Newfoundland and Labrador', 'A1Y', 'Canada', 3.1, 'Check', '2016-10-03', 'New') +,(4323, 216, 31, '2016-06-27', '2017-03-13', 'Carolyn Ferguson', '97225 Bartelt Avenue', null, 'Tinalmud', null, '1531', 'Philippines', 7.11, 'Cash', '2016-05-22', 'Complete') +,(4324, 212, 78, '2016-05-19', '2016-11-14', 'Peter Romero', '22977 Westridge Terrace', null, 'Toulouse', 'Midi-Pyrénées', '31029 CEDEX 4', 'France', 2.97, 'Check', '2016-09-09', 'Shipped') +,(4325, 213, 73, '2017-02-18', '2016-09-22', 'Jose Greene', '40351 Rusk Place', null, 'Vila Nova de Gaia', 'Porto', '4400-005', 'Portugal', 5.76, 'Cash', '2016-12-12', 'Shipped') +,(4326, 208, 62, '2017-02-14', '2016-11-13', 'Betty Anderson', '8403 Melody Center', null, 'Būsh', null, null, 'Germany', 9.56, 'Check', '2016-10-08', 'Shipped') +,(4327, 220, 56, '2016-09-06', '2016-08-17', 'Amanda Frazier', '47 Dapin Center', null, 'Pasirmanggu', null, null, 'Indonesia', 2.25, 'Card', '2016-07-11', 'On Hold') +,(4328, 201, 24, '2016-10-29', '2017-01-25', 'Douglas Foster', '6953 Stoughton Avenue', null, 'Bokhan', null, '669310', 'Russia', 1.26, 'Card', '2016-07-06', 'Complete') +,(4329, 206, 33, '2017-03-09', '2017-03-12', 'Louis Brown', '76 Little Fleur Park', null, 'Shazhenxi', null, null, 'China', 3.4, 'Check', '2016-08-09', 'Complete') +,(4330, 205, 61, '2016-04-14', '2016-09-26', 'Elizabeth Butler', '82 Springview Road', null, 'Kimito', null, '11710', 'Finland', 1.92, 'Card', '2016-10-18', 'Shipped') +,(4331, 220, 39, '2016-06-10', '2016-04-07', 'Albert Flores', '19 Talmadge Hill', null, 'Almelo', 'Provincie Overijssel', '7604', 'Netherlands', 4.23, 'Check', '2016-12-15', 'Shipped') +,(4332, 217, 47, '2016-10-25', '2016-09-28', 'Kimberly Fowler', '0 Trailsway Crossing', null, 'Iwata', null, '925-0145', 'Japan', 8.14, 'Check', '2016-06-06', 'On Hold') +,(4333, 209, 12, '2016-12-25', '2016-10-31', 'Joe Powell', '5 Everett Drive', null, 'Bergen', 'Hordaland', '5895', 'Greece', 8.02, 'Cash', '2016-09-05', 'Shipped') +,(4334, 219, 1 , '2016-08-12', '2017-02-18', 'Virginia Collins', '78693 Cordelia Point', null, 'San Benito', null, '8423', 'Philippines', 8.4, 'Cash', '2017-01-06', 'Complete') +,(4335, 220, 59, '2017-02-26', '2016-11-05', 'Mary Howard', '5 Golf View Street', null, 'Gjinkar', null, null, 'Canada', 3.54, 'Card', '2016-06-09', 'Complete') +,(4336, 220, 19, '2017-02-09', '2017-01-26', 'Ronald Stevens', '57 Old Shore Crossing', null, 'Bureng', null, null, 'United Kingdom', 8.21, 'Card', '2016-12-21', 'On Hold') +,(4337, 204, 59, '2016-05-14', '2016-07-08', 'James Evans', '44078 Warner Drive', null, 'Amurzet', null, '679230', 'Russia', 9.35, 'Card', '2016-07-22', 'Complete') +,(4338, 213, 96, '2016-09-02', '2016-11-10', 'Willie Snyder', '361 Stone Corner Pass', null, 'Sindangsari', null, null, 'Indonesia', 9.32, 'Check', '2016-04-10', 'Complete') +,(4339, 220, 30, '2017-03-04', '2016-08-16', 'Julie Black', '2922 Grasskamp Alley', null, 'Cotonou', null, null, 'India', 9.14, 'Cash', '2017-03-07', 'Shipped') +,(4340, 206, 17, '2016-11-18', '2016-11-24', 'Roy Olson', '4 Shopko Hill', null, 'Binagadi', null, null, 'India', 5.22, 'Check', '2016-10-14', 'Shipped') +,(4341, 202, 28, '2016-11-18', '2017-02-18', 'Evelyn Lawrence', '90 Crownhardt Center', null, 'Bayshint', null, null, 'Japan', 7.25, 'Check', '2016-12-16', 'On Hold') +,(4342, 209, 37, '2016-10-30', '2016-06-07', 'John Rodriguez', '69 Golf View Avenue', null, 'Hezuoqiao', null, null, 'China', 8.23, 'Cash', '2016-11-05', 'On Hold') +,(4343, 203, 51, '2016-04-09', '2016-12-17', 'Ruth Kim', '0027 Dunning Pass', null, 'Kuteynykove', null, null, 'Ukraine', 2.46, 'Cash', '2016-03-28', 'New') +,(4344, 217, 34, '2016-12-16', '2016-10-11', 'Shawn Patterson', '36 Little Fleur Circle', null, 'Xiekou', null, null, 'China', 6.43, 'Cash', '2016-03-27', 'New') +,(4345, 213, 59, '2016-10-30', '2016-07-10', 'Nancy Jones', '47088 Crowley Junction', null, 'Promna', null, '26-803', 'Poland', 5.67, 'Cash', '2016-12-02', 'Complete') +,(4346, 217, 70, '2016-12-27', '2016-10-06', 'Deborah Bishop', '1 Summer Ridge Circle', null, 'Bunobogu', null, null, 'Indonesia', 7.57, 'Cash', '2016-09-19', 'New') +,(4347, 203, 30, '2016-05-26', '2016-08-14', 'Steve Hunt', '4393 Summer Ridge Crossing', null, 'Hošťka', null, '348 06', 'Czech Republic', 5.78, 'Cash', '2016-12-30', 'Shipped') +,(4348, 203, 9 , '2016-04-14', '2016-10-19', 'Betty Black', '23 Nova Junction', null, 'Sępólno Krajeńskie', null, '89-400', 'Poland', 8.55, 'Cash', '2016-09-23', 'New') +,(4349, 211, 95, '2017-01-28', '2016-04-13', 'Gregory Wood', '96 Grasskamp Point', null, 'Psará', null, null, 'Greece', 8.47, 'Cash', '2016-12-18', 'Shipped') +,(4350, 218, 97, '2016-03-22', '2016-04-13', 'Martin Martinez', '5 Towne Crossing', null, 'Kista', 'Stockholm', '164 45', 'Sweden', 8.07, 'Check', '2016-05-15', 'On Hold') +,(4351, 215, 80, '2016-06-20', '2016-11-05', 'Margaret Cook', '82 Eggendart Junction', null, 'Omuthiya', null, null, 'India', 9.71, 'Cash', '2016-09-18', 'Shipped') +,(4352, 211, 15, '2016-09-02', '2017-01-23', 'Justin Myers', '6734 Continental Drive', null, 'Tadabliro', null, null, 'Indonesia', 2.23, 'Cash', '2016-05-12', 'New') +,(4353, 216, 77, '2016-10-09', '2016-07-31', 'Jane Ruiz', '2743 Harbort Center', null, 'Pasar', null, null, 'Indonesia', 4.88, 'Cash', '2016-06-04', 'New') +,(4354, 202, 53, '2017-03-15', '2016-06-21', 'Philip Bradley', '6 Bartillon Park', null, 'Aimorés', null, '35200-000', 'Brazil', 5.01, 'Cash', '2016-05-16', 'New') +,(4355, 220, 14, '2017-01-03', '2016-05-07', 'Phillip White', '1 Schurz Crossing', null, 'Tuzhai', null, null, 'China', 7.06, 'Check', '2016-10-18', 'New') +,(4356, 208, 85, '2016-12-26', '2016-07-28', 'George Ryan', '92 Morrow Road', null, 'Nijmegen', 'Provincie Gelderland', '6519', 'Netherlands', 5.76, 'Cash', '2016-12-14', 'New') +,(4357, 208, 73, '2016-04-06', '2016-04-01', 'Evelyn Rose', '134 Milwaukee Lane', null, 'Tiechang', null, null, 'China', 5.37, 'Cash', '2016-12-19', 'Shipped') +,(4358, 202, 77, '2016-04-14', '2016-10-21', 'Janet Robertson', '09309 Dottie Park', null, 'Ljubešćica', null, '42222', 'Canada', 5.27, 'Cash', '2016-06-07', 'On Hold') +,(4359, 202, 35, '2016-05-08', '2017-01-27', 'Diana Perry', '95535 Lotheville Center', null, 'Kvasice', null, '768 21', 'Czech Republic', 7.1, 'Card', '2016-07-27', 'New') +,(4360, 210, 86, '2016-11-23', '2016-10-12', 'Todd Elliott', '6737 Melrose Road', null, 'Catumbela', null, null, 'Netherlands', 2.19, 'Check', '2016-04-05', 'Shipped') +,(4361, 209, 45, '2016-04-07', '2016-06-30', 'Emily Dean', '143 Ridge Oak Alley', null, 'Diriá', null, null, 'United Kingdom', 1.33, 'Cash', '2016-12-31', 'Complete') +,(4362, 208, 88, '2016-05-08', '2016-04-14', 'Eric Simpson', '8113 Graceland Junction', null, 'Borovoy', null, '309135', 'Russia', 3.81, 'Card', '2016-06-21', 'Shipped') +,(4363, 211, 84, '2016-12-31', '2016-06-05', 'Alan Chapman', '461 Westport Center', null, 'Inayauan', null, '3336', 'Philippines', 8.62, 'Card', '2017-03-03', 'Complete') +,(4364, 205, 100,'2016-09-10', '2017-02-19', 'Denise Dixon', '066 Gerald Avenue', null, 'Venëv', null, '301320', 'Russia', 4.82, 'Check', '2016-04-22', 'Shipped') +,(4365, 211, 7 , '2017-03-09', '2017-03-16', 'Douglas Nelson', '03051 Grasskamp Way', null, 'Póvoa', 'Vila Real', '4870-130', 'Portugal', 1.67, 'Check', '2016-08-30', 'Complete') +,(4366, 213, 24, '2016-04-25', '2016-06-06', 'Louis Frazier', '65 Buhler Circle', null, 'Bīleh Savār', null, null, 'Iran', 9.53, 'Check', '2016-12-20', 'Complete') +,(4367, 207, 8 , '2016-09-24', '2016-04-06', 'Theresa Stanley', '487 Birchwood Point', null, 'T’et’ri Tsqaro', null, null, 'United Kingdom', 5.06, 'Cash', '2016-04-08', 'New') +,(4368, 207, 76, '2016-12-21', '2016-05-03', 'Sean Chapman', '3917 Miller Pass', null, 'Andaray', null, null, 'Peru', 4.36, 'Check', '2016-07-25', 'New') +,(4369, 215, 90, '2016-03-30', '2017-01-03', 'Eugene Brooks', '137 1st Hill', null, 'Independencia', 'Tamaulipas', '89888', 'Mexico', 9.56, 'Check', '2017-01-23', 'Shipped') +,(4370, 204, 33, '2016-12-17', '2016-10-22', 'Joan Martin', '24 Hayes Point', null, 'Dobrzeń Wielki', null, '46-081', 'Poland', 8.87, 'Cash', '2016-07-09', 'Shipped') +,(4371, 204, 13, '2016-12-11', '2016-05-07', 'Martha Mendoza', '0 Sommers Point', null, 'Jiamachi', null, null, 'China', 1.53, 'Check', '2016-08-05', 'On Hold') +,(4372, 211, 90, '2016-10-27', '2017-02-14', 'Joan Allen', '64 Bluestem Drive', null, 'Conde', 'Braga', '4815-019', 'Portugal', 2.66, 'Card', '2016-09-25', 'Shipped') +,(4373, 208, 81, '2016-08-20', '2017-03-16', 'Tammy Richards', '15541 Ramsey Alley', null, 'Gunungkendeng', null, null, 'Indonesia', 5.66, 'Cash', '2016-05-03', 'Shipped') +,(4374, 216, 19, '2017-01-22', '2016-09-10', 'Andrea Medina', '3 Goodland Pass', null, 'Ḩarīb', null, null, 'South Africa', 1.03, 'Card', '2016-10-12', 'Shipped') +,(4375, 213, 8 , '2016-09-13', '2016-12-21', 'Antonio Carpenter', '453 Duke Point', null, 'Rouen', 'Haute-Normandie', '76029 CEDEX', 'France', 5.11, 'Cash', '2017-01-26', 'Complete') +,(4376, 207, 83, '2016-11-29', '2016-04-13', 'Jeffrey Smith', '7 Old Shore Center', null, 'Licuan', null, '2500', 'Philippines', 8.55, 'Cash', '2016-11-08', 'New') +,(4377, 216, 13, '2016-11-06', '2016-10-08', 'Mark Perkins', '57 Troy Court', null, 'Mojimán', null, null, 'Canada', 2.03, 'Card', '2017-01-06', 'Shipped') +,(4378, 219, 4 , '2016-08-05', '2017-03-04', 'Louis Jordan', '5 Armistice Street', null, 'Labège', 'Midi-Pyrénées', '31673 CEDEX', 'France', 3.61, 'Cash', '2016-12-07', 'New') +,(4379, 218, 66, '2017-02-26', '2016-11-18', 'Fred Johnson', '4 Dovetail Crossing', null, 'Santa Cruz', null, null, 'India', 1.08, 'Cash', '2016-04-02', 'Complete') +,(4380, 201, 27, '2016-09-01', '2016-05-08', 'Rose Harvey', '8 Canary Plaza', null, 'Pingtan', null, null, 'China', 6.9, 'Check', '2016-12-09', 'Complete') +,(4381, 209, 89, '2017-02-04', '2016-08-30', 'Christine Thomas', '008 Carberry Alley', null, 'Logung', null, null, 'Indonesia', 6.13, 'Card', '2016-05-09', 'On Hold') +,(4382, 204, 47, '2016-08-11', '2016-12-27', 'Juan Reed', '4337 Del Sol Hill', null, 'Dayeuhluhur', null, null, 'Indonesia', 7.76, 'Card', '2016-06-15', 'New') +,(4383, 215, 30, '2016-08-07', '2016-07-22', 'Diane Gray', '899 Oneill Pass', null, 'Alegrete', null, '97540-000', 'Brazil', 5.62, 'Cash', '2016-12-26', 'Complete') +,(4384, 212, 88, '2016-07-23', '2016-05-07', 'Louise Baker', '46092 Kedzie Court', null, 'Ban Mo', null, '18130', 'Thailand', 4.0, 'Card', '2016-07-11', 'Complete') +,(4385, 203, 62, '2017-02-20', '2016-10-01', 'Paul Thompson', '77444 Northwestern Pass', null, 'Francisco I Madero', 'Coahuila De Zaragoza', '26010', 'Mexico', 3.99, 'Check', '2016-12-23', 'Shipped') +,(4386, 218, 26, '2016-09-02', '2016-06-10', 'Anne Kim', '67814 Buena Vista Court', null, 'Sanjie', null, null, 'China', 9.61, 'Card', '2016-04-05', 'New') +,(4387, 219, 20, '2017-03-05', '2016-12-19', 'Matthew Gutierrez', '33055 Evergreen Crossing', null, 'Cusco', null, null, 'Peru', 6.52, 'Check', '2017-02-17', 'Shipped') +,(4388, 219, 71, '2016-09-06', '2016-05-24', 'Janet Hernandez', '9243 Forest Run Parkway', null, 'Ulanov', null, null, 'Ukraine', 3.04, 'Cash', '2016-09-20', 'New') +,(4389, 207, 2 , '2016-04-25', '2017-02-16', 'Louis Chapman', '878 Roth Alley', null, 'Kusak', null, '423430', 'Russia', 5.78, 'Cash', '2017-02-18', 'On Hold') +,(4390, 218, 64, '2016-09-25', '2016-09-22', 'Joe Carpenter', '56 Artisan Park', null, 'Xinjiang', null, null, 'China', 8.2, 'Card', '2016-12-01', 'On Hold') +,(4391, 218, 64, '2016-07-30', '2016-07-23', 'Charles Harper', '7 Sutherland Road', null, 'Tatarbunary', null, null, 'Ukraine', 4.62, 'Cash', '2016-06-29', 'Shipped') +,(4392, 206, 92, '2016-05-05', '2016-07-17', 'Craig Reynolds', '3 Erie Park', null, 'East End', null, null, 'Canada', 2.03, 'Check', '2017-02-03', 'New') +,(4393, 212, 45, '2016-06-29', '2016-06-17', 'Raymond Mcdonald', '792 Brown Trail', null, 'Yangfang', null, null, 'China', 4.44, 'Card', '2017-02-27', 'Complete') +,(4394, 211, 87, '2016-09-28', '2016-04-03', 'Sandra Medina', '7 Eagan Circle', null, 'Baratleke', null, null, 'Indonesia', 4.34, 'Cash', '2017-01-05', 'Complete') +,(4395, 203, 57, '2016-08-18', '2017-03-05', 'Sean Carpenter', '33 Dottie Park', null, 'Sokal’', null, null, 'Ukraine', 5.39, 'Cash', '2017-02-22', 'On Hold') +,(4396, 203, 87, '2016-06-19', '2016-07-10', 'Alice Ferguson', '0399 Dixon Hill', null, 'Privolzhskiy', null, '413138', 'Russia', 8.74, 'Cash', '2016-12-23', 'New') +,(4397, 216, 61, '2016-08-01', '2016-12-25', 'Diana Nguyen', '5052 Rigney Junction', null, 'Guaynabo', 'Pr', '00971', 'Germany', 5.36, 'Check', '2016-07-12', 'On Hold') +,(4398, 211, 52, '2016-12-04', '2016-05-11', 'Earl Gutierrez', '32 Summit Avenue', null, 'Maqbanah', null, null, 'South Africa', 5.82, 'Cash', '2016-07-21', 'New') +,(4399, 208, 71, '2016-05-16', '2017-02-25', 'Gloria Gordon', '5 Prentice Trail', null, 'Xichang', null, null, 'China', 3.2, 'Card', '2016-05-24', 'Complete') +,(4400, 218, 7 , '2016-09-06', '2016-03-21', 'Robert Wheeler', '83 Logan Circle', null, 'Zhongshan', null, null, 'China', 9.15, 'Cash', '2016-08-16', 'Shipped') +,(4401, 210, 53, '2016-09-05', '2016-05-01', 'Walter Williamson', '8459 American Plaza', null, 'Santo Rosario', null, '3114', 'Philippines', 7.71, 'Check', '2017-01-25', 'New') +,(4402, 216, 92, '2016-10-10', '2016-03-28', 'Jonathan James', '164 Bonner Hill', null, 'Vale de Mendiz', 'Vila Real', '5085-105', 'Portugal', 2.96, 'Card', '2016-07-15', 'Shipped') +,(4403, 212, 12, '2016-09-15', '2016-11-11', 'Judy Williams', '207 Scofield Place', null, 'Lawa-an', null, '5706', 'Philippines', 9.68, 'Check', '2016-04-30', 'On Hold') +,(4404, 213, 83, '2016-04-25', '2016-05-14', 'Amy Olson', '84189 Schurz Circle', null, 'Ogoja', null, null, 'Netherlands', 5.18, 'Card', '2016-11-02', 'Complete') +,(4405, 209, 7 , '2016-12-01', '2016-08-30', 'Donna Vasquez', '82460 Ridgeway Hill', null, 'La Guacamaya', null, null, 'Canada', 5.32, 'Card', '2017-02-11', 'Complete') +,(4406, 209, 66, '2016-09-14', '2016-05-13', 'Susan Jacobs', '17 Morningstar Lane', null, 'Chedao', null, null, 'China', 4.12, 'Cash', '2016-11-11', 'New') +,(4407, 214, 57, '2016-05-04', '2016-06-03', 'Kathryn Burns', '116 Hollow Ridge Park', null, 'Comagascas', null, '1950', 'Philippines', 1.05, 'Cash', '2017-01-28', 'New') +,(4408, 201, 64, '2017-02-11', '2016-06-08', 'Doris Bennett', '090 Lien Place', null, 'Luotang', null, null, 'China', 1.35, 'Cash', '2016-12-16', 'Complete') +,(4409, 209, 41, '2017-02-28', '2016-09-05', 'Cynthia Robertson', '6 Eliot Center', null, 'Abu Dhabi', null, null, 'Denmark', 4.21, 'Check', '2017-01-01', 'New') +,(4410, 215, 24, '2016-08-28', '2016-10-30', 'Jonathan Parker', '0 Weeping Birch Hill', null, 'Cienfuegos', null, null, 'Denmark', 1.69, 'Card', '2017-01-21', 'Shipped') +,(4411, 206, 10, '2016-08-30', '2016-12-06', 'Bobby Foster', '8279 Ridgeview Place', null, 'Cruz Alta', null, '98000-000', 'Brazil', 7.5, 'Cash', '2016-09-09', 'On Hold') +,(4412, 205, 65, '2016-12-13', '2017-02-27', 'Phyllis Moore', '806 Acker Drive', null, 'Paoay', null, '2902', 'Philippines', 4.63, 'Cash', '2017-01-11', 'Shipped') +,(4413, 211, 2 , '2016-12-05', '2016-12-07', 'Kevin Gordon', '00875 Sherman Lane', null, 'Wansheng', null, null, 'China', 2.7, 'Card', '2016-07-31', 'New') +,(4414, 219, 25, '2017-02-08', '2016-06-22', 'Jack Mccoy', '2 Killdeer Center', null, 'Gresik', null, null, 'Indonesia', 4.1, 'Check', '2017-03-05', 'On Hold') +,(4415, 220, 9 , '2017-01-02', '2016-08-28', 'Margaret Fuller', '1960 Parkside Hill', null, 'Kafr Zaytā', null, null, 'India', 1.09, 'Cash', '2016-08-07', 'New') +,(4416, 214, 100,'2017-01-07', '2017-02-07', 'Melissa Nichols', '6 Lakewood Gardens Avenue', null, 'Stockholm', 'Stockholm', '113 90', 'Sweden', 4.1, 'Cash', '2016-03-31', 'On Hold') +,(4417, 210, 87, '2017-01-23', '2016-12-14', 'William Webb', '84 Mifflin Junction', null, 'Kanungu', null, null, 'South Africa', 4.38, 'Card', '2016-05-05', 'Complete') +,(4418, 213, 29, '2017-01-05', '2017-02-07', 'Anne Gonzales', '7 Myrtle Plaza', null, 'Davila', null, '2012', 'Philippines', 5.45, 'Cash', '2016-05-23', 'Shipped') +,(4419, 212, 94, '2016-10-19', '2016-12-20', 'Kathleen Graham', '22 Forest Run Hill', null, 'Mollepampa', null, null, 'Peru', 5.86, 'Check', '2016-07-31', 'Shipped') +,(4420, 201, 32, '2016-11-29', '2016-09-24', 'Diana Sanders', '8925 Kennedy Parkway', null, 'San Miguel de Tucumán', null, '4137', 'Argentina', 3.71, 'Cash', '2016-08-10', 'Complete') +,(4421, 208, 58, '2017-03-02', '2016-04-03', 'Willie Wright', '60 Old Shore Alley', null, 'Jinjiang', null, null, 'China', 6.72, 'Card', '2016-10-09', 'Shipped') +,(4422, 206, 59, '2016-04-19', '2016-12-29', 'Frank Evans', '785 Little Fleur Center', null, 'El Triunfo', null, null, 'Argentina', 9.43, 'Check', '2016-05-13', 'New') +,(4423, 209, 68, '2016-08-22', '2016-11-20', 'Phillip Carter', '6398 John Wall Center', null, 'Shouxihu', null, null, 'China', 4.22, 'Check', '2016-10-18', 'New') +,(4424, 205, 31, '2016-10-05', '2016-10-09', 'Lillian Gomez', '17560 Melrose Point', null, 'Milwaukee', 'Wisconsin', '53205', 'United States', 1.16, 'Check', '2016-04-17', 'On Hold') +,(4425, 202, 7 , '2016-07-24', '2017-02-22', 'John Ortiz', '45 Vera Place', null, 'Kiel', 'Schleswig-Holstein', '24109', 'Germany', 5.86, 'Cash', '2016-10-13', 'On Hold') +,(4426, 214, 80, '2016-10-04', '2016-09-01', 'Brandon Fields', '94792 Jackson Hill', null, 'San Juan', 'Pr', '00918', 'Germany', 2.54, 'Check', '2016-12-19', 'On Hold') +,(4427, 209, 23, '2016-06-23', '2016-04-29', 'Willie Hart', '20 Sloan Terrace', null, 'Mount Darwin', null, null, 'India', 3.71, 'Cash', '2016-09-22', 'Complete') +,(4428, 211, 7 , '2016-09-07', '2016-10-28', 'Walter Montgomery', '67285 Crowley Road', null, 'Wailolong', null, null, 'Indonesia', 9.79, 'Check', '2016-04-05', 'Complete') +,(4429, 217, 10, '2017-03-02', '2016-11-27', 'Sara Williamson', '72 Monterey Circle', null, 'Salvacion', null, '1114', 'Philippines', 3.33, 'Card', '2016-05-18', 'On Hold') +,(4430, 210, 12, '2017-02-18', '2016-03-17', 'Wayne Sanders', '21302 Valley Edge Pass', null, 'Balakasap', null, null, 'Indonesia', 2.18, 'Card', '2016-06-02', 'New') +,(4431, 220, 80, '2016-10-01', '2016-09-28', 'Cynthia Allen', '1 Karstens Avenue', null, 'Santo António das Areias', 'Portalegre', '7330-254', 'Portugal', 3.4, 'Cash', '2016-08-21', 'New') +,(4432, 211, 95, '2017-02-04', '2016-03-17', 'Jonathan Hughes', '93993 Fairview Junction', null, 'Buje', null, '52460', 'Canada', 5.19, 'Cash', '2016-10-01', 'New') +,(4433, 208, 67, '2017-02-11', '2016-06-01', 'Gerald Wright', '77811 Dennis Point', null, 'Hohoe', null, null, 'United Kingdom', 3.25, 'Card', '2016-07-15', 'New') +,(4434, 201, 53, '2016-12-25', '2017-01-07', 'Roy Anderson', '182 High Crossing Terrace', null, 'Bajiazi', null, null, 'China', 8.8, 'Card', '2017-02-11', 'Shipped') +,(4435, 207, 3 , '2016-05-30', '2016-04-07', 'Brenda Wright', '98 Kim Drive', null, 'Lillehammer', 'Oppland', '2605', 'Greece', 5.76, 'Cash', '2017-02-02', 'On Hold') +,(4436, 204, 29, '2016-07-19', '2016-07-05', 'Philip Price', '16 Brown Plaza', null, 'Čapljina', null, null, 'India', 9.62, 'Cash', '2016-11-05', 'On Hold') +,(4437, 210, 80, '2016-10-13', '2016-04-24', 'Michelle Webb', '4160 Everett Point', null, 'Waepana', null, null, 'Indonesia', 9.54, 'Cash', '2016-07-11', 'Complete') +,(4438, 209, 6 , '2016-12-31', '2017-01-27', 'Heather Fields', '10 Fairview Center', null, 'Złotniki Kujawskie', null, '88-180', 'Poland', 1.81, 'Cash', '2017-03-15', 'Shipped') +,(4439, 216, 53, '2017-02-01', '2016-09-12', 'Ryan Long', '0 Gateway Avenue', null, 'Pizhanka', null, '613380', 'Russia', 9.34, 'Cash', '2016-07-02', 'New') +,(4440, 211, 25, '2017-02-03', '2016-10-13', 'Joyce Stewart', '61 Burrows Street', null, 'Kushelevka', null, '658381', 'Russia', 6.4, 'Cash', '2017-01-29', 'On Hold') +,(4441, 215, 93, '2016-03-21', '2016-11-17', 'Walter Arnold', '97613 Pond Avenue', null, 'Looc', null, '5507', 'Philippines', 1.09, 'Cash', '2016-10-05', 'Shipped') +,(4442, 214, 10, '2016-05-10', '2016-05-31', 'Irene Simmons', '36 Larry Court', null, 'Rozhdestveno', null, '399768', 'Russia', 4.82, 'Check', '2017-01-13', 'Complete') +,(4443, 208, 19, '2017-02-09', '2017-02-05', 'Christina Mccoy', '1482 Rockefeller Point', null, 'Rybatskoye', null, '196851', 'Russia', 1.62, 'Cash', '2016-09-14', 'Shipped') +,(4444, 210, 98, '2017-02-15', '2016-05-17', 'Marie Fowler', '04 Prairie Rose Junction', null, 'Chicago', 'Illinois', '60604', 'United States', 7.47, 'Card', '2017-02-22', 'Complete') +,(4445, 218, 32, '2017-02-12', '2016-05-20', 'Louise Bell', '3 Charing Cross Pass', null, 'Selce', null, '1219', 'Denmark', 4.47, 'Cash', '2016-04-01', 'New') +,(4446, 209, 25, '2016-09-22', '2016-12-03', 'Barbara Black', '697 Oneill Drive', null, 'Shanghang', null, null, 'China', 4.66, 'Check', '2016-11-09', 'On Hold') +,(4447, 209, 100,'2016-08-26', '2017-01-16', 'James Holmes', '77 Marcy Court', null, 'Estreito', null, '65975-000', 'Brazil', 9.85, 'Check', '2016-12-04', 'On Hold') +,(4448, 210, 72, '2016-06-25', '2016-12-07', 'Kenneth Williams', '6400 Milwaukee Hill', null, 'Wanshan', null, null, 'China', 3.66, 'Card', '2016-06-09', 'On Hold') +,(4449, 213, 16, '2016-12-13', '2016-08-07', 'Joshua Jacobs', '8 Judy Park', null, 'Ágios Andréas', null, null, 'Greece', 3.81, 'Cash', '2016-07-07', 'Complete') +,(4450, 216, 100,'2016-12-21', '2017-02-13', 'Aaron Sanders', '1 Dakota Court', null, 'Huayllo', null, null, 'Peru', 7.59, 'Cash', '2016-04-22', 'On Hold') +,(4451, 211, 50, '2016-08-22', '2016-06-05', 'Eugene Scott', '03 Golden Leaf Point', null, 'Stírion', null, null, 'Greece', 8.99, 'Card', '2017-02-25', 'New') +,(4452, 220, 86, '2016-05-07', '2016-07-20', 'Cynthia Phillips', '820 Merchant Way', null, 'Mrongi Daja', null, null, 'Indonesia', 2.21, 'Check', '2016-04-27', 'On Hold') +,(4453, 213, 58, '2016-10-30', '2016-03-22', 'Martin Reed', '14 Meadow Vale Alley', null, 'Jiangdong', null, null, 'China', 3.58, 'Cash', '2017-02-12', 'Complete') +,(4454, 206, 98, '2016-05-14', '2016-11-07', 'Janet Porter', '74391 Ronald Regan Park', null, 'Lamakera Dua', null, null, 'Indonesia', 9.86, 'Check', '2016-06-12', 'New') +,(4455, 204, 2 , '2016-03-28', '2016-04-11', 'Amanda Duncan', '047 Jenna Road', null, 'Tungawan', null, '7018', 'Philippines', 2.04, 'Card', '2016-07-09', 'New') +,(4456, 211, 58, '2016-08-05', '2016-11-19', 'Joseph Henderson', '14 Morningstar Pass', null, 'Kolobolon', null, null, 'Indonesia', 6.44, 'Check', '2016-05-24', 'New') +,(4457, 215, 21, '2017-02-15', '2016-06-11', 'Cynthia Bishop', '066 Surrey Pass', null, 'Hưng Yên', null, null, 'Vietnam', 1.61, 'Check', '2016-07-05', 'Shipped') +,(4458, 211, 10, '2016-08-08', '2016-08-06', 'Craig Andrews', '7 Mariners Cove Court', null, 'Tuanchengshan', null, null, 'China', 8.4, 'Cash', '2016-12-15', 'New') +,(4459, 211, 71, '2016-05-13', '2017-02-19', 'Steve Warren', '6702 Delladonna Point', null, 'Pražmo', null, '739 04', 'Czech Republic', 8.29, 'Card', '2016-06-29', 'New') +,(4460, 214, 5 , '2016-12-21', '2016-06-21', 'Brenda Mills', '77934 Prairieview Way', null, 'Huafeng', null, null, 'China', 6.76, 'Cash', '2016-07-08', 'New') +,(4461, 212, 34, '2016-04-27', '2016-07-22', 'Randy Wright', '9 Thackeray Way', null, 'Dvůr Králové nad Labem', null, '544 01', 'Czech Republic', 9.45, 'Card', '2016-03-20', 'Shipped') +,(4462, 202, 47, '2016-10-31', '2016-06-30', 'Michelle Ramirez', '0152 Old Shore Road', null, 'Pulaupinang', null, null, 'Indonesia', 2.42, 'Card', '2016-09-05', 'New') +,(4463, 209, 86, '2016-07-30', '2016-04-29', 'Frank Duncan', '67 Buell Terrace', null, 'Krasne', null, null, 'Ukraine', 2.71, 'Card', '2016-06-22', 'Complete') +,(4464, 204, 62, '2017-03-01', '2017-03-11', 'Carlos Warren', '978 Merrick Circle', null, 'Penghua', null, null, 'China', 7.29, 'Cash', '2016-03-22', 'Shipped') +,(4465, 202, 87, '2016-06-23', '2016-11-15', 'Tina Gardner', '0 Mcguire Terrace', null, 'Cangqian', null, null, 'China', 2.17, 'Card', '2016-06-01', 'New') +,(4466, 220, 31, '2016-06-04', '2016-06-08', 'Stephen Turner', '17 Leroy Plaza', null, 'Pedaringan', null, null, 'Indonesia', 8.89, 'Check', '2016-05-09', 'Shipped') +,(4467, 210, 35, '2016-05-21', '2016-09-26', 'Melissa Wilson', '61199 Forest Center', null, 'Krmelín', null, '739 24', 'Czech Republic', 2.35, 'Card', '2016-06-20', 'On Hold') +,(4468, 216, 50, '2016-09-10', '2016-12-02', 'Billy Harper', '8940 Fisk Parkway', null, 'San Jose', 'California', '95113', 'United States', 3.98, 'Cash', '2016-10-04', 'Complete') +,(4469, 207, 22, '2016-06-03', '2016-11-06', 'Carl Davis', '5 Lindbergh Street', null, 'Taling Chan', null, '10170', 'Thailand', 4.71, 'Card', '2017-02-03', 'New') +,(4470, 211, 64, '2016-06-16', '2016-05-26', 'Gerald Henry', '2221 Porter Crossing', null, 'Mozdok', null, '363759', 'Russia', 9.57, 'Cash', '2016-10-11', 'Shipped') +,(4471, 206, 25, '2016-07-27', '2016-08-24', 'Debra Garza', '65379 Sunnyside Trail', null, 'Jiadingzhen', null, null, 'China', 1.06, 'Check', '2016-06-23', 'On Hold') +,(4472, 204, 18, '2016-08-30', '2016-10-09', 'Margaret Rodriguez', '3202 Marquette Point', null, 'Oranzherei', null, '416368', 'Russia', 3.35, 'Check', '2016-06-18', 'On Hold') +,(4473, 212, 88, '2016-10-29', '2016-05-25', 'William Burke', '46 Kingsford Center', null, 'San Juan', null, '11301', 'Denmark', 3.85, 'Check', '2017-02-12', 'Shipped') +,(4474, 217, 9 , '2017-02-19', '2016-05-29', 'Larry Myers', '731 Packers Point', null, 'Trelleborg', 'Skåne', '231 68', 'Sweden', 4.46, 'Card', '2016-06-19', 'New') +,(4475, 202, 40, '2016-11-03', '2016-04-25', 'Virginia Hall', '141 Rowland Way', null, 'Aoji-ri', null, null, 'Denmark', 7.58, 'Check', '2016-11-13', 'Shipped') +,(4476, 211, 16, '2017-03-07', '2016-10-14', 'Doris Berry', '60 Rusk Lane', null, 'Al Qamşīyah', null, null, 'India', 1.8, 'Check', '2016-03-19', 'On Hold') +,(4477, 210, 87, '2016-12-04', '2016-03-22', 'Juan Richards', '3830 Randy Parkway', null, 'Nakhon Nayok', null, '26120', 'Thailand', 1.22, 'Card', '2016-08-05', 'Complete') +,(4478, 203, 34, '2017-01-28', '2016-09-27', 'Kimberly Fox', '34957 Elka Way', null, 'Santiago', null, '97700-000', 'Brazil', 3.99, 'Check', '2016-07-06', 'On Hold') +,(4479, 219, 89, '2016-07-01', '2016-05-31', 'Ruby Ruiz', '90581 American Hill', null, 'Agudos', null, '17120-000', 'Brazil', 5.97, 'Cash', '2016-06-03', 'On Hold') +,(4480, 203, 53, '2016-10-17', '2016-11-07', 'Ruby Robinson', '385 Carioca Plaza', null, 'Kalangan', null, null, 'Indonesia', 8.71, 'Card', '2016-12-01', 'Complete') +,(4481, 207, 91, '2017-02-25', '2016-03-31', 'Victor Lopez', '170 Mariners Cove Circle', null, 'Bressuire', 'Poitou-Charentes', '79304 CEDEX', 'France', 8.59, 'Check', '2016-07-30', 'Complete') +,(4482, 215, 58, '2017-02-15', '2016-07-25', 'Kimberly Marshall', '647 Summerview Circle', null, 'Timahankrajan', null, null, 'Indonesia', 3.07, 'Check', '2016-04-21', 'On Hold') +,(4483, 207, 76, '2016-06-27', '2016-10-15', 'Pamela Matthews', '9379 Summit Trail', null, 'Brangsi', null, null, 'Indonesia', 1.35, 'Card', '2016-05-27', 'New') +,(4484, 210, 98, '2017-02-03', '2016-11-04', 'Randy Patterson', '6641 American Ash Point', null, 'Ivanec', null, '42240', 'Canada', 2.36, 'Card', '2016-10-31', 'Shipped') +,(4485, 205, 71, '2017-01-01', '2017-02-16', 'Carolyn Garza', '281 Raven Lane', null, 'Jingyang', null, null, 'China', 6.85, 'Check', '2016-04-27', 'Shipped') +,(4486, 202, 20, '2016-07-24', '2016-07-06', 'Ruth Perkins', '5656 Northview Lane', null, 'Burevestnik', null, '607612', 'Russia', 9.29, 'Cash', '2017-03-16', 'On Hold') +,(4487, 203, 49, '2017-02-20', '2017-01-12', 'Kelly Oliver', '249 Londonderry Pass', null, 'Grande Rivière du Nord', null, null, 'Canada', 7.65, 'Check', '2016-12-04', 'Shipped') +,(4488, 203, 67, '2016-11-09', '2016-07-19', 'Shirley Henry', '3045 Rowland Lane', null, 'Midlands', null, null, 'Germany', 5.35, 'Check', '2016-06-14', 'Complete') +,(4489, 209, 100,'2017-01-24', '2016-05-30', 'Marie Ferguson', '629 Crownhardt Junction', null, 'El Paso', 'Texas', '88546', 'United States', 5.18, 'Check', '2016-04-20', 'Shipped') +,(4490, 202, 87, '2016-06-27', '2016-09-05', 'Rachel Scott', '343 Schurz Road', null, 'Cabiguan', null, '1144', 'Philippines', 1.05, 'Cash', '2016-07-24', 'Shipped') +,(4491, 211, 93, '2017-01-16', '2016-09-29', 'Henry Fields', '26143 Del Sol Avenue', null, 'Huangduobu', null, null, 'China', 6.15, 'Card', '2016-06-02', 'Shipped') +,(4492, 217, 10, '2016-12-08', '2016-10-01', 'Harold Jones', '2 Oak Avenue', null, 'Surkhakhi', null, '386147', 'Russia', 9.96, 'Card', '2016-04-07', 'New') +,(4493, 217, 35, '2016-05-05', '2016-05-01', 'Walter Wright', '12 Paget Road', null, 'Siluman', null, null, 'Indonesia', 2.1, 'Cash', '2016-10-26', 'On Hold') +,(4494, 206, 51, '2017-02-25', '2016-10-24', 'Marilyn Hayes', '4 5th Way', null, 'Punkaharju', null, '58501', 'Finland', 3.57, 'Cash', '2016-06-22', 'New') +,(4495, 208, 3 , '2016-12-27', '2016-09-09', 'Sandra West', '0384 Bowman Center', null, 'Tagta', null, null, 'India', 6.45, 'Cash', '2016-08-25', 'New') +,(4496, 218, 41, '2017-01-10', '2016-12-11', 'Dennis Meyer', '4 Cambridge Alley', null, 'Cariamanga', null, null, 'Argentina', 5.33, 'Check', '2016-09-28', 'New') +,(4497, 216, 76, '2016-09-28', '2016-05-12', 'Frank Dean', '23227 Veith Park', null, 'Fengqiao', null, null, 'China', 6.72, 'Cash', '2016-04-12', 'Complete') +,(4498, 204, 3 , '2016-11-11', '2016-12-01', 'Amy Palmer', '7735 Maple Wood Road', null, 'Działoszyce', null, '28-440', 'Poland', 3.08, 'Card', '2016-09-07', 'Shipped') +,(4499, 211, 96, '2017-02-04', '2016-03-27', 'Emily Nelson', '3 Crownhardt Plaza', null, 'Oslob', null, '6025', 'Philippines', 6.41, 'Card', '2016-09-25', 'On Hold') +,(4500, 204, 7 , '2016-04-29', '2017-01-20', 'Randy Hanson', '687 Drewry Place', null, 'Barberena', null, '06002', 'Japan', 2.51, 'Card', '2016-12-12', 'Complete') +,(4501, 215, 92, '2017-02-27', '2016-09-26', 'Raymond Banks', '826 Mendota Pass', null, 'Chicago', 'Illinois', '60681', 'United States', 3.34, 'Card', '2016-10-30', 'Complete') +,(4502, 220, 24, '2016-10-01', '2016-09-26', 'Kimberly Robertson', '2643 Becker Trail', null, 'Columbus', 'United Kingdom', '31904', 'United States', 3.07, 'Check', '2016-04-27', 'Complete') +,(4503, 215, 52, '2017-02-25', '2016-08-08', 'Marilyn Miller', '1 Tennessee Park', null, 'Spokane', 'Washington', '99252', 'United States', 5.34, 'Check', '2016-08-16', 'On Hold') +,(4504, 220, 35, '2017-01-27', '2016-09-08', 'Marie Carpenter', '4575 Fair Oaks Hill', null, 'Richmond', 'Virginia', '23293', 'United States', 7.01, 'Cash', '2016-04-06', 'Shipped') +,(4505, 203, 10, '2016-06-24', '2017-02-22', 'Nicholas Wells', '823 Duke Center', null, 'Irvine', 'California', '92710', 'United States', 1.4, 'Check', '2016-06-17', 'On Hold') +,(4506, 207, 26, '2016-12-26', '2017-03-14', 'John Dean', '06 Spenser Place', null, 'Charleston', 'South Carolina', '29403', 'United States', 1.31, 'Cash', '2016-10-25', 'Shipped') +,(4507, 216, 28, '2016-08-22', '2016-12-13', 'Diana Spencer', '26 Ridgeway Plaza', null, 'Ogden', 'Utah', '84403', 'United States', 9.42, 'Cash', '2016-04-13', 'Shipped') +,(4508, 213, 90, '2016-08-31', '2017-01-13', 'Wanda Bowman', '862 Iowa Avenue', null, 'Kansas City', 'Kansas', '66160', 'United States', 7.1, 'Cash', '2016-10-19', 'Complete') +,(4509, 204, 93, '2016-07-07', '2016-05-31', 'Andrew Garrett', '27066 Gina Road', null, 'El Paso', 'Texas', '88558', 'United States', 6.88, 'Check', '2016-04-23', 'Complete') +,(4510, 202, 56, '2017-02-06', '2016-10-29', 'Juan Webb', '6233 South Junction', null, 'Lafayette', 'Louisiana', '70505', 'United States', 1.07, 'Cash', '2016-05-20', 'New') +,(4511, 219, 54, '2016-11-08', '2016-06-17', 'William Gardner', '5 Meadow Ridge Terrace', null, 'Tacoma', 'Washington', '98447', 'United States', 4.46, 'Check', '2016-05-25', 'Complete') +,(4512, 215, 4 , '2016-09-09', '2016-08-21', 'Fred Fernandez', '15 Ludington Junction', null, 'San Rafael', 'California', '94913', 'United States', 4.3, 'Cash', '2016-09-02', 'New') +,(4513, 206, 54, '2016-10-28', '2016-06-30', 'Ruth Ellis', '41196 Rieder Avenue', null, 'Baltimore', 'Maryland', '21211', 'United States', 8.39, 'Card', '2016-05-29', 'Complete') +,(4514, 215, 73, '2017-02-26', '2016-09-17', 'David Ferguson', '5813 Brown Parkway', null, 'Shawnee Mission', 'Kansas', '66286', 'United States', 2.71, 'Card', '2016-04-18', 'Shipped') +,(4515, 216, 23, '2016-11-08', '2016-06-27', 'Susan Freeman', '0 Bashford Parkway', null, 'Tucson', 'Arizona', '85720', 'United States', 5.5, 'Check', '2017-02-01', 'Shipped') +,(4516, 212, 9 , '2016-04-30', '2016-12-31', 'Alan Hunt', '193 Declaration Plaza', null, 'Louisville', 'Kentucky', '40256', 'United States', 9.74, 'Cash', '2017-01-20', 'On Hold') +,(4517, 202, 46, '2017-02-01', '2016-07-22', 'Phillip Romero', '1860 Thompson Crossing', null, 'Biloxi', 'Mississippi', '39534', 'United States', 3.02, 'Card', '2016-11-04', 'Complete') +,(4518, 203, 75, '2016-09-07', '2016-11-14', 'George Diaz', '6 Mcguire Center', null, 'Mesa', 'Arizona', '85210', 'United States', 7.84, 'Check', '2016-06-21', 'Shipped') +,(4519, 217, 68, '2016-10-07', '2016-08-15', 'Virginia King', '7405 High Crossing Alley', null, 'Sioux City', 'Iowa', '51105', 'United States', 4.03, 'Check', '2016-05-09', 'Complete') +,(4520, 216, 6 , '2017-02-18', '2017-02-17', 'Brenda Ruiz', '224 Badeau Street', null, 'Corpus Christi', 'Texas', '78426', 'United States', 9.11, 'Check', '2016-11-13', 'New') +,(4521, 201, 84, '2016-09-17', '2016-06-15', 'Debra Brown', '94 Morningstar Center', null, 'San Francisco', 'California', '94177', 'United States', 6.59, 'Check', '2017-03-10', 'Shipped') +,(4522, 205, 89, '2016-10-22', '2017-03-13', 'Emily Henry', '79 Manufacturers Center', null, 'Los Angeles', 'California', '90020', 'United States', 4.11, 'Cash', '2016-10-27', 'Complete') +,(4523, 211, 67, '2016-04-17', '2017-02-12', 'Aaron Peterson', '504 Schlimgen Terrace', null, 'Bethesda', 'Maryland', '20892', 'United States', 5.42, 'Card', '2016-08-25', 'Shipped') +,(4524, 215, 83, '2016-08-22', '2016-07-31', 'Janice Burke', '3 Mcbride Lane', null, 'Washington', 'District of Columbia', '20073', 'United States', 3.76, 'Card', '2016-08-09', 'Shipped') +,(4525, 217, 100,'2016-03-31', '2016-12-09', 'Debra Kelley', '18155 Northview Plaza', null, 'Detroit', 'Michigan', '48267', 'United States', 2.26, 'Cash', '2016-12-29', 'On Hold') +,(4526, 214, 32, '2016-11-24', '2016-03-28', 'Donald Sims', '86 Michigan Avenue', null, 'Brooklyn', 'New York', '11231', 'United States', 5.05, 'Check', '2016-08-07', 'Shipped') +,(4527, 205, 100,'2016-05-13', '2016-06-17', 'Daniel Mason', '4 Hanover Road', null, 'Reno', 'Nevada', '89595', 'United States', 4.81, 'Check', '2016-10-22', 'Shipped') +,(4528, 201, 32, '2016-11-15', '2016-11-16', 'Howard Knight', '5 Weeping Birch Alley', null, 'Jacksonville', 'Florida', '32225', 'United States', 5.99, 'Check', '2016-11-07', 'New') +,(4529, 213, 99, '2016-12-02', '2016-07-09', 'Virginia Hughes', '629 Manufacturers Point', null, 'Syracuse', 'New York', '13224', 'United States', 5.6, 'Card', '2016-12-02', 'Complete') +,(4530, 219, 18, '2016-12-07', '2017-02-07', 'Carl Graham', '90 Heffernan Pass', null, 'Saint Petersburg', 'Florida', '33737', 'United States', 9.35, 'Check', '2016-10-18', 'Complete') +,(4531, 201, 57, '2016-12-26', '2016-12-29', 'Joan Murray', '38 Bellgrove Crossing', null, 'Tacoma', 'Washington', '98447', 'United States', 6.69, 'Card', '2016-12-05', 'On Hold') +,(4532, 202, 58, '2016-04-02', '2016-07-01', 'Robert Williams', '09407 Northfield Circle', null, 'Cedar Rapids', 'Iowa', '52410', 'United States', 6.56, 'Card', '2016-04-16', 'On Hold') +,(4533, 218, 36, '2017-02-07', '2016-05-05', 'Ryan Black', '57199 Hoffman Place', null, 'Jacksonville', 'Florida', '32204', 'United States', 8.54, 'Check', '2017-01-24', 'Shipped') +,(4534, 208, 92, '2016-07-09', '2016-06-20', 'Brenda Hunter', '16179 Ludington Court', null, 'Birmingham', 'Alabama', '35263', 'United States', 9.82, 'Cash', '2016-09-30', 'New') +,(4535, 214, 70, '2016-08-04', '2016-06-29', 'Anne Warren', '08161 Barnett Parkway', null, 'Van Nuys', 'California', '91411', 'United States', 7.04, 'Cash', '2017-02-24', 'Complete') +,(4536, 213, 99, '2017-01-11', '2017-01-21', 'Betty Snyder', '9 Badeau Court', null, 'Davenport', 'Iowa', '52804', 'United States', 8.72, 'Card', '2016-09-03', 'Shipped') +,(4537, 217, 76, '2016-07-31', '2017-02-13', 'Edward Wilson', '1031 Esch Drive', null, 'Fresno', 'California', '93750', 'United States', 1.64, 'Check', '2016-04-21', 'On Hold') +,(4538, 210, 60, '2016-06-22', '2016-04-10', 'Terry Butler', '124 Hoepker Pass', null, 'San Antonio', 'Texas', '78255', 'United States', 2.35, 'Check', '2017-01-31', 'Complete') +,(4539, 220, 5 , '2016-11-12', '2016-04-25', 'Emily Hawkins', '990 Quincy Drive', null, 'Richmond', 'Virginia', '23289', 'United States', 4.36, 'Card', '2016-09-17', 'Complete') +,(4540, 213, 42, '2017-02-28', '2017-02-11', 'Cynthia Rose', '8881 Packers Trail', null, 'Berkeley', 'California', '94712', 'United States', 6.09, 'Check', '2016-04-14', 'New') +,(4541, 204, 27, '2016-09-30', '2017-01-28', 'Lisa Turner', '83 Graedel Terrace', null, 'Oakland', 'California', '94611', 'United States', 9.61, 'Card', '2016-05-07', 'Shipped') +,(4542, 219, 26, '2016-07-13', '2016-03-23', 'Jason Price', '475 Meadow Valley Point', null, 'Annapolis', 'Maryland', '21405', 'United States', 2.93, 'Check', '2016-06-10', 'New') +,(4543, 202, 63, '2016-07-29', '2016-05-20', 'Joan Hayes', '7 Upham Center', null, 'Temple', 'Texas', '76505', 'United States', 7.39, 'Card', '2016-09-20', 'Complete') +,(4544, 212, 97, '2016-10-31', '2017-01-16', 'Paula Torres', '443 Debs Terrace', null, 'Racine', 'Wisconsin', '53405', 'United States', 3.93, 'Card', '2016-07-07', 'Shipped') +,(4545, 201, 33, '2017-03-08', '2016-08-21', 'Theresa Watkins', '85395 Rusk Center', null, 'Jackson', 'Mississippi', '39210', 'United States', 5.32, 'Card', '2016-11-19', 'Complete') +,(4546, 211, 68, '2016-05-25', '2016-07-17', 'Clarence Nguyen', '155 Northport Road', null, 'Greensboro', 'North Carolina', '27455', 'United States', 7.06, 'Cash', '2016-08-24', 'Shipped') +,(4547, 203, 73, '2016-05-03', '2016-10-23', 'Jean Mason', '03 Eagle Crest Lane', null, 'Colorado Springs', 'Colorado', '80935', 'United States', 4.2, 'Cash', '2016-04-07', 'New') +,(4548, 217, 2 , '2016-05-20', '2016-08-07', 'Nicole Brown', '364 Debra Lane', null, 'Washington', 'District of Columbia', '20046', 'United States', 7.97, 'Cash', '2016-04-30', 'New') +,(4549, 220, 89, '2016-04-11', '2016-12-11', 'Carol Chapman', '756 Muir Point', null, 'Washington', 'District of Columbia', '20397', 'United States', 2.21, 'Card', '2017-02-05', 'Shipped') +,(4550, 211, 13, '2016-04-16', '2016-08-03', 'Roy George', '8 Anhalt Terrace', null, 'Indianapolis', 'Indiana', '46207', 'United States', 4.5, 'Check', '2017-03-06', 'New') +,(4551, 219, 37, '2016-04-14', '2017-03-01', 'Heather Bishop', '0901 Tennessee Street', null, 'Kingsport', 'Tennessee', '37665', 'United States', 1.92, 'Card', '2017-01-02', 'Shipped') +,(4552, 218, 94, '2017-03-05', '2016-06-01', 'Wayne Mason', '90645 Carberry Drive', null, 'Madison', 'Wisconsin', '53716', 'United States', 6.96, 'Card', '2016-12-31', 'Complete') +,(4553, 212, 37, '2016-10-16', '2016-10-13', 'Gloria Elliott', '100 Granby Junction', null, 'Miami', 'Florida', '33153', 'United States', 9.25, 'Cash', '2016-06-09', 'Shipped') +,(4554, 217, 4 , '2016-06-05', '2016-07-26', 'Timothy Hayes', '6001 Elgar Circle', null, 'Pensacola', 'Florida', '32575', 'United States', 6.5, 'Cash', '2016-03-30', 'Complete') +,(4555, 207, 49, '2016-08-19', '2016-08-15', 'Judith Baker', '3436 Briar Crest Park', null, 'Newark', 'New Jersey', '07188', 'United States', 2.33, 'Check', '2016-09-17', 'Complete') +,(4556, 217, 17, '2016-11-18', '2016-12-10', 'Roy Russell', '6401 Graedel Court', null, 'Alexandria', 'Virginia', '22301', 'United States', 3.24, 'Check', '2016-04-08', 'Complete') +,(4557, 216, 35, '2016-09-11', '2016-05-07', 'Jacqueline Davis', '864 Cherokee Lane', null, 'Columbus', 'Ohio', '43226', 'United States', 4.7, 'Card', '2016-08-06', 'Shipped') +,(4558, 211, 20, '2016-10-06', '2016-07-15', 'Eugene Castillo', '03090 Northland Circle', null, 'Salt Lake City', 'Utah', '84199', 'United States', 9.36, 'Card', '2016-10-06', 'Complete') +,(4559, 216, 13, '2017-01-13', '2016-03-28', 'Janice Mills', '522 Holmberg Alley', null, 'Scottsdale', 'Arizona', '85271', 'United States', 7.31, 'Cash', '2016-05-15', 'On Hold') +,(4560, 211, 77, '2016-08-24', '2017-03-13', 'Ruby White', '0070 Corben Way', null, 'Naples', 'Florida', '34114', 'United States', 3.71, 'Check', '2016-07-17', 'On Hold') +,(4561, 219, 55, '2016-08-13', '2016-11-19', 'Frank Jackson', '25 Rigney Point', null, 'Washington', 'District of Columbia', '20420', 'United States', 1.94, 'Cash', '2016-06-12', 'Shipped') +,(4562, 207, 96, '2016-10-12', '2016-12-04', 'Pamela Peterson', '830 Loftsgordon Junction', null, 'Houston', 'Texas', '77281', 'United States', 1.45, 'Check', '2017-03-06', 'New') +,(4563, 204, 70, '2016-07-23', '2017-02-06', 'Martha Frazier', '3 Gerald Lane', null, 'Scottsdale', 'Arizona', '85260', 'United States', 2.74, 'Cash', '2017-01-19', 'New') +,(4564, 204, 59, '2017-02-26', '2016-10-23', 'Kenneth Hawkins', '27305 Maple Crossing', null, 'San Diego', 'California', '92145', 'United States', 9.41, 'Cash', '2017-02-09', 'On Hold') +,(4565, 203, 66, '2016-08-06', '2017-02-03', 'Barbara Collins', '8 Norway Maple Junction', null, 'Fort Worth', 'Texas', '76198', 'United States', 1.08, 'Card', '2016-06-24', 'New') +,(4566, 217, 83, '2016-09-14', '2016-03-29', 'Gary Ellis', '97 Nobel Avenue', null, 'Alexandria', 'Louisiana', '71307', 'United States', 5.05, 'Card', '2016-06-13', 'Shipped') +,(4567, 214, 63, '2017-03-04', '2016-11-05', 'Douglas Hughes', '98309 Mccormick Park', null, 'Kansas City', 'Kansas', '66160', 'United States', 1.4, 'Card', '2017-02-13', 'Shipped') +,(4568, 208, 12, '2016-10-31', '2017-02-27', 'Harold Flores', '1 Merchant Lane', null, 'Duluth', 'United Kingdom', '30096', 'United States', 4.84, 'Check', '2016-04-30', 'On Hold') +,(4569, 201, 96, '2016-08-20', '2016-10-03', 'Marie Nguyen', '084 Stuart Hill', null, 'Arlington', 'Texas', '76004', 'United States', 5.95, 'Cash', '2016-04-25', 'On Hold') +,(4570, 203, 1 , '2016-10-13', '2016-03-21', 'Judy Fowler', '7541 Golf Course Way', null, 'Kansas City', 'Missouri', '64109', 'United States', 8.02, 'Check', '2016-05-05', 'New') +,(4571, 219, 49, '2016-11-04', '2016-09-02', 'Howard Rogers', '5 Scott Hill', null, 'Brooklyn', 'New York', '11215', 'United States', 5.21, 'Cash', '2016-10-28', 'Complete') +,(4572, 215, 5 , '2016-03-24', '2016-08-31', 'Stephanie Martinez', '0022 Reinke Trail', null, 'Baton Rouge', 'Louisiana', '70894', 'United States', 7.74, 'Card', '2016-08-14', 'On Hold') +,(4573, 206, 61, '2016-08-31', '2016-07-10', 'Jacqueline Lane', '780 Elka Place', null, 'Cleveland', 'Ohio', '44105', 'United States', 9.12, 'Check', '2016-11-30', 'On Hold') +,(4574, 220, 65, '2016-06-26', '2016-06-25', 'Betty Harrison', '23089 Kensington Junction', null, 'Greensboro', 'North Carolina', '27404', 'United States', 5.63, 'Check', '2016-03-30', 'Complete') +,(4575, 212, 81, '2016-04-28', '2016-10-19', 'Robin Bradley', '7895 Weeping Birch Plaza', null, 'Waterbury', 'Connecticut', '06721', 'United States', 7.34, 'Cash', '2017-01-25', 'On Hold') +,(4576, 216, 13, '2017-02-24', '2016-07-18', 'Ralph Bailey', '4019 Harper Park', null, 'Sacramento', 'California', '94291', 'United States', 6.77, 'Cash', '2017-02-02', 'New') +,(4577, 203, 43, '2016-09-24', '2016-11-18', 'Melissa Ross', '775 Lyons Road', null, 'Bridgeport', 'Connecticut', '06606', 'United States', 1.64, 'Check', '2016-07-23', 'Shipped') +,(4578, 212, 53, '2016-07-05', '2016-06-19', 'Joan Russell', '0 Kings Terrace', null, 'Bloomington', 'Illinois', '61709', 'United States', 4.66, 'Card', '2016-04-09', 'New') +,(4579, 214, 17, '2016-10-01', '2016-10-18', 'Benjamin George', '40131 Ronald Regan Road', null, 'Washington', 'District of Columbia', '20525', 'United States', 8.04, 'Check', '2016-06-16', 'Complete') +,(4580, 207, 69, '2016-04-19', '2017-02-09', 'Katherine Stone', '37483 Melrose Parkway', null, 'Fresno', 'California', '93794', 'United States', 6.7, 'Check', '2017-02-08', 'Complete') +,(4581, 218, 28, '2017-03-04', '2016-11-25', 'Ernest Cruz', '872 Nancy Street', null, 'Pompano Beach', 'Florida', '33069', 'United States', 5.81, 'Cash', '2016-04-21', 'On Hold') +,(4582, 217, 32, '2017-03-16', '2016-06-08', 'Joshua Edwards', '72309 Elmside Point', null, 'San Francisco', 'California', '94110', 'United States', 2.49, 'Cash', '2016-04-01', 'On Hold') +,(4583, 219, 83, '2017-01-24', '2016-07-25', 'Justin Mills', '88350 Wayridge Hill', null, 'Charleston', 'West Virginia', '25326', 'United States', 6.03, 'Card', '2016-10-07', 'New') +,(4584, 208, 45, '2016-10-18', '2016-05-13', 'Kathleen Gibson', '25 Carpenter Lane', null, 'Reno', 'Nevada', '89505', 'United States', 5.41, 'Check', '2016-08-21', 'Shipped') +,(4585, 216, 71, '2016-09-19', '2016-10-15', 'Ruby Bennett', '1 Muir Pass', null, 'Las Vegas', 'Nevada', '89135', 'United States', 2.5, 'Cash', '2016-11-29', 'On Hold') +,(4586, 214, 48, '2016-08-07', '2016-08-12', 'Richard Robinson', '1125 Melvin Terrace', null, 'Bethesda', 'Maryland', '20816', 'United States', 4.02, 'Card', '2017-01-09', 'Complete') +,(4587, 212, 62, '2016-12-17', '2017-01-23', 'Debra Sanchez', '534 Stoughton Lane', null, 'Johnstown', 'Pennsylvania', '15906', 'United States', 8.78, 'Cash', '2016-08-07', 'Shipped') +,(4588, 216, 30, '2016-10-24', '2016-12-21', 'Willie Dean', '680 Northview Circle', null, 'Huntington', 'West Virginia', '25775', 'United States', 8.43, 'Card', '2017-03-12', 'New') +,(4589, 210, 10, '2017-01-01', '2016-09-22', 'Christina Kelley', '8706 Sundown Street', null, 'Peoria', 'Illinois', '61635', 'United States', 4.24, 'Cash', '2017-02-08', 'On Hold') +,(4590, 205, 6 , '2016-11-29', '2017-02-23', 'Russell Montgomery', '977 Packers Drive', null, 'Charlotte', 'North Carolina', '28247', 'United States', 2.87, 'Cash', '2016-05-30', 'Complete') +,(4591, 206, 15, '2016-03-28', '2017-02-23', 'Edward Cunningham', '283 Bultman Way', null, 'Jacksonville', 'Florida', '32277', 'United States', 6.55, 'Check', '2017-03-10', 'Shipped') +,(4592, 209, 82, '2016-12-20', '2016-09-07', 'Michael Chavez', '00 Oak Avenue', null, 'Young America', 'Minnesota', '55551', 'United States', 8.22, 'Check', '2016-04-19', 'On Hold') +,(4593, 204, 24, '2017-03-13', '2016-08-30', 'David White', '506 Nevada Circle', null, 'Portland', 'Maine', '04109', 'United States', 1.11, 'Card', '2017-01-13', 'On Hold') +,(4594, 206, 27, '2016-09-13', '2017-03-12', 'Cheryl Vasquez', '9070 Di Loreto Court', null, 'Van Nuys', 'California', '91499', 'United States', 7.42, 'Card', '2017-02-25', 'On Hold') +,(4595, 211, 94, '2016-07-03', '2016-05-08', 'Charles Garrett', '1337 Hooker Trail', null, 'Honolulu', 'Hawaii', '96810', 'United States', 9.57, 'Check', '2016-10-04', 'Shipped') +,(4596, 216, 56, '2016-07-08', '2017-02-28', 'Michelle Butler', '1 Magdeline Lane', null, 'Orlando', 'Florida', '32813', 'United States', 7.05, 'Check', '2016-07-12', 'New') +,(4597, 217, 26, '2016-09-24', '2016-10-05', 'Howard Reyes', '3677 Donald Alley', null, 'Carol Stream', 'Illinois', '60351', 'United States', 7.62, 'Cash', '2017-02-08', 'Complete') +,(4598, 212, 76, '2016-04-13', '2016-08-10', 'Eugene Kelly', '838 Becker Plaza', null, 'Laredo', 'Texas', '78044', 'United States', 4.9, 'Check', '2016-10-23', 'New') +,(4599, 208, 29, '2016-04-16', '2016-05-15', 'Jimmy Mcdonald', '0 Dayton Place', null, 'Rochester', 'New York', '14646', 'United States', 1.56, 'Check', '2017-01-14', 'Complete') +,(4600, 208, 2 , '2016-04-26', '2016-04-06', 'Stephen Jacobs', '7131 Scoville Terrace', null, 'Phoenix', 'Arizona', '85020', 'United States', 4.52, 'Cash', '2017-01-22', 'On Hold'); + + + + +/* Order details */ +insert into order_items (order_id, product_id, quantity, unit_price, discount, order_item_status, date_allocated) values + (4001, 608, 1 , 97.34, 8.73, 'Allocated', '2017-01-15') +,(4001, 611, 2 , 58.46, 4.36, 'No Stock' , '2016-09-21') +,(4001, 616, 2 , 58.46, 4.36, 'No Stock' , '2016-09-21') +,(4001, 613, 2 , 58.46, 4.36, 'No Stock' , '2016-09-21') +,(4001, 615, 2 , 58.46, 4.36, 'No Stock' , '2016-09-21') +,(4002, 604, 3 , 88.97, 2.86, 'On Order' , '2016-12-15') +,(4002, 610, 4 , 37.19, 8.65, 'Allocated', '2016-10-12') +,(4002, 615, 4 , 37.19, 8.65, 'Allocated', '2016-10-12') +,(4003, 609, 8 , 92.87, 4.01, 'No Stock' , '2016-06-15') +,(4003, 612, 7 , 87.15, 3.54, 'No Stock' , '2017-02-09') +,(4004, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4004, 620, 2 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4004, 611, 4 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4004, 612, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4005, 618, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4005, 619, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4005, 620, 2 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4006, 617, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4006, 618, 2 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4006, 607, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4007, 617, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4007, 610, 2 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4007, 612, 5 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4008, 612, 1 , 57.2 , 8.94, 'Allocated', '2017-01-13') +,(4008, 615, 3 , 57.2 , 8.94, 'Allocated', '2017-01-13') +,(4008, 611, 1 , 57.2 , 8.94, 'Allocated', '2017-01-13') +,(4009, 605, 6 , 62.16, 5.68, 'No Stock' , '2017-02-13') +,(4009, 610, 6 , 19.31, 5.0 , 'No Stock' , '2016-09-16') +,(4009, 615, 9 , 51.21, 4.48, 'Allocated', '2016-10-18') +,(4010, 601, 1 , 32.18, 9.41, 'On Order' , '2016-03-17') +,(4010, 602, 1 , 31.35, 7.18, 'No Stock' , '2016-12-30') +,(4010, 603, 10, 24.24, 2.76, 'Allocated', '2016-07-05') +,(4010, 610, 6 , 9.09 , 3.02, 'On Order' , '2016-07-17') +,(4011, 604, 10, 58.25, 9.3 , 'No Stock' , '2016-04-04') +,(4011, 606, 5 , 73.34, 1.76, 'Allocated', '2016-06-30') +,(4011, 608, 3 , 95.07, 4.6 , 'On Order' , '2016-06-04') +,(4011, 615, 9 , 20.84, 3.93, 'Allocated', '2016-06-10') +,(4012, 604, 5 , 19.82, 9.97, 'No Stock' , '2016-09-21') +,(4012, 601, 3 , 19.82, 9.97, 'No Stock' , '2016-09-21') +,(4012, 610, 3 , 19.82, 9.97, 'No Stock' , '2016-09-21') +,(4013, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4013, 604, 2 , 19.82, 9.97, 'No Stock' , '2016-09-21') +,(4013, 606, 5 , 19.82, 9.97, 'No Stock' , '2016-09-21') +,(4014, 601, 3 , 37.57, 4.99, 'Allocated', '2016-08-21') +,(4015, 611, 8 , 95.27, 6.62, 'Allocated', '2017-03-13') +,(4015, 612, 2 , 89.63, 4.14, 'Allocated', '2016-04-07') +,(4015, 615, 8 , 69.03, 1.11, 'On Order' , '2016-08-15') +,(4016, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4016, 611, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4016, 612, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4017, 605, 6 , 75.88, 2.1 , 'On Order' , '2017-02-15') +,(4017, 610, 4 , 26.43, 7.18, 'On Order' , '2016-04-30') +,(4017, 619, 6 , 77.91, 9.26, 'No Stock' , '2016-04-02') +,(4018, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4019, 615, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4020, 614, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4021, 604, 3 , 20.14, 8.54, 'No Stock' , '2016-06-26') +,(4022, 614, 7 , 41.61, 4.62, 'On Order' , '2016-09-09') +,(4022, 619, 1 , 10.45, 2.56, 'On Order' , '2016-10-18') +,(4023, 607, 6 , 7.68 , 5.59, 'On Order' , '2016-11-15') +,(4023, 611, 7 , 89.4 , 1.71, 'No Stock' , '2016-04-03') +,(4024, 613, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4024, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4024, 608, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4024, 609, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4025, 612, 6 , 81.24, 3.52, 'Allocated', '2016-04-25') +,(4025, 614, 4 , 14.07, 2.58, 'On Order' , '2016-09-11') +,(4026, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4026, 618, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4027, 611, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4027, 612, 3 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4027, 613, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4028, 605, 5 , 95.04, 7.82, 'On Order' , '2016-07-24') +,(4028, 615, 8 , 74.56, 1.78, 'Allocated', '2016-12-09') +,(4029, 604, 1 , 11.06, 5.37, 'On Order' , '2016-11-26') +,(4029, 603, 1 , 11.06, 5.37, 'On Order' , '2016-11-26') +,(4029, 607, 1 , 11.06, 5.37, 'On Order' , '2016-11-26') +,(4030, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4030, 620, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4030, 619, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4031, 605, 7 , 75.42, 2.92, 'No Stock' , '2017-02-12') +,(4031, 608, 7 , 75.42, 2.92, 'No Stock' , '2017-02-12') +,(4031, 609, 7 , 75.42, 2.92, 'No Stock' , '2017-02-12') +,(4031, 615, 7 , 75.42, 2.92, 'No Stock' , '2017-02-12') +,(4032, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4032, 612, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4032, 611, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4032, 619, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4033, 615, 4 , 45.55, 6.19, 'Allocated', '2016-05-09') +,(4033, 609, 3 , 45.55, 6.19, 'Allocated', '2016-05-09') +,(4033, 620, 1 , 45.55, 6.19, 'Allocated', '2016-05-09') +,(4034, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4034, 620, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4034, 609, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4035, 613, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4035, 614, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4035, 619, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4036, 604, 1 , 46.63, 4.25, 'No Stock' , '2016-05-04') +,(4036, 605, 6 , 66.75, 9.97, 'Allocated', '2017-02-25') +,(4037, 615, 2 , 44.76, 7.22, 'On Order' , '2017-03-01') +,(4037, 612, 2 , 44.76, 7.22, 'On Order' , '2017-03-01') +,(4038, 602, 2 , 13.25, 7.66, 'On Order' , '2016-07-13') +,(4038, 620, 3 , 13.25, 7.66, 'On Order' , '2016-07-13') +,(4039, 609, 1 , 99.68, 6.09, 'No Stock' , '2016-07-24') +,(4039, 619, 3 , 99.68, 6.09, 'No Stock' , '2016-07-24') +,(4039, 620, 1 , 99.68, 6.09, 'No Stock' , '2016-07-24') +,(4040, 612, 2 , 79.64, 6.72, 'Allocated', '2016-04-24') +,(4040, 620, 2 , 79.64, 6.72, 'Allocated', '2016-04-24') +,(4041, 615, 9 , 42.79, 8.92, 'No Stock' , '2016-03-31') +,(4041, 612, 2 , 42.79, 8.92, 'No Stock' , '2016-03-31') +,(4041, 620, 1 , 42.79, 8.92, 'No Stock' , '2016-03-31') +,(4042, 617, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4042, 613, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4042, 620, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4043, 611, 7 , 87.95, 8.57, 'No Stock' , '2016-06-18') +,(4043, 619, 3 , 87.95, 8.57, 'No Stock' , '2016-06-18') +,(4043, 620, 1 , 87.95, 8.57, 'No Stock' , '2016-06-18') +,(4044, 602, 8 , 47.3 , 3.26, 'On Order' , '2016-11-05') +,(4044, 612, 3 , 79.42, 6.56, 'On Order' , '2017-02-11') +,(4045, 603, 3 , 31.01, 7.2 , 'No Stock' , '2016-11-11') +,(4045, 604, 10, 43.54, 6.8 , 'Allocated', '2016-11-13') +,(4045, 608, 7 , 15.2 , 3.58, 'Allocated', '2017-01-18') +,(4046, 611, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4047, 619, 2 , 81.11, 8.77, 'No Stock' , '2016-06-17') +,(4047, 620, 8 , 1.54 , 6.85, 'No Stock' , '2016-05-05') +,(4048, 605, 7 , 13.52, 2.44, 'On Order' , '2016-07-06') +,(4049, 603, 7 , 40.99, 5.77, 'Allocated', '2017-02-22') +,(4049, 609, 10, 90.45, 2.75, 'Allocated', '2017-01-26') +,(4049, 612, 10, 24.28, 9.85, 'No Stock' , '2016-10-01') +,(4050, 606, 4 , 27.84, 1.49, 'No Stock' , '2016-12-18') +,(4050, 607, 2 , 72.72, 3.08, 'On Order' , '2016-04-24') +,(4050, 612, 2 , 76.85, 5.15, 'No Stock' , '2017-02-25') +,(4051, 603, 1 , 57.6 , 1.77, 'Allocated', '2016-07-02') +,(4052, 605, 9 , 50.74, 6.47, 'No Stock' , '2016-05-22') +,(4053, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4054, 601, 10, 55.48, 9.19, 'On Order' , '2016-07-12') +,(4055, 606, 10, 57.17, 3.06, 'No Stock' , '2016-11-20') +,(4056, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4057, 609, 1 , 79.3 , 9.42, 'On Order' , '2016-10-01') +,(4057, 610, 5 , 41.21, 5.55, 'No Stock' , '2016-07-20') +,(4057, 618, 3 , 68.99, 6.42, 'On Order' , '2016-08-19') +,(4058, 604, 6 , 36.78, 6.96, 'Allocated', '2016-05-20') +,(4058, 619, 6 , 79.01, 4.3 , 'Allocated', '2016-06-19') +,(4059, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4060, 603, 10, 40.38, 2.1 , 'On Order' , '2017-02-05') +,(4060, 604, 9 , 41.98, 1.46, 'Allocated', '2017-01-17') +,(4061, 605, 1 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4061, 602, 1 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4061, 603, 1 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4062, 604, 1 , 71.77, 4.91, 'No Stock' , '2016-11-20') +,(4062, 605, 2 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4062, 607, 1 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4063, 608, 1 , 62.85, 4.62, 'Allocated', '2016-03-25') +,(4063, 605, 4 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4063, 607, 1 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4064, 615, 1 , 68.27, 6.79, 'No Stock' , '2016-07-06') +,(4064, 602, 2 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4064, 603, 5 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4064, 605, 1 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4065, 610, 5 , 99.76, 1.78, 'Allocated', '2016-09-23') +,(4066, 605, 1 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4066, 604, 9 , 2.63 , 7.42, 'Allocated', '2016-08-12') +,(4066, 615, 7 , 25.14, 7.22, 'No Stock' , '2016-03-27') +,(4067, 618, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4068, 602, 4 , 12.67, 5.17, 'Allocated', '2016-08-30') +,(4068, 603, 1 , 87.81, 1.02, 'On Order' , '2016-10-12') +,(4069, 620, 7 , 89.85, 3.49, 'Allocated', '2017-02-22') +,(4070, 615, 5 , 94.08, 4.09, 'On Order' , '2017-01-31') +,(4071, 616, 1, 10.00, 1.00, 'Allocated', '2016-12-14') +,(4072, 601, 3 , 89.95, 9.61, 'No Stock' , '2016-11-25') +,(4072, 612, 5 , 34.51, 5.99, 'No Stock' , '2016-05-25') +,(4073, 613, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4074, 606, 10, 98.2 , 3.63, 'On Order' , '2016-04-30') +,(4075, 605, 8 , 69.36, 9.16, 'On Order' , '2016-07-19') +,(4075, 606, 1 , 3.95 , 8.66, 'On Order' , '2016-04-09') +,(4076, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4077, 602, 10, 90.58, 5.92, 'No Stock' , '2016-06-23') +,(4077, 609, 1 , 8.25 , 3.74, 'No Stock' , '2016-12-07') +,(4077, 615, 9 , 86.2 , 4.5 , 'Allocated', '2017-03-10') +,(4078, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4078, 612, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4078, 618, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4079, 615, 7 , 1.95 , 1.76, 'On Order' , '2017-03-04') +,(4079, 613, 2 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4079, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4080, 608, 5 , 26.84, 9.03, 'On Order' , '2016-11-13') +,(4080, 609, 3 , 41.76, 4.08, 'Allocated', '2016-09-10') +,(4081, 604, 9 , 5.49 , 8.45, 'On Order' , '2016-10-21') +,(4082, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4083, 602, 1 , 44.85, 5.16, 'No Stock' , '2016-09-16') +,(4084, 604, 4 , 58.27, 4.09, 'Allocated', '2016-08-12') +,(4085, 605, 8 , 93.54, 7.49, 'On Order' , '2016-11-24') +,(4086, 615, 2 , 94.02, 1.63, 'No Stock' , '2016-09-01') +,(4087, 601, 2 , 79.39, 3.86, 'No Stock' , '2016-07-13') +,(4088, 615, 3 , 14.03, 3.74, 'Allocated', '2016-11-15') +,(4089, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4090, 611, 4 , 46.11, 1.53, 'No Stock' , '2016-07-25') +,(4091, 613, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4092, 602, 5 , 42.68, 7.92, 'On Order' , '2016-09-09') +,(4093, 615, 8 , 75.27, 5.92, 'No Stock' , '2016-07-09') +,(4094, 605, 7 , 91.05, 4.52, 'On Order' , '2017-02-21') +,(4095, 602, 6 , 58.5 , 9.62, 'On Order' , '2017-02-26') +,(4095, 604, 3 , 80.13, 4.11, 'No Stock' , '2016-12-01') +,(4095, 608, 1 , 23.96, 5.54, 'No Stock' , '2016-03-27') +,(4096, 601, 4 , 9.84 , 5.33, 'No Stock' , '2016-04-18') +,(4097, 605, 4 , 45.03, 5.61, 'On Order' , '2016-05-13') +,(4097, 606, 3 , 41.39, 3.59, 'On Order' , '2016-11-29') +,(4098, 607, 8 , 11.86, 2.74, 'No Stock' , '2016-11-23') +,(4099, 606, 2 , 54.09, 5.84, 'On Order' , '2016-10-08') +,(4100, 608, 3 , 6.62 , 1.25, 'Allocated', '2016-11-16') +,(4101, 617, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4102, 608, 1 , 2.54 , 9.62, 'On Order' , '2016-10-01') +,(4102, 609, 9 , 92.56, 5.98, 'On Order' , '2016-10-14') +,(4102, 610, 10, 26.81, 5.9 , 'On Order' , '2016-08-20') +,(4103, 606, 6 , 71.32, 9.88, 'No Stock' , '2016-09-10') +,(4103, 608, 1 , 73.91, 9.79, 'No Stock' , '2016-12-26') +,(4104, 603, 9 , 33.85, 4.08, 'Allocated', '2017-03-02') +,(4105, 601, 5 , 49.17, 1.99, 'On Order' , '2016-11-11') +,(4105, 606, 9 , 93.8 , 4.48, 'Allocated', '2017-01-06') +,(4106, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4107, 603, 2 , 24.95, 3.71, 'On Order' , '2016-07-20') +,(4107, 604, 5 , 43.75, 1.39, 'No Stock' , '2017-01-03') +,(4107, 608, 1 , 49.09, 8.72, 'Allocated', '2016-12-19') +,(4107, 616, 8 , 26.78, 1.21, 'On Order' , '2016-09-23') +,(4108, 604, 8 , 36.89, 3.04, 'On Order' , '2017-01-01') +,(4108, 619, 1 , 6.43 , 6.66, 'Allocated', '2016-05-03') +,(4109, 604, 9 , 89.19, 9.43, 'No Stock' , '2016-10-21') +,(4109, 609, 2 , 3.71 , 9.12, 'No Stock' , '2016-10-23') +,(4110, 605, 3 , 61.65, 7.86, 'On Order' , '2016-08-05') +,(4110, 606, 2 , 63.62, 7.4 , 'Allocated', '2016-06-07') +,(4111, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4111, 612, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4111, 613, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4112, 607, 5 , 63.7 , 9.44, 'On Order' , '2017-01-01') +,(4112, 610, 1 , 22.54, 8.3 , 'On Order' , '2016-04-09') +,(4113, 604, 6 , 86.01, 4.4 , 'Allocated', '2017-01-05') +,(4113, 611, 5 , 39.64, 4.58, 'Allocated', '2017-02-26') +,(4113, 615, 3 , 22.49, 3.61, 'Allocated', '2016-08-24') +,(4113, 619, 6 , 7.6 , 6.63, 'On Order' , '2016-05-01') +,(4114, 610, 6 , 3.77 , 4.79, 'Allocated', '2017-01-18') +,(4114, 608, 2 , 3.77 , 4.79, 'Allocated', '2017-01-18') +,(4114, 609, 3 , 3.77 , 4.79, 'Allocated', '2017-01-18') +,(4115, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4115, 620, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4116, 610, 5 , 54.21, 9.53, 'On Order' , '2016-05-11') +,(4116, 620, 3 , 54.21, 9.53, 'On Order' , '2016-05-11') +,(4116, 615, 1 , 54.21, 9.53, 'On Order' , '2016-05-11') +,(4117, 603, 7 , 91.81, 4.35, 'On Order' , '2016-04-18') +,(4117, 610, 9 , 79.15, 6.8 , 'Allocated', '2017-02-09') +,(4118, 611, 8 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4118, 615, 3 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4118, 612, 1 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4119, 611, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4119, 615, 8 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4119, 612, 4 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4120, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4120, 612, 2 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4120, 611, 8 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4121, 602, 3 , 7.09 , 6.48, 'No Stock' , '2016-06-03') +,(4121, 612, 2 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4121, 611, 1 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4122, 606, 5 , 44.99, 1.66, 'No Stock' , '2016-05-08') +,(4122, 611, 2 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4122, 612, 6 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4123, 607, 10, 4.78 , 1.32, 'Allocated', '2016-12-28') +,(4124, 604, 1 , 18.79, 6.75, 'On Order' , '2017-01-05') +,(4125, 605, 9 , 59.37, 1.61, 'On Order' , '2016-07-24') +,(4125, 608, 1 , 72.49, 2.72, 'On Order' , '2016-08-22') +,(4126, 610, 10, 13.83, 1.15, 'On Order' , '2016-09-29') +,(4126, 615, 10, 71.77, 9.08, 'No Stock' , '2017-02-24') +,(4127, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4128, 605, 6 , 94.61, 7.16, 'No Stock' , '2017-02-09') +,(4128, 616, 3 , 4.67 , 2.72, 'On Order' , '2016-04-06') +,(4129, 610, 5 , 73.89, 8.17, 'On Order' , '2016-04-30') +,(4130, 608, 6 , 47.42, 8.39, 'No Stock' , '2017-02-27') +,(4131, 602, 5 , 28.62, 6.07, 'No Stock' , '2016-03-21') +,(4132, 602, 7 , 38.86, 3.58, 'Allocated', '2016-06-21') +,(4132, 604, 4 , 89.39, 2.36, 'No Stock' , '2016-12-20') +,(4132, 605, 5 , 29.97, 9.78, 'No Stock' , '2016-08-03') +,(4133, 611, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4133, 613, 2 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4133, 615, 4 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4134, 606, 1 , 73.57, 3.21, 'Allocated', '2016-04-07') +,(4134, 608, 1 , 65.61, 8.68, 'On Order' , '2017-01-14') +,(4135, 603, 2 , 7.24 , 2.61, 'Allocated', '2017-01-02') +,(4135, 607, 6 , 15.99, 6.23, 'No Stock' , '2016-12-16') +,(4135, 609, 6 , 26.55, 2.9 , 'On Order' , '2016-11-25') +,(4135, 612, 8 , 17.99, 9.59, 'No Stock' , '2016-03-25') +,(4136, 606, 10, 16.82, 8.15, 'On Order' , '2016-06-22') +,(4137, 605, 2 , 39.96, 6.08, 'On Order' , '2016-05-22') +,(4138, 620, 6 , 4.6 , 3.68, 'Allocated', '2016-09-17') +,(4139, 601, 4 , 87.74, 7.37, 'No Stock' , '2016-11-25') +,(4140, 603, 10, 90.31, 6.8 , 'On Order' , '2016-05-23') +,(4140, 615, 8 , 82.86, 2.49, 'On Order' , '2016-12-24') +,(4141, 609, 7 , 20.28, 1.51, 'Allocated', '2017-02-10') +,(4142, 608, 7 , 55.47, 8.32, 'No Stock' , '2016-07-07') +,(4142, 619, 5 , 75.63, 1.64, 'Allocated', '2016-08-02') +,(4143, 606, 3 , 99.61, 4.9 , 'No Stock' , '2016-10-25') +,(4144, 604, 6 , 80.75, 3.9 , 'Allocated', '2016-09-09') +,(4145, 603, 3 , 57.97, 8.04, 'On Order' , '2016-06-17') +,(4146, 611, 8 , 69.7 , 6.14, 'On Order' , '2016-04-15') +,(4147, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4148, 602, 4 , 67.89, 1.73, 'Allocated', '2016-03-26') +,(4149, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4150, 615, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4151, 617, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4151, 618, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4152, 608, 10, 97.82, 9.97, 'No Stock' , '2016-07-11') +,(4152, 620, 10, 97.82, 9.97, 'No Stock' , '2016-07-11') +,(4153, 615, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4153, 618, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4153, 601, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4153, 613, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4154, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4154, 604, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4155, 606, 7 , 42.62, 2.57, 'No Stock' , '2017-02-11') +,(4155, 607, 2 , 83.04, 5.25, 'On Order' , '2016-09-01') +,(4155, 610, 6 , 90.56, 6.31, 'On Order' , '2016-10-18') +,(4156, 615, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4156, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4156, 601, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4157, 603, 9 , 93.09, 5.35, 'Allocated', '2016-08-03') +,(4157, 607, 6 , 40.05, 3.9 , 'On Order' , '2017-01-13') +,(4158, 612, 1 , 17.5 , 6.29, 'Allocated', '2016-04-14') +,(4158, 611, 1 , 17.5 , 6.29, 'Allocated', '2016-04-14') +,(4159, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4159, 612, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4160, 610, 8 , 42.67, 5.88, 'No Stock' , '2017-01-04') +,(4160, 620, 10, 87.78, 4.28, 'Allocated', '2016-11-20') +,(4161, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4161, 611, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4162, 613, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4162, 620, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4163, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4163, 612, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4163, 611, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4164, 607, 6 , 80.56, 4.32, 'On Order' , '2016-08-17') +,(4164, 608, 6 , 80.56, 4.32, 'On Order' , '2016-08-17') +,(4164, 617, 6 , 80.56, 4.32, 'On Order' , '2016-08-17') +,(4165, 604, 8 , 72.67, 7.56, 'On Order' , '2016-08-09') +,(4165, 603, 8 , 72.67, 7.56, 'On Order' , '2016-08-09') +,(4165, 614, 8 , 72.67, 7.56, 'On Order' , '2016-08-09') +,(4166, 601, 3 , 34.36, 9.92, 'No Stock' , '2016-09-01') +,(4166, 602, 10, 33.99, 5.76, 'Allocated', '2016-05-26') +,(4167, 603, 5 , 58.2 , 1.14, 'Allocated', '2016-06-20') +,(4167, 608, 1 , 20.01, 6.24, 'No Stock' , '2017-01-05') +,(4168, 601, 1 , 59.45, 7.44, 'On Order' , '2016-09-06') +,(4168, 605, 1 , 59.45, 7.44, 'On Order' , '2016-09-06') +,(4169, 604, 2 , 93.43, 2.26, 'No Stock' , '2017-01-16') +,(4169, 609, 2 , 93.43, 2.26, 'No Stock' , '2017-01-16') +,(4169, 607, 2 , 93.43, 2.26, 'No Stock' , '2017-01-16') +,(4170, 607, 10, 68.27, 9.02, 'No Stock' , '2017-02-11') +,(4170, 620, 10, 68.27, 9.02, 'No Stock' , '2017-02-11') +,(4171, 610, 10, 49.38, 3.71, 'Allocated', '2016-04-25') +,(4171, 601, 10, 49.38, 3.71, 'Allocated', '2016-04-25') +,(4171, 611, 10, 49.38, 3.71, 'Allocated', '2016-04-25') +,(4171, 613, 10, 49.38, 3.71, 'Allocated', '2016-04-25') +,(4171, 615, 10, 49.38, 3.71, 'Allocated', '2016-04-25') +,(4172, 606, 6 , 88.26, 2.95, 'No Stock' , '2016-04-11') +,(4172, 609, 7 , 60.97, 1.12, 'Allocated', '2016-10-14') +,(4173, 601, 10, 11.22, 9.03, 'On Order' , '2017-01-26') +,(4173, 603, 10, 11.22, 9.03, 'On Order' , '2017-01-26') +,(4173, 605, 10, 11.22, 9.03, 'On Order' , '2017-01-26') +,(4174, 607, 8 , 53.95, 6.31, 'No Stock' , '2016-04-30') +,(4174, 612, 2 , 13.56, 7.15, 'No Stock' , '2016-07-08') +,(4175, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4175, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4175, 620, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4176, 615, 2 , 70.24, 1.09, 'Allocated', '2017-01-21') +,(4176, 616, 2 , 70.24, 1.09, 'Allocated', '2017-01-21') +,(4177, 601, 2 , 17.86, 2.99, 'Allocated', '2016-05-07') +,(4177, 604, 8 , 18.39, 6.73, 'On Order' , '2016-04-05') +,(4178, 605, 9 , 23.59, 8.82, 'Allocated', '2016-09-11') +,(4178, 607, 9 , 62.59, 7.88, 'No Stock' , '2016-04-18') +,(4179, 614, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4180, 602, 7 , 48.19, 6.05, 'Allocated', '2016-11-30') +,(4180, 603, 1 , 48.19, 6.05, 'Allocated', '2016-11-30') +,(4181, 602, 2 , 64.2 , 4.74, 'Allocated', '2016-08-16') +,(4181, 603, 3 , 41.45, 2.49, 'Allocated', '2016-04-18') +,(4181, 604, 5 , 86.42, 6.42, 'No Stock' , '2016-05-03') +,(4182, 611, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4183, 615, 1 , 68.34, 8.16, 'On Order' , '2016-12-22') +,(4184, 601, 2 , 95.18, 2.74, 'Allocated', '2016-09-16') +,(4184, 603, 9 , 99.41, 9.44, 'No Stock' , '2016-07-01') +,(4184, 604, 1 , 29.52, 3.48, 'Allocated', '2016-04-02') +,(4185, 602, 2 , 22.84, 5.5 , 'On Order' , '2016-10-20') +,(4185, 611, 10, 34.57, 4.27, 'Allocated', '2017-02-05') +,(4185, 612, 4 , 85.32, 5.03, 'Allocated', '2017-03-14') +,(4185, 619, 9 , 64.97, 1.57, 'No Stock' , '2016-10-19') +,(4186, 605, 2 , 80.08, 7.63, 'On Order' , '2017-01-31') +,(4187, 602, 9 , 87.92, 7.74, 'On Order' , '2016-11-13') +,(4187, 616, 3 , 73.39, 6.52, 'On Order' , '2016-09-15') +,(4188, 604, 8 , 30.36, 1.97, 'No Stock' , '2016-06-05') +,(4188, 605, 5 , 70.95, 6.11, 'On Order' , '2016-03-31') +,(4188, 611, 3 , 23.18, 8.76, 'On Order' , '2016-03-30') +,(4189, 608, 4 , 52.23, 3.08, 'No Stock' , '2016-04-12') +,(4190, 602, 10, 17.3 , 4.18, 'No Stock' , '2016-03-29') +,(4190, 615, 6 , 34.29, 9.45, 'Allocated', '2016-11-01') +,(4191, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4192, 602, 4 , 90.29, 5.09, 'Allocated', '2017-02-14') +,(4192, 605, 8 , 1.03 , 1.28, 'On Order' , '2017-02-14') +,(4192, 615, 1 , 11.61, 7.49, 'No Stock' , '2016-08-11') +,(4193, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4194, 618, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4195, 617, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4196, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4197, 608, 10, 60.36, 3.99, 'On Order' , '2016-10-30') +,(4198, 606, 1 , 58.71, 2.32, 'No Stock' , '2016-06-26') +,(4199, 602, 8 , 12.59, 9.45, 'Allocated', '2016-04-16') +,(4199, 603, 7 , 5.5 , 2.26, 'No Stock' , '2016-11-28') +,(4200, 605, 10, 92.81, 1.0 , 'No Stock' , '2017-03-07') +,(4201, 606, 3 , 46.48, 5.94, 'Allocated', '2016-12-15') +,(4201, 608, 2 , 97.29, 5.87, 'No Stock' , '2016-09-12') +,(4202, 609, 4 , 56.7 , 2.07, 'No Stock' , '2017-03-11') +,(4202, 608, 4 , 56.7 , 2.07, 'No Stock' , '2017-03-11') +,(4203, 610, 2 , 29.12, 6.46, 'No Stock' , '2016-10-27') +,(4203, 609, 4 , 56.7 , 2.07, 'No Stock' , '2017-03-11') +,(4204, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4204, 609, 4 , 56.7 , 2.07, 'No Stock' , '2017-03-11') +,(4205, 610, 4 , 78.23, 5.95, 'No Stock' , '2016-06-21') +,(4205, 609, 4 , 56.7 , 2.07, 'No Stock' , '2017-03-11') +,(4206, 603, 2 , 40.49, 6.94, 'On Order' , '2017-02-23') +,(4206, 619, 6 , 80.19, 3.28, 'No Stock' , '2017-01-21') +,(4207, 604, 9 , 84.48, 7.01, 'No Stock' , '2016-08-17') +,(4207, 605, 9 , 41.79, 1.55, 'On Order' , '2016-06-27') +,(4207, 610, 5 , 12.3 , 9.51, 'On Order' , '2016-05-17') +,(4208, 603, 7 , 37.26, 3.68, 'Allocated', '2016-03-30') +,(4208, 605, 5 , 82.65, 2.76, 'On Order' , '2016-12-11') +,(4208, 607, 1 , 84.88, 8.67, 'No Stock' , '2016-04-28') +,(4208, 609, 1 , 88.01, 1.98, 'Allocated', '2016-10-04') +,(4208, 610, 6 , 88.85, 4.2 , 'No Stock' , '2016-04-19') +,(4209, 606, 6 , 46.31, 8.98, 'Allocated', '2016-04-20') +,(4210, 603, 2 , 92.12, 8.78, 'No Stock' , '2016-12-11') +,(4210, 609, 7 , 70.37, 6.89, 'Allocated', '2016-06-23') +,(4211, 614, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4212, 613, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4213, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4214, 608, 3 , 37.43, 5.18, 'Allocated', '2016-05-15') +,(4214, 610, 9 , 35.48, 7.16, 'On Order' , '2017-02-13') +,(4214, 611, 7 , 84.99, 8.17, 'No Stock' , '2016-07-08') +,(4215, 610, 5 , 4.35 , 2.65, 'Allocated', '2016-07-24') +,(4216, 606, 3 , 79.91, 8.92, 'Allocated', '2016-05-02') +,(4216, 608, 8 , 45.75, 3.7 , 'Allocated', '2017-02-24') +,(4216, 615, 1 , 55.11, 8.94, 'No Stock' , '2016-05-06') +,(4217, 605, 5 , 40.67, 3.31, 'On Order' , '2016-11-09') +,(4217, 610, 5 , 20.0 , 8.58, 'On Order' , '2016-07-27') +,(4218, 615, 7 , 34.14, 8.03, 'Allocated', '2016-11-12') +,(4218, 619, 9 , 62.61, 5.74, 'On Order' , '2016-11-08') +,(4219, 604, 9 , 46.24, 2.42, 'No Stock' , '2016-10-31') +,(4219, 613, 7 , 26.63, 3.9 , 'No Stock' , '2016-12-04') +,(4219, 619, 1 , 98.58, 7.38, 'No Stock' , '2016-08-06') +,(4220, 604, 5 , 66.78, 9.28, 'No Stock' , '2016-10-09') +,(4220, 609, 6 , 62.82, 9.71, 'No Stock' , '2016-04-06') +,(4221, 602, 8 , 8.44 , 1.85, 'Allocated', '2016-11-25') +,(4222, 601, 10, 84.14, 2.59, 'No Stock' , '2016-06-25') +,(4222, 604, 9 , 39.15, 8.12, 'No Stock' , '2016-09-27') +,(4223, 602, 2 , 74.35, 9.94, 'Allocated', '2016-04-18') +,(4223, 611, 4 , 58.85, 6.75, 'No Stock' , '2017-03-04') +,(4224, 618, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4225, 605, 7 , 88.08, 8.69, 'On Order' , '2016-11-13') +,(4226, 606, 1 , 84.22, 3.54, 'On Order' , '2017-01-19') +,(4226, 608, 4 , 97.1 , 4.73, 'On Order' , '2016-04-25') +,(4227, 606, 9 , 74.37, 1.85, 'On Order' , '2016-12-19') +,(4227, 607, 9 , 74.37, 1.85, 'On Order' , '2016-12-19') +,(4228, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4228, 618, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4228, 610, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4229, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4229, 618, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4230, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4230, 618, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4230, 619, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4231, 611, 6 , 36.05, 2.56, 'On Order' , '2017-02-12') +,(4231, 618, 6 , 36.05, 2.56, 'On Order' , '2017-02-12') +,(4232, 615, 8 , 16.99, 7.26, 'No Stock' , '2016-11-28') +,(4232, 618, 8 , 16.99, 7.26, 'No Stock' , '2016-11-28') +,(4233, 608, 6 , 70.71, 1.75, 'Allocated', '2016-09-29') +,(4233, 610, 6 , 70.71, 1.75, 'Allocated', '2016-09-29') +,(4233, 618, 6 , 70.71, 1.75, 'Allocated', '2016-09-29') +,(4234, 604, 5 , 15.26, 9.54, 'No Stock' , '2016-04-06') +,(4234, 619, 5 , 15.26, 9.54, 'No Stock' , '2016-04-06') +,(4235, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4235, 619, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4236, 607, 8 , 46.97, 4.9 , 'Allocated', '2017-02-16') +,(4236, 617, 8 , 46.97, 4.9 , 'Allocated', '2017-02-16') +,(4236, 620, 8 , 46.97, 4.9 , 'Allocated', '2017-02-16') +,(4237, 602, 1 , 27.79, 8.84, 'No Stock' , '2016-11-07') +,(4237, 620, 1 , 27.79, 8.84, 'No Stock' , '2016-11-07') +,(4238, 602, 3 , 32.5 , 2.63, 'No Stock' , '2016-04-09') +,(4238, 608, 8 , 88.3 , 7.59, 'On Order' , '2016-08-18') +,(4239, 606, 7 , 99.65, 2.31, 'Allocated', '2017-03-04') +,(4239, 616, 7 , 99.65, 2.31, 'Allocated', '2017-03-04') +,(4240, 606, 10, 43.66, 2.48, 'No Stock' , '2017-02-05') +,(4240, 609, 2 , 56.95, 2.11, 'No Stock' , '2016-11-15') +,(4241, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4241, 618, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4241, 620, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4242, 605, 6 , 52.37, 8.56, 'No Stock' , '2016-06-10') +,(4242, 606, 6 , 52.37, 8.56, 'No Stock' , '2016-06-10') +,(4242, 607, 6 , 52.37, 8.56, 'No Stock' , '2016-06-10') +,(4243, 604, 2 , 6.33 , 1.16, 'No Stock' , '2016-04-09') +,(4243, 614, 2 , 6.33 , 1.16, 'No Stock' , '2016-04-09') +,(4243, 610, 2 , 6.33 , 1.16, 'No Stock' , '2016-04-09') +,(4244, 609, 4 , 67.62, 7.49, 'On Order' , '2016-09-03') +,(4244, 619, 4 , 67.62, 7.49, 'On Order' , '2016-09-03') +,(4244, 620, 4 , 67.62, 7.49, 'On Order' , '2016-09-03') +,(4245, 608, 1 , 32.47, 9.9 , 'Allocated', '2017-03-14') +,(4245, 618, 1 , 32.47, 9.9 , 'Allocated', '2017-03-14') +,(4245, 620, 1 , 32.47, 9.9 , 'Allocated', '2017-03-14') +,(4246, 603, 10, 53.94, 3.85, 'No Stock' , '2016-06-04') +,(4246, 606, 7 , 6.16 , 9.37, 'No Stock' , '2016-07-05') +,(4246, 607, 3 , 27.34, 1.97, 'Allocated', '2016-11-15') +,(4246, 611, 4 , 73.06, 1.26, 'No Stock' , '2017-02-28') +,(4247, 601, 4 , 66.41, 4.54, 'On Order' , '2017-02-26') +,(4247, 605, 2 , 61.24, 5.9 , 'Allocated', '2016-12-15') +,(4248, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4248, 620, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4249, 615, 2 , 74.52, 3.88, 'On Order' , '2016-06-09') +,(4249, 620, 2 , 74.52, 3.88, 'On Order' , '2016-06-09') +,(4249, 609, 2 , 74.52, 3.88, 'On Order' , '2016-06-09') +,(4250, 606, 7 , 63.89, 3.39, 'On Order' , '2016-12-31') +,(4250, 612, 8 , 75.06, 4.19, 'Allocated', '2016-06-26') +,(4251, 602, 1 , 1.75 , 1.73, 'No Stock' , '2016-12-07') +,(4251, 604, 8 , 43.98, 1.58, 'Allocated', '2016-07-28') +,(4252, 606, 4 , 94.24, 1.31, 'No Stock' , '2017-03-14') +,(4252, 619, 10, 41.46, 4.18, 'No Stock' , '2017-03-03') +,(4252, 620, 3 , 29.91, 4.91, 'On Order' , '2016-12-28') +,(4253, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4253, 610, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4254, 610, 3 , 5.01 , 9.93, 'On Order' , '2017-02-03') +,(4254, 620, 2 , 5.01 , 9.93, 'On Order' , '2017-02-03') +,(4254, 612, 3 , 5.01 , 9.93, 'On Order' , '2017-02-03') +,(4255, 610, 7 , 45.49, 8.0 , 'Allocated', '2016-08-01') +,(4255, 611, 7 , 45.49, 8.0 , 'Allocated', '2016-08-01') +,(4256, 604, 9 , 6.74 , 1.84, 'No Stock' , '2016-06-13') +,(4256, 612, 4 , 42.02, 2.86, 'Allocated', '2016-09-19') +,(4256, 620, 2 , 31.71, 4.97, 'Allocated', '2016-10-02') +,(4257, 617, 1, 10.00, 1.00, 'On Order' , '2016-12-14') +,(4257, 610, 1, 10.00, 1.00, 'On Order' , '2016-12-14') +,(4257, 611, 1, 10.00, 1.00, 'On Order' , '2016-12-14') +,(4258, 605, 7 , 22.45, 8.41, 'On Order' , '2016-06-02') +,(4258, 615, 3 , 69.12, 3.65, 'Allocated', '2017-02-27') +,(4258, 619, 4 , 62.32, 2.23, 'Allocated', '2017-02-20') +,(4259, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4260, 603, 1 , 27.68, 1.99, 'Allocated', '2016-09-20') +,(4260, 604, 3 , 59.65, 3.05, 'No Stock' , '2016-12-31') +,(4261, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4262, 602, 4 , 51.73, 3.06, 'Allocated', '2017-01-17') +,(4263, 612, 4 , 18.46, 7.86, 'Allocated', '2016-08-12') +,(4263, 615, 4 , 18.46, 7.86, 'Allocated', '2016-08-12') +,(4263, 616, 4 , 18.46, 7.86, 'Allocated', '2016-08-12') +,(4264, 604, 8 , 82.02, 9.19, 'Allocated', '2016-11-28') +,(4264, 614, 8 , 82.02, 9.19, 'Allocated', '2016-11-28') +,(4265, 618, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4265, 620, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4266, 601, 2 , 66.57, 6.27, 'Allocated', '2016-09-19') +,(4266, 602, 2 , 66.57, 6.27, 'Allocated', '2016-09-19') +,(4267, 601, 4 , 44.78, 6.86, 'No Stock' , '2016-09-27') +,(4267, 610, 4 , 19.08, 6.41, 'No Stock' , '2016-12-24') +,(4268, 611, 1 , 24.72, 8.14, 'Allocated', '2016-06-08') +,(4268, 612, 1 , 24.72, 8.14, 'Allocated', '2016-06-08') +,(4269, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4269, 617, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4269, 618, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4270, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4270, 612, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4270, 620, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4271, 603, 2 , 80.47, 4.81, 'Allocated', '2016-05-25') +,(4271, 604, 8 , 38.65, 4.02, 'No Stock' , '2016-05-09') +,(4272, 610, 7 , 66.28, 2.85, 'No Stock' , '2016-09-17') +,(4273, 612, 10, 85.38, 8.44, 'No Stock' , '2016-12-19') +,(4274, 613, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4275, 610, 8 , 1.12 , 8.65, 'Allocated', '2016-10-28') +,(4275, 615, 1 , 24.01, 5.55, 'No Stock' , '2016-12-30') +,(4276, 603, 3 , 44.76, 7.28, 'No Stock' , '2016-12-28') +,(4277, 610, 9 , 40.01, 8.62, 'No Stock' , '2016-11-10') +,(4278, 603, 6 , 32.0 , 1.23, 'Allocated', '2016-12-23') +,(4278, 608, 4 , 38.01, 9.45, 'Allocated', '2016-10-05') +,(4278, 609, 5 , 31.99, 5.41, 'No Stock' , '2016-10-23') +,(4279, 613, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4280, 606, 5 , 7.52 , 2.76, 'Allocated', '2016-05-27') +,(4280, 609, 4 , 37.09, 4.44, 'On Order' , '2016-08-10') +,(4281, 610, 9 , 37.07, 8.7 , 'On Order' , '2016-12-28') +,(4281, 611, 2 , 37.07, 8.7 , 'On Order' , '2016-12-28') +,(4281, 612, 1 , 37.07, 8.7 , 'On Order' , '2016-12-28') +,(4282, 601, 1 , 19.14, 3.98, 'On Order' , '2016-11-09') +,(4282, 606, 3 , 88.94, 6.79, 'On Order' , '2016-09-29') +,(4282, 609, 6 , 25.35, 5.22, 'Allocated', '2016-10-05') +,(4283, 601, 1 , 14.78, 3.31, 'On Order' , '2016-10-07') +,(4284, 606, 5 , 32.57, 7.22, 'On Order' , '2016-08-24') +,(4285, 604, 5 , 47.88, 3.77, 'No Stock' , '2016-12-09') +,(4285, 615, 8 , 9.28 , 2.13, 'Allocated', '2016-03-27') +,(4286, 620, 5 , 63.24, 7.62, 'Allocated', '2016-12-06') +,(4287, 602, 6 , 2.9 , 9.5 , 'On Order' , '2016-10-06') +,(4287, 605, 5 , 7.63 , 2.78, 'Allocated', '2016-08-22') +,(4287, 611, 1 , 8.98 , 3.39, 'Allocated', '2016-07-18') +,(4287, 614, 3 , 34.4 , 7.12, 'On Order' , '2017-03-04') +,(4288, 604, 6 , 57.67, 3.25, 'Allocated', '2016-05-18') +,(4289, 601, 7 , 19.32, 7.31, 'On Order' , '2017-01-21') +,(4289, 615, 10, 89.16, 2.08, 'No Stock' , '2016-06-03') +,(4290, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4291, 601, 1 , 68.5 , 2.58, 'Allocated', '2016-11-05') +,(4291, 603, 5 , 11.27, 5.56, 'Allocated', '2016-06-10') +,(4291, 606, 1 , 76.82, 3.31, 'Allocated', '2016-09-27') +,(4292, 608, 10, 27.45, 4.8 , 'On Order' , '2016-05-12') +,(4292, 610, 9 , 16.78, 5.96, 'No Stock' , '2016-05-05') +,(4293, 612, 4 , 69.21, 2.07, 'Allocated', '2016-08-23') +,(4294, 619, 4 , 81.5 , 9.13, 'Allocated', '2017-01-20') +,(4295, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4296, 613, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4297, 604, 4 , 19.21, 1.7 , 'Allocated', '2016-08-20') +,(4297, 606, 4 , 71.24, 5.74, 'No Stock' , '2016-10-11') +,(4298, 613, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4299, 603, 8 , 81.7 , 5.69, 'Allocated', '2016-07-06') +,(4300, 601, 5 , 35.51, 8.38, 'On Order' , '2016-12-23') +,(4300, 607, 5 , 46.94, 6.82, 'No Stock' , '2016-07-29') +,(4301, 605, 6 , 99.32, 1.22, 'Allocated', '2016-09-02') +,(4301, 620, 7 , 96.67, 6.9 , 'Allocated', '2016-11-24') +,(4302, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4303, 605, 8 , 31.92, 5.62, 'On Order' , '2016-04-09') +,(4304, 615, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4305, 606, 1 , 2.53 , 1.15, 'On Order' , '2016-12-03') +,(4305, 609, 6 , 76.41, 7.87, 'Allocated', '2016-07-05') +,(4305, 612, 3 , 31.58, 5.53, 'On Order' , '2016-10-01') +,(4306, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4307, 601, 7 , 36.63, 3.9 , 'On Order' , '2016-09-16') +,(4307, 606, 10, 56.47, 8.96, 'No Stock' , '2017-02-25') +,(4308, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4309, 606, 6 , 84.25, 2.28, 'On Order' , '2016-04-07') +,(4310, 605, 7 , 15.88, 2.48, 'Allocated', '2017-02-17') +,(4311, 603, 2 , 67.26, 6.18, 'No Stock' , '2016-05-06') +,(4312, 619, 4 , 87.5 , 6.57, 'Allocated', '2017-03-14') +,(4313, 602, 3 , 87.01, 4.45, 'On Order' , '2016-08-30') +,(4313, 610, 7 , 54.92, 8.87, 'No Stock' , '2017-01-20') +,(4314, 602, 9 , 49.19, 2.67, 'Allocated', '2016-07-24') +,(4314, 607, 10, 32.19, 8.12, 'On Order' , '2016-11-23') +,(4315, 602, 7 , 9.25 , 3.78, 'On Order' , '2017-01-04') +,(4316, 613, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4317, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4318, 609, 5 , 29.17, 3.35, 'No Stock' , '2016-11-28') +,(4318, 610, 4 , 41.75, 3.7 , 'On Order' , '2016-09-09') +,(4318, 620, 5 , 81.63, 1.49, 'On Order' , '2016-04-16') +,(4319, 614, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4320, 613, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4321, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4322, 603, 2 , 21.09, 9.37, 'No Stock' , '2016-11-29') +,(4323, 608, 8 , 24.05, 9.49, 'On Order' , '2016-08-12') +,(4324, 607, 7 , 83.23, 1.48, 'On Order' , '2016-07-10') +,(4325, 608, 10, 35.28, 1.8 , 'Allocated', '2016-09-01') +,(4326, 602, 8 , 69.18, 4.43, 'No Stock' , '2016-07-31') +,(4326, 610, 2 , 24.44, 8.1 , 'No Stock' , '2016-03-29') +,(4327, 608, 3 , 22.57, 4.64, 'Allocated', '2016-03-23') +,(4328, 604, 1 , 55.53, 3.16, 'On Order' , '2016-12-14') +,(4328, 605, 2 , 38.78, 6.97, 'Allocated', '2017-03-04') +,(4328, 607, 5 , 28.94, 3.59, 'Allocated', '2016-08-01') +,(4329, 603, 6 , 65.93, 2.86, 'On Order' , '2016-10-25') +,(4330, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4331, 602, 5 , 37.37, 6.39, 'No Stock' , '2016-03-19') +,(4332, 606, 5 , 93.96, 3.31, 'No Stock' , '2016-08-09') +,(4332, 610, 5 , 3.77 , 6.74, 'Allocated', '2016-06-23') +,(4333, 608, 7 , 14.29, 3.95, 'On Order' , '2016-06-16') +,(4334, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4335, 609, 6 , 63.15, 9.3 , 'Allocated', '2016-08-31') +,(4336, 613, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4337, 610, 1 , 52.98, 5.68, 'Allocated', '2016-03-19') +,(4338, 610, 1 , 83.94, 3.56, 'Allocated', '2016-11-03') +,(4339, 604, 10, 78.06, 5.32, 'No Stock' , '2016-11-19') +,(4340, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4341, 609, 6 , 52.04, 7.63, 'No Stock' , '2016-11-25') +,(4341, 615, 1 , 9.44 , 8.66, 'No Stock' , '2016-09-06') +,(4342, 615, 6 , 67.41, 8.5 , 'Allocated', '2016-08-28') +,(4343, 615, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4344, 610, 10, 61.53, 5.36, 'On Order' , '2016-04-30') +,(4345, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4346, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4347, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4348, 608, 1 , 96.42, 4.57, 'On Order' , '2016-05-14') +,(4348, 610, 3 , 38.0 , 5.74, 'On Order' , '2016-05-30') +,(4348, 611, 6 , 38.59, 6.7 , 'On Order' , '2016-08-16') +,(4349, 613, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4350, 602, 8 , 81.72, 7.57, 'Allocated', '2016-08-18') +,(4350, 604, 6 , 95.31, 9.43, 'On Order' , '2016-12-29') +,(4350, 608, 9 , 43.57, 6.54, 'No Stock' , '2016-08-24') +,(4351, 602, 1 , 37.63, 3.31, 'No Stock' , '2016-08-26') +,(4351, 607, 9 , 83.22, 2.44, 'No Stock' , '2016-04-11') +,(4352, 602, 3 , 13.09, 3.98, 'No Stock' , '2016-10-03') +,(4352, 603, 9 , 88.58, 4.87, 'On Order' , '2017-03-05') +,(4352, 614, 4 , 47.62, 5.05, 'Allocated', '2016-05-30') +,(4353, 612, 9 , 28.8 , 1.77, 'Allocated', '2016-03-28') +,(4354, 618, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4355, 607, 4 , 20.25, 3.18, 'No Stock' , '2016-04-27') +,(4355, 608, 9 , 73.3 , 5.95, 'Allocated', '2016-12-08') +,(4355, 609, 7 , 26.16, 6.88, 'Allocated', '2016-12-09') +,(4356, 614, 8 , 93.97, 2.88, 'No Stock' , '2016-06-14') +,(4357, 605, 6 , 24.39, 5.53, 'No Stock' , '2016-07-31') +,(4357, 612, 4 , 71.28, 1.94, 'No Stock' , '2016-07-08') +,(4358, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4359, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4360, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4361, 601, 6 , 45.27, 1.05, 'Allocated', '2016-03-29') +,(4361, 609, 10, 39.75, 1.28, 'On Order' , '2016-07-15') +,(4362, 603, 4 , 42.92, 5.17, 'No Stock' , '2016-09-24') +,(4363, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4364, 602, 8 , 90.01, 4.2 , 'On Order' , '2017-02-09') +,(4365, 601, 2 , 92.96, 3.73, 'Allocated', '2016-06-10') +,(4365, 603, 7 , 86.67, 9.6 , 'On Order' , '2016-07-31') +,(4366, 604, 6 , 52.01, 2.02, 'No Stock' , '2016-09-23') +,(4366, 605, 9 , 88.21, 3.68, 'On Order' , '2016-08-10') +,(4366, 609, 8 , 80.78, 3.99, 'No Stock' , '2016-05-07') +,(4367, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4368, 604, 4 , 53.46, 4.56, 'No Stock' , '2016-09-07') +,(4369, 612, 2 , 8.5 , 3.86, 'Allocated', '2017-01-20') +,(4370, 603, 9 , 46.22, 8.2 , 'On Order' , '2016-09-02') +,(4370, 604, 10, 10.38, 2.29, 'Allocated', '2016-06-03') +,(4371, 610, 10, 23.33, 4.07, 'On Order' , '2016-08-25') +,(4372, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4373, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4374, 604, 3 , 29.51, 2.34, 'No Stock' , '2017-03-07') +,(4375, 618, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4376, 608, 10, 5.55 , 3.21, 'No Stock' , '2016-09-14') +,(4377, 602, 9 , 91.62, 8.57, 'On Order' , '2016-08-26') +,(4378, 603, 8 , 74.83, 5.38, 'On Order' , '2016-04-11') +,(4379, 605, 9 , 53.7 , 5.65, 'On Order' , '2016-10-29') +,(4380, 618, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4381, 619, 1 , 35.54, 3.78, 'Allocated', '2016-07-27') +,(4382, 602, 8 , 33.64, 7.95, 'Allocated', '2016-11-05') +,(4382, 606, 4 , 68.17, 6.06, 'On Order' , '2017-01-22') +,(4383, 613, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4384, 615, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4385, 609, 1 , 18.13, 8.94, 'On Order' , '2016-03-25') +,(4386, 613, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4387, 602, 8 , 86.06, 9.74, 'Allocated', '2016-12-01') +,(4387, 606, 8 , 87.31, 7.53, 'No Stock' , '2016-06-12') +,(4387, 610, 3 , 47.55, 5.2 , 'Allocated', '2016-10-06') +,(4388, 602, 4 , 5.86 , 3.52, 'On Order' , '2016-05-09') +,(4388, 603, 8 , 24.25, 6.18, 'Allocated', '2016-09-22') +,(4388, 606, 6 , 29.46, 2.93, 'Allocated', '2016-09-11') +,(4388, 619, 1 , 36.76, 7.37, 'No Stock' , '2016-12-29') +,(4389, 602, 1 , 94.23, 9.35, 'Allocated', '2016-06-13') +,(4389, 603, 2 , 40.15, 8.39, 'No Stock' , '2016-08-09') +,(4390, 609, 4 , 7.02 , 5.61, 'On Order' , '2016-11-29') +,(4391, 607, 1 , 48.41, 8.97, 'On Order' , '2016-07-10') +,(4392, 603, 8 , 74.91, 8.23, 'No Stock' , '2016-04-07') +,(4393, 611, 4 , 55.83, 4.56, 'Allocated', '2016-04-13') +,(4394, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4395, 610, 7 , 82.73, 5.09, 'No Stock' , '2016-09-27') +,(4395, 617, 6 , 26.05, 6.29, 'On Order' , '2016-07-24') +,(4396, 605, 9 , 66.19, 1.32, 'No Stock' , '2017-02-05') +,(4396, 619, 4 , 3.15 , 1.04, 'On Order' , '2016-07-08') +,(4397, 619, 9 , 78.52, 7.64, 'No Stock' , '2016-08-19') +,(4398, 618, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4399, 610, 7 , 85.03, 4.71, 'No Stock' , '2016-05-04') +,(4400, 612, 9 , 36.85, 6.54, 'On Order' , '2016-10-31') +,(4400, 620, 2 , 15.9 , 5.62, 'On Order' , '2016-06-18') +,(4401, 602, 1 , 91.01, 4.13, 'No Stock' , '2016-09-27') +,(4401, 604, 10, 98.7 , 5.27, 'Allocated', '2016-06-03') +,(4402, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4403, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4404, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4405, 604, 3 , 46.99, 9.31, 'No Stock' , '2016-09-08') +,(4405, 610, 10, 4.94 , 1.68, 'On Order' , '2016-11-15') +,(4406, 602, 7 , 25.84, 7.67, 'On Order' , '2016-10-28') +,(4406, 606, 2 , 96.43, 5.64, 'No Stock' , '2016-11-14') +,(4406, 607, 10, 14.91, 3.88, 'No Stock' , '2016-06-18') +,(4407, 606, 9 , 20.82, 6.82, 'No Stock' , '2016-10-08') +,(4407, 608, 4 , 29.19, 7.26, 'No Stock' , '2016-12-15') +,(4408, 605, 4 , 12.83, 9.29, 'No Stock' , '2016-11-20') +,(4408, 615, 4 , 89.77, 2.7 , 'No Stock' , '2017-03-07') +,(4408, 619, 3 , 36.44, 8.86, 'No Stock' , '2016-12-17') +,(4409, 602, 2 , 36.96, 9.73, 'Allocated', '2016-08-19') +,(4409, 611, 7 , 94.98, 4.11, 'On Order' , '2016-05-17') +,(4410, 603, 7 , 13.79, 5.05, 'No Stock' , '2016-09-28') +,(4410, 604, 10, 70.24, 4.07, 'No Stock' , '2016-10-27') +,(4410, 607, 6 , 26.39, 7.8 , 'No Stock' , '2016-03-21') +,(4411, 602, 7 , 3.47 , 3.86, 'No Stock' , '2017-03-14') +,(4411, 611, 3 , 10.43, 3.67, 'On Order' , '2016-12-27') +,(4412, 605, 10, 26.07, 6.78, 'Allocated', '2017-02-16') +,(4412, 607, 7 , 76.81, 5.67, 'No Stock' , '2016-11-26') +,(4412, 610, 3 , 98.77, 3.34, 'On Order' , '2016-09-29') +,(4413, 617, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4414, 606, 5 , 26.01, 4.54, 'On Order' , '2016-03-23') +,(4415, 605, 5 , 74.86, 1.68, 'No Stock' , '2016-09-18') +,(4416, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4417, 601, 6 , 66.38, 5.22, 'No Stock' , '2016-07-07') +,(4417, 604, 7 , 96.99, 4.89, 'No Stock' , '2016-09-30') +,(4418, 609, 8 , 59.88, 5.52, 'Allocated', '2016-09-03') +,(4419, 604, 4 , 54.04, 4.95, 'On Order' , '2017-01-05') +,(4420, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4421, 605, 2 , 96.34, 1.7 , 'On Order' , '2016-06-10') +,(4422, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4423, 602, 3 , 25.88, 5.34, 'Allocated', '2016-04-19') +,(4423, 605, 5 , 4.06 , 2.22, 'On Order' , '2016-06-21') +,(4423, 608, 9 , 20.4 , 4.26, 'On Order' , '2016-08-17') +,(4424, 605, 8 , 44.66, 4.23, 'Allocated', '2016-11-06') +,(4425, 607, 7 , 18.91, 6.75, 'On Order' , '2016-11-28') +,(4425, 608, 4 , 60.11, 4.46, 'No Stock' , '2017-02-15') +,(4426, 606, 8 , 44.98, 6.5 , 'On Order' , '2016-11-13') +,(4426, 607, 4 , 78.46, 2.91, 'Allocated', '2017-01-26') +,(4427, 604, 2 , 61.91, 3.08, 'On Order' , '2016-09-01') +,(4427, 607, 10, 53.82, 8.17, 'No Stock' , '2016-11-09') +,(4428, 603, 2 , 81.15, 5.94, 'Allocated', '2016-12-01') +,(4428, 605, 9 , 48.38, 5.26, 'On Order' , '2016-07-08') +,(4429, 606, 10, 28.8 , 2.75, 'Allocated', '2017-03-03') +,(4430, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4431, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4432, 603, 9 , 52.12, 4.42, 'No Stock' , '2016-09-03') +,(4433, 601, 4 , 34.09, 9.94, 'No Stock' , '2016-04-18') +,(4433, 605, 1 , 65.04, 7.32, 'On Order' , '2016-04-04') +,(4434, 601, 2 , 61.28, 1.15, 'On Order' , '2016-03-18') +,(4434, 605, 2 , 61.28, 1.15, 'On Order' , '2016-03-18') +,(4434, 607, 2 , 61.28, 1.15, 'On Order' , '2016-03-18') +,(4435, 610, 10, 9.19 , 7.18, 'On Order' , '2016-12-08') +,(4435, 612, 10, 9.19 , 7.18, 'On Order' , '2016-12-08') +,(4435, 614, 10, 9.19 , 7.18, 'On Order' , '2016-12-08') +,(4436, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4436, 618, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4436, 620, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4437, 601, 7 , 56.48, 9.07, 'Allocated', '2016-05-05') +,(4437, 602, 1 , 98.71, 8.08, 'On Order' , '2017-03-16') +,(4437, 609, 7 , 12.69, 5.56, 'On Order' , '2016-12-16') +,(4438, 604, 1 , 97.24, 5.43, 'Allocated', '2016-10-22') +,(4438, 605, 1 , 97.24, 5.43, 'Allocated', '2016-10-22') +,(4438, 606, 1 , 97.24, 5.43, 'Allocated', '2016-10-22') +,(4439, 615, 5 , 11.46, 3.07, 'Allocated', '2016-06-10') +,(4439, 618, 1 , 97.24, 5.43, 'Allocated', '2016-10-22') +,(4439, 620, 1 , 97.24, 5.43, 'Allocated', '2016-10-22') +,(4440, 603, 9 , 66.05, 8.7 , 'No Stock' , '2016-11-08') +,(4440, 616, 1 , 97.24, 5.43, 'Allocated', '2016-10-22') +,(4440, 620, 1 , 97.24, 5.43, 'Allocated', '2016-10-22') +,(4441, 602, 4 , 79.49, 2.54, 'Allocated', '2017-02-19') +,(4441, 609, 4 , 88.86, 9.63, 'Allocated', '2016-06-06') +,(4442, 608, 1 , 55.66, 2.52, 'Allocated', '2016-09-08') +,(4443, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4444, 602, 4 , 52.6 , 9.83, 'On Order' , '2017-01-18') +,(4444, 605, 8 , 81.63, 9.58, 'On Order' , '2017-01-27') +,(4445, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4445, 601, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4445, 607, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4446, 602, 3 , 76.28, 1.52, 'On Order' , '2017-02-17') +,(4446, 606, 5 , 18.52, 2.13, 'On Order' , '2016-06-28') +,(4447, 609, 9 , 54.61, 4.47, 'Allocated', '2016-07-08') +,(4447, 608, 9 , 54.61, 4.47, 'Allocated', '2016-07-08') +,(4447, 607, 9 , 54.61, 4.47, 'Allocated', '2016-07-08') +,(4448, 605, 2 , 69.71, 2.05, 'No Stock' , '2016-09-17') +,(4448, 606, 2 , 69.71, 2.05, 'No Stock' , '2016-09-17') +,(4448, 607, 2 , 69.71, 2.05, 'No Stock' , '2016-09-17') +,(4449, 618, 6 , 35.62, 5.23, 'On Order' , '2016-04-15') +,(4449, 619, 10, 86.97, 4.63, 'No Stock' , '2016-09-29') +,(4450, 619, 8 , 26.14, 4.87, 'On Order' , '2016-12-09') +,(4450, 620, 8 , 26.14, 4.87, 'On Order' , '2016-12-09') +,(4450, 601, 8 , 26.14, 4.87, 'On Order' , '2016-12-09') +,(4451, 604, 3 , 47.48, 1.4 , 'Allocated', '2016-09-12') +,(4452, 615, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4453, 606, 2 , 4.03 , 8.07, 'On Order' , '2016-12-10') +,(4454, 619, 7 , 55.92, 9.0 , 'On Order' , '2016-10-07') +,(4455, 602, 10, 50.3 , 9.33, 'On Order' , '2017-01-11') +,(4455, 603, 1 , 7.68 , 7.77, 'Allocated', '2016-12-09') +,(4455, 605, 1 , 98.23, 3.73, 'Allocated', '2016-07-07') +,(4456, 607, 8 , 54.83, 9.57, 'No Stock' , '2016-08-16') +,(4456, 612, 7 , 97.34, 1.24, 'Allocated', '2016-05-13') +,(4457, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4458, 615, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4459, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4460, 602, 8 , 37.95, 8.36, 'No Stock' , '2017-01-03') +,(4461, 620, 6 , 73.77, 2.02, 'Allocated', '2016-03-27') +,(4462, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4463, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4464, 606, 1 , 31.6 , 1.18, 'On Order' , '2016-09-05') +,(4465, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4466, 620, 10, 37.79, 1.76, 'Allocated', '2016-12-14') +,(4467, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4468, 610, 3 , 80.77, 6.87, 'Allocated', '2016-12-30') +,(4469, 602, 3 , 19.99, 5.21, 'No Stock' , '2016-08-11') +,(4469, 612, 3 , 73.21, 4.85, 'On Order' , '2017-02-19') +,(4470, 607, 4 , 7.7 , 5.78, 'No Stock' , '2016-04-22') +,(4471, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4472, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4473, 609, 2 , 97.6 , 1.84, 'Allocated', '2016-05-12') +,(4474, 611, 7 , 12.5 , 6.31, 'Allocated', '2016-04-18') +,(4475, 603, 2 , 44.42, 7.21, 'No Stock' , '2017-03-10') +,(4476, 603, 4 , 43.47, 5.63, 'No Stock' , '2016-09-17') +,(4477, 603, 4 , 24.99, 4.46, 'No Stock' , '2016-09-10') +,(4478, 606, 1 , 29.13, 4.59, 'On Order' , '2017-03-04') +,(4478, 619, 4 , 58.05, 2.9 , 'Allocated', '2017-01-26') +,(4479, 603, 10, 93.2 , 7.79, 'On Order' , '2016-03-21') +,(4479, 609, 4 , 70.36, 9.01, 'Allocated', '2017-02-03') +,(4479, 610, 6 , 49.48, 6.79, 'Allocated', '2017-03-01') +,(4480, 608, 9 , 11.03, 6.26, 'On Order' , '2016-12-10') +,(4481, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4482, 603, 10, 28.92, 8.1 , 'No Stock' , '2016-05-27') +,(4482, 607, 6 , 90.11, 5.74, 'On Order' , '2016-04-29') +,(4482, 610, 4 , 7.12 , 2.89, 'On Order' , '2017-01-12') +,(4482, 611, 1 , 12.48, 8.56, 'No Stock' , '2016-08-16') +,(4482, 614, 10, 55.93, 1.63, 'On Order' , '2016-07-09') +,(4482, 618, 1 , 33.9 , 2.46, 'Allocated', '2016-07-11') +,(4483, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4484, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4485, 605, 7 , 99.92, 1.31, 'No Stock' , '2016-05-11') +,(4486, 615, 7 , 4.39 , 3.61, 'Allocated', '2016-06-24') +,(4487, 602, 9 , 69.78, 7.96, 'No Stock' , '2016-12-29') +,(4487, 607, 5 , 24.92, 8.97, 'On Order' , '2016-08-15') +,(4487, 615, 4 , 72.16, 8.97, 'On Order' , '2016-07-28') +,(4488, 601, 9 , 64.29, 1.52, 'On Order' , '2016-03-30') +,(4488, 609, 10, 66.79, 5.3 , 'On Order' , '2016-07-11') +,(4489, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4490, 615, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4491, 602, 3 , 16.8 , 5.22, 'On Order' , '2016-09-16') +,(4492, 607, 4 , 99.59, 2.45, 'On Order' , '2017-03-04') +,(4493, 615, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4494, 615, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4495, 607, 7 , 86.05, 5.4 , 'Allocated', '2016-10-03') +,(4496, 603, 10, 55.12, 3.71, 'Allocated', '2016-07-06') +,(4497, 607, 7 , 27.3 , 4.26, 'Allocated', '2017-01-29') +,(4498, 604, 10, 89.58, 1.25, 'Allocated', '2016-03-19') +,(4498, 610, 10, 69.32, 2.48, 'No Stock' , '2016-06-24') +,(4499, 601, 4 , 56.58, 6.73, 'No Stock' , '2017-02-21') +,(4499, 602, 4 , 56.58, 6.73, 'No Stock' , '2017-02-21') +,(4499, 603, 4 , 56.58, 6.73, 'No Stock' , '2017-02-21') +,(4500, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4500, 620, 10, 54.41, 7.02, 'No Stock' , '2016-11-30') +,(4500, 619, 10, 54.41, 7.02, 'No Stock' , '2016-11-30') +,(4501, 620, 10, 54.41, 7.02, 'No Stock' , '2016-11-30') +,(4501, 619, 10, 54.41, 7.02, 'No Stock' , '2016-11-30') +,(4501, 618, 10, 54.41, 7.02, 'No Stock' , '2016-11-30') +,(4502, 603, 2 , 27.21, 1.12, 'No Stock' , '2016-07-27') +,(4502, 605, 9 , 39.93, 3.2 , 'On Order' , '2016-11-21') +,(4503, 615, 6 , 85.1 , 8.26, 'No Stock' , '2016-05-03') +,(4503, 611, 6 , 85.1 , 8.26, 'No Stock' , '2016-05-03') +,(4503, 612, 6 , 85.1 , 8.26, 'No Stock' , '2016-05-03') +,(4504, 615, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4504, 618, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4504, 619, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4505, 612, 3 , 10.99, 1.62, 'Allocated', '2016-09-04') +,(4505, 609, 3 , 10.99, 1.62, 'Allocated', '2016-09-04') +,(4505, 601, 3 , 10.99, 1.62, 'Allocated', '2016-09-04') +,(4506, 602, 7 , 88.03, 1.0 , 'On Order' , '2016-09-23') +,(4506, 603, 9 , 66.78, 1.18, 'Allocated', '2017-02-03') +,(4506, 606, 10, 85.37, 2.21, 'Allocated', '2016-10-03') +,(4506, 609, 9 , 84.3 , 4.06, 'Allocated', '2016-12-08') +,(4507, 617, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4508, 611, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4509, 611, 2 , 99.24, 8.51, 'Allocated', '2016-08-12') +,(4509, 612, 8 , 2.41 , 3.81, 'On Order' , '2016-08-30') +,(4510, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4511, 610, 3 , 73.48, 8.4 , 'Allocated', '2016-12-06') +,(4511, 611, 4 , 7.29 , 6.91, 'Allocated', '2016-12-23') +,(4511, 616, 5 , 26.16, 6.26, 'On Order' , '2016-12-09') +,(4512, 614, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4513, 614, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4514, 605, 6 , 86.17, 7.08, 'No Stock' , '2017-01-25') +,(4514, 610, 6 , 71.51, 6.3 , 'No Stock' , '2017-01-23') +,(4515, 617, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4516, 618, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4517, 604, 10, 55.76, 7.34, 'Allocated', '2016-10-23') +,(4517, 619, 2 , 1.09 , 7.07, 'Allocated', '2016-08-19') +,(4518, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4519, 609, 9 , 61.39, 7.83, 'On Order' , '2016-07-01') +,(4520, 619, 9 , 72.61, 9.55, 'No Stock' , '2016-10-08') +,(4521, 610, 10, 19.38, 3.54, 'Allocated', '2016-12-08') +,(4521, 615, 8 , 54.35, 7.77, 'No Stock' , '2017-01-31') +,(4522, 602, 9 , 68.98, 6.79, 'No Stock' , '2016-11-28') +,(4523, 606, 9 , 79.86, 1.63, 'No Stock' , '2016-05-25') +,(4524, 602, 9 , 91.58, 3.46, 'On Order' , '2017-03-12') +,(4525, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4526, 603, 9 , 56.56, 7.64, 'On Order' , '2016-10-14') +,(4526, 604, 4 , 80.67, 2.83, 'No Stock' , '2016-07-29') +,(4526, 610, 5 , 88.8 , 2.86, 'On Order' , '2017-02-25') +,(4527, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4528, 605, 4 , 73.64, 8.81, 'Allocated', '2017-01-26') +,(4528, 609, 4 , 64.56, 4.09, 'On Order' , '2016-10-03') +,(4529, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4530, 602, 9 , 70.97, 4.73, 'On Order' , '2016-12-07') +,(4531, 606, 10, 26.53, 2.83, 'No Stock' , '2016-03-25') +,(4531, 615, 5 , 79.05, 6.82, 'Allocated', '2016-08-04') +,(4531, 619, 4 , 36.14, 7.09, 'No Stock' , '2016-03-26') +,(4532, 605, 5 , 6.28 , 9.94, 'No Stock' , '2017-03-13') +,(4532, 610, 8 , 17.25, 3.68, 'Allocated', '2016-05-28') +,(4533, 615, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4534, 606, 8 , 60.95, 9.33, 'Allocated', '2016-07-15') +,(4534, 607, 10, 49.84, 8.32, 'No Stock' , '2016-04-24') +,(4535, 610, 6 , 17.67, 1.81, 'On Order' , '2017-03-01') +,(4535, 619, 3 , 88.0 , 3.12, 'Allocated', '2016-07-11') +,(4536, 615, 5 , 88.08, 4.93, 'Allocated', '2016-12-04') +,(4537, 611, 2 , 14.77, 4.04, 'No Stock' , '2016-03-25') +,(4538, 603, 6 , 3.51 , 4.54, 'Allocated', '2016-04-21') +,(4539, 603, 7 , 6.58 , 4.8 , 'Allocated', '2016-05-14') +,(4540, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4540, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4540, 618, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4541, 603, 5 , 37.47, 2.89, 'On Order' , '2016-04-07') +,(4541, 607, 4 , 35.17, 5.44, 'No Stock' , '2017-01-07') +,(4541, 615, 2 , 83.62, 4.01, 'Allocated', '2016-11-22') +,(4542, 605, 10, 92.43, 3.27, 'On Order' , '2017-01-23') +,(4542, 601, 10, 92.43, 3.27, 'On Order' , '2017-01-23') +,(4542, 603, 10, 92.43, 3.27, 'On Order' , '2017-01-23') +,(4543, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4543, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4543, 619, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4544, 611, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4544, 610, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4544, 609, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4545, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4545, 604, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4545, 606, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4546, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4546, 606, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4546, 608, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4547, 606, 4 , 81.81, 9.44, 'No Stock' , '2016-05-14') +,(4547, 602, 4 , 81.81, 9.44, 'No Stock' , '2016-05-14') +,(4547, 603, 4 , 81.81, 9.44, 'No Stock' , '2016-05-14') +,(4548, 614, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4548, 611, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4548, 615, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4549, 605, 9 , 24.12, 7.26, 'No Stock' , '2016-08-22') +,(4549, 606, 7 , 6.19 , 4.68, 'Allocated', '2016-09-02') +,(4550, 609, 8 , 49.04, 7.62, 'On Order' , '2016-06-10') +,(4550, 610, 10, 92.51, 4.84, 'No Stock' , '2017-02-24') +,(4551, 601, 3 , 85.1 , 2.45, 'Allocated', '2016-07-08') +,(4551, 602, 3 , 69.43, 1.31, 'No Stock' , '2017-03-15') +,(4551, 610, 1 , 19.38, 8.43, 'No Stock' , '2016-11-09') +,(4552, 601, 2 , 91.69, 8.12, 'On Order' , '2016-06-03') +,(4552, 613, 3 , 41.15, 6.38, 'No Stock' , '2016-04-11') +,(4553, 603, 1 , 5.22 , 8.43, 'On Order' , '2016-10-28') +,(4554, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4555, 607, 6 , 77.16, 3.07, 'No Stock' , '2016-04-29') +,(4555, 612, 9 , 81.31, 9.81, 'On Order' , '2017-01-24') +,(4556, 615, 10, 65.81, 7.25, 'Allocated', '2016-11-07') +,(4557, 603, 1 , 5.01 , 4.57, 'No Stock' , '2016-09-05') +,(4557, 606, 3 , 29.35, 8.67, 'On Order' , '2016-09-14') +,(4558, 601, 3 , 29.62, 7.16, 'No Stock' , '2016-11-06') +,(4559, 620, 2 , 87.83, 7.93, 'On Order' , '2016-11-09') +,(4560, 610, 7 , 9.51 , 8.01, 'On Order' , '2016-08-22') +,(4561, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4562, 610, 9 , 15.1 , 6.8 , 'Allocated', '2016-08-27') +,(4562, 611, 3 , 71.09, 1.26, 'No Stock' , '2016-07-12') +,(4563, 618, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4564, 602, 2 , 6.68 , 6.29, 'Allocated', '2016-03-19') +,(4565, 603, 7 , 81.01, 2.82, 'Allocated', '2017-03-06') +,(4565, 606, 8 , 99.68, 6.28, 'No Stock' , '2016-04-27') +,(4566, 614, 7 , 57.79, 4.48, 'No Stock' , '2016-11-02') +,(4567, 604, 7 , 94.42, 5.46, 'No Stock' , '2016-05-18') +,(4567, 605, 1 , 61.75, 1.31, 'Allocated', '2016-04-14') +,(4567, 608, 10, 25.99, 4.85, 'On Order' , '2016-05-01') +,(4567, 620, 9 , 62.17, 4.66, 'Allocated', '2016-06-11') +,(4568, 606, 8 , 66.92, 1.1 , 'Allocated', '2016-10-02') +,(4568, 607, 10, 95.6 , 9.17, 'On Order' , '2016-05-04') +,(4568, 608, 6 , 81.57, 6.24, 'No Stock' , '2017-01-24') +,(4569, 601, 10, 96.56, 6.33, 'Allocated', '2016-07-22') +,(4570, 610, 6 , 98.15, 2.57, 'No Stock' , '2016-06-28') +,(4571, 604, 8 , 5.15 , 2.51, 'No Stock' , '2016-07-11') +,(4572, 603, 2 , 59.21, 2.46, 'Allocated', '2016-11-18') +,(4573, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4574, 615, 3 , 14.81, 9.61, 'On Order' , '2016-05-04') +,(4575, 608, 10, 79.25, 7.08, 'On Order' , '2016-11-19') +,(4575, 611, 10, 79.25, 7.08, 'On Order' , '2016-11-19') +,(4575, 615, 10, 79.25, 7.08, 'On Order' , '2016-11-19') +,(4576, 607, 7 , 31.78, 2.05, 'On Order' , '2016-03-17') +,(4576, 608, 7 , 31.78, 2.05, 'On Order' , '2016-03-17') +,(4576, 610, 7 , 31.78, 2.05, 'On Order' , '2016-03-17') +,(4577, 604, 5 , 92.54, 6.26, 'On Order' , '2016-04-22') +,(4577, 603, 5 , 92.54, 6.26, 'On Order' , '2016-04-22') +,(4577, 601, 5 , 92.54, 6.26, 'On Order' , '2016-04-22') +,(4578, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4578, 602, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4578, 603, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4579, 615, 10, 70.19, 5.85, 'No Stock' , '2016-09-11') +,(4579, 616, 10, 70.19, 5.85, 'No Stock' , '2016-09-11') +,(4579, 620, 10, 70.19, 5.85, 'No Stock' , '2016-09-11') +,(4580, 601, 1 , 15.44, 3.76, 'No Stock' , '2016-04-08') +,(4580, 603, 1 , 15.44, 3.76, 'No Stock' , '2016-04-08') +,(4580, 605, 1 , 15.44, 3.76, 'No Stock' , '2016-04-08') +,(4580, 609, 1 , 15.44, 3.76, 'No Stock' , '2016-04-08') +,(4581, 607, 8 , 42.4 , 9.73, 'On Order' , '2016-06-04') +,(4581, 610, 9 , 79.73, 3.87, 'On Order' , '2016-04-20') +,(4581, 611, 5 , 78.01, 3.65, 'On Order' , '2016-03-17') +,(4581, 616, 5 , 50.56, 5.24, 'No Stock' , '2016-07-06') +,(4582, 609, 7 , 65.99, 9.4 , 'No Stock' , '2016-05-22') +,(4582, 607, 7 , 65.99, 9.4 , 'No Stock' , '2016-05-22') +,(4582, 606, 7 , 65.99, 9.4 , 'No Stock' , '2016-05-22') +,(4583, 604, 9 , 19.92, 6.51, 'Allocated', '2016-04-13') +,(4583, 610, 1 , 19.4 , 8.3 , 'On Order' , '2016-12-08') +,(4584, 617, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4584, 620, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4584, 613, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4585, 602, 2 , 90.57, 2.52, 'Allocated', '2016-05-22') +,(4585, 610, 10, 44.26, 3.84, 'On Order' , '2016-12-27') +,(4586, 604, 2 , 56.61, 9.64, 'Allocated', '2017-02-23') +,(4586, 612, 7 , 24.24, 7.68, 'On Order' , '2016-04-04') +,(4587, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4587, 611, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4587, 612, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4588, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4588, 601, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4588, 602, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4589, 601, 5 , 52.25, 4.47, 'Allocated', '2016-07-02') +,(4589, 603, 9 , 72.27, 4.97, 'On Order' , '2016-04-03') +,(4590, 610, 3 , 46.2 , 6.71, 'Allocated', '2016-12-16') +,(4590, 615, 5 , 52.0 , 5.26, 'On Order' , '2016-06-01') +,(4591, 601, 1 , 96.52, 2.39, 'No Stock' , '2017-01-16') +,(4591, 605, 8 , 19.56, 9.68, 'On Order' , '2016-09-15') +,(4592, 609, 10, 30.76, 3.2 , 'No Stock' , '2016-05-02') +,(4592, 619, 1 , 48.47, 6.13, 'On Order' , '2016-07-19') +,(4593, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4593, 619, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4593, 620, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4594, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4594, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4594, 618, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4594, 620, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4595, 605, 1 , 50.28, 8.15, 'Allocated', '2017-02-19') +,(4595, 601, 1 , 50.28, 8.15, 'Allocated', '2017-02-19') +,(4595, 602, 1 , 50.28, 8.15, 'Allocated', '2017-02-19') +,(4596, 605, 6 , 95.17, 7.53, 'On Order' , '2016-09-11') +,(4596, 609, 10, 82.11, 4.38, 'No Stock' , '2016-11-17') +,(4597, 608, 9 , 96.25, 4.8 , 'No Stock' , '2016-07-02') +,(4597, 605, 9 , 96.25, 4.8 , 'No Stock' , '2016-07-02') +,(4597, 601, 9 , 96.25, 4.8 , 'No Stock' , '2016-07-02') +,(4598, 603, 5 , 69.02, 6.1 , 'No Stock' , '2016-12-23') +,(4598, 608, 5 , 69.02, 6.1 , 'No Stock' , '2016-12-23') +,(4598, 610, 5 , 69.02, 6.1 , 'No Stock' , '2016-12-23') +,(4599, 603, 9 , 40.91, 6.68, 'On Order' , '2016-12-27') +,(4599, 607, 9 , 40.91, 6.68, 'On Order' , '2016-12-27') +,(4599, 609, 9 , 40.91, 6.68, 'On Order' , '2016-12-27') +,(4600, 611, 5 , 22.93, 8.87, 'Allocated', '2016-06-16') +,(4600, 615, 5 , 22.93, 8.87, 'Allocated', '2016-06-16') +,(4600, 612, 5 , 22.93, 8.87, 'Allocated', '2016-06-16'); diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/resources/logback.xml b/prod116rb-back-b/authsec_springboot/backend/src/main/resources/logback.xml new file mode 100644 index 0000000..12fa9be --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/resources/logback.xml @@ -0,0 +1,108 @@ + + + + + + + + + ${LOG_PATTERN} + + + + + ${APP_LOG_ROOT}/ExceptionLogs/Error.log + + ${LOG_PATTERN} + + + ${APP_LOG_ROOT}/ExceptionLogs/Error-%d{yyyy-MM-dd}.%i.log + 1 + 10 + + + 10MB + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/resources/messages.properties b/prod116rb-back-b/authsec_springboot/backend/src/main/resources/messages.properties new file mode 100644 index 0000000..b015c87 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/resources/messages.properties @@ -0,0 +1,5 @@ + +email.notempty=Please provide valid email id. +email.valid=Email should be valid +email.regex=Enter a valid email +name.minsize=Name should have minimum 3 characters diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/resources/note.txt b/prod116rb-back-b/authsec_springboot/backend/src/main/resources/note.txt new file mode 100644 index 0000000..dd9fbe6 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/resources/note.txt @@ -0,0 +1,57 @@ +HEADER-LINE FORM : + +GET: http://localhost:9119/api/teacher +GET: http://localhost:9119/api/teacher/{id} +PUT: http://localhost:9119/api/teacher/{id} +DELETE: http://localhost:9119/api/teacher/{id} : NEED TO MODIFY THE INCORRECT ID INPUT ERROR HANDLING +POST: http://localhost:9119/api/teacher +===EX1=== +{ + "name": "niladri", + "email": "sen.niladri6@gmail.com", + "phoneNumber": 6291, + "salary": 1000.0, + "students": [{ + "name": "paku", + "depertment": "CSE", + "rollNumber": 108 + }] +} +===EX2===: +{ + "name": "sandipan", + "email": "sandy@gmail.com", + "phoneNumber": 9038, + "salary": 2000.0, + "students": [ + { + "name": "sahil", + "depertment": "CSE", + "rollNumber": 111 + }, + { + "name": "tarun", + "depertment": "CSE", + "rollNumber": 121 + } + ] +} + +===== 6.11.36 +user.java class code changed +@Getter @Setter private List role; +TokenUtil class code change + +===== 9.11.20 +1.8 +=== SWAGGER UI ==== +http://localhost:9119/swagger-ui.html + +========= +GIT HUB COMMAND +========= +$ git commit -m "your mesage" +$ git push origin main +$ git status + +$ git push origin main diff --git a/prod116rb-back-b/authsec_springboot/backend/src/main/resources/schema.sql b/prod116rb-back-b/authsec_springboot/backend/src/main/resources/schema.sql new file mode 100644 index 0000000..573e44a --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/src/main/resources/schema.sql @@ -0,0 +1,303 @@ +/** + Model : NorthWind +**/ + +DROP SCHEMA IF EXISTS northwind; + +CREATE SCHEMA northwind; +USE northwind; + +/* Table: user (Application Users) */ +CREATE TABLE user ( + user_id NVARCHAR(20) NOT NULL, + password NVARCHAR(255) NOT NULL, + first_name NVARCHAR(50) , + last_name NVARCHAR(50) , + email NVARCHAR(70) , + security_provider_id INT , + default_customer_id INT , + company NVARCHAR(50) , + phone NVARCHAR(20) , + address1 NVARCHAR(100), + address2 NVARCHAR(100), + country NVARCHAR(20) , + postal NVARCHAR(20) , + role NVARCHAR(20) , + other_roles NVARCHAR(80) , + is_active TINYINT , + is_blocked TINYINT , + secret_question NVARCHAR(100), + secret_answer NVARCHAR(100), + enable_beta_testing TINYINT, + enable_renewal TINYINT, + CONSTRAINT user_id PRIMARY KEY(user_id) +); + +/* Table: customers */ +CREATE TABLE customers ( + id INT NOT NULL, + last_name VARCHAR(50) , + first_name VARCHAR(50) , + email VARCHAR(50) , + company VARCHAR(50) , + phone VARCHAR(25) , + address1 VARCHAR(150), + address2 VARCHAR(150), + city VARCHAR(50) , + state VARCHAR(50) , + postal_code VARCHAR(15) , + country VARCHAR(50) , + PRIMARY KEY (id) +); + +/* Table: employees */ +CREATE TABLE employees ( + id INT NOT NULL, + last_name VARCHAR(50) , + first_name VARCHAR(50) , + email VARCHAR(50) , + avatar VARCHAR(250) , + job_title VARCHAR(50) , + department VARCHAR(50) , + manager_id INT , + phone VARCHAR(25) , + address1 VARCHAR(150), + address2 VARCHAR(150), + city VARCHAR(50) , + state VARCHAR(50) , + postal_code VARCHAR(15) , + country VARCHAR(50) , + PRIMARY KEY (id) +); + +/* Table: orders */ +CREATE TABLE orders ( + id INT NOT NULL, + employee_id INT , + customer_id INT , + order_date DATETIME , + shipped_date DATETIME , + ship_name VARCHAR(50) , + ship_address1 VARCHAR(150) , + ship_address2 VARCHAR(150) , + ship_city VARCHAR(50) , + ship_state VARCHAR(50) , + ship_postal_code VARCHAR(50) , + ship_country VARCHAR(50) , + shipping_fee DECIMAL(19,4) NULL DEFAULT '0.0000', + payment_type VARCHAR(50) , + paid_date DATETIME , + order_status VARCHAR(25), + PRIMARY KEY (id) +); + +/* Table: order_details */ +CREATE TABLE order_items ( + order_id INT NOT NULL, + product_id INT , + quantity DECIMAL(18,4) NOT NULL DEFAULT '0.0000', + unit_price DECIMAL(19,4) NULL DEFAULT '0.0000', + discount DECIMAL(19,4) NULL DEFAULT '0.0000', + order_item_status VARCHAR(25), + date_allocated DATETIME , + PRIMARY KEY (order_id, product_id) +); + +/* Table: products */ +CREATE TABLE products ( + id INT NOT NULL, + product_code VARCHAR(25) , + product_name VARCHAR(50) , + description VARCHAR(250), + standard_cost DECIMAL(19,4) NULL DEFAULT '0.0000', + list_price DECIMAL(19,4) NOT NULL DEFAULT '0.0000', + target_level INT , + reorder_level INT , + minimum_reorder_quantity INT , + quantity_per_unit VARCHAR(50) , + discontinued TINYINT NOT NULL DEFAULT '0', + category VARCHAR(50), + PRIMARY KEY (id) +); + + +/* Foreign Key: orders */ +ALTER TABLE orders ADD CONSTRAINT fk_orders__customers FOREIGN KEY (customer_id) REFERENCES customers(id); +ALTER TABLE orders ADD CONSTRAINT fk_orders__employees FOREIGN KEY (employee_id) REFERENCES employees(id); +/* Foreign Key: order_items */ +ALTER TABLE order_items ADD CONSTRAINT fk_order_items__orders FOREIGN KEY (order_id) REFERENCES orders(id); +ALTER TABLE order_items ADD CONSTRAINT fk_order_items__products FOREIGN KEY (product_id) REFERENCES products(id); + +/* Views */ +CREATE OR REPLACE VIEW order_info AS +select o.id as order_id + , o.order_date + , o.order_status + , o.paid_date + , o.payment_type + , o.shipped_date + , o.shipping_fee + , o.ship_name + , o.ship_address1 + , o.ship_address2 + , o.ship_city + , o.ship_state + , o.ship_postal_code + , o.ship_country + , o.customer_id + , o.employee_id + , concat(c.first_name, ' ', c.last_name) as customer_name + , c.phone customer_phone + , c.email customer_email + , c.company as customer_company + , concat(e.first_name, ' ', e.last_name) as employee_name + , e.department employee_department + , e.job_title employee_job_title + From orders o + , employees e + , customers c + where o.employee_id = e.id + and o.customer_id = c.id; + +CREATE OR REPLACE VIEW order_details AS +select oi.order_id + , oi.product_id + , oi.quantity + , oi.unit_price + , oi.discount + , oi.date_allocated + , oi.order_item_status + , o.order_date + , o.order_status + , o.paid_date + , o.payment_type + , o.shipped_date + , o.shipping_fee + , o.ship_name + , o.ship_address1 + , o.ship_address2 + , o.ship_city + , o.ship_state + , o.ship_postal_code + , o.ship_country + , p.product_code + , p.product_name + , p.category + , p.description + , p.list_price + , o.customer_id + , concat(c.first_name, ' ', c.last_name) as customer_name + , c.phone as customer_phone + , c.email as customer_email + , c.company as customer_company + , o.employee_id + , concat(e.first_name, ' ', e.last_name) as employee_name + , e.department as employee_department + , e.job_title as employee_job_title + From orders o + , products p + , order_items oi + , employees e + , customers c + where oi.order_id = o.id + and oi.product_id = p.id + and o.employee_id = e.id + and o.customer_id = c.id; + +CREATE OR REPLACE VIEW customer_orders AS +select o.order_date, o.order_status, o.paid_date, o.payment_type, o.shipping_fee, o.customer_id + , c.first_name customer_first_name, c.last_name customer_last_name, c.phone customer_phone, c.email customer_email, c.company + from orders o,customers c + where o.customer_id = c.id; + +CREATE OR REPLACE VIEW employee_orders AS +select o.order_date, o.order_status, o.paid_date, o.payment_type, o.shipping_fee, o.employee_id + , e.first_name employee_first_name, e.last_name employee_last_name, e.email employee_email, e.department + from orders o,employees e + where o.customer_id = e.id; + + + /* REAL_NET */ + CREATE TABLE RN_INSTRUCTOR ( + ID VARCHAR(20) NOT NULL AUTO_INCREMENT, + FIRST_NAME VARCHAR(20) NOT NULL, + LAST_NAME VARCHAR(20) NOT NULL, + EMAIL VARCHAR(20) NOT NULL, + CREATED_AT DATETIME, + UPDATED_AT DATETIME, + PRIMARY KEY (id) + ); + + /*==== EXTENSION FIELD ===*/ + CREATE TABLE RN_EXT_FIELD_T ( + ID int(11) NOT NULL AUTO_INCREMENT, + TYPE VARCHAR(20), + DATA_TYPE VARCHAR(20), + FIELD_NAME VARCHAR(20), + MAPPING VARCHAR(20), + FORM_CODE VARCHAR(20), + IS_ACTIVE BOOLEAN, + ACCOUNT_ID VARCHAR(20), + CREATED_AT DATETIME, + UPDATED_AT DATETIME, + CREATED_BY VARCHAR(20), + UPDATED_BY VARCHAR(20), + PRIMARY KEY (ID) +); + +/*========= lookup ======== +CREATE TABLE `rn_lookup_values_t` ( + `ID` int(11) NOT NULL AUTO_INCREMENT, + `LOOKUP_CODE` longtext, + `MEANING` longtext, + `DESCRIPTION` longtext, + `LOOKUP_TYPE` longtext, + `ACTIVE_START_DATE` datetime DEFAULT NULL, + `ACTIVE_END_DATE` datetime DEFAULT NULL, + `ENABLED_FLAG` longtext, + `CREATED_BY` int(11) DEFAULT NULL, + `CREATION_DATE` datetime DEFAULT NULL, + `LAST_UPDATED_BY` int(11) DEFAULT NULL, + `LAST_UPDATE_DATE` datetime DEFAULT NULL + PRIMARY KEY (`ID`) +); */ + + + +/*========= LOGGING ======== + +DROP TABLE logging_event_exception IF EXISTS; +DROP TABLE logging_event_property IF EXISTS; +DROP TABLE logging_event IF EXISTS; + +CREATE TABLE logging_event ( + timestmp BIGINT NOT NULL, + formatted_message LONGVARCHAR NOT NULL, + logger_name VARCHAR(256) NOT NULL, + level_string VARCHAR(256) NOT NULL, + thread_name VARCHAR(256), + reference_flag SMALLINT, + arg0 VARCHAR(256), + arg1 VARCHAR(256), + arg2 VARCHAR(256), + arg3 VARCHAR(256), + caller_filename VARCHAR(256), + caller_class VARCHAR(256), + caller_method VARCHAR(256), + caller_line CHAR(4), + event_id IDENTITY NOT NULL); + + +CREATE TABLE logging_event_property ( + event_id BIGINT NOT NULL, + mapped_key VARCHAR(254) NOT NULL, + mapped_value LONGVARCHAR, + PRIMARY KEY(event_id, mapped_key), + FOREIGN KEY (event_id) REFERENCES logging_event(event_id)); + +CREATE TABLE logging_event_exception ( + event_id BIGINT NOT NULL, + i SMALLINT NOT NULL, + trace_line VARCHAR(256) NOT NULL, + PRIMARY KEY(event_id, i), + FOREIGN KEY (event_id) REFERENCES logging_event(event_id)); */ \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/META-INF/MANIFEST.MF b/prod116rb-back-b/authsec_springboot/backend/target/classes/META-INF/MANIFEST.MF new file mode 100644 index 0000000..3281468 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/target/classes/META-INF/MANIFEST.MF @@ -0,0 +1,6 @@ +Manifest-Version: 1.0 +Build-Jdk-Spec: 17 +Implementation-Title: REAL IT SOLUTIONS +Implementation-Version: 1.0.0 +Created-By: Maven Integration for Eclipse + diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/META-INF/maven/com.realnet/app/pom.properties b/prod116rb-back-b/authsec_springboot/backend/target/classes/META-INF/maven/com.realnet/app/pom.properties new file mode 100644 index 0000000..793d6b3 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/target/classes/META-INF/maven/com.realnet/app/pom.properties @@ -0,0 +1,7 @@ +#Generated by Maven Integration for Eclipse +#Wed Jan 03 10:37:20 IST 2024 +m2e.projectLocation=/Users/Gaurav Kumar/Desktop/Workspace 2/app_builder/build_backend/cns-portal/code-extractor/builders/11096/index/demot1/demot1-test2-b/authsec_springboot/backend +m2e.projectName=app +groupId=com.realnet +artifactId=app +version=1.0.0 diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/META-INF/maven/com.realnet/app/pom.xml b/prod116rb-back-b/authsec_springboot/backend/target/classes/META-INF/maven/com.realnet/app/pom.xml new file mode 100644 index 0000000..3594c2c --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/target/classes/META-INF/maven/com.realnet/app/pom.xml @@ -0,0 +1,550 @@ + + 4.0.0 + com.realnet + app + jar + 1.0.0 + REAL IT SOLUTIONS + + 2.7.0 + UTF-8 + UTF-8 + 1.8 + + + org.springframework.boot + spring-boot-starter-parent + 2.2.5.RELEASE + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + org.springframework.boot + spring-boot-starter-mail + + + org.springframework.boot + spring-boot-starter-web + + + + org.springframework.boot + spring-boot-starter-aop + + + org.springframework.boot + spring-boot-starter-tomcat + provided + + + org.springframework.boot + spring-boot-starter-actuator + + + + io.springfox + springfox-swagger2 + 2.9.2 + + + io.swagger + swagger-annotations + + + io.swagger + swagger-models + + + + + org.apache.commons + commons-lang3 + 3.12.0 + + + com.googlecode.json-simple + json-simple + 1.1.1 + + + com.google.code.gson + gson + 2.8.5 + + + io.swagger + swagger-annotations + 1.5.22 + + + io.swagger + swagger-models + 1.5.22 + + + io.springfox + springfox-swagger-ui + 2.9.2 + + + + org.apache.pdfbox + pdfbox + 2.0.29 + + + + + + + + + + + mysql + mysql-connector-java + 8.0.28 + + + + org.springframework.boot + spring-boot-starter-security + + + org.springframework.boot + spring-boot-starter-data-jpa + + + org.springframework.boot + spring-boot-starter-validation + + + org.apache.poi + poi-ooxml + 4.1.2 + + + + org.apache.poi + poi-ooxml + 3.8-beta4 + + + org.apache.poi + poi-scratchpad + 3.9 + + + + + + org.apache.poi + poi + 4.1.2 + + + org.apache.poi + poi-ooxml + 4.1.2 + + + + + + org.springframework.boot + spring-boot-starter-jdbc + + + org.postgresql + postgresql + runtime + + + org.xerial + sqlite-jdbc + 3.25.2 + + + com.microsoft.sqlserver + mssql-jdbc + runtime + + + + org.springframework.boot + spring-boot-starter-websocket + + + org.springframework + spring-messaging + + + + org.springframework.boot + spring-boot-starter-cache + + + com.github.ben-manes.caffeine + caffeine + + + + com.h2database + h2 + runtime + + + org.slf4j + slf4j-api + + + + + org.springframework.security.oauth.boot + spring-security-oauth2-autoconfigure + 2.3.3.RELEASE + + + + org.springframework.security + spring-security-oauth2-client + + + org.springframework.social + spring-social-google + 1.0.0.RELEASE + + + org.springframework.social + spring-social-linkedin + 1.0.2.RELEASE + + + + + io.jsonwebtoken + jjwt + 0.9.0 + + + com.google.guava + guava + 23.5-jre + + + joda-time + joda-time + 2.9.9 + + + + + + + + com.fasterxml.jackson.core + jackson-core + 2.12.1 + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + org.modelmapper + modelmapper + 2.3.0 + + + org.codehaus.jackson + jackson-mapper-asl + 1.9.13 + + + commons-io + commons-io + 2.7 + + + + net.lingala.zip4j + zip4j + 2.6.1 + + + org.json + json + 20171018 + + + org.projectlombok + lombok + 1.18.20 + provided + + + javax.xml.bind + jaxb-api + 2.3.0 + + + org.springframework.boot + spring-boot-devtools + + + + org.apache.httpcomponents + httpclient + 4.5.13 + + + + + org.apache.clerezza.ext + org.json.simple + 0.4 + + + commons-codec + commons-codec + 1.10 + + + org.springframework.boot + spring-boot-starter-webflux + + + + + org.apache.poi + poi + 4.1.2 + + + + org.apache.poi + ooxml-schemas + 1.4 + + + + org.json + json + 20201115 + + + com.jcraft + jsch + 0.1.55 + + + org.json + json + 20201115 + + + + org.json + json + 20201115 + + + + com.twilio.sdk + twilio + 8.18.0 + + + + org.xhtmlrenderer + flying-saucer-pdf + 9.1.22 + + + + + com.lowagie + itext + 2.1.7 + + + + + + org.seleniumhq.selenium + selenium-java + 3.141.59 + + + + + com.itextpdf + itextpdf + 5.5.13.2 + + + + + org.postgresql + postgresql + 42.2.24 + + + + + org.mariadb.jdbc + mariadb-java-client + 3.1.2 + + + + + com.ibm.db2 + jcc + 11.5.5.0 + + + + + org.mongodb + mongo-java-driver + 3.12.12 + + + + + redis.clients + jedis + 3.7.0 + + + + + + + + + + org.firebirdsql.jdbc + jaybird + 4.0.0.java11 + + + + + + + com.orientechnologies + orientdb-core + 3.2.19 + + + + + com.orientechnologies + orientdb-jdbc + 3.2.19 + + + + + software.amazon.awssdk + dynamodb + 2.17.102 + + + + + com.couchbase.client + java-client + 3.1.5 + + + io.projectreactor + reactor-core + 3.4.13 + + + + + org.neo4j + neo4j-jdbc-bolt + 5.0.0 + + + + + com.paytm.pg + paytm-checksum + 1.2.1 + + + + com.razorpay + razorpay-java + 1.4.4 + + + + + org.springframework + spring-test + + + + + org.apache.pdfbox + pdfbox + 2.0.28 + + + + + org.apache.xmlgraphics + fop + 2.6 + + + + org.apache.commons + commons-csv + 1.4 + + + + + com.googlecode.json-simple + json-simple + 1.1.1 + + + + com.opencsv + opencsv + 5.5 + + + + diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/MyprojectUI_view.properties b/prod116rb-back-b/authsec_springboot/backend/target/classes/MyprojectUI_view.properties new file mode 100644 index 0000000..e69de29 diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/application.properties b/prod116rb-back-b/authsec_springboot/backend/target/classes/application.properties new file mode 100644 index 0000000..622cfdf --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/target/classes/application.properties @@ -0,0 +1,113 @@ +# File is used by sprigboot +server.contextPath=/* +server.port=9292 +spring.resources.static-locations=classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/,classpath:/webui/ + +spring.banner.location=classpath:banner_txt.txt + +#Temporary disable security to enable it remove this +#security.ignored=/** + +springfox.documentation.swagger.v2.path=/api-docs +spring.jackson.date-format=yyyy-MM-dd + + + +System.Net.ServicePointManager.Expect100Continue = false; + + #spring.jpa.hibernate.ddl-auto=none +#spring.jpa.hibernate.ddl-auto=update +#spring.datasource.continue-on-error=false + +# **** MY SQL DATABASE CONNECTION **** + +spring.datasource.url=jdbc:mysql://realnet.cdtynkxfiu2h.ap-south-1.rds.amazonaws.com:3306/realnet_CNSBENEW?createDatabaseIfNotExist=true +spring.datasource.username=cnsdev +spring.datasource.password=cnsdev1234 + +spring.datasource.driverClassName = com.mysql.cj.jdbc.Driver + +spring.jpa.hibernate.ddl-auto=update +spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5InnoDBDialect + + +#spring.jpa.show-sql=true +spring.jpa.properties.hibernate.format_sql=true +spring.jpa.properties.hibernate.proc.param_null_passing=true + +# **********paytm dependency ****** +razorpay.api.key=rzp_test_xVnrBUjJWTEH0r +razorpay.api.secret=evTXkIFcgpVtiLa1P7M7CIox + +#***** MAIL SENDER +spring.mail.host=smtp.gmail.com +spring.mail.username=realitmailsender@gmail.com +spring.mail.password=epnmhzsccotnyozf +spring.mail.port=587 +#spring.mail.properties.mail.smtp.auth=true +spring.mail.properties.mail.smtp.starttls.enable=true +spring.mail.properties.mail.smtp.starttls.required=true + +# JACKSON +spring.jackson.serialization.FAIL_ON_EMPTY_BEANS=false + + +spring.mail.properties.mail.smtp.auth = true +spring.mail.properties.mail.smtp.socketFactory.port = 465 +spring.mail.properties.mail.smtp.socketFactory.class = javax.net.ssl.SSLSocketFactory +spring.mail.properties.mail.smtp.socketFactory.fallback = false + +#******* MULTIPART RESOLVER +spring.servlet.multipart.enabled=true +spring.servlet.multipart.max-file-size=100MB +spring.servlet.multipart.max-request-size=100MB + +#***************OAUTH2 SOCIAL LOGIN ********* +# Social login provider props +spring.security.oauth2.client.registration.google.clientId=437023664181-0lm0ipgip3qbhga4nd7o4128jv4g2nv9.apps.googleusercontent.com +spring.security.oauth2.client.registration.google.clientSecret=I1HPyUqdJ9UONu45W1_wwfww +spring.security.oauth2.client.registration.google.scope=profile, email + + +spring.security.oauth2.client.registration.linkedin.clientId= +spring.security.oauth2.client.registration.linkedin.clientSecret= +spring.security.oauth2.client.registration.linkedin.client-authentication-method=post +spring.security.oauth2.client.registration.linkedin.authorization-grant-type=authorization_code +spring.security.oauth2.client.registration.linkedin.scope=r_liteprofile, r_emailaddress +spring.security.oauth2.client.registration.linkedin.redirect-uri={baseUrl}/login/oauth2/code/{registrationId} +spring.security.oauth2.client.registration.linkedin.client-name=Linkedin +spring.security.oauth2.client.registration.linkedin.provider=linkedin +spring.security.oauth2.client.provider.linkedin.authorization-uri=https://www.linkedin.com/oauth/v2/authorization +spring.security.oauth2.client.provider.linkedin.token-uri=https://www.linkedin.com/oauth/v2/accessToken +spring.security.oauth2.client.provider.linkedin.user-info-uri=https://api.linkedin.com/v2/me +spring.security.oauth2.client.provider.linkedin.user-name-attribute=id +linkedin.email-address-uri=https://api.linkedin.com/v2/emailAddress?q=members&projection=(elements*(handle~)) +app.auth.tokenSecret=926D96C90030DD58429D2751AC1BDBBC +app.auth.tokenExpirationMsec=864000000 + # After successfully authenticating with the OAuth2 Provider, + # we'll be generating an auth token for the user and sending the token to the + # redirectUri mentioned by the frontend client in the /oauth2/authorization request. + # We're not using cookies because they won't work well in mobile clients. +app.oauth2.authorizedRedirectUris=http://localhost:8081/oauth2/redirect,myandroidapp://oauth2/redirect,myiosapp://oauth2/redirect + +#projectPath=G:/cnsbetawithcardiant/springboot + + + +#projectPath=D:/Office Project/BACKUP PROJECT/Angular-SpringBoot-REST-JWT-master +#ANGULAR PROJECT PATH +#angularProjectPath=G:/cnsbetawithcardiant/springboot/frontend/angular-ui +# +#spring.cache.cache-names=instruments, directory +#spring.cache.caffeine.spec=maximumSize=500, expireAfterAccess=30s +#projectPath=/data +projectPath=/Users/Gaurav Kumar/Desktop/Workspace 2/app_builder/build_backend/cns-portal/code-extractor/builders/11096/index/demot1/demot1-test2-b/authsec_springboot/backend +angularProjectPath=/Users/Gaurav Kumar/Desktop/Workspace 2/app_builder/build_backend/cns-portal/code-extractor/builders/11096/index/demot1/demot1-test2-b/authsec_springboot/backend/webui +#projectPath=G:/foldername/backend +#angularProjectPath=G:/foldername/backend/webui +#imagePath=/frontend/angular-ui/src/assets/images/ +#server.ssl.key-alias=selfsigned +#server.ssl.key-store-type=JKS +#server.ssl.key-store-password=changeit +#server.ssl.key-store=classpath:keystore.jks + diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/banner_txt.txt b/prod116rb-back-b/authsec_springboot/backend/target/classes/banner_txt.txt new file mode 100644 index 0000000..5c9c817 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/target/classes/banner_txt.txt @@ -0,0 +1,11 @@ +******************************************************************* +******************************************************************* + __ _ ____ __ __ __ + / \ \ | |__****** / ___| **** ****_ \ \ \ \ \ \ + / / \ \ | '_ \ / _ \ \___ \| | | | '__|/ _ \ \ \ \ \ \ \ + \ \ / / | |_) | __/ ___) | |_| | | | __/ / / / / / / + \ /_/ |_.__/ \___| |____/ \__,_|_| \___| /_/ /_/ /_/ + *** *** ***** +******************************************************************* +::SPRING BOOT:: CNS Version::v1.1.0 RELEASE +******************************************************************* \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Controllers/ApprovalHistory_Controller.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Controllers/ApprovalHistory_Controller.class new file mode 100644 index 0000000..a20a769 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Controllers/ApprovalHistory_Controller.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Controllers/ApprovalQueue_Controller.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Controllers/ApprovalQueue_Controller.class new file mode 100644 index 0000000..3657f0a Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Controllers/ApprovalQueue_Controller.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Dto/ApprovalNote_SO.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Dto/ApprovalNote_SO.class new file mode 100644 index 0000000..71d99f1 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Dto/ApprovalNote_SO.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Dto/ApprovalQueue_SO.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Dto/ApprovalQueue_SO.class new file mode 100644 index 0000000..306a7a3 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Dto/ApprovalQueue_SO.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Dto/BillingPeriodsResponse.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Dto/BillingPeriodsResponse.class new file mode 100644 index 0000000..d713a11 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Dto/BillingPeriodsResponse.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Dto/ServiceOrderDto.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Dto/ServiceOrderDto.class new file mode 100644 index 0000000..528f52a Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Dto/ServiceOrderDto.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Dto/ServiceWithDiscount.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Dto/ServiceWithDiscount.class new file mode 100644 index 0000000..f36dfac Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Dto/ServiceWithDiscount.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Entitys/ApprovalHistory_t.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Entitys/ApprovalHistory_t.class new file mode 100644 index 0000000..77d5a23 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Entitys/ApprovalHistory_t.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Entitys/BillingPeriods_t.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Entitys/BillingPeriods_t.class new file mode 100644 index 0000000..7d82f5b Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Entitys/BillingPeriods_t.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Entitys/CustomerRates_t.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Entitys/CustomerRates_t.class new file mode 100644 index 0000000..d16bff3 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Entitys/CustomerRates_t.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Job/Entity/BillingJobEntity.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Job/Entity/BillingJobEntity.class new file mode 100644 index 0000000..e865699 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Job/Entity/BillingJobEntity.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Job/Repository/BillingJobRepository.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Job/Repository/BillingJobRepository.class new file mode 100644 index 0000000..1efc545 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Job/Repository/BillingJobRepository.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Repositorys/ApprovalHistory_Repository.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Repositorys/ApprovalHistory_Repository.class new file mode 100644 index 0000000..f8bbec6 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Repositorys/ApprovalHistory_Repository.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Repositorys/ApprovalQueue_Repository.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Repositorys/ApprovalQueue_Repository.class new file mode 100644 index 0000000..d2eee5c Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Repositorys/ApprovalQueue_Repository.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Repositorys/ApprovalReturnHistory_Repo.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Repositorys/ApprovalReturnHistory_Repo.class new file mode 100644 index 0000000..7ae75f6 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Repositorys/ApprovalReturnHistory_Repo.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Services/ApprovalHistory_Service.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Services/ApprovalHistory_Service.class new file mode 100644 index 0000000..6e0fad4 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Services/ApprovalHistory_Service.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Services/ApprovalQueueService.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Services/ApprovalQueueService.class new file mode 100644 index 0000000..91a7ddc Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Billing/Services/ApprovalQueueService.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard1/Controller/Dashbord1Controller.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard1/Controller/Dashbord1Controller.class new file mode 100644 index 0000000..118b86d Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard1/Controller/Dashbord1Controller.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard1/Entity/Dashbord1_Line.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard1/Entity/Dashbord1_Line.class new file mode 100644 index 0000000..d6aa76d Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard1/Entity/Dashbord1_Line.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard1/Entity/Dashbord_Header.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard1/Entity/Dashbord_Header.class new file mode 100644 index 0000000..e2412fd Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard1/Entity/Dashbord_Header.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard1/Entity/dashbord_Who_collumn.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard1/Entity/dashbord_Who_collumn.class new file mode 100644 index 0000000..f84be9a Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard1/Entity/dashbord_Who_collumn.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard1/Repository/Dashboard_lineRepository.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard1/Repository/Dashboard_lineRepository.class new file mode 100644 index 0000000..5fb7d74 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard1/Repository/Dashboard_lineRepository.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard1/Repository/HeaderRepository.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard1/Repository/HeaderRepository.class new file mode 100644 index 0000000..d684f01 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard1/Repository/HeaderRepository.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard1/Service/HeaderService.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard1/Service/HeaderService.class new file mode 100644 index 0000000..807c916 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard1/Service/HeaderService.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard_builder/Controllers/ChartBuilder.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard_builder/Controllers/ChartBuilder.class new file mode 100644 index 0000000..a675b30 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard_builder/Controllers/ChartBuilder.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard_builder/Controllers/DashboardSchedule_Controller.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard_builder/Controllers/DashboardSchedule_Controller.class new file mode 100644 index 0000000..2673940 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard_builder/Controllers/DashboardSchedule_Controller.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard_builder/Controllers/Dashboard_builder_Controller.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard_builder/Controllers/Dashboard_builder_Controller.class new file mode 100644 index 0000000..fce53b4 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard_builder/Controllers/Dashboard_builder_Controller.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard_builder/Entity/DashboardSchedule_t.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard_builder/Entity/DashboardSchedule_t.class new file mode 100644 index 0000000..e1e407e Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard_builder/Entity/DashboardSchedule_t.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard_builder/Entity/Dashboard_builder_t.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard_builder/Entity/Dashboard_builder_t.class new file mode 100644 index 0000000..c2d4873 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard_builder/Entity/Dashboard_builder_t.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard_builder/Repository/DashboardSchedule_Repository.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard_builder/Repository/DashboardSchedule_Repository.class new file mode 100644 index 0000000..7270bcb Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard_builder/Repository/DashboardSchedule_Repository.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard_builder/Repository/Dashboard_builder_Repository.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard_builder/Repository/Dashboard_builder_Repository.class new file mode 100644 index 0000000..012a84c Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard_builder/Repository/Dashboard_builder_Repository.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard_builder/Services/DashboardSchedule_Service.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard_builder/Services/DashboardSchedule_Service.class new file mode 100644 index 0000000..54ab5ea Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard_builder/Services/DashboardSchedule_Service.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard_builder/Services/Dashboard_builder_Service.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard_builder/Services/Dashboard_builder_Service.class new file mode 100644 index 0000000..b8b325d Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Dashboard_builder/Services/Dashboard_builder_Service.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/FileUpload/Controllers/UploadeddocsController.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/FileUpload/Controllers/UploadeddocsController.class new file mode 100644 index 0000000..9c02a5b Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/FileUpload/Controllers/UploadeddocsController.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/FileUpload/Entity/Uploadeddocs.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/FileUpload/Entity/Uploadeddocs.class new file mode 100644 index 0000000..35e267b Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/FileUpload/Entity/Uploadeddocs.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/FileUpload/Entity/who_column.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/FileUpload/Entity/who_column.class new file mode 100644 index 0000000..cd6c65e Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/FileUpload/Entity/who_column.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/FileUpload/Repository/UploadFileRepository.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/FileUpload/Repository/UploadFileRepository.class new file mode 100644 index 0000000..534652b Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/FileUpload/Repository/UploadFileRepository.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/FileUpload/Services/FileuploadService.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/FileUpload/Services/FileuploadService.class new file mode 100644 index 0000000..7c8af71 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/FileUpload/Services/FileuploadService.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/FileUpload/Services/UploadedFileService.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/FileUpload/Services/UploadedFileService.class new file mode 100644 index 0000000..dcd6c23 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/FileUpload/Services/UploadedFileService.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/FromExtensionJson/Controllers/FromExtensionJson_Controller.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/FromExtensionJson/Controllers/FromExtensionJson_Controller.class new file mode 100644 index 0000000..15dff1a Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/FromExtensionJson/Controllers/FromExtensionJson_Controller.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/FromExtensionJson/Entity/FromExtensionJson_t.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/FromExtensionJson/Entity/FromExtensionJson_t.class new file mode 100644 index 0000000..7f0e069 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/FromExtensionJson/Entity/FromExtensionJson_t.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/FromExtensionJson/Repository/FromExtensionJson_Repository.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/FromExtensionJson/Repository/FromExtensionJson_Repository.class new file mode 100644 index 0000000..4bf09a5 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/FromExtensionJson/Repository/FromExtensionJson_Repository.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/FromExtensionJson/Services/FromExtensionJson_Service.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/FromExtensionJson/Services/FromExtensionJson_Service.class new file mode 100644 index 0000000..d280180 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/FromExtensionJson/Services/FromExtensionJson_Service.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Gaurav_testing/Controllers/Gaurav_testing_Controller.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Gaurav_testing/Controllers/Gaurav_testing_Controller.class new file mode 100644 index 0000000..c5385ae Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Gaurav_testing/Controllers/Gaurav_testing_Controller.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Gaurav_testing/Entity/Gaurav_testing_t.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Gaurav_testing/Entity/Gaurav_testing_t.class new file mode 100644 index 0000000..5d028e5 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Gaurav_testing/Entity/Gaurav_testing_t.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Gaurav_testing/Repository/Gaurav_testing_Repository.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Gaurav_testing/Repository/Gaurav_testing_Repository.class new file mode 100644 index 0000000..92d4372 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Gaurav_testing/Repository/Gaurav_testing_Repository.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Gaurav_testing/Services/Gaurav_testing_Service.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Gaurav_testing/Services/Gaurav_testing_Service.class new file mode 100644 index 0000000..3b6a0a9 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Gaurav_testing/Services/Gaurav_testing_Service.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Payment/Paytm/AppConfig.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Payment/Paytm/AppConfig.class new file mode 100644 index 0000000..b0dc42a Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Payment/Paytm/AppConfig.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Payment/Paytm/PaytmPayment.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Payment/Paytm/PaytmPayment.class new file mode 100644 index 0000000..e201751 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Payment/Paytm/PaytmPayment.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Payment/Razorpay/RazorpayController.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Payment/Razorpay/RazorpayController.class new file mode 100644 index 0000000..677e6f2 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Payment/Razorpay/RazorpayController.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Payment/Razorpay/RazorpayDTO$RazorpayDTOBuilder.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Payment/Razorpay/RazorpayDTO$RazorpayDTOBuilder.class new file mode 100644 index 0000000..434b8a7 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Payment/Razorpay/RazorpayDTO$RazorpayDTOBuilder.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Payment/Razorpay/RazorpayDTO.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Payment/Razorpay/RazorpayDTO.class new file mode 100644 index 0000000..34b1d01 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Payment/Razorpay/RazorpayDTO.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Payment/Razorpay/RazorpayRepo.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Payment/Razorpay/RazorpayRepo.class new file mode 100644 index 0000000..9a808f7 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Payment/Razorpay/RazorpayRepo.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/RealNetApp.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/RealNetApp.class new file mode 100644 index 0000000..316e173 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/RealNetApp.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Rpt_builder/Controllers/FileConverterController.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Rpt_builder/Controllers/FileConverterController.class new file mode 100644 index 0000000..189a89f Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Rpt_builder/Controllers/FileConverterController.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Rpt_builder/Controllers/Rpt_builder_Controller.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Rpt_builder/Controllers/Rpt_builder_Controller.class new file mode 100644 index 0000000..7aa2771 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Rpt_builder/Controllers/Rpt_builder_Controller.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Rpt_builder/Entity/Rpt_builder_t.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Rpt_builder/Entity/Rpt_builder_t.class new file mode 100644 index 0000000..8e0fca7 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Rpt_builder/Entity/Rpt_builder_t.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Rpt_builder/Repository/Rpt_builder_Repository.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Rpt_builder/Repository/Rpt_builder_Repository.class new file mode 100644 index 0000000..4898756 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Rpt_builder/Repository/Rpt_builder_Repository.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Rpt_builder/Services/Rpt_builder_Service.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Rpt_builder/Services/Rpt_builder_Service.class new file mode 100644 index 0000000..2bd5b43 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Rpt_builder/Services/Rpt_builder_Service.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Rpt_builder2/Controllers/ReportHtmlController.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Rpt_builder2/Controllers/ReportHtmlController.class new file mode 100644 index 0000000..3592d38 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Rpt_builder2/Controllers/ReportHtmlController.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Rpt_builder2/Controllers/Rpt_builder2_Controller.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Rpt_builder2/Controllers/Rpt_builder2_Controller.class new file mode 100644 index 0000000..483d34e Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Rpt_builder2/Controllers/Rpt_builder2_Controller.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Rpt_builder2/Entity/Rpt_builder2_t.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Rpt_builder2/Entity/Rpt_builder2_t.class new file mode 100644 index 0000000..09cdfe1 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Rpt_builder2/Entity/Rpt_builder2_t.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Rpt_builder2/Repository/Rpt_builder2_Repository.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Rpt_builder2/Repository/Rpt_builder2_Repository.class new file mode 100644 index 0000000..63b2340 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Rpt_builder2/Repository/Rpt_builder2_Repository.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Rpt_builder2/Services/Rpt_builder2_Service.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Rpt_builder2/Services/Rpt_builder2_Service.class new file mode 100644 index 0000000..02a7846 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Rpt_builder2/Services/Rpt_builder2_Service.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Rpt_builder2_lines/Controllers/Rpt_builder2_lines_Controller.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Rpt_builder2_lines/Controllers/Rpt_builder2_lines_Controller.class new file mode 100644 index 0000000..af3ced6 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Rpt_builder2_lines/Controllers/Rpt_builder2_lines_Controller.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Rpt_builder2_lines/Entity/Rpt_builder2_lines_t.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Rpt_builder2_lines/Entity/Rpt_builder2_lines_t.class new file mode 100644 index 0000000..b5a2aac Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Rpt_builder2_lines/Entity/Rpt_builder2_lines_t.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Rpt_builder2_lines/Repository/Rpt_builder2_lines_Repository.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Rpt_builder2_lines/Repository/Rpt_builder2_lines_Repository.class new file mode 100644 index 0000000..284f79d Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Rpt_builder2_lines/Repository/Rpt_builder2_lines_Repository.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Rpt_builder2_lines/Services/Rpt_builder2_lines_Service.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Rpt_builder2_lines/Services/Rpt_builder2_lines_Service.class new file mode 100644 index 0000000..de44f6a Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/Rpt_builder2_lines/Services/Rpt_builder2_lines_Service.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/SequenceGenerator/Controller/SequenceController.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/SequenceGenerator/Controller/SequenceController.class new file mode 100644 index 0000000..7550090 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/SequenceGenerator/Controller/SequenceController.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/SequenceGenerator/Entity/Sequence.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/SequenceGenerator/Entity/Sequence.class new file mode 100644 index 0000000..3bd1f8c Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/SequenceGenerator/Entity/Sequence.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/SequenceGenerator/Service/SequenceService.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/SequenceGenerator/Service/SequenceService.class new file mode 100644 index 0000000..bc31807 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/SequenceGenerator/Service/SequenceService.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/SequenceGenerator/repo/SeqRepo.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/SequenceGenerator/repo/SeqRepo.class new file mode 100644 index 0000000..ee9d1c7 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/SequenceGenerator/repo/SeqRepo.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/WhoCollumn/Who_collumn.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/WhoCollumn/Who_collumn.class new file mode 100644 index 0000000..23152ca Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/WhoCollumn/Who_collumn.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/config/AppConfig.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/config/AppConfig.class new file mode 100644 index 0000000..fa5a211 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/config/AppConfig.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/config/CorsFilter.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/config/CorsFilter.class new file mode 100644 index 0000000..1abb6bc Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/config/CorsFilter.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/config/EmailService.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/config/EmailService.class new file mode 100644 index 0000000..fbc7008 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/config/EmailService.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/config/JWTConstant.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/config/JWTConstant.class new file mode 100644 index 0000000..d4cbe0f Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/config/JWTConstant.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/config/JwtAuthenticationEntryPoint.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/config/JwtAuthenticationEntryPoint.class new file mode 100644 index 0000000..ce78d8d Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/config/JwtAuthenticationEntryPoint.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/config/JwtAuthenticationFilter.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/config/JwtAuthenticationFilter.class new file mode 100644 index 0000000..f5736ac Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/config/JwtAuthenticationFilter.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/config/MessageSourceConfig.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/config/MessageSourceConfig.class new file mode 100644 index 0000000..312f9a3 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/config/MessageSourceConfig.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/config/SecurityConfig.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/config/SecurityConfig.class new file mode 100644 index 0000000..b1c8b65 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/config/SecurityConfig.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/config/SwaggerConfig.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/config/SwaggerConfig.class new file mode 100644 index 0000000..248486d Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/config/SwaggerConfig.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/config/TokenProvider.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/config/TokenProvider.class new file mode 100644 index 0000000..52f41cf Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/config/TokenProvider.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/dashboard_builder_authsec/Controllers/DashboardController.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/dashboard_builder_authsec/Controllers/DashboardController.class new file mode 100644 index 0000000..43bcd6b Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/dashboard_builder_authsec/Controllers/DashboardController.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/dashboard_builder_authsec/Entity/Dashboard.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/dashboard_builder_authsec/Entity/Dashboard.class new file mode 100644 index 0000000..a42f6ac Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/dashboard_builder_authsec/Entity/Dashboard.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/dashboard_builder_authsec/Entity/Extension.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/dashboard_builder_authsec/Entity/Extension.class new file mode 100644 index 0000000..6dcb072 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/dashboard_builder_authsec/Entity/Extension.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/dashboard_builder_authsec/Entity/who_column.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/dashboard_builder_authsec/Entity/who_column.class new file mode 100644 index 0000000..282c87e Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/dashboard_builder_authsec/Entity/who_column.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/dashboard_builder_authsec/Repository/DashboardRepository.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/dashboard_builder_authsec/Repository/DashboardRepository.class new file mode 100644 index 0000000..bdc8c3e Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/dashboard_builder_authsec/Repository/DashboardRepository.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/dashboard_builder_authsec/Services/DashboardService.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/dashboard_builder_authsec/Services/DashboardService.class new file mode 100644 index 0000000..2eebca1 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/dashboard_builder_authsec/Services/DashboardService.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/exceptions/InvalidUserDataException.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/exceptions/InvalidUserDataException.class new file mode 100644 index 0000000..d93a02b Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/exceptions/InvalidUserDataException.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/exceptions/ResourceNotFoundException.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/exceptions/ResourceNotFoundException.class new file mode 100644 index 0000000..536c221 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/exceptions/ResourceNotFoundException.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/exceptions/StorageException.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/exceptions/StorageException.class new file mode 100644 index 0000000..9bd0874 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/exceptions/StorageException.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd.zip b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd.zip new file mode 100644 index 0000000..763a988 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd.zip differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/controller/MainController.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/controller/MainController.class new file mode 100644 index 0000000..82354c7 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/controller/MainController.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/controller/Rn_DynamicTransactionController.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/controller/Rn_DynamicTransactionController.class new file mode 100644 index 0000000..da2902d Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/controller/Rn_DynamicTransactionController.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/controller/Rn_ExtensionController.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/controller/Rn_ExtensionController.class new file mode 100644 index 0000000..3baaadd Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/controller/Rn_ExtensionController.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/controller/Rn_Forms_Setup_Controller.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/controller/Rn_Forms_Setup_Controller.class new file mode 100644 index 0000000..ec67251 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/controller/Rn_Forms_Setup_Controller.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/controller/Rn_Function_Register_Controller.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/controller/Rn_Function_Register_Controller.class new file mode 100644 index 0000000..184d39d Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/controller/Rn_Function_Register_Controller.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/controller/Rn_Main_Menu_Controller.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/controller/Rn_Main_Menu_Controller.class new file mode 100644 index 0000000..9968731 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/controller/Rn_Main_Menu_Controller.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/controller/Rn_Menu_Group_Controller.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/controller/Rn_Menu_Group_Controller.class new file mode 100644 index 0000000..92eb836 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/controller/Rn_Menu_Group_Controller.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/controller/Rn_Menu_Group_Line_Controller.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/controller/Rn_Menu_Group_Line_Controller.class new file mode 100644 index 0000000..c702282 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/controller/Rn_Menu_Group_Line_Controller.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/controller/Rn_Menu_Register_Controller.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/controller/Rn_Menu_Register_Controller.class new file mode 100644 index 0000000..f73defd Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/controller/Rn_Menu_Register_Controller.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/controller1/LoadMenuController.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/controller1/LoadMenuController.class new file mode 100644 index 0000000..4866538 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/controller1/LoadMenuController.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/controller1/MenuController.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/controller1/MenuController.class new file mode 100644 index 0000000..bc58be9 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/controller1/MenuController.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/DropDownDTO.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/DropDownDTO.class new file mode 100644 index 0000000..f772784 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/DropDownDTO.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Error.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Error.class new file mode 100644 index 0000000..5d68e8e Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Error.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/ErrorPojo.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/ErrorPojo.class new file mode 100644 index 0000000..13dab1c Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/ErrorPojo.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/ModuleCopyDTO.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/ModuleCopyDTO.class new file mode 100644 index 0000000..3e90af5 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/ModuleCopyDTO.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Modulemini.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Modulemini.class new file mode 100644 index 0000000..c728307 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Modulemini.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/ProjectMini.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/ProjectMini.class new file mode 100644 index 0000000..187ff07 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/ProjectMini.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_AuditEntity.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_AuditEntity.class new file mode 100644 index 0000000..2ad35e1 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_AuditEntity.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_Dynamic_Transaction.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_Dynamic_Transaction.class new file mode 100644 index 0000000..b12f561 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_Dynamic_Transaction.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_Ext_Fields.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_Ext_Fields.class new file mode 100644 index 0000000..e81024f Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_Ext_Fields.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_ExtensionEntity.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_ExtensionEntity.class new file mode 100644 index 0000000..05a8895 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_ExtensionEntity.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_FlexEntity.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_FlexEntity.class new file mode 100644 index 0000000..da43d34 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_FlexEntity.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_Forms_Component_Setup.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_Forms_Component_Setup.class new file mode 100644 index 0000000..20d815f Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_Forms_Component_Setup.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_Forms_Setup.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_Forms_Setup.class new file mode 100644 index 0000000..8d48615 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_Forms_Setup.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_Function_Register.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_Function_Register.class new file mode 100644 index 0000000..23b5a0a Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_Function_Register.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_Instance_Type.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_Instance_Type.class new file mode 100644 index 0000000..9e8d1a2 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_Instance_Type.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_Lookup_Values.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_Lookup_Values.class new file mode 100644 index 0000000..1ab580b Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_Lookup_Values.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_Main_Menu.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_Main_Menu.class new file mode 100644 index 0000000..9409118 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_Main_Menu.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_Menu_Group_Header.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_Menu_Group_Header.class new file mode 100644 index 0000000..9ce0a52 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_Menu_Group_Header.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_Menu_Group_Line.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_Menu_Group_Line.class new file mode 100644 index 0000000..f9e1a30 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_Menu_Group_Line.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_Menu_Register.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_Menu_Register.class new file mode 100644 index 0000000..6125a20 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_Menu_Register.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_Sub_Menu.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_Sub_Menu.class new file mode 100644 index 0000000..7f24d1e Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_Sub_Menu.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_Who_AccId_Column.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_Who_AccId_Column.class new file mode 100644 index 0000000..fb0858b Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_Who_AccId_Column.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_Who_Columns.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_Who_Columns.class new file mode 100644 index 0000000..abdfd11 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Rn_Who_Columns.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/SingleSerise.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/SingleSerise.class new file mode 100644 index 0000000..f16f4f9 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/SingleSerise.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Success.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Success.class new file mode 100644 index 0000000..80cc292 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Success.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/SuccessPojo.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/SuccessPojo.class new file mode 100644 index 0000000..9e77572 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/SuccessPojo.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Version.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Version.class new file mode 100644 index 0000000..936601b Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/Version.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/WireFrameCopyDTO.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/WireFrameCopyDTO.class new file mode 100644 index 0000000..cf1b3bc Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/WireFrameCopyDTO.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/projectCopyDTO.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/projectCopyDTO.class new file mode 100644 index 0000000..a88bc35 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity/projectCopyDTO.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity1/ExtensionModel.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity1/ExtensionModel.class new file mode 100644 index 0000000..c4e92b0 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity1/ExtensionModel.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity1/GrpMenuAccess.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity1/GrpMenuAccess.class new file mode 100644 index 0000000..ae29bbc Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity1/GrpMenuAccess.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity1/GrpMenuAccesscompositeKey.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity1/GrpMenuAccesscompositeKey.class new file mode 100644 index 0000000..8e4a083 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity1/GrpMenuAccesscompositeKey.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity1/MIXMENUN.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity1/MIXMENUN.class new file mode 100644 index 0000000..d4e46d5 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity1/MIXMENUN.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity1/MenuDet.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity1/MenuDet.class new file mode 100644 index 0000000..3fef50d Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity1/MenuDet.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity1/MixMenu.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity1/MixMenu.class new file mode 100644 index 0000000..bc7cff5 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity1/MixMenu.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity1/MixMenuNew.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity1/MixMenuNew.class new file mode 100644 index 0000000..d926680 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity1/MixMenuNew.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity1/menudet_who.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity1/menudet_who.class new file mode 100644 index 0000000..7b7e9db Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/entity1/menudet_who.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/repository/ExtFieldRepository.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/repository/ExtFieldRepository.class new file mode 100644 index 0000000..caa214e Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/repository/ExtFieldRepository.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/repository/LookUpRepository.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/repository/LookUpRepository.class new file mode 100644 index 0000000..7b5fb63 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/repository/LookUpRepository.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/repository/RnGroupLineRepository.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/repository/RnGroupLineRepository.class new file mode 100644 index 0000000..21ea083 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/repository/RnGroupLineRepository.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/repository/Rn_DynamicTransactionRepository.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/repository/Rn_DynamicTransactionRepository.class new file mode 100644 index 0000000..02ef65e Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/repository/Rn_DynamicTransactionRepository.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/repository/Rn_Forms_Setup_Repository.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/repository/Rn_Forms_Setup_Repository.class new file mode 100644 index 0000000..8994827 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/repository/Rn_Forms_Setup_Repository.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/repository/Rn_Function_Register_Repository.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/repository/Rn_Function_Register_Repository.class new file mode 100644 index 0000000..1143d06 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/repository/Rn_Function_Register_Repository.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/repository/Rn_InstanceTypeRepository.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/repository/Rn_InstanceTypeRepository.class new file mode 100644 index 0000000..5c1ae19 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/repository/Rn_InstanceTypeRepository.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/repository/Rn_LookUpRepository.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/repository/Rn_LookUpRepository.class new file mode 100644 index 0000000..6bf95af Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/repository/Rn_LookUpRepository.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/repository/Rn_Main_Menu_Repository.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/repository/Rn_Main_Menu_Repository.class new file mode 100644 index 0000000..fcde68d Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/repository/Rn_Main_Menu_Repository.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/repository/Rn_Menu_Group_Repository.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/repository/Rn_Menu_Group_Repository.class new file mode 100644 index 0000000..8d979c9 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/repository/Rn_Menu_Group_Repository.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/repository/Rn_Menu_Register_Repository.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/repository/Rn_Menu_Register_Repository.class new file mode 100644 index 0000000..2bccd39 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/repository/Rn_Menu_Register_Repository.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/repository1/GrpMenuAccessRepository.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/repository1/GrpMenuAccessRepository.class new file mode 100644 index 0000000..dc43e56 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/repository1/GrpMenuAccessRepository.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/repository1/MenuDetRepository.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/repository1/MenuDetRepository.class new file mode 100644 index 0000000..b76418c Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/repository1/MenuDetRepository.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/response/CustomResponse.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/response/CustomResponse.class new file mode 100644 index 0000000..7d4097d Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/response/CustomResponse.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/response/EntityResponse.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/response/EntityResponse.class new file mode 100644 index 0000000..320cc64 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/response/EntityResponse.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/response/OperationResponse$ResponseStatusEnum.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/response/OperationResponse$ResponseStatusEnum.class new file mode 100644 index 0000000..33014ac Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/response/OperationResponse$ResponseStatusEnum.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/response/OperationResponse.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/response/OperationResponse.class new file mode 100644 index 0000000..1d58038 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/response/OperationResponse.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/response/PageResponse.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/response/PageResponse.class new file mode 100644 index 0000000..e1b2926 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/response/PageResponse.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/response/Rn_DynamicTransactionResponse.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/response/Rn_DynamicTransactionResponse.class new file mode 100644 index 0000000..8cb840d Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/response/Rn_DynamicTransactionResponse.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/response/Rn_Forms_SetupResponse.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/response/Rn_Forms_SetupResponse.class new file mode 100644 index 0000000..48b9e24 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/response/Rn_Forms_SetupResponse.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/response/Rn_Function_Register_Response.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/response/Rn_Function_Register_Response.class new file mode 100644 index 0000000..4f9c803 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/response/Rn_Function_Register_Response.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/response/Rn_Main_Menu_Response.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/response/Rn_Main_Menu_Response.class new file mode 100644 index 0000000..94ea540 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/response/Rn_Main_Menu_Response.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/response/Rn_Menu_Group_Response.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/response/Rn_Menu_Group_Response.class new file mode 100644 index 0000000..8719ffd Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/response/Rn_Menu_Group_Response.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/response/Rn_Menu_Register_Response.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/response/Rn_Menu_Register_Response.class new file mode 100644 index 0000000..8959400 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/response/Rn_Menu_Register_Response.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/response/SingleDataSeriseResponse.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/response/SingleDataSeriseResponse.class new file mode 100644 index 0000000..a98db78 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/response/SingleDataSeriseResponse.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/ExtFieldService.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/ExtFieldService.class new file mode 100644 index 0000000..6b39fa3 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/ExtFieldService.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/ExtFieldServiceImpl.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/ExtFieldServiceImpl.class new file mode 100644 index 0000000..019f5c8 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/ExtFieldServiceImpl.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/FileStorageService.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/FileStorageService.class new file mode 100644 index 0000000..d94f984 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/FileStorageService.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/RnGroupMenuLineServiec.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/RnGroupMenuLineServiec.class new file mode 100644 index 0000000..9c2a3f2 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/RnGroupMenuLineServiec.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/RnGroupMenuLineServiecImpl.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/RnGroupMenuLineServiecImpl.class new file mode 100644 index 0000000..229e6d3 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/RnGroupMenuLineServiecImpl.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/Rn_DynamicTransactionService.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/Rn_DynamicTransactionService.class new file mode 100644 index 0000000..6e57671 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/Rn_DynamicTransactionService.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/Rn_DynamicTransactionServiceImpl.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/Rn_DynamicTransactionServiceImpl.class new file mode 100644 index 0000000..e5405fe Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/Rn_DynamicTransactionServiceImpl.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/Rn_Forms_Setup_Service.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/Rn_Forms_Setup_Service.class new file mode 100644 index 0000000..6073262 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/Rn_Forms_Setup_Service.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/Rn_Forms_Setup_ServiceImpl.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/Rn_Forms_Setup_ServiceImpl.class new file mode 100644 index 0000000..032358c Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/Rn_Forms_Setup_ServiceImpl.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/Rn_Function_Register_Service.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/Rn_Function_Register_Service.class new file mode 100644 index 0000000..8254eb1 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/Rn_Function_Register_Service.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/Rn_Function_Register_ServiceImpl.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/Rn_Function_Register_ServiceImpl.class new file mode 100644 index 0000000..02c5597 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/Rn_Function_Register_ServiceImpl.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/Rn_Main_Menu_Service.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/Rn_Main_Menu_Service.class new file mode 100644 index 0000000..ab54aa2 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/Rn_Main_Menu_Service.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/Rn_Main_Menu_ServiceImpl.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/Rn_Main_Menu_ServiceImpl.class new file mode 100644 index 0000000..7574cbe Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/Rn_Main_Menu_ServiceImpl.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/Rn_Menu_Group_Service.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/Rn_Menu_Group_Service.class new file mode 100644 index 0000000..eb60b8b Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/Rn_Menu_Group_Service.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/Rn_Menu_Group_ServiceImpl.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/Rn_Menu_Group_ServiceImpl.class new file mode 100644 index 0000000..2f2fc1d Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/Rn_Menu_Group_ServiceImpl.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/Rn_Menu_Register_Service.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/Rn_Menu_Register_Service.class new file mode 100644 index 0000000..7f75710 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/Rn_Menu_Register_Service.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/Rn_Menu_Register_ServiceImpl.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/Rn_Menu_Register_ServiceImpl.class new file mode 100644 index 0000000..d5c9408 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service/Rn_Menu_Register_ServiceImpl.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service1/GrpMenuAccessServiceImpl.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service1/GrpMenuAccessServiceImpl.class new file mode 100644 index 0000000..19aca4e Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service1/GrpMenuAccessServiceImpl.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service1/MenuDetServiceImpl.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service1/MenuDetServiceImpl.class new file mode 100644 index 0000000..8c53795 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/fnd/service1/MenuDetServiceImpl.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/gauravtesting/Controllers/Gauravtest1Controller.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/gauravtesting/Controllers/Gauravtest1Controller.class new file mode 100644 index 0000000..51d3d84 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/gauravtesting/Controllers/Gauravtest1Controller.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/gauravtesting/Entity/Extension.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/gauravtesting/Entity/Extension.class new file mode 100644 index 0000000..80ff3b7 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/gauravtesting/Entity/Extension.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/gauravtesting/Entity/Gauravtest1.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/gauravtesting/Entity/Gauravtest1.class new file mode 100644 index 0000000..2759273 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/gauravtesting/Entity/Gauravtest1.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/gauravtesting/Entity/who_column.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/gauravtesting/Entity/who_column.class new file mode 100644 index 0000000..59ca0df Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/gauravtesting/Entity/who_column.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/gauravtesting/Repository/Gauravtest1Repository.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/gauravtesting/Repository/Gauravtest1Repository.class new file mode 100644 index 0000000..6470d78 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/gauravtesting/Repository/Gauravtest1Repository.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/gauravtesting/Services/Gauravtest1Service.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/gauravtesting/Services/Gauravtest1Service.class new file mode 100644 index 0000000..70591e1 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/gauravtesting/Services/Gauravtest1Service.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging/LogEntity.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging/LogEntity.class new file mode 100644 index 0000000..c5d00bd Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging/LogEntity.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging/LogExecutionTime.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging/LogExecutionTime.class new file mode 100644 index 0000000..ffd8409 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging/LogExecutionTime.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging/LoggingAspect.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging/LoggingAspect.class new file mode 100644 index 0000000..faf2f65 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging/LoggingAspect.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging/NoLogging.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging/NoLogging.class new file mode 100644 index 0000000..e8efc29 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging/NoLogging.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging/SecurityNoLogging.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging/SecurityNoLogging.class new file mode 100644 index 0000000..b3320b2 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging/SecurityNoLogging.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging1/PatternLayoutWithUserContext.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging1/PatternLayoutWithUserContext.class new file mode 100644 index 0000000..931fcc5 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging1/PatternLayoutWithUserContext.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging1/SessionConverter.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging1/SessionConverter.class new file mode 100644 index 0000000..67d616d Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging1/SessionConverter.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging1/UserConverter.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging1/UserConverter.class new file mode 100644 index 0000000..92f692f Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging1/UserConverter.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging1/controller/AppUserLogController$1.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging1/controller/AppUserLogController$1.class new file mode 100644 index 0000000..4ae4176 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging1/controller/AppUserLogController$1.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging1/controller/AppUserLogController$2.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging1/controller/AppUserLogController$2.class new file mode 100644 index 0000000..6e827d1 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging1/controller/AppUserLogController$2.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging1/controller/AppUserLogController$3.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging1/controller/AppUserLogController$3.class new file mode 100644 index 0000000..170e363 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging1/controller/AppUserLogController$3.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging1/controller/AppUserLogController$4.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging1/controller/AppUserLogController$4.class new file mode 100644 index 0000000..0fab926 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging1/controller/AppUserLogController$4.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging1/controller/AppUserLogController$5.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging1/controller/AppUserLogController$5.class new file mode 100644 index 0000000..ce6f98d Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging1/controller/AppUserLogController$5.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging1/controller/AppUserLogController$6.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging1/controller/AppUserLogController$6.class new file mode 100644 index 0000000..0a6362c Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging1/controller/AppUserLogController$6.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging1/controller/AppUserLogController.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging1/controller/AppUserLogController.class new file mode 100644 index 0000000..5fb89ab Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging1/controller/AppUserLogController.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging1/controller/AppUserLogController2.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging1/controller/AppUserLogController2.class new file mode 100644 index 0000000..32df87e Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging1/controller/AppUserLogController2.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging1/entity/AppUserLog.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging1/entity/AppUserLog.class new file mode 100644 index 0000000..3fb936e Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging1/entity/AppUserLog.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging1/repository/AppUserLogginRepository.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging1/repository/AppUserLogginRepository.class new file mode 100644 index 0000000..925c22d Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging1/repository/AppUserLogginRepository.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging1/service/LoggingService.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging1/service/LoggingService.class new file mode 100644 index 0000000..27857c1 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/logging1/service/LoggingService.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/report_builder/Controller/Report_buildercontroller.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/report_builder/Controller/Report_buildercontroller.class new file mode 100644 index 0000000..b9395fb Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/report_builder/Controller/Report_buildercontroller.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/report_builder/Entity/ReportQueryDataDTO.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/report_builder/Entity/ReportQueryDataDTO.class new file mode 100644 index 0000000..a936dc8 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/report_builder/Entity/ReportQueryDataDTO.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/report_builder/Entity/Rp_Line.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/report_builder/Entity/Rp_Line.class new file mode 100644 index 0000000..e416d3d Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/report_builder/Entity/Rp_Line.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/report_builder/Entity/Rp_Who_collumn.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/report_builder/Entity/Rp_Who_collumn.class new file mode 100644 index 0000000..e87fe49 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/report_builder/Entity/Rp_Who_collumn.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/report_builder/Entity/Rp_builder.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/report_builder/Entity/Rp_builder.class new file mode 100644 index 0000000..5a71959 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/report_builder/Entity/Rp_builder.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/report_builder/Repository/ReportRepository.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/report_builder/Repository/ReportRepository.class new file mode 100644 index 0000000..613985f Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/report_builder/Repository/ReportRepository.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/report_builder/Repository/Rp_lineRepository.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/report_builder/Repository/Rp_lineRepository.class new file mode 100644 index 0000000..20049e1 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/report_builder/Repository/Rp_lineRepository.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/report_builder/Service/Report_builderService.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/report_builder/Service/Report_builderService.class new file mode 100644 index 0000000..e28502f Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/report_builder/Service/Report_builderService.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/session/controller/SessionController.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/session/controller/SessionController.class new file mode 100644 index 0000000..7d669f0 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/session/controller/SessionController.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/session/entity/AboutWork.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/session/entity/AboutWork.class new file mode 100644 index 0000000..97edd43 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/session/entity/AboutWork.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/session/entity/SessionItem.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/session/entity/SessionItem.class new file mode 100644 index 0000000..924a457 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/session/entity/SessionItem.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/session/entity/VersionModel.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/session/entity/VersionModel.class new file mode 100644 index 0000000..5156927 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/session/entity/VersionModel.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/session/response/SessionResponse.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/session/response/SessionResponse.class new file mode 100644 index 0000000..ae19e8d Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/session/response/SessionResponse.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/studentt/Controllers/ChildtestController.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/studentt/Controllers/ChildtestController.class new file mode 100644 index 0000000..57e5fcb Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/studentt/Controllers/ChildtestController.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/studentt/Controllers/StudentestController.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/studentt/Controllers/StudentestController.class new file mode 100644 index 0000000..ca5067c Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/studentt/Controllers/StudentestController.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/studentt/Entity/Childtest.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/studentt/Entity/Childtest.class new file mode 100644 index 0000000..4ac1bd4 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/studentt/Entity/Childtest.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/studentt/Entity/Extension.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/studentt/Entity/Extension.class new file mode 100644 index 0000000..6a16d77 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/studentt/Entity/Extension.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/studentt/Entity/Studentest.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/studentt/Entity/Studentest.class new file mode 100644 index 0000000..6a60551 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/studentt/Entity/Studentest.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/studentt/Entity/who_column.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/studentt/Entity/who_column.class new file mode 100644 index 0000000..0bf7da6 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/studentt/Entity/who_column.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/studentt/Repository/ChildtestRepository.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/studentt/Repository/ChildtestRepository.class new file mode 100644 index 0000000..c99aa3a Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/studentt/Repository/ChildtestRepository.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/studentt/Repository/StudentestRepository.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/studentt/Repository/StudentestRepository.class new file mode 100644 index 0000000..18d4469 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/studentt/Repository/StudentestRepository.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/studentt/Services/ChildtestService.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/studentt/Services/ChildtestService.class new file mode 100644 index 0000000..de0adbf Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/studentt/Services/ChildtestService.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/studentt/Services/StudentestService.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/studentt/Services/StudentestService.class new file mode 100644 index 0000000..fda57bf Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/studentt/Services/StudentestService.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/CompanyDto.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/CompanyDto.class new file mode 100644 index 0000000..077a9ec Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/CompanyDto.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/Email.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/Email.class new file mode 100644 index 0000000..be81fde Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/Email.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/EmailRequest.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/EmailRequest.class new file mode 100644 index 0000000..0bf431c Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/EmailRequest.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/Login.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/Login.class new file mode 100644 index 0000000..6685c65 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/Login.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/LoginUser.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/LoginUser.class new file mode 100644 index 0000000..4929091 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/LoginUser.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/PasswordResetRequest.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/PasswordResetRequest.class new file mode 100644 index 0000000..378a64f Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/PasswordResetRequest.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/Provider.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/Provider.class new file mode 100644 index 0000000..80812be Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/Provider.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/Rn_Who_AccId_Column.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/Rn_Who_AccId_Column.class new file mode 100644 index 0000000..6e6faa5 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/Rn_Who_AccId_Column.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/Rn_Who_Columns.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/Rn_Who_Columns.class new file mode 100644 index 0000000..a9f9684 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/Rn_Who_Columns.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/Role.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/Role.class new file mode 100644 index 0000000..1c8b7b2 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/Role.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/RoleUpdateDto.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/RoleUpdateDto.class new file mode 100644 index 0000000..0a1bcc0 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/RoleUpdateDto.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/Sys_Accounts.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/Sys_Accounts.class new file mode 100644 index 0000000..4e8d191 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/Sys_Accounts.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/User.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/User.class new file mode 100644 index 0000000..9447873 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/User.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/UserDto.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/UserDto.class new file mode 100644 index 0000000..69b8b75 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/UserDto.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/UserProfileDTO.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/UserProfileDTO.class new file mode 100644 index 0000000..e99736f Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userDTO/UserProfileDTO.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userlist/controller/UserListController.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userlist/controller/UserListController.class new file mode 100644 index 0000000..4bd0733 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userlist/controller/UserListController.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userlist/entity/UserImage.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userlist/entity/UserImage.class new file mode 100644 index 0000000..391f3ec Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userlist/entity/UserImage.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userlist/entity/UserList.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userlist/entity/UserList.class new file mode 100644 index 0000000..c57b067 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userlist/entity/UserList.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userlist/repository/UserImageRepository.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userlist/repository/UserImageRepository.class new file mode 100644 index 0000000..7ed9e22 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userlist/repository/UserImageRepository.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userlist/repository/UserListRepository.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userlist/repository/UserListRepository.class new file mode 100644 index 0000000..58b74e2 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userlist/repository/UserListRepository.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userlist/service/UserListService.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userlist/service/UserListService.class new file mode 100644 index 0000000..b93fc4a Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userlist/service/UserListService.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userlist/service/impl/UserListServiceImpl.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userlist/service/impl/UserListServiceImpl.class new file mode 100644 index 0000000..31c7ecf Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/userlist/service/impl/UserListServiceImpl.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/controller/RoleController.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/controller/RoleController.class new file mode 100644 index 0000000..2cbb067 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/controller/RoleController.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/controller/UserController.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/controller/UserController.class new file mode 100644 index 0000000..20c81c6 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/controller/UserController.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/controller1/AppUserController.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/controller1/AppUserController.class new file mode 100644 index 0000000..579a79e Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/controller1/AppUserController.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/controller1/AppUserGrpController.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/controller1/AppUserGrpController.class new file mode 100644 index 0000000..dc2d84a Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/controller1/AppUserGrpController.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/controller1/AppuserSessionController.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/controller1/AppuserSessionController.class new file mode 100644 index 0000000..e3f6486 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/controller1/AppuserSessionController.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/controller1/PositonAndDepartmentController.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/controller1/PositonAndDepartmentController.class new file mode 100644 index 0000000..9398fb6 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/controller1/PositonAndDepartmentController.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/controller1/SysAccountController.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/controller1/SysAccountController.class new file mode 100644 index 0000000..077306c Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/controller1/SysAccountController.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity/CompanyDto.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity/CompanyDto.class new file mode 100644 index 0000000..769488c Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity/CompanyDto.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity/ERole.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity/ERole.class new file mode 100644 index 0000000..680ef9e Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity/ERole.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity/Email.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity/Email.class new file mode 100644 index 0000000..d581e1f Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity/Email.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity/EmailRequest.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity/EmailRequest.class new file mode 100644 index 0000000..97cdf5e Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity/EmailRequest.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity/GenericResponse.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity/GenericResponse.class new file mode 100644 index 0000000..676143e Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity/GenericResponse.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity/Login.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity/Login.class new file mode 100644 index 0000000..9c7e16b Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity/Login.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity/LoginUser.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity/LoginUser.class new file mode 100644 index 0000000..f84f2fd Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity/LoginUser.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity/PasswordResetRequest.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity/PasswordResetRequest.class new file mode 100644 index 0000000..449473b Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity/PasswordResetRequest.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity/PasswordResetToken.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity/PasswordResetToken.class new file mode 100644 index 0000000..89c4587 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity/PasswordResetToken.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity/Role.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity/Role.class new file mode 100644 index 0000000..e69ca7c Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity/Role.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity/RoleUpdateDto.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity/RoleUpdateDto.class new file mode 100644 index 0000000..f3f5953 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity/RoleUpdateDto.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity/Sys_Accounts.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity/Sys_Accounts.class new file mode 100644 index 0000000..a9f9041 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity/Sys_Accounts.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity/UserDto.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity/UserDto.class new file mode 100644 index 0000000..3abe1e9 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity/UserDto.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity/UserProfileDTO.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity/UserProfileDTO.class new file mode 100644 index 0000000..f987bd8 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity/UserProfileDTO.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity1/AppUser.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity1/AppUser.class new file mode 100644 index 0000000..8b169d3 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity1/AppUser.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity1/AppUserDepartment.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity1/AppUserDepartment.class new file mode 100644 index 0000000..33d1eb4 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity1/AppUserDepartment.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity1/AppUserDto.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity1/AppUserDto.class new file mode 100644 index 0000000..479b233 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity1/AppUserDto.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity1/AppUserLoginHist.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity1/AppUserLoginHist.class new file mode 100644 index 0000000..9b9bb07 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity1/AppUserLoginHist.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity1/AppUserPasswlog.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity1/AppUserPasswlog.class new file mode 100644 index 0000000..3e251f6 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity1/AppUserPasswlog.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity1/AppUserPasswlogCompositeKey.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity1/AppUserPasswlogCompositeKey.class new file mode 100644 index 0000000..304e50c Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity1/AppUserPasswlogCompositeKey.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity1/AppUserPosition.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity1/AppUserPosition.class new file mode 100644 index 0000000..947e910 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity1/AppUserPosition.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity1/AppUserPrinciple.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity1/AppUserPrinciple.class new file mode 100644 index 0000000..ae6a1f0 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity1/AppUserPrinciple.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity1/AppUserRole.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity1/AppUserRole.class new file mode 100644 index 0000000..e79e74f Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity1/AppUserRole.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity1/AppUserSessions.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity1/AppUserSessions.class new file mode 100644 index 0000000..9fa45c5 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity1/AppUserSessions.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity1/AppUserSessionsCompositeKey.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity1/AppUserSessionsCompositeKey.class new file mode 100644 index 0000000..8254fa7 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity1/AppUserSessionsCompositeKey.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity1/AppUser_who_column.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity1/AppUser_who_column.class new file mode 100644 index 0000000..eeb28ef Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity1/AppUser_who_column.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity1/Registration.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity1/Registration.class new file mode 100644 index 0000000..baa5101 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity1/Registration.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity1/SignUp.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity1/SignUp.class new file mode 100644 index 0000000..5e61b90 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/entity1/SignUp.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/repository/AboutWorkRepo.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/repository/AboutWorkRepo.class new file mode 100644 index 0000000..fe51f39 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/repository/AboutWorkRepo.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/repository/CompanyRepo.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/repository/CompanyRepo.class new file mode 100644 index 0000000..f4fb734 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/repository/CompanyRepo.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/repository/RoleRepo.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/repository/RoleRepo.class new file mode 100644 index 0000000..7d9e808 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/repository/RoleRepo.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/repository/SysAccountRepo.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/repository/SysAccountRepo.class new file mode 100644 index 0000000..6ae7959 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/repository/SysAccountRepo.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/repository1/AppUserDepartmentRepository.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/repository1/AppUserDepartmentRepository.class new file mode 100644 index 0000000..94b9ba5 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/repository1/AppUserDepartmentRepository.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/repository1/AppUserPositionRepository.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/repository1/AppUserPositionRepository.class new file mode 100644 index 0000000..efad018 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/repository1/AppUserPositionRepository.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/repository1/AppUserRepository.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/repository1/AppUserRepository.class new file mode 100644 index 0000000..bcab266 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/repository1/AppUserRepository.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/repository1/AppUserRoleRepository.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/repository1/AppUserRoleRepository.class new file mode 100644 index 0000000..824d6ee Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/repository1/AppUserRoleRepository.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/repository1/AppUserSessionsRepository.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/repository1/AppUserSessionsRepository.class new file mode 100644 index 0000000..4656c31 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/repository1/AppUserSessionsRepository.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/repository1/passwordTokenRepository.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/repository1/passwordTokenRepository.class new file mode 100644 index 0000000..36cb1bd Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/repository1/passwordTokenRepository.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/response/MessageResponse.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/response/MessageResponse.class new file mode 100644 index 0000000..8ac0698 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/response/MessageResponse.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/response/ServiceResponse.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/response/ServiceResponse.class new file mode 100644 index 0000000..02b0558 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/response/ServiceResponse.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/response/UserItem.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/response/UserItem.class new file mode 100644 index 0000000..7181d83 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/response/UserItem.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/response/UserResponse.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/response/UserResponse.class new file mode 100644 index 0000000..3af67dd Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/response/UserResponse.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/service/AboutServiceImple.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/service/AboutServiceImple.class new file mode 100644 index 0000000..0f663a0 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/service/AboutServiceImple.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/service/AboutWorkService.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/service/AboutWorkService.class new file mode 100644 index 0000000..f870545 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/service/AboutWorkService.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/service/CompanyService.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/service/CompanyService.class new file mode 100644 index 0000000..c82189c Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/service/CompanyService.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/service/RoleService.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/service/RoleService.class new file mode 100644 index 0000000..b15c72c Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/service/RoleService.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/service/RoleServiceImpl.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/service/RoleServiceImpl.class new file mode 100644 index 0000000..0442c7a Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/service/RoleServiceImpl.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/service1/AppUserRoleServiceImpl.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/service1/AppUserRoleServiceImpl.class new file mode 100644 index 0000000..4e759d1 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/service1/AppUserRoleServiceImpl.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/service1/AppUserService.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/service1/AppUserService.class new file mode 100644 index 0000000..a9758a3 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/service1/AppUserService.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/service1/AppUserServiceImpl.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/service1/AppUserServiceImpl.class new file mode 100644 index 0000000..9033c3b Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/service1/AppUserServiceImpl.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/service1/AppUserSessionsServiceImpl.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/service1/AppUserSessionsServiceImpl.class new file mode 100644 index 0000000..99dc62c Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/service1/AppUserSessionsServiceImpl.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/service1/PositionAndDepartmentServiceImpl.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/service1/PositionAndDepartmentServiceImpl.class new file mode 100644 index 0000000..9534bb2 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/users/service1/PositionAndDepartmentServiceImpl.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/utils/Constant.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/utils/Constant.class new file mode 100644 index 0000000..0a04ac0 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/utils/Constant.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/utils/Port_Constant.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/utils/Port_Constant.class new file mode 100644 index 0000000..757f363 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/utils/Port_Constant.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/utils/WireFrameConstant$FormType.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/utils/WireFrameConstant$FormType.class new file mode 100644 index 0000000..b9a8ad1 Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/utils/WireFrameConstant$FormType.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/utils/WireFrameConstant.class b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/utils/WireFrameConstant.class new file mode 100644 index 0000000..3c3cefa Binary files /dev/null and b/prod116rb-back-b/authsec_springboot/backend/target/classes/com/realnet/utils/WireFrameConstant.class differ diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/data.sql b/prod116rb-back-b/authsec_springboot/backend/target/classes/data.sql new file mode 100644 index 0000000..77daec5 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/target/classes/data.sql @@ -0,0 +1,2023 @@ +/* Instructor */ +insert into RN_INSTRUCTOR (ID, FIRST_NAME, LAST_NAME, EMAIL, CREATED_AT, UPDATED_AT) values + (1, 'rajdeep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (2, 'sandipan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (3, 'niladri', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (4, 'abhishek', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (5, 'sayandeep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (6, 'titas', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (7, 'dip', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (8, 'asif', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (9, 'anushree', 'sanyal', 'anus@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (10, 'trisha', 'das', 'trisha@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (11, 'avijit', 'chakraborty', 'avijit@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (12, 'dona', 'sen', 'dona@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (13, 'disha', 'maitra', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (14, 'sasa', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (15, 'vvvv', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (16, 'qqqq', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (17, 'saaaaayasndeep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (18, 'lllll', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (19, 'kkkkk', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (20, 'ffffff', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (21, 'rajaaQdesep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (22, 'sandaaQipsan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (23, 'nilaaQadri', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (24, 'abQhaaishek', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (25, 'sayanaadeep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (26, 'tiaatas', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (27, 'dittp', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (28, 'attsif', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (29, 'anutttshree', 'sanyal', 'anus@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (30, 'trigggsha', 'das', 'trisha@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (31, 'avijgggit', 'chakraborty', 'avijit@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (32, 'dogggna', 'sen', 'dona@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (33, 'rgggajdeep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (34, 'sangggdipan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (35, 'nifgfladri', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (36, 'abhisfgfhek', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (37, 'safgfgyandeep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (38, 'titfgfas', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (39, 'dfgfip', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (40, 'asifgff', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (41, 'fggfrajdeep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (42, 'fgfgsandipan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (43, 'ncxilgbgadri', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (44, 'adghghbhishek', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (45, 'sayandhyyueep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (46, 'teritas', 'mereaity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (47, 'dipere', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (48, 'asifcc', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (49, 'anushrccee', 'sanyal', 'anus@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (50, 'trishawww', 'das', 'trisha@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (51, 'avijiqqt', 'chakraborty', 'avijit@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (52, 'qqqdona', 'sen', 'dona@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (53, 'rajqqqdeep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (54, 'sandipqqqqan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (55, 'niladriwww', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (56, 'abhishewwwk', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (57, 'sayandeepbbb', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (58, 'tbbbitas', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (59, 'dbbbip', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (60, 'asbbbif', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (61, 'rajdeAFep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (62, 'sanSDFipan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (63, 'nilaSDFdri', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (64, 'abhiSDFshek', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (65, 'sayaSDndeep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (66, 'tiAStas', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (67, 'diASp', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (68, 'aASsif', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (69, 'anuASshree', 'sanyal', 'anus@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (70, 'triASsha', 'das', 'trisha@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (71, 'avASCijit', 'chakraborty', 'avijit@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (72, 'donVa', 'sen', 'dona@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (73, 'rajCVdeep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (74, 'saVndipan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (75, 'nilVadri', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (76, 'abChishek', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (77, 'saCyandeep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (78, 'titCas', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (79, 'diCp', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (80, 'asCif', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (81, 'rajdeCep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (82, 'saSndCipan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (83, 'nilCadri', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (84, 'abhSCshek', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (85, 'saSyCandeep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (86, 'titSasCE', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (87, 'diCp', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (88, 'asEif', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (89, 'anEushree', 'sanyal', 'anus@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (90, 'triEsha', 'das', 'trisha@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (91, 'avEijit', 'chakraborty', 'avijit@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (92, 'donEa', 'sen', 'dona@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (93, 'raEjdeep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (94, 'sanEdipan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (95, 'niladEri', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (96, 'abhEishek', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (97, 'sayEandeep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (98, 'tEitas', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (99, 'dEip', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (100, 'aEsif', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (101, 'rajSSdeep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (102, 'sandSSipan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (103, 'nilaLSSdri', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (104, 'abLhishek', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (105, 'saLyandeep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (106, 'tLitas', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (107, 'diLp', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (108, 'aLsif', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (109, 'anLushree', 'sanyal', 'anus@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (110, 'triLsha', 'das', 'trisha@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (111, 'aviLjit', 'chakraborty', 'avijit@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (112, 'doLna', 'sen', 'dona@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (113, 'rajLdeep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (114, 'sandLipan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (115, 'niULladri', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (116, 'aLbhUishek', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (117, 'sLLUayandeep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (118, 'tiLUtas', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (119, 'diUp', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (120, 'asUif', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'); + + +/* User */ +insert into user (user_id, password, first_name, last_name, email, company, phone, address1, address2, country, postal, role, is_active, is_blocked, security_provider_id, default_customer_id, secret_question, secret_answer, enable_beta_testing, enable_renewal) values +('demo' , 'demo' , 'Mrinmoy' , 'Majumdar', 'arivera2@joomla.org' , 'Abshire Inc', '7-(740)701-4547', '80429 Garrison Crossing', '4967' , 'USA' , '64890', 'USER' , 1, 0, 10001, 20000, 'Diverse' , 'Yellow' , 0, 0), +('admin' , '$2b$10$AkngMoFbJhllHomzUFdwAehsPzbHxY31XXtWTr0Cnpo9OYs7enn0q' , 'Theresa' , 'Russell' , 'trussell1@about.me' , 'Glover, Adams and Bins', '383-(779)851-3208', '30874 Graceland Terrace', '99152' , 'USA' , '51065', 'ADMIN', 1, 0, 10001, 20000, 'knowledge base', 'Mauv' , 1, 0), +('user' , '$2b$10$AK/siGGl4ITIq0dZHDck0uAyLJHkGPOeLBSAyUL8j5OU5vlf79wjq' , 'Virginia' , 'Reynolds', 'vreynolds0@slashdot.org', 'Rippin, Osinski and Beatty', '84-(228)809-9998', '0118 Burrows Plaza', '496' , 'USA' , '94086', 'USER' , 1, 0, 10001, 20000, 'Innovative' , 'Turquoise', 1, 1), +('jowens3' , 'jowens3' , 'Judy' , 'Owens' , 'jowens3@hp.com' , 'Altenwerth, Fisher and Heidenreich', '30-(772)268-8227', '98 Loeprich Way', '447', 'Greece' , null , 'USER' , 0, 0, 10001, 20001, 'capacity' , 'Fuscia' , 1, 1), +('kburns4' , 'kburns4' , 'Kelly' , 'Burns' , 'kburns4@icio.us' , 'McCullough-Morar', '86-(857)185-5740', '1638 Basil Alley', '56297' , 'China' , null , 'ADMIN', 1, 0, 10000, 20002, 'user-facing' , 'Crimson', 1, 1), +('jshaw5' , 'jshaw5' , 'Julie' , 'Shaw' , 'jshaw5@opera.com' , 'Steuber-Okuneva', '1-(871)375-6188', '389 Myrtle Pass', '41444' , 'Canada' , null , 'ADMIN', 1, 1, 10000, 20000, 'software' , 'Green' , 0, 1), +('pgilbert6' , 'pgilbert6', 'Peter' , 'Gilbert' , 'pgilbert6@eepurl.com' , 'Robel Inc', '52-(372)555-4687', '11522 Fuller Avenue', '5' , 'Mexico' , '39230', 'ADMIN', 1, 1, 10000, 20000, 'multi-state' , 'Puce' , 1, 1), +('jjacobs7' , 'jjacobs7' , 'Justin' , 'Jacobs' , 'jjacobs7@google.co.uk' , 'Harris-Bashirian', '963-(199)359-2552', '95012 Hanover Street', '2377' , 'India' , null , 'USER' , 1, 0, 10000, 20002, 'motivating' , 'Crimson', 1, 0), +('kbennett8' , 'kbennett8', 'Kevin' , 'Bennett' , 'kbennett8@hostgator.com', 'Leannon Inc', '62-(892)710-5713', '459 Coleman Drive', '397' , 'Indonesia' , null , 'ADMIN', 0, 0, 10001, 20000, 'Exclusive' , 'Purple' , 1, 1), +('cmurphy9' , 'cmurphy9' , 'Chris' , 'Murphy' , 'cmurphy9@over-blog.com' , 'Mosciski LLC', '64-(272)961-0086', '2 Ludington Point', '7' , 'New Zealand', null , 'ADMIN', 0, 1, 10000, 20000, 'empowering' , 'Maroon' , 0, 1); + +/* Employees */ +insert into employees (id, last_name, first_name, email, phone, address1, address2, city, state, postal_code, country, avatar, job_title, department, manager_id) values + (201, 'Harris' , 'George' , 'gharris0@pagesperso-orange.fr', '1-(210)270-8536', '2 Bayside Drive', null, 'San Antonio', 'Texas', '78240', 'United States', 'https://robohash.org/modilaboriosammolestiae.bmp?size=50x50&set=set1', 'Administrative Assistant I', 'Toys', null) +,(202, 'Hayes' , 'Rachel' , 'rhayes1@si.edu', '1-(971)797-2729', '30 Anhalt Street', null, 'Portland', 'Oregon', '97232', 'United States', 'https://robohash.org/seddistinctiodolorem.jpg?size=50x50&set=set1', 'Design Engineer', 'Books', null) +,(203, 'Palmer' , 'Anthony', 'apalmer2@posterous.com', '1-(702)984-2108', '02809 4th Pass', null, 'North Las Vegas', 'Nevada', '89036', 'United States', 'https://robohash.org/vitaererumdolore.png?size=50x50&set=set1', 'Health Coach II', 'Toys', null) +,(204, 'Alvarez' , 'Laura' , 'lalvarez3@time.com', '1-(518)328-2658', '647 Lakeland Road', null, 'Albany', 'New York', '12210', 'United States', 'https://robohash.org/nobisplaceatquisquam.jpg?size=50x50&set=set1', 'Computer Systems Analyst II', 'Health', null) +,(205, 'Reynolds', 'Annie' , 'areynolds4@nasa.gov', '1-(775)838-2203', '163 Carey Street', null, 'Reno', 'Nevada', '89550', 'United States', 'https://robohash.org/praesentiumdoloremrerum.png?size=50x50&set=set1', 'Senior Quality Engineer', 'Kids', null) +,(206, 'Henry' , 'Joe' , 'jhenry5@bbb.org', '1-(682)563-2229', '1 Harper Circle', null, 'Fort Worth', 'Texas', '76178', 'United States', 'https://robohash.org/earumiurevoluptas.jpg?size=50x50&set=set1', 'Chief Design Engineer', 'Electronics', null) +,(207, 'Willis' , 'Willie' , 'wwillis6@berkeley.edu', '1-(317)654-6888', '641 Kropf Parkway', null, 'Indianapolis', 'Indiana', '46216', 'United States', 'https://robohash.org/suntsitnecessitatibus.png?size=50x50&set=set1', 'Structural Analysis Engineer', 'Shoes', null) +,(208, 'Lawrence', 'Keith' , 'klawrence7@discovery.com', '1-(501)583-8851', '2184 Melby Crossing', null, 'Little Rock', 'Arkansas', '72222', 'United States', 'https://robohash.org/delenitiomnisconsequatur.jpg?size=50x50&set=set1', 'VP Quality Control', 'Outdoors', null) +,(209, 'Johnston', 'Tina' , 'tjohnston8@alexa.com', '1-(901)128-9976', '72 Hauk Road', null, 'Memphis', 'Tennessee', '38114', 'United States', 'https://robohash.org/voluptasautmaiores.png?size=50x50&set=set1', 'Assistant Media Planner', 'Electronics', null) +,(210, 'Burns' , 'Lisa' , 'lburns9@taobao.com', '1-(585)113-8402', '99 Manufacturers Drive', null, 'Rochester', 'New York', '14624', 'United States', 'https://robohash.org/illumsinttempore.jpg?size=50x50&set=set1', 'Operator', 'Industrial', null) +,(211, 'Stone' , 'Howard' , 'hstonea@ucsd.edu', '1-(202)958-2516', '03 Anthes Center', null, 'Washington', 'District of Columbia', '20425', 'United States', 'https://robohash.org/eautet.bmp?size=50x50&set=set1', 'Account Executive', 'Electronics', null) +,(212, 'Brown' , 'Julie' , 'jbrownb@squidoo.com', '1-(217)741-6449', '37574 4th Drive', null, 'Springfield', 'Illinois', '62705', 'United States', 'https://robohash.org/laborumtotameveniet.png?size=50x50&set=set1', 'Analog Circuit Design manager', 'Electronics', null) +,(213, 'Turner' , 'Edward' , 'eturnerc@theatlantic.com', '1-(701)353-1996', '3 Bultman Circle', null, 'Fargo', 'North Dakota', '58122', 'United States', 'https://robohash.org/sedutporro.png?size=50x50&set=set1', 'Structural Engineer', 'Computers', null) +,(214, 'Nichols' , 'Douglas', 'dnicholsd@fda.gov', '1-(302)771-6486', '5150 Holmberg Way', null, 'Wilmington', 'Delaware', '19805', 'United States', 'https://robohash.org/blanditiiscommodiet.png?size=50x50&set=set1', 'Editor', 'Outdoors', null) +,(215, 'Gilbert' , 'Jessica', 'jgilberte@infoseek.co.jp', '1-(320)607-0289', '32 Summit Park', null, 'Saint Cloud', 'Minnesota', '56372', 'United States', 'https://robohash.org/providentaccusamussed.bmp?size=50x50&set=set1', 'Account Executive', 'Baby', null) +,(216, 'Hernandez', 'Kathy' , 'khernandezf@shinystat.com', '1-(210)733-3380', '24 Merrick Way', null, 'San Antonio', 'Texas', '78225', 'United States', 'https://robohash.org/utfaciliset.png?size=50x50&set=set1', 'Junior Executive', 'Movies', null) +,(217, 'Sullivan', 'Lillian', 'lsullivang@flavors.me', '1-(904)885-2053', '42 Manufacturers Pass', null, 'Jacksonville', 'Florida', '32215', 'United States', 'https://robohash.org/quiaetaut.jpg?size=50x50&set=set1', 'Engineer I', 'Sports', null) +,(218, 'Jenkins' , 'Frances', 'fjenkinsh@huffingtonpost.com', '1-(512)764-3809', '69255 Dakota Plaza', null, 'Austin', 'Texas', '78769', 'United States', 'https://robohash.org/voluptatemnamaliquam.bmp?size=50x50&set=set1', 'Developer IV', 'Baby', null) +,(219, 'Myers' , 'Roger' , 'rmyersi@alexa.com', '1-(480)583-9583', '3 Eagle Crest Place', null, 'Gilbert', 'Arizona', '85297', 'United States', 'https://robohash.org/consequaturutquo.png?size=50x50&set=set1', 'Account Executive', 'Beauty', null) +,(220, 'Hunter' , 'Bonnie' , 'bhunterj@ucsd.edu', '1-(320)933-5140', '99 Arapahoe Terrace', null, 'Saint Cloud', 'Minnesota', '56372', 'United States', 'https://robohash.org/etfacilisquo.bmp?size=50x50&set=set1', 'Analog Circuit Design manager', 'Baby', null); + +/* Products */ +insert into products (id, product_code, product_name, description, standard_cost, list_price, target_level, reorder_level, minimum_reorder_quantity, quantity_per_unit, discontinued, category) values + (601, 'P1' , 'Nikon D810' , null, 1167.09, 1123.39, 75 , 10, 10, 50, 1, 'Camera') +,(602, 'P2' , 'Canon EOS 5D Mark IV' , null, 1382.83, 1293.84, 90 , 15, 15, 56, 0, 'Camera') +,(603, 'P3' , 'Dell XPS 13' , null, 1482.83, 1393.84, 95 , 20, 30, 56, 0, 'Laptop') +,(604, 'P4' , 'iPad Air' , null, 382.83 , 293.84 , 180, 75, 50, 56, 0, 'Tablet') +,(605, 'P5' , 'Acer Aspire S 13' , null, 882.83 , 793.84 , 40 , 15, 15, 56, 0, 'Laptop') +,(606, 'P6' , 'Nexus 6' , null, 633.88 , 511.7 , 75 , 10, 20, 79, 1, 'Phone' ) +,(607, 'P7' , 'ThinkPad T365' , null, 1441.02, 1308.98, 100, 30, 10, 92, 1, 'Laptop') +,(608, 'P8' , 'Moto Z' , null, 538.44 , 462.34 , 75 , 20, 20, 54, 1, 'Phone' ) +,(609, 'P9' , 'HTC 10' , null, 547.58 , 481.83 , 50 , 5 , 15, 58, 1, 'Tablet') +,(610, 'P10', 'MacBook Pro 13.3' , null, 1625.81, 1576.61, 120, 40, 30, 11, 1, 'Laptop') +,(611, 'P11', 'Nikon D500' , null, 867.09 , 723.39 , 75 , 25, 15, 50, 1, 'Camera') +,(612, 'P12', 'Pentax K-1' , null, 882.83 , 793.84 , 50 , 10, 5 , 56, 0, 'Camera') +,(613, 'P13', 'Asus Zenbook Ux305' , null, 1182.83, 1093.84, 55 , 10, 5 , 56, 0, 'Laptop') +,(614, 'P14', 'HP Envy m7-n109dx 17.3', null, 1382.83, 1293.84, 50 , 10, 10, 56, 0, 'Laptop') +,(615, 'P15', 'Microsft Surface Book' , null, 1682.83, 1593.84, 200, 80, 50, 56, 0, 'Tablet') +,(616, 'P16', 'Apple iPhone 7' , null, 833.88 , 711.76 , 250, 100,50, 79, 1, 'Phone' ) +,(617, 'P17', 'Google Pixel' , null, 641.02 , 608.98 , 100, 30 ,20, 92, 1, 'Phone' ) +,(618, 'P18', 'Samsung Galaxy S7' , null, 538.44 , 562.34 , 75 , 15, 10, 54, 1, 'Phone' ) +,(619, 'P19', 'Samasung Note' , null, 547.58 , 481.83 , 75 , 15, 15, 58, 1, 'Tablet') +,(620, 'P20', 'Chromebook 11.6' , null, 1078.81, 1008.61, 80 , 14, 10, 11, 1, 'Laptop'); + +/* Customers */ +insert into customers (id, last_name, first_name, email, company, phone, address1, address2, city, state, postal_code, country) values + (1 , 'Gray' , 'Clarence' , 'cgray0@rambler.ru' , 'Jetpulse' , '1-(260)615-5114', '02937 Merrick Avenue' , null, 'Fort Wayne', 'Indiana', '46805', 'United States') +,(2 , 'Cooper' , 'Emily' , 'ecooper1@macromedia.com' , 'Skippad' , '1-(251)614-5034', '60 Forster Crossing' , null, 'Mobile', 'Alabama', '36605', 'United States') +,(3 , 'Wilson' , 'George' , 'gwilson2@xinhuanet.com' , 'Riffpath' , '1-(901)445-9881', '52 Browning Center' , null, 'Memphis', 'Tennessee', '38181', 'United States') +,(4 , 'Mcdonald', 'Michael' , 'mmcdonald3@twitter.com' , 'Feedfire' , '1-(419)743-7314', '85093 Jackson Park' , null, 'Toledo', 'Ohio', '43610', 'United States') +,(5 , 'Tucker' , 'Lori' , 'ltucker4@etsy.com' , 'Oyondu' , '1-(202)381-2663', '0706 Heffernan Pass' , null, 'Washington', 'District of Columbia', '20380', 'United States') +,(6 , 'Hansen' , 'Lois' , 'lhansen5@stumbleupon.com', 'Yozio' , '1-(315)385-6866', '2 Ruskin Pass' , null, 'Syracuse', 'New York', '13251', 'United States') +,(7 , 'Grant' , 'Frances' , 'fgrant6@yale.edu' , 'Eire' , '1-(863)799-9068', '61402 Morning Court' , null, 'Lakeland', 'Florida', '33811', 'United States') +,(8 , 'Lewis' , 'Catherine', 'clewis7@unesco.org' , 'Realpoint', '1-(915)208-4997', '775 Messerschmidt Junction', null, 'El Paso', 'Texas', '88563', 'United States') +,(9 , 'Rogers' , 'Edward' , 'erogers8@guardian.co.uk' , 'Quinu' , '1-(971)934-2404', '7074 Montana Place' , null, 'Portland', 'Oregon', '97271', 'United States') +,(10, 'Owens' , 'Tina' , 'towens9@earthlink.net' , 'Blogtag' , '1-(712)989-9002', '59039 Sachtjen Street', null, 'Sioux City', 'Iowa', '51105', 'United States') +,(11, 'Peterson', 'Fred' , 'fpetersona@home.pl' , 'Meedoo' , '1-(202)228-9380', '55 Knutson Street', null, 'Washington', 'District of Columbia', '20099', 'United States') +,(12, 'Cox' , 'Jason' , 'jcoxb@slashdot.org' , 'Tagcat' , '1-(651)991-0172', '19 Hoffman Avenue', null, 'Saint Paul', 'Minnesota', '55114', 'United States') +,(13, 'Perez' , 'Paul' , 'pperezc@ask.com' , 'Kazu' , '1-(405)290-7944', '6336 Continental Circle', null, 'Oklahoma City', 'Oklahoma', '73167', 'United States') +,(14, 'Duncan' , 'Anthony' , 'aduncand@disqus.com' , 'Aibox' , '1-(727)705-8400', '17794 Northport Point', null, 'Clearwater', 'Florida', '33763', 'United States') +,(15, 'Graham' , 'Sean' , 'sgrahame@google.com.br' , 'Tekfly' , '1-(901)443-0731', '47493 Reinke Drive', null, 'Memphis', 'Tennessee', '38131', 'United States') +,(16, 'Simpson' , 'Jose' , 'jsimpsonf@youtube.com' , 'Youspan' , '1-(518)381-4659', '498 Carey Lane', null, 'Albany', 'New York', '12262', 'United States') +,(17, 'Simmons' , 'Frances' , 'fsimmonsg@webster.com' ,'Feednation', '1-(251)473-1327', '44102 Montana Crossing', null, 'Mobile', 'Alabama', '36641', 'United States') +,(18, 'Schmidt' , 'John' , 'jschmidth@vinaora.com' , 'Topicblab', '1-(202)945-2079', '384 Goodland Pass', null, 'Washington', 'District of Columbia', '20210', 'United States') +,(19, 'West' , 'Roger' , 'rwesti@cornell.edu' , 'Skilith' , '1-(716)707-3907', '74 Nancy Pass', null, 'Buffalo', 'New York', '14215', 'United States') +,(20, 'Fields' , 'Jesse' , 'jfieldsj@shop-pro.jp' , 'Vinte' , '1-(617)810-9493', '602 Laurel Park', null, 'Boston', 'Massachusetts', '02203', 'United States') +,(21, 'Patterson', 'Kathy' , 'kpattersonk@machines.org', 'Brainverse', '1-(806)803-9725', '67063 Spenser Junction', null, 'Amarillo', 'Texas', '79188', 'United States') +,(22, 'Bell' , 'Stephanie', 'sbelll@gravatar.com' , 'DabZ' , '1-(801)924-1975', '05 Gina Crossing', null, 'Salt Lake City', 'Utah', '84145', 'United States') +,(23, 'Turner' , 'Martha' , 'mturnerm@hp.com' , 'Yadel' , '1-(225)880-9134', '97789 Scofield Point', null, 'Baton Rouge', 'Louisiana', '70894', 'United States') +,(24, 'Ross' , 'Richard' , 'rrossn@weebly.com' , 'Voolith' , '1-(415)690-1916', '19 Briar Crest Alley', null, 'San Francisco', 'California', '94164', 'United States') +,(25, 'Stephens', 'Stephanie', 'sstephenso@times.co.uk' , 'BlogXS' , '1-(501)827-1408', '63291 Huxley Drive', null, 'North Little Rock', 'Arkansas', '72118', 'United States') +,(26, 'Sanchez' , 'Diane' , 'dsanchezp@sun.com' , 'Tagtune' , '1-(315)979-6793', '13 Oneill Junction', null, 'Syracuse', 'New York', '13224', 'United States') +,(27, 'Lawrence', 'Douglas' , 'dlawrenceq@flickr.com' , 'Browsetype', '1-(610)622-4045', '83224 Mallard Center', null, 'Philadelphia', 'Pennsylvania', '19109', 'United States') +,(28, 'Hansen' , 'Lori' , 'lhansenr@patch.com' , 'Einti' , '1-(915)266-1989', '48410 Westport Circle', null, 'El Paso', 'Texas', '88546', 'United States') +,(29, 'Medina' , 'Robert' , 'rmedinas@uiuc.edu' , 'Tambee' , '1-(216)752-7216', '0562 Muir Trail', null, 'Cleveland', 'Ohio', '44197', 'United States') +,(30, 'Harrison', 'Shawn' , 'sharrisont@webnode.com' , 'Youopia' , '1-(205)595-8085', '20 Mayer Center', null, 'Birmingham', 'Alabama', '35205', 'United States') +,(31, 'Alexander', 'Julia' , 'jalexanderu@netsol.com' , 'Oodoo' , '1-(864)349-2185', '61859 West Point', null, 'Greenville', 'South Carolina', '29610', 'United States') +,(32, 'Stanley', 'Victor' , 'vstanleyv@wikipedia.org' , 'Centimia' , '1-(561)507-7317', '08229 Glacier Hill Avenue', null, 'Boynton Beach', 'Florida', '33436', 'United States') +,(33, 'Wheeler', 'Dennis' , 'dwheelerw@indiatimes.com', 'Dynabox' , '1-(419)889-2883', '409 American Ash Plaza', null, 'Lima', 'Ohio', '45807', 'United States') +,(34, 'Frazier', 'Rachel' , 'rfrazierx@sfgate.com' , 'Skivee' , '1-(314)249-1796', '7 Waxwing Court', null, 'Saint Louis', 'Missouri', '63131', 'United States') +,(35, 'Brooks' , 'Shawn' , 'sbrooksy@mediafire.com' , 'Omba' , '1-(971)854-8478', '614 Monica Terrace', null, 'Portland', 'Oregon', '97240', 'United States') +,(36, 'Coleman', 'Frank' , 'fcolemanz@un.org' , 'Agimba' , '1-(318)446-4337', '4 Browning Park', null, 'Shreveport', 'Louisiana', '71151', 'United States') +,(37, 'Wright' , 'Frank' , 'fwright10@flickr.com' , 'Meedoo' , '1-(504)852-2553', '03446 Sheridan Trail', null, 'New Orleans', 'Louisiana', '70183', 'United States') +,(38, 'Perkins', 'Tina' , 'tperkins11@va.gov' , 'Rhybox' , '1-(571)497-0755', '62 Grayhawk Lane', null, 'Fairfax', 'Virginia', '22036', 'United States') +,(39, 'Griffin', 'Ruth' , 'rgriffin12@pcworld.com' , 'Trudoo' , '1-(504)312-7448', '29701 Jenifer Junction', null, 'Metairie', 'Louisiana', '70033', 'United States') +,(40, 'Sanchez', 'Sean' , 'ssanchez13@bandcamp.com' , 'Chatterpoint', '1-(316)535-7647', '10 Stuart Road', null, 'Wichita', 'Kansas', '67260', 'United States') +,(41, 'Harris' , 'Linda' , 'lharris14@ask.com' , 'Blogpad' , '1-(913)258-6547', '17635 Elka Alley', null, 'Shawnee Mission', 'Kansas', '66205', 'United States') +,(42, 'Wood' , 'George' , 'gwood15@imdb.com' , 'Feednation' , '1-(865)482-7169', '210 Anhalt Drive', null, 'Knoxville', 'Tennessee', '37924', 'United States') +,(43, 'Bennett', 'Nancy' , 'nbennett16@netsol.com' , 'Yodo' , '1-(210)749-3167', '97861 Harper Pass', null, 'San Antonio', 'Texas', '78260', 'United States') +,(44, 'Pierce' , 'Jesse' , 'jpierce17@cyberchimps.com', 'Divanoodle' , '1-(501)518-2300', '0 Columbus Terrace', null, 'Little Rock', 'Arkansas', '72231', 'United States') +,(45, 'Larson' , 'Jerry' , 'jlarson18@ustream.tv' , 'Kazu' , '1-(916)702-0977', '0422 Merry Court', null, 'Sacramento', 'California', '95852', 'United States') +,(46, 'Williams', 'Norma' , 'nwilliams19@spiegel.de' , 'Yacero' , '1-(562)631-4036', '5779 Burning Wood Crossing', null, 'Long Beach', 'California', '90847', 'United States') +,(47, 'Kelley' , 'Louis' , 'lkelley1a@wsj.com' , 'Linkbuzz' , '1-(432)286-2200', '04321 Northport Pass', null, 'Odessa', 'Texas', '79764', 'United States') +,(48, 'Mason' , 'Ruby' , 'rmason1b@census.gov' , 'Trudeo' , '1-(763)835-7627', '99219 5th Place', null, 'Monticello', 'Minnesota', '55565', 'United States') +,(49, 'Carr' , 'Nicole' , 'ncarr1c@yellowbook.com' , 'Plajo' , '1-(330)154-9245', '41 Monica Parkway', null, 'Youngstown', 'Ohio', '44511', 'United States') +,(50, 'Franklin', 'Michelle' , 'mfranklin1d@ucoz.com' , 'Wikivu' , '1-(405)751-8906', '62 Rutledge Alley', null, 'Oklahoma City', 'Oklahoma', '73147', 'United States') +,(51, 'Hawkins', 'Larry' , 'lhawkins1e@typepad.com' , 'Tagpad' , '1-(240)796-9270', '48 Columbus Road', null, 'Hagerstown', 'Maryland', '21747', 'United States') +,(52, 'Adams' , 'Lillian' , 'ladams1f@smugmug.com' , 'Avamm' , '1-(419)394-2363', '69708 West Avenue', null, 'Toledo', 'Ohio', '43605', 'United States') +,(53, 'Williamson', 'Janice' , 'jwilliamson1g@sbwire.com', 'Wordware' , '1-(212)576-0309', '311 Clemons Crossing', null, 'New York City', 'New York', '10090', 'United States') +,(54, 'Mitchell', 'Lisa' , 'lmitchell1h@live.com' , 'Trudoo' , '1-(225)794-6979', '17242 Eagan Terrace', null, 'Baton Rouge', 'Louisiana', '70820', 'United States') +,(55, 'Lawrence', 'Anna' , 'alawrence1i@manage.com' , 'Pixope' , '1-(818)505-8262', '51241 Tennessee Point', null, 'Santa Monica', 'California', '90405', 'United States') +,(56, 'Scott' , 'Margaret' , 'mscott1j@arizona.edu' , 'Mynte' , '1-(202)265-0994', '117 Arapahoe Crossing', null, 'Washington', 'District of Columbia', '20051', 'United States') +,(57, 'Harper' , 'Timothy' , 'tharper1k@loc.gov' , 'Trudoo' , '1-(212)348-5025', '137 Commercial Court', null, 'New York City', 'New York', '10175', 'United States') +,(58, 'Frazier' , 'Mary' , 'mfrazier1l@mapy.cz' , 'Photobug' , '1-(214)939-0299', '281 Briar Crest Way', null, 'Garland', 'Texas', '75049', 'United States') +,(59, 'Young' , 'Margaret' , 'myoung1m@ehow.com' , 'Realmix' , '1-(318)144-2666', '537 Memorial Way', null, 'Shreveport', 'Louisiana', '71105', 'United States') +,(60, 'Sullivan', 'Phyllis' , 'psullivan1n@jiathis.com' , 'Demivee' , '1-(518)361-7505', '117 Onsgard Crossing', null, 'Albany', 'New York', '12227', 'United States') +,(61, 'Knight' , 'Roy' , 'rknight1o@qq.com' , 'Meezzy' , '1-(478)438-2599', '60 Kinsman Drive', null, 'Macon', 'United Kingdom', '31210', 'United States') +,(62, 'Ruiz' , 'Andrea' , 'aruiz1p@domainmarket.com', 'Fivespan' , '1-(415)374-7204', '55455 Heffernan Plaza', null, 'San Francisco', 'California', '94142', 'United States') +,(63, 'Hayes' , 'Heather' , 'hhayes1q@odnoklasniki.ru', 'Twitternation', '1-(615)919-6350', '31 Banding Plaza', null, 'Jackson', 'Mississippi', '39296', 'United States') +,(64, 'Chapman' , 'Roy' , 'rchapman1r@theguardian.com', 'BlogXS' , '1-(941)329-4488', '27487 Fair Oaks Crossing', null, 'Sarasota', 'Florida', '34233', 'United States') +,(65, 'Moore' , 'Daniel' , 'dmoore1s@google.co.uk' , 'Twitterbridge', '1-(408)838-8747', '52377 Everett Court', null, 'San Jose', 'California', '95194', 'United States') +,(66, 'Day' , 'Amy' , 'aday1t@indiegogo.com' , 'Brainverse' , '1-(336)903-6679', '50107 Northport Circle', null, 'Winston Salem', 'North Carolina', '27157', 'United States') +,(67, 'Kelley' , 'Jesse' , 'jkelley1u@who.int' , 'Zoomzone' , '1-(304)183-6041', '31740 Bayside Trail', null, 'Huntington', 'West Virginia', '25711', 'United States') +,(68, 'Andrews' , 'Andrea' , 'aandrews1v@patch.com' , 'Fanoodle' , '1-(206)996-3516', '544 Lakewood Gardens Alley', null, 'Seattle', 'Washington', '98148', 'United States') +,(69, 'Willis' , 'Robert' , 'rwillis1w@si.edu' , 'Tazz' , '1-(678)738-3382', '0998 Bellgrove Circle', null, 'Duluth', 'United Kingdom', '30195', 'United States') +,(70, 'Reid' , 'Daniel' , 'dreid1x@miitbeian.gov.cn', 'Babbleblab', '1-(786)539-0220', '2 New Castle Avenue', null, 'Miami', 'Florida', '33111', 'United States') +,(71, 'Roberts' , 'Louise' , 'lroberts1y@cpanel.net' , 'Skippad' , '1-(316)418-5043', '598 Mayfield Road', null, 'Wichita', 'Kansas', '67210', 'United States') +,(72, 'Harrison', 'Margaret' , 'mharrison1z@globe.ne.jp' , 'Zoovu' , '1-(775)625-5357', '636 Maple Point', null, 'Reno', 'Nevada', '89550', 'United States') +,(73, 'Chapman' , 'Peter' , 'pchapman20@eventbrite.com', 'Linkbuzz' , '1-(574)707-4449', '1 Vermont Plaza', null, 'South Bend', 'Indiana', '46620', 'United States') +,(74, 'Tucker' , 'Willie' , 'wtucker21@hubpages.com' , 'Eazzy' , '1-(814)593-2963', '3 Dryden Trail', null, 'Erie', 'Pennsylvania', '16505', 'United States') +,(75, 'Bradley' , 'Adam' , 'abradley22@cnet.com' , 'Yabox' , '1-(903)334-0845', '15 Veith Center', null, 'Tyler', 'Texas', '75705', 'United States') +,(76, 'Armstrong', 'Juan' , 'jarmstrong23@archive.org', 'Gevee' , '1-(916)285-8157', '95 Claremont Crossing', null, 'Sacramento', 'California', '95865', 'United States') +,(77, 'Payne' , 'Kenneth' , 'kpayne24@com.com' , 'Skinte' , '1-(770)150-8423', '75 Beilfuss Court', null, 'Alpharetta', 'United Kingdom', '30022', 'United States') +,(78, 'Jacobs' , 'Louis' , 'ljacobs25@intel.com' , 'Photolist' , '1-(404)386-3449', '542 Browning Park', null, 'Atlanta', 'United Kingdom', '30343', 'United States') +,(79, 'Cooper' , 'Marilyn' , 'mcooper26@whitehouse.gov', 'Yotz' , '1-(520)875-3539', '03 Transport Point', null, 'Tucson', 'Arizona', '85710', 'United States') +,(80, 'Watkins' , 'William' , 'wwatkins27@pbs.org' , 'Brightbean', '1-(719)568-3678', '0316 La Follette Drive', null, 'Colorado Springs', 'Colorado', '80920', 'United States') +,(81, 'Baker' , 'Douglas' , 'dbaker28@exblog.jp' , 'Voonix' , '1-(619)121-6070', '99 Kedzie Terrace', null, 'Chula Vista', 'California', '91913', 'United States') +,(82, 'Cunningham','Daniel' , 'dcunningham29@oakley.com', 'Leexo' , '1-(619)609-6206', '53540 Hallows Place', null, 'San Diego', 'California', '92137', 'United States') +,(83, 'Mitchell', 'Edward' , 'emitchell2a@amazon.com' , 'Jatri' , '1-(502)427-5275', '3 Jana Junction', null, 'Louisville', 'Kentucky', '40280', 'United States') +,(84, 'Matthews', 'Adam' , 'amatthews2b@live.com' , 'Muxo' , '1-(316)764-9074', '5 Arapahoe Plaza', null, 'Wichita', 'Kansas', '67220', 'United States') +,(85, 'Jacobs' , 'Diane' , 'djacobs2c@jimdo.com' , 'Youspan' , '1-(804)398-4775', '6 Moose Street', null, 'Richmond', 'Virginia', '23285', 'United States') +,(86, 'Frazier' , 'Mary' , 'mfrazier2d@forbes.com' , 'Zoomdog' , '1-(716)502-4243', '713 Continental Trail', null, 'Buffalo', 'New York', '14210', 'United States') +,(87, 'Howard' , 'Anthony' , 'ahoward2e@disqus.com' , 'Katz' , '1-(805)800-7968', '006 Elka Center', null, 'Bakersfield', 'California', '93311', 'United States') +,(88, 'Kelly' , 'Anna' , 'akelly2f@unc.edu' , 'Trilia' , '1-(804)117-9707', '292 Browning Circle', null, 'Richmond', 'Virginia', '23228', 'United States') +,(89, 'Clark' , 'Kathy' , 'kclark2g@businesswire.com' , 'Gigabox' , '1-(831)755-4869', '45 Walton Parkway', null, 'Salinas', 'California', '93907', 'United States') +,(90, 'Carpenter', 'Gerald' , 'gcarpenter2h@foxnews.com' , 'Yakidoo' , '1-(213)344-9608', '84560 Stephen Parkway', null, 'Los Angeles', 'California', '90055', 'United States') +,(91, 'Hart' , 'Albert' , 'ahart2i@scribd.com' , 'Jaloo' , '1-(415)201-5281', '0 Washington Place', null, 'Oakland', 'California', '94611', 'United States') +,(92, 'Young' , 'Julia' , 'jyoung2j@craigslist.org' , 'Oloo' , '1-(615)660-1203', '0623 Gale Drive', null, 'Jackson', 'Mississippi', '39210', 'United States') +,(93, 'Pierce' , 'Tammy' , 'tpierce2k@psu.edu' , 'Ntags' , '1-(703)772-3155', '501 Leroy Parkway', null, 'Washington', 'District of Columbia', '20041', 'United States') +,(94, 'Washington', 'Ronald' , 'rwashington2l@drupal.org' , 'Livetube' , '1-(202)828-6093', '6220 Del Sol Alley', null, 'Washington', 'District of Columbia', '20551', 'United States') +,(95, 'Carter' , 'Alan' , 'acarter2m@simplemachines.org', 'Centizu' , '1-(952)234-1678', '043 Sunnyside Center', null, 'Young America', 'Minnesota', '55551', 'United States') +,(96, 'Freeman' , 'Stephanie', 'sfreeman2n@redcross.org' , 'Feednation' , '1-(504)126-8245', '1120 Veith Parkway', null, 'New Orleans', 'Louisiana', '70165', 'United States') +,(97, 'Price' , 'Sara' , 'sprice2o@irs.gov' , 'Izio' , '1-(415)668-5714', '96394 Bonner Hill', null, 'San Francisco', 'California', '94116', 'United States') +,(98, 'Parker' , 'Emily' , 'eparker2p@4shared.com' , 'Skalith' , '1-(330)637-4894', '0 Old Shore Center', null, 'Akron', 'Ohio', '44310', 'United States') +,(99, 'Chavez' , 'Jeremy' , 'jchavez2q@businessweek.com' , 'Topicware' , '1-(515)769-2045', '8584 Jay Street', null, 'Des Moines', 'Iowa', '50335', 'United States') +,(100, 'Kim' , 'Pamela' , 'pkim2r@stumbleupon.com' , 'Photolist' , '1-(510)144-4318', '3688 Gerald Trail', null, 'Sacramento', 'California', '95823', 'United States'); + +/* LOOK UP VALUES */ + + +/* orders */ +insert into orders (id, employee_id, customer_id, order_date, shipped_date, ship_name, ship_address1, ship_address2, ship_city, ship_state, ship_postal_code, ship_country, shipping_fee, payment_type, paid_date, order_status) values + (4001, 204, 40, '2016-04-05', '2016-11-06', 'Jean Fuller', '93 Spohn Place', null, 'Manggekompo', null, null, 'Indonesia', 8.14, 'Card', '2016-10-12', 'On Hold') +,(4002, 204, 95, '2017-01-29', '2016-05-28', 'Diane Holmes', '46 Eliot Trail', null, 'Virginia Beach', 'Virginia', '23459', 'United States', 1.55, 'Check', '2016-06-27', 'Shipped') +,(4003, 218, 54, '2016-08-19', '2016-12-08', 'Jerry Frazier', '23 Sundown Junction', null, 'Obodivka', null, null, 'Ukraine', 2.29, 'Cash', '2016-09-27', 'On Hold') +,(4004, 204, 69, '2016-09-25', '2016-12-24', 'Denise Freeman', '4909 Beilfuss Hill', null, 'Nova Venécia', null, '29830-000', 'Brazil', 4.77, 'Check', '2016-07-04', 'New') +,(4005, 215, 10, '2017-03-14', '2016-03-19', 'Jonathan Gordon', '7 Ludington Court', null, 'Sukamaju', null, null, 'Indonesia', 8.78, 'Check', '2016-03-22', 'On Hold') +,(4006, 211, 23, '2016-08-14', '2016-12-05', 'Sean Carter', '859 Dahle Plaza', null, 'Dayou', null, null, 'China', 9.43, 'Cash', '2016-08-21', 'New') +,(4007, 204, 92, '2017-01-02', '2016-07-09', 'Alice Warren', '5 Fuller Center', null, 'Log pri Brezovici', null, '1358', 'India', 3.25, 'Cash', '2016-03-24', 'Shipped') +,(4008, 205, 20, '2016-05-15', '2016-09-12', 'Andrea Hamilton', '99 Blue Bill Park Junction', null, 'Liangshui', null, null, 'China', 7.04, 'Check', '2016-09-02', 'On Hold') +,(4009, 219, 58, '2016-11-27', '2017-03-02', 'Wanda Hill', '907 Sundown Court', null, 'Pedra Azul', null, '39970-000', 'Brazil', 4.35, 'Cash', '2016-09-27', 'On Hold') +,(4010, 218, 57, '2016-09-11', '2017-02-26', 'Carolyn Foster', '0 Charing Cross Court', null, 'Chicago', 'Illinois', '60609', 'United States', 1.23, 'Cash', '2016-08-09', 'Complete') +,(4011, 207, 3 , '2017-03-01', '2016-08-04', 'Timothy Warren', '19 John Wall Parkway', null, 'Lyon', 'Rhône-Alpes', '69362 CEDEX 07', 'France', 9.57, 'Card', '2016-05-08', 'Complete') +,(4012, 210, 59, '2016-12-31', '2016-08-08', 'Kathleen Marshall', '2 Swallow Circle', null, 'Cunliji', null, null, 'China', 9.03, 'Cash', '2016-04-23', 'On Hold') +,(4013, 204, 57, '2017-01-11', '2017-02-13', 'Jane Ortiz', '1136 Kedzie Alley', null, 'Eirado', 'Viana do Castelo', '4990-540', 'Portugal', 8.9, 'Check', '2016-10-26', 'Shipped') +,(4014, 212, 26, '2016-09-23', '2016-05-13', 'Carolyn Martinez', '954 Kropf Court', null, 'Ibitinga', null, '14940-000', 'Brazil', 4.57, 'Card', '2016-09-11', 'New') +,(4015, 201, 86, '2016-11-04', '2016-10-03', 'Debra Willis', '89 Grasskamp Road', null, 'San Francisco', null, '8501', 'Philippines', 3.53, 'Card', '2016-10-05', 'New') +,(4016, 208, 17, '2016-04-17', '2016-03-22', 'Sharon Little', '27501 Sommers Junction', null, 'San Juan Opico', null, null, 'India', 6.87, 'Card', '2017-01-08', 'Complete') +,(4017, 205, 73, '2016-07-03', '2016-09-26', 'Nancy Hughes', '1 John Wall Avenue', null, 'La Libertad', null, null, 'Argentina', 4.67, 'Check', '2017-02-01', 'New') +,(4018, 213, 16, '2016-12-01', '2016-06-08', 'Sara Knight', '98248 Tony Pass', null, 'Val-d''Or', 'Québec', 'J9P', 'Canada', 9.52, 'Card', '2016-08-06', 'New') +,(4019, 209, 10, '2016-04-18', '2016-04-25', 'Russell Wood', '3 Commercial Point', null, 'Rokietnica', null, '62-090', 'Poland', 6.8, 'Card', '2017-01-20', 'On Hold') +,(4020, 216, 1 , '2016-07-23', '2017-02-23', 'Aaron Grant', '15477 Farwell Circle', null, 'Yongyang', null, null, 'China', 3.17, 'Cash', '2016-08-11', 'Complete') +,(4021, 209, 38, '2016-12-16', '2017-02-14', 'Ryan Foster', '9218 Leroy Avenue', null, 'Mogapinyana', null, null, 'India', 3.34, 'Cash', '2016-06-21', 'On Hold') +,(4022, 207, 91, '2016-07-18', '2016-04-06', 'Peter Montgomery', '570 Londonderry Pass', null, 'Mathakola', null, null, 'India', 8.11, 'Card', '2016-10-27', 'New') +,(4023, 209, 39, '2016-07-15', '2017-02-02', 'Lawrence Schmidt', '371 Acker Drive', null, 'Mesa', 'Arizona', '85205', 'United States', 1.39, 'Cash', '2016-10-27', 'Complete') +,(4024, 219, 51, '2016-12-08', '2017-01-03', 'Eric Gray', '4608 Farmco Point', null, 'Gemblengmulyo', null, null, 'Indonesia', 8.76, 'Card', '2016-05-13', 'Complete') +,(4025, 204, 77, '2016-09-24', '2017-01-20', 'Gloria Green', '62 Sunnyside Park', null, 'Itararé', null, '18460-000', 'Brazil', 7.75, 'Cash', '2017-02-06', 'On Hold') +,(4026, 215, 73, '2016-09-15', '2016-12-24', 'Nicholas Price', '5672 Ruskin Hill', null, 'Maimará', null, '4624', 'Argentina', 9.11, 'Card', '2016-07-22', 'On Hold') +,(4027, 208, 98, '2016-05-31', '2016-07-14', 'Doris Watson', '133 Gina Street', null, 'Bantiran', null, null, 'Indonesia', 3.0, 'Cash', '2016-10-08', 'Complete') +,(4028, 217, 39, '2016-05-10', '2016-04-07', 'Linda Foster', '40382 4th Terrace', null, 'Agrelo', 'Braga', '4730-300', 'Portugal', 2.39, 'Cash', '2016-09-11', 'Complete') +,(4029, 212, 52, '2016-09-14', '2016-12-21', 'Anthony Spencer', '02 Esker Junction', null, 'El Ocotón', null, null, 'Canada', 7.72, 'Check', '2016-09-23', 'Shipped') +,(4030, 218, 74, '2016-05-08', '2016-07-21', 'James Kennedy', '7460 Westport Hill', null, 'Köln', 'Nordrhein-Westfalen', '51107', 'Germany', 6.16, 'Cash', '2016-11-27', 'Shipped') +,(4031, 214, 4 , '2016-05-31', '2017-03-03', 'Theresa Robinson', '44 Havey Way', null, 'Qingtong', null, null, 'China', 5.02, 'Check', '2017-03-15', 'New') +,(4032, 201, 81, '2016-07-05', '2016-11-18', 'Jesse Ray', '68 Derek Hill', null, 'Azogues', null, null, 'Argentina', 5.41, 'Check', '2016-10-16', 'New') +,(4033, 203, 15, '2016-09-07', '2016-06-09', 'Harold Fields', '2 Vermont Terrace', null, 'Mogocha', null, '673732', 'Russia', 2.38, 'Check', '2016-03-30', 'Complete') +,(4034, 217, 11, '2016-08-19', '2016-12-08', 'Larry Watkins', '629 Waxwing Avenue', null, 'Krasnyy Oktyabr’', null, '398526', 'Russia', 5.23, 'Cash', '2016-07-01', 'On Hold') +,(4035, 205, 51, '2016-11-29', '2016-09-02', 'Debra Marshall', '23578 Arizona Junction', null, 'Juhut', null, null, 'Indonesia', 1.59, 'Card', '2016-06-17', 'Shipped') +,(4036, 217, 56, '2016-10-21', '2017-02-13', 'Todd Stephens', '63633 Columbus Avenue', null, 'Paccho', null, null, 'Peru', 5.09, 'Cash', '2016-04-25', 'New') +,(4037, 219, 60, '2016-09-22', '2016-11-08', 'Jean Webb', '0916 Grover Way', null, 'Kuršėnai', null, '81001', 'Denmark', 8.66, 'Cash', '2016-09-30', 'Shipped') +,(4038, 213, 3 , '2016-06-01', '2016-10-07', 'Heather Snyder', '44 Grayhawk Court', null, 'Haenam', null, null, 'Finland', 5.33, 'Cash', '2016-06-30', 'Complete') +,(4039, 201, 28, '2017-02-19', '2016-11-25', 'Janet Howard', '5351 Barby Trail', null, 'Shanghu', null, null, 'China', 9.18, 'Check', '2017-03-16', 'On Hold') +,(4040, 215, 74, '2016-09-14', '2016-06-23', 'Aaron Wheeler', '08 Burrows Avenue', null, 'Tân Sơn', null, null, 'Vietnam', 3.36, 'Card', '2017-03-05', 'New') +,(4041, 204, 79, '2016-09-27', '2017-02-15', 'Lori Watkins', '3 Pennsylvania Court', null, 'Victoria', null, 'VCT', 'India', 9.41, 'Card', '2016-08-12', 'New') +,(4042, 205, 92, '2016-11-03', '2016-05-11', 'Alice Miller', '7895 Amoth Avenue', null, 'Mae Lao', null, '57250', 'Thailand', 2.11, 'Cash', '2016-08-06', 'Shipped') +,(4043, 212, 82, '2016-11-17', '2016-04-19', 'Marilyn Nguyen', '25203 Meadow Ridge Plaza', null, 'Nine', 'Braga', '4775-446', 'Portugal', 6.03, 'Cash', '2016-05-07', 'On Hold') +,(4044, 218, 55, '2016-06-26', '2016-08-15', 'Ashley West', '08621 Porter Lane', null, 'Kingsport', 'Tennessee', '37665', 'United States', 8.23, 'Cash', '2016-12-17', 'New') +,(4045, 217, 53, '2016-05-07', '2017-02-25', 'Julia Fernandez', '91519 Harbort Way', null, 'Issoire', 'Auvergne', '63504 CEDEX', 'France', 1.14, 'Check', '2016-10-27', 'Complete') +,(4046, 211, 78, '2016-12-11', '2017-02-15', 'Willie Sims', '683 Caliangt Parkway', null, 'Balazar', 'Braga', '4805-005', 'Portugal', 6.57, 'Card', '2017-02-13', 'On Hold') +,(4047, 201, 77, '2016-05-20', '2017-02-19', 'Samuel Burke', '25 Grover Lane', null, 'Housuo', null, null, 'China', 6.99, 'Cash', '2016-08-12', 'New') +,(4048, 217, 72, '2016-11-06', '2016-09-29', 'Patricia Green', '29791 Thierer Street', null, 'Campamento', null, '052027', 'Argentina', 3.33, 'Check', '2016-03-24', 'Complete') +,(4049, 210, 98, '2016-08-24', '2016-04-16', 'Nicole Washington', '68 Monica Point', null, 'Cikaung', null, null, 'Indonesia', 5.78, 'Check', '2016-04-30', 'Complete') +,(4050, 215, 26, '2016-10-07', '2016-11-03', 'Marie Bryant', '36611 Schlimgen Place', null, 'Villa Francisca', null, '10215', 'Canada', 4.11, 'Check', '2016-07-29', 'Complete') +,(4051, 212, 51, '2016-05-19', '2017-03-16', 'Brandon Lane', '5 Duke Center', null, 'Soutinho', 'Porto', '4650-530', 'Portugal', 9.62, 'Check', '2016-11-28', 'Shipped') +,(4052, 205, 9 , '2016-07-19', '2016-09-05', 'Pamela Ferguson', '0 Mockingbird Crossing', null, 'Jefferson City', 'Missouri', '65105', 'United States', 9.98, 'Card', '2016-12-08', 'Shipped') +,(4053, 210, 42, '2016-04-09', '2017-02-05', 'Gloria Edwards', '8275 Sage Plaza', null, 'Yilkiqi', null, null, 'China', 5.21, 'Cash', '2016-11-10', 'On Hold') +,(4054, 211, 70, '2017-02-28', '2017-02-11', 'John Cole', '4679 Trailsway Circle', null, 'Sanlanbahai', null, null, 'China', 4.42, 'Card', '2017-01-06', 'Complete') +,(4055, 208, 65, '2017-01-11', '2017-02-14', 'Bobby Butler', '314 Jenna Crossing', null, 'Malusac', null, '2005', 'Philippines', 7.37, 'Cash', '2017-03-15', 'Shipped') +,(4056, 220, 15, '2016-07-12', '2016-09-06', 'Anthony Lane', '1 Packers Avenue', null, 'Batambak', null, null, 'Indonesia', 5.41, 'Card', '2016-11-21', 'On Hold') +,(4057, 220, 76, '2016-05-05', '2016-04-19', 'Karen Ray', '891 Raven Street', null, 'Chinju', null, null, 'Finland', 4.71, 'Cash', '2017-02-11', 'On Hold') +,(4058, 216, 90, '2017-01-26', '2016-12-19', 'Martha Gonzalez', '8695 Mandrake Place', null, 'Maythalūn', null, null, 'India', 1.75, 'Card', '2017-03-16', 'On Hold') +,(4059, 212, 43, '2016-09-20', '2017-02-11', 'Judy Daniels', '154 Lukken Court', null, 'Luoqiao', null, null, 'China', 4.63, 'Check', '2016-11-09', 'On Hold') +,(4060, 207, 80, '2016-04-29', '2016-07-01', 'Jane Stevens', '43 Kingsford Pass', null, 'Dobruševo', null, '7514', 'Denmark', 1.96, 'Cash', '2016-09-02', 'On Hold') +,(4061, 214, 89, '2016-10-09', '2016-09-09', 'Emily Miller', '5 Pearson Lane', null, 'East London', null, '5688', 'South Africa', 2.14, 'Card', '2016-06-10', 'Complete') +,(4062, 220, 8 , '2016-12-01', '2017-03-09', 'Sarah Johnson', '30 Chinook Lane', null, 'Selishche', null, '180536', 'Russia', 3.76, 'Card', '2016-11-18', 'On Hold') +,(4063, 220, 48, '2017-03-05', '2016-11-30', 'Carolyn Reyes', '72 Michigan Pass', null, 'Sukasenang', null, null, 'Indonesia', 6.52, 'Cash', '2016-05-20', 'Shipped') +,(4064, 214, 31, '2016-07-19', '2016-08-16', 'Kathryn Coleman', '43358 Packers Court', null, 'Przystajń', null, '42-141', 'Poland', 1.68, 'Card', '2016-12-13', 'Complete') +,(4065, 205, 41, '2016-12-09', '2016-03-20', 'Clarence Graham', '1675 Starling Point', null, 'Zangbawa', null, null, 'China', 5.82, 'Cash', '2016-07-08', 'Complete') +,(4066, 205, 41, '2016-05-25', '2016-11-15', 'David Harris', '00 Warner Court', null, 'Kabba', null, null, 'Netherlands', 7.24, 'Cash', '2016-09-24', 'New') +,(4067, 218, 13, '2016-07-24', '2016-12-06', 'Ruth Fields', '88567 Golf Course Plaza', null, 'Mauá', null, '09300-000', 'Brazil', 6.82, 'Cash', '2017-01-26', 'New') +,(4068, 206, 11, '2016-05-04', '2016-07-10', 'Todd Butler', '88 Graedel Point', null, 'Jablah', null, null, 'India', 3.83, 'Cash', '2016-06-17', 'On Hold') +,(4069, 215, 55, '2016-12-22', '2016-03-28', 'Catherine Perkins', '95 Troy Parkway', null, 'Frampol', null, '23-440', 'Poland', 7.6, 'Check', '2016-08-24', 'Shipped') +,(4070, 220, 40, '2016-10-17', '2016-12-01', 'Jeffrey Rodriguez', '3393 Weeping Birch Court', null, 'Burunday', null, null, 'Denmark', 2.52, 'Cash', '2016-09-06', 'Shipped') +,(4071, 218, 70, '2017-03-16', '2016-12-09', 'Rachel Butler', '79327 Ridgeway Circle', null, 'Dupnitsa', null, '2680', 'Denmark', 6.25, 'Check', '2016-04-02', 'Complete') +,(4072, 205, 45, '2017-01-22', '2016-05-15', 'Robin Fisher', '0 Susan Court', null, 'Morohongō', null, '357-0211', 'Japan', 4.42, 'Card', '2017-03-06', 'Complete') +,(4073, 217, 94, '2017-01-25', '2016-04-11', 'Ruth Carpenter', '4 Glacier Hill Road', null, 'Ngrejo', null, null, 'Indonesia', 4.9, 'Cash', '2016-08-13', 'On Hold') +,(4074, 219, 27, '2017-01-06', '2017-01-03', 'Irene Kelly', '0 Comanche Junction', null, 'Chao', null, null, 'Peru', 5.32, 'Check', '2016-11-20', 'On Hold') +,(4075, 214, 44, '2016-06-24', '2016-12-20', 'Douglas Sims', '81709 Helena Park', null, 'Dongmaku', null, null, 'China', 3.35, 'Card', '2017-02-27', 'Complete') +,(4076, 216, 27, '2016-09-23', '2016-10-05', 'Kenneth Rose', '5316 Dottie Way', null, 'Olszówka', null, '62-641', 'Poland', 2.63, 'Cash', '2016-05-27', 'Shipped') +,(4077, 211, 84, '2016-11-24', '2016-08-04', 'Jimmy Morgan', '42187 Shoshone Center', null, 'Saltsjöbaden', 'Stockholm', '133 41', 'Sweden', 1.11, 'Cash', '2016-09-09', 'On Hold') +,(4078, 202, 57, '2016-05-28', '2016-06-02', 'Annie Vasquez', '5 Lien Junction', null, 'Al Qaţn', null, null, 'South Africa', 2.73, 'Check', '2016-11-14', 'On Hold') +,(4079, 202, 64, '2016-07-05', '2016-05-20', 'Henry Mccoy', '58 Nelson Circle', null, 'Tsaghkahovit', null, null, 'India', 3.29, 'Card', '2016-08-18', 'Shipped') +,(4080, 216, 44, '2017-02-20', '2016-10-08', 'Norma Graham', '27 Heffernan Pass', null, 'Cairima', null, null, 'China', 7.02, 'Check', '2017-03-06', 'Complete') +,(4081, 218, 60, '2017-03-16', '2016-08-06', 'Albert Wright', '572 Vahlen Place', null, 'Drahovo', null, null, 'Ukraine', 4.92, 'Check', '2017-01-29', 'New') +,(4082, 219, 15, '2016-12-26', '2017-02-17', 'Jane Wells', '21 Merchant Way', null, 'Acacías', null, '507009', 'Argentina', 6.53, 'Card', '2016-06-04', 'Complete') +,(4083, 212, 61, '2016-06-24', '2016-03-23', 'Jesse Mitchell', '4060 Carioca Drive', null, 'Ntoroko', null, null, 'South Africa', 9.41, 'Cash', '2016-10-19', 'On Hold') +,(4084, 216, 3 , '2016-08-20', '2017-02-15', 'Carlos Brooks', '868 Pankratz Trail', null, 'Bat Khela', null, '18351', 'Iran', 1.0, 'Check', '2016-12-22', 'On Hold') +,(4085, 209, 25, '2016-12-03', '2016-06-01', 'Christopher Williamson', '8874 Starling Plaza', null, 'Tarbes', 'Midi-Pyrénées', '65951 CEDEX 9', 'France', 4.15, 'Card', '2017-02-04', 'New') +,(4086, 205, 2 , '2016-06-19', '2016-08-26', 'Joseph Wells', '7223 Carpenter Road', null, 'Chitral', null, '17200', 'Iran', 5.31, 'Card', '2016-07-22', 'Shipped') +,(4087, 216, 96, '2016-06-04', '2016-12-31', 'Teresa Thomas', '908 Ramsey Junction', null, 'Dzerzhinskiy', null, '140083', 'Russia', 4.29, 'Cash', '2017-03-03', 'Shipped') +,(4088, 203, 35, '2016-09-21', '2017-01-08', 'Scott Gomez', '70537 Tennessee Crossing', null, 'Bồng Sơn', null, null, 'Vietnam', 6.93, 'Cash', '2017-01-01', 'New') +,(4089, 210, 18, '2017-02-17', '2016-10-28', 'Nicole Miller', '0 Jackson Place', null, 'Šilheřovice', null, '747 15', 'Czech Republic', 5.64, 'Card', '2016-11-17', 'On Hold') +,(4090, 201, 8 , '2016-11-12', '2016-06-02', 'Donald Nguyen', '7320 Bunting Pass', null, 'Namioka', null, '953-0062', 'Japan', 7.07, 'Cash', '2016-09-29', 'Complete') +,(4091, 212, 67, '2016-04-08', '2016-11-21', 'Shawn Myers', '1844 Esch Plaza', null, 'Gračec', null, '10370', 'Canada', 4.84, 'Card', '2016-03-17', 'New') +,(4092, 220, 16, '2017-01-12', '2016-08-04', 'Daniel Armstrong', '2 Donald Alley', null, 'La Colorada', null, null, 'Denmark', 2.98, 'Check', '2016-12-08', 'Shipped') +,(4093, 203, 60, '2016-04-17', '2016-05-10', 'Henry Gonzales', '23848 6th Center', null, 'Guayatá', null, '153047', 'Argentina', 1.54, 'Check', '2016-04-18', 'New') +,(4094, 209, 37, '2016-08-07', '2016-04-26', 'Stephanie Snyder', '1152 Morning Park', null, 'Zhitan', null, null, 'China', 9.76, 'Card', '2016-05-23', 'New') +,(4095, 205, 46, '2016-09-01', '2017-02-25', 'Joan Butler', '98050 Mitchell Point', null, 'Bun Barat', null, null, 'Indonesia', 9.57, 'Card', '2017-01-25', 'Shipped') +,(4096, 211, 92, '2017-01-02', '2016-12-06', 'Gloria Murray', '8 Vidon Terrace', null, 'Rumenka', null, null, 'India', 5.33, 'Card', '2016-12-28', 'Shipped') +,(4097, 210, 66, '2016-07-04', '2016-05-30', 'Dorothy Simpson', '0 Pearson Point', null, 'Yevpatoriya', null, null, 'Ukraine', 3.52, 'Check', '2016-04-28', 'Complete') +,(4098, 219, 59, '2016-09-27', '2016-12-17', 'Katherine Brooks', '921 Anhalt Place', null, 'Rietavas', null, '90018', 'Denmark', 5.29, 'Check', '2016-12-19', 'Complete') +,(4099, 207, 65, '2016-07-06', '2016-10-11', 'Linda Reid', '89712 Dryden Point', null, 'Bronnitsy', null, '142451', 'Russia', 5.68, 'Card', '2016-07-08', 'New') +,(4100, 212, 61, '2016-04-14', '2016-05-02', 'Richard Carpenter', '17032 Melrose Crossing', null, 'White River', null, '1256', 'South Africa', 7.22, 'Card', '2016-08-03', 'Shipped') +,(4101, 206, 23, '2016-03-28', '2016-12-01', 'Clarence Coleman', '9167 Valley Edge Point', null, 'Guocun', null, null, 'China', 5.86, 'Check', '2016-08-19', 'Shipped') +,(4102, 202, 16, '2016-07-26', '2017-01-18', 'Kevin Dunn', '178 Park Meadow Avenue', null, 'Mlonggo', null, null, 'Indonesia', 4.15, 'Check', '2016-08-03', 'Complete') +,(4103, 211, 65, '2017-01-17', '2016-11-09', 'Keith Lopez', '689 Anthes Pass', null, 'Cibanten', null, null, 'Indonesia', 8.25, 'Check', '2016-10-15', 'Shipped') +,(4104, 218, 86, '2017-03-12', '2016-05-25', 'Chris Wright', '57974 Riverside Junction', null, 'Ban Mai', null, '80000', 'Thailand', 4.85, 'Cash', '2016-05-08', 'New') +,(4105, 215, 57, '2016-07-03', '2016-05-03', 'Michael Snyder', '93 Ohio Hill', null, 'Bryan', 'Texas', '77806', 'United States', 3.54, 'Card', '2016-08-10', 'Shipped') +,(4106, 210, 2 , '2017-03-07', '2016-09-18', 'David Day', '5024 Summerview Circle', null, 'Itapira', null, '13970-000', 'Brazil', 3.6, 'Cash', '2017-01-20', 'On Hold') +,(4107, 218, 4 , '2016-10-10', '2016-09-02', 'Lisa Kim', '4892 Huxley Center', null, 'Tanjungagung', null, null, 'Indonesia', 6.23, 'Cash', '2016-06-11', 'On Hold') +,(4108, 214, 26, '2016-06-02', '2016-10-05', 'Teresa Ellis', '1569 Mariners Cove Terrace', null, 'Maszkienice', null, '32-854', 'Poland', 7.65, 'Check', '2016-04-14', 'On Hold') +,(4109, 201, 51, '2016-10-07', '2017-02-02', 'Jimmy Lawson', '2165 Bluestem Center', null, 'Kampungbaru', null, null, 'Indonesia', 1.73, 'Check', '2016-09-30', 'Shipped') +,(4110, 215, 4 , '2016-08-21', '2017-02-05', 'Jerry Murray', '40070 Anderson Court', null, 'Vicente Guerrero', 'Veracruz Llave', '92440', 'Mexico', 1.57, 'Card', '2016-06-26', 'New') +,(4111, 210, 56, '2016-07-06', '2016-09-19', 'Joan Adams', '5322 Goodland Avenue', null, 'Paris 17', 'Île-de-France', '75853 CEDEX 17', 'France', 7.52, 'Cash', '2016-05-07', 'New') +,(4112, 214, 77, '2016-09-04', '2016-10-19', 'Chris Young', '7 Clove Center', null, 'Gongjiahe', null, null, 'China', 3.31, 'Card', '2016-11-06', 'New') +,(4113, 217, 62, '2016-07-18', '2016-09-30', 'Norma Oliver', '6002 Rieder Road', null, 'Lingbei', null, null, 'China', 8.85, 'Check', '2016-09-25', 'Complete') +,(4114, 213, 72, '2016-08-01', '2016-09-12', 'Douglas Day', '88 Helena Drive', null, 'Alcoutim', 'Faro', '8970-055', 'Portugal', 5.52, 'Card', '2016-12-19', 'New') +,(4115, 220, 6 , '2016-11-13', '2017-02-22', 'Janet James', '820 Westend Place', null, 'Springfield', 'Massachusetts', '01129', 'United States', 4.72, 'Cash', '2016-03-21', 'On Hold') +,(4116, 201, 72, '2016-09-01', '2016-09-07', 'Martha Lee', '2 Donald Hill', null, 'Majiang', null, null, 'China', 4.39, 'Cash', '2016-12-10', 'Shipped') +,(4117, 202, 40, '2017-02-04', '2016-12-09', 'Benjamin Cruz', '02989 Morningstar Avenue', null, 'Gīvī', null, null, 'Iran', 1.77, 'Check', '2017-01-29', 'Complete') +,(4118, 213, 48, '2016-12-24', '2017-01-06', 'Diane Porter', '7 Kensington Center', null, 'Pingyi', null, null, 'China', 4.69, 'Check', '2016-05-31', 'On Hold') +,(4119, 205, 69, '2016-06-30', '2016-05-01', 'Brandon Myers', '80411 Victoria Center', null, 'Punsu', null, null, 'Indonesia', 7.8, 'Cash', '2016-12-28', 'New') +,(4120, 220, 63, '2016-11-11', '2016-10-30', 'Beverly Garza', '2750 Sullivan Place', null, 'San Jose', null, '8427', 'Philippines', 8.15, 'Check', '2016-09-23', 'Shipped') +,(4121, 220, 32, '2016-05-05', '2016-09-05', 'Cynthia Simpson', '0731 Clarendon Point', null, 'Pomichna', null, null, 'Ukraine', 5.56, 'Card', '2017-02-23', 'On Hold') +,(4122, 201, 38, '2016-04-24', '2016-07-30', 'Janet West', '4800 Dottie Parkway', null, 'Tân Kỳ', null, null, 'Vietnam', 2.63, 'Cash', '2016-06-17', 'On Hold') +,(4123, 214, 24, '2016-04-04', '2016-06-11', 'Kevin Stone', '85 Duke Avenue', null, 'Shemonaīkha', null, null, 'Denmark', 9.99, 'Card', '2016-09-24', 'On Hold') +,(4124, 210, 9 , '2016-09-01', '2016-06-18', 'Amy Austin', '80663 Almo Park', null, 'Zaječov', null, '267 63', 'Czech Republic', 3.58, 'Card', '2016-08-29', 'Complete') +,(4125, 206, 78, '2017-02-09', '2016-07-07', 'Gregory Greene', '6 Commercial Junction', null, 'Hudong', null, null, 'China', 7.34, 'Cash', '2016-12-26', 'New') +,(4126, 215, 48, '2016-07-30', '2016-12-25', 'Laura Woods', '115 Ramsey Plaza', null, 'Allentown', 'Pennsylvania', '18105', 'United States', 4.92, 'Check', '2016-09-28', 'On Hold') +,(4127, 220, 19, '2016-03-29', '2016-05-27', 'Stephanie Reed', '452 Grayhawk Way', null, 'Sicheng', null, null, 'China', 1.1, 'Card', '2017-03-14', 'Shipped') +,(4128, 208, 64, '2016-06-03', '2016-08-13', 'Craig Gonzalez', '6028 West Street', null, 'Kliteh', null, null, 'Indonesia', 1.73, 'Cash', '2016-06-23', 'Complete') +,(4129, 201, 28, '2016-09-05', '2016-04-03', 'Raymond Gomez', '4 Stone Corner Place', null, 'Chechenglu', null, null, 'China', 4.32, 'Card', '2016-06-29', 'Complete') +,(4130, 215, 83, '2016-11-14', '2016-09-13', 'Kenneth Taylor', '7 Nevada Way', null, 'Alīpur', null, '34451', 'Iran', 5.07, 'Card', '2016-11-28', 'Complete') +,(4131, 203, 76, '2017-02-01', '2017-01-04', 'Jose Peters', '2493 Saint Paul Crossing', null, 'Bofuer', null, null, 'Indonesia', 9.85, 'Card', '2016-11-18', 'New') +,(4132, 207, 67, '2016-09-02', '2017-03-10', 'Martin West', '7251 Prairieview Place', null, 'Espinillo', null, '3460', 'Argentina', 7.9, 'Card', '2017-02-05', 'New') +,(4133, 208, 78, '2016-08-27', '2016-12-26', 'Louise Dunn', '4076 East Trail', null, 'Caramanta', null, '056047', 'Argentina', 1.28, 'Cash', '2016-12-22', 'Shipped') +,(4134, 209, 93, '2016-06-27', '2016-04-10', 'Gregory Stanley', '67 Namekagon Crossing', null, 'Pasarkayu', null, null, 'Indonesia', 2.83, 'Check', '2016-09-17', 'Complete') +,(4135, 206, 60, '2016-03-23', '2016-06-19', 'Ronald Palmer', '21 Old Shore Place', null, 'Tujing', null, null, 'China', 9.01, 'Check', '2016-12-22', 'New') +,(4136, 209, 10, '2016-11-07', '2016-11-21', 'Harry Robinson', '740 Toban Court', null, 'Liujiage', null, null, 'China', 7.13, 'Card', '2016-09-20', 'New') +,(4137, 214, 83, '2016-05-20', '2016-04-08', 'Joan Torres', '5167 Laurel Drive', null, 'Nirji', null, null, 'China', 9.81, 'Card', '2016-09-13', 'Complete') +,(4138, 207, 47, '2016-07-17', '2016-10-03', 'Carlos Jones', '4 Fuller Lane', null, 'Detroit', 'Michigan', '48258', 'United States', 8.02, 'Card', '2016-11-16', 'On Hold') +,(4139, 214, 92, '2016-07-17', '2017-01-23', 'Terry Freeman', '738 Vernon Road', null, 'Veverská Bítýška', null, '664 71', 'Czech Republic', 1.93, 'Check', '2016-04-04', 'Complete') +,(4140, 204, 92, '2016-06-09', '2016-05-06', 'Rose Hunt', '3242 Bunting Trail', null, 'Schaumburg', 'Illinois', '60193', 'United States', 7.65, 'Check', '2016-07-03', 'On Hold') +,(4141, 214, 12, '2016-11-19', '2017-03-16', 'Harry Reid', '395 Hauk Road', null, 'Rudky', null, null, 'Ukraine', 5.23, 'Card', '2017-01-18', 'On Hold') +,(4142, 212, 88, '2016-12-25', '2016-12-14', 'Fred Olson', '9311 Old Gate Park', null, 'Hejiabao', null, null, 'China', 4.02, 'Check', '2016-05-16', 'New') +,(4143, 217, 79, '2016-06-14', '2016-08-25', 'Paul Arnold', '08347 Comanche Pass', null, 'Bukovec', null, '739 84', 'Czech Republic', 6.02, 'Card', '2016-05-08', 'New') +,(4144, 216, 56, '2016-06-03', '2016-07-22', 'Carolyn Woods', '55 Stoughton Pass', null, 'Shengmi', null, null, 'China', 7.32, 'Card', '2016-07-27', 'New') +,(4145, 218, 84, '2016-07-02', '2016-11-05', 'Craig Schmidt', '2 Stephen Plaza', null, 'Arhust', null, null, 'Japan', 3.31, 'Check', '2016-06-17', 'New') +,(4146, 219, 13, '2016-09-02', '2017-01-29', 'Antonio Jordan', '452 Clemons Court', null, 'København', 'Region Hovedstaden', '1787', 'Denmark', 4.84, 'Card', '2016-11-10', 'Complete') +,(4147, 212, 51, '2016-10-19', '2017-01-20', 'Carol Evans', '1649 Crescent Oaks Road', null, 'Roubaix', 'Nord-Pas-de-Calais', '59100', 'France', 7.71, 'Card', '2017-03-08', 'On Hold') +,(4148, 217, 26, '2016-04-16', '2016-11-28', 'Steven Torres', '73679 Morning Drive', null, 'Ayotupas', null, null, 'Japan', 7.0, 'Card', '2016-06-12', 'On Hold') +,(4149, 215, 1 , '2017-02-06', '2016-10-27', 'Louis Watson', '03 Golf View Way', null, 'Madaoua', null, null, 'United Kingdom', 4.45, 'Check', '2016-07-22', 'Complete') +,(4150, 210, 100,'2017-01-14', '2016-11-12', 'Robin Reynolds', '5 Hagan Hill', null, 'Huacaschuque', null, null, 'Peru', 7.37, 'Check', '2017-02-09', 'New') +,(4151, 217, 24, '2016-09-06', '2016-10-11', 'Julia Gilbert', '3 Manitowish Avenue', null, 'Passos', 'Viana do Castelo', '4990-770', 'Portugal', 1.76, 'Card', '2016-07-16', 'New') +,(4152, 210, 90, '2016-05-26', '2016-07-14', 'Chris Chavez', '0 Birchwood Plaza', null, 'Odivelas', 'Lisboa', '2675-080', 'Portugal', 8.35, 'Cash', '2017-02-05', 'On Hold') +,(4153, 220, 79, '2016-10-27', '2016-08-14', 'Adam Morrison', '04510 West Circle', null, 'Weda', null, null, 'Japan', 8.84, 'Check', '2016-10-05', 'On Hold') +,(4154, 210, 57, '2017-02-21', '2016-09-28', 'Doris Snyder', '37027 Hintze Parkway', null, 'Vakhrushi', null, '613110', 'Russia', 2.75, 'Cash', '2016-12-02', 'Complete') +,(4155, 202, 24, '2017-02-03', '2016-08-03', 'Lisa Fisher', '919 Warner Circle', null, 'Kanbe', null, null, 'India', 2.48, 'Check', '2016-12-23', 'New') +,(4156, 213, 89, '2017-01-26', '2016-06-25', 'Gloria Murphy', '6750 Hansons Center', null, 'Saint Petersburg', null, '190990', 'Russia', 2.88, 'Cash', '2017-01-31', 'On Hold') +,(4157, 219, 83, '2016-08-03', '2016-06-15', 'Sara Mcdonald', '88365 Namekagon Park', null, 'Maofan', null, null, 'China', 4.69, 'Cash', '2016-09-22', 'New') +,(4158, 202, 79, '2016-08-13', '2016-10-08', 'John Barnes', '41 Springs Plaza', null, 'Carangola', null, '36800-000', 'Brazil', 4.84, 'Check', '2016-11-25', 'New') +,(4159, 215, 84, '2016-11-30', '2017-02-27', 'Bobby Matthews', '39153 Kipling Trail', null, 'Now Zād', null, null, 'Germany', 7.56, 'Cash', '2016-09-25', 'Shipped') +,(4160, 216, 40, '2016-07-27', '2016-12-05', 'Robin Greene', '899 Waubesa Alley', null, 'Vellinge', 'Skåne', '235 93', 'Sweden', 4.17, 'Card', '2016-12-22', 'New') +,(4161, 211, 91, '2017-03-12', '2016-09-11', 'Joseph Long', '3 Nobel Terrace', null, 'Bukabu', null, null, 'Japan', 2.26, 'Card', '2016-10-26', 'On Hold') +,(4162, 204, 94, '2016-10-08', '2016-09-26', 'Lisa Rodriguez', '880 Arizona Terrace', null, 'Elena', null, '5815', 'Argentina', 3.13, 'Cash', '2016-06-15', 'Shipped') +,(4163, 208, 49, '2017-02-23', '2016-06-05', 'Douglas Parker', '79 Mariners Cove Plaza', null, 'Şafāshahr', null, null, 'Iran', 1.83, 'Cash', '2016-10-26', 'On Hold') +,(4164, 201, 23, '2016-10-31', '2017-01-07', 'Laura Stewart', '97911 Meadow Ridge Road', null, 'Hexi', null, null, 'China', 1.24, 'Check', '2017-03-08', 'Shipped') +,(4165, 202, 27, '2017-01-07', '2016-10-05', 'Matthew Jordan', '29 Lakewood Trail', null, 'Kalkal Barat', null, null, 'Japan', 9.19, 'Card', '2016-09-03', 'Shipped') +,(4166, 218, 61, '2016-03-31', '2017-03-03', 'Denise Mason', '79 Carberry Alley', null, 'Vạn Giã', null, null, 'Vietnam', 7.78, 'Card', '2016-03-23', 'New') +,(4167, 220, 56, '2016-11-12', '2016-06-18', 'Phillip Castillo', '9910 Reindahl Parkway', null, 'Shangyanzhuang', null, null, 'China', 2.48, 'Card', '2016-07-14', 'Complete') +,(4168, 201, 41, '2016-07-10', '2016-07-29', 'Dorothy Nelson', '8 Hermina Terrace', null, 'Petrolina', null, '56300-000', 'Brazil', 1.52, 'Check', '2016-11-11', 'Shipped') +,(4169, 218, 100,'2016-12-18', '2016-12-02', 'Lawrence Willis', '21 Northland Trail', null, 'Bukor', null, null, 'India', 2.28, 'Card', '2017-01-06', 'New') +,(4170, 218, 6 , '2016-10-31', '2016-10-20', 'Jonathan Banks', '5748 Kings Hill', null, 'Tianning', null, null, 'China', 5.71, 'Check', '2016-06-02', 'Shipped') +,(4171, 211, 93, '2016-11-16', '2017-01-20', 'Gary Green', '001 Straubel Point', null, 'Huangshapu', null, null, 'China', 3.6, 'Cash', '2016-12-12', 'Complete') +,(4172, 203, 46, '2016-10-16', '2016-09-08', 'Nancy Bryant', '367 Gateway Park', null, 'Zhutang', null, null, 'China', 2.19, 'Cash', '2017-02-15', 'Shipped') +,(4173, 208, 72, '2016-08-27', '2016-04-09', 'Jeremy Rose', '8 Service Lane', null, 'Jinshandian', null, null, 'China', 8.09, 'Check', '2017-01-18', 'On Hold') +,(4174, 212, 88, '2016-06-25', '2016-08-21', 'Rebecca Gibson', '74 American Crossing', null, 'Canmang', null, null, 'China', 1.31, 'Card', '2017-02-08', 'New') +,(4175, 208, 75, '2017-02-28', '2017-01-03', 'Marilyn Hanson', '676 Service Crossing', null, 'Racławice', null, '32-222', 'Poland', 2.88, 'Check', '2017-02-18', 'New') +,(4176, 204, 1 , '2016-09-23', '2016-08-16', 'Denise Hanson', '8 Lakewood Crossing', null, 'Huaizhong', null, null, 'China', 9.48, 'Card', '2016-12-30', 'On Hold') +,(4177, 204, 20, '2017-03-02', '2016-12-27', 'John Shaw', '4752 Meadow Ridge Lane', null, 'Sosnovo-Ozerskoye', null, '612955', 'Russia', 7.17, 'Check', '2016-06-21', 'On Hold') +,(4178, 202, 30, '2016-03-20', '2016-10-17', 'Russell Fernandez', '5941 Esch Lane', null, 'Shuiyang', null, null, 'China', 1.04, 'Check', '2017-01-05', 'On Hold') +,(4179, 202, 27, '2017-01-14', '2016-07-31', 'Annie Ruiz', '67778 Butterfield Trail', null, 'Qalyūb', null, null, 'Germany', 5.51, 'Card', '2016-05-12', 'Shipped') +,(4180, 208, 1 , '2017-03-16', '2016-04-04', 'Ashley Gonzales', '88504 Johnson Street', null, 'Salingogan', null, '6417', 'Philippines', 7.56, 'Check', '2016-07-26', 'Shipped') +,(4181, 203, 70, '2016-03-25', '2016-11-06', 'Richard George', '54 3rd Circle', null, 'Haibeitou', null, null, 'China', 1.99, 'Cash', '2016-09-05', 'New') +,(4182, 219, 69, '2016-04-11', '2017-02-03', 'David Harris', '2 Menomonie Pass', null, 'Oslo', 'Oslo', '0188', 'Greece', 1.93, 'Check', '2016-11-30', 'Shipped') +,(4183, 211, 25, '2016-12-08', '2016-11-16', 'Catherine Reynolds', '302 Autumn Leaf Parkway', null, 'Lameiras', 'Lisboa', '2715-145', 'Portugal', 6.68, 'Cash', '2016-04-02', 'Shipped') +,(4184, 217, 73, '2016-06-19', '2016-11-29', 'Donald Moreno', '690 Laurel Park', null, 'Sinisian', null, '4212', 'Philippines', 3.1, 'Check', '2017-01-06', 'New') +,(4185, 210, 34, '2016-07-03', '2016-05-23', 'Ryan Thomas', '45044 Harper Place', null, 'Madīnat Lab‘ūs', null, null, 'South Africa', 6.31, 'Cash', '2016-06-27', 'Complete') +,(4186, 206, 91, '2016-05-26', '2016-09-09', 'Ruby Lynch', '8350 Karstens Parkway', null, 'Puyo', null, null, 'Argentina', 6.07, 'Check', '2016-05-10', 'Shipped') +,(4187, 208, 64, '2016-05-31', '2016-10-16', 'Linda Robinson', '6069 Chive Plaza', null, 'Joutseno', null, '54101', 'Finland', 3.11, 'Card', '2016-05-15', 'Shipped') +,(4188, 216, 41, '2017-02-07', '2016-03-28', 'Bonnie Morris', '2611 Comanche Junction', null, 'Lacombe', 'Alberta', 'T4L', 'Canada', 2.53, 'Check', '2016-08-31', 'New') +,(4189, 206, 51, '2016-12-20', '2016-12-08', 'Dennis Gardner', '2348 Blue Bill Park Crossing', null, 'Ngkiong', null, null, 'Japan', 5.1, 'Check', '2016-11-28', 'New') +,(4190, 220, 54, '2016-08-06', '2016-08-27', 'Carolyn Matthews', '817 Ohio Point', null, 'Orekhovo-Zuyevo', null, '142609', 'Russia', 7.52, 'Card', '2016-03-22', 'On Hold') +,(4191, 207, 96, '2016-07-03', '2016-06-18', 'Jesse Parker', '3 Eastwood Terrace', null, 'Berezovo', null, null, 'Ukraine', 6.64, 'Check', '2016-05-07', 'New') +,(4192, 216, 18, '2016-06-05', '2017-01-11', 'Ann Gilbert', '6 Oak Valley Lane', null, 'Caijiang', null, null, 'China', 3.72, 'Cash', '2016-11-17', 'On Hold') +,(4193, 208, 22, '2016-06-26', '2017-02-22', 'Martha Hawkins', '57581 Union Road', null, 'Ilinden', null, '1041', 'Denmark', 5.64, 'Cash', '2016-05-23', 'On Hold') +,(4194, 207, 42, '2017-02-03', '2017-01-08', 'Jeffrey Hart', '83 Green Ridge Point', null, 'Wangcheng', null, null, 'China', 1.15, 'Check', '2016-12-07', 'Shipped') +,(4195, 217, 28, '2016-10-18', '2016-05-01', 'Joseph Riley', '54373 Coleman Street', null, 'Karangbungur', null, null, 'Japan', 5.9, 'Cash', '2016-04-23', 'Complete') +,(4196, 207, 78, '2016-07-09', '2016-07-15', 'Brian Dean', '9 Stone Corner Hill', null, 'Dambulla', null, '21100', 'United Kingdom', 5.15, 'Check', '2016-07-09', 'On Hold') +,(4197, 204, 38, '2016-07-19', '2016-04-13', 'Christine Campbell', '47302 Porter Junction', null, 'Dananshan', null, null, 'China', 6.74, 'Card', '2016-11-07', 'Complete') +,(4198, 201, 7 , '2017-03-02', '2016-08-16', 'Ruth Mcdonald', '401 Erie Avenue', null, 'Borkowice', null, '26-422', 'Poland', 3.24, 'Cash', '2016-04-17', 'New') +,(4199, 216, 87, '2016-12-14', '2017-03-05', 'Jean Armstrong', '450 Sullivan Avenue', null, 'Carpenter', null, '2009', 'Philippines', 4.25, 'Cash', '2016-07-11', 'Complete') +,(4200, 218, 8 , '2017-02-01', '2016-04-17', 'Gary Price', '775 Butterfield Lane', null, 'Vaasa', null, '66999', 'Finland', 5.36, 'Card', '2016-07-09', 'Shipped') +,(4201, 217, 77, '2016-11-10', '2016-11-13', 'Carolyn Scott', '5878 Badeau Lane', null, 'Kazanskaya', null, '396614', 'Russia', 7.94, 'Card', '2016-12-09', 'New') +,(4202, 204, 10, '2016-08-12', '2016-03-21', 'Earl Anderson', '9 Roth Court', null, 'Governor’s Harbour', null, null, 'Canada', 2.47, 'Card', '2016-08-06', 'Complete') +,(4203, 204, 54, '2016-05-26', '2016-04-18', 'Elizabeth Kelley', '70 Burrows Street', null, 'Fucheng', null, null, 'China', 9.94, 'Cash', '2016-08-24', 'Shipped') +,(4204, 208, 58, '2017-03-09', '2016-04-17', 'Julia Wilson', '46476 Burning Wood Crossing', null, 'Koper', null, '6600', 'India', 3.82, 'Card', '2016-08-26', 'New') +,(4205, 208, 85, '2016-05-04', '2016-03-18', 'Jeffrey Oliver', '39 Tennessee Avenue', null, 'Jejkowice', null, '44-290', 'Poland', 7.22, 'Card', '2016-09-23', 'Shipped') +,(4206, 220, 8 , '2016-06-16', '2017-01-03', 'Angela Walker', '579 Miller Street', null, 'Hà Tĩnh', null, null, 'Vietnam', 1.04, 'Check', '2016-05-18', 'Complete') +,(4207, 212, 55, '2016-07-04', '2016-11-09', 'Karen Hansen', '953 Manufacturers Pass', null, 'Lysekil', 'Västra Götaland', '453 35', 'Sweden', 8.81, 'Check', '2016-03-18', 'New') +,(4208, 217, 96, '2016-10-26', '2016-07-11', 'Patricia West', '1 Browning Alley', null, 'Huayang', null, null, 'China', 7.54, 'Card', '2016-09-15', 'New') +,(4209, 203, 71, '2016-08-04', '2017-01-01', 'Phillip Gardner', '30438 Mariners Cove Way', null, 'Phu Khiao', null, '36110', 'Thailand', 3.03, 'Check', '2016-03-31', 'Shipped') +,(4210, 207, 30, '2017-03-08', '2016-07-21', 'Fred Howard', '45981 Hovde Trail', null, 'Suncheon', null, null, 'Finland', 1.13, 'Check', '2016-07-14', 'On Hold') +,(4211, 217, 57, '2016-05-28', '2017-03-11', 'George Wagner', '24863 Messerschmidt Road', null, 'Ningzhong', null, null, 'China', 6.5, 'Check', '2016-07-26', 'New') +,(4212, 213, 19, '2016-11-28', '2016-06-09', 'Clarence Russell', '85 Kropf Circle', null, 'Ouro Branco', null, '59347-000', 'Brazil', 6.88, 'Check', '2016-04-02', 'On Hold') +,(4213, 217, 51, '2016-06-25', '2016-05-25', 'Jane Johnston', '1708 Corscot Pass', null, 'Şafāshahr', null, null, 'Iran', 9.16, 'Cash', '2016-10-12', 'Complete') +,(4214, 203, 88, '2017-02-19', '2016-03-25', 'John Adams', '100 Hollow Ridge Way', null, 'Satita', null, null, 'India', 3.01, 'Cash', '2016-11-19', 'Shipped') +,(4215, 202, 12, '2017-01-26', '2016-10-07', 'Diana Graham', '12 Esch Park', null, 'Krasnokamensk', null, '662955', 'Russia', 9.29, 'Check', '2016-06-10', 'Shipped') +,(4216, 211, 66, '2016-07-19', '2016-11-30', 'John Henry', '448 Hanover Trail', null, 'Phitsanulok', null, '65000', 'Thailand', 7.23, 'Card', '2016-09-22', 'Shipped') +,(4217, 218, 98, '2016-11-20', '2016-11-12', 'Donna Bradley', '92136 Arkansas Avenue', null, 'Balong Wetan', null, null, 'Japan', 7.79, 'Card', '2016-12-18', 'New') +,(4218, 206, 5 , '2016-05-04', '2016-08-19', 'Kevin Harper', '2911 Laurel Point', null, 'Patapan', null, null, 'Japan', 1.52, 'Card', '2016-03-20', 'On Hold') +,(4219, 205, 76, '2016-11-15', '2016-12-12', 'Margaret Hanson', '9603 Northridge Junction', null, 'Mwembe', null, null, 'India', 4.76, 'Cash', '2017-03-14', 'Shipped') +,(4220, 206, 62, '2016-12-30', '2016-10-23', 'Henry Bradley', '84 Lake View Plaza', null, 'Zheleznovodsk', null, '357408', 'Russia', 8.08, 'Cash', '2017-02-23', 'Complete') +,(4221, 218, 91, '2016-08-07', '2016-08-31', 'Jane Fowler', '2484 Hoepker Hill', null, 'Huangcun', null, null, 'China', 9.34, 'Card', '2017-01-10', 'Complete') +,(4222, 207, 19, '2016-05-22', '2016-06-25', 'Kimberly Peterson', '5851 Carey Crossing', null, 'Pochuta', null, '04008', 'Japan', 9.16, 'Card', '2016-04-25', 'Shipped') +,(4223, 203, 69, '2017-02-13', '2016-09-18', 'Nicholas Simpson', '9 Hudson Way', null, 'Chashan', null, null, 'China', 5.37, 'Check', '2017-01-01', 'On Hold') +,(4224, 214, 71, '2017-02-28', '2016-06-18', 'Carol Rodriguez', '78 Grayhawk Place', null, 'Luntas', null, null, 'Indonesia', 1.76, 'Card', '2016-10-06', 'Shipped') +,(4225, 207, 34, '2017-03-06', '2016-07-20', 'Jessica Mason', '65 Merrick Lane', null, 'Křižanov', null, '789 01', 'Czech Republic', 9.75, 'Card', '2016-12-28', 'New') +,(4226, 209, 74, '2016-06-04', '2017-01-15', 'Jeffrey Sims', '05441 Wayridge Pass', null, 'Rennes', 'Bretagne', '35047 CEDEX 9', 'France', 9.09, 'Check', '2016-05-19', 'Shipped') +,(4227, 205, 74, '2016-09-09', '2017-01-06', 'Arthur Simmons', '733 Logan Circle', null, 'Dzhankoy', null, null, 'Ukraine', 2.51, 'Check', '2017-01-25', 'New') +,(4228, 207, 52, '2017-01-30', '2017-01-08', 'Kevin Williams', '3561 6th Trail', null, 'Narganá', null, null, 'Denmark', 7.32, 'Cash', '2016-06-24', 'On Hold') +,(4229, 209, 76, '2016-05-05', '2016-07-11', 'Joe Stewart', '0314 Ryan Parkway', null, 'San Jose', 'Oaxaca', '69570', 'Mexico', 9.28, 'Check', '2016-05-06', 'Shipped') +,(4230, 214, 2 , '2016-09-19', '2016-09-08', 'Walter Barnes', '80695 Stone Corner Road', null, 'Busdi', null, '6210', 'Philippines', 5.97, 'Check', '2016-07-19', 'Shipped') +,(4231, 211, 55, '2016-08-27', '2016-10-04', 'Sean Holmes', '91 Becker Drive', null, 'Gezan', null, null, 'China', 3.81, 'Check', '2016-06-14', 'Shipped') +,(4232, 209, 14, '2016-04-01', '2017-03-06', 'Sandra Perez', '45373 Buhler Park', null, 'Ust’-Kut', null, '162176', 'Russia', 4.25, 'Cash', '2017-01-22', 'Shipped') +,(4233, 205, 96, '2016-09-27', '2016-07-03', 'Sara Kelly', '73457 Buhler Court', null, 'Sima', null, null, 'Canada', 7.2, 'Card', '2016-12-14', 'Complete') +,(4234, 217, 74, '2016-11-22', '2017-01-18', 'Edward Reid', '02 Westport Trail', null, 'Tchaourou', null, null, 'India', 3.5, 'Cash', '2016-12-25', 'New') +,(4235, 206, 69, '2016-03-17', '2016-10-29', 'Betty Cook', '83578 Ohio Avenue', null, 'Stockholm', 'Stockholm', '101 22', 'Sweden', 6.17, 'Check', '2016-09-02', 'On Hold') +,(4236, 217, 97, '2017-02-06', '2016-07-01', 'Diana Ellis', '49 Jenna Circle', null, 'Yanshan', null, null, 'China', 6.06, 'Check', '2016-07-16', 'Complete') +,(4237, 216, 17, '2016-11-30', '2016-10-02', 'Donald Miller', '8581 Farragut Junction', null, 'Yosowilangun', null, null, 'Indonesia', 8.9, 'Check', '2016-11-01', 'Complete') +,(4238, 203, 21, '2017-02-09', '2016-12-14', 'Eric Coleman', '9242 Badeau Street', null, 'Caiyuan', null, null, 'China', 4.1, 'Check', '2016-06-07', 'Shipped') +,(4239, 213, 23, '2016-09-15', '2016-11-04', 'Heather Vasquez', '454 Gale Hill', null, 'Susoh', null, null, 'Indonesia', 1.59, 'Check', '2016-10-25', 'New') +,(4240, 208, 2 , '2016-05-28', '2016-05-21', 'Martin Sims', '30 Bunting Center', null, 'Efeng', null, null, 'China', 1.92, 'Cash', '2016-12-15', 'Complete') +,(4241, 202, 85, '2017-02-05', '2016-08-13', 'Catherine Washington', '637 Hermina Court', null, 'San Francisco', 'Jalisco', '46175', 'Mexico', 6.49, 'Card', '2016-12-20', 'On Hold') +,(4242, 204, 17, '2016-10-04', '2016-05-13', 'Gary Kennedy', '2 Grasskamp Point', null, 'Famaillá', null, '4132', 'Argentina', 9.78, 'Card', '2016-12-03', 'Complete') +,(4243, 205, 86, '2016-04-15', '2016-05-25', 'Pamela Parker', '43642 Utah Point', null, 'Santa Rosa', 'Nuevo Leon', '67803', 'Mexico', 1.78, 'Card', '2017-02-16', 'Shipped') +,(4244, 208, 3 , '2016-08-02', '2017-03-13', 'Michelle Russell', '947 Jenna Place', null, 'Kinshasa', null, null, 'Canada', 8.43, 'Cash', '2016-04-13', 'New') +,(4245, 210, 32, '2016-06-16', '2016-07-14', 'Lois Jenkins', '1 Pepper Wood Road', null, 'Kallinge', 'Blekinge', '372 53', 'Sweden', 4.77, 'Cash', '2016-03-17', 'On Hold') +,(4246, 203, 39, '2017-02-04', '2016-08-08', 'Kelly Ramirez', '20490 Eagle Crest Circle', null, 'Baraba', null, '623509', 'Russia', 8.65, 'Cash', '2016-10-04', 'Complete') +,(4247, 202, 24, '2016-05-05', '2016-11-26', 'Harold Gray', '9033 Elmside Plaza', null, 'N’dalatando', null, null, 'Netherlands', 2.78, 'Cash', '2016-07-24', 'New') +,(4248, 210, 16, '2017-01-27', '2017-03-14', 'Dennis Fisher', '4 Sage Road', null, 'Niederanven', null, 'L-6948', 'United Kingdom', 1.26, 'Check', '2016-05-12', 'On Hold') +,(4249, 203, 20, '2016-07-21', '2016-12-08', 'Antonio Wells', '99743 Algoma Hill', null, 'Mūdīyah', null, null, 'South Africa', 4.36, 'Card', '2016-05-28', 'Complete') +,(4250, 217, 88, '2016-05-31', '2016-10-17', 'William Gonzales', '3258 Holy Cross Way', null, 'Yangdun', null, null, 'China', 7.06, 'Check', '2016-04-13', 'New') +,(4251, 211, 1 , '2017-03-04', '2016-10-27', 'Ronald Ward', '5 Logan Terrace', null, 'Tanahmerah', null, null, 'Indonesia', 4.38, 'Card', '2016-09-22', 'On Hold') +,(4252, 217, 87, '2016-12-29', '2016-09-18', 'Gloria Boyd', '10 Grayhawk Hill', null, 'Boromlya', null, null, 'Ukraine', 4.84, 'Cash', '2016-08-01', 'On Hold') +,(4253, 212, 99, '2017-02-02', '2016-04-28', 'Raymond Scott', '3 Donald Trail', null, 'Lakshmīpur', null, '1553', 'Canada', 8.37, 'Cash', '2016-12-06', 'On Hold') +,(4254, 201, 7 , '2016-11-28', '2016-04-11', 'Arthur Hamilton', '95 Doe Crossing Avenue', null, 'Purwosari', null, null, 'Indonesia', 6.84, 'Card', '2016-06-14', 'Shipped') +,(4255, 220, 100,'2016-09-30', '2016-10-08', 'Jean Wagner', '5690 Meadow Valley Alley', null, 'Svedala', 'Skåne', '233 94', 'Sweden', 8.57, 'Check', '2017-01-06', 'Shipped') +,(4256, 218, 78, '2016-04-28', '2016-04-03', 'Kimberly Rose', '6067 Twin Pines Hill', null, 'Capinzal', null, '89665-000', 'Brazil', 6.07, 'Check', '2016-05-18', 'New') +,(4257, 213, 44, '2016-11-04', '2016-03-28', 'Doris Foster', '170 Chive Court', null, 'Lang', null, null, 'China', 1.72, 'Card', '2016-10-20', 'Shipped') +,(4258, 208, 46, '2017-01-11', '2016-09-25', 'Teresa Reynolds', '3 Prairie Rose Alley', null, 'Tashang', null, null, 'China', 4.84, 'Card', '2016-10-16', 'On Hold') +,(4259, 215, 89, '2016-07-07', '2016-12-29', 'Christine Turner', '0746 Heffernan Center', null, 'Henggang', null, null, 'China', 6.81, 'Cash', '2016-08-21', 'New') +,(4260, 210, 23, '2016-10-26', '2017-02-10', 'Jimmy Jordan', '903 Anniversary Trail', null, 'Elaiochóri', null, null, 'Greece', 9.66, 'Cash', '2017-01-10', 'Complete') +,(4261, 207, 20, '2016-11-07', '2017-02-17', 'Andrew Baker', '3 Pennsylvania Park', null, 'Kansas City', 'Missouri', '64130', 'United States', 5.46, 'Cash', '2016-11-20', 'Complete') +,(4262, 203, 32, '2017-02-21', '2016-11-17', 'Diana Dixon', '18520 Maryland Drive', null, 'Santa Catalina', null, '2701', 'Philippines', 4.66, 'Card', '2017-01-09', 'On Hold') +,(4263, 210, 10, '2017-02-28', '2017-02-26', 'Karen Miller', '5608 Moose Court', null, 'Torres Vedras', 'Lisboa', '2560-234', 'Portugal', 5.71, 'Card', '2016-11-30', 'New') +,(4264, 214, 39, '2017-01-09', '2016-10-24', 'Angela Austin', '9659 Vera Point', null, 'Santiaoshi', null, null, 'China', 6.59, 'Check', '2016-05-07', 'Shipped') +,(4265, 203, 3 , '2016-11-11', '2016-11-22', 'Steve Snyder', '7626 Hoepker Junction', null, 'Wulan Hada', null, null, 'China', 5.67, 'Cash', '2017-01-01', 'New') +,(4266, 218, 94, '2016-04-06', '2016-10-02', 'Kevin Daniels', '24 Chinook Point', null, 'Bhairāhawā', null, null, 'United Kingdom', 8.21, 'Card', '2016-05-12', 'Shipped') +,(4267, 203, 58, '2016-11-14', '2016-03-28', 'Patricia Welch', '60375 Corry Street', null, 'Solidaridad', 'Veracruz Llave', '94330', 'Mexico', 2.77, 'Card', '2017-02-02', 'On Hold') +,(4268, 218, 2 , '2016-07-02', '2016-08-14', 'Wanda Reynolds', '965 Calypso Circle', null, 'Dera Bugti', null, '80100', 'Iran', 8.86, 'Check', '2017-01-30', 'On Hold') +,(4269, 216, 47, '2017-03-11', '2016-07-16', 'Harold Williamson', '14332 Texas Junction', null, 'Mzimba', null, null, 'India', 2.47, 'Cash', '2016-06-01', 'Shipped') +,(4270, 213, 62, '2016-11-09', '2017-02-07', 'Juan Fox', '17 Eagan Crossing', null, 'Xiayang', null, null, 'China', 7.63, 'Card', '2017-02-17', 'Shipped') +,(4271, 211, 70, '2016-04-16', '2016-04-26', 'Ryan Long', '0 Harper Circle', null, 'Blagoveshchenka', null, '658670', 'Russia', 3.2, 'Card', '2016-09-10', 'Complete') +,(4272, 206, 29, '2016-03-25', '2016-10-07', 'Frank Cole', '07 Westend Place', null, 'Laixi', null, null, 'China', 1.93, 'Cash', '2016-05-01', 'New') +,(4273, 209, 25, '2016-05-06', '2016-04-13', 'Tammy Wilson', '74278 Grim Pass', null, 'Åkersberga', 'Stockholm', '184 70', 'Sweden', 2.83, 'Card', '2016-10-29', 'Complete') +,(4274, 206, 82, '2017-02-07', '2017-03-06', 'Joan Gonzales', '40 Stephen Street', null, 'Tlogoagung', null, null, 'Indonesia', 3.44, 'Check', '2016-10-14', 'Complete') +,(4275, 203, 91, '2016-10-10', '2016-11-04', 'Jeffrey Hughes', '38 Toban Plaza', null, 'Privas', 'Rhône-Alpes', '07004 CEDEX', 'France', 8.33, 'Card', '2016-04-23', 'On Hold') +,(4276, 210, 89, '2016-05-14', '2016-09-03', 'Rachel Martin', '08 Lake View Hill', null, 'Sandgerði', null, '245', 'India', 2.07, 'Cash', '2016-06-07', 'Complete') +,(4277, 208, 97, '2016-04-06', '2016-07-02', 'Laura Harper', '1 Dexter Street', null, 'Xintaimen', null, null, 'China', 8.08, 'Check', '2016-05-11', 'Shipped') +,(4278, 215, 3 , '2017-03-04', '2017-03-08', 'Annie Rivera', '5975 Debra Park', null, 'Canchaque', null, null, 'Peru', 5.65, 'Check', '2016-04-09', 'Complete') +,(4279, 201, 6 , '2017-03-01', '2016-08-06', 'Pamela Graham', '2 Monument Avenue', null, 'Danxi', null, null, 'China', 2.05, 'Check', '2016-05-23', 'New') +,(4280, 202, 35, '2017-02-04', '2016-06-09', 'Joseph Jenkins', '00001 Fairfield Center', null, 'Mashtūl as Sūq', null, null, 'Germany', 5.32, 'Card', '2016-12-28', 'New') +,(4281, 203, 76, '2016-05-19', '2016-07-29', 'Eugene Garcia', '8308 Onsgard Lane', null, 'Limoncito', null, null, 'India', 4.07, 'Card', '2016-10-20', 'Shipped') +,(4282, 204, 27, '2016-07-20', '2016-09-26', 'Kevin Anderson', '8 Thierer Center', null, 'Saint-Étienne', 'Rhône-Alpes', '42963 CEDEX 9', 'France', 4.88, 'Card', '2016-07-21', 'Complete') +,(4283, 214, 50, '2016-11-27', '2016-06-14', 'Robin Parker', '51949 Forster Parkway', null, 'Laval', 'Pays de la Loire', '53009 CEDEX', 'France', 1.04, 'Check', '2016-04-20', 'Complete') +,(4284, 214, 74, '2016-11-29', '2016-12-08', 'Kelly Palmer', '2 Hauk Hill', null, 'Östersund', 'Jämtland', '831 17', 'Sweden', 4.26, 'Card', '2016-10-08', 'Complete') +,(4285, 214, 76, '2016-10-22', '2016-05-05', 'Diane Freeman', '5441 Petterle Way', null, 'El Tambo', null, null, 'Peru', 7.17, 'Check', '2016-09-27', 'New') +,(4286, 209, 96, '2016-11-08', '2016-08-26', 'Kathleen Adams', '423 Talisman Point', null, 'Kurume', null, '963-8846', 'Japan', 1.99, 'Cash', '2016-05-19', 'On Hold') +,(4287, 204, 76, '2016-10-18', '2017-01-15', 'Teresa Mendoza', '818 Atwood Lane', null, 'Mosteiro', 'Viana do Castelo', '4980-125', 'Portugal', 3.29, 'Cash', '2016-10-03', 'On Hold') +,(4288, 210, 45, '2016-10-15', '2016-12-14', 'Irene Anderson', '4 Rutledge Alley', null, 'Saparua', null, null, 'Indonesia', 4.35, 'Card', '2016-10-13', 'On Hold') +,(4289, 209, 61, '2017-02-12', '2016-07-15', 'Terry Bennett', '351 Johnson Circle', null, 'Quiling', null, '2902', 'Philippines', 6.77, 'Card', '2016-07-20', 'New') +,(4290, 203, 1 , '2017-03-02', '2016-08-25', 'Ronald Mccoy', '73609 Waywood Center', null, 'Zheleznodorozhnyy', null, '238411', 'Russia', 1.05, 'Cash', '2016-06-10', 'New') +,(4291, 211, 73, '2016-09-13', '2016-04-17', 'Andrew Matthews', '820 Lawn Crossing', null, 'Japeri', null, '26400-000', 'Brazil', 1.22, 'Cash', '2016-09-08', 'New') +,(4292, 215, 15, '2016-12-26', '2016-10-04', 'Melissa Chapman', '88384 Ohio Park', null, 'Dayr al Ghuşūn', null, null, 'India', 9.89, 'Check', '2016-08-14', 'Shipped') +,(4293, 210, 18, '2016-11-23', '2016-12-12', 'Russell Griffin', '6 Eliot Lane', null, 'Changshu City', null, null, 'China', 9.37, 'Check', '2016-05-10', 'On Hold') +,(4294, 206, 95, '2016-06-24', '2017-01-21', 'Jeffrey Gray', '04078 Hudson Drive', null, 'Luangwa', null, null, 'India', 2.58, 'Cash', '2016-06-15', 'Shipped') +,(4295, 215, 85, '2016-10-23', '2017-01-29', 'Lori Frazier', '724 Logan Drive', null, 'Gent', 'Vlaanderen', '9052', 'Denmark', 8.59, 'Cash', '2017-01-01', 'New') +,(4296, 217, 83, '2016-04-08', '2017-02-07', 'Joan Ortiz', '90 Merchant Avenue', null, 'Irasan', null, '3120', 'Philippines', 4.64, 'Card', '2016-09-01', 'Complete') +,(4297, 211, 29, '2016-07-13', '2017-02-06', 'John Stanley', '680 Artisan Pass', null, 'Borås', 'Västra Götaland', '504 75', 'Sweden', 1.77, 'Cash', '2016-07-12', 'On Hold') +,(4298, 208, 65, '2016-12-28', '2016-04-19', 'Dorothy Bell', '397 Kim Place', null, 'Zhongxin', null, null, 'China', 1.2, 'Check', '2017-01-28', 'On Hold') +,(4299, 201, 43, '2017-01-12', '2016-08-07', 'Doris Ramirez', '181 Prentice Terrace', null, 'Severnyy', null, '141707', 'Russia', 2.65, 'Card', '2016-08-13', 'Shipped') +,(4300, 207, 27, '2016-11-10', '2016-11-01', 'Elizabeth Harrison', '067 Talisman Trail', null, 'Guangang', null, null, 'China', 4.78, 'Check', '2016-04-30', 'On Hold') +,(4301, 206, 64, '2016-08-14', '2017-01-13', 'Judith Howard', '55095 Sloan Alley', null, 'Longhua', null, null, 'China', 1.93, 'Card', '2016-10-29', 'New') +,(4302, 213, 33, '2017-01-19', '2016-05-23', 'Julia Simpson', '87375 Londonderry Parkway', null, 'Fufang', null, null, 'China', 9.23, 'Card', '2016-11-15', 'Shipped') +,(4303, 220, 49, '2016-08-01', '2016-04-23', 'Elizabeth Bell', '60 Ridgeview Trail', null, 'Infantas', 'Braga', '4810-578', 'Portugal', 3.22, 'Check', '2017-02-01', 'Complete') +,(4304, 217, 56, '2016-09-07', '2016-08-13', 'Ernest Andrews', '231 Graceland Terrace', null, 'Pindamonhangaba', null, '12400-000', 'Brazil', 2.77, 'Card', '2016-04-04', 'On Hold') +,(4305, 219, 44, '2016-06-11', '2016-03-27', 'Jeffrey Lopez', '76434 Havey Court', null, 'Khvalovo', null, '187435', 'Russia', 8.84, 'Cash', '2016-04-14', 'Shipped') +,(4306, 212, 16, '2016-05-29', '2016-12-31', 'Ralph Weaver', '15 Armistice Alley', null, 'Odienné', null, null, 'Canada', 7.1, 'Card', '2017-01-09', 'Shipped') +,(4307, 210, 16, '2016-10-19', '2017-01-10', 'Mary Stevens', '1928 Aberg Park', null, 'Dzwola', null, '23-304', 'Poland', 4.04, 'Card', '2016-08-24', 'Complete') +,(4308, 220, 50, '2016-09-23', '2016-09-16', 'Douglas Welch', '9 Ryan Circle', null, 'Babakanloa', null, null, 'Indonesia', 1.11, 'Card', '2016-10-13', 'Shipped') +,(4309, 217, 99, '2016-10-17', '2017-01-01', 'Raymond Cruz', '0402 Burning Wood Alley', null, 'Bucay', null, '2805', 'Philippines', 9.27, 'Cash', '2016-06-02', 'Complete') +,(4310, 219, 65, '2016-04-14', '2016-05-14', 'Sara Frazier', '43 Truax Terrace', null, 'Halton', 'England', 'LS9', 'United Kingdom', 5.56, 'Check', '2016-12-04', 'New') +,(4311, 220, 17, '2017-02-03', '2016-07-09', 'Sarah Lane', '414 Gina Point', null, 'Fulong', null, null, 'China', 3.35, 'Cash', '2016-12-27', 'New') +,(4312, 205, 77, '2017-02-27', '2016-04-10', 'Michelle Bradley', '16664 Towne Point', null, 'Yangchun', null, null, 'China', 8.64, 'Cash', '2017-01-28', 'Complete') +,(4313, 210, 68, '2016-08-29', '2016-10-27', 'Marie Porter', '7802 Hovde Plaza', null, 'Redakodi', null, null, 'Indonesia', 1.97, 'Cash', '2016-11-08', 'Complete') +,(4314, 207, 41, '2016-08-08', '2016-08-31', 'Melissa Moore', '438 Mendota Way', null, 'Bensonville', null, null, 'United Kingdom', 7.97, 'Cash', '2017-01-17', 'New') +,(4315, 212, 96, '2016-08-08', '2016-07-27', 'Katherine Bell', '76 Manley Park', null, 'Xagmakajor', null, null, 'China', 7.49, 'Cash', '2016-03-29', 'New') +,(4316, 209, 67, '2016-09-26', '2017-02-03', 'Katherine Elliott', '86 Nelson Point', null, 'Boavista', 'Aveiro', '4520-104', 'Portugal', 1.92, 'Card', '2016-04-28', 'Complete') +,(4317, 219, 40, '2016-10-09', '2016-12-21', 'Dorothy Rose', '75962 Basil Drive', null, 'Pécs', 'Baranya', '7610', 'Denmark', 3.23, 'Card', '2017-02-21', 'Shipped') +,(4318, 209, 68, '2017-01-15', '2017-01-03', 'Larry Hicks', '5985 Crest Line Road', null, 'Lingqiao', null, null, 'China', 2.77, 'Check', '2017-01-20', 'Complete') +,(4319, 214, 55, '2016-07-14', '2017-03-05', 'Paula Rodriguez', '6 Lawn Court', null, 'Simajia', null, null, 'China', 6.33, 'Check', '2016-04-08', 'Shipped') +,(4320, 203, 83, '2016-12-26', '2016-10-07', 'Sharon Richards', '43297 Rigney Avenue', null, 'Salto', null, null, 'India', 7.32, 'Check', '2016-09-14', 'Complete') +,(4321, 215, 29, '2016-12-27', '2016-07-21', 'Craig Day', '22 Thierer Center', null, 'Alberton', 'Prince Edward Island', 'P7K', 'Canada', 5.32, 'Check', '2016-04-02', 'On Hold') +,(4322, 207, 80, '2016-12-06', '2016-05-21', 'Donna Butler', '4149 Bartelt Point', null, 'Carbonear', 'Newfoundland and Labrador', 'A1Y', 'Canada', 3.1, 'Check', '2016-10-03', 'New') +,(4323, 216, 31, '2016-06-27', '2017-03-13', 'Carolyn Ferguson', '97225 Bartelt Avenue', null, 'Tinalmud', null, '1531', 'Philippines', 7.11, 'Cash', '2016-05-22', 'Complete') +,(4324, 212, 78, '2016-05-19', '2016-11-14', 'Peter Romero', '22977 Westridge Terrace', null, 'Toulouse', 'Midi-Pyrénées', '31029 CEDEX 4', 'France', 2.97, 'Check', '2016-09-09', 'Shipped') +,(4325, 213, 73, '2017-02-18', '2016-09-22', 'Jose Greene', '40351 Rusk Place', null, 'Vila Nova de Gaia', 'Porto', '4400-005', 'Portugal', 5.76, 'Cash', '2016-12-12', 'Shipped') +,(4326, 208, 62, '2017-02-14', '2016-11-13', 'Betty Anderson', '8403 Melody Center', null, 'Būsh', null, null, 'Germany', 9.56, 'Check', '2016-10-08', 'Shipped') +,(4327, 220, 56, '2016-09-06', '2016-08-17', 'Amanda Frazier', '47 Dapin Center', null, 'Pasirmanggu', null, null, 'Indonesia', 2.25, 'Card', '2016-07-11', 'On Hold') +,(4328, 201, 24, '2016-10-29', '2017-01-25', 'Douglas Foster', '6953 Stoughton Avenue', null, 'Bokhan', null, '669310', 'Russia', 1.26, 'Card', '2016-07-06', 'Complete') +,(4329, 206, 33, '2017-03-09', '2017-03-12', 'Louis Brown', '76 Little Fleur Park', null, 'Shazhenxi', null, null, 'China', 3.4, 'Check', '2016-08-09', 'Complete') +,(4330, 205, 61, '2016-04-14', '2016-09-26', 'Elizabeth Butler', '82 Springview Road', null, 'Kimito', null, '11710', 'Finland', 1.92, 'Card', '2016-10-18', 'Shipped') +,(4331, 220, 39, '2016-06-10', '2016-04-07', 'Albert Flores', '19 Talmadge Hill', null, 'Almelo', 'Provincie Overijssel', '7604', 'Netherlands', 4.23, 'Check', '2016-12-15', 'Shipped') +,(4332, 217, 47, '2016-10-25', '2016-09-28', 'Kimberly Fowler', '0 Trailsway Crossing', null, 'Iwata', null, '925-0145', 'Japan', 8.14, 'Check', '2016-06-06', 'On Hold') +,(4333, 209, 12, '2016-12-25', '2016-10-31', 'Joe Powell', '5 Everett Drive', null, 'Bergen', 'Hordaland', '5895', 'Greece', 8.02, 'Cash', '2016-09-05', 'Shipped') +,(4334, 219, 1 , '2016-08-12', '2017-02-18', 'Virginia Collins', '78693 Cordelia Point', null, 'San Benito', null, '8423', 'Philippines', 8.4, 'Cash', '2017-01-06', 'Complete') +,(4335, 220, 59, '2017-02-26', '2016-11-05', 'Mary Howard', '5 Golf View Street', null, 'Gjinkar', null, null, 'Canada', 3.54, 'Card', '2016-06-09', 'Complete') +,(4336, 220, 19, '2017-02-09', '2017-01-26', 'Ronald Stevens', '57 Old Shore Crossing', null, 'Bureng', null, null, 'United Kingdom', 8.21, 'Card', '2016-12-21', 'On Hold') +,(4337, 204, 59, '2016-05-14', '2016-07-08', 'James Evans', '44078 Warner Drive', null, 'Amurzet', null, '679230', 'Russia', 9.35, 'Card', '2016-07-22', 'Complete') +,(4338, 213, 96, '2016-09-02', '2016-11-10', 'Willie Snyder', '361 Stone Corner Pass', null, 'Sindangsari', null, null, 'Indonesia', 9.32, 'Check', '2016-04-10', 'Complete') +,(4339, 220, 30, '2017-03-04', '2016-08-16', 'Julie Black', '2922 Grasskamp Alley', null, 'Cotonou', null, null, 'India', 9.14, 'Cash', '2017-03-07', 'Shipped') +,(4340, 206, 17, '2016-11-18', '2016-11-24', 'Roy Olson', '4 Shopko Hill', null, 'Binagadi', null, null, 'India', 5.22, 'Check', '2016-10-14', 'Shipped') +,(4341, 202, 28, '2016-11-18', '2017-02-18', 'Evelyn Lawrence', '90 Crownhardt Center', null, 'Bayshint', null, null, 'Japan', 7.25, 'Check', '2016-12-16', 'On Hold') +,(4342, 209, 37, '2016-10-30', '2016-06-07', 'John Rodriguez', '69 Golf View Avenue', null, 'Hezuoqiao', null, null, 'China', 8.23, 'Cash', '2016-11-05', 'On Hold') +,(4343, 203, 51, '2016-04-09', '2016-12-17', 'Ruth Kim', '0027 Dunning Pass', null, 'Kuteynykove', null, null, 'Ukraine', 2.46, 'Cash', '2016-03-28', 'New') +,(4344, 217, 34, '2016-12-16', '2016-10-11', 'Shawn Patterson', '36 Little Fleur Circle', null, 'Xiekou', null, null, 'China', 6.43, 'Cash', '2016-03-27', 'New') +,(4345, 213, 59, '2016-10-30', '2016-07-10', 'Nancy Jones', '47088 Crowley Junction', null, 'Promna', null, '26-803', 'Poland', 5.67, 'Cash', '2016-12-02', 'Complete') +,(4346, 217, 70, '2016-12-27', '2016-10-06', 'Deborah Bishop', '1 Summer Ridge Circle', null, 'Bunobogu', null, null, 'Indonesia', 7.57, 'Cash', '2016-09-19', 'New') +,(4347, 203, 30, '2016-05-26', '2016-08-14', 'Steve Hunt', '4393 Summer Ridge Crossing', null, 'Hošťka', null, '348 06', 'Czech Republic', 5.78, 'Cash', '2016-12-30', 'Shipped') +,(4348, 203, 9 , '2016-04-14', '2016-10-19', 'Betty Black', '23 Nova Junction', null, 'Sępólno Krajeńskie', null, '89-400', 'Poland', 8.55, 'Cash', '2016-09-23', 'New') +,(4349, 211, 95, '2017-01-28', '2016-04-13', 'Gregory Wood', '96 Grasskamp Point', null, 'Psará', null, null, 'Greece', 8.47, 'Cash', '2016-12-18', 'Shipped') +,(4350, 218, 97, '2016-03-22', '2016-04-13', 'Martin Martinez', '5 Towne Crossing', null, 'Kista', 'Stockholm', '164 45', 'Sweden', 8.07, 'Check', '2016-05-15', 'On Hold') +,(4351, 215, 80, '2016-06-20', '2016-11-05', 'Margaret Cook', '82 Eggendart Junction', null, 'Omuthiya', null, null, 'India', 9.71, 'Cash', '2016-09-18', 'Shipped') +,(4352, 211, 15, '2016-09-02', '2017-01-23', 'Justin Myers', '6734 Continental Drive', null, 'Tadabliro', null, null, 'Indonesia', 2.23, 'Cash', '2016-05-12', 'New') +,(4353, 216, 77, '2016-10-09', '2016-07-31', 'Jane Ruiz', '2743 Harbort Center', null, 'Pasar', null, null, 'Indonesia', 4.88, 'Cash', '2016-06-04', 'New') +,(4354, 202, 53, '2017-03-15', '2016-06-21', 'Philip Bradley', '6 Bartillon Park', null, 'Aimorés', null, '35200-000', 'Brazil', 5.01, 'Cash', '2016-05-16', 'New') +,(4355, 220, 14, '2017-01-03', '2016-05-07', 'Phillip White', '1 Schurz Crossing', null, 'Tuzhai', null, null, 'China', 7.06, 'Check', '2016-10-18', 'New') +,(4356, 208, 85, '2016-12-26', '2016-07-28', 'George Ryan', '92 Morrow Road', null, 'Nijmegen', 'Provincie Gelderland', '6519', 'Netherlands', 5.76, 'Cash', '2016-12-14', 'New') +,(4357, 208, 73, '2016-04-06', '2016-04-01', 'Evelyn Rose', '134 Milwaukee Lane', null, 'Tiechang', null, null, 'China', 5.37, 'Cash', '2016-12-19', 'Shipped') +,(4358, 202, 77, '2016-04-14', '2016-10-21', 'Janet Robertson', '09309 Dottie Park', null, 'Ljubešćica', null, '42222', 'Canada', 5.27, 'Cash', '2016-06-07', 'On Hold') +,(4359, 202, 35, '2016-05-08', '2017-01-27', 'Diana Perry', '95535 Lotheville Center', null, 'Kvasice', null, '768 21', 'Czech Republic', 7.1, 'Card', '2016-07-27', 'New') +,(4360, 210, 86, '2016-11-23', '2016-10-12', 'Todd Elliott', '6737 Melrose Road', null, 'Catumbela', null, null, 'Netherlands', 2.19, 'Check', '2016-04-05', 'Shipped') +,(4361, 209, 45, '2016-04-07', '2016-06-30', 'Emily Dean', '143 Ridge Oak Alley', null, 'Diriá', null, null, 'United Kingdom', 1.33, 'Cash', '2016-12-31', 'Complete') +,(4362, 208, 88, '2016-05-08', '2016-04-14', 'Eric Simpson', '8113 Graceland Junction', null, 'Borovoy', null, '309135', 'Russia', 3.81, 'Card', '2016-06-21', 'Shipped') +,(4363, 211, 84, '2016-12-31', '2016-06-05', 'Alan Chapman', '461 Westport Center', null, 'Inayauan', null, '3336', 'Philippines', 8.62, 'Card', '2017-03-03', 'Complete') +,(4364, 205, 100,'2016-09-10', '2017-02-19', 'Denise Dixon', '066 Gerald Avenue', null, 'Venëv', null, '301320', 'Russia', 4.82, 'Check', '2016-04-22', 'Shipped') +,(4365, 211, 7 , '2017-03-09', '2017-03-16', 'Douglas Nelson', '03051 Grasskamp Way', null, 'Póvoa', 'Vila Real', '4870-130', 'Portugal', 1.67, 'Check', '2016-08-30', 'Complete') +,(4366, 213, 24, '2016-04-25', '2016-06-06', 'Louis Frazier', '65 Buhler Circle', null, 'Bīleh Savār', null, null, 'Iran', 9.53, 'Check', '2016-12-20', 'Complete') +,(4367, 207, 8 , '2016-09-24', '2016-04-06', 'Theresa Stanley', '487 Birchwood Point', null, 'T’et’ri Tsqaro', null, null, 'United Kingdom', 5.06, 'Cash', '2016-04-08', 'New') +,(4368, 207, 76, '2016-12-21', '2016-05-03', 'Sean Chapman', '3917 Miller Pass', null, 'Andaray', null, null, 'Peru', 4.36, 'Check', '2016-07-25', 'New') +,(4369, 215, 90, '2016-03-30', '2017-01-03', 'Eugene Brooks', '137 1st Hill', null, 'Independencia', 'Tamaulipas', '89888', 'Mexico', 9.56, 'Check', '2017-01-23', 'Shipped') +,(4370, 204, 33, '2016-12-17', '2016-10-22', 'Joan Martin', '24 Hayes Point', null, 'Dobrzeń Wielki', null, '46-081', 'Poland', 8.87, 'Cash', '2016-07-09', 'Shipped') +,(4371, 204, 13, '2016-12-11', '2016-05-07', 'Martha Mendoza', '0 Sommers Point', null, 'Jiamachi', null, null, 'China', 1.53, 'Check', '2016-08-05', 'On Hold') +,(4372, 211, 90, '2016-10-27', '2017-02-14', 'Joan Allen', '64 Bluestem Drive', null, 'Conde', 'Braga', '4815-019', 'Portugal', 2.66, 'Card', '2016-09-25', 'Shipped') +,(4373, 208, 81, '2016-08-20', '2017-03-16', 'Tammy Richards', '15541 Ramsey Alley', null, 'Gunungkendeng', null, null, 'Indonesia', 5.66, 'Cash', '2016-05-03', 'Shipped') +,(4374, 216, 19, '2017-01-22', '2016-09-10', 'Andrea Medina', '3 Goodland Pass', null, 'Ḩarīb', null, null, 'South Africa', 1.03, 'Card', '2016-10-12', 'Shipped') +,(4375, 213, 8 , '2016-09-13', '2016-12-21', 'Antonio Carpenter', '453 Duke Point', null, 'Rouen', 'Haute-Normandie', '76029 CEDEX', 'France', 5.11, 'Cash', '2017-01-26', 'Complete') +,(4376, 207, 83, '2016-11-29', '2016-04-13', 'Jeffrey Smith', '7 Old Shore Center', null, 'Licuan', null, '2500', 'Philippines', 8.55, 'Cash', '2016-11-08', 'New') +,(4377, 216, 13, '2016-11-06', '2016-10-08', 'Mark Perkins', '57 Troy Court', null, 'Mojimán', null, null, 'Canada', 2.03, 'Card', '2017-01-06', 'Shipped') +,(4378, 219, 4 , '2016-08-05', '2017-03-04', 'Louis Jordan', '5 Armistice Street', null, 'Labège', 'Midi-Pyrénées', '31673 CEDEX', 'France', 3.61, 'Cash', '2016-12-07', 'New') +,(4379, 218, 66, '2017-02-26', '2016-11-18', 'Fred Johnson', '4 Dovetail Crossing', null, 'Santa Cruz', null, null, 'India', 1.08, 'Cash', '2016-04-02', 'Complete') +,(4380, 201, 27, '2016-09-01', '2016-05-08', 'Rose Harvey', '8 Canary Plaza', null, 'Pingtan', null, null, 'China', 6.9, 'Check', '2016-12-09', 'Complete') +,(4381, 209, 89, '2017-02-04', '2016-08-30', 'Christine Thomas', '008 Carberry Alley', null, 'Logung', null, null, 'Indonesia', 6.13, 'Card', '2016-05-09', 'On Hold') +,(4382, 204, 47, '2016-08-11', '2016-12-27', 'Juan Reed', '4337 Del Sol Hill', null, 'Dayeuhluhur', null, null, 'Indonesia', 7.76, 'Card', '2016-06-15', 'New') +,(4383, 215, 30, '2016-08-07', '2016-07-22', 'Diane Gray', '899 Oneill Pass', null, 'Alegrete', null, '97540-000', 'Brazil', 5.62, 'Cash', '2016-12-26', 'Complete') +,(4384, 212, 88, '2016-07-23', '2016-05-07', 'Louise Baker', '46092 Kedzie Court', null, 'Ban Mo', null, '18130', 'Thailand', 4.0, 'Card', '2016-07-11', 'Complete') +,(4385, 203, 62, '2017-02-20', '2016-10-01', 'Paul Thompson', '77444 Northwestern Pass', null, 'Francisco I Madero', 'Coahuila De Zaragoza', '26010', 'Mexico', 3.99, 'Check', '2016-12-23', 'Shipped') +,(4386, 218, 26, '2016-09-02', '2016-06-10', 'Anne Kim', '67814 Buena Vista Court', null, 'Sanjie', null, null, 'China', 9.61, 'Card', '2016-04-05', 'New') +,(4387, 219, 20, '2017-03-05', '2016-12-19', 'Matthew Gutierrez', '33055 Evergreen Crossing', null, 'Cusco', null, null, 'Peru', 6.52, 'Check', '2017-02-17', 'Shipped') +,(4388, 219, 71, '2016-09-06', '2016-05-24', 'Janet Hernandez', '9243 Forest Run Parkway', null, 'Ulanov', null, null, 'Ukraine', 3.04, 'Cash', '2016-09-20', 'New') +,(4389, 207, 2 , '2016-04-25', '2017-02-16', 'Louis Chapman', '878 Roth Alley', null, 'Kusak', null, '423430', 'Russia', 5.78, 'Cash', '2017-02-18', 'On Hold') +,(4390, 218, 64, '2016-09-25', '2016-09-22', 'Joe Carpenter', '56 Artisan Park', null, 'Xinjiang', null, null, 'China', 8.2, 'Card', '2016-12-01', 'On Hold') +,(4391, 218, 64, '2016-07-30', '2016-07-23', 'Charles Harper', '7 Sutherland Road', null, 'Tatarbunary', null, null, 'Ukraine', 4.62, 'Cash', '2016-06-29', 'Shipped') +,(4392, 206, 92, '2016-05-05', '2016-07-17', 'Craig Reynolds', '3 Erie Park', null, 'East End', null, null, 'Canada', 2.03, 'Check', '2017-02-03', 'New') +,(4393, 212, 45, '2016-06-29', '2016-06-17', 'Raymond Mcdonald', '792 Brown Trail', null, 'Yangfang', null, null, 'China', 4.44, 'Card', '2017-02-27', 'Complete') +,(4394, 211, 87, '2016-09-28', '2016-04-03', 'Sandra Medina', '7 Eagan Circle', null, 'Baratleke', null, null, 'Indonesia', 4.34, 'Cash', '2017-01-05', 'Complete') +,(4395, 203, 57, '2016-08-18', '2017-03-05', 'Sean Carpenter', '33 Dottie Park', null, 'Sokal’', null, null, 'Ukraine', 5.39, 'Cash', '2017-02-22', 'On Hold') +,(4396, 203, 87, '2016-06-19', '2016-07-10', 'Alice Ferguson', '0399 Dixon Hill', null, 'Privolzhskiy', null, '413138', 'Russia', 8.74, 'Cash', '2016-12-23', 'New') +,(4397, 216, 61, '2016-08-01', '2016-12-25', 'Diana Nguyen', '5052 Rigney Junction', null, 'Guaynabo', 'Pr', '00971', 'Germany', 5.36, 'Check', '2016-07-12', 'On Hold') +,(4398, 211, 52, '2016-12-04', '2016-05-11', 'Earl Gutierrez', '32 Summit Avenue', null, 'Maqbanah', null, null, 'South Africa', 5.82, 'Cash', '2016-07-21', 'New') +,(4399, 208, 71, '2016-05-16', '2017-02-25', 'Gloria Gordon', '5 Prentice Trail', null, 'Xichang', null, null, 'China', 3.2, 'Card', '2016-05-24', 'Complete') +,(4400, 218, 7 , '2016-09-06', '2016-03-21', 'Robert Wheeler', '83 Logan Circle', null, 'Zhongshan', null, null, 'China', 9.15, 'Cash', '2016-08-16', 'Shipped') +,(4401, 210, 53, '2016-09-05', '2016-05-01', 'Walter Williamson', '8459 American Plaza', null, 'Santo Rosario', null, '3114', 'Philippines', 7.71, 'Check', '2017-01-25', 'New') +,(4402, 216, 92, '2016-10-10', '2016-03-28', 'Jonathan James', '164 Bonner Hill', null, 'Vale de Mendiz', 'Vila Real', '5085-105', 'Portugal', 2.96, 'Card', '2016-07-15', 'Shipped') +,(4403, 212, 12, '2016-09-15', '2016-11-11', 'Judy Williams', '207 Scofield Place', null, 'Lawa-an', null, '5706', 'Philippines', 9.68, 'Check', '2016-04-30', 'On Hold') +,(4404, 213, 83, '2016-04-25', '2016-05-14', 'Amy Olson', '84189 Schurz Circle', null, 'Ogoja', null, null, 'Netherlands', 5.18, 'Card', '2016-11-02', 'Complete') +,(4405, 209, 7 , '2016-12-01', '2016-08-30', 'Donna Vasquez', '82460 Ridgeway Hill', null, 'La Guacamaya', null, null, 'Canada', 5.32, 'Card', '2017-02-11', 'Complete') +,(4406, 209, 66, '2016-09-14', '2016-05-13', 'Susan Jacobs', '17 Morningstar Lane', null, 'Chedao', null, null, 'China', 4.12, 'Cash', '2016-11-11', 'New') +,(4407, 214, 57, '2016-05-04', '2016-06-03', 'Kathryn Burns', '116 Hollow Ridge Park', null, 'Comagascas', null, '1950', 'Philippines', 1.05, 'Cash', '2017-01-28', 'New') +,(4408, 201, 64, '2017-02-11', '2016-06-08', 'Doris Bennett', '090 Lien Place', null, 'Luotang', null, null, 'China', 1.35, 'Cash', '2016-12-16', 'Complete') +,(4409, 209, 41, '2017-02-28', '2016-09-05', 'Cynthia Robertson', '6 Eliot Center', null, 'Abu Dhabi', null, null, 'Denmark', 4.21, 'Check', '2017-01-01', 'New') +,(4410, 215, 24, '2016-08-28', '2016-10-30', 'Jonathan Parker', '0 Weeping Birch Hill', null, 'Cienfuegos', null, null, 'Denmark', 1.69, 'Card', '2017-01-21', 'Shipped') +,(4411, 206, 10, '2016-08-30', '2016-12-06', 'Bobby Foster', '8279 Ridgeview Place', null, 'Cruz Alta', null, '98000-000', 'Brazil', 7.5, 'Cash', '2016-09-09', 'On Hold') +,(4412, 205, 65, '2016-12-13', '2017-02-27', 'Phyllis Moore', '806 Acker Drive', null, 'Paoay', null, '2902', 'Philippines', 4.63, 'Cash', '2017-01-11', 'Shipped') +,(4413, 211, 2 , '2016-12-05', '2016-12-07', 'Kevin Gordon', '00875 Sherman Lane', null, 'Wansheng', null, null, 'China', 2.7, 'Card', '2016-07-31', 'New') +,(4414, 219, 25, '2017-02-08', '2016-06-22', 'Jack Mccoy', '2 Killdeer Center', null, 'Gresik', null, null, 'Indonesia', 4.1, 'Check', '2017-03-05', 'On Hold') +,(4415, 220, 9 , '2017-01-02', '2016-08-28', 'Margaret Fuller', '1960 Parkside Hill', null, 'Kafr Zaytā', null, null, 'India', 1.09, 'Cash', '2016-08-07', 'New') +,(4416, 214, 100,'2017-01-07', '2017-02-07', 'Melissa Nichols', '6 Lakewood Gardens Avenue', null, 'Stockholm', 'Stockholm', '113 90', 'Sweden', 4.1, 'Cash', '2016-03-31', 'On Hold') +,(4417, 210, 87, '2017-01-23', '2016-12-14', 'William Webb', '84 Mifflin Junction', null, 'Kanungu', null, null, 'South Africa', 4.38, 'Card', '2016-05-05', 'Complete') +,(4418, 213, 29, '2017-01-05', '2017-02-07', 'Anne Gonzales', '7 Myrtle Plaza', null, 'Davila', null, '2012', 'Philippines', 5.45, 'Cash', '2016-05-23', 'Shipped') +,(4419, 212, 94, '2016-10-19', '2016-12-20', 'Kathleen Graham', '22 Forest Run Hill', null, 'Mollepampa', null, null, 'Peru', 5.86, 'Check', '2016-07-31', 'Shipped') +,(4420, 201, 32, '2016-11-29', '2016-09-24', 'Diana Sanders', '8925 Kennedy Parkway', null, 'San Miguel de Tucumán', null, '4137', 'Argentina', 3.71, 'Cash', '2016-08-10', 'Complete') +,(4421, 208, 58, '2017-03-02', '2016-04-03', 'Willie Wright', '60 Old Shore Alley', null, 'Jinjiang', null, null, 'China', 6.72, 'Card', '2016-10-09', 'Shipped') +,(4422, 206, 59, '2016-04-19', '2016-12-29', 'Frank Evans', '785 Little Fleur Center', null, 'El Triunfo', null, null, 'Argentina', 9.43, 'Check', '2016-05-13', 'New') +,(4423, 209, 68, '2016-08-22', '2016-11-20', 'Phillip Carter', '6398 John Wall Center', null, 'Shouxihu', null, null, 'China', 4.22, 'Check', '2016-10-18', 'New') +,(4424, 205, 31, '2016-10-05', '2016-10-09', 'Lillian Gomez', '17560 Melrose Point', null, 'Milwaukee', 'Wisconsin', '53205', 'United States', 1.16, 'Check', '2016-04-17', 'On Hold') +,(4425, 202, 7 , '2016-07-24', '2017-02-22', 'John Ortiz', '45 Vera Place', null, 'Kiel', 'Schleswig-Holstein', '24109', 'Germany', 5.86, 'Cash', '2016-10-13', 'On Hold') +,(4426, 214, 80, '2016-10-04', '2016-09-01', 'Brandon Fields', '94792 Jackson Hill', null, 'San Juan', 'Pr', '00918', 'Germany', 2.54, 'Check', '2016-12-19', 'On Hold') +,(4427, 209, 23, '2016-06-23', '2016-04-29', 'Willie Hart', '20 Sloan Terrace', null, 'Mount Darwin', null, null, 'India', 3.71, 'Cash', '2016-09-22', 'Complete') +,(4428, 211, 7 , '2016-09-07', '2016-10-28', 'Walter Montgomery', '67285 Crowley Road', null, 'Wailolong', null, null, 'Indonesia', 9.79, 'Check', '2016-04-05', 'Complete') +,(4429, 217, 10, '2017-03-02', '2016-11-27', 'Sara Williamson', '72 Monterey Circle', null, 'Salvacion', null, '1114', 'Philippines', 3.33, 'Card', '2016-05-18', 'On Hold') +,(4430, 210, 12, '2017-02-18', '2016-03-17', 'Wayne Sanders', '21302 Valley Edge Pass', null, 'Balakasap', null, null, 'Indonesia', 2.18, 'Card', '2016-06-02', 'New') +,(4431, 220, 80, '2016-10-01', '2016-09-28', 'Cynthia Allen', '1 Karstens Avenue', null, 'Santo António das Areias', 'Portalegre', '7330-254', 'Portugal', 3.4, 'Cash', '2016-08-21', 'New') +,(4432, 211, 95, '2017-02-04', '2016-03-17', 'Jonathan Hughes', '93993 Fairview Junction', null, 'Buje', null, '52460', 'Canada', 5.19, 'Cash', '2016-10-01', 'New') +,(4433, 208, 67, '2017-02-11', '2016-06-01', 'Gerald Wright', '77811 Dennis Point', null, 'Hohoe', null, null, 'United Kingdom', 3.25, 'Card', '2016-07-15', 'New') +,(4434, 201, 53, '2016-12-25', '2017-01-07', 'Roy Anderson', '182 High Crossing Terrace', null, 'Bajiazi', null, null, 'China', 8.8, 'Card', '2017-02-11', 'Shipped') +,(4435, 207, 3 , '2016-05-30', '2016-04-07', 'Brenda Wright', '98 Kim Drive', null, 'Lillehammer', 'Oppland', '2605', 'Greece', 5.76, 'Cash', '2017-02-02', 'On Hold') +,(4436, 204, 29, '2016-07-19', '2016-07-05', 'Philip Price', '16 Brown Plaza', null, 'Čapljina', null, null, 'India', 9.62, 'Cash', '2016-11-05', 'On Hold') +,(4437, 210, 80, '2016-10-13', '2016-04-24', 'Michelle Webb', '4160 Everett Point', null, 'Waepana', null, null, 'Indonesia', 9.54, 'Cash', '2016-07-11', 'Complete') +,(4438, 209, 6 , '2016-12-31', '2017-01-27', 'Heather Fields', '10 Fairview Center', null, 'Złotniki Kujawskie', null, '88-180', 'Poland', 1.81, 'Cash', '2017-03-15', 'Shipped') +,(4439, 216, 53, '2017-02-01', '2016-09-12', 'Ryan Long', '0 Gateway Avenue', null, 'Pizhanka', null, '613380', 'Russia', 9.34, 'Cash', '2016-07-02', 'New') +,(4440, 211, 25, '2017-02-03', '2016-10-13', 'Joyce Stewart', '61 Burrows Street', null, 'Kushelevka', null, '658381', 'Russia', 6.4, 'Cash', '2017-01-29', 'On Hold') +,(4441, 215, 93, '2016-03-21', '2016-11-17', 'Walter Arnold', '97613 Pond Avenue', null, 'Looc', null, '5507', 'Philippines', 1.09, 'Cash', '2016-10-05', 'Shipped') +,(4442, 214, 10, '2016-05-10', '2016-05-31', 'Irene Simmons', '36 Larry Court', null, 'Rozhdestveno', null, '399768', 'Russia', 4.82, 'Check', '2017-01-13', 'Complete') +,(4443, 208, 19, '2017-02-09', '2017-02-05', 'Christina Mccoy', '1482 Rockefeller Point', null, 'Rybatskoye', null, '196851', 'Russia', 1.62, 'Cash', '2016-09-14', 'Shipped') +,(4444, 210, 98, '2017-02-15', '2016-05-17', 'Marie Fowler', '04 Prairie Rose Junction', null, 'Chicago', 'Illinois', '60604', 'United States', 7.47, 'Card', '2017-02-22', 'Complete') +,(4445, 218, 32, '2017-02-12', '2016-05-20', 'Louise Bell', '3 Charing Cross Pass', null, 'Selce', null, '1219', 'Denmark', 4.47, 'Cash', '2016-04-01', 'New') +,(4446, 209, 25, '2016-09-22', '2016-12-03', 'Barbara Black', '697 Oneill Drive', null, 'Shanghang', null, null, 'China', 4.66, 'Check', '2016-11-09', 'On Hold') +,(4447, 209, 100,'2016-08-26', '2017-01-16', 'James Holmes', '77 Marcy Court', null, 'Estreito', null, '65975-000', 'Brazil', 9.85, 'Check', '2016-12-04', 'On Hold') +,(4448, 210, 72, '2016-06-25', '2016-12-07', 'Kenneth Williams', '6400 Milwaukee Hill', null, 'Wanshan', null, null, 'China', 3.66, 'Card', '2016-06-09', 'On Hold') +,(4449, 213, 16, '2016-12-13', '2016-08-07', 'Joshua Jacobs', '8 Judy Park', null, 'Ágios Andréas', null, null, 'Greece', 3.81, 'Cash', '2016-07-07', 'Complete') +,(4450, 216, 100,'2016-12-21', '2017-02-13', 'Aaron Sanders', '1 Dakota Court', null, 'Huayllo', null, null, 'Peru', 7.59, 'Cash', '2016-04-22', 'On Hold') +,(4451, 211, 50, '2016-08-22', '2016-06-05', 'Eugene Scott', '03 Golden Leaf Point', null, 'Stírion', null, null, 'Greece', 8.99, 'Card', '2017-02-25', 'New') +,(4452, 220, 86, '2016-05-07', '2016-07-20', 'Cynthia Phillips', '820 Merchant Way', null, 'Mrongi Daja', null, null, 'Indonesia', 2.21, 'Check', '2016-04-27', 'On Hold') +,(4453, 213, 58, '2016-10-30', '2016-03-22', 'Martin Reed', '14 Meadow Vale Alley', null, 'Jiangdong', null, null, 'China', 3.58, 'Cash', '2017-02-12', 'Complete') +,(4454, 206, 98, '2016-05-14', '2016-11-07', 'Janet Porter', '74391 Ronald Regan Park', null, 'Lamakera Dua', null, null, 'Indonesia', 9.86, 'Check', '2016-06-12', 'New') +,(4455, 204, 2 , '2016-03-28', '2016-04-11', 'Amanda Duncan', '047 Jenna Road', null, 'Tungawan', null, '7018', 'Philippines', 2.04, 'Card', '2016-07-09', 'New') +,(4456, 211, 58, '2016-08-05', '2016-11-19', 'Joseph Henderson', '14 Morningstar Pass', null, 'Kolobolon', null, null, 'Indonesia', 6.44, 'Check', '2016-05-24', 'New') +,(4457, 215, 21, '2017-02-15', '2016-06-11', 'Cynthia Bishop', '066 Surrey Pass', null, 'Hưng Yên', null, null, 'Vietnam', 1.61, 'Check', '2016-07-05', 'Shipped') +,(4458, 211, 10, '2016-08-08', '2016-08-06', 'Craig Andrews', '7 Mariners Cove Court', null, 'Tuanchengshan', null, null, 'China', 8.4, 'Cash', '2016-12-15', 'New') +,(4459, 211, 71, '2016-05-13', '2017-02-19', 'Steve Warren', '6702 Delladonna Point', null, 'Pražmo', null, '739 04', 'Czech Republic', 8.29, 'Card', '2016-06-29', 'New') +,(4460, 214, 5 , '2016-12-21', '2016-06-21', 'Brenda Mills', '77934 Prairieview Way', null, 'Huafeng', null, null, 'China', 6.76, 'Cash', '2016-07-08', 'New') +,(4461, 212, 34, '2016-04-27', '2016-07-22', 'Randy Wright', '9 Thackeray Way', null, 'Dvůr Králové nad Labem', null, '544 01', 'Czech Republic', 9.45, 'Card', '2016-03-20', 'Shipped') +,(4462, 202, 47, '2016-10-31', '2016-06-30', 'Michelle Ramirez', '0152 Old Shore Road', null, 'Pulaupinang', null, null, 'Indonesia', 2.42, 'Card', '2016-09-05', 'New') +,(4463, 209, 86, '2016-07-30', '2016-04-29', 'Frank Duncan', '67 Buell Terrace', null, 'Krasne', null, null, 'Ukraine', 2.71, 'Card', '2016-06-22', 'Complete') +,(4464, 204, 62, '2017-03-01', '2017-03-11', 'Carlos Warren', '978 Merrick Circle', null, 'Penghua', null, null, 'China', 7.29, 'Cash', '2016-03-22', 'Shipped') +,(4465, 202, 87, '2016-06-23', '2016-11-15', 'Tina Gardner', '0 Mcguire Terrace', null, 'Cangqian', null, null, 'China', 2.17, 'Card', '2016-06-01', 'New') +,(4466, 220, 31, '2016-06-04', '2016-06-08', 'Stephen Turner', '17 Leroy Plaza', null, 'Pedaringan', null, null, 'Indonesia', 8.89, 'Check', '2016-05-09', 'Shipped') +,(4467, 210, 35, '2016-05-21', '2016-09-26', 'Melissa Wilson', '61199 Forest Center', null, 'Krmelín', null, '739 24', 'Czech Republic', 2.35, 'Card', '2016-06-20', 'On Hold') +,(4468, 216, 50, '2016-09-10', '2016-12-02', 'Billy Harper', '8940 Fisk Parkway', null, 'San Jose', 'California', '95113', 'United States', 3.98, 'Cash', '2016-10-04', 'Complete') +,(4469, 207, 22, '2016-06-03', '2016-11-06', 'Carl Davis', '5 Lindbergh Street', null, 'Taling Chan', null, '10170', 'Thailand', 4.71, 'Card', '2017-02-03', 'New') +,(4470, 211, 64, '2016-06-16', '2016-05-26', 'Gerald Henry', '2221 Porter Crossing', null, 'Mozdok', null, '363759', 'Russia', 9.57, 'Cash', '2016-10-11', 'Shipped') +,(4471, 206, 25, '2016-07-27', '2016-08-24', 'Debra Garza', '65379 Sunnyside Trail', null, 'Jiadingzhen', null, null, 'China', 1.06, 'Check', '2016-06-23', 'On Hold') +,(4472, 204, 18, '2016-08-30', '2016-10-09', 'Margaret Rodriguez', '3202 Marquette Point', null, 'Oranzherei', null, '416368', 'Russia', 3.35, 'Check', '2016-06-18', 'On Hold') +,(4473, 212, 88, '2016-10-29', '2016-05-25', 'William Burke', '46 Kingsford Center', null, 'San Juan', null, '11301', 'Denmark', 3.85, 'Check', '2017-02-12', 'Shipped') +,(4474, 217, 9 , '2017-02-19', '2016-05-29', 'Larry Myers', '731 Packers Point', null, 'Trelleborg', 'Skåne', '231 68', 'Sweden', 4.46, 'Card', '2016-06-19', 'New') +,(4475, 202, 40, '2016-11-03', '2016-04-25', 'Virginia Hall', '141 Rowland Way', null, 'Aoji-ri', null, null, 'Denmark', 7.58, 'Check', '2016-11-13', 'Shipped') +,(4476, 211, 16, '2017-03-07', '2016-10-14', 'Doris Berry', '60 Rusk Lane', null, 'Al Qamşīyah', null, null, 'India', 1.8, 'Check', '2016-03-19', 'On Hold') +,(4477, 210, 87, '2016-12-04', '2016-03-22', 'Juan Richards', '3830 Randy Parkway', null, 'Nakhon Nayok', null, '26120', 'Thailand', 1.22, 'Card', '2016-08-05', 'Complete') +,(4478, 203, 34, '2017-01-28', '2016-09-27', 'Kimberly Fox', '34957 Elka Way', null, 'Santiago', null, '97700-000', 'Brazil', 3.99, 'Check', '2016-07-06', 'On Hold') +,(4479, 219, 89, '2016-07-01', '2016-05-31', 'Ruby Ruiz', '90581 American Hill', null, 'Agudos', null, '17120-000', 'Brazil', 5.97, 'Cash', '2016-06-03', 'On Hold') +,(4480, 203, 53, '2016-10-17', '2016-11-07', 'Ruby Robinson', '385 Carioca Plaza', null, 'Kalangan', null, null, 'Indonesia', 8.71, 'Card', '2016-12-01', 'Complete') +,(4481, 207, 91, '2017-02-25', '2016-03-31', 'Victor Lopez', '170 Mariners Cove Circle', null, 'Bressuire', 'Poitou-Charentes', '79304 CEDEX', 'France', 8.59, 'Check', '2016-07-30', 'Complete') +,(4482, 215, 58, '2017-02-15', '2016-07-25', 'Kimberly Marshall', '647 Summerview Circle', null, 'Timahankrajan', null, null, 'Indonesia', 3.07, 'Check', '2016-04-21', 'On Hold') +,(4483, 207, 76, '2016-06-27', '2016-10-15', 'Pamela Matthews', '9379 Summit Trail', null, 'Brangsi', null, null, 'Indonesia', 1.35, 'Card', '2016-05-27', 'New') +,(4484, 210, 98, '2017-02-03', '2016-11-04', 'Randy Patterson', '6641 American Ash Point', null, 'Ivanec', null, '42240', 'Canada', 2.36, 'Card', '2016-10-31', 'Shipped') +,(4485, 205, 71, '2017-01-01', '2017-02-16', 'Carolyn Garza', '281 Raven Lane', null, 'Jingyang', null, null, 'China', 6.85, 'Check', '2016-04-27', 'Shipped') +,(4486, 202, 20, '2016-07-24', '2016-07-06', 'Ruth Perkins', '5656 Northview Lane', null, 'Burevestnik', null, '607612', 'Russia', 9.29, 'Cash', '2017-03-16', 'On Hold') +,(4487, 203, 49, '2017-02-20', '2017-01-12', 'Kelly Oliver', '249 Londonderry Pass', null, 'Grande Rivière du Nord', null, null, 'Canada', 7.65, 'Check', '2016-12-04', 'Shipped') +,(4488, 203, 67, '2016-11-09', '2016-07-19', 'Shirley Henry', '3045 Rowland Lane', null, 'Midlands', null, null, 'Germany', 5.35, 'Check', '2016-06-14', 'Complete') +,(4489, 209, 100,'2017-01-24', '2016-05-30', 'Marie Ferguson', '629 Crownhardt Junction', null, 'El Paso', 'Texas', '88546', 'United States', 5.18, 'Check', '2016-04-20', 'Shipped') +,(4490, 202, 87, '2016-06-27', '2016-09-05', 'Rachel Scott', '343 Schurz Road', null, 'Cabiguan', null, '1144', 'Philippines', 1.05, 'Cash', '2016-07-24', 'Shipped') +,(4491, 211, 93, '2017-01-16', '2016-09-29', 'Henry Fields', '26143 Del Sol Avenue', null, 'Huangduobu', null, null, 'China', 6.15, 'Card', '2016-06-02', 'Shipped') +,(4492, 217, 10, '2016-12-08', '2016-10-01', 'Harold Jones', '2 Oak Avenue', null, 'Surkhakhi', null, '386147', 'Russia', 9.96, 'Card', '2016-04-07', 'New') +,(4493, 217, 35, '2016-05-05', '2016-05-01', 'Walter Wright', '12 Paget Road', null, 'Siluman', null, null, 'Indonesia', 2.1, 'Cash', '2016-10-26', 'On Hold') +,(4494, 206, 51, '2017-02-25', '2016-10-24', 'Marilyn Hayes', '4 5th Way', null, 'Punkaharju', null, '58501', 'Finland', 3.57, 'Cash', '2016-06-22', 'New') +,(4495, 208, 3 , '2016-12-27', '2016-09-09', 'Sandra West', '0384 Bowman Center', null, 'Tagta', null, null, 'India', 6.45, 'Cash', '2016-08-25', 'New') +,(4496, 218, 41, '2017-01-10', '2016-12-11', 'Dennis Meyer', '4 Cambridge Alley', null, 'Cariamanga', null, null, 'Argentina', 5.33, 'Check', '2016-09-28', 'New') +,(4497, 216, 76, '2016-09-28', '2016-05-12', 'Frank Dean', '23227 Veith Park', null, 'Fengqiao', null, null, 'China', 6.72, 'Cash', '2016-04-12', 'Complete') +,(4498, 204, 3 , '2016-11-11', '2016-12-01', 'Amy Palmer', '7735 Maple Wood Road', null, 'Działoszyce', null, '28-440', 'Poland', 3.08, 'Card', '2016-09-07', 'Shipped') +,(4499, 211, 96, '2017-02-04', '2016-03-27', 'Emily Nelson', '3 Crownhardt Plaza', null, 'Oslob', null, '6025', 'Philippines', 6.41, 'Card', '2016-09-25', 'On Hold') +,(4500, 204, 7 , '2016-04-29', '2017-01-20', 'Randy Hanson', '687 Drewry Place', null, 'Barberena', null, '06002', 'Japan', 2.51, 'Card', '2016-12-12', 'Complete') +,(4501, 215, 92, '2017-02-27', '2016-09-26', 'Raymond Banks', '826 Mendota Pass', null, 'Chicago', 'Illinois', '60681', 'United States', 3.34, 'Card', '2016-10-30', 'Complete') +,(4502, 220, 24, '2016-10-01', '2016-09-26', 'Kimberly Robertson', '2643 Becker Trail', null, 'Columbus', 'United Kingdom', '31904', 'United States', 3.07, 'Check', '2016-04-27', 'Complete') +,(4503, 215, 52, '2017-02-25', '2016-08-08', 'Marilyn Miller', '1 Tennessee Park', null, 'Spokane', 'Washington', '99252', 'United States', 5.34, 'Check', '2016-08-16', 'On Hold') +,(4504, 220, 35, '2017-01-27', '2016-09-08', 'Marie Carpenter', '4575 Fair Oaks Hill', null, 'Richmond', 'Virginia', '23293', 'United States', 7.01, 'Cash', '2016-04-06', 'Shipped') +,(4505, 203, 10, '2016-06-24', '2017-02-22', 'Nicholas Wells', '823 Duke Center', null, 'Irvine', 'California', '92710', 'United States', 1.4, 'Check', '2016-06-17', 'On Hold') +,(4506, 207, 26, '2016-12-26', '2017-03-14', 'John Dean', '06 Spenser Place', null, 'Charleston', 'South Carolina', '29403', 'United States', 1.31, 'Cash', '2016-10-25', 'Shipped') +,(4507, 216, 28, '2016-08-22', '2016-12-13', 'Diana Spencer', '26 Ridgeway Plaza', null, 'Ogden', 'Utah', '84403', 'United States', 9.42, 'Cash', '2016-04-13', 'Shipped') +,(4508, 213, 90, '2016-08-31', '2017-01-13', 'Wanda Bowman', '862 Iowa Avenue', null, 'Kansas City', 'Kansas', '66160', 'United States', 7.1, 'Cash', '2016-10-19', 'Complete') +,(4509, 204, 93, '2016-07-07', '2016-05-31', 'Andrew Garrett', '27066 Gina Road', null, 'El Paso', 'Texas', '88558', 'United States', 6.88, 'Check', '2016-04-23', 'Complete') +,(4510, 202, 56, '2017-02-06', '2016-10-29', 'Juan Webb', '6233 South Junction', null, 'Lafayette', 'Louisiana', '70505', 'United States', 1.07, 'Cash', '2016-05-20', 'New') +,(4511, 219, 54, '2016-11-08', '2016-06-17', 'William Gardner', '5 Meadow Ridge Terrace', null, 'Tacoma', 'Washington', '98447', 'United States', 4.46, 'Check', '2016-05-25', 'Complete') +,(4512, 215, 4 , '2016-09-09', '2016-08-21', 'Fred Fernandez', '15 Ludington Junction', null, 'San Rafael', 'California', '94913', 'United States', 4.3, 'Cash', '2016-09-02', 'New') +,(4513, 206, 54, '2016-10-28', '2016-06-30', 'Ruth Ellis', '41196 Rieder Avenue', null, 'Baltimore', 'Maryland', '21211', 'United States', 8.39, 'Card', '2016-05-29', 'Complete') +,(4514, 215, 73, '2017-02-26', '2016-09-17', 'David Ferguson', '5813 Brown Parkway', null, 'Shawnee Mission', 'Kansas', '66286', 'United States', 2.71, 'Card', '2016-04-18', 'Shipped') +,(4515, 216, 23, '2016-11-08', '2016-06-27', 'Susan Freeman', '0 Bashford Parkway', null, 'Tucson', 'Arizona', '85720', 'United States', 5.5, 'Check', '2017-02-01', 'Shipped') +,(4516, 212, 9 , '2016-04-30', '2016-12-31', 'Alan Hunt', '193 Declaration Plaza', null, 'Louisville', 'Kentucky', '40256', 'United States', 9.74, 'Cash', '2017-01-20', 'On Hold') +,(4517, 202, 46, '2017-02-01', '2016-07-22', 'Phillip Romero', '1860 Thompson Crossing', null, 'Biloxi', 'Mississippi', '39534', 'United States', 3.02, 'Card', '2016-11-04', 'Complete') +,(4518, 203, 75, '2016-09-07', '2016-11-14', 'George Diaz', '6 Mcguire Center', null, 'Mesa', 'Arizona', '85210', 'United States', 7.84, 'Check', '2016-06-21', 'Shipped') +,(4519, 217, 68, '2016-10-07', '2016-08-15', 'Virginia King', '7405 High Crossing Alley', null, 'Sioux City', 'Iowa', '51105', 'United States', 4.03, 'Check', '2016-05-09', 'Complete') +,(4520, 216, 6 , '2017-02-18', '2017-02-17', 'Brenda Ruiz', '224 Badeau Street', null, 'Corpus Christi', 'Texas', '78426', 'United States', 9.11, 'Check', '2016-11-13', 'New') +,(4521, 201, 84, '2016-09-17', '2016-06-15', 'Debra Brown', '94 Morningstar Center', null, 'San Francisco', 'California', '94177', 'United States', 6.59, 'Check', '2017-03-10', 'Shipped') +,(4522, 205, 89, '2016-10-22', '2017-03-13', 'Emily Henry', '79 Manufacturers Center', null, 'Los Angeles', 'California', '90020', 'United States', 4.11, 'Cash', '2016-10-27', 'Complete') +,(4523, 211, 67, '2016-04-17', '2017-02-12', 'Aaron Peterson', '504 Schlimgen Terrace', null, 'Bethesda', 'Maryland', '20892', 'United States', 5.42, 'Card', '2016-08-25', 'Shipped') +,(4524, 215, 83, '2016-08-22', '2016-07-31', 'Janice Burke', '3 Mcbride Lane', null, 'Washington', 'District of Columbia', '20073', 'United States', 3.76, 'Card', '2016-08-09', 'Shipped') +,(4525, 217, 100,'2016-03-31', '2016-12-09', 'Debra Kelley', '18155 Northview Plaza', null, 'Detroit', 'Michigan', '48267', 'United States', 2.26, 'Cash', '2016-12-29', 'On Hold') +,(4526, 214, 32, '2016-11-24', '2016-03-28', 'Donald Sims', '86 Michigan Avenue', null, 'Brooklyn', 'New York', '11231', 'United States', 5.05, 'Check', '2016-08-07', 'Shipped') +,(4527, 205, 100,'2016-05-13', '2016-06-17', 'Daniel Mason', '4 Hanover Road', null, 'Reno', 'Nevada', '89595', 'United States', 4.81, 'Check', '2016-10-22', 'Shipped') +,(4528, 201, 32, '2016-11-15', '2016-11-16', 'Howard Knight', '5 Weeping Birch Alley', null, 'Jacksonville', 'Florida', '32225', 'United States', 5.99, 'Check', '2016-11-07', 'New') +,(4529, 213, 99, '2016-12-02', '2016-07-09', 'Virginia Hughes', '629 Manufacturers Point', null, 'Syracuse', 'New York', '13224', 'United States', 5.6, 'Card', '2016-12-02', 'Complete') +,(4530, 219, 18, '2016-12-07', '2017-02-07', 'Carl Graham', '90 Heffernan Pass', null, 'Saint Petersburg', 'Florida', '33737', 'United States', 9.35, 'Check', '2016-10-18', 'Complete') +,(4531, 201, 57, '2016-12-26', '2016-12-29', 'Joan Murray', '38 Bellgrove Crossing', null, 'Tacoma', 'Washington', '98447', 'United States', 6.69, 'Card', '2016-12-05', 'On Hold') +,(4532, 202, 58, '2016-04-02', '2016-07-01', 'Robert Williams', '09407 Northfield Circle', null, 'Cedar Rapids', 'Iowa', '52410', 'United States', 6.56, 'Card', '2016-04-16', 'On Hold') +,(4533, 218, 36, '2017-02-07', '2016-05-05', 'Ryan Black', '57199 Hoffman Place', null, 'Jacksonville', 'Florida', '32204', 'United States', 8.54, 'Check', '2017-01-24', 'Shipped') +,(4534, 208, 92, '2016-07-09', '2016-06-20', 'Brenda Hunter', '16179 Ludington Court', null, 'Birmingham', 'Alabama', '35263', 'United States', 9.82, 'Cash', '2016-09-30', 'New') +,(4535, 214, 70, '2016-08-04', '2016-06-29', 'Anne Warren', '08161 Barnett Parkway', null, 'Van Nuys', 'California', '91411', 'United States', 7.04, 'Cash', '2017-02-24', 'Complete') +,(4536, 213, 99, '2017-01-11', '2017-01-21', 'Betty Snyder', '9 Badeau Court', null, 'Davenport', 'Iowa', '52804', 'United States', 8.72, 'Card', '2016-09-03', 'Shipped') +,(4537, 217, 76, '2016-07-31', '2017-02-13', 'Edward Wilson', '1031 Esch Drive', null, 'Fresno', 'California', '93750', 'United States', 1.64, 'Check', '2016-04-21', 'On Hold') +,(4538, 210, 60, '2016-06-22', '2016-04-10', 'Terry Butler', '124 Hoepker Pass', null, 'San Antonio', 'Texas', '78255', 'United States', 2.35, 'Check', '2017-01-31', 'Complete') +,(4539, 220, 5 , '2016-11-12', '2016-04-25', 'Emily Hawkins', '990 Quincy Drive', null, 'Richmond', 'Virginia', '23289', 'United States', 4.36, 'Card', '2016-09-17', 'Complete') +,(4540, 213, 42, '2017-02-28', '2017-02-11', 'Cynthia Rose', '8881 Packers Trail', null, 'Berkeley', 'California', '94712', 'United States', 6.09, 'Check', '2016-04-14', 'New') +,(4541, 204, 27, '2016-09-30', '2017-01-28', 'Lisa Turner', '83 Graedel Terrace', null, 'Oakland', 'California', '94611', 'United States', 9.61, 'Card', '2016-05-07', 'Shipped') +,(4542, 219, 26, '2016-07-13', '2016-03-23', 'Jason Price', '475 Meadow Valley Point', null, 'Annapolis', 'Maryland', '21405', 'United States', 2.93, 'Check', '2016-06-10', 'New') +,(4543, 202, 63, '2016-07-29', '2016-05-20', 'Joan Hayes', '7 Upham Center', null, 'Temple', 'Texas', '76505', 'United States', 7.39, 'Card', '2016-09-20', 'Complete') +,(4544, 212, 97, '2016-10-31', '2017-01-16', 'Paula Torres', '443 Debs Terrace', null, 'Racine', 'Wisconsin', '53405', 'United States', 3.93, 'Card', '2016-07-07', 'Shipped') +,(4545, 201, 33, '2017-03-08', '2016-08-21', 'Theresa Watkins', '85395 Rusk Center', null, 'Jackson', 'Mississippi', '39210', 'United States', 5.32, 'Card', '2016-11-19', 'Complete') +,(4546, 211, 68, '2016-05-25', '2016-07-17', 'Clarence Nguyen', '155 Northport Road', null, 'Greensboro', 'North Carolina', '27455', 'United States', 7.06, 'Cash', '2016-08-24', 'Shipped') +,(4547, 203, 73, '2016-05-03', '2016-10-23', 'Jean Mason', '03 Eagle Crest Lane', null, 'Colorado Springs', 'Colorado', '80935', 'United States', 4.2, 'Cash', '2016-04-07', 'New') +,(4548, 217, 2 , '2016-05-20', '2016-08-07', 'Nicole Brown', '364 Debra Lane', null, 'Washington', 'District of Columbia', '20046', 'United States', 7.97, 'Cash', '2016-04-30', 'New') +,(4549, 220, 89, '2016-04-11', '2016-12-11', 'Carol Chapman', '756 Muir Point', null, 'Washington', 'District of Columbia', '20397', 'United States', 2.21, 'Card', '2017-02-05', 'Shipped') +,(4550, 211, 13, '2016-04-16', '2016-08-03', 'Roy George', '8 Anhalt Terrace', null, 'Indianapolis', 'Indiana', '46207', 'United States', 4.5, 'Check', '2017-03-06', 'New') +,(4551, 219, 37, '2016-04-14', '2017-03-01', 'Heather Bishop', '0901 Tennessee Street', null, 'Kingsport', 'Tennessee', '37665', 'United States', 1.92, 'Card', '2017-01-02', 'Shipped') +,(4552, 218, 94, '2017-03-05', '2016-06-01', 'Wayne Mason', '90645 Carberry Drive', null, 'Madison', 'Wisconsin', '53716', 'United States', 6.96, 'Card', '2016-12-31', 'Complete') +,(4553, 212, 37, '2016-10-16', '2016-10-13', 'Gloria Elliott', '100 Granby Junction', null, 'Miami', 'Florida', '33153', 'United States', 9.25, 'Cash', '2016-06-09', 'Shipped') +,(4554, 217, 4 , '2016-06-05', '2016-07-26', 'Timothy Hayes', '6001 Elgar Circle', null, 'Pensacola', 'Florida', '32575', 'United States', 6.5, 'Cash', '2016-03-30', 'Complete') +,(4555, 207, 49, '2016-08-19', '2016-08-15', 'Judith Baker', '3436 Briar Crest Park', null, 'Newark', 'New Jersey', '07188', 'United States', 2.33, 'Check', '2016-09-17', 'Complete') +,(4556, 217, 17, '2016-11-18', '2016-12-10', 'Roy Russell', '6401 Graedel Court', null, 'Alexandria', 'Virginia', '22301', 'United States', 3.24, 'Check', '2016-04-08', 'Complete') +,(4557, 216, 35, '2016-09-11', '2016-05-07', 'Jacqueline Davis', '864 Cherokee Lane', null, 'Columbus', 'Ohio', '43226', 'United States', 4.7, 'Card', '2016-08-06', 'Shipped') +,(4558, 211, 20, '2016-10-06', '2016-07-15', 'Eugene Castillo', '03090 Northland Circle', null, 'Salt Lake City', 'Utah', '84199', 'United States', 9.36, 'Card', '2016-10-06', 'Complete') +,(4559, 216, 13, '2017-01-13', '2016-03-28', 'Janice Mills', '522 Holmberg Alley', null, 'Scottsdale', 'Arizona', '85271', 'United States', 7.31, 'Cash', '2016-05-15', 'On Hold') +,(4560, 211, 77, '2016-08-24', '2017-03-13', 'Ruby White', '0070 Corben Way', null, 'Naples', 'Florida', '34114', 'United States', 3.71, 'Check', '2016-07-17', 'On Hold') +,(4561, 219, 55, '2016-08-13', '2016-11-19', 'Frank Jackson', '25 Rigney Point', null, 'Washington', 'District of Columbia', '20420', 'United States', 1.94, 'Cash', '2016-06-12', 'Shipped') +,(4562, 207, 96, '2016-10-12', '2016-12-04', 'Pamela Peterson', '830 Loftsgordon Junction', null, 'Houston', 'Texas', '77281', 'United States', 1.45, 'Check', '2017-03-06', 'New') +,(4563, 204, 70, '2016-07-23', '2017-02-06', 'Martha Frazier', '3 Gerald Lane', null, 'Scottsdale', 'Arizona', '85260', 'United States', 2.74, 'Cash', '2017-01-19', 'New') +,(4564, 204, 59, '2017-02-26', '2016-10-23', 'Kenneth Hawkins', '27305 Maple Crossing', null, 'San Diego', 'California', '92145', 'United States', 9.41, 'Cash', '2017-02-09', 'On Hold') +,(4565, 203, 66, '2016-08-06', '2017-02-03', 'Barbara Collins', '8 Norway Maple Junction', null, 'Fort Worth', 'Texas', '76198', 'United States', 1.08, 'Card', '2016-06-24', 'New') +,(4566, 217, 83, '2016-09-14', '2016-03-29', 'Gary Ellis', '97 Nobel Avenue', null, 'Alexandria', 'Louisiana', '71307', 'United States', 5.05, 'Card', '2016-06-13', 'Shipped') +,(4567, 214, 63, '2017-03-04', '2016-11-05', 'Douglas Hughes', '98309 Mccormick Park', null, 'Kansas City', 'Kansas', '66160', 'United States', 1.4, 'Card', '2017-02-13', 'Shipped') +,(4568, 208, 12, '2016-10-31', '2017-02-27', 'Harold Flores', '1 Merchant Lane', null, 'Duluth', 'United Kingdom', '30096', 'United States', 4.84, 'Check', '2016-04-30', 'On Hold') +,(4569, 201, 96, '2016-08-20', '2016-10-03', 'Marie Nguyen', '084 Stuart Hill', null, 'Arlington', 'Texas', '76004', 'United States', 5.95, 'Cash', '2016-04-25', 'On Hold') +,(4570, 203, 1 , '2016-10-13', '2016-03-21', 'Judy Fowler', '7541 Golf Course Way', null, 'Kansas City', 'Missouri', '64109', 'United States', 8.02, 'Check', '2016-05-05', 'New') +,(4571, 219, 49, '2016-11-04', '2016-09-02', 'Howard Rogers', '5 Scott Hill', null, 'Brooklyn', 'New York', '11215', 'United States', 5.21, 'Cash', '2016-10-28', 'Complete') +,(4572, 215, 5 , '2016-03-24', '2016-08-31', 'Stephanie Martinez', '0022 Reinke Trail', null, 'Baton Rouge', 'Louisiana', '70894', 'United States', 7.74, 'Card', '2016-08-14', 'On Hold') +,(4573, 206, 61, '2016-08-31', '2016-07-10', 'Jacqueline Lane', '780 Elka Place', null, 'Cleveland', 'Ohio', '44105', 'United States', 9.12, 'Check', '2016-11-30', 'On Hold') +,(4574, 220, 65, '2016-06-26', '2016-06-25', 'Betty Harrison', '23089 Kensington Junction', null, 'Greensboro', 'North Carolina', '27404', 'United States', 5.63, 'Check', '2016-03-30', 'Complete') +,(4575, 212, 81, '2016-04-28', '2016-10-19', 'Robin Bradley', '7895 Weeping Birch Plaza', null, 'Waterbury', 'Connecticut', '06721', 'United States', 7.34, 'Cash', '2017-01-25', 'On Hold') +,(4576, 216, 13, '2017-02-24', '2016-07-18', 'Ralph Bailey', '4019 Harper Park', null, 'Sacramento', 'California', '94291', 'United States', 6.77, 'Cash', '2017-02-02', 'New') +,(4577, 203, 43, '2016-09-24', '2016-11-18', 'Melissa Ross', '775 Lyons Road', null, 'Bridgeport', 'Connecticut', '06606', 'United States', 1.64, 'Check', '2016-07-23', 'Shipped') +,(4578, 212, 53, '2016-07-05', '2016-06-19', 'Joan Russell', '0 Kings Terrace', null, 'Bloomington', 'Illinois', '61709', 'United States', 4.66, 'Card', '2016-04-09', 'New') +,(4579, 214, 17, '2016-10-01', '2016-10-18', 'Benjamin George', '40131 Ronald Regan Road', null, 'Washington', 'District of Columbia', '20525', 'United States', 8.04, 'Check', '2016-06-16', 'Complete') +,(4580, 207, 69, '2016-04-19', '2017-02-09', 'Katherine Stone', '37483 Melrose Parkway', null, 'Fresno', 'California', '93794', 'United States', 6.7, 'Check', '2017-02-08', 'Complete') +,(4581, 218, 28, '2017-03-04', '2016-11-25', 'Ernest Cruz', '872 Nancy Street', null, 'Pompano Beach', 'Florida', '33069', 'United States', 5.81, 'Cash', '2016-04-21', 'On Hold') +,(4582, 217, 32, '2017-03-16', '2016-06-08', 'Joshua Edwards', '72309 Elmside Point', null, 'San Francisco', 'California', '94110', 'United States', 2.49, 'Cash', '2016-04-01', 'On Hold') +,(4583, 219, 83, '2017-01-24', '2016-07-25', 'Justin Mills', '88350 Wayridge Hill', null, 'Charleston', 'West Virginia', '25326', 'United States', 6.03, 'Card', '2016-10-07', 'New') +,(4584, 208, 45, '2016-10-18', '2016-05-13', 'Kathleen Gibson', '25 Carpenter Lane', null, 'Reno', 'Nevada', '89505', 'United States', 5.41, 'Check', '2016-08-21', 'Shipped') +,(4585, 216, 71, '2016-09-19', '2016-10-15', 'Ruby Bennett', '1 Muir Pass', null, 'Las Vegas', 'Nevada', '89135', 'United States', 2.5, 'Cash', '2016-11-29', 'On Hold') +,(4586, 214, 48, '2016-08-07', '2016-08-12', 'Richard Robinson', '1125 Melvin Terrace', null, 'Bethesda', 'Maryland', '20816', 'United States', 4.02, 'Card', '2017-01-09', 'Complete') +,(4587, 212, 62, '2016-12-17', '2017-01-23', 'Debra Sanchez', '534 Stoughton Lane', null, 'Johnstown', 'Pennsylvania', '15906', 'United States', 8.78, 'Cash', '2016-08-07', 'Shipped') +,(4588, 216, 30, '2016-10-24', '2016-12-21', 'Willie Dean', '680 Northview Circle', null, 'Huntington', 'West Virginia', '25775', 'United States', 8.43, 'Card', '2017-03-12', 'New') +,(4589, 210, 10, '2017-01-01', '2016-09-22', 'Christina Kelley', '8706 Sundown Street', null, 'Peoria', 'Illinois', '61635', 'United States', 4.24, 'Cash', '2017-02-08', 'On Hold') +,(4590, 205, 6 , '2016-11-29', '2017-02-23', 'Russell Montgomery', '977 Packers Drive', null, 'Charlotte', 'North Carolina', '28247', 'United States', 2.87, 'Cash', '2016-05-30', 'Complete') +,(4591, 206, 15, '2016-03-28', '2017-02-23', 'Edward Cunningham', '283 Bultman Way', null, 'Jacksonville', 'Florida', '32277', 'United States', 6.55, 'Check', '2017-03-10', 'Shipped') +,(4592, 209, 82, '2016-12-20', '2016-09-07', 'Michael Chavez', '00 Oak Avenue', null, 'Young America', 'Minnesota', '55551', 'United States', 8.22, 'Check', '2016-04-19', 'On Hold') +,(4593, 204, 24, '2017-03-13', '2016-08-30', 'David White', '506 Nevada Circle', null, 'Portland', 'Maine', '04109', 'United States', 1.11, 'Card', '2017-01-13', 'On Hold') +,(4594, 206, 27, '2016-09-13', '2017-03-12', 'Cheryl Vasquez', '9070 Di Loreto Court', null, 'Van Nuys', 'California', '91499', 'United States', 7.42, 'Card', '2017-02-25', 'On Hold') +,(4595, 211, 94, '2016-07-03', '2016-05-08', 'Charles Garrett', '1337 Hooker Trail', null, 'Honolulu', 'Hawaii', '96810', 'United States', 9.57, 'Check', '2016-10-04', 'Shipped') +,(4596, 216, 56, '2016-07-08', '2017-02-28', 'Michelle Butler', '1 Magdeline Lane', null, 'Orlando', 'Florida', '32813', 'United States', 7.05, 'Check', '2016-07-12', 'New') +,(4597, 217, 26, '2016-09-24', '2016-10-05', 'Howard Reyes', '3677 Donald Alley', null, 'Carol Stream', 'Illinois', '60351', 'United States', 7.62, 'Cash', '2017-02-08', 'Complete') +,(4598, 212, 76, '2016-04-13', '2016-08-10', 'Eugene Kelly', '838 Becker Plaza', null, 'Laredo', 'Texas', '78044', 'United States', 4.9, 'Check', '2016-10-23', 'New') +,(4599, 208, 29, '2016-04-16', '2016-05-15', 'Jimmy Mcdonald', '0 Dayton Place', null, 'Rochester', 'New York', '14646', 'United States', 1.56, 'Check', '2017-01-14', 'Complete') +,(4600, 208, 2 , '2016-04-26', '2016-04-06', 'Stephen Jacobs', '7131 Scoville Terrace', null, 'Phoenix', 'Arizona', '85020', 'United States', 4.52, 'Cash', '2017-01-22', 'On Hold'); + + + + +/* Order details */ +insert into order_items (order_id, product_id, quantity, unit_price, discount, order_item_status, date_allocated) values + (4001, 608, 1 , 97.34, 8.73, 'Allocated', '2017-01-15') +,(4001, 611, 2 , 58.46, 4.36, 'No Stock' , '2016-09-21') +,(4001, 616, 2 , 58.46, 4.36, 'No Stock' , '2016-09-21') +,(4001, 613, 2 , 58.46, 4.36, 'No Stock' , '2016-09-21') +,(4001, 615, 2 , 58.46, 4.36, 'No Stock' , '2016-09-21') +,(4002, 604, 3 , 88.97, 2.86, 'On Order' , '2016-12-15') +,(4002, 610, 4 , 37.19, 8.65, 'Allocated', '2016-10-12') +,(4002, 615, 4 , 37.19, 8.65, 'Allocated', '2016-10-12') +,(4003, 609, 8 , 92.87, 4.01, 'No Stock' , '2016-06-15') +,(4003, 612, 7 , 87.15, 3.54, 'No Stock' , '2017-02-09') +,(4004, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4004, 620, 2 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4004, 611, 4 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4004, 612, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4005, 618, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4005, 619, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4005, 620, 2 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4006, 617, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4006, 618, 2 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4006, 607, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4007, 617, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4007, 610, 2 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4007, 612, 5 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4008, 612, 1 , 57.2 , 8.94, 'Allocated', '2017-01-13') +,(4008, 615, 3 , 57.2 , 8.94, 'Allocated', '2017-01-13') +,(4008, 611, 1 , 57.2 , 8.94, 'Allocated', '2017-01-13') +,(4009, 605, 6 , 62.16, 5.68, 'No Stock' , '2017-02-13') +,(4009, 610, 6 , 19.31, 5.0 , 'No Stock' , '2016-09-16') +,(4009, 615, 9 , 51.21, 4.48, 'Allocated', '2016-10-18') +,(4010, 601, 1 , 32.18, 9.41, 'On Order' , '2016-03-17') +,(4010, 602, 1 , 31.35, 7.18, 'No Stock' , '2016-12-30') +,(4010, 603, 10, 24.24, 2.76, 'Allocated', '2016-07-05') +,(4010, 610, 6 , 9.09 , 3.02, 'On Order' , '2016-07-17') +,(4011, 604, 10, 58.25, 9.3 , 'No Stock' , '2016-04-04') +,(4011, 606, 5 , 73.34, 1.76, 'Allocated', '2016-06-30') +,(4011, 608, 3 , 95.07, 4.6 , 'On Order' , '2016-06-04') +,(4011, 615, 9 , 20.84, 3.93, 'Allocated', '2016-06-10') +,(4012, 604, 5 , 19.82, 9.97, 'No Stock' , '2016-09-21') +,(4012, 601, 3 , 19.82, 9.97, 'No Stock' , '2016-09-21') +,(4012, 610, 3 , 19.82, 9.97, 'No Stock' , '2016-09-21') +,(4013, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4013, 604, 2 , 19.82, 9.97, 'No Stock' , '2016-09-21') +,(4013, 606, 5 , 19.82, 9.97, 'No Stock' , '2016-09-21') +,(4014, 601, 3 , 37.57, 4.99, 'Allocated', '2016-08-21') +,(4015, 611, 8 , 95.27, 6.62, 'Allocated', '2017-03-13') +,(4015, 612, 2 , 89.63, 4.14, 'Allocated', '2016-04-07') +,(4015, 615, 8 , 69.03, 1.11, 'On Order' , '2016-08-15') +,(4016, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4016, 611, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4016, 612, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4017, 605, 6 , 75.88, 2.1 , 'On Order' , '2017-02-15') +,(4017, 610, 4 , 26.43, 7.18, 'On Order' , '2016-04-30') +,(4017, 619, 6 , 77.91, 9.26, 'No Stock' , '2016-04-02') +,(4018, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4019, 615, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4020, 614, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4021, 604, 3 , 20.14, 8.54, 'No Stock' , '2016-06-26') +,(4022, 614, 7 , 41.61, 4.62, 'On Order' , '2016-09-09') +,(4022, 619, 1 , 10.45, 2.56, 'On Order' , '2016-10-18') +,(4023, 607, 6 , 7.68 , 5.59, 'On Order' , '2016-11-15') +,(4023, 611, 7 , 89.4 , 1.71, 'No Stock' , '2016-04-03') +,(4024, 613, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4024, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4024, 608, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4024, 609, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4025, 612, 6 , 81.24, 3.52, 'Allocated', '2016-04-25') +,(4025, 614, 4 , 14.07, 2.58, 'On Order' , '2016-09-11') +,(4026, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4026, 618, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4027, 611, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4027, 612, 3 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4027, 613, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4028, 605, 5 , 95.04, 7.82, 'On Order' , '2016-07-24') +,(4028, 615, 8 , 74.56, 1.78, 'Allocated', '2016-12-09') +,(4029, 604, 1 , 11.06, 5.37, 'On Order' , '2016-11-26') +,(4029, 603, 1 , 11.06, 5.37, 'On Order' , '2016-11-26') +,(4029, 607, 1 , 11.06, 5.37, 'On Order' , '2016-11-26') +,(4030, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4030, 620, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4030, 619, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4031, 605, 7 , 75.42, 2.92, 'No Stock' , '2017-02-12') +,(4031, 608, 7 , 75.42, 2.92, 'No Stock' , '2017-02-12') +,(4031, 609, 7 , 75.42, 2.92, 'No Stock' , '2017-02-12') +,(4031, 615, 7 , 75.42, 2.92, 'No Stock' , '2017-02-12') +,(4032, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4032, 612, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4032, 611, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4032, 619, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4033, 615, 4 , 45.55, 6.19, 'Allocated', '2016-05-09') +,(4033, 609, 3 , 45.55, 6.19, 'Allocated', '2016-05-09') +,(4033, 620, 1 , 45.55, 6.19, 'Allocated', '2016-05-09') +,(4034, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4034, 620, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4034, 609, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4035, 613, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4035, 614, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4035, 619, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4036, 604, 1 , 46.63, 4.25, 'No Stock' , '2016-05-04') +,(4036, 605, 6 , 66.75, 9.97, 'Allocated', '2017-02-25') +,(4037, 615, 2 , 44.76, 7.22, 'On Order' , '2017-03-01') +,(4037, 612, 2 , 44.76, 7.22, 'On Order' , '2017-03-01') +,(4038, 602, 2 , 13.25, 7.66, 'On Order' , '2016-07-13') +,(4038, 620, 3 , 13.25, 7.66, 'On Order' , '2016-07-13') +,(4039, 609, 1 , 99.68, 6.09, 'No Stock' , '2016-07-24') +,(4039, 619, 3 , 99.68, 6.09, 'No Stock' , '2016-07-24') +,(4039, 620, 1 , 99.68, 6.09, 'No Stock' , '2016-07-24') +,(4040, 612, 2 , 79.64, 6.72, 'Allocated', '2016-04-24') +,(4040, 620, 2 , 79.64, 6.72, 'Allocated', '2016-04-24') +,(4041, 615, 9 , 42.79, 8.92, 'No Stock' , '2016-03-31') +,(4041, 612, 2 , 42.79, 8.92, 'No Stock' , '2016-03-31') +,(4041, 620, 1 , 42.79, 8.92, 'No Stock' , '2016-03-31') +,(4042, 617, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4042, 613, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4042, 620, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4043, 611, 7 , 87.95, 8.57, 'No Stock' , '2016-06-18') +,(4043, 619, 3 , 87.95, 8.57, 'No Stock' , '2016-06-18') +,(4043, 620, 1 , 87.95, 8.57, 'No Stock' , '2016-06-18') +,(4044, 602, 8 , 47.3 , 3.26, 'On Order' , '2016-11-05') +,(4044, 612, 3 , 79.42, 6.56, 'On Order' , '2017-02-11') +,(4045, 603, 3 , 31.01, 7.2 , 'No Stock' , '2016-11-11') +,(4045, 604, 10, 43.54, 6.8 , 'Allocated', '2016-11-13') +,(4045, 608, 7 , 15.2 , 3.58, 'Allocated', '2017-01-18') +,(4046, 611, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4047, 619, 2 , 81.11, 8.77, 'No Stock' , '2016-06-17') +,(4047, 620, 8 , 1.54 , 6.85, 'No Stock' , '2016-05-05') +,(4048, 605, 7 , 13.52, 2.44, 'On Order' , '2016-07-06') +,(4049, 603, 7 , 40.99, 5.77, 'Allocated', '2017-02-22') +,(4049, 609, 10, 90.45, 2.75, 'Allocated', '2017-01-26') +,(4049, 612, 10, 24.28, 9.85, 'No Stock' , '2016-10-01') +,(4050, 606, 4 , 27.84, 1.49, 'No Stock' , '2016-12-18') +,(4050, 607, 2 , 72.72, 3.08, 'On Order' , '2016-04-24') +,(4050, 612, 2 , 76.85, 5.15, 'No Stock' , '2017-02-25') +,(4051, 603, 1 , 57.6 , 1.77, 'Allocated', '2016-07-02') +,(4052, 605, 9 , 50.74, 6.47, 'No Stock' , '2016-05-22') +,(4053, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4054, 601, 10, 55.48, 9.19, 'On Order' , '2016-07-12') +,(4055, 606, 10, 57.17, 3.06, 'No Stock' , '2016-11-20') +,(4056, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4057, 609, 1 , 79.3 , 9.42, 'On Order' , '2016-10-01') +,(4057, 610, 5 , 41.21, 5.55, 'No Stock' , '2016-07-20') +,(4057, 618, 3 , 68.99, 6.42, 'On Order' , '2016-08-19') +,(4058, 604, 6 , 36.78, 6.96, 'Allocated', '2016-05-20') +,(4058, 619, 6 , 79.01, 4.3 , 'Allocated', '2016-06-19') +,(4059, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4060, 603, 10, 40.38, 2.1 , 'On Order' , '2017-02-05') +,(4060, 604, 9 , 41.98, 1.46, 'Allocated', '2017-01-17') +,(4061, 605, 1 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4061, 602, 1 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4061, 603, 1 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4062, 604, 1 , 71.77, 4.91, 'No Stock' , '2016-11-20') +,(4062, 605, 2 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4062, 607, 1 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4063, 608, 1 , 62.85, 4.62, 'Allocated', '2016-03-25') +,(4063, 605, 4 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4063, 607, 1 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4064, 615, 1 , 68.27, 6.79, 'No Stock' , '2016-07-06') +,(4064, 602, 2 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4064, 603, 5 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4064, 605, 1 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4065, 610, 5 , 99.76, 1.78, 'Allocated', '2016-09-23') +,(4066, 605, 1 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4066, 604, 9 , 2.63 , 7.42, 'Allocated', '2016-08-12') +,(4066, 615, 7 , 25.14, 7.22, 'No Stock' , '2016-03-27') +,(4067, 618, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4068, 602, 4 , 12.67, 5.17, 'Allocated', '2016-08-30') +,(4068, 603, 1 , 87.81, 1.02, 'On Order' , '2016-10-12') +,(4069, 620, 7 , 89.85, 3.49, 'Allocated', '2017-02-22') +,(4070, 615, 5 , 94.08, 4.09, 'On Order' , '2017-01-31') +,(4071, 616, 1, 10.00, 1.00, 'Allocated', '2016-12-14') +,(4072, 601, 3 , 89.95, 9.61, 'No Stock' , '2016-11-25') +,(4072, 612, 5 , 34.51, 5.99, 'No Stock' , '2016-05-25') +,(4073, 613, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4074, 606, 10, 98.2 , 3.63, 'On Order' , '2016-04-30') +,(4075, 605, 8 , 69.36, 9.16, 'On Order' , '2016-07-19') +,(4075, 606, 1 , 3.95 , 8.66, 'On Order' , '2016-04-09') +,(4076, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4077, 602, 10, 90.58, 5.92, 'No Stock' , '2016-06-23') +,(4077, 609, 1 , 8.25 , 3.74, 'No Stock' , '2016-12-07') +,(4077, 615, 9 , 86.2 , 4.5 , 'Allocated', '2017-03-10') +,(4078, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4078, 612, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4078, 618, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4079, 615, 7 , 1.95 , 1.76, 'On Order' , '2017-03-04') +,(4079, 613, 2 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4079, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4080, 608, 5 , 26.84, 9.03, 'On Order' , '2016-11-13') +,(4080, 609, 3 , 41.76, 4.08, 'Allocated', '2016-09-10') +,(4081, 604, 9 , 5.49 , 8.45, 'On Order' , '2016-10-21') +,(4082, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4083, 602, 1 , 44.85, 5.16, 'No Stock' , '2016-09-16') +,(4084, 604, 4 , 58.27, 4.09, 'Allocated', '2016-08-12') +,(4085, 605, 8 , 93.54, 7.49, 'On Order' , '2016-11-24') +,(4086, 615, 2 , 94.02, 1.63, 'No Stock' , '2016-09-01') +,(4087, 601, 2 , 79.39, 3.86, 'No Stock' , '2016-07-13') +,(4088, 615, 3 , 14.03, 3.74, 'Allocated', '2016-11-15') +,(4089, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4090, 611, 4 , 46.11, 1.53, 'No Stock' , '2016-07-25') +,(4091, 613, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4092, 602, 5 , 42.68, 7.92, 'On Order' , '2016-09-09') +,(4093, 615, 8 , 75.27, 5.92, 'No Stock' , '2016-07-09') +,(4094, 605, 7 , 91.05, 4.52, 'On Order' , '2017-02-21') +,(4095, 602, 6 , 58.5 , 9.62, 'On Order' , '2017-02-26') +,(4095, 604, 3 , 80.13, 4.11, 'No Stock' , '2016-12-01') +,(4095, 608, 1 , 23.96, 5.54, 'No Stock' , '2016-03-27') +,(4096, 601, 4 , 9.84 , 5.33, 'No Stock' , '2016-04-18') +,(4097, 605, 4 , 45.03, 5.61, 'On Order' , '2016-05-13') +,(4097, 606, 3 , 41.39, 3.59, 'On Order' , '2016-11-29') +,(4098, 607, 8 , 11.86, 2.74, 'No Stock' , '2016-11-23') +,(4099, 606, 2 , 54.09, 5.84, 'On Order' , '2016-10-08') +,(4100, 608, 3 , 6.62 , 1.25, 'Allocated', '2016-11-16') +,(4101, 617, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4102, 608, 1 , 2.54 , 9.62, 'On Order' , '2016-10-01') +,(4102, 609, 9 , 92.56, 5.98, 'On Order' , '2016-10-14') +,(4102, 610, 10, 26.81, 5.9 , 'On Order' , '2016-08-20') +,(4103, 606, 6 , 71.32, 9.88, 'No Stock' , '2016-09-10') +,(4103, 608, 1 , 73.91, 9.79, 'No Stock' , '2016-12-26') +,(4104, 603, 9 , 33.85, 4.08, 'Allocated', '2017-03-02') +,(4105, 601, 5 , 49.17, 1.99, 'On Order' , '2016-11-11') +,(4105, 606, 9 , 93.8 , 4.48, 'Allocated', '2017-01-06') +,(4106, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4107, 603, 2 , 24.95, 3.71, 'On Order' , '2016-07-20') +,(4107, 604, 5 , 43.75, 1.39, 'No Stock' , '2017-01-03') +,(4107, 608, 1 , 49.09, 8.72, 'Allocated', '2016-12-19') +,(4107, 616, 8 , 26.78, 1.21, 'On Order' , '2016-09-23') +,(4108, 604, 8 , 36.89, 3.04, 'On Order' , '2017-01-01') +,(4108, 619, 1 , 6.43 , 6.66, 'Allocated', '2016-05-03') +,(4109, 604, 9 , 89.19, 9.43, 'No Stock' , '2016-10-21') +,(4109, 609, 2 , 3.71 , 9.12, 'No Stock' , '2016-10-23') +,(4110, 605, 3 , 61.65, 7.86, 'On Order' , '2016-08-05') +,(4110, 606, 2 , 63.62, 7.4 , 'Allocated', '2016-06-07') +,(4111, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4111, 612, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4111, 613, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4112, 607, 5 , 63.7 , 9.44, 'On Order' , '2017-01-01') +,(4112, 610, 1 , 22.54, 8.3 , 'On Order' , '2016-04-09') +,(4113, 604, 6 , 86.01, 4.4 , 'Allocated', '2017-01-05') +,(4113, 611, 5 , 39.64, 4.58, 'Allocated', '2017-02-26') +,(4113, 615, 3 , 22.49, 3.61, 'Allocated', '2016-08-24') +,(4113, 619, 6 , 7.6 , 6.63, 'On Order' , '2016-05-01') +,(4114, 610, 6 , 3.77 , 4.79, 'Allocated', '2017-01-18') +,(4114, 608, 2 , 3.77 , 4.79, 'Allocated', '2017-01-18') +,(4114, 609, 3 , 3.77 , 4.79, 'Allocated', '2017-01-18') +,(4115, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4115, 620, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4116, 610, 5 , 54.21, 9.53, 'On Order' , '2016-05-11') +,(4116, 620, 3 , 54.21, 9.53, 'On Order' , '2016-05-11') +,(4116, 615, 1 , 54.21, 9.53, 'On Order' , '2016-05-11') +,(4117, 603, 7 , 91.81, 4.35, 'On Order' , '2016-04-18') +,(4117, 610, 9 , 79.15, 6.8 , 'Allocated', '2017-02-09') +,(4118, 611, 8 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4118, 615, 3 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4118, 612, 1 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4119, 611, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4119, 615, 8 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4119, 612, 4 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4120, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4120, 612, 2 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4120, 611, 8 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4121, 602, 3 , 7.09 , 6.48, 'No Stock' , '2016-06-03') +,(4121, 612, 2 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4121, 611, 1 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4122, 606, 5 , 44.99, 1.66, 'No Stock' , '2016-05-08') +,(4122, 611, 2 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4122, 612, 6 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4123, 607, 10, 4.78 , 1.32, 'Allocated', '2016-12-28') +,(4124, 604, 1 , 18.79, 6.75, 'On Order' , '2017-01-05') +,(4125, 605, 9 , 59.37, 1.61, 'On Order' , '2016-07-24') +,(4125, 608, 1 , 72.49, 2.72, 'On Order' , '2016-08-22') +,(4126, 610, 10, 13.83, 1.15, 'On Order' , '2016-09-29') +,(4126, 615, 10, 71.77, 9.08, 'No Stock' , '2017-02-24') +,(4127, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4128, 605, 6 , 94.61, 7.16, 'No Stock' , '2017-02-09') +,(4128, 616, 3 , 4.67 , 2.72, 'On Order' , '2016-04-06') +,(4129, 610, 5 , 73.89, 8.17, 'On Order' , '2016-04-30') +,(4130, 608, 6 , 47.42, 8.39, 'No Stock' , '2017-02-27') +,(4131, 602, 5 , 28.62, 6.07, 'No Stock' , '2016-03-21') +,(4132, 602, 7 , 38.86, 3.58, 'Allocated', '2016-06-21') +,(4132, 604, 4 , 89.39, 2.36, 'No Stock' , '2016-12-20') +,(4132, 605, 5 , 29.97, 9.78, 'No Stock' , '2016-08-03') +,(4133, 611, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4133, 613, 2 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4133, 615, 4 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4134, 606, 1 , 73.57, 3.21, 'Allocated', '2016-04-07') +,(4134, 608, 1 , 65.61, 8.68, 'On Order' , '2017-01-14') +,(4135, 603, 2 , 7.24 , 2.61, 'Allocated', '2017-01-02') +,(4135, 607, 6 , 15.99, 6.23, 'No Stock' , '2016-12-16') +,(4135, 609, 6 , 26.55, 2.9 , 'On Order' , '2016-11-25') +,(4135, 612, 8 , 17.99, 9.59, 'No Stock' , '2016-03-25') +,(4136, 606, 10, 16.82, 8.15, 'On Order' , '2016-06-22') +,(4137, 605, 2 , 39.96, 6.08, 'On Order' , '2016-05-22') +,(4138, 620, 6 , 4.6 , 3.68, 'Allocated', '2016-09-17') +,(4139, 601, 4 , 87.74, 7.37, 'No Stock' , '2016-11-25') +,(4140, 603, 10, 90.31, 6.8 , 'On Order' , '2016-05-23') +,(4140, 615, 8 , 82.86, 2.49, 'On Order' , '2016-12-24') +,(4141, 609, 7 , 20.28, 1.51, 'Allocated', '2017-02-10') +,(4142, 608, 7 , 55.47, 8.32, 'No Stock' , '2016-07-07') +,(4142, 619, 5 , 75.63, 1.64, 'Allocated', '2016-08-02') +,(4143, 606, 3 , 99.61, 4.9 , 'No Stock' , '2016-10-25') +,(4144, 604, 6 , 80.75, 3.9 , 'Allocated', '2016-09-09') +,(4145, 603, 3 , 57.97, 8.04, 'On Order' , '2016-06-17') +,(4146, 611, 8 , 69.7 , 6.14, 'On Order' , '2016-04-15') +,(4147, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4148, 602, 4 , 67.89, 1.73, 'Allocated', '2016-03-26') +,(4149, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4150, 615, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4151, 617, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4151, 618, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4152, 608, 10, 97.82, 9.97, 'No Stock' , '2016-07-11') +,(4152, 620, 10, 97.82, 9.97, 'No Stock' , '2016-07-11') +,(4153, 615, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4153, 618, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4153, 601, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4153, 613, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4154, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4154, 604, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4155, 606, 7 , 42.62, 2.57, 'No Stock' , '2017-02-11') +,(4155, 607, 2 , 83.04, 5.25, 'On Order' , '2016-09-01') +,(4155, 610, 6 , 90.56, 6.31, 'On Order' , '2016-10-18') +,(4156, 615, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4156, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4156, 601, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4157, 603, 9 , 93.09, 5.35, 'Allocated', '2016-08-03') +,(4157, 607, 6 , 40.05, 3.9 , 'On Order' , '2017-01-13') +,(4158, 612, 1 , 17.5 , 6.29, 'Allocated', '2016-04-14') +,(4158, 611, 1 , 17.5 , 6.29, 'Allocated', '2016-04-14') +,(4159, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4159, 612, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4160, 610, 8 , 42.67, 5.88, 'No Stock' , '2017-01-04') +,(4160, 620, 10, 87.78, 4.28, 'Allocated', '2016-11-20') +,(4161, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4161, 611, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4162, 613, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4162, 620, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4163, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4163, 612, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4163, 611, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4164, 607, 6 , 80.56, 4.32, 'On Order' , '2016-08-17') +,(4164, 608, 6 , 80.56, 4.32, 'On Order' , '2016-08-17') +,(4164, 617, 6 , 80.56, 4.32, 'On Order' , '2016-08-17') +,(4165, 604, 8 , 72.67, 7.56, 'On Order' , '2016-08-09') +,(4165, 603, 8 , 72.67, 7.56, 'On Order' , '2016-08-09') +,(4165, 614, 8 , 72.67, 7.56, 'On Order' , '2016-08-09') +,(4166, 601, 3 , 34.36, 9.92, 'No Stock' , '2016-09-01') +,(4166, 602, 10, 33.99, 5.76, 'Allocated', '2016-05-26') +,(4167, 603, 5 , 58.2 , 1.14, 'Allocated', '2016-06-20') +,(4167, 608, 1 , 20.01, 6.24, 'No Stock' , '2017-01-05') +,(4168, 601, 1 , 59.45, 7.44, 'On Order' , '2016-09-06') +,(4168, 605, 1 , 59.45, 7.44, 'On Order' , '2016-09-06') +,(4169, 604, 2 , 93.43, 2.26, 'No Stock' , '2017-01-16') +,(4169, 609, 2 , 93.43, 2.26, 'No Stock' , '2017-01-16') +,(4169, 607, 2 , 93.43, 2.26, 'No Stock' , '2017-01-16') +,(4170, 607, 10, 68.27, 9.02, 'No Stock' , '2017-02-11') +,(4170, 620, 10, 68.27, 9.02, 'No Stock' , '2017-02-11') +,(4171, 610, 10, 49.38, 3.71, 'Allocated', '2016-04-25') +,(4171, 601, 10, 49.38, 3.71, 'Allocated', '2016-04-25') +,(4171, 611, 10, 49.38, 3.71, 'Allocated', '2016-04-25') +,(4171, 613, 10, 49.38, 3.71, 'Allocated', '2016-04-25') +,(4171, 615, 10, 49.38, 3.71, 'Allocated', '2016-04-25') +,(4172, 606, 6 , 88.26, 2.95, 'No Stock' , '2016-04-11') +,(4172, 609, 7 , 60.97, 1.12, 'Allocated', '2016-10-14') +,(4173, 601, 10, 11.22, 9.03, 'On Order' , '2017-01-26') +,(4173, 603, 10, 11.22, 9.03, 'On Order' , '2017-01-26') +,(4173, 605, 10, 11.22, 9.03, 'On Order' , '2017-01-26') +,(4174, 607, 8 , 53.95, 6.31, 'No Stock' , '2016-04-30') +,(4174, 612, 2 , 13.56, 7.15, 'No Stock' , '2016-07-08') +,(4175, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4175, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4175, 620, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4176, 615, 2 , 70.24, 1.09, 'Allocated', '2017-01-21') +,(4176, 616, 2 , 70.24, 1.09, 'Allocated', '2017-01-21') +,(4177, 601, 2 , 17.86, 2.99, 'Allocated', '2016-05-07') +,(4177, 604, 8 , 18.39, 6.73, 'On Order' , '2016-04-05') +,(4178, 605, 9 , 23.59, 8.82, 'Allocated', '2016-09-11') +,(4178, 607, 9 , 62.59, 7.88, 'No Stock' , '2016-04-18') +,(4179, 614, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4180, 602, 7 , 48.19, 6.05, 'Allocated', '2016-11-30') +,(4180, 603, 1 , 48.19, 6.05, 'Allocated', '2016-11-30') +,(4181, 602, 2 , 64.2 , 4.74, 'Allocated', '2016-08-16') +,(4181, 603, 3 , 41.45, 2.49, 'Allocated', '2016-04-18') +,(4181, 604, 5 , 86.42, 6.42, 'No Stock' , '2016-05-03') +,(4182, 611, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4183, 615, 1 , 68.34, 8.16, 'On Order' , '2016-12-22') +,(4184, 601, 2 , 95.18, 2.74, 'Allocated', '2016-09-16') +,(4184, 603, 9 , 99.41, 9.44, 'No Stock' , '2016-07-01') +,(4184, 604, 1 , 29.52, 3.48, 'Allocated', '2016-04-02') +,(4185, 602, 2 , 22.84, 5.5 , 'On Order' , '2016-10-20') +,(4185, 611, 10, 34.57, 4.27, 'Allocated', '2017-02-05') +,(4185, 612, 4 , 85.32, 5.03, 'Allocated', '2017-03-14') +,(4185, 619, 9 , 64.97, 1.57, 'No Stock' , '2016-10-19') +,(4186, 605, 2 , 80.08, 7.63, 'On Order' , '2017-01-31') +,(4187, 602, 9 , 87.92, 7.74, 'On Order' , '2016-11-13') +,(4187, 616, 3 , 73.39, 6.52, 'On Order' , '2016-09-15') +,(4188, 604, 8 , 30.36, 1.97, 'No Stock' , '2016-06-05') +,(4188, 605, 5 , 70.95, 6.11, 'On Order' , '2016-03-31') +,(4188, 611, 3 , 23.18, 8.76, 'On Order' , '2016-03-30') +,(4189, 608, 4 , 52.23, 3.08, 'No Stock' , '2016-04-12') +,(4190, 602, 10, 17.3 , 4.18, 'No Stock' , '2016-03-29') +,(4190, 615, 6 , 34.29, 9.45, 'Allocated', '2016-11-01') +,(4191, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4192, 602, 4 , 90.29, 5.09, 'Allocated', '2017-02-14') +,(4192, 605, 8 , 1.03 , 1.28, 'On Order' , '2017-02-14') +,(4192, 615, 1 , 11.61, 7.49, 'No Stock' , '2016-08-11') +,(4193, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4194, 618, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4195, 617, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4196, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4197, 608, 10, 60.36, 3.99, 'On Order' , '2016-10-30') +,(4198, 606, 1 , 58.71, 2.32, 'No Stock' , '2016-06-26') +,(4199, 602, 8 , 12.59, 9.45, 'Allocated', '2016-04-16') +,(4199, 603, 7 , 5.5 , 2.26, 'No Stock' , '2016-11-28') +,(4200, 605, 10, 92.81, 1.0 , 'No Stock' , '2017-03-07') +,(4201, 606, 3 , 46.48, 5.94, 'Allocated', '2016-12-15') +,(4201, 608, 2 , 97.29, 5.87, 'No Stock' , '2016-09-12') +,(4202, 609, 4 , 56.7 , 2.07, 'No Stock' , '2017-03-11') +,(4202, 608, 4 , 56.7 , 2.07, 'No Stock' , '2017-03-11') +,(4203, 610, 2 , 29.12, 6.46, 'No Stock' , '2016-10-27') +,(4203, 609, 4 , 56.7 , 2.07, 'No Stock' , '2017-03-11') +,(4204, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4204, 609, 4 , 56.7 , 2.07, 'No Stock' , '2017-03-11') +,(4205, 610, 4 , 78.23, 5.95, 'No Stock' , '2016-06-21') +,(4205, 609, 4 , 56.7 , 2.07, 'No Stock' , '2017-03-11') +,(4206, 603, 2 , 40.49, 6.94, 'On Order' , '2017-02-23') +,(4206, 619, 6 , 80.19, 3.28, 'No Stock' , '2017-01-21') +,(4207, 604, 9 , 84.48, 7.01, 'No Stock' , '2016-08-17') +,(4207, 605, 9 , 41.79, 1.55, 'On Order' , '2016-06-27') +,(4207, 610, 5 , 12.3 , 9.51, 'On Order' , '2016-05-17') +,(4208, 603, 7 , 37.26, 3.68, 'Allocated', '2016-03-30') +,(4208, 605, 5 , 82.65, 2.76, 'On Order' , '2016-12-11') +,(4208, 607, 1 , 84.88, 8.67, 'No Stock' , '2016-04-28') +,(4208, 609, 1 , 88.01, 1.98, 'Allocated', '2016-10-04') +,(4208, 610, 6 , 88.85, 4.2 , 'No Stock' , '2016-04-19') +,(4209, 606, 6 , 46.31, 8.98, 'Allocated', '2016-04-20') +,(4210, 603, 2 , 92.12, 8.78, 'No Stock' , '2016-12-11') +,(4210, 609, 7 , 70.37, 6.89, 'Allocated', '2016-06-23') +,(4211, 614, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4212, 613, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4213, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4214, 608, 3 , 37.43, 5.18, 'Allocated', '2016-05-15') +,(4214, 610, 9 , 35.48, 7.16, 'On Order' , '2017-02-13') +,(4214, 611, 7 , 84.99, 8.17, 'No Stock' , '2016-07-08') +,(4215, 610, 5 , 4.35 , 2.65, 'Allocated', '2016-07-24') +,(4216, 606, 3 , 79.91, 8.92, 'Allocated', '2016-05-02') +,(4216, 608, 8 , 45.75, 3.7 , 'Allocated', '2017-02-24') +,(4216, 615, 1 , 55.11, 8.94, 'No Stock' , '2016-05-06') +,(4217, 605, 5 , 40.67, 3.31, 'On Order' , '2016-11-09') +,(4217, 610, 5 , 20.0 , 8.58, 'On Order' , '2016-07-27') +,(4218, 615, 7 , 34.14, 8.03, 'Allocated', '2016-11-12') +,(4218, 619, 9 , 62.61, 5.74, 'On Order' , '2016-11-08') +,(4219, 604, 9 , 46.24, 2.42, 'No Stock' , '2016-10-31') +,(4219, 613, 7 , 26.63, 3.9 , 'No Stock' , '2016-12-04') +,(4219, 619, 1 , 98.58, 7.38, 'No Stock' , '2016-08-06') +,(4220, 604, 5 , 66.78, 9.28, 'No Stock' , '2016-10-09') +,(4220, 609, 6 , 62.82, 9.71, 'No Stock' , '2016-04-06') +,(4221, 602, 8 , 8.44 , 1.85, 'Allocated', '2016-11-25') +,(4222, 601, 10, 84.14, 2.59, 'No Stock' , '2016-06-25') +,(4222, 604, 9 , 39.15, 8.12, 'No Stock' , '2016-09-27') +,(4223, 602, 2 , 74.35, 9.94, 'Allocated', '2016-04-18') +,(4223, 611, 4 , 58.85, 6.75, 'No Stock' , '2017-03-04') +,(4224, 618, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4225, 605, 7 , 88.08, 8.69, 'On Order' , '2016-11-13') +,(4226, 606, 1 , 84.22, 3.54, 'On Order' , '2017-01-19') +,(4226, 608, 4 , 97.1 , 4.73, 'On Order' , '2016-04-25') +,(4227, 606, 9 , 74.37, 1.85, 'On Order' , '2016-12-19') +,(4227, 607, 9 , 74.37, 1.85, 'On Order' , '2016-12-19') +,(4228, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4228, 618, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4228, 610, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4229, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4229, 618, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4230, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4230, 618, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4230, 619, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4231, 611, 6 , 36.05, 2.56, 'On Order' , '2017-02-12') +,(4231, 618, 6 , 36.05, 2.56, 'On Order' , '2017-02-12') +,(4232, 615, 8 , 16.99, 7.26, 'No Stock' , '2016-11-28') +,(4232, 618, 8 , 16.99, 7.26, 'No Stock' , '2016-11-28') +,(4233, 608, 6 , 70.71, 1.75, 'Allocated', '2016-09-29') +,(4233, 610, 6 , 70.71, 1.75, 'Allocated', '2016-09-29') +,(4233, 618, 6 , 70.71, 1.75, 'Allocated', '2016-09-29') +,(4234, 604, 5 , 15.26, 9.54, 'No Stock' , '2016-04-06') +,(4234, 619, 5 , 15.26, 9.54, 'No Stock' , '2016-04-06') +,(4235, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4235, 619, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4236, 607, 8 , 46.97, 4.9 , 'Allocated', '2017-02-16') +,(4236, 617, 8 , 46.97, 4.9 , 'Allocated', '2017-02-16') +,(4236, 620, 8 , 46.97, 4.9 , 'Allocated', '2017-02-16') +,(4237, 602, 1 , 27.79, 8.84, 'No Stock' , '2016-11-07') +,(4237, 620, 1 , 27.79, 8.84, 'No Stock' , '2016-11-07') +,(4238, 602, 3 , 32.5 , 2.63, 'No Stock' , '2016-04-09') +,(4238, 608, 8 , 88.3 , 7.59, 'On Order' , '2016-08-18') +,(4239, 606, 7 , 99.65, 2.31, 'Allocated', '2017-03-04') +,(4239, 616, 7 , 99.65, 2.31, 'Allocated', '2017-03-04') +,(4240, 606, 10, 43.66, 2.48, 'No Stock' , '2017-02-05') +,(4240, 609, 2 , 56.95, 2.11, 'No Stock' , '2016-11-15') +,(4241, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4241, 618, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4241, 620, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4242, 605, 6 , 52.37, 8.56, 'No Stock' , '2016-06-10') +,(4242, 606, 6 , 52.37, 8.56, 'No Stock' , '2016-06-10') +,(4242, 607, 6 , 52.37, 8.56, 'No Stock' , '2016-06-10') +,(4243, 604, 2 , 6.33 , 1.16, 'No Stock' , '2016-04-09') +,(4243, 614, 2 , 6.33 , 1.16, 'No Stock' , '2016-04-09') +,(4243, 610, 2 , 6.33 , 1.16, 'No Stock' , '2016-04-09') +,(4244, 609, 4 , 67.62, 7.49, 'On Order' , '2016-09-03') +,(4244, 619, 4 , 67.62, 7.49, 'On Order' , '2016-09-03') +,(4244, 620, 4 , 67.62, 7.49, 'On Order' , '2016-09-03') +,(4245, 608, 1 , 32.47, 9.9 , 'Allocated', '2017-03-14') +,(4245, 618, 1 , 32.47, 9.9 , 'Allocated', '2017-03-14') +,(4245, 620, 1 , 32.47, 9.9 , 'Allocated', '2017-03-14') +,(4246, 603, 10, 53.94, 3.85, 'No Stock' , '2016-06-04') +,(4246, 606, 7 , 6.16 , 9.37, 'No Stock' , '2016-07-05') +,(4246, 607, 3 , 27.34, 1.97, 'Allocated', '2016-11-15') +,(4246, 611, 4 , 73.06, 1.26, 'No Stock' , '2017-02-28') +,(4247, 601, 4 , 66.41, 4.54, 'On Order' , '2017-02-26') +,(4247, 605, 2 , 61.24, 5.9 , 'Allocated', '2016-12-15') +,(4248, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4248, 620, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4249, 615, 2 , 74.52, 3.88, 'On Order' , '2016-06-09') +,(4249, 620, 2 , 74.52, 3.88, 'On Order' , '2016-06-09') +,(4249, 609, 2 , 74.52, 3.88, 'On Order' , '2016-06-09') +,(4250, 606, 7 , 63.89, 3.39, 'On Order' , '2016-12-31') +,(4250, 612, 8 , 75.06, 4.19, 'Allocated', '2016-06-26') +,(4251, 602, 1 , 1.75 , 1.73, 'No Stock' , '2016-12-07') +,(4251, 604, 8 , 43.98, 1.58, 'Allocated', '2016-07-28') +,(4252, 606, 4 , 94.24, 1.31, 'No Stock' , '2017-03-14') +,(4252, 619, 10, 41.46, 4.18, 'No Stock' , '2017-03-03') +,(4252, 620, 3 , 29.91, 4.91, 'On Order' , '2016-12-28') +,(4253, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4253, 610, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4254, 610, 3 , 5.01 , 9.93, 'On Order' , '2017-02-03') +,(4254, 620, 2 , 5.01 , 9.93, 'On Order' , '2017-02-03') +,(4254, 612, 3 , 5.01 , 9.93, 'On Order' , '2017-02-03') +,(4255, 610, 7 , 45.49, 8.0 , 'Allocated', '2016-08-01') +,(4255, 611, 7 , 45.49, 8.0 , 'Allocated', '2016-08-01') +,(4256, 604, 9 , 6.74 , 1.84, 'No Stock' , '2016-06-13') +,(4256, 612, 4 , 42.02, 2.86, 'Allocated', '2016-09-19') +,(4256, 620, 2 , 31.71, 4.97, 'Allocated', '2016-10-02') +,(4257, 617, 1, 10.00, 1.00, 'On Order' , '2016-12-14') +,(4257, 610, 1, 10.00, 1.00, 'On Order' , '2016-12-14') +,(4257, 611, 1, 10.00, 1.00, 'On Order' , '2016-12-14') +,(4258, 605, 7 , 22.45, 8.41, 'On Order' , '2016-06-02') +,(4258, 615, 3 , 69.12, 3.65, 'Allocated', '2017-02-27') +,(4258, 619, 4 , 62.32, 2.23, 'Allocated', '2017-02-20') +,(4259, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4260, 603, 1 , 27.68, 1.99, 'Allocated', '2016-09-20') +,(4260, 604, 3 , 59.65, 3.05, 'No Stock' , '2016-12-31') +,(4261, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4262, 602, 4 , 51.73, 3.06, 'Allocated', '2017-01-17') +,(4263, 612, 4 , 18.46, 7.86, 'Allocated', '2016-08-12') +,(4263, 615, 4 , 18.46, 7.86, 'Allocated', '2016-08-12') +,(4263, 616, 4 , 18.46, 7.86, 'Allocated', '2016-08-12') +,(4264, 604, 8 , 82.02, 9.19, 'Allocated', '2016-11-28') +,(4264, 614, 8 , 82.02, 9.19, 'Allocated', '2016-11-28') +,(4265, 618, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4265, 620, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4266, 601, 2 , 66.57, 6.27, 'Allocated', '2016-09-19') +,(4266, 602, 2 , 66.57, 6.27, 'Allocated', '2016-09-19') +,(4267, 601, 4 , 44.78, 6.86, 'No Stock' , '2016-09-27') +,(4267, 610, 4 , 19.08, 6.41, 'No Stock' , '2016-12-24') +,(4268, 611, 1 , 24.72, 8.14, 'Allocated', '2016-06-08') +,(4268, 612, 1 , 24.72, 8.14, 'Allocated', '2016-06-08') +,(4269, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4269, 617, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4269, 618, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4270, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4270, 612, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4270, 620, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4271, 603, 2 , 80.47, 4.81, 'Allocated', '2016-05-25') +,(4271, 604, 8 , 38.65, 4.02, 'No Stock' , '2016-05-09') +,(4272, 610, 7 , 66.28, 2.85, 'No Stock' , '2016-09-17') +,(4273, 612, 10, 85.38, 8.44, 'No Stock' , '2016-12-19') +,(4274, 613, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4275, 610, 8 , 1.12 , 8.65, 'Allocated', '2016-10-28') +,(4275, 615, 1 , 24.01, 5.55, 'No Stock' , '2016-12-30') +,(4276, 603, 3 , 44.76, 7.28, 'No Stock' , '2016-12-28') +,(4277, 610, 9 , 40.01, 8.62, 'No Stock' , '2016-11-10') +,(4278, 603, 6 , 32.0 , 1.23, 'Allocated', '2016-12-23') +,(4278, 608, 4 , 38.01, 9.45, 'Allocated', '2016-10-05') +,(4278, 609, 5 , 31.99, 5.41, 'No Stock' , '2016-10-23') +,(4279, 613, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4280, 606, 5 , 7.52 , 2.76, 'Allocated', '2016-05-27') +,(4280, 609, 4 , 37.09, 4.44, 'On Order' , '2016-08-10') +,(4281, 610, 9 , 37.07, 8.7 , 'On Order' , '2016-12-28') +,(4281, 611, 2 , 37.07, 8.7 , 'On Order' , '2016-12-28') +,(4281, 612, 1 , 37.07, 8.7 , 'On Order' , '2016-12-28') +,(4282, 601, 1 , 19.14, 3.98, 'On Order' , '2016-11-09') +,(4282, 606, 3 , 88.94, 6.79, 'On Order' , '2016-09-29') +,(4282, 609, 6 , 25.35, 5.22, 'Allocated', '2016-10-05') +,(4283, 601, 1 , 14.78, 3.31, 'On Order' , '2016-10-07') +,(4284, 606, 5 , 32.57, 7.22, 'On Order' , '2016-08-24') +,(4285, 604, 5 , 47.88, 3.77, 'No Stock' , '2016-12-09') +,(4285, 615, 8 , 9.28 , 2.13, 'Allocated', '2016-03-27') +,(4286, 620, 5 , 63.24, 7.62, 'Allocated', '2016-12-06') +,(4287, 602, 6 , 2.9 , 9.5 , 'On Order' , '2016-10-06') +,(4287, 605, 5 , 7.63 , 2.78, 'Allocated', '2016-08-22') +,(4287, 611, 1 , 8.98 , 3.39, 'Allocated', '2016-07-18') +,(4287, 614, 3 , 34.4 , 7.12, 'On Order' , '2017-03-04') +,(4288, 604, 6 , 57.67, 3.25, 'Allocated', '2016-05-18') +,(4289, 601, 7 , 19.32, 7.31, 'On Order' , '2017-01-21') +,(4289, 615, 10, 89.16, 2.08, 'No Stock' , '2016-06-03') +,(4290, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4291, 601, 1 , 68.5 , 2.58, 'Allocated', '2016-11-05') +,(4291, 603, 5 , 11.27, 5.56, 'Allocated', '2016-06-10') +,(4291, 606, 1 , 76.82, 3.31, 'Allocated', '2016-09-27') +,(4292, 608, 10, 27.45, 4.8 , 'On Order' , '2016-05-12') +,(4292, 610, 9 , 16.78, 5.96, 'No Stock' , '2016-05-05') +,(4293, 612, 4 , 69.21, 2.07, 'Allocated', '2016-08-23') +,(4294, 619, 4 , 81.5 , 9.13, 'Allocated', '2017-01-20') +,(4295, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4296, 613, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4297, 604, 4 , 19.21, 1.7 , 'Allocated', '2016-08-20') +,(4297, 606, 4 , 71.24, 5.74, 'No Stock' , '2016-10-11') +,(4298, 613, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4299, 603, 8 , 81.7 , 5.69, 'Allocated', '2016-07-06') +,(4300, 601, 5 , 35.51, 8.38, 'On Order' , '2016-12-23') +,(4300, 607, 5 , 46.94, 6.82, 'No Stock' , '2016-07-29') +,(4301, 605, 6 , 99.32, 1.22, 'Allocated', '2016-09-02') +,(4301, 620, 7 , 96.67, 6.9 , 'Allocated', '2016-11-24') +,(4302, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4303, 605, 8 , 31.92, 5.62, 'On Order' , '2016-04-09') +,(4304, 615, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4305, 606, 1 , 2.53 , 1.15, 'On Order' , '2016-12-03') +,(4305, 609, 6 , 76.41, 7.87, 'Allocated', '2016-07-05') +,(4305, 612, 3 , 31.58, 5.53, 'On Order' , '2016-10-01') +,(4306, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4307, 601, 7 , 36.63, 3.9 , 'On Order' , '2016-09-16') +,(4307, 606, 10, 56.47, 8.96, 'No Stock' , '2017-02-25') +,(4308, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4309, 606, 6 , 84.25, 2.28, 'On Order' , '2016-04-07') +,(4310, 605, 7 , 15.88, 2.48, 'Allocated', '2017-02-17') +,(4311, 603, 2 , 67.26, 6.18, 'No Stock' , '2016-05-06') +,(4312, 619, 4 , 87.5 , 6.57, 'Allocated', '2017-03-14') +,(4313, 602, 3 , 87.01, 4.45, 'On Order' , '2016-08-30') +,(4313, 610, 7 , 54.92, 8.87, 'No Stock' , '2017-01-20') +,(4314, 602, 9 , 49.19, 2.67, 'Allocated', '2016-07-24') +,(4314, 607, 10, 32.19, 8.12, 'On Order' , '2016-11-23') +,(4315, 602, 7 , 9.25 , 3.78, 'On Order' , '2017-01-04') +,(4316, 613, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4317, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4318, 609, 5 , 29.17, 3.35, 'No Stock' , '2016-11-28') +,(4318, 610, 4 , 41.75, 3.7 , 'On Order' , '2016-09-09') +,(4318, 620, 5 , 81.63, 1.49, 'On Order' , '2016-04-16') +,(4319, 614, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4320, 613, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4321, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4322, 603, 2 , 21.09, 9.37, 'No Stock' , '2016-11-29') +,(4323, 608, 8 , 24.05, 9.49, 'On Order' , '2016-08-12') +,(4324, 607, 7 , 83.23, 1.48, 'On Order' , '2016-07-10') +,(4325, 608, 10, 35.28, 1.8 , 'Allocated', '2016-09-01') +,(4326, 602, 8 , 69.18, 4.43, 'No Stock' , '2016-07-31') +,(4326, 610, 2 , 24.44, 8.1 , 'No Stock' , '2016-03-29') +,(4327, 608, 3 , 22.57, 4.64, 'Allocated', '2016-03-23') +,(4328, 604, 1 , 55.53, 3.16, 'On Order' , '2016-12-14') +,(4328, 605, 2 , 38.78, 6.97, 'Allocated', '2017-03-04') +,(4328, 607, 5 , 28.94, 3.59, 'Allocated', '2016-08-01') +,(4329, 603, 6 , 65.93, 2.86, 'On Order' , '2016-10-25') +,(4330, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4331, 602, 5 , 37.37, 6.39, 'No Stock' , '2016-03-19') +,(4332, 606, 5 , 93.96, 3.31, 'No Stock' , '2016-08-09') +,(4332, 610, 5 , 3.77 , 6.74, 'Allocated', '2016-06-23') +,(4333, 608, 7 , 14.29, 3.95, 'On Order' , '2016-06-16') +,(4334, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4335, 609, 6 , 63.15, 9.3 , 'Allocated', '2016-08-31') +,(4336, 613, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4337, 610, 1 , 52.98, 5.68, 'Allocated', '2016-03-19') +,(4338, 610, 1 , 83.94, 3.56, 'Allocated', '2016-11-03') +,(4339, 604, 10, 78.06, 5.32, 'No Stock' , '2016-11-19') +,(4340, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4341, 609, 6 , 52.04, 7.63, 'No Stock' , '2016-11-25') +,(4341, 615, 1 , 9.44 , 8.66, 'No Stock' , '2016-09-06') +,(4342, 615, 6 , 67.41, 8.5 , 'Allocated', '2016-08-28') +,(4343, 615, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4344, 610, 10, 61.53, 5.36, 'On Order' , '2016-04-30') +,(4345, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4346, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4347, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4348, 608, 1 , 96.42, 4.57, 'On Order' , '2016-05-14') +,(4348, 610, 3 , 38.0 , 5.74, 'On Order' , '2016-05-30') +,(4348, 611, 6 , 38.59, 6.7 , 'On Order' , '2016-08-16') +,(4349, 613, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4350, 602, 8 , 81.72, 7.57, 'Allocated', '2016-08-18') +,(4350, 604, 6 , 95.31, 9.43, 'On Order' , '2016-12-29') +,(4350, 608, 9 , 43.57, 6.54, 'No Stock' , '2016-08-24') +,(4351, 602, 1 , 37.63, 3.31, 'No Stock' , '2016-08-26') +,(4351, 607, 9 , 83.22, 2.44, 'No Stock' , '2016-04-11') +,(4352, 602, 3 , 13.09, 3.98, 'No Stock' , '2016-10-03') +,(4352, 603, 9 , 88.58, 4.87, 'On Order' , '2017-03-05') +,(4352, 614, 4 , 47.62, 5.05, 'Allocated', '2016-05-30') +,(4353, 612, 9 , 28.8 , 1.77, 'Allocated', '2016-03-28') +,(4354, 618, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4355, 607, 4 , 20.25, 3.18, 'No Stock' , '2016-04-27') +,(4355, 608, 9 , 73.3 , 5.95, 'Allocated', '2016-12-08') +,(4355, 609, 7 , 26.16, 6.88, 'Allocated', '2016-12-09') +,(4356, 614, 8 , 93.97, 2.88, 'No Stock' , '2016-06-14') +,(4357, 605, 6 , 24.39, 5.53, 'No Stock' , '2016-07-31') +,(4357, 612, 4 , 71.28, 1.94, 'No Stock' , '2016-07-08') +,(4358, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4359, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4360, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4361, 601, 6 , 45.27, 1.05, 'Allocated', '2016-03-29') +,(4361, 609, 10, 39.75, 1.28, 'On Order' , '2016-07-15') +,(4362, 603, 4 , 42.92, 5.17, 'No Stock' , '2016-09-24') +,(4363, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4364, 602, 8 , 90.01, 4.2 , 'On Order' , '2017-02-09') +,(4365, 601, 2 , 92.96, 3.73, 'Allocated', '2016-06-10') +,(4365, 603, 7 , 86.67, 9.6 , 'On Order' , '2016-07-31') +,(4366, 604, 6 , 52.01, 2.02, 'No Stock' , '2016-09-23') +,(4366, 605, 9 , 88.21, 3.68, 'On Order' , '2016-08-10') +,(4366, 609, 8 , 80.78, 3.99, 'No Stock' , '2016-05-07') +,(4367, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4368, 604, 4 , 53.46, 4.56, 'No Stock' , '2016-09-07') +,(4369, 612, 2 , 8.5 , 3.86, 'Allocated', '2017-01-20') +,(4370, 603, 9 , 46.22, 8.2 , 'On Order' , '2016-09-02') +,(4370, 604, 10, 10.38, 2.29, 'Allocated', '2016-06-03') +,(4371, 610, 10, 23.33, 4.07, 'On Order' , '2016-08-25') +,(4372, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4373, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4374, 604, 3 , 29.51, 2.34, 'No Stock' , '2017-03-07') +,(4375, 618, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4376, 608, 10, 5.55 , 3.21, 'No Stock' , '2016-09-14') +,(4377, 602, 9 , 91.62, 8.57, 'On Order' , '2016-08-26') +,(4378, 603, 8 , 74.83, 5.38, 'On Order' , '2016-04-11') +,(4379, 605, 9 , 53.7 , 5.65, 'On Order' , '2016-10-29') +,(4380, 618, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4381, 619, 1 , 35.54, 3.78, 'Allocated', '2016-07-27') +,(4382, 602, 8 , 33.64, 7.95, 'Allocated', '2016-11-05') +,(4382, 606, 4 , 68.17, 6.06, 'On Order' , '2017-01-22') +,(4383, 613, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4384, 615, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4385, 609, 1 , 18.13, 8.94, 'On Order' , '2016-03-25') +,(4386, 613, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4387, 602, 8 , 86.06, 9.74, 'Allocated', '2016-12-01') +,(4387, 606, 8 , 87.31, 7.53, 'No Stock' , '2016-06-12') +,(4387, 610, 3 , 47.55, 5.2 , 'Allocated', '2016-10-06') +,(4388, 602, 4 , 5.86 , 3.52, 'On Order' , '2016-05-09') +,(4388, 603, 8 , 24.25, 6.18, 'Allocated', '2016-09-22') +,(4388, 606, 6 , 29.46, 2.93, 'Allocated', '2016-09-11') +,(4388, 619, 1 , 36.76, 7.37, 'No Stock' , '2016-12-29') +,(4389, 602, 1 , 94.23, 9.35, 'Allocated', '2016-06-13') +,(4389, 603, 2 , 40.15, 8.39, 'No Stock' , '2016-08-09') +,(4390, 609, 4 , 7.02 , 5.61, 'On Order' , '2016-11-29') +,(4391, 607, 1 , 48.41, 8.97, 'On Order' , '2016-07-10') +,(4392, 603, 8 , 74.91, 8.23, 'No Stock' , '2016-04-07') +,(4393, 611, 4 , 55.83, 4.56, 'Allocated', '2016-04-13') +,(4394, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4395, 610, 7 , 82.73, 5.09, 'No Stock' , '2016-09-27') +,(4395, 617, 6 , 26.05, 6.29, 'On Order' , '2016-07-24') +,(4396, 605, 9 , 66.19, 1.32, 'No Stock' , '2017-02-05') +,(4396, 619, 4 , 3.15 , 1.04, 'On Order' , '2016-07-08') +,(4397, 619, 9 , 78.52, 7.64, 'No Stock' , '2016-08-19') +,(4398, 618, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4399, 610, 7 , 85.03, 4.71, 'No Stock' , '2016-05-04') +,(4400, 612, 9 , 36.85, 6.54, 'On Order' , '2016-10-31') +,(4400, 620, 2 , 15.9 , 5.62, 'On Order' , '2016-06-18') +,(4401, 602, 1 , 91.01, 4.13, 'No Stock' , '2016-09-27') +,(4401, 604, 10, 98.7 , 5.27, 'Allocated', '2016-06-03') +,(4402, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4403, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4404, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4405, 604, 3 , 46.99, 9.31, 'No Stock' , '2016-09-08') +,(4405, 610, 10, 4.94 , 1.68, 'On Order' , '2016-11-15') +,(4406, 602, 7 , 25.84, 7.67, 'On Order' , '2016-10-28') +,(4406, 606, 2 , 96.43, 5.64, 'No Stock' , '2016-11-14') +,(4406, 607, 10, 14.91, 3.88, 'No Stock' , '2016-06-18') +,(4407, 606, 9 , 20.82, 6.82, 'No Stock' , '2016-10-08') +,(4407, 608, 4 , 29.19, 7.26, 'No Stock' , '2016-12-15') +,(4408, 605, 4 , 12.83, 9.29, 'No Stock' , '2016-11-20') +,(4408, 615, 4 , 89.77, 2.7 , 'No Stock' , '2017-03-07') +,(4408, 619, 3 , 36.44, 8.86, 'No Stock' , '2016-12-17') +,(4409, 602, 2 , 36.96, 9.73, 'Allocated', '2016-08-19') +,(4409, 611, 7 , 94.98, 4.11, 'On Order' , '2016-05-17') +,(4410, 603, 7 , 13.79, 5.05, 'No Stock' , '2016-09-28') +,(4410, 604, 10, 70.24, 4.07, 'No Stock' , '2016-10-27') +,(4410, 607, 6 , 26.39, 7.8 , 'No Stock' , '2016-03-21') +,(4411, 602, 7 , 3.47 , 3.86, 'No Stock' , '2017-03-14') +,(4411, 611, 3 , 10.43, 3.67, 'On Order' , '2016-12-27') +,(4412, 605, 10, 26.07, 6.78, 'Allocated', '2017-02-16') +,(4412, 607, 7 , 76.81, 5.67, 'No Stock' , '2016-11-26') +,(4412, 610, 3 , 98.77, 3.34, 'On Order' , '2016-09-29') +,(4413, 617, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4414, 606, 5 , 26.01, 4.54, 'On Order' , '2016-03-23') +,(4415, 605, 5 , 74.86, 1.68, 'No Stock' , '2016-09-18') +,(4416, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4417, 601, 6 , 66.38, 5.22, 'No Stock' , '2016-07-07') +,(4417, 604, 7 , 96.99, 4.89, 'No Stock' , '2016-09-30') +,(4418, 609, 8 , 59.88, 5.52, 'Allocated', '2016-09-03') +,(4419, 604, 4 , 54.04, 4.95, 'On Order' , '2017-01-05') +,(4420, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4421, 605, 2 , 96.34, 1.7 , 'On Order' , '2016-06-10') +,(4422, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4423, 602, 3 , 25.88, 5.34, 'Allocated', '2016-04-19') +,(4423, 605, 5 , 4.06 , 2.22, 'On Order' , '2016-06-21') +,(4423, 608, 9 , 20.4 , 4.26, 'On Order' , '2016-08-17') +,(4424, 605, 8 , 44.66, 4.23, 'Allocated', '2016-11-06') +,(4425, 607, 7 , 18.91, 6.75, 'On Order' , '2016-11-28') +,(4425, 608, 4 , 60.11, 4.46, 'No Stock' , '2017-02-15') +,(4426, 606, 8 , 44.98, 6.5 , 'On Order' , '2016-11-13') +,(4426, 607, 4 , 78.46, 2.91, 'Allocated', '2017-01-26') +,(4427, 604, 2 , 61.91, 3.08, 'On Order' , '2016-09-01') +,(4427, 607, 10, 53.82, 8.17, 'No Stock' , '2016-11-09') +,(4428, 603, 2 , 81.15, 5.94, 'Allocated', '2016-12-01') +,(4428, 605, 9 , 48.38, 5.26, 'On Order' , '2016-07-08') +,(4429, 606, 10, 28.8 , 2.75, 'Allocated', '2017-03-03') +,(4430, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4431, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4432, 603, 9 , 52.12, 4.42, 'No Stock' , '2016-09-03') +,(4433, 601, 4 , 34.09, 9.94, 'No Stock' , '2016-04-18') +,(4433, 605, 1 , 65.04, 7.32, 'On Order' , '2016-04-04') +,(4434, 601, 2 , 61.28, 1.15, 'On Order' , '2016-03-18') +,(4434, 605, 2 , 61.28, 1.15, 'On Order' , '2016-03-18') +,(4434, 607, 2 , 61.28, 1.15, 'On Order' , '2016-03-18') +,(4435, 610, 10, 9.19 , 7.18, 'On Order' , '2016-12-08') +,(4435, 612, 10, 9.19 , 7.18, 'On Order' , '2016-12-08') +,(4435, 614, 10, 9.19 , 7.18, 'On Order' , '2016-12-08') +,(4436, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4436, 618, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4436, 620, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4437, 601, 7 , 56.48, 9.07, 'Allocated', '2016-05-05') +,(4437, 602, 1 , 98.71, 8.08, 'On Order' , '2017-03-16') +,(4437, 609, 7 , 12.69, 5.56, 'On Order' , '2016-12-16') +,(4438, 604, 1 , 97.24, 5.43, 'Allocated', '2016-10-22') +,(4438, 605, 1 , 97.24, 5.43, 'Allocated', '2016-10-22') +,(4438, 606, 1 , 97.24, 5.43, 'Allocated', '2016-10-22') +,(4439, 615, 5 , 11.46, 3.07, 'Allocated', '2016-06-10') +,(4439, 618, 1 , 97.24, 5.43, 'Allocated', '2016-10-22') +,(4439, 620, 1 , 97.24, 5.43, 'Allocated', '2016-10-22') +,(4440, 603, 9 , 66.05, 8.7 , 'No Stock' , '2016-11-08') +,(4440, 616, 1 , 97.24, 5.43, 'Allocated', '2016-10-22') +,(4440, 620, 1 , 97.24, 5.43, 'Allocated', '2016-10-22') +,(4441, 602, 4 , 79.49, 2.54, 'Allocated', '2017-02-19') +,(4441, 609, 4 , 88.86, 9.63, 'Allocated', '2016-06-06') +,(4442, 608, 1 , 55.66, 2.52, 'Allocated', '2016-09-08') +,(4443, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4444, 602, 4 , 52.6 , 9.83, 'On Order' , '2017-01-18') +,(4444, 605, 8 , 81.63, 9.58, 'On Order' , '2017-01-27') +,(4445, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4445, 601, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4445, 607, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4446, 602, 3 , 76.28, 1.52, 'On Order' , '2017-02-17') +,(4446, 606, 5 , 18.52, 2.13, 'On Order' , '2016-06-28') +,(4447, 609, 9 , 54.61, 4.47, 'Allocated', '2016-07-08') +,(4447, 608, 9 , 54.61, 4.47, 'Allocated', '2016-07-08') +,(4447, 607, 9 , 54.61, 4.47, 'Allocated', '2016-07-08') +,(4448, 605, 2 , 69.71, 2.05, 'No Stock' , '2016-09-17') +,(4448, 606, 2 , 69.71, 2.05, 'No Stock' , '2016-09-17') +,(4448, 607, 2 , 69.71, 2.05, 'No Stock' , '2016-09-17') +,(4449, 618, 6 , 35.62, 5.23, 'On Order' , '2016-04-15') +,(4449, 619, 10, 86.97, 4.63, 'No Stock' , '2016-09-29') +,(4450, 619, 8 , 26.14, 4.87, 'On Order' , '2016-12-09') +,(4450, 620, 8 , 26.14, 4.87, 'On Order' , '2016-12-09') +,(4450, 601, 8 , 26.14, 4.87, 'On Order' , '2016-12-09') +,(4451, 604, 3 , 47.48, 1.4 , 'Allocated', '2016-09-12') +,(4452, 615, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4453, 606, 2 , 4.03 , 8.07, 'On Order' , '2016-12-10') +,(4454, 619, 7 , 55.92, 9.0 , 'On Order' , '2016-10-07') +,(4455, 602, 10, 50.3 , 9.33, 'On Order' , '2017-01-11') +,(4455, 603, 1 , 7.68 , 7.77, 'Allocated', '2016-12-09') +,(4455, 605, 1 , 98.23, 3.73, 'Allocated', '2016-07-07') +,(4456, 607, 8 , 54.83, 9.57, 'No Stock' , '2016-08-16') +,(4456, 612, 7 , 97.34, 1.24, 'Allocated', '2016-05-13') +,(4457, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4458, 615, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4459, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4460, 602, 8 , 37.95, 8.36, 'No Stock' , '2017-01-03') +,(4461, 620, 6 , 73.77, 2.02, 'Allocated', '2016-03-27') +,(4462, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4463, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4464, 606, 1 , 31.6 , 1.18, 'On Order' , '2016-09-05') +,(4465, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4466, 620, 10, 37.79, 1.76, 'Allocated', '2016-12-14') +,(4467, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4468, 610, 3 , 80.77, 6.87, 'Allocated', '2016-12-30') +,(4469, 602, 3 , 19.99, 5.21, 'No Stock' , '2016-08-11') +,(4469, 612, 3 , 73.21, 4.85, 'On Order' , '2017-02-19') +,(4470, 607, 4 , 7.7 , 5.78, 'No Stock' , '2016-04-22') +,(4471, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4472, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4473, 609, 2 , 97.6 , 1.84, 'Allocated', '2016-05-12') +,(4474, 611, 7 , 12.5 , 6.31, 'Allocated', '2016-04-18') +,(4475, 603, 2 , 44.42, 7.21, 'No Stock' , '2017-03-10') +,(4476, 603, 4 , 43.47, 5.63, 'No Stock' , '2016-09-17') +,(4477, 603, 4 , 24.99, 4.46, 'No Stock' , '2016-09-10') +,(4478, 606, 1 , 29.13, 4.59, 'On Order' , '2017-03-04') +,(4478, 619, 4 , 58.05, 2.9 , 'Allocated', '2017-01-26') +,(4479, 603, 10, 93.2 , 7.79, 'On Order' , '2016-03-21') +,(4479, 609, 4 , 70.36, 9.01, 'Allocated', '2017-02-03') +,(4479, 610, 6 , 49.48, 6.79, 'Allocated', '2017-03-01') +,(4480, 608, 9 , 11.03, 6.26, 'On Order' , '2016-12-10') +,(4481, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4482, 603, 10, 28.92, 8.1 , 'No Stock' , '2016-05-27') +,(4482, 607, 6 , 90.11, 5.74, 'On Order' , '2016-04-29') +,(4482, 610, 4 , 7.12 , 2.89, 'On Order' , '2017-01-12') +,(4482, 611, 1 , 12.48, 8.56, 'No Stock' , '2016-08-16') +,(4482, 614, 10, 55.93, 1.63, 'On Order' , '2016-07-09') +,(4482, 618, 1 , 33.9 , 2.46, 'Allocated', '2016-07-11') +,(4483, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4484, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4485, 605, 7 , 99.92, 1.31, 'No Stock' , '2016-05-11') +,(4486, 615, 7 , 4.39 , 3.61, 'Allocated', '2016-06-24') +,(4487, 602, 9 , 69.78, 7.96, 'No Stock' , '2016-12-29') +,(4487, 607, 5 , 24.92, 8.97, 'On Order' , '2016-08-15') +,(4487, 615, 4 , 72.16, 8.97, 'On Order' , '2016-07-28') +,(4488, 601, 9 , 64.29, 1.52, 'On Order' , '2016-03-30') +,(4488, 609, 10, 66.79, 5.3 , 'On Order' , '2016-07-11') +,(4489, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4490, 615, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4491, 602, 3 , 16.8 , 5.22, 'On Order' , '2016-09-16') +,(4492, 607, 4 , 99.59, 2.45, 'On Order' , '2017-03-04') +,(4493, 615, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4494, 615, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4495, 607, 7 , 86.05, 5.4 , 'Allocated', '2016-10-03') +,(4496, 603, 10, 55.12, 3.71, 'Allocated', '2016-07-06') +,(4497, 607, 7 , 27.3 , 4.26, 'Allocated', '2017-01-29') +,(4498, 604, 10, 89.58, 1.25, 'Allocated', '2016-03-19') +,(4498, 610, 10, 69.32, 2.48, 'No Stock' , '2016-06-24') +,(4499, 601, 4 , 56.58, 6.73, 'No Stock' , '2017-02-21') +,(4499, 602, 4 , 56.58, 6.73, 'No Stock' , '2017-02-21') +,(4499, 603, 4 , 56.58, 6.73, 'No Stock' , '2017-02-21') +,(4500, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4500, 620, 10, 54.41, 7.02, 'No Stock' , '2016-11-30') +,(4500, 619, 10, 54.41, 7.02, 'No Stock' , '2016-11-30') +,(4501, 620, 10, 54.41, 7.02, 'No Stock' , '2016-11-30') +,(4501, 619, 10, 54.41, 7.02, 'No Stock' , '2016-11-30') +,(4501, 618, 10, 54.41, 7.02, 'No Stock' , '2016-11-30') +,(4502, 603, 2 , 27.21, 1.12, 'No Stock' , '2016-07-27') +,(4502, 605, 9 , 39.93, 3.2 , 'On Order' , '2016-11-21') +,(4503, 615, 6 , 85.1 , 8.26, 'No Stock' , '2016-05-03') +,(4503, 611, 6 , 85.1 , 8.26, 'No Stock' , '2016-05-03') +,(4503, 612, 6 , 85.1 , 8.26, 'No Stock' , '2016-05-03') +,(4504, 615, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4504, 618, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4504, 619, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4505, 612, 3 , 10.99, 1.62, 'Allocated', '2016-09-04') +,(4505, 609, 3 , 10.99, 1.62, 'Allocated', '2016-09-04') +,(4505, 601, 3 , 10.99, 1.62, 'Allocated', '2016-09-04') +,(4506, 602, 7 , 88.03, 1.0 , 'On Order' , '2016-09-23') +,(4506, 603, 9 , 66.78, 1.18, 'Allocated', '2017-02-03') +,(4506, 606, 10, 85.37, 2.21, 'Allocated', '2016-10-03') +,(4506, 609, 9 , 84.3 , 4.06, 'Allocated', '2016-12-08') +,(4507, 617, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4508, 611, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4509, 611, 2 , 99.24, 8.51, 'Allocated', '2016-08-12') +,(4509, 612, 8 , 2.41 , 3.81, 'On Order' , '2016-08-30') +,(4510, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4511, 610, 3 , 73.48, 8.4 , 'Allocated', '2016-12-06') +,(4511, 611, 4 , 7.29 , 6.91, 'Allocated', '2016-12-23') +,(4511, 616, 5 , 26.16, 6.26, 'On Order' , '2016-12-09') +,(4512, 614, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4513, 614, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4514, 605, 6 , 86.17, 7.08, 'No Stock' , '2017-01-25') +,(4514, 610, 6 , 71.51, 6.3 , 'No Stock' , '2017-01-23') +,(4515, 617, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4516, 618, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4517, 604, 10, 55.76, 7.34, 'Allocated', '2016-10-23') +,(4517, 619, 2 , 1.09 , 7.07, 'Allocated', '2016-08-19') +,(4518, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4519, 609, 9 , 61.39, 7.83, 'On Order' , '2016-07-01') +,(4520, 619, 9 , 72.61, 9.55, 'No Stock' , '2016-10-08') +,(4521, 610, 10, 19.38, 3.54, 'Allocated', '2016-12-08') +,(4521, 615, 8 , 54.35, 7.77, 'No Stock' , '2017-01-31') +,(4522, 602, 9 , 68.98, 6.79, 'No Stock' , '2016-11-28') +,(4523, 606, 9 , 79.86, 1.63, 'No Stock' , '2016-05-25') +,(4524, 602, 9 , 91.58, 3.46, 'On Order' , '2017-03-12') +,(4525, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4526, 603, 9 , 56.56, 7.64, 'On Order' , '2016-10-14') +,(4526, 604, 4 , 80.67, 2.83, 'No Stock' , '2016-07-29') +,(4526, 610, 5 , 88.8 , 2.86, 'On Order' , '2017-02-25') +,(4527, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4528, 605, 4 , 73.64, 8.81, 'Allocated', '2017-01-26') +,(4528, 609, 4 , 64.56, 4.09, 'On Order' , '2016-10-03') +,(4529, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4530, 602, 9 , 70.97, 4.73, 'On Order' , '2016-12-07') +,(4531, 606, 10, 26.53, 2.83, 'No Stock' , '2016-03-25') +,(4531, 615, 5 , 79.05, 6.82, 'Allocated', '2016-08-04') +,(4531, 619, 4 , 36.14, 7.09, 'No Stock' , '2016-03-26') +,(4532, 605, 5 , 6.28 , 9.94, 'No Stock' , '2017-03-13') +,(4532, 610, 8 , 17.25, 3.68, 'Allocated', '2016-05-28') +,(4533, 615, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4534, 606, 8 , 60.95, 9.33, 'Allocated', '2016-07-15') +,(4534, 607, 10, 49.84, 8.32, 'No Stock' , '2016-04-24') +,(4535, 610, 6 , 17.67, 1.81, 'On Order' , '2017-03-01') +,(4535, 619, 3 , 88.0 , 3.12, 'Allocated', '2016-07-11') +,(4536, 615, 5 , 88.08, 4.93, 'Allocated', '2016-12-04') +,(4537, 611, 2 , 14.77, 4.04, 'No Stock' , '2016-03-25') +,(4538, 603, 6 , 3.51 , 4.54, 'Allocated', '2016-04-21') +,(4539, 603, 7 , 6.58 , 4.8 , 'Allocated', '2016-05-14') +,(4540, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4540, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4540, 618, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4541, 603, 5 , 37.47, 2.89, 'On Order' , '2016-04-07') +,(4541, 607, 4 , 35.17, 5.44, 'No Stock' , '2017-01-07') +,(4541, 615, 2 , 83.62, 4.01, 'Allocated', '2016-11-22') +,(4542, 605, 10, 92.43, 3.27, 'On Order' , '2017-01-23') +,(4542, 601, 10, 92.43, 3.27, 'On Order' , '2017-01-23') +,(4542, 603, 10, 92.43, 3.27, 'On Order' , '2017-01-23') +,(4543, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4543, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4543, 619, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4544, 611, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4544, 610, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4544, 609, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4545, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4545, 604, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4545, 606, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4546, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4546, 606, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4546, 608, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4547, 606, 4 , 81.81, 9.44, 'No Stock' , '2016-05-14') +,(4547, 602, 4 , 81.81, 9.44, 'No Stock' , '2016-05-14') +,(4547, 603, 4 , 81.81, 9.44, 'No Stock' , '2016-05-14') +,(4548, 614, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4548, 611, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4548, 615, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4549, 605, 9 , 24.12, 7.26, 'No Stock' , '2016-08-22') +,(4549, 606, 7 , 6.19 , 4.68, 'Allocated', '2016-09-02') +,(4550, 609, 8 , 49.04, 7.62, 'On Order' , '2016-06-10') +,(4550, 610, 10, 92.51, 4.84, 'No Stock' , '2017-02-24') +,(4551, 601, 3 , 85.1 , 2.45, 'Allocated', '2016-07-08') +,(4551, 602, 3 , 69.43, 1.31, 'No Stock' , '2017-03-15') +,(4551, 610, 1 , 19.38, 8.43, 'No Stock' , '2016-11-09') +,(4552, 601, 2 , 91.69, 8.12, 'On Order' , '2016-06-03') +,(4552, 613, 3 , 41.15, 6.38, 'No Stock' , '2016-04-11') +,(4553, 603, 1 , 5.22 , 8.43, 'On Order' , '2016-10-28') +,(4554, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4555, 607, 6 , 77.16, 3.07, 'No Stock' , '2016-04-29') +,(4555, 612, 9 , 81.31, 9.81, 'On Order' , '2017-01-24') +,(4556, 615, 10, 65.81, 7.25, 'Allocated', '2016-11-07') +,(4557, 603, 1 , 5.01 , 4.57, 'No Stock' , '2016-09-05') +,(4557, 606, 3 , 29.35, 8.67, 'On Order' , '2016-09-14') +,(4558, 601, 3 , 29.62, 7.16, 'No Stock' , '2016-11-06') +,(4559, 620, 2 , 87.83, 7.93, 'On Order' , '2016-11-09') +,(4560, 610, 7 , 9.51 , 8.01, 'On Order' , '2016-08-22') +,(4561, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4562, 610, 9 , 15.1 , 6.8 , 'Allocated', '2016-08-27') +,(4562, 611, 3 , 71.09, 1.26, 'No Stock' , '2016-07-12') +,(4563, 618, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4564, 602, 2 , 6.68 , 6.29, 'Allocated', '2016-03-19') +,(4565, 603, 7 , 81.01, 2.82, 'Allocated', '2017-03-06') +,(4565, 606, 8 , 99.68, 6.28, 'No Stock' , '2016-04-27') +,(4566, 614, 7 , 57.79, 4.48, 'No Stock' , '2016-11-02') +,(4567, 604, 7 , 94.42, 5.46, 'No Stock' , '2016-05-18') +,(4567, 605, 1 , 61.75, 1.31, 'Allocated', '2016-04-14') +,(4567, 608, 10, 25.99, 4.85, 'On Order' , '2016-05-01') +,(4567, 620, 9 , 62.17, 4.66, 'Allocated', '2016-06-11') +,(4568, 606, 8 , 66.92, 1.1 , 'Allocated', '2016-10-02') +,(4568, 607, 10, 95.6 , 9.17, 'On Order' , '2016-05-04') +,(4568, 608, 6 , 81.57, 6.24, 'No Stock' , '2017-01-24') +,(4569, 601, 10, 96.56, 6.33, 'Allocated', '2016-07-22') +,(4570, 610, 6 , 98.15, 2.57, 'No Stock' , '2016-06-28') +,(4571, 604, 8 , 5.15 , 2.51, 'No Stock' , '2016-07-11') +,(4572, 603, 2 , 59.21, 2.46, 'Allocated', '2016-11-18') +,(4573, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4574, 615, 3 , 14.81, 9.61, 'On Order' , '2016-05-04') +,(4575, 608, 10, 79.25, 7.08, 'On Order' , '2016-11-19') +,(4575, 611, 10, 79.25, 7.08, 'On Order' , '2016-11-19') +,(4575, 615, 10, 79.25, 7.08, 'On Order' , '2016-11-19') +,(4576, 607, 7 , 31.78, 2.05, 'On Order' , '2016-03-17') +,(4576, 608, 7 , 31.78, 2.05, 'On Order' , '2016-03-17') +,(4576, 610, 7 , 31.78, 2.05, 'On Order' , '2016-03-17') +,(4577, 604, 5 , 92.54, 6.26, 'On Order' , '2016-04-22') +,(4577, 603, 5 , 92.54, 6.26, 'On Order' , '2016-04-22') +,(4577, 601, 5 , 92.54, 6.26, 'On Order' , '2016-04-22') +,(4578, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4578, 602, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4578, 603, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4579, 615, 10, 70.19, 5.85, 'No Stock' , '2016-09-11') +,(4579, 616, 10, 70.19, 5.85, 'No Stock' , '2016-09-11') +,(4579, 620, 10, 70.19, 5.85, 'No Stock' , '2016-09-11') +,(4580, 601, 1 , 15.44, 3.76, 'No Stock' , '2016-04-08') +,(4580, 603, 1 , 15.44, 3.76, 'No Stock' , '2016-04-08') +,(4580, 605, 1 , 15.44, 3.76, 'No Stock' , '2016-04-08') +,(4580, 609, 1 , 15.44, 3.76, 'No Stock' , '2016-04-08') +,(4581, 607, 8 , 42.4 , 9.73, 'On Order' , '2016-06-04') +,(4581, 610, 9 , 79.73, 3.87, 'On Order' , '2016-04-20') +,(4581, 611, 5 , 78.01, 3.65, 'On Order' , '2016-03-17') +,(4581, 616, 5 , 50.56, 5.24, 'No Stock' , '2016-07-06') +,(4582, 609, 7 , 65.99, 9.4 , 'No Stock' , '2016-05-22') +,(4582, 607, 7 , 65.99, 9.4 , 'No Stock' , '2016-05-22') +,(4582, 606, 7 , 65.99, 9.4 , 'No Stock' , '2016-05-22') +,(4583, 604, 9 , 19.92, 6.51, 'Allocated', '2016-04-13') +,(4583, 610, 1 , 19.4 , 8.3 , 'On Order' , '2016-12-08') +,(4584, 617, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4584, 620, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4584, 613, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4585, 602, 2 , 90.57, 2.52, 'Allocated', '2016-05-22') +,(4585, 610, 10, 44.26, 3.84, 'On Order' , '2016-12-27') +,(4586, 604, 2 , 56.61, 9.64, 'Allocated', '2017-02-23') +,(4586, 612, 7 , 24.24, 7.68, 'On Order' , '2016-04-04') +,(4587, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4587, 611, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4587, 612, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4588, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4588, 601, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4588, 602, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4589, 601, 5 , 52.25, 4.47, 'Allocated', '2016-07-02') +,(4589, 603, 9 , 72.27, 4.97, 'On Order' , '2016-04-03') +,(4590, 610, 3 , 46.2 , 6.71, 'Allocated', '2016-12-16') +,(4590, 615, 5 , 52.0 , 5.26, 'On Order' , '2016-06-01') +,(4591, 601, 1 , 96.52, 2.39, 'No Stock' , '2017-01-16') +,(4591, 605, 8 , 19.56, 9.68, 'On Order' , '2016-09-15') +,(4592, 609, 10, 30.76, 3.2 , 'No Stock' , '2016-05-02') +,(4592, 619, 1 , 48.47, 6.13, 'On Order' , '2016-07-19') +,(4593, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4593, 619, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4593, 620, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4594, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4594, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4594, 618, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4594, 620, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4595, 605, 1 , 50.28, 8.15, 'Allocated', '2017-02-19') +,(4595, 601, 1 , 50.28, 8.15, 'Allocated', '2017-02-19') +,(4595, 602, 1 , 50.28, 8.15, 'Allocated', '2017-02-19') +,(4596, 605, 6 , 95.17, 7.53, 'On Order' , '2016-09-11') +,(4596, 609, 10, 82.11, 4.38, 'No Stock' , '2016-11-17') +,(4597, 608, 9 , 96.25, 4.8 , 'No Stock' , '2016-07-02') +,(4597, 605, 9 , 96.25, 4.8 , 'No Stock' , '2016-07-02') +,(4597, 601, 9 , 96.25, 4.8 , 'No Stock' , '2016-07-02') +,(4598, 603, 5 , 69.02, 6.1 , 'No Stock' , '2016-12-23') +,(4598, 608, 5 , 69.02, 6.1 , 'No Stock' , '2016-12-23') +,(4598, 610, 5 , 69.02, 6.1 , 'No Stock' , '2016-12-23') +,(4599, 603, 9 , 40.91, 6.68, 'On Order' , '2016-12-27') +,(4599, 607, 9 , 40.91, 6.68, 'On Order' , '2016-12-27') +,(4599, 609, 9 , 40.91, 6.68, 'On Order' , '2016-12-27') +,(4600, 611, 5 , 22.93, 8.87, 'Allocated', '2016-06-16') +,(4600, 615, 5 , 22.93, 8.87, 'Allocated', '2016-06-16') +,(4600, 612, 5 , 22.93, 8.87, 'Allocated', '2016-06-16'); diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/logback.xml b/prod116rb-back-b/authsec_springboot/backend/target/classes/logback.xml new file mode 100644 index 0000000..12fa9be --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/target/classes/logback.xml @@ -0,0 +1,108 @@ + + + + + + + + + ${LOG_PATTERN} + + + + + ${APP_LOG_ROOT}/ExceptionLogs/Error.log + + ${LOG_PATTERN} + + + ${APP_LOG_ROOT}/ExceptionLogs/Error-%d{yyyy-MM-dd}.%i.log + 1 + 10 + + + 10MB + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/messages.properties b/prod116rb-back-b/authsec_springboot/backend/target/classes/messages.properties new file mode 100644 index 0000000..b015c87 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/target/classes/messages.properties @@ -0,0 +1,5 @@ + +email.notempty=Please provide valid email id. +email.valid=Email should be valid +email.regex=Enter a valid email +name.minsize=Name should have minimum 3 characters diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/note.txt b/prod116rb-back-b/authsec_springboot/backend/target/classes/note.txt new file mode 100644 index 0000000..dd9fbe6 --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/target/classes/note.txt @@ -0,0 +1,57 @@ +HEADER-LINE FORM : + +GET: http://localhost:9119/api/teacher +GET: http://localhost:9119/api/teacher/{id} +PUT: http://localhost:9119/api/teacher/{id} +DELETE: http://localhost:9119/api/teacher/{id} : NEED TO MODIFY THE INCORRECT ID INPUT ERROR HANDLING +POST: http://localhost:9119/api/teacher +===EX1=== +{ + "name": "niladri", + "email": "sen.niladri6@gmail.com", + "phoneNumber": 6291, + "salary": 1000.0, + "students": [{ + "name": "paku", + "depertment": "CSE", + "rollNumber": 108 + }] +} +===EX2===: +{ + "name": "sandipan", + "email": "sandy@gmail.com", + "phoneNumber": 9038, + "salary": 2000.0, + "students": [ + { + "name": "sahil", + "depertment": "CSE", + "rollNumber": 111 + }, + { + "name": "tarun", + "depertment": "CSE", + "rollNumber": 121 + } + ] +} + +===== 6.11.36 +user.java class code changed +@Getter @Setter private List role; +TokenUtil class code change + +===== 9.11.20 +1.8 +=== SWAGGER UI ==== +http://localhost:9119/swagger-ui.html + +========= +GIT HUB COMMAND +========= +$ git commit -m "your mesage" +$ git push origin main +$ git status + +$ git push origin main diff --git a/prod116rb-back-b/authsec_springboot/backend/target/classes/schema.sql b/prod116rb-back-b/authsec_springboot/backend/target/classes/schema.sql new file mode 100644 index 0000000..573e44a --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/target/classes/schema.sql @@ -0,0 +1,303 @@ +/** + Model : NorthWind +**/ + +DROP SCHEMA IF EXISTS northwind; + +CREATE SCHEMA northwind; +USE northwind; + +/* Table: user (Application Users) */ +CREATE TABLE user ( + user_id NVARCHAR(20) NOT NULL, + password NVARCHAR(255) NOT NULL, + first_name NVARCHAR(50) , + last_name NVARCHAR(50) , + email NVARCHAR(70) , + security_provider_id INT , + default_customer_id INT , + company NVARCHAR(50) , + phone NVARCHAR(20) , + address1 NVARCHAR(100), + address2 NVARCHAR(100), + country NVARCHAR(20) , + postal NVARCHAR(20) , + role NVARCHAR(20) , + other_roles NVARCHAR(80) , + is_active TINYINT , + is_blocked TINYINT , + secret_question NVARCHAR(100), + secret_answer NVARCHAR(100), + enable_beta_testing TINYINT, + enable_renewal TINYINT, + CONSTRAINT user_id PRIMARY KEY(user_id) +); + +/* Table: customers */ +CREATE TABLE customers ( + id INT NOT NULL, + last_name VARCHAR(50) , + first_name VARCHAR(50) , + email VARCHAR(50) , + company VARCHAR(50) , + phone VARCHAR(25) , + address1 VARCHAR(150), + address2 VARCHAR(150), + city VARCHAR(50) , + state VARCHAR(50) , + postal_code VARCHAR(15) , + country VARCHAR(50) , + PRIMARY KEY (id) +); + +/* Table: employees */ +CREATE TABLE employees ( + id INT NOT NULL, + last_name VARCHAR(50) , + first_name VARCHAR(50) , + email VARCHAR(50) , + avatar VARCHAR(250) , + job_title VARCHAR(50) , + department VARCHAR(50) , + manager_id INT , + phone VARCHAR(25) , + address1 VARCHAR(150), + address2 VARCHAR(150), + city VARCHAR(50) , + state VARCHAR(50) , + postal_code VARCHAR(15) , + country VARCHAR(50) , + PRIMARY KEY (id) +); + +/* Table: orders */ +CREATE TABLE orders ( + id INT NOT NULL, + employee_id INT , + customer_id INT , + order_date DATETIME , + shipped_date DATETIME , + ship_name VARCHAR(50) , + ship_address1 VARCHAR(150) , + ship_address2 VARCHAR(150) , + ship_city VARCHAR(50) , + ship_state VARCHAR(50) , + ship_postal_code VARCHAR(50) , + ship_country VARCHAR(50) , + shipping_fee DECIMAL(19,4) NULL DEFAULT '0.0000', + payment_type VARCHAR(50) , + paid_date DATETIME , + order_status VARCHAR(25), + PRIMARY KEY (id) +); + +/* Table: order_details */ +CREATE TABLE order_items ( + order_id INT NOT NULL, + product_id INT , + quantity DECIMAL(18,4) NOT NULL DEFAULT '0.0000', + unit_price DECIMAL(19,4) NULL DEFAULT '0.0000', + discount DECIMAL(19,4) NULL DEFAULT '0.0000', + order_item_status VARCHAR(25), + date_allocated DATETIME , + PRIMARY KEY (order_id, product_id) +); + +/* Table: products */ +CREATE TABLE products ( + id INT NOT NULL, + product_code VARCHAR(25) , + product_name VARCHAR(50) , + description VARCHAR(250), + standard_cost DECIMAL(19,4) NULL DEFAULT '0.0000', + list_price DECIMAL(19,4) NOT NULL DEFAULT '0.0000', + target_level INT , + reorder_level INT , + minimum_reorder_quantity INT , + quantity_per_unit VARCHAR(50) , + discontinued TINYINT NOT NULL DEFAULT '0', + category VARCHAR(50), + PRIMARY KEY (id) +); + + +/* Foreign Key: orders */ +ALTER TABLE orders ADD CONSTRAINT fk_orders__customers FOREIGN KEY (customer_id) REFERENCES customers(id); +ALTER TABLE orders ADD CONSTRAINT fk_orders__employees FOREIGN KEY (employee_id) REFERENCES employees(id); +/* Foreign Key: order_items */ +ALTER TABLE order_items ADD CONSTRAINT fk_order_items__orders FOREIGN KEY (order_id) REFERENCES orders(id); +ALTER TABLE order_items ADD CONSTRAINT fk_order_items__products FOREIGN KEY (product_id) REFERENCES products(id); + +/* Views */ +CREATE OR REPLACE VIEW order_info AS +select o.id as order_id + , o.order_date + , o.order_status + , o.paid_date + , o.payment_type + , o.shipped_date + , o.shipping_fee + , o.ship_name + , o.ship_address1 + , o.ship_address2 + , o.ship_city + , o.ship_state + , o.ship_postal_code + , o.ship_country + , o.customer_id + , o.employee_id + , concat(c.first_name, ' ', c.last_name) as customer_name + , c.phone customer_phone + , c.email customer_email + , c.company as customer_company + , concat(e.first_name, ' ', e.last_name) as employee_name + , e.department employee_department + , e.job_title employee_job_title + From orders o + , employees e + , customers c + where o.employee_id = e.id + and o.customer_id = c.id; + +CREATE OR REPLACE VIEW order_details AS +select oi.order_id + , oi.product_id + , oi.quantity + , oi.unit_price + , oi.discount + , oi.date_allocated + , oi.order_item_status + , o.order_date + , o.order_status + , o.paid_date + , o.payment_type + , o.shipped_date + , o.shipping_fee + , o.ship_name + , o.ship_address1 + , o.ship_address2 + , o.ship_city + , o.ship_state + , o.ship_postal_code + , o.ship_country + , p.product_code + , p.product_name + , p.category + , p.description + , p.list_price + , o.customer_id + , concat(c.first_name, ' ', c.last_name) as customer_name + , c.phone as customer_phone + , c.email as customer_email + , c.company as customer_company + , o.employee_id + , concat(e.first_name, ' ', e.last_name) as employee_name + , e.department as employee_department + , e.job_title as employee_job_title + From orders o + , products p + , order_items oi + , employees e + , customers c + where oi.order_id = o.id + and oi.product_id = p.id + and o.employee_id = e.id + and o.customer_id = c.id; + +CREATE OR REPLACE VIEW customer_orders AS +select o.order_date, o.order_status, o.paid_date, o.payment_type, o.shipping_fee, o.customer_id + , c.first_name customer_first_name, c.last_name customer_last_name, c.phone customer_phone, c.email customer_email, c.company + from orders o,customers c + where o.customer_id = c.id; + +CREATE OR REPLACE VIEW employee_orders AS +select o.order_date, o.order_status, o.paid_date, o.payment_type, o.shipping_fee, o.employee_id + , e.first_name employee_first_name, e.last_name employee_last_name, e.email employee_email, e.department + from orders o,employees e + where o.customer_id = e.id; + + + /* REAL_NET */ + CREATE TABLE RN_INSTRUCTOR ( + ID VARCHAR(20) NOT NULL AUTO_INCREMENT, + FIRST_NAME VARCHAR(20) NOT NULL, + LAST_NAME VARCHAR(20) NOT NULL, + EMAIL VARCHAR(20) NOT NULL, + CREATED_AT DATETIME, + UPDATED_AT DATETIME, + PRIMARY KEY (id) + ); + + /*==== EXTENSION FIELD ===*/ + CREATE TABLE RN_EXT_FIELD_T ( + ID int(11) NOT NULL AUTO_INCREMENT, + TYPE VARCHAR(20), + DATA_TYPE VARCHAR(20), + FIELD_NAME VARCHAR(20), + MAPPING VARCHAR(20), + FORM_CODE VARCHAR(20), + IS_ACTIVE BOOLEAN, + ACCOUNT_ID VARCHAR(20), + CREATED_AT DATETIME, + UPDATED_AT DATETIME, + CREATED_BY VARCHAR(20), + UPDATED_BY VARCHAR(20), + PRIMARY KEY (ID) +); + +/*========= lookup ======== +CREATE TABLE `rn_lookup_values_t` ( + `ID` int(11) NOT NULL AUTO_INCREMENT, + `LOOKUP_CODE` longtext, + `MEANING` longtext, + `DESCRIPTION` longtext, + `LOOKUP_TYPE` longtext, + `ACTIVE_START_DATE` datetime DEFAULT NULL, + `ACTIVE_END_DATE` datetime DEFAULT NULL, + `ENABLED_FLAG` longtext, + `CREATED_BY` int(11) DEFAULT NULL, + `CREATION_DATE` datetime DEFAULT NULL, + `LAST_UPDATED_BY` int(11) DEFAULT NULL, + `LAST_UPDATE_DATE` datetime DEFAULT NULL + PRIMARY KEY (`ID`) +); */ + + + +/*========= LOGGING ======== + +DROP TABLE logging_event_exception IF EXISTS; +DROP TABLE logging_event_property IF EXISTS; +DROP TABLE logging_event IF EXISTS; + +CREATE TABLE logging_event ( + timestmp BIGINT NOT NULL, + formatted_message LONGVARCHAR NOT NULL, + logger_name VARCHAR(256) NOT NULL, + level_string VARCHAR(256) NOT NULL, + thread_name VARCHAR(256), + reference_flag SMALLINT, + arg0 VARCHAR(256), + arg1 VARCHAR(256), + arg2 VARCHAR(256), + arg3 VARCHAR(256), + caller_filename VARCHAR(256), + caller_class VARCHAR(256), + caller_method VARCHAR(256), + caller_line CHAR(4), + event_id IDENTITY NOT NULL); + + +CREATE TABLE logging_event_property ( + event_id BIGINT NOT NULL, + mapped_key VARCHAR(254) NOT NULL, + mapped_value LONGVARCHAR, + PRIMARY KEY(event_id, mapped_key), + FOREIGN KEY (event_id) REFERENCES logging_event(event_id)); + +CREATE TABLE logging_event_exception ( + event_id BIGINT NOT NULL, + i SMALLINT NOT NULL, + trace_line VARCHAR(256) NOT NULL, + PRIMARY KEY(event_id, i), + FOREIGN KEY (event_id) REFERENCES logging_event(event_id)); */ \ No newline at end of file diff --git a/prod116rb-back-b/authsec_springboot/backend/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/prod116rb-back-b/authsec_springboot/backend/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst new file mode 100644 index 0000000..e69de29 diff --git a/prod116rb-back-b/authsec_springboot/backend/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/prod116rb-back-b/authsec_springboot/backend/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst new file mode 100644 index 0000000..51d6ebc --- /dev/null +++ b/prod116rb-back-b/authsec_springboot/backend/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -0,0 +1,208 @@ +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\response\Rn_Function_Register_Response.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\logging1\ExceptionLoggingController.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\session\response\SessionResponse.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\Rn_Forms_Component_Setup.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\service1\MenuDetServiceImpl.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userDTO\LoginUser.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\service1\AppUserServiceImpl.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity1\GrpMenuAccesscompositeKey.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\controller\Rn_Menu_Group_Controller.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\service\Rn_Main_Menu_ServiceImpl.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\response\OperationResponse.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\repository\SysAccountRepo.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\repository\RnGroupLineRepository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\response\CustomResponse.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\controller\Rn_Menu_Group_Line_Controller.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\repository1\AppUserRepository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\config\SwaggerConfig.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\Rn_Ext_Fields.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\service\RnGroupMenuLineServiec.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userlist\service\impl\UserListServiceImpl.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\controller1\SysAccountController.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\service1\AppUserRoleServiceImpl.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\service\AboutServiceImple.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\config\JwtAuthenticationEntryPoint.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity\ERole.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userDTO\Rn_Who_AccId_Column.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\repository\Rn_Menu_Group_Repository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\logging1\repository\AppUserLogginRepository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\controller1\LoadMenuController.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\response\ServiceResponse.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\ProjectMini.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\response\Rn_Menu_Group_Response.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userDTO\Sys_Accounts.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity1\AppUserRole.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\Rn_FlexEntity.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\Rn_AuditEntity.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\service\Rn_Forms_Setup_ServiceImpl.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\Rn_Forms_Setup.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\response\SingleDataSeriseResponse.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity1\GrpMenuAccess.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\repository1\MenuDetRepository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity1\AppUserPrinciple.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\service\Rn_Menu_Group_Service.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\logging1\SessionConverter.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\DropDownDTO.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\projectCopyDTO.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\config\AppConfig.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\repository\LookUpRepository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\config\MessageSourceConfig.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity1\MenuDet.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity1\AppUserSessions.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\repository\ExtFieldRepository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\Rn_Sub_Menu.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\exceptions\InvalidUserDataException.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\Error.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity\LoginUser.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\logging1\PatternLayoutWithUserContext.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\logging1\entity\AppUserLog.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\logging\NoLogging.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\repository\Rn_InstanceTypeRepository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\config\TokenProvider.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\Rn_ExtensionEntity.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\repository1\passwordTokenRepository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\service1\AppUserSessionsServiceImpl.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userDTO\Rn_Who_Columns.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\config\CorsFilter.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\service1\AppUserService.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\repository\RoleRepo.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userDTO\Email.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\controller1\AppUserController.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\repository\AboutWorkRepo.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\repository\Rn_LookUpRepository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\repository1\AppUserDepartmentRepository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\controller\Rn_Forms_Setup_Controller.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\Rn_Menu_Register.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\WireFrameCopyDTO.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\session\entity\AboutWork.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userDTO\EmailRequest.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\service1\GrpMenuAccessServiceImpl.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\service\Rn_Forms_Setup_Service.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\Rn_Who_Columns.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\repository\Rn_Menu_Register_Repository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\service\AboutWorkService.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity1\AppUserPasswlogCompositeKey.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\repository1\AppUserRoleRepository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\Rn_Menu_Group_Line.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\controller\MainController.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\Rn_Who_AccId_Column.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\service\Rn_Main_Menu_Service.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\ModuleCopyDTO.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\repository\Rn_Forms_Setup_Repository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\Version.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\controller\UserController.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\session\controller\SessionController.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity\CustomUserDetails.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity1\Registration.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userlist\controller\UserListController.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity1\MIXMENUN.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\repository\CompanyRepo.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\service\Rn_Function_Register_Service.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity1\AppUser_who_column.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\service\RoleServiceImpl.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity1\ExtensionModel.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity1\AppUserDto.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\repository\Rn_Function_Register_Repository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity\Email.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\logging1\service\LoggingService.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\service\Rn_DynamicTransactionService.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\config\JWTConstant.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userDTO\Role.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity\Sys_Accounts.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\config\HttpLoggingFilter.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\utils\Port_Constant.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userDTO\UserProfileDTO.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userlist\entity\UserImage.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\logging\LogExecutionTime.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\logging\SecurityNoLogging.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\session\entity\SessionItem.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\session\entity\VersionModel.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\service\Rn_Menu_Register_ServiceImpl.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\Modulemini.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\config\JwtAuthenticationFilter.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\config\SecurityConfig.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity\UserProfileDTO.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\Rn_Dynamic_Transaction.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\logging\LogEntity.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\repository\UserRepo.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity1\MixMenu.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\repository1\GrpMenuAccessRepository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\controller1\WorkSpaceController1.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userDTO\User.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\Rn_Instance_Type.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity1\AppUserDepartment.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity1\AppUserSessionsCompositeKey.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\response\Rn_Forms_SetupResponse.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\Rn_Menu_Group_Header.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\service\Rn_DynamicTransactionServiceImpl.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userlist\entity\UserList.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\Rn_Function_Register.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\controller\Rn_Function_Register_Controller.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\Rn_Lookup_Values.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\ErrorPojo.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity1\SignUp.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\controller1\AppuserSessionController.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\utils\WireFrameConstant.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity\Role.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\logging1\controller\AppUserLogController.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\service\CompanyServiceImpl.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\service\Rn_Function_Register_ServiceImpl.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\repository\Rn_Main_Menu_Repository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\service\RnGroupMenuLineServiecImpl.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\response\Rn_Main_Menu_Response.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\controller\Rn_DynamicTransactionController.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\controller\Rn_Main_Menu_Controller.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity1\MixMenuNew.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity\GenericResponse.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\response\MessageResponse.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userlist\repository\UserImageRepository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity1\AppUser.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\response\UserItem.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userDTO\Login.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\response\UserResponse.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\service\Rn_Menu_Register_Service.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\service\UserService.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\SuccessPojo.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\RealNetApp.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\repository\Rn_DynamicTransactionRepository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userDTO\PasswordResetRequest.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity\UserDto.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userDTO\Provider.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\SingleSerise.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\exceptions\ResourceNotFoundException.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity\PasswordResetToken.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\Success.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\config\EmailService.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\service\Rn_Menu_Group_ServiceImpl.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\repository1\AppUserPositionRepository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\repository1\AppUserSessionsRepository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\controller1\MenuController.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\Rn_Main_Menu.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\controller1\AppUserGrpController.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\logging1\UserConverter.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\service1\PositionAndDepartmentServiceImpl.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\service\RoleService.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity\RoleUpdateDto.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userDTO\UserDto.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\controller\RoleController.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity\PasswordResetRequest.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userDTO\RoleUpdateDto.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\service\CompanyService.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\utils\Constant.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity1\AppUserLoginHist.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userDTO\CompanyDto.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity\CompanyDto.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity\Login.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\controller\Rn_Menu_Register_Controller.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity\EmailRequest.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\response\Rn_Menu_Register_Response.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userlist\repository\UserListRepository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\logging\LoggingAspect.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\response\PageResponse.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\logging1\controller\AppUserLogController2.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity1\AppUserPasswlog.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity1\AppUserPosition.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity1\menudet_who.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userlist\service\UserListService.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\response\Rn_DynamicTransactionResponse.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\controller1\PositonAndDepartmentController.java diff --git a/prod116rb-db-d/authsec_mysql/mysql/loginandmenu.sql b/prod116rb-db-d/authsec_mysql/mysql/loginandmenu.sql new file mode 100644 index 0000000..5279e3d --- /dev/null +++ b/prod116rb-db-d/authsec_mysql/mysql/loginandmenu.sql @@ -0,0 +1,569 @@ + +CREATE TABLE `app_user_log` ( + `log_id` bigint NOT NULL, + `created_on` datetime DEFAULT NULL, + `generate_log` varchar(255) DEFAULT NULL, + `log_file_name` varchar(255) DEFAULT NULL, + `log_level` varchar(255) DEFAULT NULL, + `user_name` varchar(255) DEFAULT NULL, + PRIMARY KEY (`log_id`), + UNIQUE KEY `UK_tl3or0c0pxxdvigxponlgee18` (`user_name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `app_user_log` +-- + +LOCK TABLES `app_user_log` WRITE; +/*!40000 ALTER TABLE `app_user_log` DISABLE KEYS */; +/*!40000 ALTER TABLE `app_user_log` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `password_reset_token` +-- + +DROP TABLE IF EXISTS `password_reset_token`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `password_reset_token` ( + `id` bigint NOT NULL, + `expiry_date` datetime DEFAULT NULL, + `token` varchar(255) DEFAULT NULL, + `user_user_id` bigint DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `FK4rtktv88xrvfli5jx9yst5arn` (`user_user_id`), + CONSTRAINT `FK4rtktv88xrvfli5jx9yst5arn` FOREIGN KEY (`user_user_id`) REFERENCES `sec_users` (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `password_reset_token` +-- + +LOCK TABLES `password_reset_token` WRITE; +/*!40000 ALTER TABLE `password_reset_token` DISABLE KEYS */; +/*!40000 ALTER TABLE `password_reset_token` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `role` +-- + +DROP TABLE IF EXISTS `role`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `role` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `description` varchar(255) DEFAULT NULL, + `name` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `role` +-- + +LOCK TABLES `role` WRITE; +/*!40000 ALTER TABLE `role` DISABLE KEYS */; +INSERT INTO `role` VALUES (1,NULL,'ROLE_Developer'),(2,'web','web developer'),(3,'front','frontend developer'),(4,'back','backend developer'),(5,'dev','devops '); +/*!40000 ALTER TABLE `role` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `sec_grp_menu_access` +-- + +DROP TABLE IF EXISTS `sec_grp_menu_access`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `sec_grp_menu_access` ( + `menu_item_id` bigint NOT NULL, + `usr_grp` bigint NOT NULL, + `createby` varchar(255) DEFAULT NULL, + `created_at` datetime DEFAULT NULL, + `isdisable` varchar(255) DEFAULT NULL, + `item_seq` bigint DEFAULT NULL, + `m_create` varchar(255) DEFAULT NULL, + `m_delete` varchar(255) DEFAULT NULL, + `m_edit` varchar(255) DEFAULT NULL, + `m_query` varchar(255) DEFAULT NULL, + `m_visible` varchar(255) DEFAULT NULL, + `main_menu_action_name` varchar(255) DEFAULT NULL, + `main_menu_icon_name` varchar(255) DEFAULT NULL, + `menu_id` bigint DEFAULT NULL, + `menu_item_desc` varchar(255) DEFAULT NULL, + `mexport` varchar(255) DEFAULT NULL, + `module_name` varchar(255) DEFAULT NULL, + `status` varchar(255) DEFAULT NULL, + `updateby` varchar(255) DEFAULT NULL, + `updated_at` datetime DEFAULT NULL, + PRIMARY KEY (`menu_item_id`,`usr_grp`), + KEY `FKtj8mtsrhc4m4acbrvjnnyvglm` (`usr_grp`), + CONSTRAINT `FKmkev6w9umgp6fg2afatibhq1x` FOREIGN KEY (`menu_item_id`) REFERENCES `sec_menu_det` (`menu_item_id`), + CONSTRAINT `FKtj8mtsrhc4m4acbrvjnnyvglm` FOREIGN KEY (`usr_grp`) REFERENCES `sec_user_group` (`usr_grp`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `sec_grp_menu_access` +-- + +LOCK TABLES `sec_grp_menu_access` WRITE; +/*!40000 ALTER TABLE `sec_grp_menu_access` DISABLE KEYS */; +INSERT INTO `sec_grp_menu_access` VALUES (1116,1,NULL,'2023-02-04 17:32:03','true',3000,'true','true','true','true','true','security','lock',0,'Security','true','sec3000','Enable',NULL,'2023-02-04 17:32:03'),(1117,1,NULL,'2023-02-04 17:32:03','true',3010,'true','true','true','true','true','usermaintance',NULL,1116,'User Maintance','true','U1000','Enable',NULL,'2023-02-04 17:32:03'),(1118,1,NULL,'2023-02-04 17:32:04','true',3020,'true','true','true','true','true','usergrpmaintance',NULL,1116,'User Group Maintance','true','U2000','Enable',NULL,'2023-02-04 17:32:04'),(1523,1,NULL,'2023-02-04 17:32:04','true',3030,'true','true','true','true','true','menumaintance',NULL,1116,'Menu Maintance','true','M3000','Enable',NULL,'2023-02-04 17:32:04'),(1524,1,NULL,'2023-02-04 17:32:04','true',3040,'true','true','true','true','true','menuaccess',NULL,1116,'Menu Access Control','true','MA4000','Enable',NULL,'2023-02-04 17:32:04'),(1525,1,NULL,'2023-02-04 17:32:04','true',3050,'true','true','true','true','true','systemparameters',NULL,1116,'System Parameters','true','SP5000','Enable',NULL,'2023-02-04 17:32:04'),(1526,1,NULL,'2023-02-04 17:32:04','true',3060,'true','true','true','true','true','accesstype',NULL,1116,'Access Type','true','A6000','Enable',NULL,'2023-02-04 17:32:04'),(1527,1,NULL,'2023-02-10 10:07:57','true',1000,'true','true','true','true','true','incidents','incident',0,'Incidents','true','I1000','Enable',NULL,'2023-02-10 10:07:57'),(1527,41,NULL,'2023-04-18 15:51:51','true',1000,'true','true','true','true','true','incidents','incident',0,'Incidents','true','I1000','Enable',NULL,'2023-04-18 15:51:51'),(1528,1,NULL,'2023-02-10 10:07:58','true',1010,'true','true','true','true','true','incident-new',NULL,1527,'Incident','true','I1000','Enable',NULL,'2023-02-10 10:07:58'),(1528,41,NULL,'2023-04-18 15:51:55','true',1010,'true','true','true','true','true','incident-new',NULL,1527,'Incident','true','I1000','Enable',NULL,'2023-04-18 15:51:55'),(1529,1,NULL,'2023-02-10 10:07:59','true',1020,'true','true','true','true','true','incident-overview',NULL,1527,'Overview','true','O2000','Enable',NULL,'2023-02-10 10:07:59'),(1529,41,NULL,'2023-04-18 15:51:57','true',1020,'true','true','true','true','true','incident-overview',NULL,1527,'Overview','true','O2000','Enable',NULL,'2023-04-18 15:51:57'),(1530,1,NULL,'2023-02-10 10:07:59','true',1030,'true','true','true','true','true','sureboard2',NULL,1527,'Issueboard','true','I3000','Enable',NULL,'2023-02-10 10:07:59'),(1530,41,NULL,'2023-04-18 15:52:00','true',1030,'true','true','true','true','true','sureboard2',NULL,1527,'Issueboard','true','I3000','Enable',NULL,'2023-04-18 15:52:00'),(1531,1,NULL,'2023-02-10 10:07:59','true',1040,'true','true','true','true','true','change-request',NULL,1527,'Change Request','true','C4000','Enable',NULL,'2023-02-10 10:07:59'),(1531,41,NULL,'2023-04-18 15:52:03','true',1040,'true','true','true','true','true','change-request',NULL,1527,'Change Request','true','C4000','Enable',NULL,'2023-04-18 15:52:03'),(1532,1,NULL,'2023-02-10 10:07:59','true',1050,'true','true','true','true','true','problem-creation',NULL,1527,'Problem Request','true','P5000','Enable',NULL,'2023-02-10 10:07:59'),(1532,41,NULL,'2023-04-18 15:52:07','true',1050,'true','true','true','true','true','problem-creation',NULL,1527,'Problem Request','true','P5000','Enable',NULL,'2023-04-18 15:52:07'),(1533,1,NULL,'2023-03-01 06:11:23','true',2000,'true','true','true','true','true','master','users',0,'Masters','true','M2000','Enable',NULL,'2023-03-01 06:11:23'),(1534,1,NULL,'2023-03-01 06:11:23','true',2010,'true','true','true','true','true','Sr_priority2_t',NULL,1533,'Priority','true','P1000','Enable',NULL,'2023-03-01 06:11:23'),(1535,1,NULL,'2023-03-01 06:11:23','true',2020,'true','true','true','true','true','Sr_urgency_t',NULL,1533,'Urgency','true','Su2000','Enable',NULL,'2023-03-01 06:11:23'),(1536,1,NULL,'2023-03-01 06:11:23','true',2030,'true','true','true','true','true','Sr_impact2_t',NULL,1533,'Impact','true','Sm3000','Enable',NULL,'2023-03-01 06:11:23'),(1537,1,NULL,'2023-03-01 06:11:23','true',2040,'true','true','true','true','true','Sr_category2_t',NULL,1533,'Category','true','Sc4000','Enable',NULL,'2023-03-01 06:11:23'),(1538,1,NULL,'2023-03-01 06:11:23','true',2050,'true','true','true','true','true','Sr_State_t',NULL,1533,'State','true','S5000','Enable',NULL,'2023-03-01 06:11:23'),(1539,1,NULL,'2023-03-01 06:11:23','true',2070,'true','true','true','true','true','Sr_customer_t',NULL,1533,'Customer','true','c7000','Enable',NULL,'2023-03-01 06:11:23'),(1540,1,NULL,'2023-03-01 06:11:23','true',2060,'true','true','true','true','true','Sr_Contact_type_t',NULL,1533,'Contact','true','C6000','Enable',NULL,'2023-03-01 06:11:23'),(1541,1,NULL,'2023-03-01 06:11:23','true',2080,'true','true','true','true','true','Sr_handler_t',NULL,1533,'Handler','true','H8000','Enable',NULL,'2023-03-01 06:11:23'),(1542,1,NULL,'2023-02-16 11:01:03','true',4000,'true','true','true','true','true','admin','user',0,'Admin','true','se4000','Enable',NULL,'2023-02-16 11:01:03'),(1543,1,NULL,'2023-02-16 11:01:03','true',4010,'true','true','true','true','true','sequence',NULL,1542,'Define Sequence','true','SE1000','Enable',NULL,'2023-02-16 11:01:03'),(1544,1,NULL,'2023-02-16 11:01:03','true',4020,'true','true','true','true','true','bugtracker',NULL,1542,'Bug Tracker','true','B1000','Enable',NULL,'2023-02-16 11:01:03'),(1545,1,NULL,'2023-02-16 11:01:04','true',4030,'true','true','true','true','true','datamanagemennt',NULL,1542,'Data Management','true','M3000','Enable',NULL,'2023-02-16 11:01:04'),(1550,1,NULL,'2023-03-01 06:11:23','true',2090,'true','true','true','true','true','projects',NULL,1533,'Projects','true','P2000','Enable',NULL,'2023-03-01 06:11:23'),(1551,1,NULL,'2023-04-18 16:22:41','true',4040,'true','true','true','true','true','applysequence',NULL,1542,'Apply Sequence','true','As3000','Enable',NULL,'2023-04-18 16:22:41'); +/*!40000 ALTER TABLE `sec_grp_menu_access` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `sec_menu_det` +-- + +DROP TABLE IF EXISTS `sec_menu_det`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `sec_menu_det` ( + `menu_item_id` bigint NOT NULL, + `created_at` datetime NOT NULL, + `updated_at` datetime NOT NULL, + `item_seq` bigint DEFAULT NULL, + `main_menu_action_name` varchar(255) DEFAULT NULL, + `main_menu_icon_name` varchar(255) DEFAULT NULL, + `menu_id` bigint DEFAULT NULL, + `menu_item_desc` varchar(255) DEFAULT NULL, + `module_name` varchar(255) DEFAULT NULL, + `status` varchar(255) DEFAULT NULL, + PRIMARY KEY (`menu_item_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `sec_menu_det` +-- + +LOCK TABLES `sec_menu_det` WRITE; +/*!40000 ALTER TABLE `sec_menu_det` DISABLE KEYS */; +INSERT INTO `sec_menu_det` VALUES (1116,'2023-01-25 10:25:50','2023-01-25 10:25:50',3000,'security','lock',0,'Security','sec3000','Enable'),(1117,'2023-01-25 10:42:02','2023-02-04 15:34:25',3010,'usermaintance',NULL,1116,'User Maintance','U1000','Enable'),(1118,'2023-01-25 11:12:27','2023-02-04 15:34:36',3020,'usergrpmaintance',NULL,1116,'User Group Maintance','U2000','Enable'),(1523,'2023-02-04 11:15:57','2023-02-04 15:34:45',3030,'menumaintance',NULL,1116,'Menu Maintance','M3000','Enable'),(1524,'2023-02-04 11:16:52','2023-02-04 15:34:54',3040,'menuaccess',NULL,1116,'Menu Access Control','MA4000','Enable'),(1525,'2023-02-04 11:17:31','2023-02-04 15:35:06',3050,'systemparameters',NULL,1116,'System Parameters','SP5000','Enable'),(1526,'2023-02-04 11:18:04','2023-02-04 15:35:14',3060,'accesstype',NULL,1116,'Access Type','A6000','Enable'),(1527,'2023-02-04 13:25:11','2023-02-04 13:25:11',1000,'incidents','incident',0,'Incidents','I1000','Enable'),(1528,'2023-02-04 13:31:48','2023-02-04 15:33:02',1010,'incident-new',NULL,1527,'Incident','I1000','Enable'),(1529,'2023-02-04 13:33:03','2023-02-04 15:33:12',1020,'incident-overview',NULL,1527,'Overview','O2000','Enable'),(1530,'2023-02-04 13:34:42','2023-02-04 15:33:21',1030,'sureboard2',NULL,1527,'Issueboard','I3000','Enable'),(1531,'2023-02-04 13:35:27','2023-02-04 15:33:36',1040,'change-request',NULL,1527,'Change Request','C4000','Enable'),(1532,'2023-02-04 13:36:01','2023-02-10 02:25:13',1050,'problem-creation',NULL,1527,'Problem Request','P5000','Enable'),(1533,'2023-02-04 13:55:32','2023-02-04 13:55:32',2000,'master','users',0,'Masters','M2000','Enable'),(1534,'2023-02-04 13:56:22','2023-02-04 15:34:07',2010,'Sr_priority2_t',NULL,1533,'Priority','P1000','Enable'),(1535,'2023-02-04 17:12:27','2023-02-04 17:12:27',2020,'Sr_urgency_t',NULL,1533,'Urgency','Su2000','Enable'),(1536,'2023-02-04 17:13:22','2023-02-04 17:13:22',2030,'Sr_impact2_t',NULL,1533,'Impact','Sm3000','Enable'),(1537,'2023-02-04 17:14:01','2023-02-04 17:14:01',2040,'Sr_category2_t',NULL,1533,'Category','Sc4000','Enable'),(1538,'2023-02-04 17:14:31','2023-02-04 17:14:31',2050,'Sr_State_t',NULL,1533,'State','S5000','Enable'),(1539,'2023-02-04 17:15:12','2023-02-09 13:25:27',2070,'Sr_customer_t',NULL,1533,'Customer','c7000','Enable'),(1540,'2023-02-04 17:16:23','2023-02-14 13:15:27',2060,'Sr_Contact_type_t',NULL,1533,'Contact','C6000','Enable'),(1541,'2023-02-04 17:17:22','2023-02-04 17:17:22',2080,'Sr_handler_t',NULL,1533,'Handler','H8000','Enable'),(1542,'2023-02-08 15:06:20','2023-02-08 15:06:20',4000,'admin','user',0,'Admin','se4000','Enable'),(1543,'2023-02-08 15:07:14','2023-03-01 05:51:41',4010,'sequence',NULL,1542,'Define Sequence','SE1000','Enable'),(1544,'2023-02-16 10:14:33','2023-02-16 10:14:33',4020,'bugtracker',NULL,1542,'Bug Tracker','B1000','Enable'),(1545,'2023-02-16 11:00:25','2023-02-16 11:00:25',4030,'datamanagemennt',NULL,1542,'Data Management','M3000','Enable'),(1550,'2023-03-01 06:10:35','2023-03-01 06:10:35',2090,'projects',NULL,1533,'Projects','P2000','Enable'),(1551,'2023-03-01 07:14:27','2023-03-01 07:14:27',4040,'applysequence',NULL,1542,'Apply Sequence','As3000','Enable'),(1553,'2023-04-18 14:12:24','2023-04-18 14:12:56',5000,'T1',NULL,1542,'T1','T1','Enable'); +/*!40000 ALTER TABLE `sec_menu_det` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `sec_type` +-- + +DROP TABLE IF EXISTS `sec_type`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `sec_type` ( + `id` int NOT NULL, + `description` varchar(255) DEFAULT NULL, + `name` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `sec_type` +-- + +LOCK TABLES `sec_type` WRITE; +/*!40000 ALTER TABLE `sec_type` DISABLE KEYS */; +/*!40000 ALTER TABLE `sec_type` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `sec_user_group` +-- + +DROP TABLE IF EXISTS `sec_user_group`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `sec_user_group` ( + `usr_grp` bigint NOT NULL, + `createby` varchar(255) DEFAULT NULL, + `createdate` datetime DEFAULT NULL, + `group_desc` varchar(255) DEFAULT NULL, + `group_level` bigint DEFAULT NULL, + `group_name` varchar(255) DEFAULT NULL, + `status` varchar(255) DEFAULT NULL, + `updateby` varchar(255) DEFAULT NULL, + `updatedate` datetime DEFAULT NULL, + PRIMARY KEY (`usr_grp`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `sec_user_group` +-- + +LOCK TABLES `sec_user_group` WRITE; +/*!40000 ALTER TABLE `sec_user_group` DISABLE KEYS */; +INSERT INTO `sec_user_group` VALUES (1,NULL,NULL,'add',30,'sysadmin','E',NULL,'2023-03-01 05:54:10'),(41,NULL,'2023-02-28 13:05:54','check',20,'users','Disable',NULL,'2023-02-28 13:30:14'); +/*!40000 ALTER TABLE `sec_user_group` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `sec_user_group_id` +-- + +DROP TABLE IF EXISTS `sec_user_group_id`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `sec_user_group_id` ( + `next_val` bigint DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `sec_user_group_id` +-- + +LOCK TABLES `sec_user_group_id` WRITE; +/*!40000 ALTER TABLE `sec_user_group_id` DISABLE KEYS */; +INSERT INTO `sec_user_group_id` VALUES (59),(59),(40),(40),(40),(40); +/*!40000 ALTER TABLE `sec_user_group_id` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `sec_user_sessions` +-- + +DROP TABLE IF EXISTS `sec_user_sessions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `sec_user_sessions` ( + `client_ip` varchar(255) NOT NULL, + `session_id` varchar(255) NOT NULL, + `user_id` bigint NOT NULL, + `last_access_date` datetime DEFAULT NULL, + PRIMARY KEY (`client_ip`,`session_id`,`user_id`), + KEY `FKp9jm02b501ugvjvfhas5sskfq` (`user_id`), + CONSTRAINT `FKp9jm02b501ugvjvfhas5sskfq` FOREIGN KEY (`user_id`) REFERENCES `sec_users` (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `sec_user_sessions` +-- + +LOCK TABLES `sec_user_sessions` WRITE; +/*!40000 ALTER TABLE `sec_user_sessions` DISABLE KEYS */; +INSERT INTO `sec_user_sessions` VALUES ('10.244.0.0','00DA27B83BD05496302A6FE89196D35D',10007304,'2023-02-09 04:16:22'),('10.244.0.0','01C6D31F93F0EB2008755455951BFCE3',10007304,'2023-02-09 04:24:40'),('10.244.0.0','01F3C40A4E4F679427F1A77E6CCA96BD',10007304,'2023-01-23 09:22:51'),('10.244.0.0','07955ABB453B8F78E48098ACB2CCA3B4',10007304,'2023-01-07 05:18:31'),('10.244.0.0','07FC7AA4A44DAF847DACD2ADF00E21D0',10007304,'2023-03-02 07:02:35'),('10.244.0.0','097910BB627E1B076F5EB532B6DF56F6',10007304,'2023-02-20 07:15:09'),('10.244.0.0','09A12677690FCDD1DFE3AE75B357D5FA',10007304,'2023-01-27 12:59:00'),('10.244.0.0','0B30FE6A7E3EC275FB942EF1AC77959C',10007304,'2023-02-27 04:31:59'),('10.244.0.0','0DBA11EAE43B527CFF0B2C8714E6FCBC',10007304,'2023-02-27 05:18:07'),('10.244.0.0','0E0DD3C09635D1512642C6A8DC777399',10007304,'2023-01-04 07:26:44'),('10.244.0.0','12634E52F1A03951CF7F714CA2CD35D0',10007304,'2022-12-22 12:47:54'),('10.244.0.0','126D331BC32A0B05D4E98809A69F1129',10007304,'2023-01-21 05:54:12'),('10.244.0.0','13267C7653BF669807FCC1553A250FCA',10007304,'2023-01-21 10:58:45'),('10.244.0.0','13791D67042F4E6D5D108828C313E4E2',10007304,'2023-02-03 06:43:41'),('10.244.0.0','14B7F54DD7D935EBBA23729BFF12D944',10007304,'2023-01-25 06:57:06'),('10.244.0.0','15718FEAD0B1C125C216D29DEB4BF59D',10007304,'2023-02-28 10:02:33'),('10.244.0.0','17187D32D460241B4B16E38281CD2663',10007304,'2023-02-04 11:08:48'),('10.244.0.0','18A08D81FE506EE81AF4C94CB30A6D3A',10007304,'2023-02-21 05:27:55'),('10.244.0.0','19C65A7A787E9D9A9087261B8A2DEFDE',10007304,'2023-02-16 05:11:11'),('10.244.0.0','1A5FC0C4AA02AF7AF3404165F1A93985',10007304,'2023-01-03 12:02:01'),('10.244.0.0','1CABFE5D7BB047B750A74A9C74F5CB44',10007304,'2023-01-25 07:01:51'),('10.244.0.0','1D02DCEA4AA242C714EC71F70741C07E',10007304,'2023-02-21 04:56:28'),('10.244.0.0','1D6B0DB624E86D9FD70507F6189569AD',10007304,'2023-02-21 05:32:41'),('10.244.0.0','1E328CEE4E5A777173F8A432AA25364F',10007304,'2023-02-14 10:51:58'),('10.244.0.0','1E3E9C55C6C6D5AAC309E13C30B958C5',10007304,'2022-12-24 13:19:10'),('10.244.0.0','1E4F2D8802BDFABCF9D3B41AB1BF3D8E',10007304,'2023-03-02 10:14:13'),('10.244.0.0','1EDADDB590C0C98FFB9362ACAFDD0EC8',10007304,'2023-02-28 08:28:39'),('10.244.0.0','1EE6204F652E211A35B560813E1AFDF5',10007304,'2023-02-13 05:38:28'),('10.244.0.0','1F4809657FAC225E67C10488887FF026',10007304,'2023-01-25 08:42:39'),('10.244.0.0','212824F8CFE4C79EEC23414DD60BDB1A',10007304,'2023-02-04 11:07:49'),('10.244.0.0','2285C8A80B97A9CEB33BA0E83AAE7CDE',10007304,'2023-02-28 05:39:09'),('10.244.0.0','23D17570F776EBE86B3E28ED24A2E2F0',10007304,'2022-12-22 05:37:54'),('10.244.0.0','258BC76ACED65982DB38FFA3E5607665',10007304,'2023-01-27 04:23:24'),('10.244.0.0','26A0AC8653F477F1A82841DFFAD45E60',10007304,'2023-02-08 04:41:02'),('10.244.0.0','272AA522FF452893D3469597326AFA21',10007304,'2023-02-11 10:57:48'),('10.244.0.0','279523463C4F47198956861731BE1886',10007304,'2023-03-02 07:17:25'),('10.244.0.0','2A500041815A443624570903FDC1B703',10007304,'2023-01-05 11:28:15'),('10.244.0.0','2A5256B60B473E59C7F3033185D6BCFE',10007304,'2023-01-30 07:28:49'),('10.244.0.0','2BAA723E999C81FDC312C1478EE23B64',10007304,'2022-12-28 17:42:55'),('10.244.0.0','2E06BF822B35B70B869D34A2591FEA19',10007304,'2023-02-13 06:09:41'),('10.244.0.0','30D3D3F09BBB4C24FE812BE091CF28C7',10007304,'2023-02-08 13:09:58'),('10.244.0.0','33D439C74F9C34631C7C28E6712D901A',10007304,'2023-02-06 06:49:38'),('10.244.0.0','34029224A1742E10AEEEE5D8CC33594E',10007304,'2023-02-13 07:55:18'),('10.244.0.0','35F492D2BB13889531ABDDFDF0A367C3',10007304,'2022-12-24 06:14:28'),('10.244.0.0','36FB6C688F068D09D1EFB99CABE5412A',10007304,'2023-01-27 06:11:46'),('10.244.0.0','36FFDC97570687C4ECF39A89E6F11A0D',10007304,'2023-01-05 05:10:46'),('10.244.0.0','37975FDB03DDC18FE039CFF74059D971',10007304,'2023-02-13 06:20:48'),('10.244.0.0','37CDA8C88836B0A96D1D5524B5B43961',10007304,'2023-02-14 04:38:06'),('10.244.0.0','3842C1EB2E93DCEB1AF928CDCDD79AB4',10007304,'2023-02-24 04:51:48'),('10.244.0.0','3898BA12B0A677023CA6CE3E9FFCE1F8',10007304,'2023-03-02 07:17:41'),('10.244.0.0','3965E8234EC00188B218C35C2778C6CB',10007304,'2023-02-09 17:26:12'),('10.244.0.0','3A3B65EC3B497E489981EF9C510A77B9',10007304,'2023-02-04 06:17:28'),('10.244.0.0','3A4650E064985A33620EA4B2B17B05B3',10007304,'2023-01-10 13:17:16'),('10.244.0.0','3AB4A6AA0A043A4632D87ED0E3249160',10007304,'2023-02-16 04:58:21'),('10.244.0.0','3B23C62B9E4BA76DC713F617EBB4594C',10007304,'2023-02-15 04:52:29'),('10.244.0.0','3B74E96FA5D19EB3014EFCCE8BE8F666',10007304,'2023-02-27 04:31:23'),('10.244.0.0','3BB07C01384C27442F72D47E3CEC5A12',10007304,'2023-02-22 04:24:47'),('10.244.0.0','3C3E6803B1BA5CC39F672D5B0D857D74',10007304,'2023-03-01 04:20:09'),('10.244.0.0','3DFEFA1D21599FE476F2E1BA59BD9EAA',10007304,'2023-02-13 06:29:53'),('10.244.0.0','3E004B5F590EA457404AC52B50210A29',10007304,'2023-01-03 04:19:31'),('10.244.0.0','402EA30AA9A4B5D9E2888DF4D9327301',10007304,'2023-01-28 07:51:35'),('10.244.0.0','43371F4FDB08897CC0BB2A090A126FB3',10007304,'2023-01-07 12:13:33'),('10.244.0.0','471A11977BA434B3D311A51FA7F68B3C',10007304,'2023-02-24 04:17:58'),('10.244.0.0','4759C7C3DF1A23F94A55BA7B40428838',10007304,'2023-02-13 06:05:37'),('10.244.0.0','47A01A3E14B7F77AAFDF67254C63493C',10007304,'2023-02-06 04:07:39'),('10.244.0.0','4CB13B5C9B2F9AE6E9A2A0198ECE5DBE',10007304,'2023-02-21 06:51:30'),('10.244.0.0','4DCD20AD816D9080E00ECB163B688E4D',10007304,'2023-01-04 06:59:36'),('10.244.0.0','4DD3B7DFA118D5076A5465F9BBA2AF55',10007304,'2023-02-09 17:21:56'),('10.244.0.0','4F020C44EBB668BA92176C297D8DF270',10007304,'2023-01-10 05:08:07'),('10.244.0.0','501FFB8654751FB7B0F5E11DD7793C39',10007304,'2022-12-23 12:25:25'),('10.244.0.0','523FC707BA0646DDB84DA790EF87820A',10007304,'2023-01-23 08:30:22'),('10.244.0.0','54268D6CC5747B55C4CBBAADA10F0AA0',10007304,'2023-02-28 08:53:42'),('10.244.0.0','54895473F03C143BF00F72ACAD7A94D2',10007304,'2023-02-27 04:49:34'),('10.244.0.0','55586473AB9CF8B2556151723E51BBB7',10007304,'2023-02-13 06:02:14'),('10.244.0.0','560BD1E9B94656C1440FB876359F6C3F',10007304,'2023-02-18 04:39:11'),('10.244.0.0','56695A8A4F6857C98F3516B229746F7C',10007304,'2023-02-13 09:44:54'),('10.244.0.0','56A9680F7457F59FFB32B8FF0770AD2A',10007304,'2023-02-21 05:28:43'),('10.244.0.0','58CB39E04E393D8151F0582571D22D33',10007304,'2022-12-21 04:14:05'),('10.244.0.0','58E7FD348EEEC8D77FCAE7352FE04497',10007304,'2023-03-01 07:13:28'),('10.244.0.0','5BD71E188A9F0EC43A6CC43867ACB6D4',10007304,'2023-02-22 13:17:46'),('10.244.0.0','5BEE5E86DD9121186A1CA43D835C8854',10007304,'2023-02-21 05:32:57'),('10.244.0.0','5C3F8B0AFEE5B1579156CE8A9F4EEED8',10007304,'2023-02-14 05:10:45'),('10.244.0.0','5D0CD0B13B750B93479C35DFFBACCD03',10007304,'2023-02-08 01:03:29'),('10.244.0.0','5D4D1DEF340F3CDFF250163E7D9D4D5D',10007304,'2023-02-27 07:46:31'),('10.244.0.0','5EDB2B24E90C72C9CE0899813FB781F5',10007304,'2023-01-21 11:19:22'),('10.244.0.0','61C70093706116D8A9DEA7868A06D205',10007304,'2023-01-24 10:47:00'),('10.244.0.0','61E97DE6029A46282C16A904E0958FCD',10007304,'2023-02-12 07:39:29'),('10.244.0.0','6206A103E4BCB92C80EE955A2A169AB8',10007304,'2023-02-17 04:05:40'),('10.244.0.0','646C7D28A4C367B6D9364E1D5058982C',10007304,'2023-02-03 06:47:25'),('10.244.0.0','66972D7E2B88E5FCF073FFA7F56FCEBC',10007304,'2023-01-27 17:49:07'),('10.244.0.0','66FC988C4F90DF4C6195623F8B1392CF',10007304,'2023-01-21 12:53:16'),('10.244.0.0','68FB6DBD7EB59BAFF481755C89790B9E',10007304,'2023-02-27 06:29:35'),('10.244.0.0','69DF3045DFFD449DF0078036A479C53C',10007304,'2023-01-14 08:41:42'),('10.244.0.0','6A4799F6727C0F9585EDCEEED0E5BBFE',10007304,'2023-03-01 06:09:36'),('10.244.0.0','6A56F1D01FEE7EF57E5FD9234852F58C',10007304,'2023-01-25 14:14:35'),('10.244.0.0','6A84F5A35FDD924700894D5158D7727C',10007304,'2023-02-14 05:17:07'),('10.244.0.0','6BA6DBD1F2756B528971D787FF98497E',10007304,'2022-12-24 13:05:42'),('10.244.0.0','6BE3B9843AE8939CB8805D76DBDB1794',10007304,'2023-02-28 05:03:05'),('10.244.0.0','6C3FFD6284E5CA1BCCBBB1BAA504C96A',10007304,'2023-02-21 05:30:04'),('10.244.0.0','6D6238A7E59F2A82AF97C66E9F95BE84',10007304,'2023-01-27 12:55:03'),('10.244.0.0','71AF7210258E6544370513A03511386E',10007304,'2023-02-21 06:51:49'),('10.244.0.0','71F9485BB29A4D34C4D581C81F99273B',10007304,'2023-01-08 14:51:38'),('10.244.0.0','72E42A63C941DA3E07645CDC6D06FE69',10007304,'2023-03-02 06:24:33'),('10.244.0.0','7315B7B1A785F187975C91B20FD69239',10007304,'2023-01-03 12:01:12'),('10.244.0.0','73D73EADFBC46BA5D8188093E36F0D80',10007304,'2023-01-23 08:24:58'),('10.244.0.0','7501BB02CC2418F7AD8D60F6A2EE1AA8',10007304,'2022-12-22 10:34:35'),('10.244.0.0','760A153BFAB708C933325E89F43869E5',10007304,'2023-01-04 07:27:00'),('10.244.0.0','77B3917F3CDD9F6F73423FBECA518517',10007304,'2023-02-09 17:09:56'),('10.244.0.0','77EA291DFDDE1E4A07F8AA1C193E9527',10007304,'2023-02-28 03:53:34'),('10.244.0.0','78FD1129C57998C3C775F631CADEC55B',10007304,'2023-01-10 04:07:15'),('10.244.0.0','78FDDE13756DAFB6122CFB03CD50A585',10007304,'2023-02-15 12:25:41'),('10.244.0.0','799BD8495F27A7D2CB88CC7D205BA651',10007304,'2023-01-03 12:01:12'),('10.244.0.0','799EEAC341FD43E707AFF6CDD4170C24',10007304,'2022-12-24 04:59:52'),('10.244.0.0','7CF3C635864A03F4672021708D3012F5',10007304,'2023-02-21 05:36:47'),('10.244.0.0','7D9F6042AB3928D88F613C4B544940F0',10007304,'2023-01-03 12:01:12'),('10.244.0.0','7F894E1B1FEE46ED5D66F24FA06E9955',10007304,'2023-01-19 04:35:07'),('10.244.0.0','811EA958BEA61D1D8C70DE8EBDD7E376',10007304,'2023-02-14 04:39:06'),('10.244.0.0','8277CBCB52C8819CE06B5FAF9ACF5A97',10007304,'2023-01-27 12:43:40'),('10.244.0.0','82F7FF625EBDAA710A510C1287928A2C',10007304,'2023-01-25 11:09:25'),('10.244.0.0','84777DBF129C0B72A379AE0C1A99CA51',10007304,'2023-02-13 06:22:44'),('10.244.0.0','84FEB5098B8AEDA8EAA18F8455AE59C8',10007304,'2023-03-02 05:07:37'),('10.244.0.0','854B2C436B2E9A67366845868B43AC63',10007304,'2023-02-14 04:53:32'),('10.244.0.0','876DA44F02E24385E6FB9911D02EC163',10007304,'2023-02-09 04:04:36'),('10.244.0.0','8BBE112CF13094F10BF0DBE719C39DF3',10007304,'2023-01-04 11:52:06'),('10.244.0.0','8BEAD1A7D4B9CB41A25C1AD4EFD1AF8B',10007304,'2023-01-14 08:41:42'),('10.244.0.0','8CF1FC18A2A4BA0D50284324F89D7A9B',10007304,'2023-02-10 02:02:21'),('10.244.0.0','8DDEEFB8E944D41AD19B144159EE618B',10007304,'2023-02-10 05:22:33'),('10.244.0.0','8E9DF28E4B77308468339628877B7EB6',10007304,'2023-01-10 08:18:16'),('10.244.0.0','902A3E38FF7182E341A753DEEC754291',10007304,'2023-02-08 04:10:45'),('10.244.0.0','913BA1924A9ADF6B9486A1B8C2781411',10007304,'2023-02-14 06:35:58'),('10.244.0.0','93F6ABF82E797F5D3D6568AFB7E71421',10007304,'2022-12-23 23:49:44'),('10.244.0.0','9608D1C9135F9E64561AE33A8DA715DC',10007304,'2023-01-27 12:56:42'),('10.244.0.0','9987E0780DE93F53D253F30BCF86F644',10007304,'2023-02-17 04:29:07'),('10.244.0.0','9993CB6F762A60E2F3C40AE6DDC529E1',10007304,'2022-12-22 13:23:56'),('10.244.0.0','9C6B6804449A8A1C26F3CE4FA97D3BB6',10007304,'2023-02-08 09:51:44'),('10.244.0.0','A134FA3FB58424876A3E742554D6E7A8',10007304,'2023-01-03 04:16:02'),('10.244.0.0','A3DDB625C8B724A36D0AD77870B190C6',10007304,'2023-01-04 06:09:32'),('10.244.0.0','A5069D5E2C4519620587FD027F89DB9F',10007304,'2023-02-23 09:12:42'),('10.244.0.0','A53DE30567FD2C90F686E7F58035A7EC',10007304,'2023-02-21 04:53:05'),('10.244.0.0','A5BDC4E8CC75700FF31D309A58CC0DED',10007304,'2023-02-13 06:41:01'),('10.244.0.0','A77B5C7DDECF0B19DE83B0413FAF3322',10007304,'2023-02-18 04:11:46'),('10.244.0.0','A7A366FC110549CEC5C2B88AF363553C',10007304,'2023-02-21 04:27:37'),('10.244.0.0','A8429BEF52258313017BA44C9A16F29C',10007304,'2022-12-23 12:40:03'),('10.244.0.0','A94A726EF1B8A296A01F56CF75E1F338',10007304,'2023-01-23 13:24:22'),('10.244.0.0','AA7B2229CA1CC433B23856E17DA02757',10007304,'2023-02-07 15:44:12'),('10.244.0.0','AB05B3A0AE60C3C57A59C04761A2DB08',10007304,'2023-02-09 03:45:02'),('10.244.0.0','ABD29712288E918E0F73967E12FCFD75',10007304,'2023-02-13 06:29:14'),('10.244.0.0','ACE38356883EF7F3781F3ACE2C5E9F8A',10007304,'2023-02-17 04:57:46'),('10.244.0.0','AD00EAE5325CC835C02B9177B58A4C53',10007304,'2023-01-08 15:12:44'),('10.244.0.0','AEF14C4EA01060B4AD4A92CD34BDB5E8',10007304,'2023-02-16 04:52:24'),('10.244.0.0','B07163F46174BF28CA3B9361B9A0B695',10007304,'2023-02-16 04:52:24'),('10.244.0.0','B07AA38B4FC4ADA53A9A3063E8776061',10007304,'2023-02-27 11:38:10'),('10.244.0.0','B2661376ED722B8F0AE6981FC62B920D',10007304,'2023-02-27 05:20:57'),('10.244.0.0','B28BAFF203AC98D638A84CB514EF25B6',10007304,'2023-03-01 05:43:28'),('10.244.0.0','B335709F727CE4A6AC0D6E7703FAA7A5',10007304,'2023-02-14 07:23:40'),('10.244.0.0','B474C69E7AFE4CA66FC2CF70821AEBFD',10007304,'2023-01-04 07:34:06'),('10.244.0.0','B6FD5A61A873CA37F3C4E4A72EF38E5D',10007304,'2023-02-13 07:34:35'),('10.244.0.0','B7ECF13F7EDA63C7F29803BA6A6DF737',10007304,'2023-01-14 08:41:42'),('10.244.0.0','B89AAA33253A6622BC9C15A69776A4D1',10007304,'2022-12-27 14:46:46'),('10.244.0.0','BA87017E2236D5A01B2AE1CF21823841',10007304,'2023-01-25 11:55:03'),('10.244.0.0','BADB021BDDB3347A2B531CF09647D4C7',10007304,'2023-01-27 05:16:28'),('10.244.0.0','BE41CC9EF11DCF26FE99E3A48850C263',10007304,'2023-01-02 14:37:43'),('10.244.0.0','C0A699F8F97A89E8D14ECFD819E575C2',10007304,'2023-02-14 07:49:59'),('10.244.0.0','C1D1B5338C2B4EF6D541922CA49567B4',10007304,'2022-12-22 14:27:21'),('10.244.0.0','C24665C67F65F629B2538948DFB04A45',10007304,'2023-02-13 06:08:39'),('10.244.0.0','C2563744D040F42797D7A0D3C713E45D',10007304,'2023-02-27 09:22:39'),('10.244.0.0','C2792C7FE0934BA1183C8A086D6694A2',10007304,'2023-01-02 07:19:12'),('10.244.0.0','C3A1B31C8E479056C9A89175AB71E17D',10007304,'2023-02-13 05:37:36'),('10.244.0.0','C4C4AC6CB5020405A4ECCB1293861E5C',10007304,'2023-01-09 06:14:16'),('10.244.0.0','C666E9A2815908D94A6B7ABCA3A3D094',10007304,'2023-02-22 05:10:04'),('10.244.0.0','C81980E45C04913E3BE28984A1D3FE8A',10007304,'2023-01-02 05:34:12'),('10.244.0.0','CD8D3F9E091565DC09EC05BF29A16F99',10007304,'2022-12-24 13:18:04'),('10.244.0.0','CE63A8BDE30D9C01ECEED1E6237B7D4E',10007304,'2023-01-04 05:40:04'),('10.244.0.0','D0F9C4398FF7905306C54481688EA0DA',10007304,'2023-02-13 12:15:57'),('10.244.0.0','D1079CC20C1BAC5F070AD2215DFD2DB5',10007304,'2023-02-15 05:03:11'),('10.244.0.0','D177734BD962A6E400A36113AAE2F42D',10007304,'2023-02-08 05:17:37'),('10.244.0.0','D2BBA6868648D260C740C55E47645ABC',10007304,'2023-01-23 06:32:27'),('10.244.0.0','D2CF30546FE0991C247DEB86E1982D03',10007304,'2023-02-13 14:49:25'),('10.244.0.0','D684978E7B83BEDC4D11AFF98B1D9C8A',10007304,'2023-02-04 05:24:23'),('10.244.0.0','D8929ABB4E88E83466D9F1E4E8E86965',10007304,'2023-02-16 16:49:18'),('10.244.0.0','D9C532D41CAC8A577DD05E64ADAAC499',10007304,'2023-02-13 06:22:14'),('10.244.0.0','DDB4281EC0FAE547E339FD58E2076B0C',10007304,'2023-01-04 05:42:21'),('10.244.0.0','DE23D1F07594A6066B3C377FE0DFAB4B',10007304,'2023-02-04 04:46:58'),('10.244.0.0','E092CBF361EF9F26DD676FFB9A79A5AE',10007304,'2023-02-22 13:20:24'),('10.244.0.0','E2BEBBA798227474ADF30E669E37AD64',10007304,'2023-02-23 03:39:22'),('10.244.0.0','E350BC0431688307A6530EFD33F9326C',10007304,'2023-02-20 04:33:01'),('10.244.0.0','E42CCE430D000A1DE8F05BF479D14318',10007304,'2023-02-03 06:56:35'),('10.244.0.0','E4EE2915CDF4192B34B6B92FC9DC08F5',10007304,'2023-02-28 13:24:15'),('10.244.0.0','E548267B1E509DFE2221173D41A1C672',10007304,'2023-01-25 13:32:30'),('10.244.0.0','E54F6B8DDF6070E261C1EF13801166A9',10007304,'2023-01-25 12:44:33'),('10.244.0.0','E9B37EFD5BF350E3C60D7C91CF496714',10007304,'2023-02-11 04:46:52'),('10.244.0.0','E9B843AD4FCF9DF59D2C4D53C1A9B0E0',10007304,'2023-02-11 09:37:30'),('10.244.0.0','EAA50AAC424E61A849DE91406E00DAF6',10007304,'2023-02-03 11:19:24'),('10.244.0.0','EAACE21233011ECF7E0F3A220007E66D',10007304,'2023-01-23 11:44:38'),('10.244.0.0','EC0252212C762F51DCDF876F991B45BF',10007304,'2023-02-15 15:54:47'),('10.244.0.0','EC208817C1F63017C8A23D6EF0505DD5',10007304,'2023-02-13 09:46:59'),('10.244.0.0','EE18561214C45F0604FDF9CCE7766634',10007304,'2023-02-03 05:07:27'),('10.244.0.0','EEDA15E5A19F739D0BA2EA07D7CCC077',10007304,'2023-02-25 04:40:09'),('10.244.0.0','EEF2099646C6D98D70137154888E8A38',10007304,'2023-02-15 05:03:13'),('10.244.0.0','EF7BF24AB5E769016AA4AF821B1B7673',10007304,'2023-02-11 05:33:45'),('10.244.0.0','EFD997DF4EE142387AEEB458E79B8516',10007304,'2023-02-21 04:35:11'),('10.244.0.0','F0804439A63A5C2BEF04A94182895FE6',10007304,'2023-03-02 10:15:12'),('10.244.0.0','F0C8347B5DF2CD52B5799D0569061816',10007304,'2022-12-30 06:44:06'),('10.244.0.0','F1D3C48D9660713F3764BB905FDBBC98',10007304,'2023-02-04 10:37:39'),('10.244.0.0','F227C17DF43F0124F2748230E68E67FD',10007304,'2023-02-13 07:08:04'),('10.244.0.0','F2EEC2D9DA998940D77EB69A5E87C908',10007304,'2023-02-28 09:48:15'),('10.244.0.0','F3CCB262A1704720C7B8B9D2D94BACA8',10007304,'2023-02-13 06:37:49'),('10.244.0.0','F41DA4DB177B1EE246F3C453DC6A0791',10007304,'2023-02-13 11:13:31'),('10.244.0.0','F4BA334A7AF4630FB9356F53E57F7FCC',10007304,'2023-02-13 09:52:42'),('10.244.0.0','F6C81285AA13649FD761F0EA5673F2B3',10007304,'2023-02-16 05:10:04'),('10.244.0.0','F81FFED9E985649C40B20E6543C43F1C',10007304,'2023-02-04 11:13:32'),('10.244.0.0','F98C543849C8BA1E98ADFAFD416BE1D9',10007304,'2023-01-14 08:41:42'),('10.244.0.0','F9E60AE8BF7EA7C21B23E241A576E32C',10007304,'2023-02-27 05:18:07'),('10.244.0.0','FB16B0BBEACAC5E76353B97B39F250C0',10007304,'2023-02-14 11:47:13'),('10.244.0.0','FD69362A16A61A67603B7BDC056E6F80',10007304,'2023-02-08 05:15:18'),('10.244.0.0','FE699CE2CC8753BCCF563A84E23B55D6',10007304,'2023-03-01 09:09:19'),('10.244.0.0','FE8CF28A5E6F241B1BFFB6A2C9C2BEA7',10007304,'2023-02-14 06:11:44'),('10.244.0.0','FF8B6761168A05DF259DA193EAA8C7CB',10007304,'2023-03-02 04:26:04'),('103.109.14.30','0B2D054741015E6EB3F5C6331F11C6A9',10007304,'2023-04-22 07:28:52'),('103.163.91.7','72CA624DE5A0CEE50983F4D9928649D1',10007304,'2023-04-20 12:31:25'),('103.186.133.3','4C615BA72820C1B7295A536D5262B321',10007304,'2023-04-22 07:44:18'),('103.186.133.3','5EAD80069AE42922075454080D94F4B5',10007304,'2023-04-22 07:07:32'),('152.57.196.42','4031CEAA2E5A36187D3352784FE74142',10007304,'2023-04-14 06:22:39'),('157.35.16.232','404E1FEA07E36531024F5D020B7B82CA',10007304,'2023-04-18 08:21:40'),('157.35.16.232','4C6C681441680480FC60A0E31DE20305',10007304,'2023-04-18 13:44:47'),('157.35.16.232','EB3F8A26937A79A8C68D9A6BAEF9ACC1',10007304,'2023-04-18 13:51:51'),('157.35.16.232','F4AEFEA5BE7F8EC4593086BF0D73498A',10007304,'2023-04-18 08:01:52'),('157.35.16.232','FB78E042E69B1C79FAB689A186637C10',10007304,'2023-04-18 06:58:47'),('157.35.16.232','FE55C479CB1EE1E032C99E28384539E1',10007304,'2023-04-18 14:10:04'),('157.35.17.179','21CF61F4CCDFFA41B187E2784749C814',10007304,'2023-04-17 08:16:14'),('157.35.5.211','01A9B428C185ED8318C8D6CF1B6A1F54',10007304,'2023-04-15 07:18:46'),('157.35.6.79','0079CECC8A5F7755B8E1369AD62FB619',10007304,'2023-04-14 06:12:26'),('157.35.6.79','2B29B14BDD261314EA101C45F24B9FB0',10007304,'2023-04-14 06:12:26'),('157.35.6.79','39527693B3686F32C94AB5931E72662B',10007304,'2023-04-14 06:09:34'),('157.35.6.79','55D89E92AB6FA71BC916389C14B3F008',10007304,'2023-04-14 06:12:26'),('157.35.6.79','5A3F874FE8B1781E0F856566F060FCF0',10007304,'2023-04-14 06:09:37'),('157.35.6.79','5A7DDA1B002A0BEDF208CF89FFFD9CCE',10007304,'2023-04-14 06:09:37'),('157.35.6.79','700DA6AFDE088173B9E01FA57748D0CF',10007304,'2023-04-14 06:09:29'),('157.35.6.79','7AEDBD0981F29FE9B102003E441DCE21',10007304,'2023-04-14 06:12:27'),('157.35.6.79','CC25F074DE733339D6B8B6DC2D927000',10007304,'2023-04-14 06:12:27'),('157.35.6.79','DF03EFA873C7D33E47CDACB0B61812BC',10007304,'2023-04-14 06:12:27'),('157.35.6.79','E887593374296C8B093120C1FFFEC0F7',10007304,'2023-04-14 06:12:27'),('157.42.4.245','66FB1FB5EF06BE61F9F8B7E9EC9689CE',10007304,'2023-04-22 07:57:43'),('157.42.4.245','73DFC7EC556898CE17E7D952CF6ADBED',10007304,'2023-04-22 07:33:50'),('157.42.4.245','978B1F21F675C97FCB1634E3C41A11C5',10007304,'2023-04-22 06:41:55'),('157.42.4.245','CCDCCA17978851A526436BD3B438BA6B',10007304,'2023-04-22 07:06:57'),('192.168.0.144','3721ADE292F95EF01F704DAE502EA8E8',10007312,'2023-02-07 18:13:58'),('192.168.0.144','72F89E95E1C8AE30007C6703AFDB671D',10007312,'2023-02-07 17:59:26'),('192.168.1.10','0432F219EDEA8DE4FBF670BCBE240AA2',10007304,'2023-03-01 10:17:52'),('192.168.1.10','3694A02E63DD89F04886DAFA13FFD782',10007304,'2023-03-03 11:00:10'),('192.168.1.10','3904D4F6635C25829DDA5339C34C0699',10007304,'2023-02-28 14:53:05'),('192.168.1.10','45710FFE0461613D7B18B9439F1F46FA',10007304,'2023-02-28 16:00:36'),('192.168.1.10','4ACCD9874820685DFB7FD3B79058C4D6',10007304,'2023-03-03 11:18:37'),('192.168.1.10','547F05D45F211BF76D054103F2C45BA4',10007304,'2023-03-01 15:46:51'),('192.168.1.10','6ACD10FE3498B328F02B05ED51EBCC82',10007304,'2023-02-28 13:53:32'),('192.168.1.10','6B12314ADA2E1ABAF3E06D3A5AD90CBB',10007304,'2023-03-01 15:35:13'),('192.168.1.10','77FD85790E4B22E0BAC4195D56FCC0A9',10007304,'2023-03-02 14:15:20'),('192.168.1.10','7A91F0867B149ED7B4D91598D8519D64',10007304,'2023-03-01 15:14:03'),('192.168.1.10','7FEC693935870A2906B7D2EAB783DAC8',10007304,'2023-03-02 12:01:41'),('192.168.1.10','AD7BEF791842957239E3994A26DA9F1C',10007304,'2023-03-01 11:07:55'),('192.168.1.10','B154ADE48478EFDB7CABD40D87832F34',10007304,'2023-02-28 17:02:49'),('192.168.1.10','C0361FC4CE6D8B37BB025259006B4122',10007304,'2023-03-02 17:14:20'),('192.168.1.10','C292E38A7DA0113CECCBD949C8B0F276',10007304,'2023-03-01 10:51:45'),('192.168.1.10','C88E1BA9E8463C20550E864701DBC6D4',10007304,'2023-03-01 15:14:03'),('192.168.1.10','CD80BE9D36421970CD2453B35CE44066',10007304,'2023-03-02 10:41:59'),('192.168.1.10','E6945D0DF6FA3790807AE697693B1705',10007304,'2023-02-28 15:56:36'),('192.168.1.10','EACED29FA5F8D85D20C760FFAF69EF68',10007304,'2023-02-28 15:55:08'),('192.168.1.10','F09C7C6CE426E815089A8AED1745082A',10007304,'2023-03-02 10:31:46'),('192.168.1.106','1885D0C5711F1B27F061F8DD1BA48B8D',10007304,'2023-02-14 10:53:32'),('192.168.1.106','5A339547655DAA4AB6E95AF13535DDC2',10007304,'2023-02-17 11:05:18'),('192.168.1.106','5E7F4AEFB700B2FC25D8F7EE16A1178B',10007304,'2023-01-12 15:47:32'),('192.168.1.106','7AA1F3309DA2B440AF01C2B0FD74975B',10007304,'2023-02-17 14:42:49'),('192.168.1.106','879D92C98D3FF16AFAE2D00B615E5F64',10007304,'2023-01-12 15:17:10'),('192.168.1.106','A93CDC6496BEA1DC03C49294916EA202',10007304,'2023-01-12 18:23:22'),('192.168.1.106','B085E8C6CCFC7441E12DE0CA13EDC833',10007304,'2023-02-14 15:59:18'),('192.168.1.106','B79F8FF2F8F3534B9E30F0A7F8A8F7E9',10007304,'2023-02-18 10:22:57'),('192.168.1.106','BF4F3F00B48C9CCC976073C453BDF4D6',10007304,'2023-02-16 10:48:28'),('192.168.1.106','E8D0FEE6C7D2A5CB885A145561B374D9',10007304,'2023-02-16 10:01:21'),('192.168.1.106','F139D3B4FA84E80906D04C528214C40B',10007304,'2023-02-16 14:36:42'),('192.168.1.106','FE7B95C3AB22BEB8021864DEAECABB73',10007304,'2023-02-22 16:24:42'),('192.168.1.107','44FACF8F4C49CC12EC4FF6F7E8ED8673',10007304,'2023-03-02 16:10:19'),('192.168.1.107','661B9B9784B338581EE7FA6BF2C04A3D',10007304,'2023-02-11 17:08:50'),('192.168.1.107','878F00B4C6353A1C6C7783F48C46F307',10007304,'2023-02-11 17:08:50'),('192.168.1.107','8CBEB8F4BC2483531EF043ACB1C5C348',10007304,'2023-02-11 10:28:36'),('192.168.1.107','98C7E02C0E250A837AE656B9D5AECAB2',10007304,'2023-02-11 17:27:15'),('192.168.1.107','D019E8785A4CD8FFAD709ACEF5A3668F',10007304,'2023-02-11 16:32:40'),('192.168.1.108','19545C3906C56DFCC91A2B7D8BFF76A2',10007304,'2023-01-19 10:09:48'),('192.168.1.108','252AC40AEE5595B469D736F2E704193E',10007304,'2023-01-16 15:16:09'),('192.168.1.108','3E62F2C1586A3165307561C923792A39',10007304,'2023-01-14 16:27:01'),('192.168.1.108','410A38A791EFA960EA9411DD149BD905',10007304,'2023-01-16 15:15:18'),('192.168.1.108','58B22ECDB9B512C09AB6230EB3A1C96C',10007304,'2023-01-17 14:51:08'),('192.168.1.108','74523B280A64EAF6F7D67B381950692A',10007304,'2023-01-14 15:21:23'),('192.168.1.108','8A8907341156C3BA9C111586FEB5F835',10007304,'2023-01-17 14:52:10'),('192.168.1.108','92AF1E6567B72BC485785F4DECD82A38',10007304,'2023-01-16 12:35:43'),('192.168.1.108','92F55BE2F0CB3DB260FD5DED2F3D8BA1',10007304,'2023-01-16 09:55:13'),('192.168.1.108','B1D5413096DE13A3F2C35BC298685D59',10007304,'2023-01-17 10:00:43'),('192.168.1.108','C4DCD456BA49A5C3E89D8BC2BC5A5AD8',10007304,'2023-01-16 15:10:16'),('192.168.1.108','C5172A5659D45DC0DFB68781E0A09DAD',10007304,'2023-01-17 14:09:51'),('192.168.1.108','E786264659F968FA8E819CFAF9234F5D',10007304,'2023-01-20 10:01:53'),('192.168.1.108','FBE68586E2699443EF160A733A98BE70',10007304,'2023-01-17 14:53:11'),('192.168.1.109','79F71882DB4AF1CABADC1F1D576EB6E9',10007304,'2022-12-17 11:22:52'),('192.168.1.109','AF01DB17AF291E4B908C05FDF0620B90',10007304,'2022-12-17 11:24:53'),('192.168.1.109','CE170F441DC76C7DB7D510196F965D3A',10007304,'2022-12-17 11:23:14'),('192.168.1.109','F04032636102C5A97BBF77ED41C7AE0D',10007304,'2022-12-17 11:33:31'),('192.168.1.109','F07D1C463B1AB73F9D2BDFB976A1B02F',10007304,'2022-12-17 17:21:28'),('192.168.1.109','FACBCE645E987F370213258A0E46C9A3',10007304,'2022-12-17 10:44:50'),('192.168.1.111','01AAA82DB694DCF6BB07919F005741C8',10007312,'2023-02-03 13:03:02'),('192.168.1.111','09B11EAA4CC62CD333148C6ACBC6B2C5',10007312,'2023-02-02 16:56:10'),('192.168.1.111','109B76E9D0528C5327C9AD2D983319EE',10007312,'2023-02-02 14:31:24'),('192.168.1.111','22633697879A9F5812E6C98F571DC03A',10007312,'2023-02-01 17:56:03'),('192.168.1.111','24D98474F9C2AA04D3895F7082C8094F',10007312,'2023-01-28 11:01:54'),('192.168.1.111','2B3E778C1F3BBE665DAAB386EF21797C',10007312,'2023-01-25 11:16:54'),('192.168.1.111','2F1291CA08AAFF4F6459CACA2078F6B8',10007312,'2023-02-02 15:57:17'),('192.168.1.111','3336E8610CC478485E9F73CCEB1E0A74',10007312,'2023-01-31 18:37:29'),('192.168.1.111','3B7393055AFE7B91A0595F0B303295C1',10007312,'2023-01-27 10:39:10'),('192.168.1.111','3DBC9D727926F672C705FDB050EED5B1',10007312,'2023-01-31 14:25:36'),('192.168.1.111','3FF7C9179EE9AE1CF1EB69D63B97CB18',10007312,'2023-02-02 11:27:13'),('192.168.1.111','473D44AA3D963741A7C4824CAE57D934',10007312,'2023-02-03 12:31:39'),('192.168.1.111','4B5083B1739B735C5E9A4A0C43D93012',10007312,'2023-01-25 19:32:20'),('192.168.1.111','501B5DCD5578E57596442B5A1567239F',10007312,'2023-01-25 12:03:21'),('192.168.1.111','5710639BE81C415CB75DF1DC6D7A020C',10007312,'2023-01-27 10:37:01'),('192.168.1.111','5D9CBA6241157E5B90A68C8122CEEF06',10007312,'2023-01-27 16:55:56'),('192.168.1.111','5DD445FFDD4142B9AD5C3BF88471A5A2',10007312,'2023-01-25 10:13:48'),('192.168.1.111','5DFCF9DA73A3FB6BC1E4E2FCB826E37C',10007312,'2023-01-25 14:35:50'),('192.168.1.111','5ED83A72746C70B071E2AA4F048950CC',10007312,'2023-01-31 12:06:54'),('192.168.1.111','5F4631D7078D0276911A2E10F6573060',10007312,'2023-01-25 14:29:04'),('192.168.1.111','68CBDD8B619C023E48F10386711E37D8',10007312,'2023-02-03 14:33:55'),('192.168.1.111','68DF4FD966ADF8009D309A1146BD1D98',10007312,'2023-02-03 11:53:08'),('192.168.1.111','735041092808DEA6E4FC68BBFE672CC7',10007312,'2023-02-01 12:52:12'),('192.168.1.111','7B06BDA0F46847108F0049969943D0EE',10007312,'2023-01-30 18:25:53'),('192.168.1.111','7DCA029FA1E0381A7869017F5061AFD0',10007312,'2023-01-25 13:03:04'),('192.168.1.111','82DA225D4039AF2A0A5C470987DE27AA',10007312,'2023-01-30 12:18:53'),('192.168.1.111','831FAAC65BA353AA3B29EA1AF019B656',10007312,'2023-01-27 12:01:25'),('192.168.1.111','86FB0624C5E08A5E35E2D173101F9635',10007312,'2023-01-28 18:39:04'),('192.168.1.111','8A42BB7652489642077E3643F820B62F',10007312,'2023-02-01 10:44:59'),('192.168.1.111','93B669FFA933E77C63E570E063A9761A',10007312,'2023-01-30 15:55:26'),('192.168.1.111','9A735A6500830D4334A0C62EE86FC3C0',10007312,'2023-02-01 13:47:22'),('192.168.1.111','9D9FE091C118E18007E5CE1295D7F274',10007304,'2023-01-24 13:34:44'),('192.168.1.111','A04DC4C5B75BB3E895FC3B5966BE5672',10007312,'2023-01-25 19:16:21'),('192.168.1.111','A0EEA4CB5B6721B3769FF3271567C1D2',10007312,'2023-01-28 17:41:45'),('192.168.1.111','A7D066BAE7573D38CE943FF6733B640D',10007312,'2023-01-25 21:51:45'),('192.168.1.111','A9C7B0328B92CA2E17F01ADD9B297E0F',10007312,'2023-02-03 14:25:44'),('192.168.1.111','AB886DBD541620BBFD17BC88C3FD0AA4',10007312,'2023-01-25 15:07:24'),('192.168.1.111','B48F614FC59726BD84982137827F5109',10007312,'2023-01-30 11:46:01'),('192.168.1.111','BED07FAE39B907495372B0CFB328509E',10007312,'2023-01-31 17:07:50'),('192.168.1.111','BF3AE9858788F21475A94402DA7B5E56',10007312,'2023-01-31 10:07:34'),('192.168.1.111','CA29548ED42EB21E366AC84CC233FCE4',10007312,'2023-01-27 14:45:25'),('192.168.1.111','CD84712F574DC2D706A0E26E53B47741',10007312,'2023-01-30 10:13:55'),('192.168.1.111','DAF369E655238D19D50D13075A349B48',10007312,'2023-01-31 09:45:33'),('192.168.1.111','DB28D7E881D89AA235096DE6F00D6138',10007312,'2023-02-03 13:39:53'),('192.168.1.111','DE30C71477D8F315A9D9914708250E78',10007312,'2023-01-25 16:43:52'),('192.168.1.111','ED46C15CFB13DC7CCDA89CC57022DC82',10007312,'2023-01-27 09:53:49'),('192.168.1.111','EF7CF09E88F1CA35276B78A2B54D7B04',10007312,'2023-01-25 15:32:55'),('192.168.1.111','EF914917EB727ABF796E9DA33ED8A2F7',10007312,'2023-02-03 14:22:17'),('192.168.1.111','F43EF5AFE249C013DFDB7937298DD174',10007312,'2023-02-03 10:36:18'),('192.168.1.114','02EBD7B0D66AF7464A578BBC7CD3797E',10007304,'2023-02-08 10:00:35'),('192.168.1.114','06B6911209D8E578E67C5594E351C261',10007304,'2023-02-08 15:04:47'),('192.168.1.114','2028584B474161DAB4C4870F4C52BE1E',10007304,'2023-02-10 09:55:32'),('192.168.1.114','283EE2D00B0DE42BCBF51039ADDD0EFA',10007304,'2023-02-09 14:52:07'),('192.168.1.114','2B3649785CA506486E8A4F55DF3D29BA',10007304,'2023-02-04 09:35:31'),('192.168.1.114','62FE9D3166A669C3BAFB3FD16930C254',10007304,'2023-02-04 13:31:05'),('192.168.1.114','65ADE98CEDD476B8C9CE2390A58B3FAC',10007304,'2023-02-04 17:22:37'),('192.168.1.114','682C0DDC89CBC3303F80CEA3181C20CE',10007304,'2023-02-04 13:28:58'),('192.168.1.114','6BBC6E7246353BFF0ECDC0E9AAB5DA36',10007304,'2023-02-07 10:33:41'),('192.168.1.114','81193E28E3790A70A5EADD17BBED8D8E',10007304,'2023-02-09 09:50:23'),('192.168.1.114','8A21AAAEF1BB85F1637892CD3F7D537C',10007304,'2023-02-11 09:53:27'),('192.168.1.114','8AEC21A56D76FE506E7EDF95F721C4C0',10007304,'2023-02-04 17:25:51'),('192.168.1.114','901B58C5DEFAA2A1824E40D3AE0C1300',10007304,'2023-02-10 15:17:45'),('192.168.1.114','95C3B3D1343CFDBE2668A059220E33CB',10007304,'2023-02-07 10:26:59'),('192.168.1.114','F3BE024E91F2DB71749C43F00A892CD9',10007304,'2023-02-09 14:45:15'),('192.168.1.114','F86AF11DD97637E2DA0913521596D7DB',10007304,'2023-02-04 13:26:41'),('192.168.1.114','F9EBBE90C1EEC21D33068A84B08D6624',10007304,'2023-02-06 16:06:34'),('192.168.1.30','368407AEFE69F8638C20DB31BA99D57E',10007304,'2023-04-21 13:33:43'),('192.168.1.37','18BFA1C90F15B26B3BDB7DE8D4FAB7BC',10007304,'2023-04-18 15:30:16'),('192.168.1.37','546918838966F94CFBF741A2C2DAD6EF',10007304,'2023-04-18 15:38:48'),('192.168.1.41','301EBC7D762628A7FE8E57AE6BB58368',10007304,'2022-12-15 15:23:22'),('192.168.1.41','3783D8586EA48625E5F237CB95B9C821',10007304,'2022-12-15 15:21:59'),('192.168.1.41','3E38832E276B49390A516CE5AC43B92F',10007304,'2022-12-15 14:54:03'),('192.168.1.41','87E5101877F68B9330431C57AB6BBF69',10007304,'2022-12-15 12:46:31'),('192.168.1.41','C3689D094E4C78947B63D0B895A5E00C',10007304,'2022-12-15 14:04:09'),('192.168.1.41','E8E1BD813F7A23C7210AC9B458CCFC8D',10007304,'2022-12-15 16:15:39'),('192.168.1.42','087EC3CDF6431D39006F53F1338084D9',10007304,'2023-03-06 18:18:01'),('192.168.1.42','1C05FE7ED5CDB52B9D5564F11EAEFDB5',10007304,'2023-03-03 10:05:27'),('192.168.1.42','28BED98F7C36F07803685DFCEC9E1D23',10007304,'2023-03-01 13:40:04'),('192.168.1.42','3E53F92E0845B460D9F3BA4945BB2FB9',10007304,'2023-03-02 17:13:00'),('192.168.1.42','6A74B6CA8C6B526771444FE056443F39',10007304,'2023-03-03 18:11:22'),('192.168.1.42','9633BF81FCBC48951F99C77AF228E793',10007304,'2023-03-01 09:57:57'),('192.168.1.42','983D4FB1EBD7CE26C0493D6EF51AD47F',10007304,'2023-03-04 09:50:31'),('192.168.1.42','B25D8A7D04C753302F5D04A5DEC60563',10007304,'2023-03-02 13:43:50'),('192.168.1.42','BD3509E0F310B9BDD8776E94ABB91176',10007304,'2023-02-28 16:27:18'),('192.168.1.42','BDCE3920A546AE43647CF257BDBCF5FF',10007304,'2023-03-02 17:54:51'),('192.168.1.42','D710439665276296EA46B268404FA31E',10007304,'2023-03-06 10:10:56'),('192.168.1.42','DDC639586F065C439483CBE8E92ABC3F',10007304,'2023-03-01 13:55:53'),('192.168.1.42','ED6929DABF7AB6930AA1555AD848F371',10007304,'2023-03-07 09:42:27'),('192.168.1.42','F2515DF92EC67A7986C89C9C8E3BCF05',10007304,'2023-03-02 11:13:27'),('192.168.1.8','567BC54E04BBC0641FC9955524FBE885',10007304,'2023-04-21 12:17:07'),('192.168.1.8','E0A023FC624D6628D5D7AEDE273144CE',10007304,'2023-04-21 12:54:31'),('192.168.105.144','19A4DB3BC2227767281DAD6C38434800',10007312,'2023-03-04 14:58:50'),('192.168.105.144','3EBBE84BF3211967F5B6C8398A218D53',10007312,'2023-03-04 19:06:35'),('192.168.117.144','632348FF1EF402EA085552A2F502E652',10007312,'2023-02-08 12:48:53'),('192.168.121.144','1D4C65DBA5CD72D1FF11213888056C43',10007312,'2023-02-07 09:47:39'),('192.168.121.144','3DA77F1662DDE12C707CEB05B77CEB38',10007312,'2023-02-07 09:43:48'),('192.168.121.144','3FA06AE7B7E8B6774E9088F9EFBEDE29',10007312,'2023-02-07 13:27:58'),('192.168.121.144','4131A1AA6EC9A7EDB16135DDDEA7BFAE',10007312,'2023-02-07 11:34:46'),('192.168.121.144','6A349F51BE0DA0C94AEA59EA6BDC05F1',10007312,'2023-02-07 12:05:45'),('192.168.121.144','7EC973902A36A66281876DC5D950D2C8',10007312,'2023-02-07 12:22:04'),('192.168.121.144','979A9E315A7D68BD6B6976716352EF0B',10007312,'2023-02-07 09:38:15'),('192.168.121.144','A77A3FE155A33CF6804E1F46BF77D689',10007312,'2023-02-07 09:31:04'),('192.168.121.144','C2CD50159A4D66C7941DCCFDC7E22B81',10007312,'2023-02-07 09:47:09'),('192.168.121.144','F77E50E940CCB445DE9EDD7986F0686D',10007312,'2023-02-07 10:15:55'),('192.168.134.33','4A9BAD369CC202EF5B369C63D1FC6571',10007304,'2023-01-11 12:58:37'),('192.168.146.1','003EB861F23EEC95DCB09D1D7C18867C',10007304,'2023-02-11 15:33:29'),('192.168.146.1','00F453B166108A1A265E0CBD9DCCC8AE',10007304,'2023-01-03 17:58:20'),('192.168.146.1','013197B978DC9E2183F415B3A1741960',10007304,'2023-01-06 10:48:18'),('192.168.146.1','02FEBCB3807C00242131BB13845E3AED',10007304,'2023-01-18 10:23:01'),('192.168.146.1','07B7D0E19539A912B45CB10D9D33CD8B',10007304,'2023-02-20 09:40:26'),('192.168.146.1','0BA39F29BD09FC27F4627EE3941590DF',10007304,'2023-01-17 15:44:52'),('192.168.146.1','0D41EB73D8BC1A17D770ACF891034024',10007304,'2022-12-31 10:43:09'),('192.168.146.1','10D671B2D158CE7CC3B60E181CB2F9D2',10007304,'2023-01-28 12:04:20'),('192.168.146.1','1135624262000F9902D43E76C9BB89C4',10007304,'2023-02-11 09:58:49'),('192.168.146.1','129E4B12ADB76F823E60E6DC15AF7612',10007304,'2022-12-31 10:41:44'),('192.168.146.1','15C325B992F7082EB46F300E46501EE2',10007304,'2023-02-10 09:47:49'),('192.168.146.1','17EF752AEEF0D4F709ED547BE1A33D15',10007304,'2023-02-09 10:52:11'),('192.168.146.1','1ACFA26EAE1207867835886EC8F4AA13',10007304,'2023-01-24 15:32:15'),('192.168.146.1','23E26D18DC07689346565C5D6C62D45E',10007304,'2023-02-07 13:50:13'),('192.168.146.1','245A5E17D629C06F92855EEA1A351534',10007304,'2023-02-17 10:53:49'),('192.168.146.1','26FCB171B4926F752080C8FCCB805425',10007304,'2023-01-25 09:54:21'),('192.168.146.1','2877FCD7F02794C84968C65272093804',10007304,'2023-01-17 11:21:00'),('192.168.146.1','28B1B072E9071BEB386E08FD137B257C',10007304,'2023-01-22 15:20:19'),('192.168.146.1','2AAF086E31245D0448048946F2091065',10007304,'2023-02-16 09:51:31'),('192.168.146.1','2AD782784E78A2CA37392635344DB490',10007304,'2023-02-10 10:46:37'),('192.168.146.1','2F22B3E8EBE210243CA21B416C00506E',10007304,'2023-01-25 17:02:08'),('192.168.146.1','31E57387FD678AE2917F7A1F298B2F52',10007304,'2023-01-18 16:35:40'),('192.168.146.1','34B7959D0F6F39C1E82A271A1D156961',10007304,'2023-01-19 10:46:37'),('192.168.146.1','353C96B2DCEA52422AF8759B5FA5C737',10007304,'2023-01-16 10:49:12'),('192.168.146.1','37302A7326EEA0C34F1C4995729AA2E3',10007304,'2023-01-16 18:54:24'),('192.168.146.1','3F2731798CA5DE62C0296216DF937CBD',10007304,'2022-12-30 17:27:54'),('192.168.146.1','422A5ECB3614A6551A46698A4207EA2F',10007304,'2023-02-17 09:46:50'),('192.168.146.1','46CB2D73B2994C10BB8034A2DF08ED11',10007304,'2023-02-11 10:24:40'),('192.168.146.1','496AF66B4203CEF2D445967C7F184844',10007304,'2023-02-15 09:47:07'),('192.168.146.1','49BA20FB520A3001392CD822673FE5F9',10007304,'2023-01-16 12:17:51'),('192.168.146.1','4C464292F3BAF318D08E26A5B07D864C',10007304,'2022-12-30 16:57:20'),('192.168.146.1','4C755A84970F06E3071F57927EA4BBB6',10007304,'2023-02-07 09:46:28'),('192.168.146.1','5097332EC89E65B5D744263C44244B6A',10007304,'2023-01-21 10:45:41'),('192.168.146.1','51B7A388E7D3319D1F2545017C21D554',10007304,'2023-02-15 10:57:37'),('192.168.146.1','57BBA048A0FCB0592F82636C4248C3A0',10007304,'2023-01-18 10:23:51'),('192.168.146.1','59647738150F75EC659460FB549A8E77',10007304,'2023-01-21 10:02:43'),('192.168.146.1','5A57A0DEAD964063478161E7B6894A73',10007304,'2023-01-23 10:05:24'),('192.168.146.1','5FFBE4AE0027D0440317C11C1A581644',10007304,'2023-02-14 09:49:36'),('192.168.146.1','61A1E93688F4B04BE7B511DCC4DB2855',10007304,'2022-12-31 14:36:16'),('192.168.146.1','62490FE52BD10AD5393628538D55C206',10007304,'2023-02-13 10:18:36'),('192.168.146.1','631E0AA0FC5B8B2DE57DBE1F196CA411',10007304,'2023-02-09 16:43:24'),('192.168.146.1','6722CEC0216B65CC255D989B9DF4A591',10007304,'2023-01-20 10:02:04'),('192.168.146.1','6904222F9345530F71CCFD712C49F0E0',10007304,'2023-01-03 17:43:59'),('192.168.146.1','6F9173D0C991C80975FEE9F1BBCCC261',10007304,'2023-02-09 16:42:26'),('192.168.146.1','6FC56759EE0D40C9199360101F4E5957',10007304,'2023-01-18 12:16:58'),('192.168.146.1','7329F0B89E7587A0CBB15D47C981EA29',10007304,'2023-01-24 09:51:32'),('192.168.146.1','7336949F77885D422ED4D0EE5351A4C2',10007304,'2023-01-17 09:54:46'),('192.168.146.1','77C8F1E54A42BF9BBE49E04A794A83CA',10007304,'2023-01-10 10:02:53'),('192.168.146.1','790E440D65BAFBD29828EE577F6BC8AB',10007304,'2023-01-16 19:10:38'),('192.168.146.1','7BDCD0603E102352D69D0CA03DA15742',10007304,'2023-01-06 11:01:31'),('192.168.146.1','7BEE83EB8BAF97B2861732AC3F5960D4',10007304,'2023-01-17 18:56:14'),('192.168.146.1','820D07D267FFC8C2FA8D6A5CDF1420A6',10007304,'2023-01-10 10:14:46'),('192.168.146.1','834E216293F5013E45EAA3243F48333D',10007304,'2023-01-16 19:04:44'),('192.168.146.1','863BEE409C1B148C5384676039A2BE90',10007304,'2023-02-10 16:31:04'),('192.168.146.1','86C18AF2D5523404013770B6191587C3',10007304,'2023-02-16 11:32:41'),('192.168.146.1','8CBB5F82E6FADF8BB5E48D35CB9A7249',10007304,'2023-02-09 09:53:47'),('192.168.146.1','8EE81463EE73B69180AF52673845C975',10007304,'2023-01-24 17:08:56'),('192.168.146.1','8F6DE6F9B3B318CE789EE4CEA4160598',10007304,'2023-02-28 11:32:08'),('192.168.146.1','906D24F94ED95E55DE0BA1BE142F7F69',10007304,'2023-01-27 10:01:53'),('192.168.146.1','90D7C0D3B444D372043E264C4724A848',10007304,'2023-01-19 10:45:59'),('192.168.146.1','90FF2987C6AD2DD1B08809286571751C',10007304,'2023-01-17 15:46:42'),('192.168.146.1','92ECF6571031EA0AD64A721E3512365E',10007304,'2023-02-09 18:48:10'),('192.168.146.1','94913E7CE8FC7978D61B37F8DB414D38',10007304,'2023-01-16 17:39:23'),('192.168.146.1','9E6BFA582D472ABDAA02891E7A94E30C',10007304,'2023-02-18 10:04:04'),('192.168.146.1','9F892E7ADFB7F15D9FFC0D71126FCB9B',10007304,'2023-01-17 10:30:04'),('192.168.146.1','9F9805052F70614E2106FA2B78AE99A5',10007304,'2023-01-25 11:59:12'),('192.168.146.1','A2DC81891FFFA6B04688A6C5B659D863',10007304,'2023-02-13 16:04:26'),('192.168.146.1','A6C4B8C96F5E30AE089938E42089E797',10007304,'2023-01-17 15:46:05'),('192.168.146.1','A7DE6CF46BCCDBC44EC2376D8CAC1E3D',10007304,'2023-02-16 17:35:58'),('192.168.146.1','AE39EFA22394F8FDF394B60D1CD14C0B',10007304,'2023-02-08 10:50:02'),('192.168.146.1','AFBD4609CB5D34DF9E39BDEA7A2D550D',10007304,'2022-12-31 09:29:59'),('192.168.146.1','B2734E9BBE7EE889992D8CC5A94B3317',10007304,'2023-01-16 11:30:11'),('192.168.146.1','B2847CF4AE23EECAC54855E85396D9FE',10007304,'2022-12-31 15:39:38'),('192.168.146.1','B66C9C4BDF822B03D066253510DFD0F5',10007304,'2023-01-16 11:26:46'),('192.168.146.1','B6C7F2654ED90699FDD9034066C44B79',10007304,'2023-01-20 15:52:01'),('192.168.146.1','B71B6B332548F1468330A968485BFBB6',10007304,'2023-01-07 11:19:51'),('192.168.146.1','B80FC9E1AA932BF599800FFE46410483',10007304,'2023-01-17 09:58:00'),('192.168.146.1','BBCE1CECCCAFB0B489AEE928DA6B1CB4',10007304,'2022-12-30 18:32:04'),('192.168.146.1','BCB8C943D66FB6750B356163A5140B9C',10007304,'2022-12-31 11:00:55'),('192.168.146.1','C04D7BD31C8B7E4E600CD58440B8E81B',10007304,'2023-02-09 16:42:32'),('192.168.146.1','C11A87A3BE40D81A0A201315802FBEC6',10007304,'2022-12-30 16:58:33'),('192.168.146.1','C1BC0658DDE8193EBBF66BB74E134C00',10007304,'2023-02-16 11:30:58'),('192.168.146.1','C3AE7021BD85157C6D1741009F09123F',10007304,'2023-01-17 18:56:19'),('192.168.146.1','C53CB27C440E07AC45DF8491FF6CD6AE',10007304,'2022-12-30 16:56:45'),('192.168.146.1','C6058C33ACA21A61F1F204DF7D57E8D2',10007304,'2023-01-21 15:51:52'),('192.168.146.1','CA8832AF9C28AAE3F0B7AAAD93E65C4A',10007304,'2023-02-08 10:06:38'),('192.168.146.1','D0D316656E0BA53FD0ED8ABA3D3D3D0B',10007304,'2023-01-17 15:47:04'),('192.168.146.1','D3DD947A64BD9461E1F5766C95E2A3D2',10007304,'2023-02-15 10:49:17'),('192.168.146.1','D3F1EDE349F76E7911338DF05090E8AE',10007304,'2023-01-17 15:44:07'),('192.168.146.1','D6641FB93DC7EDCE1B7F84897E26514C',10007304,'2023-02-22 10:06:36'),('192.168.146.1','E29AC3122EF30B119251F63D4572EE4D',10007304,'2023-02-07 15:00:22'),('192.168.146.1','E3A0F3AB899BF4E384FE954C95516E22',10007304,'2023-01-19 10:04:08'),('192.168.146.1','E7071C0CBA3155C8A14CDBCD8D15DBEE',10007304,'2023-01-19 15:48:16'),('192.168.146.1','ED8202478E5A25D3C99D5EBE5716EFEB',10007304,'2023-01-17 15:44:11'),('192.168.146.1','F0B731A1B7DF426136DCAB9F7CD767F6',10007304,'2023-01-17 15:44:31'),('192.168.146.1','F3D003848A81861ACA4FCCE1B2CED04D',10007304,'2023-01-16 11:22:29'),('192.168.146.1','F6FFD844763DE01434B7FE613BAA129A',10007304,'2023-02-04 11:02:13'),('192.168.146.1','FC03E4C081D8E4DC52327D66BF90D973',10007304,'2023-02-08 15:56:27'),('192.168.146.1','FCEC70E56273E44640DB6B6074A385BF',10007304,'2023-01-06 10:47:12'),('192.168.146.1','FF3E1FE998A83EC7B0BD45F59765A29C',10007304,'2023-01-28 12:37:53'),('192.168.146.1','FF456D7112CDF2E5F7C77DCE2AC9931C',10007304,'2023-02-21 09:48:49'),('192.168.148.33','2C825B7E6B70941084CAF10B71391C27',10007304,'2023-04-14 11:39:28'),('192.168.16.144','47FC3CBDFD78343C584A1690CE409777',10007312,'2023-02-07 16:01:44'),('192.168.16.144','4A438E506AFA0681F87A004A4B50D856',10007312,'2023-02-07 15:24:32'),('192.168.16.144','5B7BEFCB105E3B589573984B14F84394',10007312,'2023-02-07 16:49:09'),('192.168.161.189','1FAF59CFAA6B27A12D8FE7E7B2413119',10007304,'2022-12-23 21:53:09'),('192.168.161.189','6135B5CDA04161E01B94861B82ECDE35',10007304,'2023-01-05 10:10:40'),('192.168.161.189','816E2512692D67E056255287CE9ACEC5',10007304,'2022-12-23 21:53:03'),('192.168.161.189','D37282180CB519CB463EE5A2998FABAE',10007304,'2022-12-23 21:54:03'),('192.168.167.144','1F033E0E1A8B23B543221BE56EACACB7',10007312,'2023-02-11 13:23:12'),('192.168.167.144','9F5F0881B453A8E6683CFE80C3A03FEC',10007312,'2023-02-11 11:51:21'),('192.168.167.189','000B60B77DFF91675CF09EF64EF4FF6C',10007304,'2023-01-11 10:05:46'),('192.168.167.189','010E486C0C2629254222D44CB33D9805',10007304,'2022-12-20 10:26:31'),('192.168.167.189','026151EB9757E555DF031CB21C4774F3',10007304,'2022-12-26 16:44:13'),('192.168.167.189','043FB0BDA292DF9F43D4F8D8DBD768A0',10007304,'2023-01-14 15:25:04'),('192.168.167.189','044B94302EFCBCB53AC06BA43EE69BE3',10007304,'2023-02-21 14:26:06'),('192.168.167.189','04A707A5EE36B003D3F4CA15262B1235',10007304,'2023-02-21 18:24:52'),('192.168.167.189','060C51C75709FF5E5F9890A615A3CDFE',10007304,'2022-12-22 17:25:32'),('192.168.167.189','0698BE45332BEEE07F5163E0AB2C1979',10007304,'2023-02-20 18:29:28'),('192.168.167.189','070EFA14F6AEF5472F79938456B17523',10007304,'2023-02-22 11:17:59'),('192.168.167.189','07A156286AEA961655B225BFF49BE09C',10007304,'2023-01-02 18:31:07'),('192.168.167.189','07D0DBAF4E35AE60E2EFBDB036B9C7AB',10007304,'2023-01-24 18:08:25'),('192.168.167.189','086C9D42296CD9859FACD1D0726F672F',10007304,'2022-12-28 13:57:09'),('192.168.167.189','08E276AC17CE4EF10DCCA1148860F733',10007304,'2023-02-02 13:54:29'),('192.168.167.189','09A05A170EC5C6AB7E0BCC4192671F3E',10007304,'2023-01-03 15:34:34'),('192.168.167.189','0B501EE53F68BB7940B9F9C5B7267133',10007304,'2023-02-08 09:40:41'),('192.168.167.189','0B8ADA685A8E75FDB60ED9E1D6905E0E',10007304,'2022-12-20 09:37:49'),('192.168.167.189','0B9FE3EDE8A96952DF9E396BAC3929D7',10007304,'2023-02-04 09:41:56'),('192.168.167.189','0CF128FA31194D602E0D6DDDDFB577F7',10007304,'2023-02-03 17:17:02'),('192.168.167.189','0D1D427F36D0ED4FD5FB4C30778ED351',10007304,'2022-12-24 14:27:55'),('192.168.167.189','0D31DF1C40B96E953F77D9AFB3FA3EEC',10007304,'2022-12-24 15:38:10'),('192.168.167.189','0DD8561AF844F1554FFC0A03036F7D4C',10007304,'2023-02-20 13:32:14'),('192.168.167.189','0E6C9ECB2E6C53230F755AC0389184F1',10007304,'2023-01-24 17:43:56'),('192.168.167.189','0E91AACFB7EEF227827B4F9998CAF53A',10007304,'2023-01-05 16:32:02'),('192.168.167.189','0EB2E8F0B08CA041A27F9CA8DFA5E7B7',10007304,'2023-01-13 13:26:59'),('192.168.167.189','0F301B69576118B43454508411BA2546',10007304,'2022-12-21 13:53:18'),('192.168.167.189','0F5726FA7BC053B4A78137D6B7322F4F',10007304,'2023-02-17 17:05:22'),('192.168.167.189','0F61EC5265EAD393B55CE4E80ADCB9A5',10007304,'2023-02-27 09:33:31'),('192.168.167.189','0FBAF40AAD3A72AA66249C1972D4ED8F',10007304,'2022-12-22 17:19:56'),('192.168.167.189','129C69AF19A8258F8772E18B3B48BA71',10007304,'2023-02-15 15:12:36'),('192.168.167.189','1367AA064D35C9D61593BC616E267F08',10007304,'2022-12-19 17:02:45'),('192.168.167.189','14C3E0364E298F81C47227ECD523F52E',10007304,'2023-02-14 10:03:14'),('192.168.167.189','151BDE67396291F7C3706F552893E20D',10007304,'2023-02-03 09:47:10'),('192.168.167.189','169007EEE2E6D5C8866B8C058DCBA936',10007304,'2023-02-16 12:33:34'),('192.168.167.189','172DC07B671F0A643FCBD8D9B16A9C3B',10007304,'2023-01-30 12:59:51'),('192.168.167.189','1761619DFDE1A1AE4192B691E17EE395',10007304,'2023-01-05 15:09:17'),('192.168.167.189','1942038005CA480E95017B36E3F3F4C0',10007304,'2023-01-04 12:22:10'),('192.168.167.189','1984F49A1378EB5294FD190A8EFC41D5',10007304,'2023-01-28 12:29:31'),('192.168.167.189','1A109CBB8BD677892401A43ED92222D3',10007304,'2023-02-16 11:04:22'),('192.168.167.189','1B292D068AFCDBFAC76FD54654245CA3',10007304,'2023-01-28 11:29:34'),('192.168.167.189','1C1C7B003E9E51A95933D170FDB98504',10007304,'2022-12-22 17:26:15'),('192.168.167.189','1C3BE9813B87D43898BFBD0FD7FE9D0A',10007304,'2023-01-23 12:06:53'),('192.168.167.189','1D69AB94AE4B8CE8055637FBB64F4A5C',10007304,'2023-01-12 15:31:53'),('192.168.167.189','1D8F231FFF021E304CEE91177850FFCE',10007304,'2022-12-19 16:35:21'),('192.168.167.189','1DD80CC1F4C8970528B99A9A25FE5CAA',10007304,'2023-01-05 12:35:02'),('192.168.167.189','1E111FEBE58B831249A51817CFA4BEEA',10007304,'2023-02-17 18:50:07'),('192.168.167.189','1E1E855F3CDF89A81F780ADCE26344FD',10007304,'2022-12-23 10:08:07'),('192.168.167.189','1E5EA6C710BF055D5BF4B3C81A55E4EB',10007304,'2023-03-02 18:21:16'),('192.168.167.189','1FAB9FD7CA8496A71BD0E1ADB1281F6F',10007304,'2022-12-23 18:55:25'),('192.168.167.189','20B8FDF7A517FE44609CC43DEFA90FF9',10007304,'2022-12-28 17:10:35'),('192.168.167.189','20E3030A5D0154E577318E95A580118A',10007304,'2023-02-13 17:32:21'),('192.168.167.189','21006E557F15633B823515811EBA8402',10007304,'2023-03-04 13:35:11'),('192.168.167.189','215A414C73C5C3AE353E4AF034F6AABE',10007304,'2022-12-30 09:34:40'),('192.168.167.189','22AEC65C325C97D8AD1D9B80486E95FC',10007304,'2023-01-05 16:00:44'),('192.168.167.189','246E49CD35AE3BB05515011014728265',10007304,'2022-12-30 11:41:01'),('192.168.167.189','25E27C4658CFD8F56E4D02E9176A708B',10007304,'2023-01-24 10:19:31'),('192.168.167.189','26AAF0DBAB292DD74A208B57A449B0DA',10007304,'2022-12-19 16:37:00'),('192.168.167.189','26B5B1F698F4016B9EE53E6F6AE466E1',10007304,'2023-01-11 13:51:36'),('192.168.167.189','27B66372D76C6FDB57D91D032E9A6AD6',10007304,'2023-01-27 11:24:54'),('192.168.167.189','27C5A587503FE1F446D6DB9DE00B0448',10007304,'2023-01-28 11:21:31'),('192.168.167.189','27DCF600897720376AE20AC252AEE5C5',10007304,'2022-12-19 14:50:41'),('192.168.167.189','28B6B40847D128761175404E821FFFD4',10007304,'2023-01-24 10:09:19'),('192.168.167.189','291695430EAB525AEC1EDD6EFCAA8578',10007304,'2023-01-23 17:17:20'),('192.168.167.189','2928666CD643BFD2EA50FA8D484C7AAB',10007304,'2022-12-22 17:07:43'),('192.168.167.189','2B8A483BC38F30B17958B6627D4EA56F',10007304,'2022-12-20 18:34:14'),('192.168.167.189','2D997C14403E8309671EF77341A4A9CB',10007304,'2023-01-02 11:58:12'),('192.168.167.189','2F7116A6CC8D5152FAA8B1AE0BA52AEE',10007304,'2023-01-31 13:51:27'),('192.168.167.189','2FEAE27B8DE0FE6597681733E5C750BC',10007304,'2022-12-28 14:54:25'),('192.168.167.189','3016097656D776F1EF45B4D760A536DF',10007304,'2023-01-10 15:37:41'),('192.168.167.189','315A3176E5197774016A14AD219D3C4D',10007304,'2023-02-13 14:54:43'),('192.168.167.189','33D4E993D121CB2E2DD3A9ECDC323358',10007304,'2023-01-11 15:38:02'),('192.168.167.189','33EE49CFD0A748D69B49A956B07CE429',10007304,'2022-12-28 09:41:30'),('192.168.167.189','33FEC21567469FAA316C9FE5E6724160',10007304,'2022-12-26 10:42:09'),('192.168.167.189','340A71E1FDBEC657BE8B64F696A990CB',10007304,'2023-01-05 09:41:11'),('192.168.167.189','3498703D2F0838B8F8968CF1A36E88E6',10007304,'2022-12-21 11:13:43'),('192.168.167.189','34CFD269E0FF2EC577F0A281561DF33D',10007304,'2023-02-16 12:35:04'),('192.168.167.189','34FAA8B6351DFFF1D79803D3242AA0AA',10007304,'2023-01-24 17:00:01'),('192.168.167.189','351567E7B2415BDF089D651C023C72FA',10007304,'2023-01-11 15:26:36'),('192.168.167.189','35B77DEF08E0EC45D8E768D2B61F99B5',10007304,'2023-02-02 09:36:18'),('192.168.167.189','368CBC552EFF560DDF0B0428807D8D64',10007304,'2023-01-23 12:50:31'),('192.168.167.189','36B71717D154ADFBC0097216AD2E31B2',10007304,'2022-12-19 09:38:30'),('192.168.167.189','36E3C1F009B287EF9838BF9C037608BF',10007304,'2023-02-03 17:25:30'),('192.168.167.189','380054623E593A4C02BC7EEF532E1FAC',10007304,'2023-01-12 13:50:55'),('192.168.167.189','389386AC049CF8C6C3E7BD3E5B8485A8',10007308,'2023-01-23 17:10:46'),('192.168.167.189','389962D5F08385F07ADA827ECFAD9391',10007304,'2023-02-24 15:37:43'),('192.168.167.189','3A06CF538351953984E629974C605CD1',10007304,'2023-01-03 17:48:26'),('192.168.167.189','3A9B0F190381385722EFA703AFA1D997',10007304,'2023-02-15 09:36:37'),('192.168.167.189','3C41629BEECE8CC51D2360910837F164',10007304,'2023-02-15 18:32:37'),('192.168.167.189','3C916F36BF8800A73160155EBEF25700',10007304,'2023-01-11 09:37:11'),('192.168.167.189','3CBDC6BB34B2B1B426BCEF59C1708DC9',10007304,'2023-01-03 17:43:44'),('192.168.167.189','3CC497B5F5D5162F484470B629D897E0',10007304,'2023-01-28 16:41:14'),('192.168.167.189','3D15F9F869EA234797316D1FACE91D20',10007304,'2023-02-11 11:31:28'),('192.168.167.189','3D1891FB254817627E5EB3FBE9E48EDB',10007304,'2022-12-24 10:47:56'),('192.168.167.189','3D24193117709891DDA231D20AA89AA3',10007304,'2022-12-23 17:12:09'),('192.168.167.189','3EF99034B39DEDCABB050C1B1A4158D4',10007304,'2022-12-24 11:48:51'),('192.168.167.189','3F407CF8062272B3F4222656516A83A1',10007304,'2022-12-24 09:37:28'),('192.168.167.189','40E9D3864F470C325DB7AF3342DC4D7B',10007304,'2023-02-21 17:54:23'),('192.168.167.189','40FBCF0D0415AEAA408FA47523AF58ED',10007304,'2023-01-03 11:30:37'),('192.168.167.189','42725848FC7B607FF14F6331B600D273',10007304,'2023-02-13 10:11:52'),('192.168.167.189','42994F969F56B7EBEE396B237BC4FE14',10007304,'2023-03-04 14:37:47'),('192.168.167.189','46C099A278887709D1EBC9FBF8B3E9EE',10007304,'2023-02-14 11:08:49'),('192.168.167.189','46F2E2AB0326FCBA7D4F84DBDC15392F',10007304,'2022-12-22 15:56:33'),('192.168.167.189','47ACAB31C390F603D12A464D8EFBC2FA',10007304,'2023-02-11 10:34:08'),('192.168.167.189','47FF42AB0F2E06D78368DADF221C1077',10007304,'2023-01-05 12:24:39'),('192.168.167.189','48D9BBB11F80620E87417A3450D3390B',10007304,'2023-02-23 09:37:36'),('192.168.167.189','4B3460FF63B2606583A6D4C6AF703FBA',10007304,'2023-01-05 12:39:12'),('192.168.167.189','4B620EC02412B3950F28FA82753CE764',10007304,'2023-01-05 15:56:49'),('192.168.167.189','4BFD45C22AC7CF87BE0D7579BB3D4C1D',10007304,'2023-01-13 14:32:05'),('192.168.167.189','4C2234CCD2CE1F8BD64824EBAA51B676',10007304,'2023-02-21 20:06:45'),('192.168.167.189','4C626362D1408CB4CFD0A2BEA39ED0DA',10007304,'2023-01-02 16:31:25'),('192.168.167.189','4CEB8C11C34DF5141E405D1BFAE46379',10007304,'2023-01-27 09:56:42'),('192.168.167.189','4E66661262A13BEC2C73E98CFF347303',10007304,'2023-02-13 09:45:27'),('192.168.167.189','4E9F020F6CF66C206DAC7F24F54365F7',10007304,'2023-01-31 10:45:09'),('192.168.167.189','4ED4C1B631B332DACA8C1D2AD7E03861',10007304,'2023-01-02 16:26:43'),('192.168.167.189','4F9E2BEBEEEBB62FF392780F5CF33B16',10007304,'2022-12-28 10:53:21'),('192.168.167.189','50C31BEF8663147FC33F856712674CA6',10007304,'2023-02-24 15:37:45'),('192.168.167.189','5273358009BD3E212C0812093B267793',10007304,'2022-12-22 17:25:29'),('192.168.167.189','54DD13972B8F63C7F90FB318C7817ED3',10007304,'2023-01-30 13:27:43'),('192.168.167.189','55D3D281B36323945C694367955175AC',10007304,'2023-01-14 15:39:49'),('192.168.167.189','55DFEDCB5A4D122A524AE59BE2CC16DC',10007304,'2023-01-23 11:52:41'),('192.168.167.189','5606D41A2996C78F05FBAF0BAD2348C4',10007304,'2023-01-24 16:59:44'),('192.168.167.189','565890D57314E23D381E2210DF664E74',10007304,'2023-01-03 15:27:02'),('192.168.167.189','56E5F6D7EF22EA9BD2FD3D471FD476E8',10007304,'2022-12-24 10:45:56'),('192.168.167.189','57F92CD11D97D8B6869147A69E40299E',10007304,'2023-01-04 12:31:14'),('192.168.167.189','58047193DF8ABEC88CB0B244E4322051',10007304,'2023-01-11 15:41:12'),('192.168.167.189','59033685A4E19648644CDB3DE6991C36',10007304,'2023-01-05 12:58:38'),('192.168.167.189','5970384018FC63064A19F3A2F3A95EA4',10007304,'2022-12-24 15:06:18'),('192.168.167.189','5A02A7C7B6F7DC596DA7BBEA418F7DC9',10007304,'2022-12-19 16:07:12'),('192.168.167.189','5A9E00E908021E0D65DBD96D792C33D1',10007304,'2022-12-24 12:18:31'),('192.168.167.189','5AA738E61F9419A5A2562C9B6BF996AC',10007304,'2023-02-17 11:57:20'),('192.168.167.189','5DB10509FDAFA074BC267F283AD04E09',10007304,'2023-01-11 15:38:00'),('192.168.167.189','5DD332F7CC8A073BF0EF918D3F4E7EDD',10007304,'2023-02-14 18:00:33'),('192.168.167.189','60272854F154FB833F53293DC5E2DDA9',10007304,'2023-02-22 09:55:31'),('192.168.167.189','60343EB2EBCAD9CCA22936DB2AF12417',10007304,'2022-12-21 09:39:11'),('192.168.167.189','60F08BCACBB93FAF3D35AA49FAFD375C',10007304,'2022-12-26 01:11:45'),('192.168.167.189','61313356A9BB98DCE968B9A89D8A5BA0',10007312,'2023-01-23 18:29:00'),('192.168.167.189','618807A13352AB0B4E150D23100DE11C',10007304,'2022-12-24 15:15:21'),('192.168.167.189','62A9D0E7859327394E0592798E99923D',10007304,'2022-12-24 12:16:29'),('192.168.167.189','63442317A278317529D48625801A55CD',10007304,'2023-02-16 17:36:42'),('192.168.167.189','636D5E0F9E8F88977FB9B83CCC075A7C',10007304,'2023-01-05 15:56:47'),('192.168.167.189','63F563B07FE79E2417AB7AC84BB51D2B',10007304,'2023-01-13 16:18:02'),('192.168.167.189','6471E618614F22A37007CD18EC4E3507',10007304,'2023-02-21 12:21:13'),('192.168.167.189','64CBC0254BF38F20292C94D97A59D04B',10007304,'2022-12-26 16:14:25'),('192.168.167.189','64EBD6E1FC4CE5568A6B43462CB1EA47',10007304,'2023-01-31 10:55:32'),('192.168.167.189','650874930DADAB7CE4C4583A5E3BB1C9',10007304,'2023-01-23 12:06:59'),('192.168.167.189','66228753363A07776E2064AE74A9CF46',10007304,'2023-01-03 14:07:47'),('192.168.167.189','66D15A821564C03D3DA48C1CAC2FE10D',10007304,'2023-01-03 11:30:34'),('192.168.167.189','66E61782A677EC80598C3E661A7B33FE',10007304,'2023-01-28 12:29:40'),('192.168.167.189','6857EB19867A1DFE1809B9FF359EF36B',10007304,'2022-12-24 15:16:55'),('192.168.167.189','692B0BB7B984486E066EDAF5BD0F9F15',10007304,'2023-01-03 17:09:58'),('192.168.167.189','69F6BDB890C30B2478F120A590F84EE3',10007304,'2023-02-20 09:23:00'),('192.168.167.189','6B5A5347E1C44E64F19C12568995B539',10007304,'2022-12-19 18:01:34'),('192.168.167.189','6BD074973FBD857A1CA90B4A6BFEDA9F',10007304,'2023-01-31 09:41:28'),('192.168.167.189','6BDF89CE5CC1636A0B5109675AC02646',10007304,'2023-01-23 11:57:04'),('192.168.167.189','6C93B8E76DF1250A0CC4FD1C02CB7F31',10007304,'2022-12-30 10:11:33'),('192.168.167.189','6D28E2E8D77719A64A4F0D0717A52B99',10007304,'2022-12-27 09:36:10'),('192.168.167.189','6E95908C97E4072ADDD5D20C62E2DA20',10007304,'2023-02-21 10:47:08'),('192.168.167.189','6F8A856931D6CFD34A88EA732D8583F6',10007304,'2023-01-03 13:53:22'),('192.168.167.189','6FAF12E8F3B51E2289BE29955985404F',10007304,'2023-02-28 16:53:43'),('192.168.167.189','6FF77E41FC41F768A89FA337E1F36845',10007304,'2023-01-10 17:12:49'),('192.168.167.189','7059F83CB9ECBD01F1FACF827AA4990D',10007304,'2023-02-11 10:42:23'),('192.168.167.189','70CBFA6663C7910B3FC8236F577D7B43',10007304,'2022-12-30 15:51:26'),('192.168.167.189','71A96A2BD219D272DCB080817726F240',10007304,'2022-12-31 11:44:28'),('192.168.167.189','72507B8A56BC7D09D6A935CEDAA7F926',10007304,'2023-01-02 16:31:21'),('192.168.167.189','74B05A3D60A2B867F9103FC92F3AFECF',10007304,'2023-01-13 13:22:52'),('192.168.167.189','7556FA3A42A0B275F831D5FD95CD03E3',10007304,'2023-02-22 11:12:34'),('192.168.167.189','757DA1F4F818CFA84EDE9EC2E51A61F2',10007304,'2023-01-11 15:00:00'),('192.168.167.189','75B4875A977B56285A302B18E396D87C',10007304,'2023-01-23 12:07:06'),('192.168.167.189','76385CD7B012325141D667C327F1BFB9',10007304,'2023-01-11 15:57:09'),('192.168.167.189','768E6E8658314506B9AF4156CD65B560',10007304,'2023-01-12 13:19:31'),('192.168.167.189','773BBF30B37EF825D88C62E7F56CBE89',10007304,'2023-01-05 15:47:24'),('192.168.167.189','77F723EA89C1DCF1B3E5D144502E308A',10007304,'2023-01-11 10:04:48'),('192.168.167.189','79686951E6B9A26A76829C362FB1E349',10007304,'2023-03-01 18:15:15'),('192.168.167.189','79C12B384556537492EB41A1998C60A7',10007304,'2022-12-31 13:29:00'),('192.168.167.189','7AB3D4017DFB8FE1E152AAA8B1A8FAE2',10007304,'2023-03-01 09:40:17'),('192.168.167.189','7B4404B14A44E5FA796955D2AC667AE6',10007304,'2023-01-13 14:23:56'),('192.168.167.189','7BA24E1CB07A11162CA39DA26BAFCFF8',10007304,'2023-01-24 16:24:22'),('192.168.167.189','7BA773DC1445469E98E525FE85ECC8AE',10007304,'2023-02-01 14:46:28'),('192.168.167.189','7D1E89F7FCD784E8694BDDF04ACB7C48',10007304,'2023-01-27 18:30:33'),('192.168.167.189','7D636352DFF42E49249D1BEB5A94A79D',10007304,'2023-01-02 11:51:27'),('192.168.167.189','7DB46EF4E17D90226D5443F595407ADA',10007304,'2023-02-01 09:31:20'),('192.168.167.189','7E58C1958F5E4E857A36A4CFCFD6ED39',10007304,'2022-12-28 18:06:01'),('192.168.167.189','7EA54274B44B9A93551F1E77E4F3EBDE',10007304,'2023-02-15 13:12:50'),('192.168.167.189','7FAF3B7FBA137DC8BA5F0BF9EBBDEF05',10007312,'2023-01-23 17:45:51'),('192.168.167.189','7FDDB9CB9468F2A60061E44700C3034B',10007304,'2023-01-27 18:28:30'),('192.168.167.189','7FE294876C44BDFBB656017F888795FC',10007304,'2023-01-31 13:51:31'),('192.168.167.189','8068C3095B3C869E39929267DEBA62D5',10007304,'2022-12-31 09:38:23'),('192.168.167.189','806B55965745974F03B8902B35B2D083',10007304,'2023-03-01 10:50:23'),('192.168.167.189','810185795A5FBB216ED6F42D700E7B85',10007304,'2023-02-23 17:39:07'),('192.168.167.189','8104CAE5209D6F5F393269F2E54D19BA',10007304,'2023-01-23 14:34:19'),('192.168.167.189','835CBD14F31F46374FA214E895D0E872',10007304,'2023-01-24 13:10:08'),('192.168.167.189','8403EED95DD293BB02DAD5F947BF05A3',10007304,'2023-02-25 17:14:02'),('192.168.167.189','84787BD63F7B07AC643215C91FC42FA0',10007304,'2023-01-05 12:09:31'),('192.168.167.189','847D513772021579A0DD72A2E354E7FD',10007304,'2023-01-03 15:42:21'),('192.168.167.189','8483E158EFE49E5E80949BEDB885101D',10007304,'2023-03-01 11:58:55'),('192.168.167.189','864E510BCF1EF190B39DAFE944382249',10007304,'2023-01-05 15:40:50'),('192.168.167.189','8656ED4A9EA8F428F6D3CFD6F44FC7DD',10007304,'2023-01-03 12:29:45'),('192.168.167.189','886510DAFDD9837020C3B89648FDD342',10007304,'2023-02-16 10:14:58'),('192.168.167.189','89D8643D21A3BCBB7B353B89B5CDFBE6',10007304,'2023-01-30 12:59:01'),('192.168.167.189','89F2898FD3B4A5FF0980850DA56493A3',10007304,'2023-02-03 12:16:20'),('192.168.167.189','8B74F04ED587432A695A3BEC1512D43E',10007304,'2022-12-26 01:10:41'),('192.168.167.189','8B9AD9090D88A522CF499806913B538C',10007304,'2023-02-20 09:23:00'),('192.168.167.189','8C119DFC063B4B7CFD1D397CD21976D8',10007304,'2022-12-24 10:41:49'),('192.168.167.189','8CA1AD73CE4593CFE04715E0AC83B407',10007304,'2023-01-27 13:28:42'),('192.168.167.189','8CFEB9260A40E148FF9E116051A62F0A',10007304,'2023-01-24 17:00:01'),('192.168.167.189','8D82650F6EAB4B091289AA8F76EA314A',10007304,'2023-01-02 09:33:49'),('192.168.167.189','8DF5FDEA041486FD3DE65C51C5D0B9F9',10007316,'2023-01-24 11:49:45'),('192.168.167.189','8E3E994BD26D1EA5C93FC210CBB286D4',10007304,'2023-02-28 17:59:50'),('192.168.167.189','8ECA0EA9F0DD7BBDD777901FD045DC54',10007304,'2022-12-24 10:48:05'),('192.168.167.189','8F66DF1D0FB0004ACA486D59F7735DBF',10007304,'2023-01-23 13:30:38'),('192.168.167.189','906E66ECAB9786E3AA1B05E735EF7B82',10007304,'2022-12-24 12:54:34'),('192.168.167.189','90B78A4EA1F69C027DCEBC2B8B9CE138',10007304,'2023-02-25 12:02:44'),('192.168.167.189','90DCB7773F0FE93A7AD65727310A0867',10007304,'2023-01-31 16:21:34'),('192.168.167.189','91007E2FBDCB754D0C00058F76AB30E1',10007304,'2023-01-27 09:57:13'),('192.168.167.189','91FAE45FA69D32EB26AE8668051CA7F7',10007304,'2022-12-23 10:09:41'),('192.168.167.189','923DFFC34ECC21542FE1896263EF2E31',10007304,'2023-03-01 12:16:16'),('192.168.167.189','926AC2F92290B3BF546EBEAAB69D5099',10007304,'2023-02-04 16:34:07'),('192.168.167.189','94C260CD1C34513207D1DA620C48DB94',10007304,'2022-12-27 13:19:40'),('192.168.167.189','9552EF1C013B64D0C3E37F7D62DCA2EE',10007304,'2022-12-24 11:50:47'),('192.168.167.189','9748B450F79EC10172007DA2BD9000A3',10007304,'2023-01-10 10:49:32'),('192.168.167.189','975FD464669381E4B1121FF61AB8B818',10007304,'2023-01-27 13:50:31'),('192.168.167.189','976B24D596A10011CAC8F044C9717019',10007304,'2023-02-01 10:09:46'),('192.168.167.189','979355E6F9BDE3918F3B2CC0130DB400',10007304,'2023-01-05 16:07:58'),('192.168.167.189','979A0E65409F250F52E67AF5FB6ECA86',10007304,'2023-01-05 12:24:37'),('192.168.167.189','97DFBAED2018C575AD19FEA505C095C4',10007304,'2023-01-24 12:20:37'),('192.168.167.189','9820A3F1E7A1201AAB4665C90BC19A83',10007304,'2023-02-22 11:09:40'),('192.168.167.189','992C2B309A8861C24E585B12485F1041',10007304,'2023-01-27 18:34:44'),('192.168.167.189','99837C5D27E9DCF014DD59992DE7EDD2',10007304,'2022-12-20 11:49:31'),('192.168.167.189','99AE348B6C1FAC7767A94C822C7AD900',10007304,'2023-01-04 09:39:38'),('192.168.167.189','9A5E6EF6B47FA2D2D9BD1F6B3E15C920',10007304,'2022-12-20 18:57:21'),('192.168.167.189','9A96332F085015D846E73B5C50C7F5DB',10007304,'2023-01-23 11:54:17'),('192.168.167.189','9AC712C73804C58D82CABB728B1903EC',10007304,'2023-01-24 15:30:10'),('192.168.167.189','9AE572D9C3BAE3A3B47E69B04DDAE7CA',10007304,'2023-01-30 09:45:11'),('192.168.167.189','9B03489DFE9A2FCEC4C5A0445192AEAA',10007304,'2022-12-24 14:35:38'),('192.168.167.189','9B3F5E5C589C6B362179DC8FF1BFF95D',10007304,'2023-01-10 09:49:57'),('192.168.167.189','9BD1C0E7C19E00AB6B0C993E81CBD9C7',10007304,'2023-02-16 11:14:13'),('192.168.167.189','9D0D7DB5FB73BB50E89D994FF6835E7C',10007304,'2023-02-11 10:12:51'),('192.168.167.189','9E7B4CE03DD372F61330A84E9683C24B',10007311,'2023-01-23 17:43:07'),('192.168.167.189','9F434269BA57F4CE874CEEC943B2ED10',10007304,'2023-01-05 12:37:18'),('192.168.167.189','9F9BA8B8187B5D3383D6D6FA927982B8',10007304,'2023-02-06 15:59:18'),('192.168.167.189','A0A4DEAA8E48466CB94F965BF273BC98',10007304,'2023-01-24 18:21:38'),('192.168.167.189','A20962DEB8A7881D3A80FB1E2981E098',10007304,'2022-12-24 15:39:00'),('192.168.167.189','A221034BB8EDA22EC8405E0C3FB00D3D',10007304,'2023-01-24 17:21:48'),('192.168.167.189','A282312578D70F75EA4948AEEAC0A44B',10007304,'2023-01-11 12:06:18'),('192.168.167.189','A2CAFD59C5815F0FC5C4A62E617A0BA8',10007304,'2023-02-23 09:48:55'),('192.168.167.189','A520D27D5257AA5F63DB6C33F73FD306',10007304,'2023-01-13 13:32:35'),('192.168.167.189','A5326308271531305BA9A9E927949412',10007304,'2023-02-17 09:44:35'),('192.168.167.189','A55050B4908D1FE10A9A376BC000A895',10007304,'2023-01-05 12:32:46'),('192.168.167.189','A5D1383B5199FECA4669D733D6948484',10007304,'2022-12-24 15:36:34'),('192.168.167.189','A6ED302480CF4DA7CF43F1AE13B649CB',10007304,'2022-12-30 13:40:47'),('192.168.167.189','A6FA1967DCC500B6D265EFE56AA8A9EB',10007304,'2023-01-11 17:37:30'),('192.168.167.189','A7A13C23A40BD66F6602BACE93680AAE',10007304,'2023-01-05 09:51:53'),('192.168.167.189','A8949C9544DA8D8105107480937A8461',10007304,'2022-12-26 01:14:11'),('192.168.167.189','A8ED7C1DF4D3322A543478B0471B7A45',10007304,'2022-12-21 13:53:18'),('192.168.167.189','A9B96B19B74D7D9E4158959ECDA35131',10007304,'2023-01-23 14:53:22'),('192.168.167.189','A9DDEC35C61B72377C984F9CD43A6BF6',10007304,'2022-12-23 11:50:44'),('192.168.167.189','AA7F836C98E8EC57D4D453159A0C9F4C',10007304,'2023-02-24 09:34:05'),('192.168.167.189','AB32038CDC95EEDEE4F05E386D1ED096',10007304,'2023-02-27 11:48:45'),('192.168.167.189','AD555EF424EDB0BF7F3E4B6575615EC6',10007304,'2023-01-02 11:03:54'),('192.168.167.189','AD8A732AE30B2845FC6673E3D3B1C190',10007304,'2023-01-10 09:40:03'),('192.168.167.189','ADEC3969AA2E34EF78207B465ED20DD2',10007304,'2023-02-13 15:01:05'),('192.168.167.189','AE1542F71F4292FAE08F5BC16125DADB',10007304,'2023-01-05 16:11:48'),('192.168.167.189','AEC3FE1B7981DFD9AAE9632EE2194D32',10007304,'2022-12-26 02:29:59'),('192.168.167.189','AF0B9866E5C36F81CDBC134E102B69B3',10007304,'2023-02-16 11:12:59'),('192.168.167.189','AFFE18E48527D358EF67536277DBD4A7',10007304,'2023-01-05 16:32:33'),('192.168.167.189','B07FAA08B489F1AA660355590429D4A4',10007304,'2023-01-24 14:17:58'),('192.168.167.189','B082284AD81284109E4B1C798BB752ED',10007304,'2022-12-23 10:07:13'),('192.168.167.189','B43C8D0C0ED442C3932BCE71F86A9FC4',10007304,'2023-01-05 12:24:39'),('192.168.167.189','B4B9F6D577437D623F36D56AF1ADE6B3',10007304,'2023-02-21 17:42:05'),('192.168.167.189','B4DE0C1B3E83032DB82F7254E461F90A',10007304,'2023-01-10 18:03:57'),('192.168.167.189','B4F760EF18D961EFEDB1093399DA0828',10007304,'2022-12-20 10:27:59'),('192.168.167.189','B64A4B338227D46261870352AFF2D270',10007304,'2022-12-27 17:39:34'),('192.168.167.189','B662F4670EA70C0CB3D745965A5350D1',10007304,'2023-02-24 16:10:18'),('192.168.167.189','B6A6716D1438F0627483BF6445A231F2',10007304,'2022-12-24 15:48:38'),('192.168.167.189','B762580A89C679713E090C257421B409',10007304,'2022-12-20 13:02:51'),('192.168.167.189','B78DBF25BCA3A8C02227A5932F95F0AE',10007304,'2023-02-23 12:29:27'),('192.168.167.189','B86F2327535BE5FB6CA7AB3249C0A5C2',10007304,'2023-01-23 15:43:24'),('192.168.167.189','B8B4D8376B9A807D464A456985153255',10007304,'2023-01-04 12:38:50'),('192.168.167.189','B9B3D44AA83AC2B92665E6297C3975D3',10007304,'2022-12-27 13:18:25'),('192.168.167.189','BAAAE29842F7EDAEDDB6D81DC5709255',10007304,'2023-01-05 09:37:30'),('192.168.167.189','BD470317B4B72F47D7E6262BA8E1F785',10007304,'2023-02-14 11:02:28'),('192.168.167.189','BD4C7ABA2F5EF3FFB9DA6A939831C79B',10007304,'2023-02-16 10:38:18'),('192.168.167.189','BDB99535CBB4477FF0EED5D6F63E215F',10007304,'2022-12-20 15:07:20'),('192.168.167.189','BDC2ABDFD2523537321A13FE3A6C532A',10007304,'2023-02-22 11:14:25'),('192.168.167.189','BE8EBE496E53E9A4BC3145BD204FBD96',10007304,'2023-01-31 10:45:07'),('192.168.167.189','C0C019914F68EB7BB283C6A55C4D76E0',10007304,'2023-02-06 12:19:42'),('192.168.167.189','C0C028640532BC533851CD7815BDF89C',10007308,'2023-01-23 17:10:47'),('192.168.167.189','C19A2518F6323C61FC6F84A63720D5ED',10007304,'2023-01-11 11:47:20'),('192.168.167.189','C1DC935342E3CDC8E272B4B6F3311B70',10007304,'2023-03-01 17:19:24'),('192.168.167.189','C1F275A371AA676AC13D3CBE9D32329B',10007304,'2022-12-20 18:35:26'),('192.168.167.189','C3B907B240921A420B863460CBA730C4',10007304,'2023-02-21 10:38:32'),('192.168.167.189','C4CB9653BF2A2DAD8A201545D8A21E99',10007304,'2023-01-05 12:12:30'),('192.168.167.189','C517AA6C1A35AB99898171576444AFF1',10007304,'2022-12-24 14:33:45'),('192.168.167.189','C538FC4C69DED20D6AB6CE47208AC727',10007304,'2023-01-28 11:44:30'),('192.168.167.189','C547F17EF44CDA65B83A1DC88958763D',10007304,'2022-12-19 16:35:21'),('192.168.167.189','C6AC20CA09D1F54E41C4B6322374DBE8',10007304,'2022-12-30 10:12:35'),('192.168.167.189','C6C6613D936894976ADEDE4B985158F0',10007304,'2023-02-21 12:16:20'),('192.168.167.189','C8D090CFDF465C9C4161FA0F601B7E7A',10007304,'2023-02-21 09:59:09'),('192.168.167.189','CC5228FAA5EA7AAC19702CB4C87B0417',10007304,'2023-02-17 11:24:07'),('192.168.167.189','CC6622D28C5411C5DFE4C68765E6413F',10007304,'2023-02-21 17:54:21'),('192.168.167.189','CCB132F8982CFD3F733D139DF3CB2B33',10007304,'2023-01-24 17:30:17'),('192.168.167.189','CD8A0D2A8B17C3751FBD49F3AED7A2D1',10007304,'2023-01-05 12:49:57'),('192.168.167.189','CD95D6F2C787F526A79C6F045DD71A0E',10007304,'2023-02-28 09:36:02'),('192.168.167.189','CDFA5330A215B53AE5CC179EC1DC974A',10007304,'2023-01-12 11:14:31'),('192.168.167.189','CE568F69CDDA5B8B568AC896EC933D2E',10007304,'2023-01-03 09:47:43'),('192.168.167.189','CF548E39CFD61CCBD2304EA7B1C36632',10007304,'2023-01-24 17:27:18'),('192.168.167.189','CF97B42FB92CEFCC709F32072FC1E24B',10007304,'2023-01-05 10:26:15'),('192.168.167.189','CFEA534CDAF3EAD83659C8C4EC8E206B',10007304,'2022-12-27 14:40:19'),('192.168.167.189','D0025BCC4A6D8ED2959FC981B3682B6B',10007304,'2023-02-21 13:34:48'),('192.168.167.189','D07C13C5AED43756D1ACC28825E065E7',10007304,'2023-01-23 12:06:52'),('192.168.167.189','D12F48853CB05C29FD5B954ADF03AC9B',10007304,'2022-12-26 09:41:01'),('192.168.167.189','D1592AE54D7972CB4499119E2D9C4367',10007304,'2022-12-22 10:32:10'),('192.168.167.189','D1A2C699CC01539B5F14836E5FFA03BE',10007304,'2023-01-24 16:59:53'),('192.168.167.189','D1C4804B698E3D6FEBFDB5B3818249A6',10007304,'2023-01-24 17:42:17'),('192.168.167.189','D1FE6086FE4445D934301DE2FC8E3C55',10007304,'2022-12-24 15:15:13'),('192.168.167.189','D482729AC3151D83917DC0F87F777BDA',10007304,'2023-02-06 09:40:01'),('192.168.167.189','D4C7C07CFD39595F7C23CA46E9BFB0C7',10007304,'2023-01-23 17:17:17'),('192.168.167.189','D4E0C053D20A415F12E470CEAF123A84',10007304,'2023-02-22 09:47:50'),('192.168.167.189','D5D8D5EEB33FC3064756F943DD95D7D3',10007304,'2023-03-02 18:02:24'),('192.168.167.189','D65F556DAC4272525CCF65259353092C',10007304,'2023-01-05 15:11:28'),('192.168.167.189','D678C2EDA6722CF2A659D2E94361550B',10007304,'2023-01-14 12:08:25'),('192.168.167.189','D681A72CFCBD12D173592D5FEF93CCE9',10007304,'2023-03-01 15:05:39'),('192.168.167.189','D777EA3F44EBF66A915075A673AB8A67',10007304,'2023-01-24 12:02:07'),('192.168.167.189','D78976F1AC81384441384C2D8F6296F9',10007304,'2023-02-16 17:41:22'),('192.168.167.189','D7FFC91E572A82116007CE9DB419B21C',10007304,'2023-01-27 14:23:34'),('192.168.167.189','D8ACA9DFD0D1CFD2A458C359195BA1FB',10007304,'2023-01-03 14:30:41'),('192.168.167.189','DA980069202A1D238FAABA5D4DCF1A19',10007304,'2023-03-02 18:21:41'),('192.168.167.189','DB2EDF5E29EA2DD3372A8B7B40044CDF',10007304,'2023-02-02 09:51:49'),('192.168.167.189','DBECAD15E72D358CE8C8A71641AAD8AF',10007304,'2023-01-24 17:43:54'),('192.168.167.189','DCFBD430E75A79235708CDF0B7DC3DFC',10007304,'2023-01-12 09:43:49'),('192.168.167.189','DDA6FAEF0A46136CBE68B312328B5FF3',10007304,'2023-02-24 15:01:09'),('192.168.167.189','DE5CD149BFE52C4C9F24050429D49B6C',10007304,'2023-02-21 18:53:20'),('192.168.167.189','DF2E7606AECBE043FE0319958F77FEF7',10007304,'2023-03-02 09:25:17'),('192.168.167.189','DF8E2C37791B72B5EA32E2C7991EA090',10007304,'2023-02-06 18:46:52'),('192.168.167.189','E09225662900B95C26EBF1AD56DC55DC',10007304,'2023-01-11 12:06:28'),('192.168.167.189','E2660CC425A96F088324E245368AB367',10007304,'2023-03-01 18:44:31'),('192.168.167.189','E348FF9CB68F8A52DA1FD7B80E5A64DF',10007304,'2022-12-30 16:02:46'),('192.168.167.189','E4959646223454EC3909E88D437D089B',10007304,'2022-12-24 11:48:49'),('192.168.167.189','E4F76A0DB129AE6D9AE2B9111A9B5677',10007304,'2022-12-22 17:25:14'),('192.168.167.189','E501102CDC2E8237DE08F30898CED2E4',10007304,'2023-01-10 10:25:40'),('192.168.167.189','E58486DDFC22F8DD06E9BF6586636203',10007304,'2023-02-21 18:24:53'),('192.168.167.189','E5BC61863681B5F1FFCF4EC95EC7B220',10007304,'2023-01-12 13:41:02'),('192.168.167.189','E6540F8DAB72824165AAE39E28598518',10007304,'2023-02-22 09:30:06'),('192.168.167.189','E788DED5C5FB8591A43203D364BE3C36',10007304,'2023-01-24 16:59:46'),('192.168.167.189','E83AAA46E2BB32A42791DF6AEC5CCDA3',10007304,'2023-02-21 16:53:04'),('192.168.167.189','E969A3C6C64E4DE7CF98113690D0F07F',10007304,'2023-02-06 12:21:23'),('192.168.167.189','E986DCD5342A62EC897D5280BFB12D10',10007304,'2023-01-24 17:00:00'),('192.168.167.189','EA2548D89564970E038992B7A616F986',10007304,'2023-02-15 14:58:10'),('192.168.167.189','EB40725D6E36C03F00373918B0676285',10007304,'2022-12-24 09:36:33'),('192.168.167.189','EB64DFC152FE2EC71224266852CB92B1',10007304,'2023-02-21 17:03:33'),('192.168.167.189','EBABAFDEA380F5AB60E5BCDF49FA51DE',10007304,'2023-01-27 13:00:44'),('192.168.167.189','EC0275847BF935616105472F48F0AC15',10007304,'2023-02-22 18:00:10'),('192.168.167.189','EC1DEFF379810E0387DF483BA4070AA1',10007304,'2023-02-16 11:13:06'),('192.168.167.189','EC2C0B557A0641D2354BBBB29392513A',10007304,'2023-02-14 10:01:46'),('192.168.167.189','EEE6FC4631CA096D595D41B151721542',10007304,'2022-12-24 14:40:05'),('192.168.167.189','F2CBB4402CEA631F403C9F59C39C2419',10007304,'2023-01-04 11:39:08'),('192.168.167.189','F2E8D9954E72C85CB7A0D57E873A6D34',10007304,'2022-12-30 09:34:40'),('192.168.167.189','F33C259DEE4097989C02C3F7A1939967',10007304,'2023-02-28 09:36:02'),('192.168.167.189','F3A36167D12607D33E09F3E1B92854DE',10007304,'2022-12-22 17:24:52'),('192.168.167.189','F3B4691A858D28FF922C5836FB8AE88B',10007304,'2023-01-03 14:07:45'),('192.168.167.189','F47D505465E1BEF672FF619B70724338',10007304,'2023-02-06 12:23:34'),('192.168.167.189','F532F4709BBC555DD1F7E256BCC6829A',10007304,'2022-12-23 09:35:05'),('192.168.167.189','F5AC9562A1823BAA9BB44C13AE5B91EA',10007304,'2023-01-30 09:45:11'),('192.168.167.189','F66173FC48D612131FE1F0A097BDA1E5',10007304,'2022-12-20 18:44:51'),('192.168.167.189','F67EEFC16F0B8F4B56A9CD3461F0EF2E',10007304,'2023-03-02 15:42:31'),('192.168.167.189','F6B99C2C19F41C927334CC7EA67FE0F3',10007304,'2023-02-04 17:16:51'),('192.168.167.189','F87DAC7276BE25923BE6CA0351A92425',10007304,'2023-01-24 09:34:15'),('192.168.167.189','F8B35180720FB9923997540B27535082',10007304,'2023-01-03 17:07:08'),('192.168.167.189','FA67227BD2949261513476D851CBFE0C',10007304,'2023-01-04 10:52:32'),('192.168.167.189','FACFB39BA64E348AA66B54A7F80ED9FF',10007304,'2022-12-29 19:45:04'),('192.168.167.189','FAED2445C58DB594A4784658B2837FC9',10007304,'2023-02-24 15:37:44'),('192.168.167.189','FB3014F77FCAF90F038670EAB5D37B0B',10007304,'2022-12-31 12:27:04'),('192.168.167.189','FB63BC9FA02C16906C5345DC43621C5E',10007304,'2023-01-02 11:09:49'),('192.168.167.189','FB73E63C3372CA13ECE56475F481F131',10007304,'2023-01-24 12:20:28'),('192.168.167.189','FC496913A010931ED3B06E63B7574F2E',10007304,'2023-02-28 18:00:21'),('192.168.167.189','FC5ED3963DDDE39D064D7B7F4FA4E30E',10007304,'2023-02-23 18:45:24'),('192.168.167.189','FC8BFD05E5E503CE28A597B6484FD829',10007304,'2023-01-24 17:42:15'),('192.168.167.189','FCA1C7CDD551B07589A13D4E2D83453A',10007304,'2023-02-14 10:03:13'),('192.168.167.189','FCF5694D7A2BF2CB1A067E02041D78DD',10007304,'2023-01-05 16:03:00'),('192.168.167.189','FCF9CFBEDC9CDF586CF25CE693425F83',10007304,'2023-01-04 17:59:34'),('192.168.167.189','FD084C5182D169E76DDD0DEB0AC648C8',10007304,'2023-01-12 14:54:41'),('192.168.167.189','FEFE9B640DDD26A0B77E2EA8B91F026C',10007304,'2023-02-20 09:31:30'),('192.168.167.189','FFDBA69FDE184695AEC3A9E10970E497',10007304,'2022-12-24 10:45:46'),('192.168.178.144','78C3D94F9E6DEFA037094BD9F53E30EE',10007312,'2023-03-01 10:29:26'),('192.168.178.144','9E7DFCF05CFA492DA0E83274EC38933C',10007312,'2023-03-01 12:24:26'),('192.168.180.144','C12A9824A5AC439ED5F52F45A39D50AB',10007312,'2023-03-02 13:08:11'),('192.168.194.33','4F6375AC8E128984F82ED1424654D655',10007304,'2023-01-05 17:02:16'),('192.168.194.33','658DA2E3D2986370A6FE5E790196F9EF',10007304,'2023-01-02 11:53:27'),('192.168.194.33','827B98907D7B466BFE039AB88E515799',10007304,'2023-01-03 12:31:04'),('192.168.194.33','F0F13E048FA8B049812D68EB5117FD67',10007304,'2023-01-10 17:05:09'),('192.168.202.144','2D19E40D9E68007ADFE7A3C2975D5872',10007312,'2023-02-25 12:47:34'),('192.168.221.144','49E44BF22D33551F0DEFF1B89C50961E',10007312,'2023-03-01 14:00:54'),('192.168.221.144','CBC5A9F3A723DD41405A2EA2646F53D3',10007312,'2023-03-01 14:02:56'),('192.168.223.144','344186ED122E4289EE68A8F2B2F9CE25',10007312,'2023-02-10 17:51:15'),('192.168.223.144','8F8D9890DFFF67A57CA29DD83520C2B9',10007312,'2023-02-10 16:26:04'),('192.168.223.144','9469BD47B1463BF20BE5C0A2D673A8F2',10007312,'2023-02-10 16:02:02'),('192.168.223.144','BDC5C89E74A171C070E19A42442EAB89',10007312,'2023-02-10 15:23:27'),('192.168.228.118','1A9BD01D73C420ED568512B16BC085DA',10007304,'2023-04-22 09:46:41'),('192.168.228.118','3EFE66E6518F0FEB41E749BE98482A35',10007304,'2023-04-21 12:23:23'),('192.168.228.118','4A843CBAA7E6242AA021202E3B87071C',10007304,'2023-04-21 11:06:41'),('192.168.228.118','D9423B615BAC3DBA396FB3CEFD366EE9',10007304,'2023-04-21 12:23:23'),('192.168.228.118','E64FB118A39223B5EFEFE35D9DE7BD21',10007304,'2023-04-21 20:29:59'),('192.168.230.144','7E39C3D17C02D014684C9ACBC3655811',10007312,'2023-02-10 12:08:39'),('192.168.236.33','D4601A3C4879944B9640BE60185928EC',10007304,'2022-12-14 18:28:06'),('192.168.241.144','0E4E862A15FC5FE778AEB48B87D3E7AA',10007312,'2023-02-06 17:33:25'),('192.168.243.144','1B7BF1C9D29C7AEC97949D8207DE9813',10007312,'2023-02-06 10:22:21'),('192.168.243.144','50CBAAE0EA02758C512F80667471C423',10007312,'2023-02-06 12:24:00'),('192.168.243.144','BF74C9D6271E81157A9C85EC3F321FDF',10007312,'2023-02-06 13:10:33'),('192.168.244.189','28B94FAFAA29F95B4F5D0EA49299A0AD',10007304,'2023-03-06 10:07:18'),('192.168.244.189','468533E27BAA60DB6D8E96DCD525D59E',10007304,'2023-03-06 15:42:06'),('192.168.244.189','B033491190F0A949279C7E2A7AE18110',10007304,'2023-03-06 17:39:54'),('192.168.244.189','E3D161767C0E9089027E57BECA086616',10007304,'2023-03-06 09:53:33'),('192.168.253.144','16D99D8DB8BAB8CC7F829784A0DB856D',10007312,'2023-03-01 16:54:21'),('192.168.253.144','731805F530E9D163AADAE5FFAAFB4D76',10007312,'2023-03-01 17:01:10'),('192.168.253.144','7C270E49180E4BFAF33EB889303199D3',10007312,'2023-02-09 11:04:48'),('192.168.253.144','7EC08707E33DB114BC6451A46BB84CCE',10007312,'2023-03-01 17:03:34'),('192.168.253.144','A207166A92539F71DB43F22B80091A19',10007312,'2023-03-01 16:19:43'),('192.168.253.144','B417547970C7C29B5782C39B3FA016D7',10007312,'2023-03-01 17:29:13'),('192.168.253.33','13DA12C5034974F0F8C3E475CD7CBC2E',10007304,'2023-02-08 10:40:52'),('192.168.253.33','168CBAA440D150D0119B188F4490FC8C',10007307,'2023-02-06 13:23:16'),('192.168.253.33','55DDA88F10DC9BB1C5E5ECE4EAC6ACE2',10007307,'2023-02-07 13:34:49'),('192.168.253.33','B2C737AA8F9AEDF146B72A9B628B0CDB',10007304,'2023-02-04 13:00:14'),('192.168.253.33','EF17EEA5BE5CF5ABD66A2C65D325AD61',10007307,'2023-02-04 14:12:51'),('192.168.254.189','04122B6F98DC36CA3D947019A048AFBA',10007304,'2022-12-17 10:45:17'),('192.168.254.189','04222CF2755E01EBF7E8ADEFF8D0C2E2',10007304,'2022-12-19 01:07:35'),('192.168.254.189','13E29D1A9D7A57DCF407B5995A4DFA2A',10007304,'2022-12-17 13:57:02'),('192.168.254.189','322F900422101BBE7DA771DE1BB3A501',10007304,'2022-12-14 18:30:37'),('192.168.254.189','3E4E36172E3F2B3115358245057D127B',10007304,'2022-12-14 18:30:38'),('192.168.254.189','44EF2DDA0FFFC030B0642188C31C73FA',10007304,'2022-12-14 18:30:38'),('192.168.254.189','46E7F184FE17077036CCC1A5D28CBF99',10007304,'2022-12-18 23:00:44'),('192.168.254.189','535BABECBD0092071EF7E58737EF417C',10007304,'2022-12-14 19:26:58'),('192.168.254.189','5B2456E9B5519611768F81B1951A9867',10007304,'2022-12-16 09:35:28'),('192.168.254.189','62B25D51FF626F39DACD68421D123F0C',10007304,'2022-12-17 12:42:47'),('192.168.254.189','6FA3B3F2F0BFCF13FABFF226322D459C',10007304,'2022-12-17 16:36:08'),('192.168.254.189','7D9036A7EB8FA50390120D77AE074D29',10007304,'2022-12-14 18:30:38'),('192.168.254.189','8502127A9304DA1998CBFC05729868F2',10007304,'2022-12-14 18:30:38'),('192.168.254.189','93ADB3D32045143B64B20426E98BDF43',10007304,'2022-12-15 09:45:01'),('192.168.254.189','B54446975373A723166BABD5C6FE120E',10007304,'2022-12-16 12:23:35'),('192.168.254.189','BD18892DC3BF02C8F9ADD3128AE52009',10007304,'2022-12-17 09:48:46'),('192.168.254.189','C0CD822E28BBFB45F6BC7A45986C9FAC',10007304,'2022-12-18 22:53:52'),('192.168.254.189','CE50C2818BE59F144FF50FB0946E0D26',10007304,'2022-12-16 14:55:09'),('192.168.254.189','D45D6C90BA2A4C475EA3C2C22CD23738',10007304,'2022-12-17 17:55:16'),('192.168.254.189','F87E9566003C15B7A3714DE2284C75CB',10007304,'2022-12-14 18:30:38'),('192.168.29.6','0A3D55EC07B91CF4E7EB9607D0D9C59E',10007312,'2023-02-20 09:27:38'),('192.168.29.6','0BF19292B9746C40A2CC393D6851D466',10007312,'2023-02-24 22:32:02'),('192.168.29.6','0DC0CE39402B019B681461F20AC3EF1D',10007312,'2023-02-17 12:23:08'),('192.168.29.6','1C577E7D97BAE9EDE8FBC17D9998BE1D',10007312,'2023-02-18 16:49:53'),('192.168.29.6','2266D9B7C318243D9CDE0CCF3BA86F3C',10007312,'2023-02-20 10:52:56'),('192.168.29.6','2A80B1BBE928BBA6C801BB05026CECDD',10007312,'2023-02-18 11:48:08'),('192.168.29.6','3B31F2A443B760B4D3E822DD76C22B27',10007312,'2023-02-19 21:40:48'),('192.168.29.6','4157BC03F3BE320E774A959431218AAB',10007312,'2023-02-16 23:04:53'),('192.168.29.6','43E858F8312BD8468EE4CD0DD6ACAD9E',10007312,'2023-02-19 22:17:47'),('192.168.29.6','49371A151D2F7DAB7D3C7507DA9D3297',10007312,'2023-02-19 22:16:26'),('192.168.29.6','4D82EA95957624F48FEF8F7E0454F2B6',10007312,'2023-02-18 12:47:24'),('192.168.29.6','4DDE4542AEA516A49F13ECB6C6C2EE81',10007312,'2023-02-17 17:13:37'),('192.168.29.6','55A86489C17B422F7488FC47FFC09CEC',10007312,'2023-02-14 17:43:31'),('192.168.29.6','67567759C5C8A56F6EC2E52F39148EA7',10007312,'2023-02-16 10:19:25'),('192.168.29.6','680A961527AF767BD21801F6AD28D440',10007312,'2023-02-23 15:40:43'),('192.168.29.6','715174D86580F41EEE895B3B0CCE4ED0',10007312,'2023-02-18 16:15:51'),('192.168.29.6','777D275CF407DF7EEDC4BD24C09E0A05',10007312,'2023-02-15 14:25:01'),('192.168.29.6','78DBEFD24B2B463C0E94CC8B2DB6FF63',10007312,'2023-02-15 12:21:30'),('192.168.29.6','79FBDD3A163D5666A2F122C20F82B4DA',10007312,'2023-02-16 18:36:32'),('192.168.29.6','7CD6BE7D97ED3E4423A5BA64F12A3596',10007312,'2023-02-20 09:45:23'),('192.168.29.6','901A7455D551947E08D53B449507C2E9',10007307,'2023-04-21 13:49:56'),('192.168.29.6','9B399CD127C72FF26B2F0807A9E549C4',10007312,'2023-02-18 15:16:22'),('192.168.29.6','9B88E62DC5B0C1107A24A71FCB2A9314',10007307,'2023-04-21 11:42:32'),('192.168.29.6','A541B47A1DA5FCA4ACECAD59B52D70C1',10007312,'2023-02-14 23:49:26'),('192.168.29.6','A55D3A978858B724706632C9B4E2B399',10007312,'2023-02-15 13:28:45'),('192.168.29.6','ABB9602854617201DC2C07181F8BB4EE',10007312,'2023-02-18 17:49:40'),('192.168.29.6','B1EA61778DFAE3585EEBBD8E8072F998',10007312,'2023-02-20 10:29:26'),('192.168.29.6','B436F4698FCAAF9C35F145ABCFB9CB26',10007312,'2023-02-22 18:17:12'),('192.168.29.6','BCBA8E2C4223FC41B3BFE24AD6EDA9A8',10007312,'2023-02-18 17:11:14'),('192.168.29.6','CC8137F49513D395AA0F9EB7B4B38E12',10007312,'2023-02-18 17:14:57'),('192.168.29.6','CD695123F470556E8F68B544CE3DA129',10007312,'2023-02-15 16:49:13'),('192.168.29.6','ECF1BAE4E0235E8F6DBEEA1809D50E7A',10007312,'2023-02-16 17:43:29'),('192.168.29.6','EF2B6E4A72612120B6E34D1DF5FB6B26',10007312,'2023-02-15 15:59:07'),('192.168.29.6','F0EEAC036D4725BEDF287BA64E7810BC',10007312,'2023-02-22 17:02:12'),('192.168.29.6','F65119A254725AE65AC42B4C337E57B9',10007312,'2023-02-14 18:34:04'),('192.168.29.6','FB4A13122F02CF52DC7C8F7D399F3C97',10007312,'2023-02-18 18:30:19'),('192.168.31.144','7CA02D7BCD5E298D38006496D069316D',10007312,'2023-02-27 12:02:17'),('192.168.31.33','5D44DADE37BC20627DE6C4AB393CC33F',10007307,'2023-02-17 11:20:17'),('192.168.38.33','DFCA9A302928769171716AC9145787DD',10007304,'2023-01-14 17:11:06'),('192.168.39.144','8A42BB7652489642077E3643F820B62F',10007312,'2023-02-01 10:21:14'),('192.168.43.174','3EBAE8D7A946E39CFBCECF7B22BDB6B2',10007304,'2023-02-28 22:14:43'),('192.168.43.6','2ED44F6CD0E2CCB9874493D21413BFB4',10007312,'2023-01-31 12:55:51'),('192.168.43.6','8AED3CCC33EBEF7CFFFE79983E36C6D6',10007312,'2023-01-31 13:01:48'),('192.168.43.6','95255F539A9572DB9EEC6541D4381106',10007312,'2023-01-31 13:07:32'),('192.168.43.6','B51CFBE1B27ACC2A67FF955C981C79A5',10007312,'2023-03-01 13:06:40'),('192.168.43.7','04E4F89E1B5C92180B6B3330D12342F1',10007304,'2023-01-13 18:14:51'),('192.168.43.7','70D5F7818B82E4E557EF7CE0CAF5D6D9',10007304,'2023-01-13 18:14:53'),('192.168.43.82','1574E9DF24606BE8BF220E4A5ABBE0A0',10007304,'2023-02-03 10:21:23'),('192.168.43.82','23DA70D354A4B1A1547991AAF8AA9BA4',10007304,'2023-02-03 09:50:21'),('192.168.43.82','2BF735C734AA56EDF4A0790B7D377EE2',10007304,'2023-01-31 15:09:19'),('192.168.43.82','2CDEF5BC4EFF9E17B73D7491605BAF7E',10007304,'2023-01-25 16:57:55'),('192.168.43.82','35E49CA36014797BEC77D389D9CDB7BD',10007304,'2023-01-30 17:43:52'),('192.168.43.82','399C9AAD90960C8A8325FA3A25DE78ED',10007304,'2023-01-27 17:03:04'),('192.168.43.82','3D2962153097C9C88B6E18608BFF320D',10007304,'2023-02-01 09:41:19'),('192.168.43.82','55D64F3C317F8DED5B2938A8F70235B4',10007304,'2023-01-24 10:02:07'),('192.168.43.82','57A593B8CF50969E3E902EE5CBEEF01F',10007304,'2023-01-31 10:06:34'),('192.168.43.82','7C13F20A58C179742C2BE5DFA81990BD',10007304,'2023-01-30 18:00:12'),('192.168.43.82','7D5002FEA2662C6E53261040B79125E8',10007304,'2023-02-02 09:48:43'),('192.168.43.82','D80ADAE96DB095A612D26D1AA1B10BA9',10007304,'2023-01-27 17:28:39'),('192.168.43.82','E4405C719440D9743CB828680E26BDA9',10007304,'2023-01-24 16:40:19'),('192.168.43.82','E7647A8502157937F025F8C6D7B8795E',10007304,'2023-01-25 09:42:31'),('192.168.43.82','FEE8E0870070BEF7DFE1BF77A03CB8AA',10007304,'2023-02-01 14:59:32'),('192.168.45.144','0196A890A4416717CB04CABF3A482B40',10007312,'2023-01-31 13:40:20'),('192.168.47.144','CF305229D4662432B1F9A10793BCB65D',10007312,'2023-03-06 09:42:49'),('192.168.59.144','7F8B20D82EF2BA09AACED7F1EE417E1C',10007312,'2023-03-05 18:34:27'),('192.168.64.33','104314AE6FA696610708DF789E8D866B',10007304,'2023-04-18 00:19:09'),('192.168.64.33','1D45ABA5C7FAA87D8799A6A628F394CB',10007304,'2023-04-18 11:42:12'),('192.168.64.33','40139763B588E80151D13E00F04D3B54',10007304,'2023-04-17 23:55:49'),('192.168.64.33','4AE3BD2D62C1F00B68B35B76B3AD6322',10007304,'2023-04-18 12:07:07'),('192.168.64.33','79A700514FE1F14A88BA4A64D4E3E01F',10007304,'2023-04-18 11:27:32'),('192.168.64.33','86FD7C2D6E88D2B587DAB0F583E7842E',10007304,'2023-04-18 16:07:42'),('192.168.64.33','C18C5EF42D3E7BCBA9246BB6D4F9DECE',10007304,'2023-04-18 12:01:48'),('192.168.64.33','CCBABCCE68CCBD3D62867491EC0273BE',10007304,'2023-04-18 15:28:54'),('192.168.64.33','DD88CAA3DB6B42179275FBC5BEF64165',10007304,'2023-04-18 15:26:32'),('192.168.64.33','F6193521096384CFB7C612F8686DFA8C',10007304,'2023-04-17 23:54:51'),('192.168.76.13','4ABC95ECBAECBE244AC5FCE9C5B6BCFB',10007304,'2023-02-02 14:06:13'),('192.168.76.13','6E33F48254348A6AAB432CC05C7BF56B',10007304,'2023-02-01 10:52:04'),('192.168.76.13','C43D83EDE88DDF52F2450C0B2D8AA768',10007304,'2023-01-30 22:09:22'),('192.168.78.144','7A8CAF355FA7E9183554AA952D146444',10007312,'2023-03-04 13:01:42'),('192.168.78.144','CCFE8980EBC7637D98834AC4733C448E',10007312,'2023-03-04 13:59:24'),('192.168.83.144','66AB54BEE27BFB058BA6FD1DC563B878',10007312,'2023-01-31 12:30:07'),('192.168.83.144','EEC9B6DBF7256D79178FC06830611EEC',10007312,'2023-01-31 12:25:04'),('192.168.85.33','86A19A7E871FCC5C464C1AE588B27485',10007304,'2023-01-24 12:56:36'),('192.168.88.2','03E586DB2EACFDF4C5C030614A8AC294',10007304,'2023-02-06 17:13:15'),('192.168.88.2','08F6E1B80811C64B2AAAB00CA14A04DD',10007304,'2023-02-08 10:09:24'),('192.168.88.2','0B30072518BDC0E2537DDC55F205BD42',10007304,'2023-02-07 13:21:26'),('192.168.88.2','45776CD76D50E4F1DEA99E9C5E0EF01F',10007304,'2023-02-08 10:44:29'),('192.168.88.2','49F2044ED562398EE0C532925CCE9C2D',10007304,'2023-02-04 01:54:26'),('192.168.88.2','4E4910FE050DF3A28FFD6F74391903C6',10007304,'2023-02-06 18:47:46'),('192.168.88.2','6B52033EEDF2B23122CD9B6C9E8D479B',10007304,'2023-02-07 15:53:43'),('192.168.88.2','B1AC8EC418365614936193BAA4BA669D',10007304,'2023-02-04 12:36:34'),('192.168.88.2','F5E96D74301143596352504DC7571FAB',10007304,'2023-02-06 18:07:16'),('192.168.92.144','5ABD8FF70ED112BA6816DE907E10A7FC',10007312,'2023-02-09 15:25:16'),('192.168.92.144','A3753F90A67068952E4986C6DD2C5590',10007312,'2023-02-09 13:48:22'),('192.168.92.144','CAC3F93DBC7F4503A67036FD28E6093B',10007312,'2023-02-09 18:29:52'),('192.168.95.121','C8D680FF30143A68ED79E97FE69D565D',10007304,'2023-04-22 10:51:10'),('210.16.92.0','796FC928BBDA0F4EC19324D211ACC32A',10007304,'2023-04-18 13:58:42'),('210.16.92.0','DA6469F51FBFA5A93F6DE9485B3ABFF8',10007304,'2023-04-19 06:08:14'),('49.248.197.50','219DE66BCBE7B30CCEB26BFDEEC949E6',10007304,'2023-04-20 12:28:36'),('49.248.197.50','AE7A5DF9E2B2CCEF09A5557583963F32',10007304,'2023-04-21 08:40:42'),('49.37.117.176','AE4F0C383248D61BC414CBA1F7DB26F4',10007304,'2023-04-19 06:08:27'); +/*!40000 ALTER TABLE `sec_user_sessions` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `sec_users` +-- + +DROP TABLE IF EXISTS `sec_users`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `sec_users` ( + `user_id` bigint NOT NULL, + `is_complete` bit(1) NOT NULL, + `about` varchar(255) DEFAULT NULL, + `access_duration` bigint DEFAULT NULL, + `change_passw` varchar(255) DEFAULT NULL, + `checknumber` bigint DEFAULT NULL, + `country` varchar(255) DEFAULT NULL, + `createby` varchar(255) DEFAULT NULL, + `createdate` datetime DEFAULT NULL, + `customer_id` bigint DEFAULT NULL, + `days_mth` varchar(255) DEFAULT NULL, + `dep_string` varchar(255) DEFAULT NULL, + `email` varchar(255) DEFAULT NULL, + `expiry_date` datetime DEFAULT NULL, + `first_login` varchar(255) DEFAULT NULL, + `full_name` varchar(255) DEFAULT NULL, + `is_blocked` bit(1) NOT NULL, + `lang_code` varchar(255) DEFAULT NULL, + `last_pwd_changed_date` datetime DEFAULT NULL, + `mob_no` bigint DEFAULT NULL, + `no_days_mth` bigint DEFAULT NULL, + `notification` varchar(255) DEFAULT NULL, + `password1` varchar(255) DEFAULT NULL, + `password2` varchar(255) DEFAULT NULL, + `password3` varchar(255) DEFAULT NULL, + `password4` varchar(255) DEFAULT NULL, + `photo` longblob, + `photo_name` varchar(255) DEFAULT NULL, + `provider` varchar(255) DEFAULT NULL, + `pwd_changed_cnt` bigint DEFAULT NULL, + `random_no` varchar(255) DEFAULT NULL, + `short_name` varchar(255) DEFAULT NULL, + `status` varchar(255) DEFAULT NULL, + `title` varchar(255) DEFAULT NULL, + `updateby` varchar(255) DEFAULT NULL, + `updatedate` datetime DEFAULT NULL, + `user_passw` varchar(255) DEFAULT NULL, + `user_name` varchar(255) DEFAULT NULL, + `usr_grp_id` bigint DEFAULT NULL, + `working` varchar(255) DEFAULT NULL, + `account_id` bigint DEFAULT NULL, + `department_code` varchar(255) DEFAULT NULL, + `position_code` varchar(255) DEFAULT NULL, + `usr_grp` bigint DEFAULT NULL, + PRIMARY KEY (`user_id`), + UNIQUE KEY `UK_fw34bx9q2ss6bto160uppxg9t` (`user_name`), + KEY `FKs6u4j3tx3oafeuph5ou29qwd9` (`account_id`), + KEY `FK755v9w0tyoeq5v61egs6jsvv8` (`department_code`), + KEY `FKnuiei3fcu2t6k16v1dthw5bvh` (`position_code`), + KEY `FKl26vrpflaga4edp953i7c7i7` (`usr_grp`), + CONSTRAINT `FK755v9w0tyoeq5v61egs6jsvv8` FOREIGN KEY (`department_code`) REFERENCES `department` (`department_code`), + CONSTRAINT `FKl26vrpflaga4edp953i7c7i7` FOREIGN KEY (`usr_grp`) REFERENCES `sec_user_group` (`usr_grp`), + CONSTRAINT `FKnuiei3fcu2t6k16v1dthw5bvh` FOREIGN KEY (`position_code`) REFERENCES `position` (`position_code`), + CONSTRAINT `FKs6u4j3tx3oafeuph5ou29qwd9` FOREIGN KEY (`account_id`) REFERENCES `sys_accounts` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `sec_users` +-- + +LOCK TABLES `sec_users` WRITE; +/*!40000 ALTER TABLE `sec_users` DISABLE KEYS */; +INSERT INTO `sec_users` VALUES (10007304,_binary '',NULL,NULL,'test',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'admin',NULL,NULL,'admin',_binary '\0',NULL,NULL,123,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'$2a$10$Z/qB46BXJC.15psWvLA6wuRsKhnDyHgHNLzOs9tlE70AnCZTjo4IW','admin123',1,NULL,1,NULL,NULL,1),(10007307,_binary '',NULL,NULL,'test3',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sysadmin',NULL,NULL,'piya khose',_binary '\0',NULL,NULL,76756765,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'$2a$10$y0hwswpMqYRtlMJoNzpYBe45VDI8SQX/4K4OjzKYX9NHmN1HPZmIu','sysadmin',NULL,NULL,1,NULL,NULL,1),(10007308,_binary '',NULL,NULL,'test5',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sysadmin',NULL,NULL,'siya jfhjd',_binary '\0',NULL,NULL,7654645784,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'$2a$10$CBo5GAvkdD6p/rUmUDcd6uRVLEyw104hl3RJ72KfU6uDiwGZG/itu','siya@gmail.com',NULL,NULL,1,NULL,NULL,1),(10007311,_binary '',NULL,NULL,'ash1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ash@gmail.com',NULL,NULL,'ash1 ka',_binary '\0',NULL,NULL,7649345683,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'$2a$10$7C48mZGQwGEtY.6UzyABA.D1CB3Tj75DChkEYhrWrLMihyfit6bLG','ash@gmail.com',NULL,NULL,1,NULL,NULL,1),(10007312,_binary '',NULL,NULL,'gaurav',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'gaurav@gmail.com',NULL,NULL,'gaurav kumar',_binary '\0',NULL,NULL,9856875635,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'$2a$10$WmNZeqBaDJJu0KaIFc01g.tVuIDe5XXFvKY.MrI1PYSIfwf/PqeJq','gaurav@gmail.com',NULL,NULL,1,NULL,NULL,1),(10007316,_binary '',NULL,NULL,'ashwini',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ashwini@gmail.com',NULL,NULL,'ashwini kad',_binary '\0',NULL,NULL,8796456785,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'$2a$10$T0kd.0Z3a3I7IZwgRN65RO7EJWLmNT2CFuXN7aPojXq/GVYsC0152','ashwini@gmail.com',NULL,NULL,1,NULL,NULL,1); +/*!40000 ALTER TABLE `sec_users` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `sec_users_sequencs` +-- + +DROP TABLE IF EXISTS `sec_users_sequencs`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `sec_users_sequencs` ( + `next_val` bigint DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `sec_users_sequencs` +-- + +LOCK TABLES `sec_users_sequencs` WRITE; +/*!40000 ALTER TABLE `sec_users_sequencs` DISABLE KEYS */; +INSERT INTO `sec_users_sequencs` VALUES (10007317),(10007300),(10007300),(10007300),(10007300),(10007300); +/*!40000 ALTER TABLE `sec_users_sequencs` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `secuser_roles` +-- + +DROP TABLE IF EXISTS `secuser_roles`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `secuser_roles` ( + `secuser_id` bigint NOT NULL, + `role_id` bigint NOT NULL, + PRIMARY KEY (`secuser_id`,`role_id`), + KEY `FKqori0nm574l1ipruo5f47crex` (`role_id`), + CONSTRAINT `FK321c4ykolkm3cy98bxmf4kn05` FOREIGN KEY (`secuser_id`) REFERENCES `sec_users` (`user_id`), + CONSTRAINT `FKqori0nm574l1ipruo5f47crex` FOREIGN KEY (`role_id`) REFERENCES `role` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `secuser_roles` +-- + +LOCK TABLES `secuser_roles` WRITE; +/*!40000 ALTER TABLE `secuser_roles` DISABLE KEYS */; +INSERT INTO `secuser_roles` VALUES (10007304,1),(10007307,1),(10007308,1),(10007311,1),(10007316,1); +/*!40000 ALTER TABLE `secuser_roles` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `sys_accounts` +-- + +DROP TABLE IF EXISTS `sys_accounts`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `sys_accounts` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `company_name` varchar(255) DEFAULT NULL, + `email` varchar(255) DEFAULT NULL, + `gst_no` varchar(255) DEFAULT NULL, + `mobile` varchar(255) DEFAULT NULL, + `pancard` varchar(255) DEFAULT NULL, + `working` varchar(255) DEFAULT NULL, + `workspace` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `sys_accounts` +-- + +LOCK TABLES `sys_accounts` WRITE; +/*!40000 ALTER TABLE `sys_accounts` DISABLE KEYS */; +INSERT INTO `sys_accounts` VALUES (1,NULL,NULL,NULL,NULL,NULL,NULL,NULL); +/*!40000 ALTER TABLE `sys_accounts` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `sys_accounts_users` +-- + +DROP TABLE IF EXISTS `sys_accounts_users`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `sys_accounts_users` ( + `sys_accounts_id` bigint NOT NULL, + `users_user_id` bigint NOT NULL, + UNIQUE KEY `UK_8dxppqkque5ehofdy83bntgks` (`users_user_id`), + KEY `FKs9o1t4hyiyq2y330p0d2evf2a` (`sys_accounts_id`), + CONSTRAINT `FKdkc60wy8v55ylspegueinngjx` FOREIGN KEY (`users_user_id`) REFERENCES `sec_users` (`user_id`), + CONSTRAINT `FKs9o1t4hyiyq2y330p0d2evf2a` FOREIGN KEY (`sys_accounts_id`) REFERENCES `sys_accounts` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `sys_accounts_users` +-- + +LOCK TABLES `sys_accounts_users` WRITE; +/*!40000 ALTER TABLE `sys_accounts_users` DISABLE KEYS */; +/*!40000 ALTER TABLE `sys_accounts_users` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `user_list` +-- + +DROP TABLE IF EXISTS `user_list`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `user_list` ( + `id` bigint NOT NULL, + `about` varchar(255) DEFAULT NULL, + `account_id` varchar(255) DEFAULT NULL, + `address1` varchar(255) DEFAULT NULL, + `address2` varchar(255) DEFAULT NULL, + `checknumber` varchar(255) DEFAULT NULL, + `company` varchar(255) DEFAULT NULL, + `country` varchar(255) DEFAULT NULL, + `created_at` varchar(255) DEFAULT NULL, + `created_by` varchar(255) DEFAULT NULL, + `default_customer_id` varchar(255) DEFAULT NULL, + `department` varchar(255) DEFAULT NULL, + `dob` varchar(255) DEFAULT NULL, + `email` varchar(255) DEFAULT NULL, + `enable_beta_testing` bit(1) NOT NULL, + `enable_renewal` bit(1) NOT NULL, + `firstname` varchar(255) DEFAULT NULL, + `fullname` varchar(255) DEFAULT NULL, + `gender` varchar(255) DEFAULT NULL, + `is_active` bit(1) NOT NULL, + `is_blocked` bit(1) NOT NULL, + `lastname` varchar(255) DEFAULT NULL, + `managing_work` varchar(255) DEFAULT NULL, + `menu_group` int NOT NULL, + `name` varchar(255) DEFAULT NULL, + `other_roles` varchar(255) DEFAULT NULL, + `pancard` varchar(255) DEFAULT NULL, + `password` varchar(255) DEFAULT NULL, + `phone` varchar(255) DEFAULT NULL, + `photos` varchar(255) DEFAULT NULL, + `postal` varchar(255) DEFAULT NULL, + `role` varchar(255) DEFAULT NULL, + `secret_answer` varchar(255) DEFAULT NULL, + `secret_question` varchar(255) DEFAULT NULL, + `security_provider_id` varchar(255) DEFAULT NULL, + `status` varchar(255) DEFAULT NULL, + `updated_at` varchar(255) DEFAULT NULL, + `updated_by` varchar(255) DEFAULT NULL, + `user_id` varchar(255) DEFAULT NULL, + `username` varchar(255) DEFAULT NULL, + `working` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `user_list` +-- + +LOCK TABLES `user_list` WRITE; +/*!40000 ALTER TABLE `user_list` DISABLE KEYS */; +/*!40000 ALTER TABLE `user_list` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `userloginhist` +-- + +DROP TABLE IF EXISTS `userloginhist`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `userloginhist` ( + `create_by` varchar(255) DEFAULT NULL, + `create_date` datetime DEFAULT NULL, + `expiry_reminder` bigint DEFAULT NULL, + `last_login_date` datetime DEFAULT NULL, + `last_password_chg_date` datetime DEFAULT NULL, + `last_password_fail_no` bigint DEFAULT NULL, + `update_by` varchar(255) DEFAULT NULL, + `update_date` datetime DEFAULT NULL, + `user_id` bigint NOT NULL, + PRIMARY KEY (`user_id`), + CONSTRAINT `FK2a2xifc15js82mjl20honhdfr` FOREIGN KEY (`user_id`) REFERENCES `sec_users` (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `userloginhist` +-- + +LOCK TABLES `userloginhist` WRITE; +/*!40000 ALTER TABLE `userloginhist` DISABLE KEYS */; +/*!40000 ALTER TABLE `userloginhist` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `userpasswlog` +-- + +DROP TABLE IF EXISTS `userpasswlog`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `userpasswlog` ( + `create_date` datetime NOT NULL, + `user_id` bigint NOT NULL, + `user_passw` varchar(255) NOT NULL, + `create_by` varchar(255) DEFAULT NULL, + `update_by` varchar(255) DEFAULT NULL, + `update_date` datetime DEFAULT NULL, + PRIMARY KEY (`create_date`,`user_id`,`user_passw`), + KEY `FKpd759n25auh4bw5ri0xikikia` (`user_id`), + CONSTRAINT `FKpd759n25auh4bw5ri0xikikia` FOREIGN KEY (`user_id`) REFERENCES `sec_users` (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `userpasswlog` +-- + +LOCK TABLES `userpasswlog` WRITE; +/*!40000 ALTER TABLE `userpasswlog` DISABLE KEYS */; +/*!40000 ALTER TABLE `userpasswlog` ENABLE KEYS */; +UNLOCK TABLES; +SET @@SESSION.SQL_LOG_BIN = @MYSQLDUMP_TEMP_LOG_BIN; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2023-04-22 18:52:13 diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/.gitignore b/prod116rb-front-f/authsec_flutterNewUi/base_project/.gitignore new file mode 100644 index 0000000..29a3a50 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/.gitignore @@ -0,0 +1,43 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.pub-cache/ +.pub/ +/build/ + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/.metadata b/prod116rb-front-f/authsec_flutterNewUi/base_project/.metadata new file mode 100644 index 0000000..9cef17b --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/.metadata @@ -0,0 +1,30 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "b0850beeb25f6d5b10426284f506557f66181b36" + channel: "stable" + +project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: b0850beeb25f6d5b10426284f506557f66181b36 + base_revision: b0850beeb25f6d5b10426284f506557f66181b36 + - platform: web + create_revision: b0850beeb25f6d5b10426284f506557f66181b36 + base_revision: b0850beeb25f6d5b10426284f506557f66181b36 + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/README.md b/prod116rb-front-f/authsec_flutterNewUi/base_project/README.md new file mode 100644 index 0000000..66f4275 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/README.md @@ -0,0 +1,16 @@ +# base_project + +A new Flutter project. + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) + +For help getting started with Flutter development, view the +[online documentation](https://docs.flutter.dev/), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/analysis_options.yaml b/prod116rb-front-f/authsec_flutterNewUi/base_project/analysis_options.yaml new file mode 100644 index 0000000..0d29021 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/analysis_options.yaml @@ -0,0 +1,28 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at https://dart.dev/lints. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/android/.gitignore b/prod116rb-front-f/authsec_flutterNewUi/base_project/android/.gitignore new file mode 100644 index 0000000..6f56801 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/android/.gitignore @@ -0,0 +1,13 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +key.properties +**/*.keystore +**/*.jks diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/android/app/build.gradle b/prod116rb-front-f/authsec_flutterNewUi/base_project/android/app/build.gradle new file mode 100644 index 0000000..ab2f65c --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/android/app/build.gradle @@ -0,0 +1,58 @@ +plugins { + id "com.android.application" + id "kotlin-android" + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. + id "dev.flutter.flutter-gradle-plugin" +} + +def localProperties = new Properties() +def localPropertiesFile = rootProject.file("local.properties") +if (localPropertiesFile.exists()) { + localPropertiesFile.withReader("UTF-8") { reader -> + localProperties.load(reader) + } +} + +def flutterVersionCode = localProperties.getProperty("flutter.versionCode") +if (flutterVersionCode == null) { + flutterVersionCode = "1" +} + +def flutterVersionName = localProperties.getProperty("flutter.versionName") +if (flutterVersionName == null) { + flutterVersionName = "1.0" +} + +android { + namespace = "com.example.base_project" + compileSdk = flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId = "com.example.base_project" + // You can update the following values to match your application needs. + // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. + minSdkVersion 24 + targetSdk = flutter.targetSdkVersion + versionCode = flutterVersionCode.toInteger() + versionName = flutterVersionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig = signingConfigs.debug + } + } +} + +flutter { + source = "../.." +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/android/app/src/debug/AndroidManifest.xml b/prod116rb-front-f/authsec_flutterNewUi/base_project/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000..399f698 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/android/app/src/main/AndroidManifest.xml b/prod116rb-front-f/authsec_flutterNewUi/base_project/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..44ec250 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/android/app/src/main/kotlin/com/example/base_project/MainActivity.kt b/prod116rb-front-f/authsec_flutterNewUi/base_project/android/app/src/main/kotlin/com/example/base_project/MainActivity.kt new file mode 100644 index 0000000..d905807 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/android/app/src/main/kotlin/com/example/base_project/MainActivity.kt @@ -0,0 +1,5 @@ +package com.example.base_project + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/android/app/src/main/res/drawable-v21/launch_background.xml b/prod116rb-front-f/authsec_flutterNewUi/base_project/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 0000000..f74085f --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/android/app/src/main/res/drawable/launch_background.xml b/prod116rb-front-f/authsec_flutterNewUi/base_project/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 0000000..304732f --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..db77bb4 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..17987b7 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..09d4391 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..d5f1c8d Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..4d6372e Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/android/app/src/main/res/values-night/styles.xml b/prod116rb-front-f/authsec_flutterNewUi/base_project/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 0000000..06952be --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/android/app/src/main/res/values/styles.xml b/prod116rb-front-f/authsec_flutterNewUi/base_project/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..cb1ef88 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/android/app/src/profile/AndroidManifest.xml b/prod116rb-front-f/authsec_flutterNewUi/base_project/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000..399f698 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/android/build.gradle b/prod116rb-front-f/authsec_flutterNewUi/base_project/android/build.gradle new file mode 100644 index 0000000..d2ffbff --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/android/build.gradle @@ -0,0 +1,18 @@ +allprojects { + repositories { + google() + mavenCentral() + } +} + +rootProject.buildDir = "../build" +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(":app") +} + +tasks.register("clean", Delete) { + delete rootProject.buildDir +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/android/gradle.properties b/prod116rb-front-f/authsec_flutterNewUi/base_project/android/gradle.properties new file mode 100644 index 0000000..3b5b324 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx4G -XX:+HeapDumpOnOutOfMemoryError +android.useAndroidX=true +android.enableJetifier=true diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/android/gradle/wrapper/gradle-wrapper.properties b/prod116rb-front-f/authsec_flutterNewUi/base_project/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..e1ca574 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/android/settings.gradle b/prod116rb-front-f/authsec_flutterNewUi/base_project/android/settings.gradle new file mode 100644 index 0000000..536165d --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/android/settings.gradle @@ -0,0 +1,25 @@ +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + }() + + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "7.3.0" apply false + id "org.jetbrains.kotlin.android" version "1.7.10" apply false +} + +include ":app" diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/icon/bubbles.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/icon/bubbles.svg new file mode 100644 index 0000000..d12979b --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/icon/bubbles.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/icon/close.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/icon/close.svg new file mode 100644 index 0000000..bd3cc97 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/icon/close.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/icon/fail.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/icon/fail.svg new file mode 100644 index 0000000..85ea52d --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/icon/fail.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/icon/icon.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/icon/icon.png new file mode 100644 index 0000000..41e834f Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/icon/icon.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/Transparent .png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/Transparent .png new file mode 100644 index 0000000..d9a9be0 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/Transparent .png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/add-group.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/add-group.png new file mode 100644 index 0000000..a1ce558 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/add-group.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/allproj.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/allproj.png new file mode 100644 index 0000000..160c824 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/allproj.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/award.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/award.png new file mode 100644 index 0000000..041450d Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/award.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/bell2.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/bell2.png new file mode 100644 index 0000000..45ae3ef Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/bell2.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/bubbles.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/bubbles.svg new file mode 100644 index 0000000..2b16755 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/bubbles.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/close.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/close.svg new file mode 100644 index 0000000..2f27b86 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/close.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/cloudnsuresp.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/cloudnsuresp.svg new file mode 100644 index 0000000..dd7dd7a --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/cloudnsuresp.svg @@ -0,0 +1,190 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/cricGroundOverlay.jpg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/cricGroundOverlay.jpg new file mode 100644 index 0000000..c218e9d Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/cricGroundOverlay.jpg differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/cricket_ball_14.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/cricket_ball_14.png new file mode 100644 index 0000000..9a4e412 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/cricket_ball_14.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/download.jpeg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/download.jpeg new file mode 100644 index 0000000..e5bca5d Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/download.jpeg differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/englandRoundFlag.jpg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/englandRoundFlag.jpg new file mode 100644 index 0000000..28dcda4 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/englandRoundFlag.jpg differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/fast-response.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/fast-response.png new file mode 100644 index 0000000..53ad95b Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/fast-response.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/forget-password.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/forget-password.png new file mode 100644 index 0000000..4b5adea Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/forget-password.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/frame_2.jpeg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/frame_2.jpeg new file mode 100644 index 0000000..b5e5d62 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/frame_2.jpeg differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/hadwin_system/cldnsure.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/hadwin_system/cldnsure.png new file mode 100644 index 0000000..890f7bd Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/hadwin_system/cldnsure.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/hadwin_system/hadwin-splash-screen-logo.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/hadwin_system/hadwin-splash-screen-logo.png new file mode 100644 index 0000000..4f3d4ce Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/hadwin_system/hadwin-splash-screen-logo.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/homeIcon1000.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/homeIcon1000.svg new file mode 100644 index 0000000..356ec13 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/homeIcon1000.svg @@ -0,0 +1,15 @@ + + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/image.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/image.png new file mode 100644 index 0000000..21206bd Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/image.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/image_195.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/image_195.png new file mode 100644 index 0000000..f7bac57 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/image_195.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/image_2.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/image_2.png new file mode 100644 index 0000000..99d77aa Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/image_2.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/image_204.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/image_204.png new file mode 100644 index 0000000..a7e0371 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/image_204.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/image_4.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/image_4.png new file mode 100644 index 0000000..fc3c457 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/image_4.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/image_5.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/image_5.png new file mode 100644 index 0000000..3d88af8 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/image_5.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/image_6.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/image_6.png new file mode 100644 index 0000000..0c034ae Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/image_6.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/image_65.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/image_65.png new file mode 100644 index 0000000..7b0683b Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/image_65.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/image_7.gif b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/image_7.gif new file mode 100644 index 0000000..72c5604 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/image_7.gif differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/image_not_found.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/image_not_found.png new file mode 100644 index 0000000..840d828 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/image_not_found.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/image_removebg_preview_1.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/image_removebg_preview_1.png new file mode 100644 index 0000000..89c2bbb Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/image_removebg_preview_1.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_1200pxdocxicon.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_1200pxdocxicon.png new file mode 100644 index 0000000..c7d4c9a Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_1200pxdocxicon.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_1200pxpdffileicon.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_1200pxpdffileicon.png new file mode 100644 index 0000000..9ede32e Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_1200pxpdffileicon.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_2560pxstripel.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_2560pxstripel.png new file mode 100644 index 0000000..d689612 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_2560pxstripel.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_81_48x48.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_81_48x48.png new file mode 100644 index 0000000..ef55893 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_81_48x48.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_airplane_black_900.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_airplane_black_900.svg new file mode 100644 index 0000000..2ca1aa0 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_airplane_black_900.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_alfred_kenneall.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_alfred_kenneall.png new file mode 100644 index 0000000..48bc8a0 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_alfred_kenneall.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_appstoreicon.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_appstoreicon.png new file mode 100644 index 0000000..5e590c4 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_appstoreicon.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrow_left.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrow_left.svg new file mode 100644 index 0000000..a99cfa2 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrow_left.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowdown.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowdown.svg new file mode 100644 index 0000000..fd39b88 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowdown.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowdown_blue_gray_200.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowdown_blue_gray_200.svg new file mode 100644 index 0000000..e096498 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowdown_blue_gray_200.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowdown_blue_gray_400.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowdown_blue_gray_400.svg new file mode 100644 index 0000000..370fd5c --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowdown_blue_gray_400.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowdown_blue_gray_600.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowdown_blue_gray_600.svg new file mode 100644 index 0000000..790b643 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowdown_blue_gray_600.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowgrowthsolid_red_700.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowgrowthsolid_red_700.svg new file mode 100644 index 0000000..b9e0c8a --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowgrowthsolid_red_700.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowleft.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowleft.svg new file mode 100644 index 0000000..580b8d8 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowleft.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowleft_blue_gray_900.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowleft_blue_gray_900.svg new file mode 100644 index 0000000..580b8d8 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowleft_blue_gray_900.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowright.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowright.svg new file mode 100644 index 0000000..63bc36f --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowright.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowright_blue_a700_1.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowright_blue_a700_1.svg new file mode 100644 index 0000000..0b6911d --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowright_blue_a700_1.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowright_blue_gray_400.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowright_blue_gray_400.svg new file mode 100644 index 0000000..63bc36f --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowright_blue_gray_400.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowright_blue_gray_600.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowright_blue_gray_600.svg new file mode 100644 index 0000000..8dfeb18 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowright_blue_gray_600.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowright_blue_gray_600_1.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowright_blue_gray_600_1.svg new file mode 100644 index 0000000..6ca99c8 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowright_blue_gray_600_1.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowright_white_a700.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowright_white_a700.svg new file mode 100644 index 0000000..1d1f306 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowright_white_a700.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowup_blue_gray_400.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowup_blue_gray_400.svg new file mode 100644 index 0000000..4d9b7fb --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowup_blue_gray_400.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowup_green_600.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowup_green_600.svg new file mode 100644 index 0000000..e0b756c --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_arrowup_green_600.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_batball.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_batball.svg new file mode 100644 index 0000000..1dbdd3a --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_batball.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_bluetoothbsolid.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_bluetoothbsolid.svg new file mode 100644 index 0000000..66205bd --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_bluetoothbsolid.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_brightness.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_brightness.svg new file mode 100644 index 0000000..92e26c8 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_brightness.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_bx_cricket_ball.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_bx_cricket_ball.svg new file mode 100644 index 0000000..878b582 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_bx_cricket_ball.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_calendar.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_calendar.svg new file mode 100644 index 0000000..6271087 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_calendar.svg @@ -0,0 +1,4 @@ + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_calendar_24x24.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_calendar_24x24.svg new file mode 100644 index 0000000..79ad353 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_calendar_24x24.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_calendar_blue_gray_400.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_calendar_blue_gray_400.svg new file mode 100644 index 0000000..5e0e86b --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_calendar_blue_gray_400.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_call.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_call.svg new file mode 100644 index 0000000..db62efd --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_call.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_car.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_car.svg new file mode 100644 index 0000000..38a669c --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_car.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_chart.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_chart.png new file mode 100644 index 0000000..3c0460b Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_chart.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_chartsmicro_blue_50_1.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_chartsmicro_blue_50_1.svg new file mode 100644 index 0000000..b1f9f9a --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_chartsmicro_blue_50_1.svg @@ -0,0 +1,4 @@ + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_chartsmicro_blue_50_45x150.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_chartsmicro_blue_50_45x150.svg new file mode 100644 index 0000000..af4146e --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_chartsmicro_blue_50_45x150.svg @@ -0,0 +1,4 @@ + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_check1.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_check1.png new file mode 100644 index 0000000..b9608d8 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_check1.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_checkbox.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_checkbox.svg new file mode 100644 index 0000000..eeba937 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_checkbox.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_checkmark.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_checkmark.svg new file mode 100644 index 0000000..5aeb0e3 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_checkmark.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_checkmark_16x16.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_checkmark_16x16.svg new file mode 100644 index 0000000..57ca573 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_checkmark_16x16.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_checkmark_56x56.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_checkmark_56x56.svg new file mode 100644 index 0000000..cb75c8f --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_checkmark_56x56.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_checkmark_green_600.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_checkmark_green_600.svg new file mode 100644 index 0000000..cb75c8f --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_checkmark_green_600.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_clock.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_clock.svg new file mode 100644 index 0000000..5528126 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_clock.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_close.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_close.svg new file mode 100644 index 0000000..35ac382 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_close.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_close_18x18.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_close_18x18.svg new file mode 100644 index 0000000..ec82728 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_close_18x18.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_close_24x24.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_close_24x24.svg new file mode 100644 index 0000000..01cf3bc --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_close_24x24.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_close_32x48.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_close_32x48.svg new file mode 100644 index 0000000..74442be --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_close_32x48.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_close_53x53.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_close_53x53.svg new file mode 100644 index 0000000..b850a2e --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_close_53x53.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_companylogo.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_companylogo.png new file mode 100644 index 0000000..6eac3d0 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_companylogo.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_contrast.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_contrast.svg new file mode 100644 index 0000000..fe4f391 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_contrast.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_cricyard_1.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_cricyard_1.png new file mode 100644 index 0000000..c72aee3 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_cricyard_1.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_dashboard.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_dashboard.svg new file mode 100644 index 0000000..45bd79d --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_dashboard.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_download.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_download.svg new file mode 100644 index 0000000..730f783 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_download.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_edit.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_edit.svg new file mode 100644 index 0000000..e3c1696 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_edit.svg @@ -0,0 +1,4 @@ + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ellipse12_24x24_1.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ellipse12_24x24_1.png new file mode 100644 index 0000000..ae82ea4 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ellipse12_24x24_1.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ellipse12_24x24_2.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ellipse12_24x24_2.png new file mode 100644 index 0000000..3846b4e Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ellipse12_24x24_2.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ellipse13_24x25_1.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ellipse13_24x25_1.png new file mode 100644 index 0000000..af45d4e Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ellipse13_24x25_1.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ellipse13_24x25_2.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ellipse13_24x25_2.png new file mode 100644 index 0000000..981cdbb Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ellipse13_24x25_2.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ellipse15_24x24.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ellipse15_24x24.png new file mode 100644 index 0000000..0b396af Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ellipse15_24x24.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ellipse27_18x18.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ellipse27_18x18.png new file mode 100644 index 0000000..bf13985 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ellipse27_18x18.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ellipse28.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ellipse28.png new file mode 100644 index 0000000..3b025b3 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ellipse28.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ellipse3_60x60_1.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ellipse3_60x60_1.png new file mode 100644 index 0000000..0e73dd6 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ellipse3_60x60_1.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ellipse3_60x60_2.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ellipse3_60x60_2.png new file mode 100644 index 0000000..069646a Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ellipse3_60x60_2.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ellipse54_18x18.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ellipse54_18x18.png new file mode 100644 index 0000000..43224d3 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ellipse54_18x18.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ellipse5_150x150.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ellipse5_150x150.png new file mode 100644 index 0000000..bf76190 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ellipse5_150x150.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ellipse66_24x24.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ellipse66_24x24.png new file mode 100644 index 0000000..8912bc2 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ellipse66_24x24.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ellipse_22.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ellipse_22.png new file mode 100644 index 0000000..6f37d6b Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ellipse_22.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_eye.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_eye.svg new file mode 100644 index 0000000..23c96b8 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_eye.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_facebook.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_facebook.svg new file mode 100644 index 0000000..6bee2d5 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_facebook.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_facebook_ic.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_facebook_ic.svg new file mode 100644 index 0000000..1c028a4 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_facebook_ic.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_file.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_file.svg new file mode 100644 index 0000000..1cea5a1 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_file.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_file_16x16.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_file_16x16.svg new file mode 100644 index 0000000..6fcb158 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_file_16x16.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_file_24x24.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_file_24x24.svg new file mode 100644 index 0000000..3b48b8f --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_file_24x24.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_file_26x26.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_file_26x26.svg new file mode 100644 index 0000000..5b2d3cf --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_file_26x26.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_fingerprint.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_fingerprint.svg new file mode 100644 index 0000000..2257974 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_fingerprint.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_fire.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_fire.svg new file mode 100644 index 0000000..ebcebf3 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_fire.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_flagargentina1.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_flagargentina1.png new file mode 100644 index 0000000..d13fa2e Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_flagargentina1.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_flagargentina1_1.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_flagargentina1_1.png new file mode 100644 index 0000000..5c7964d Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_flagargentina1_1.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_flagargentina1_32x48.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_flagargentina1_32x48.png new file mode 100644 index 0000000..fada4f8 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_flagargentina1_32x48.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_fluent_live_24_filled.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_fluent_live_24_filled.svg new file mode 100644 index 0000000..56cce0c --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_fluent_live_24_filled.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_forward.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_forward.svg new file mode 100644 index 0000000..2baed4d --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_forward.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_frame9880.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_frame9880.svg new file mode 100644 index 0000000..5f91dff --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_frame9880.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_globe.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_globe.svg new file mode 100644 index 0000000..d871f37 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_globe.svg @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_globe_18x18.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_globe_18x18.svg new file mode 100644 index 0000000..79407d2 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_globe_18x18.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_globe_white_a700.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_globe_white_a700.svg new file mode 100644 index 0000000..7ddbf38 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_globe_white_a700.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_globe_white_a700_18x18.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_globe_white_a700_18x18.svg new file mode 100644 index 0000000..3f745f1 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_globe_white_a700_18x18.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_globe_yellow_800.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_globe_yellow_800.svg new file mode 100644 index 0000000..19ef74f --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_globe_yellow_800.svg @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_globe_yellow_800_18x18.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_globe_yellow_800_18x18.svg new file mode 100644 index 0000000..1c94314 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_globe_yellow_800_18x18.svg @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_good.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_good.png new file mode 100644 index 0000000..7037b64 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_good.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_google.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_google.svg new file mode 100644 index 0000000..3919517 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_google.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_google_ic.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_google_ic.svg new file mode 100644 index 0000000..c27017a --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_google_ic.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_googleadsenselogo.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_googleadsenselogo.png new file mode 100644 index 0000000..04781ed Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_googleadsenselogo.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_grid.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_grid.svg new file mode 100644 index 0000000..1f8a0f1 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_grid.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_group10210.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_group10210.svg new file mode 100644 index 0000000..bb989fd --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_group10210.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_group10451.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_group10451.svg new file mode 100644 index 0000000..bed88cb --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_group10451.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_group10720.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_group10720.svg new file mode 100644 index 0000000..817a5b8 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_group10720.svg @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_group10737.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_group10737.svg new file mode 100644 index 0000000..d84b62e --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_group10737.svg @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_group10785.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_group10785.svg new file mode 100644 index 0000000..5babd1e --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_group10785.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_group1830.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_group1830.svg new file mode 100644 index 0000000..b7a1412 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_group1830.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_group185.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_group185.svg new file mode 100644 index 0000000..f2880e6 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_group185.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_group2507.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_group2507.svg new file mode 100644 index 0000000..ca9b28b --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_group2507.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_group97.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_group97.svg new file mode 100644 index 0000000..e689767 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_group97.svg @@ -0,0 +1,4 @@ + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_group9839.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_group9839.svg new file mode 100644 index 0000000..2a76589 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_group9839.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_group_146.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_group_146.svg new file mode 100644 index 0000000..1e217fb --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_group_146.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_group_3090.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_group_3090.svg new file mode 100644 index 0000000..8da8f81 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_group_3090.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_image122.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_image122.png new file mode 100644 index 0000000..96eb7dc Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_image122.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_image123.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_image123.png new file mode 100644 index 0000000..fe1acca Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_image123.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_image124.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_image124.png new file mode 100644 index 0000000..1f8103d Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_image124.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_image125.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_image125.png new file mode 100644 index 0000000..acd33cf Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_image125.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_image_1.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_image_1.png new file mode 100644 index 0000000..ebc5e0d Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_image_1.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_image_2.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_image_2.png new file mode 100644 index 0000000..77c53c1 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_image_2.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_image_3.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_image_3.png new file mode 100644 index 0000000..29b7c7f Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_image_3.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_image_5_1.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_image_5_1.png new file mode 100644 index 0000000..f27eeda Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_image_5_1.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_image_removebg_preview.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_image_removebg_preview.png new file mode 100644 index 0000000..8f23df7 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_image_removebg_preview.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_indian_premimum.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_indian_premimum.png new file mode 100644 index 0000000..2fe5662 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_indian_premimum.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_info.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_info.svg new file mode 100644 index 0000000..669b57a --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_info.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_lightbulb.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_lightbulb.svg new file mode 100644 index 0000000..ef3c3db --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_lightbulb.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_linkedin.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_linkedin.svg new file mode 100644 index 0000000..6e3cf85 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_linkedin.svg @@ -0,0 +1,4 @@ + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_linkedin_1_1.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_linkedin_1_1.svg new file mode 100644 index 0000000..4b60552 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_linkedin_1_1.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_location.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_location.svg new file mode 100644 index 0000000..bb7b432 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_location.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_location_20x20.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_location_20x20.svg new file mode 100644 index 0000000..b71041b --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_location_20x20.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_lock.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_lock.svg new file mode 100644 index 0000000..8f4e07e --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_lock.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_lock_24x24.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_lock_24x24.svg new file mode 100644 index 0000000..9dd3176 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_lock_24x24.svg @@ -0,0 +1,4 @@ + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_lock_53x53.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_lock_53x53.svg new file mode 100644 index 0000000..3587f28 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_lock_53x53.svg @@ -0,0 +1,4 @@ + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_login.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_login.png new file mode 100644 index 0000000..f50a608 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_login.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_mail.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_mail.svg new file mode 100644 index 0000000..320c937 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_mail.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_map.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_map.svg new file mode 100644 index 0000000..9e3a578 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_map.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_menu.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_menu.svg new file mode 100644 index 0000000..2f9b93f --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_menu.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_menu_1.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_menu_1.svg new file mode 100644 index 0000000..2f9b93f --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_menu_1.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_microphone.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_microphone.svg new file mode 100644 index 0000000..a4c9c35 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_microphone.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_microphone_20x20.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_microphone_20x20.svg new file mode 100644 index 0000000..6ea429d --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_microphone_20x20.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_minimize.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_minimize.svg new file mode 100644 index 0000000..c3f0024 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_minimize.svg @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_minussolid.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_minussolid.svg new file mode 100644 index 0000000..d760f6a --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_minussolid.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_mobile.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_mobile.svg new file mode 100644 index 0000000..06454c4 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_mobile.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_moonoutline.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_moonoutline.svg new file mode 100644 index 0000000..402b607 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_moonoutline.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_music.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_music.svg new file mode 100644 index 0000000..4afbd6e --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_music.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_notification.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_notification.svg new file mode 100644 index 0000000..bc6f202 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_notification.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_overflowmenu.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_overflowmenu.svg new file mode 100644 index 0000000..5850aa5 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_overflowmenu.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_overflowmenu_1.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_overflowmenu_1.svg new file mode 100644 index 0000000..8a8af58 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_overflowmenu_1.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_overflowmenu_16x16.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_overflowmenu_16x16.svg new file mode 100644 index 0000000..b2096fd --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_overflowmenu_16x16.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_overflowmenu_white_a700.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_overflowmenu_white_a700.svg new file mode 100644 index 0000000..a0e6a66 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_overflowmenu_white_a700.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_pic.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_pic.png new file mode 100644 index 0000000..e8892ed Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_pic.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_pic_1.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_pic_1.png new file mode 100644 index 0000000..8604403 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_pic_1.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_pic_2.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_pic_2.png new file mode 100644 index 0000000..24c9ad3 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_pic_2.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_pic_3.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_pic_3.png new file mode 100644 index 0000000..a1a8ba9 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_pic_3.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_pic_4.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_pic_4.png new file mode 100644 index 0000000..c27807e Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_pic_4.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_pic_44x44.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_pic_44x44.png new file mode 100644 index 0000000..b761582 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_pic_44x44.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_pic_44x44_1.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_pic_44x44_1.png new file mode 100644 index 0000000..e8892ed Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_pic_44x44_1.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_pic_44x44_2.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_pic_44x44_2.png new file mode 100644 index 0000000..8604403 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_pic_44x44_2.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_pic_44x44_3.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_pic_44x44_3.png new file mode 100644 index 0000000..c27807e Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_pic_44x44_3.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_pic_50x50_1.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_pic_50x50_1.png new file mode 100644 index 0000000..4dc7bae Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_pic_50x50_1.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_pic_50x50_2.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_pic_50x50_2.png new file mode 100644 index 0000000..64143eb Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_pic_50x50_2.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_pic_50x50_3.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_pic_50x50_3.png new file mode 100644 index 0000000..3cc99de Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_pic_50x50_3.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_play.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_play.svg new file mode 100644 index 0000000..d52124f --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_play.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_plus_1.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_plus_1.svg new file mode 100644 index 0000000..fd05f6e --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_plus_1.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_plus_40x40.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_plus_40x40.svg new file mode 100644 index 0000000..42d9426 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_plus_40x40.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_plus_white_a700.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_plus_white_a700.svg new file mode 100644 index 0000000..001057e --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_plus_white_a700.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_profileimglarge_25.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_profileimglarge_25.png new file mode 100644 index 0000000..8ac3543 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_profileimglarge_25.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_profileimglarge_40x40_1.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_profileimglarge_40x40_1.png new file mode 100644 index 0000000..7556e22 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_profileimglarge_40x40_1.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_profileimglarge_40x40_2.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_profileimglarge_40x40_2.png new file mode 100644 index 0000000..52e928c Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_profileimglarge_40x40_2.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_profileimglarge_40x40_3.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_profileimglarge_40x40_3.png new file mode 100644 index 0000000..cca8a2f Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_profileimglarge_40x40_3.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_profileimglarge_40x40_4.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_profileimglarge_40x40_4.png new file mode 100644 index 0000000..5ac2409 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_profileimglarge_40x40_4.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_question.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_question.svg new file mode 100644 index 0000000..c1b48a0 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_question.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_question_24x24.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_question_24x24.svg new file mode 100644 index 0000000..2158aa2 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_question_24x24.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle1.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle1.png new file mode 100644 index 0000000..25f8be7 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle1.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle1_16x16.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle1_16x16.png new file mode 100644 index 0000000..c2c6890 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle1_16x16.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle1_16x16_1.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle1_16x16_1.png new file mode 100644 index 0000000..c2c6890 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle1_16x16_1.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle_102x102_1.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle_102x102_1.png new file mode 100644 index 0000000..1e8b570 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle_102x102_1.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle_126x126_1.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle_126x126_1.png new file mode 100644 index 0000000..16648a6 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle_126x126_1.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle_126x126_2.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle_126x126_2.png new file mode 100644 index 0000000..08dc7b5 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle_126x126_2.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle_126x126_3.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle_126x126_3.png new file mode 100644 index 0000000..add230a Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle_126x126_3.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle_126x126_4.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle_126x126_4.png new file mode 100644 index 0000000..7263027 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle_126x126_4.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle_126x126_5.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle_126x126_5.png new file mode 100644 index 0000000..a440e54 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle_126x126_5.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle_126x126_6.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle_126x126_6.png new file mode 100644 index 0000000..fdcc1c5 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle_126x126_6.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle_126x126_7.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle_126x126_7.png new file mode 100644 index 0000000..84ea180 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle_126x126_7.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle_126x126_8.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle_126x126_8.png new file mode 100644 index 0000000..c9a59ec Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle_126x126_8.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle_3.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle_3.png new file mode 100644 index 0000000..a3a31f9 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle_3.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle_32.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle_32.png new file mode 100644 index 0000000..1e709d9 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle_32.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle_5.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle_5.png new file mode 100644 index 0000000..998314e Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rectangle_5.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_refresh.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_refresh.svg new file mode 100644 index 0000000..23836dd --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_refresh.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_refresh_24x24.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_refresh_24x24.svg new file mode 100644 index 0000000..986c325 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_refresh_24x24.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rupaylogo1.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rupaylogo1.png new file mode 100644 index 0000000..5f24744 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rupaylogo1.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rupaylogo1_18x56.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rupaylogo1_18x56.png new file mode 100644 index 0000000..7b7fe78 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_rupaylogo1_18x56.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_search.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_search.svg new file mode 100644 index 0000000..4fdc2f6 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_search.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_search_blue_a100.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_search_blue_a100.svg new file mode 100644 index 0000000..c47f242 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_search_blue_a100.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_search_blue_a700.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_search_blue_a700.svg new file mode 100644 index 0000000..34889c9 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_search_blue_a700.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_search_blue_gray_200.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_search_blue_gray_200.svg new file mode 100644 index 0000000..6b6560e --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_search_blue_gray_200.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_search_blue_gray_400.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_search_blue_gray_400.svg new file mode 100644 index 0000000..5229c4d --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_search_blue_gray_400.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_search_blue_gray_900.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_search_blue_gray_900.svg new file mode 100644 index 0000000..b609db6 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_search_blue_gray_900.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_search_white_a700.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_search_white_a700.svg new file mode 100644 index 0000000..30b5679 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_search_white_a700.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_search_white_a700_20x20.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_search_white_a700_20x20.svg new file mode 100644 index 0000000..1a2bbfe --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_search_white_a700_20x20.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_settings.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_settings.svg new file mode 100644 index 0000000..1bae507 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_settings.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_settings_1.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_settings_1.svg new file mode 100644 index 0000000..70dd7e8 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_settings_1.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_settings_24x24.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_settings_24x24.svg new file mode 100644 index 0000000..6b5c8b8 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_settings_24x24.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_share_24x24.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_share_24x24.svg new file mode 100644 index 0000000..3f95560 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_share_24x24.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_signal.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_signal.svg new file mode 100644 index 0000000..1aaac0f --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_signal.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_signal_10x56.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_signal_10x56.svg new file mode 100644 index 0000000..9b2a9c4 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_signal_10x56.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_signal_gray_500.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_signal_gray_500.svg new file mode 100644 index 0000000..5da6168 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_signal_gray_500.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_smartwatchwhitesportband.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_smartwatchwhitesportband.svg new file mode 100644 index 0000000..264ffd7 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_smartwatchwhitesportband.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_sort.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_sort.svg new file mode 100644 index 0000000..1d12390 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_sort.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_sportscricket.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_sportscricket.svg new file mode 100644 index 0000000..020d356 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_sportscricket.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_star.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_star.svg new file mode 100644 index 0000000..97b2176 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_star.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ticket.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ticket.svg new file mode 100644 index 0000000..f5cb64c --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ticket.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ticket_20x20.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ticket_20x20.svg new file mode 100644 index 0000000..07be546 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_ticket_20x20.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_trash.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_trash.svg new file mode 100644 index 0000000..138193f --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_trash.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_twitter.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_twitter.svg new file mode 100644 index 0000000..af8d42f --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_twitter.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_twitter_20x20.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_twitter_20x20.svg new file mode 100644 index 0000000..ad05a20 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_twitter_20x20.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_uiiconmoonlight.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_uiiconmoonlight.svg new file mode 100644 index 0000000..a172efa --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_uiiconmoonlight.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_unsplashenrurz62wui_50x50.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_unsplashenrurz62wui_50x50.png new file mode 100644 index 0000000..9b9c2d4 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_unsplashenrurz62wui_50x50.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_upload.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_upload.svg new file mode 100644 index 0000000..2273af0 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_upload.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_user.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_user.svg new file mode 100644 index 0000000..1d9b202 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_user.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_user_24x24.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_user_24x24.svg new file mode 100644 index 0000000..749b4eb --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_user_24x24.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_vector.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_vector.svg new file mode 100644 index 0000000..35b78cf --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_vector.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_vector3_gray_900_01.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_vector3_gray_900_01.svg new file mode 100644 index 0000000..6a9a90f --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_vector3_gray_900_01.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_vector_blue_a700_13x141.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_vector_blue_a700_13x141.svg new file mode 100644 index 0000000..adf5001 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_vector_blue_a700_13x141.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_vector_blue_a700_34x360.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_vector_blue_a700_34x360.svg new file mode 100644 index 0000000..40be370 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_vector_blue_a700_34x360.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_vector_red_600.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_vector_red_600.svg new file mode 100644 index 0000000..9a4cb46 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_vector_red_600.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_volume.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_volume.svg new file mode 100644 index 0000000..ebf0037 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_volume.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_vscodeiconsfiletypeexcel.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_vscodeiconsfiletypeexcel.svg new file mode 100644 index 0000000..9782da0 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_vscodeiconsfiletypeexcel.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_whatsapp.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_whatsapp.svg new file mode 100644 index 0000000..aea236b --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_whatsapp.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_wordpresslogo1.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_wordpresslogo1.png new file mode 100644 index 0000000..a8d5239 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_wordpresslogo1.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_x32location_red_700.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_x32location_red_700.svg new file mode 100644 index 0000000..4293605 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/img_x32location_red_700.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/istockphoto_177427917170667_a_1.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/istockphoto_177427917170667_a_1.png new file mode 100644 index 0000000..058286c Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/istockphoto_177427917170667_a_1.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/main-menu.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/main-menu.png new file mode 100644 index 0000000..c590fb5 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/main-menu.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/myproj.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/myproj.png new file mode 100644 index 0000000..be9ded6 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/myproj.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/notification_assets/file-error.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/notification_assets/file-error.png new file mode 100644 index 0000000..57c9996 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/notification_assets/file-error.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/notification_assets/no-wifi.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/notification_assets/no-wifi.png new file mode 100644 index 0000000..7cbef0a Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/notification_assets/no-wifi.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/panther.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/panther.png new file mode 100644 index 0000000..50605d2 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/panther.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/paytm1.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/paytm1.png new file mode 100644 index 0000000..3e8e43d Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/paytm1.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/razorpay.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/razorpay.png new file mode 100644 index 0000000..b2b44b2 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/razorpay.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/scoreboard.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/scoreboard.png new file mode 100644 index 0000000..89d06f2 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/scoreboard.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/sharedwme.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/sharedwme.png new file mode 100644 index 0000000..bc1903c Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/sharedwme.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/shrilanka.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/shrilanka.png new file mode 100644 index 0000000..caf9671 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/shrilanka.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/team.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/team.png new file mode 100644 index 0000000..b01984c Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/team.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/transfer.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/transfer.png new file mode 100644 index 0000000..ad5a8ac Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/transfer.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/userImage.avif b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/userImage.avif new file mode 100644 index 0000000..cecf6ae Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/images/userImage.avif differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/vectors/ellipse_70_x4.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/vectors/ellipse_70_x4.svg new file mode 100644 index 0000000..729653d --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/vectors/ellipse_70_x4.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/vectors/ellipse_71_x4.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/vectors/ellipse_71_x4.svg new file mode 100644 index 0000000..e60c7fe --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/vectors/ellipse_71_x4.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/vectors/ellipse_72_x4.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/vectors/ellipse_72_x4.svg new file mode 100644 index 0000000..53250f8 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/vectors/ellipse_72_x4.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/vectors/ellipse_73_x4.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/vectors/ellipse_73_x4.svg new file mode 100644 index 0000000..218e1d1 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/vectors/ellipse_73_x4.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/vectors/ellipse_74_x4.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/vectors/ellipse_74_x4.svg new file mode 100644 index 0000000..1b960f7 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/vectors/ellipse_74_x4.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/vectors/ellipse_75_x4.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/vectors/ellipse_75_x4.svg new file mode 100644 index 0000000..3575c00 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/vectors/ellipse_75_x4.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/vectors/vector_29_x4.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/vectors/vector_29_x4.svg new file mode 100644 index 0000000..e2bf358 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/vectors/vector_29_x4.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/vectors/vector_40_x4.svg b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/vectors/vector_40_x4.svg new file mode 100644 index 0000000..097b324 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/assets/vectors/vector_40_x4.svg @@ -0,0 +1,3 @@ + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/devtools_options.yaml b/prod116rb-front-f/authsec_flutterNewUi/base_project/devtools_options.yaml new file mode 100644 index 0000000..fa0b357 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/devtools_options.yaml @@ -0,0 +1,3 @@ +description: This file stores settings for Dart & Flutter DevTools. +documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states +extensions: diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib attendence.zip b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib attendence.zip new file mode 100644 index 0000000..976bf5d Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib attendence.zip differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib.zip b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib.zip new file mode 100644 index 0000000..206a3c7 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib.zip differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/Entity/test.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/Entity/test.dart new file mode 100644 index 0000000..e69de29 diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/Reuseable/reusable_date_picker_field.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/Reuseable/reusable_date_picker_field.dart new file mode 100644 index 0000000..693984f --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/Reuseable/reusable_date_picker_field.dart @@ -0,0 +1,43 @@ +import 'package:flutter/material.dart'; +import 'package:intl/intl.dart'; + +class ReusableDatePickerField extends StatelessWidget { + final String label; + final String? initialDate; + final TextEditingController controller; + final Function(String?)? onSaved; + + ReusableDatePickerField({ + required this.label, + required this.controller, + this.initialDate, + required this.onSaved, + }); + + @override + Widget build(BuildContext context) { + return TextFormField( + initialValue: initialDate, + controller: controller, + decoration: InputDecoration( + labelText: label, + border: OutlineInputBorder(), + contentPadding: EdgeInsets.symmetric(vertical: 16.0, horizontal: 12.0), + suffixIcon: Icon(Icons.calendar_today), + ), + readOnly: true, + onTap: () async { + DateTime? selectedDate = await showDatePicker( + context: context, + initialDate: DateTime.now(), + firstDate: DateTime(2000), + lastDate: DateTime(2101), + ); + if (selectedDate != null) { + controller.text = DateFormat('yyyy-MM-dd').format(selectedDate); + } + }, + onSaved: onSaved, + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/Reuseable/reusable_date_time_picker_field.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/Reuseable/reusable_date_time_picker_field.dart new file mode 100644 index 0000000..3d34037 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/Reuseable/reusable_date_time_picker_field.dart @@ -0,0 +1,74 @@ +import 'package:flutter/material.dart'; +import 'package:intl/intl.dart'; + +class ReusableDateTimePickerField extends StatelessWidget { + final String label; + final String? initialDateTime; + final TextEditingController controller; + final Function(String?)? onSaved; + + ReusableDateTimePickerField({ + required this.label, + required this.controller, + this.initialDateTime, + required this.onSaved, + }); + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.symmetric(vertical: 8.0), + child: TextFormField( + initialValue: initialDateTime, + controller: controller, + decoration: InputDecoration( + labelText: label, + border: const OutlineInputBorder(), + contentPadding: + const EdgeInsets.symmetric(vertical: 16.0, horizontal: 12.0), + suffixIcon: const Icon(Icons.event), + ), + readOnly: true, + onTap: () async { + DateTime? selectedDateTime = await showDateTimePicker( + context: context, + initialDateTime: DateTime.now(), + ); + if (selectedDateTime != null) { + controller.text = + DateFormat('yyyy-MM-dd HH:mm').format(selectedDateTime); + } + }, + onSaved: onSaved, + ), + ); + } + + Future showDateTimePicker({ + required BuildContext context, + required DateTime initialDateTime, + }) async { + // Custom date-time picker implementation or package usage + // This is a placeholder for demonstration purposes. + return await showDatePicker( + context: context, + initialDate: initialDateTime, + firstDate: DateTime(2000), + lastDate: DateTime(2101), + ).then((date) { + if (date != null) { + return showTimePicker( + context: context, + initialTime: TimeOfDay.fromDateTime(initialDateTime), + ).then((time) { + if (time != null) { + return DateTime( + date.year, date.month, date.day, time.hour, time.minute); + } + return date; + }); + } + return null; + }); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/Reuseable/reusable_text_field.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/Reuseable/reusable_text_field.dart new file mode 100644 index 0000000..eb60ba5 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/Reuseable/reusable_text_field.dart @@ -0,0 +1,75 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class ReusableTextField extends StatelessWidget { + final String label; + final TextEditingController? controller; + final TextInputType keyboardType; + final bool obscureText; + final int maxLines; + final List? inputFormatters; + final FormFieldValidator? validator; + final Function(DateTime?)? onDateTimeSelected; // Callback for DateTime picker + final Function(String?)? onSaved; + final Function(String?)? onChanged; + + final String? initialValue; + + ReusableTextField({ + required this.label, + this.controller, + this.keyboardType = TextInputType.text, + this.obscureText = false, + this.maxLines = 1, + this.inputFormatters, + this.validator, + this.onDateTimeSelected, + this.onSaved, + this.onChanged, + this.initialValue, // Added callback for DateTime picker + }); + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.symmetric(vertical: 8.0), + child: TextFormField( + initialValue: initialValue, + onSaved: onSaved, + onChanged: onChanged, + controller: controller, + keyboardType: keyboardType, + obscureText: obscureText, + maxLines: maxLines, + inputFormatters: inputFormatters, + validator: validator, + onTap: () async { + if (keyboardType == TextInputType.datetime && + onDateTimeSelected != null) { + DateTime? dateTime = await showDatePicker( + context: context, + initialDate: DateTime.now(), + firstDate: DateTime(2000), + lastDate: DateTime(2100), + ); + if (dateTime != null) { + TimeOfDay? timeOfDay = await showTimePicker( + context: context, + initialTime: TimeOfDay.now(), + ); + if (timeOfDay != null) { + dateTime = DateTime(dateTime.year, dateTime.month, dateTime.day, + timeOfDay.hour, timeOfDay.minute); + onDateTimeSelected!(dateTime); + } + } + } + }, + decoration: InputDecoration( + labelText: label, + border: OutlineInputBorder(), + ), + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/core/app_export.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/core/app_export.dart new file mode 100644 index 0000000..0613639 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/core/app_export.dart @@ -0,0 +1,7 @@ +export '/core/utils/image_constant.dart'; +export '/core/utils/size_utils.dart'; +export '/routes/app_routes.dart'; +export '/theme/app_decoration.dart'; +export '/theme/custom_text_style.dart'; +export '/theme/theme_helper.dart'; +export '/widgets/custom_image_view.dart'; diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/core/network/network_info.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/core/network/network_info.dart new file mode 100644 index 0000000..e7d9dd9 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/core/network/network_info.dart @@ -0,0 +1,81 @@ +// import 'package:flutter/material.dart'; +// import 'package:connectivity_plus/connectivity_plus.dart'; + +// // For checking internet connectivity +// abstract class NetworkInfoI { +// Future isConnected(); + +// Future get connectivityResult; + +// Stream get onConnectivityChanged; +// } + +// class NetworkInfo implements NetworkInfoI { +// Connectivity connectivity; + +// static final NetworkInfo _networkInfo = NetworkInfo._internal(Connectivity()); + +// factory NetworkInfo() { +// return _networkInfo; +// } + +// NetworkInfo._internal(this.connectivity) { +// connectivity = this.connectivity; +// } + +// ///checks internet is connected or not +// ///returns [true] if internet is connected +// ///else it will return [false] +// @override +// Future isConnected() async { +// final result = await connectivity.checkConnectivity(); +// if (result != ConnectivityResult.none) { +// return true; +// } +// return false; +// } + +// // to check type of internet connectivity +// @override +// Future get connectivityResult async { +// return connectivity.checkConnectivity(); +// } + +// //check the type on internet connection on changed of internet connection +// @override +// Stream get onConnectivityChanged => +// connectivity.onConnectivityChanged; +// } + +// abstract class Failure {} + +// // General failures +// class ServerFailure extends Failure {} + +// class CacheFailure extends Failure {} + +// class NetworkFailure extends Failure {} + +// class ServerException implements Exception {} + +// class CacheException implements Exception {} + +// class NetworkException implements Exception {} + +// ///can be used for throwing [NoInternetException] +// class NoInternetException implements Exception { +// late String _message; + +// NoInternetException([String message = 'NoInternetException Occurred']) { +// if (globalMessengerKey.currentState != null) { +// globalMessengerKey.currentState! +// .showSnackBar(SnackBar(content: Text(message))); +// } +// this._message = message; +// } + +// @override +// String toString() { +// return _message; +// } +// } diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/core/utils/date_time_utils.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/core/utils/date_time_utils.dart new file mode 100644 index 0000000..1325da7 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/core/utils/date_time_utils.dart @@ -0,0 +1,17 @@ +import 'package:intl/date_symbol_data_local.dart'; +import 'package:intl/intl.dart'; +import '../app_export.dart'; + +const String dateTimeFormatPattern = 'dd/MM/yyyy'; + +extension DateTimeExtension on DateTime { + String format({ + String pattern = dateTimeFormatPattern, + String? locale, + }) { + if (locale != null && locale.isNotEmpty) { + initializeDateFormatting(locale); + } + return DateFormat(pattern, locale).format(this); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/core/utils/image_constant.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/core/utils/image_constant.dart new file mode 100644 index 0000000..cc1c784 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/core/utils/image_constant.dart @@ -0,0 +1,371 @@ +// ignore_for_file: must_be_immutable +class ImageConstant { + // Image folder path + static String imagePath = 'assets/images'; + +// Leaderboard images + static String imageTeams = 'assets/images/team.png'; + static String imgScoreboard = '$imagePath/scoreboard.png'; + static String imgAward = '$imagePath/award.png'; + static String imgStore = '$imagePath/store.png'; + static String imgTennisBall = '$imagePath/tennis-ball.jpg'; + static String imgLeatherBall = '$imagePath/leather-ball.jpg'; + static String imgOtherBall = '$imagePath/yellow-ball.png'; + static String imgTransfer = '$imagePath/transfer.png'; + static String imgCricketHelmet = '$imagePath/cricket-helmet.png'; + static String imgCricketStats = '$imagePath/stats.png'; + static String imgCricketWicket = '$imagePath/cricket-wicket.png'; + static String imgCricketGround = '$imagePath/cricGroundOverlay.jpg'; + static String imgAddPlayer = '$imagePath/add-group.png'; + static String imgRabada = '$imagePath/rabada.png'; + static String imgEngRoundFlag = '$imagePath/englandRoundFlag.jpg'; + static String imgShriLankaRoundFlag = '$imagePath/shrilanka.png'; + static String editModel = '$imagePath/editModel.png'; + static String setting_profile_logo = '$imagePath/setting_profile_logo.png'; + static String setting_securitylogo = '$imagePath/setting_securitylogo.png'; + static String setting_notification = '$imagePath/setting_notification.png'; + static String setting_privacy = '$imagePath/setting_privacy.png'; + static String setting_subscription = '$imagePath/setting_subscription.png'; + static String setting_help = '$imagePath/setting_help.png'; + static String setting_terms = '$imagePath/setting_terms.png'; + static String setting_free_space = '$imagePath/setting_free_space.png'; + static String setting_datasaver = '$imagePath/setting_datasaver.png'; + static String setting_reportspam = '$imagePath/setting_reportspam.png'; + static String setting_addaccount = '$imagePath/setting_addaccount.png'; + static String setting_logout = '$imagePath/setting_logout.png'; + + static String imgLive = '$imagePath/image_5.png'; + static String imgMainMenu = '$imagePath/main-menu.png'; + static String imgNotification3 = '$imagePath/fast-response.png'; + static String imgBell = '$imagePath/bell2.png'; + static String imgCricketPlayer = '$imagePath/cricket-player.png'; + + static String editIcon = '$imagePath/editIcon.png'; + + static String home = '$imagePath/homeIcon1000.svg'; + static String imgOverflowmenu = 'assets/images/img_overflowmenu.svg'; + static String imgImage1002 = '$imagePath/img_image_1002.svg'; + static String imgBatball = '$imagePath/img_batball.svg'; + + static String imgMail = '$imagePath/img_mail.svg'; + static String imgArrowLeftGray90001 = + '$imagePath/img_arrow_left_gray_900_01.svg'; + static String imgGroup152 = '$imagePath/img_mdicheckboxoutlineblank.svg'; + static String imgArrowdropdown = '$imagePath/img_arrowdropdown.svg'; + static String imgArrowleftBlueGray900 = + 'assets/images/img_arrowleft_blue_gray_900.svg'; + static String imgArrowleft = 'assets/images/img_arrowleft.svg'; + + static String imgArrowLeft = '$imagePath/img_arrow_left.svg'; + + static String imgImageRemovebgPreview = '$imagePath/img_image_removebg_preview.png'; + static String tempLogo = '$imagePath/logo.png'; + + static String imgDownloadRemovebgPreview = + '$imagePath/img_download_removebg_preview.png'; + + static String img32278183 = '$imagePath/img_3227818_3.png'; + + static String imgLeaderBoardOrange = '$imagePath/img_leader_board_orange.png'; + + static String imgShikharDhawan = '$imagePath/img_shikhar_dhawan.png'; + +// Find friends images + static String imgMagnifyingGlass = '$imagePath/img_magnifying_glass.png'; + + static String imgImage2 = '$imagePath/img_image_2.png'; + + static String imgImage240x40 = '$imagePath/img_image_2_40x40.png'; + + static String imgImage1 = '$imagePath/img_image_1.png'; + + static String imgImage140x40 = '$imagePath/img_image_1_40x40.png'; + + static String imgImage11 = '$imagePath/img_image_1_1.png'; + + static String imgImage21 = '$imagePath/img_image_2_1.png'; + + static String imgImage12 = '$imagePath/img_image_1_2.png'; + + static String imgImage22 = '$imagePath/img_image_2_2.png'; + + static String imgImage13 = '$imagePath/img_image_1_3.png'; + + static String imgImage23 = '$imagePath/img_image_2_3.png'; + +// go live images + static String imgRectangle32 = '$imagePath/img_rectangle_32.png'; + + static String imgRectangle3 = '$imagePath/img_rectangle_3.png'; + + static String imgEllipse22 = '$imagePath/img_ellipse_22.png'; + + static String imgRectangle5 = '$imagePath/img_rectangle_5.png'; + + static String imgIndianPremimum = '$imagePath/img_indian_premimum.png'; + +// Direct message images + static String imgVectorBlueA100 = '$imagePath/img_vector_blue_a100.svg'; + +// Common images + static String imgGroup82 = '$imagePath/img_group_82.svg'; + + static String imgSearch = '$imagePath/img_search.svg'; + + static String imgBxCricketBall = '$imagePath/img_bx_cricket_ball.svg'; + + static String imgFluentLive24Filled = + '$imagePath/img_fluent_live_24_filled.svg'; + + static String imgNotification = '$imagePath/img_notification.svg'; + + static String imgLocation = '$imagePath/img_location.svg'; + + static String imgTelevision = '$imagePath/img_television.svg'; + + static String imgVector = '$imagePath/img_vector.svg'; + +// login images + static String imgLogin = '$imagePath/img_login.png'; + + static String imgCricyard1 = '$imagePath/img_cricyard_1.png'; + + static String imgLive11 = '$imagePath/img_live_1_1.png'; + + static String imgImage3 = '$imagePath/img_image_3.png'; + +// login Two images + static String imgWhatsappImage20230313 = + '$imagePath/img_whatsapp_image_2023_03_13.png'; + + static String imgEdit = '$imagePath/img_edit.svg'; + + static String imgImage60 = '$imagePath/img_image_60.png'; + + static String imgMaskGroup = '$imagePath/img_mask_group.png'; + + static String imgGroup66 = '$imagePath/img_group_66.svg'; + + static String imgPath2 = '$imagePath/img_path_2.svg'; + +// login Three images + static String imgMaskGroup26x26 = '$imagePath/img_mask_group_26x26.png'; + + static String imgMaskGroup1 = '$imagePath/img_mask_group_1.png'; + + static String imgMaskGroup2 = '$imagePath/img_mask_group_2.png'; + + static String imgPolygon1 = '$imagePath/img_polygon_1.svg'; + +// login Four images + static String imgWorst = '$imagePath/img_worst.png'; + + static String imgItSJustFine = '$imagePath/img_it_s_just_fine.png'; + + static String imgNeutral = '$imagePath/img_neutral.png'; + + static String imgGood = '$imagePath/img_good.png'; + + static String imgLoveit = '$imagePath/img_loveit.png'; + + static String imgSliderRuler = '$imagePath/img_slider_ruler.svg'; + + static String imgSettings = '$imagePath/img_settings.svg'; + + static String imgGroup166 = '$imagePath/img_group_166.svg'; + + static String imageNotFound = 'assets/images/image_not_found.png'; + +// login images + static String imgGroup3090 = '$imagePath/img_group_3090.svg'; + + static String imgAlfredKenneall = '$imagePath/img_alfred_kenneall.png'; + +// login One images + static String imgFluenteye20filled = '$imagePath/img_fluenteye20filled.svg'; + +// Common images + + static String imgFacebookIc = '$imagePath/img_facebook_ic.svg'; + + static String imgGoogleIc = '$imagePath/img_google_ic.svg'; + +// login images + static String imgPngwing6 = '$imagePath/img_pngwing_6.png'; + + static String imgPngwing2 = '$imagePath/img_pngwing_2.png'; + +// login Two images + static String imgUser = '$imagePath/img_user.svg'; + +// login Three images + static String imgLock = '$imagePath/img_lock.svg'; + + static String imgArrowRight = '$imagePath/img_arrow_right.svg'; + + static String imgCheckmark = '$imagePath/img_checkmark.svg'; + + static String imgCall = '$imagePath/img_call.svg'; + + static String imgLinkedin = '$imagePath/img_linkedin.svg'; + +// login Four images + static String imgCardPerformance = '$imagePath/img_card_performance.png'; + + static String imgVectorOnerrorcontainer = + '$imagePath/img_vector_onerrorcontainer.svg'; + + static String imgVector78x39 = '$imagePath/img_vector_78x39.png'; + + static String imgGroup58 = '$imagePath/img_group_58.svg'; + + static String imgVector78x66 = '$imagePath/img_vector_78x66.png'; + + static String imgTelevisionPrimarycontainer = + '$imagePath/img_television_primarycontainer.svg'; + + static String imgGroup146 = '$imagePath/img_group_146.svg'; + +// login One images + static String imgMdicheckboxdisabled = + '$imagePath/img_mdicheckboxdisabled.svg'; + +// login Three images + static String imgLogo2 = '$imagePath/img_logo_2.png'; + + static String imgClock = '$imagePath/img_clock.svg'; + + static String imgFacebook = '$imagePath/img_facebook.svg'; + + static String imgGmail = '$imagePath/img_gmail.svg'; + + static String imgLogo47 = '$imagePath/img_logo_47.svg'; + + static String imgGrid = '$imagePath/img_grid.svg'; + + static String imgLink = '$imagePath/img_link.svg'; + + static String imgTrash = '$imagePath/img_trash.svg'; + + static String imgSave = '$imagePath/img_save.svg'; + +// login Four images + static String imgArrowLeftOnprimary32x32 = + '$imagePath/img_arrow_left_onprimary_32x32.svg'; + + static String imgTelevisionErrorcontainer = + '$imagePath/img_television_errorcontainer.svg'; + + static String imgGroup94 = '$imagePath/img_group_94.svg'; + + static String imgArrowleftOnprimary = + '$imagePath/img_arrowleft_onprimary.svg'; + + static String imgMdicheckboxoutlineblank = + '$imagePath/img_mdicheckboxoutlineblank.svg'; + + static String imgTelevisionBlueA20002 = + '$imagePath/img_television_blue_a200_02.svg'; + + static String imgGlobe = '$imagePath/img_globe.svg'; + + static String imgInstagram = '$imagePath/img_instagram.svg'; + + static String imgImage4 = '$imagePath/img_image_4.png'; + + static String imgImage460x106 = '$imagePath/img_image_4_60x106.png'; + + static String imgImage3222x361 = '$imagePath/img_image_3_222x361.png'; + +// Following images + static String imgArrowLeftGray900 = '$imagePath/img_arrow_left_gray_900.svg'; + + static String imgImage5 = '$imagePath/img_image_5.png'; + + static String imgImage576x89 = '$imagePath/img_image_5_76x89.png'; + + static String imgImage51 = '$imagePath/img_image_5_1.png'; + + static String imgImage52 = '$imagePath/img_image_5_2.png'; + + static String imgImage53 = '$imagePath/img_image_5_3.png'; + + static String imgImage54 = '$imagePath/img_image_5_4.png'; + + static String imgImage55 = '$imagePath/img_image_5_5.png'; + + static String imgImage56 = '$imagePath/img_image_5_6.png'; + + static String imgImage57 = '$imagePath/img_image_5_7.png'; + + static String imgImage58 = '$imagePath/img_image_5_8.png'; + + static String imgImage59 = '$imagePath/img_image_5_9.png'; + + static String imgImage510 = '$imagePath/img_image_5_10.png'; + + static String imgImage511 = '$imagePath/img_image_5_11.png'; + +// Follow plyer images + static String imgFrame2 = '$imagePath/img_frame_2.png'; + + static String imgImage6 = '$imagePath/img_image_6.png'; + + static String imgClose = '$imagePath/img_close.svg'; + + static String imgBellFill1 = '$imagePath/img_bell_fill_1.svg'; + + static String imgArrowLeftWhiteA700 = + '$imagePath/img_arrow_left_white_a700.svg'; + + static String imgSubtract = '$imagePath/img_subtract.svg'; + + static String imgTelevisionGreen600 = + '$imagePath/img_television_green_600.svg'; + + static String imgTeamLogo = '$imagePath/img_team_logo.svg'; + + static String imgTeamLogoPrimary = '$imagePath/img_team_logo_primary.svg'; + +// all images + static String imgThumbsUp = '$imagePath/img_thumbs_up.svg'; + + static String imgImage599x189 = '$imagePath/img_image_5_99x189.png'; + +// Common images + static String imgGroup183 = '$imagePath/img_group_183.svg'; + + // setting + + // setting + static String imgIconamoonProfileLight = + '$imagePath/img_iconamoon_profile_light.svg'; + + static String imgMaterialSymbol = '$imagePath/img_material_symbol.svg'; + + static String imgIconamoonNotification = + '$imagePath/img_iconamoon_notification.svg'; + + static String imgIcOutlineLock = '$imagePath/img_ic_outline_lock.svg'; + + static String imgMaterialSymbolGray800 = + '$imagePath/img_material_symbol_gray_800.svg'; + + static String imgMdiQuestionMa = '$imagePath/img_mdi_question_ma.svg'; + + static String imgTablerCircleLetterI = + '$imagePath/img_tabler_circle_letter_i.svg'; + + static String imgRiDeleteBin5Line = '$imagePath/img_ri_delete_bin_5_line.svg'; + + static String imgIcOutlineDataExploration = + '$imagePath/img_ic_outline_data_exploration.svg'; + + static String imgIcSharpOutlinedFlag = + '$imagePath/img_ic_sharp_outlined_flag.svg'; + + static String imgIcSharpPeopleOutline = + '$imagePath/img_ic_sharp_people_outline.svg'; + + static String imgMdiLogout = '$imagePath/img_mdi_logout.svg'; +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/core/utils/size_utils.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/core/utils/size_utils.dart new file mode 100644 index 0000000..74880ca --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/core/utils/size_utils.dart @@ -0,0 +1,94 @@ +import 'dart:ui' as ui; +import 'package:flutter/material.dart'; +import '../app_export.dart'; // These are the Viewport values of your Figma Design. + +// These are used in the code as a reference to create your UI Responsively. +const num FIGMA_DESIGN_WIDTH = 428; +const num FIGMA_DESIGN_HEIGHT = 926; +const num FIGMA_DESIGN_STATUS_BAR = 0; + +extension ResponsiveExtension on num { + double get _width => SizeUtils.width; + double get _height => SizeUtils.height; + double get h => ((this * _width) / FIGMA_DESIGN_WIDTH); + double get v => + (this * _height) / (FIGMA_DESIGN_HEIGHT - FIGMA_DESIGN_STATUS_BAR); + double get adaptSize { + var height = v; + var width = h; + return height < width ? height.toDoubleValue() : width.toDoubleValue(); + } + + double get fSize => adaptSize; +} + +extension FormatExtension on double { + double toDoubleValue({int fractionDigits = 2}) { + return double.parse(this.toStringAsFixed(fractionDigits)); + } + + double isNonZero({num defaultValue = 0.0}) { + return this > 0 ? this : defaultValue.toDouble(); + } +} + +enum DeviceType { mobile, tablet, desktop } + +typedef ResponsiveBuild = Widget Function( + BuildContext context, Orientation orientation, DeviceType deviceType); + +class Sizer extends StatelessWidget { + const Sizer({Key? key, required this.builder}) : super(key: key); + + /// Builds the widget whenever the orientation changes. + final ResponsiveBuild builder; + + @override + Widget build(BuildContext context) { + return LayoutBuilder(builder: (context, constraints) { + return OrientationBuilder(builder: (context, orientation) { + SizeUtils.setScreenSize(constraints, orientation); + return builder(context, orientation, SizeUtils.deviceType); + }); + }); + } +} +// ignore_for_file: must_be_immutable + +// ignore_for_file: must_be_immutable +class SizeUtils { + /// Device's BoxConstraints + static late BoxConstraints boxConstraints; + + /// Device's Orientation + static late Orientation orientation; + + /// Type of Device + /// + /// This can either be mobile or tablet + static late DeviceType deviceType; + + /// Device's Height + static late double height; + + /// Device's Width + static late double width; + + static void setScreenSize( + BoxConstraints constraints, + Orientation currentOrientation, + ) { + boxConstraints = constraints; + orientation = currentOrientation; + if (orientation == Orientation.portrait) { + width = + boxConstraints.maxWidth.isNonZero(defaultValue: FIGMA_DESIGN_WIDTH); + height = boxConstraints.maxHeight.isNonZero(); + } else { + width = + boxConstraints.maxHeight.isNonZero(defaultValue: FIGMA_DESIGN_WIDTH); + height = boxConstraints.maxWidth.isNonZero(); + } + deviceType = DeviceType.mobile; + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/core/utils/validation_functions.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/core/utils/validation_functions.dart new file mode 100644 index 0000000..0203876 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/core/utils/validation_functions.dart @@ -0,0 +1,13 @@ +bool isValidEmail(String? inputString, {bool isRequired = false}) { + bool isInputStringValid = false; + if (!isRequired && (inputString == null ? true : inputString.isEmpty)) { + isInputStringValid = true; + } + if (inputString != null && inputString.isNotEmpty) { + const pattern = + r'^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$'; + final regExp = RegExp(pattern); + isInputStringValid = regExp.hasMatch(inputString); + } + return isInputStringValid; +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/dashboard_builder_authsec/Dashboard/Dashboard_api_service.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/dashboard_builder_authsec/Dashboard/Dashboard_api_service.dart new file mode 100644 index 0000000..a59815f --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/dashboard_builder_authsec/Dashboard/Dashboard_api_service.dart @@ -0,0 +1,49 @@ +import 'package:dio/dio.dart'; +import '/resources/api_constants.dart'; + +class DashboardBuilderApiService { + final String baseUrl = ApiConstants.baseUrl; + final Dio dio = Dio(); + + Future>> getEntities(String token) async { + try { + dio.options.headers['Authorization'] = 'Bearer $token'; + final response = await dio.get('$baseUrl/Dashboard/Dashboard'); + final entities = (response.data as List).cast>(); + return entities; + } catch (e) { + throw Exception('Failed to get all entities: $e'); + } + } + + Future createEntity(String token, Map entity) async { + try { + print("in post api" + entity.toString()); + dio.options.headers['Authorization'] = 'Bearer $token'; + await dio.post('$baseUrl/Dashboard/Dashboard', data: entity); + print(entity); + } catch (e) { + throw Exception('Failed to create entity: $e'); + } + } + + Future updateEntity( + String token, int entityId, Map entity) async { + try { + dio.options.headers['Authorization'] = 'Bearer $token'; + await dio.put('$baseUrl/Dashboard/Dashboard/$entityId', data: entity); + print(entity); + } catch (e) { + throw Exception('Failed to update entity: $e'); + } + } + + Future deleteEntity(String token, int entityId) async { + try { + dio.options.headers['Authorization'] = 'Bearer $token'; + await dio.delete('$baseUrl/Dashboard/Dashboard/$entityId'); + } catch (e) { + throw Exception('Failed to delete entity: $e'); + } + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/dashboard_builder_authsec/Dashboard/Dashboard_create_entity_screen.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/dashboard_builder_authsec/Dashboard/Dashboard_create_entity_screen.dart new file mode 100644 index 0000000..8ed4312 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/dashboard_builder_authsec/Dashboard/Dashboard_create_entity_screen.dart @@ -0,0 +1,119 @@ +// ignore_for_file: use_build_context_synchronously +import 'package:flutter/material.dart'; + +import '/providers/token_manager.dart'; +import 'package:flutter/services.dart'; + +import 'Dashboard_api_service.dart'; + +class CreateEntityScreen extends StatefulWidget { + const CreateEntityScreen({super.key}); + + @override + _CreateEntityScreenState createState() => _CreateEntityScreenState(); +} + +class _CreateEntityScreenState extends State { + final DashboardBuilderApiService apiService = DashboardBuilderApiService(); + final Map formData = {}; + final _formKey = GlobalKey(); + + bool isisdashboard = false; + + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar(title: const Text('Create Dashboard')), + body: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.all(16), + child: Form( + key: _formKey, + child: Column( + children: [ + TextFormField( + decoration: const InputDecoration(labelText: 'name'), + onSaved: (value) => formData['name'] = value, + ), + const SizedBox(height: 16), + TextFormField( + decoration: const InputDecoration(labelText: 'model'), + onSaved: (value) => formData['model'] = value, + ), + const SizedBox(height: 16), + Switch( + value: isisdashboard, + onChanged: (newValue) { + setState(() { + isisdashboard = newValue; + }); + }, + ), + const SizedBox(width: 8), + const Text('isdashboard'), + Container( + margin: const EdgeInsets.symmetric(vertical: 5), // Add margin + child: ElevatedButton( + onPressed: () async { + if (_formKey.currentState!.validate()) { + _formKey.currentState!.save(); + + formData['isdashboard'] = isisdashboard; + + final token = await TokenManager.getToken(); + try { + print("token is : $token"); + print(formData); + + await apiService.createEntity(token!, formData); + + Navigator.pop(context); + } catch (e) { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: const Text('Error'), + content: Text('Failed to create entity: $e'), + actions: [ + TextButton( + child: const Text('OK'), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ], + ); + }, + ); + } + } + }, + child: const SizedBox( + width: double.infinity, + height: 50, + child: const Center( + child: Text( + 'SUBMIT', + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + ), + ), + ), + ), + ), + ), + ], + ), + ), + ), + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/dashboard_builder_authsec/Dashboard/Dashboard_entity_list_screen.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/dashboard_builder_authsec/Dashboard/Dashboard_entity_list_screen.dart new file mode 100644 index 0000000..72ad203 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/dashboard_builder_authsec/Dashboard/Dashboard_entity_list_screen.dart @@ -0,0 +1,301 @@ +import 'package:flutter/material.dart'; +import 'package:intl/intl.dart'; +import '/providers/token_manager.dart'; +import 'Dashboard_api_service.dart'; +import 'Dashboard_create_entity_screen.dart'; +import 'Dashboard_update_entity_screen.dart'; + +class dashboard_entity_list_screen extends StatefulWidget { + static const String routeName = '/entity-list'; + + @override + _dashboard_entity_list_screenState createState() => + _dashboard_entity_list_screenState(); +} + +class _dashboard_entity_list_screenState + extends State { + final DashboardBuilderApiService apiService = DashboardBuilderApiService(); + List> entities = []; + bool showCardView = true; // Add this variable to control the view mode + + @override + void initState() { + super.initState(); + fetchEntities(); + } + + Future fetchEntities() async { + try { + final token = await TokenManager.getToken(); + + if (token != null) { + final fetchedEntities = await apiService.getEntities(token); + setState(() { + entities = fetchedEntities; + }); + } + } catch (e) { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: const Text('Error'), + content: Text('Failed to fetch entities: $e'), + actions: [ + TextButton( + child: const Text('OK'), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ], + ); + }, + ); + } + } + + Future deleteEntity(Map entity) async { + try { + final token = await TokenManager.getToken(); + await apiService.deleteEntity(token!, entity['id']); + setState(() { + entities.remove(entity); + }); + } catch (e) { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: const Text('Error'), + content: Text('Failed to delete entity: $e'), + actions: [ + TextButton( + child: const Text('OK'), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ], + ); + }, + ); + } + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: const Text('Dashboard List'), + actions: [ + // Add a switch in the app bar to toggle between card view and normal view + Switch( + activeColor: Colors.greenAccent, + inactiveThumbColor: Colors.white, + value: showCardView, + onChanged: (value) { + setState(() { + showCardView = value; + }); + }, + ), + ], + ), + body: entities.isEmpty + ? const Center( + child: Text('No entities found.'), + ) + : ListView.builder( + itemCount: entities.length, + itemBuilder: (BuildContext context, int index) { + final entity = entities[index]; + return _buildListItem(entity); + }, + ), + floatingActionButton: FloatingActionButton( + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => const CreateEntityScreen(), + ), + ).then((_) { + fetchEntities(); + }); + }, + child: const Icon(Icons.add), + ), + ); + } + + // Function to build list items + Widget _buildListItem(Map entity) { + return showCardView ? _buildCardView(entity) : _buildNormalView(entity); + } + + // Function to build card view for a list item + Widget _buildCardView(Map entity) { + return Card( + elevation: 2, + margin: const EdgeInsets.symmetric(vertical: 8, horizontal: 16), + child: _buildNormalView(entity)); + } + + // Function to build normal view for a list item + Widget _buildNormalView(Map entity) { + return ListTile( + title: Text(entity['id'].toString()), + subtitle: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(entity['name'] ?? 'No name provided'), + const SizedBox(height: 4), + + Text(entity['model'] ?? 'No model provided'), + const SizedBox(height: 4), + + Text(entity['isdashboard'] ?? 'No isdashboard provided'), + const SizedBox(height: 4), + + // Added address text + ], + ), + trailing: _buildPopupMenu(entity), + ); + } + + // Function to build popup menu for a list item + Widget _buildPopupMenu(Map entity) { + return PopupMenuButton( + itemBuilder: (BuildContext context) { + return [ + const PopupMenuItem( + value: 'edit', + child: Row( + children: [ + Icon(Icons.edit), + SizedBox(width: 8), + Text('Edit'), + ], + ), + ), + const PopupMenuItem( + value: 'delete', + child: Row( + children: [ + Icon(Icons.delete), + SizedBox(width: 8), + Text('Delete'), + ], + ), + ), + const PopupMenuItem( + value: 'WHO', + child: Row( + children: [ + Icon(Icons.manage_accounts_outlined), + SizedBox(width: 8), + Text('WHO'), + ], + ), + ), + ]; + }, + onSelected: (String value) { + if (value == 'edit') { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => UpdateEntityScreen(entity: entity), + ), + ).then((_) { + fetchEntities(); + }); + } else if (value == 'delete') { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: const Text('Confirm Deletion'), + content: + const Text('Are you sure you want to delete this entity?'), + actions: [ + TextButton( + child: const Text('Cancel'), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + TextButton( + child: const Text('Delete'), + onPressed: () { + Navigator.of(context).pop(); + deleteEntity(entity); + }, + ), + ], + ); + }, + ); + } else if (value == 'WHO') { + _showAdditionalFieldsDialog(context, entity); + } + }, + ); + } + + // Function to show additional fields in a dialog + void _showAdditionalFieldsDialog( + BuildContext context, + Map entity, + ) { + final dateFormat = + DateFormat('yyyy-MM-dd HH:mm:ss'); // Define your desired date format + + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: const Text('Additional Fields'), + content: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Text( + 'Created At: ${_formatTimestamp(entity['createdAt'], dateFormat)}'), + Text('Created By: ${entity['createdBy'] ?? 'N/A'}'), + Text('Updated By: ${entity['updatedBy'] ?? 'N/A'}'), + Text( + 'Updated At: ${_formatTimestamp(entity['updatedAt'], dateFormat)}'), + Text('Account ID: ${entity['accountId'] ?? 'N/A'}'), + ], + ), + actions: [ + TextButton( + child: const Text('Close'), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ], + ); + }, + ); + } + + String _formatTimestamp(dynamic timestamp, DateFormat dateFormat) { + if (timestamp is int) { + // If it's an integer, assume it's a Unix timestamp in milliseconds + final DateTime dateTime = DateTime.fromMillisecondsSinceEpoch(timestamp); + return dateFormat.format(dateTime); + } else if (timestamp is String) { + // If it's a string, assume it's already formatted as a date + return timestamp; + } else { + // Handle other cases here if needed + return 'N/A'; + } + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/dashboard_builder_authsec/Dashboard/Dashboard_update_entity_screen.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/dashboard_builder_authsec/Dashboard/Dashboard_update_entity_screen.dart new file mode 100644 index 0000000..3c86722 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/dashboard_builder_authsec/Dashboard/Dashboard_update_entity_screen.dart @@ -0,0 +1,143 @@ +// ignore_for_file: use_build_context_synchronously +import 'package:flutter/material.dart'; +import '/providers/token_manager.dart'; +import 'package:flutter/services.dart'; + +import 'Dashboard_api_service.dart'; + +class UpdateEntityScreen extends StatefulWidget { + final Map entity; + + UpdateEntityScreen({required this.entity}); + + @override + _UpdateEntityScreenState createState() => _UpdateEntityScreenState(); +} + +class _UpdateEntityScreenState extends State { + final DashboardBuilderApiService apiService = DashboardBuilderApiService(); + final _formKey = GlobalKey(); + + bool isisdashboard = false; + + @override + void initState() { + super.initState(); + + isisdashboard = widget.entity['isdashboard'] ?? false; // Set initial value + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar(title: const Text('Update Dashboard')), + body: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.all(16), + child: Form( + key: _formKey, + child: Column( + children: [ + TextFormField( + initialValue: widget.entity['name'], + decoration: const InputDecoration(labelText: 'name'), + validator: (value) { + if (value == null || value.isEmpty) { + return 'Please enter a name'; + } + return null; + }, + onSaved: (value) { + widget.entity['name'] = value; + }, + ), + const SizedBox(height: 16), + TextFormField( + initialValue: widget.entity['model'], + decoration: const InputDecoration(labelText: 'model'), + validator: (value) { + if (value == null || value.isEmpty) { + return 'Please enter a model'; + } + return null; + }, + onSaved: (value) { + widget.entity['model'] = value; + }, + ), + const SizedBox(height: 16), + Row( + children: [ + Switch( + value: isisdashboard, + onChanged: (newValue) { + setState(() { + isisdashboard = newValue; + }); + }, + ), + const SizedBox(width: 8), + const Text('isdashboard'), + ], + ), + Container( + margin: const EdgeInsets.symmetric(vertical: 5), // Add margin + child: ElevatedButton( + onPressed: () async { + if (_formKey.currentState!.validate()) { + _formKey.currentState!.save(); + + widget.entity['isdashboard'] = isisdashboard; + + final token = await TokenManager.getToken(); + try { + await apiService.updateEntity( + token!, + widget.entity[ + 'id'], // Assuming 'id' is the key in your entity map + widget.entity); + Navigator.pop(context); + } catch (e) { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: const Text('Error'), + content: Text('Failed to update entity: $e'), + actions: [ + TextButton( + child: const Text('OK'), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ], + ); + }, + ); + } + } + }, + child: Container( + width: double.infinity, + height: 50, + child: const Center( + child: Text( + 'UPDATE', + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + ), + ), + ), + ), + ), + ), + ], + ), + ), + ), + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/database/login_info_storage.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/database/login_info_storage.dart new file mode 100644 index 0000000..b5c27e7 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/database/login_info_storage.dart @@ -0,0 +1,61 @@ +import 'dart:convert'; +import 'dart:io'; + +import 'package:path_provider/path_provider.dart'; + +class LoginInfoStorage { + Future get _localPath async { + final directory = await getApplicationDocumentsDirectory(); + return directory.path; + } + + Future get _userLoginDataFile async { + final path = await _localPath; + return File('$path/hadwin_user_login_info_storage.json'); + } + + Future setPersistentLoginData(String userId, String authToken) async { + try { + final file = await _userLoginDataFile; + var ss = file.writeAsString( + jsonEncode({'userId': userId, 'authToken': authToken})); + + print('ssss is ..........'); + print(ss); + + //* THE USER_ID AND AUTHENTICATION_TOKEN HAS BEEN SAVED + return file + .writeAsString(jsonEncode({'userId': userId, 'authToken': authToken})) + .then((value) { + //* THE USER_ID HAS BEEN SAVED + return true; + }); + } catch (e) { + //* THE USER_ID AND AUTHENTICATION_TOKEN COULD NOT BE SAVED + return false; + } + } + + Future> get getPersistentLoginData async { + try { + final file = await _userLoginDataFile; + final contents = await file.readAsString(); + return jsonDecode(contents); + } catch (e) { + return {'userId': null, 'authToken': null}; + } + } + + Future deleteFile() async { + try { + final file = await _userLoginDataFile; + + await file.delete(); + //* THE LOGIN DATA FILE HAS BEEN DELETED + return true; + } catch (e) { + //* THE LOGIN DATA FILE HAS NOT BEEN DELETED + return false; + } + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/database/user_data_storage.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/database/user_data_storage.dart new file mode 100644 index 0000000..4b45faf --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/database/user_data_storage.dart @@ -0,0 +1,54 @@ +import 'dart:convert'; +import 'dart:io'; + +import 'package:path_provider/path_provider.dart'; + +class UserDataStorage { + Future get _localPath async { + final directory = await getApplicationDocumentsDirectory(); + + return directory.path; + } + + Future get _userDataFile async { + final path = await _localPath; + return File('$path/hadwin_user_data.json'); + } + + Future> getUserData() async { + try { + final file = await _userDataFile; + + final contents = await file.readAsString(); + + return jsonDecode(contents); + } catch (e) { + return {"localDBError": "unable to parse data"}; + } + } + + Future saveUserData(Map userData) async { + try { + final file = await _userDataFile; + + print('userdata as is ..... '); + print(file.writeAsString(userData as String)); + return file.writeAsString(jsonEncode(userData)).then((value) => true); + } catch (e) { + return false; + } + } + + Future deleteFile() async { + try { + final file = await _userDataFile; + + await file.delete(); + //* THE USER DATA FILE HAS BEEN DELETED + return true; + } catch (e) { + //* THE USER DATA FILE HAS NOT BEEN DELETED + return false; + } + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/hadwin_components.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/hadwin_components.dart new file mode 100644 index 0000000..b725d60 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/hadwin_components.dart @@ -0,0 +1,26 @@ +library hadwin_components; + +export 'resources/api_constants.dart'; + +//business logic + +//components + +// export 'components/wallet_screen/available_cards_loading.dart'; +export 'screens/settings_screen/credits_loading.dart'; +// export 'components/contacts_screen/contacts_loading.dart'; + +//database + +//resources +export 'providers/tab_navigation_provider.dart'; + +//screens + +//utilities +export 'utilities/slide_right_route.dart'; +export 'utilities/make_api_request.dart'; +export 'utilities/url_external_launcher.dart'; +export 'utilities/custom_date_grouping.dart'; +export 'utilities/display_error_alert.dart'; +export 'utilities/hadwin_markdown_viewer.dart'; diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/helpers/api_helper/api_helper.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/helpers/api_helper/api_helper.dart new file mode 100644 index 0000000..c959704 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/helpers/api_helper/api_helper.dart @@ -0,0 +1,135 @@ +import 'package:base_project/providers/token_manager.dart'; +import 'package:dio/dio.dart'; + +class ApiHelper { + Dio dio = Dio(); + + Future get(String url, {Map? headers}) async { + try { + final token = await TokenManager.getToken(); + dio.options.headers['Authorization'] = 'Bearer $token'; + + Response response = + await dio.get(url, options: Options(headers: headers)); + return response; + } on DioException catch (e) { + _handleDioError(e); + return Response(requestOptions: RequestOptions(path: url)); + } catch (e) { + print('GET request error: $e'); + rethrow; + } + } + + Future post(String url, + {Map? headers, dynamic body}) async { + try { + final token = await TokenManager.getToken(); + dio.options.headers['Authorization'] = 'Bearer $token'; + Response response = await dio.post( + url, + data: body, + options: Options(headers: headers), + ); + return response; + } on DioException catch (e) { + _handleDioError(e); + return Response(requestOptions: RequestOptions(path: url)); + } catch (e) { + print('POST request error: $e'); + rethrow; + } + } + + Future put(String url, + {Map? headers, dynamic body}) async { + try { + final token = await TokenManager.getToken(); + dio.options.headers['Authorization'] = 'Bearer $token'; + Response response = await dio.put( + url, + data: body, + options: Options(headers: headers), + ); + return response; + } on DioException catch (e) { + _handleDioError(e); + return Response(requestOptions: RequestOptions(path: url)); + } catch (e) { + print('PUT request error: $e'); + rethrow; + } + } + + Future delete(String url, + {Map? headers, dynamic body}) async { + try { + final token = await TokenManager.getToken(); + dio.options.headers['Authorization'] = 'Bearer $token'; + Response response = await dio.delete( + url, + data: body, + options: Options(headers: headers), + ); + return response; + } on DioException catch (e) { + _handleDioError(e); + return Response(requestOptions: RequestOptions(path: url)); + } catch (e) { + print('DELETE request error: $e'); + rethrow; + } + } + + void _handleDioError(DioError e) { + String errorDescription = ''; + switch (e.type) { + case DioExceptionType.cancel: + errorDescription = "Request to API server was cancelled"; + break; + case DioExceptionType.connectionTimeout: + errorDescription = "Connection timeout with API server"; + break; + case DioExceptionType.sendTimeout: + errorDescription = "Send timeout in connection with API server"; + break; + case DioExceptionType.receiveTimeout: + errorDescription = "Receive timeout in connection with API server"; + break; + case DioExceptionType.badResponse: + errorDescription = _handleHttpError(e.response?.statusCode); + break; + case DioExceptionType.unknown: + errorDescription = + "Connection to API server failed due to internet connection"; + break; + case DioExceptionType.badCertificate: + errorDescription = "SSL certificate error occurred"; + break; + case DioExceptionType.connectionError: + errorDescription = "Connection error occurred"; + break; + } + print('Dio error: $errorDescription'); + + if (e.response?.statusCode == 401) { + print("Unauthorized. Please log in again."); + } + + throw e; // Rethrow the error after logging + } + + String _handleHttpError(int? statusCode) { + String errorDescription = "Received invalid status code: $statusCode"; + if (statusCode != null) { + if (statusCode >= 400 && statusCode < 500) { + errorDescription = + "Client error occurred with status code: $statusCode"; + } else if (statusCode >= 500) { + errorDescription = + "Server error occurred with status code: $statusCode"; + } + } + return errorDescription; + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/helpers/dailogue_units.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/helpers/dailogue_units.dart new file mode 100644 index 0000000..c520300 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/helpers/dailogue_units.dart @@ -0,0 +1,103 @@ +import 'package:flutter/material.dart'; +import 'package:google_fonts/google_fonts.dart'; + +class DialogUtils { + static void showSuccessDialog(BuildContext context, String title, String message) { + showDialog( + context: context, + builder: (context) { + return IntrinsicHeight( + child: AlertDialog( + title: SizedBox( + height: MediaQuery.of(context).size.height * 0.1, + child: const Icon(Icons.check_circle, size: 60, color: Colors.green), + ), + content: IntrinsicHeight( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Text( + title, + style: GoogleFonts.getFont('Mukta', color: Colors.black, fontWeight: FontWeight.bold, fontSize: 24), + ), + SizedBox(height: 10,), + Text( + message, + style: GoogleFonts.getFont('Mukta', color: Colors.black, fontWeight: FontWeight.w400, fontSize: 16), + ), + ], + ), + ), + actions: [ + SizedBox( + width: MediaQuery.of(context).size.width, + child: ElevatedButton( + style: ElevatedButton.styleFrom( + backgroundColor: const Color(0xff7647EB), + ), + onPressed: () { + Navigator.pop(context); + }, + child: Text( + "Done", + style: GoogleFonts.getFont('Mukta', color: Colors.white, fontSize: 18, fontWeight: FontWeight.bold), + ), + ), + ) + ], + ), + ); + }, + ); + } + + static void showErrorDialog(BuildContext context, String title, String message) { + showDialog( + context: context, + builder: (context) { + return IntrinsicHeight( + child: AlertDialog( + title: SizedBox( + height: MediaQuery.of(context).size.height * 0.1, + child: const Icon(Icons.error, size: 60, color: Colors.red), + ), + content: IntrinsicHeight( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisSize: MainAxisSize.min, + children: [ + Text( + title, + style: GoogleFonts.getFont('Mukta', color: Colors.black, fontWeight: FontWeight.bold, fontSize: 24), + ), + SizedBox(height: 10,), + Text( + message, + style: GoogleFonts.getFont('Mukta', color: Colors.black, fontWeight: FontWeight.w400, fontSize: 16), + ), + ], + ), + ), + actions: [ + SizedBox( + width: MediaQuery.of(context).size.width, + child: ElevatedButton( + style: ElevatedButton.styleFrom( + backgroundColor: Colors.red, + ), + onPressed: () { + Navigator.pop(context); + }, + child: Text( + "Ok", + style: GoogleFonts.getFont('Mukta', color: Colors.white, fontSize: 18, fontWeight: FontWeight.bold), + ), + ), + ) + ], + ), + ); + }, + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/logout/logoutbutton.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/logout/logoutbutton.dart new file mode 100644 index 0000000..d74faab --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/logout/logoutbutton.dart @@ -0,0 +1,46 @@ +// ignore_for_file: use_build_context_synchronously +import 'package:flutter/material.dart'; +import '../screens/Login Screen/login_screen_f.dart'; +import '/resources/api_constants.dart'; +import 'package:http/http.dart' as http; + +class LogoutButton extends StatefulWidget { + @override + _LogoutButtonState createState() => _LogoutButtonState(); +} + +class _LogoutButtonState extends State { + @override + Widget build(BuildContext context) { + return ElevatedButton( + onPressed: () { + _logoutUser(); + }, + child: const Text('Logout'), + ); + } + + Future _logoutUser() async { + try { + // Perform API logout request here + // Replace `apiLogoutEndpoint` with the actual logout endpoint URL + String logouturl = "${ApiConstants.baseUrl}" + "/token/logout"; + var response = await http.post(Uri.parse(logouturl)); + + // Handle logout success + if (response.statusCode == 200) { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => const LoginScreenF(false), + ), + ); + } else { + // Handle logout failure + // Display an error message or take appropriate action + } + } catch (error) { + // Handle any exceptions or errors that occur during the logout process + } + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/main.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/main.dart new file mode 100644 index 0000000..468cf5a --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/main.dart @@ -0,0 +1,31 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'core/utils/size_utils.dart'; +import 'routes/app_routes.dart'; + +void main() async { + WidgetsFlutterBinding.ensureInitialized(); + SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); + + + runApp(const MyApp()); +} + +final GlobalKey navigatorKey = GlobalKey(); +class MyApp extends StatelessWidget { + const MyApp({super.key}); + + @override + Widget build(BuildContext context) { + return Sizer( + builder: (context, orientation, deviceType) { + return MaterialApp( + title: 'Base Project', + debugShowCheckedModeBanner: false, + initialRoute: AppRoutes.spalshscreen, + routes: AppRoutes.routes, + ); + }, + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/providers/tab_navigation_provider.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/providers/tab_navigation_provider.dart new file mode 100644 index 0000000..e01978c --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/providers/tab_navigation_provider.dart @@ -0,0 +1,22 @@ +import 'package:flutter/material.dart'; + +class TabNavigationProvider with ChangeNotifier { + List _tabHistory = [0]; + + int get lastTab => _tabHistory.last; + + void removeLastTab() { + _tabHistory.removeLast(); + notifyListeners(); + } + + void updateTabs(int tab) { + if (tab == 0) { + _tabHistory = [0]; + } else { + _tabHistory.removeWhere((element) => element == tab); + _tabHistory.add(tab); + } + notifyListeners(); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/providers/token_manager.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/providers/token_manager.dart new file mode 100644 index 0000000..d33e633 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/providers/token_manager.dart @@ -0,0 +1,17 @@ +import 'package:flutter_secure_storage/flutter_secure_storage.dart'; + +class TokenManager { + static const storage = FlutterSecureStorage(); + + static Future setToken(String token) async { + await storage.write(key: 'token', value: token); + } + + static Future getToken() async { + return await storage.read(key: 'token'); + } + + static Future removeToken() async { + await storage.delete(key: 'token'); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/resources/api_constants.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/resources/api_constants.dart new file mode 100644 index 0000000..7652075 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/resources/api_constants.dart @@ -0,0 +1,3 @@ +class ApiConstants { + static const baseUrl = 'http://localhost:9292'; +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/routes/app_routes.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/routes/app_routes.dart new file mode 100644 index 0000000..453a5f5 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/routes/app_routes.dart @@ -0,0 +1,61 @@ +import 'dart:convert'; + +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; +import 'package:shared_preferences/shared_preferences.dart'; + +// import '../Entity/feedback_form/Studenthigh/Studenthigh_entity_list_screen.dart'; +import '../screens/Login Screen/login_screen_f.dart'; +import '../screens/MenuScreen/new_dash/Newdashboard.dart'; + +import '../screens/MenuScreen/new_work/comphrensive_form.dart'; +import '../screens/splash_screen/splash_screen.dart'; + +// ignore_for_file: must_be_immutable +class AppRoutes { + Map userData = {}; + var isLogin = false; + + Future checkifLogin() async { + SharedPreferences prefs = await SharedPreferences.getInstance(); + var userdatastr = prefs.getString('userData'); + + if (kDebugMode) { + print('userData....$userdatastr'); + } + + if (userdatastr != null) { + try { + userData = json.decode(userdatastr); + if (kDebugMode) { + print(userData['token']); + } + } catch (e) { + if (kDebugMode) { + print("error is ..................$e"); + } + } + } + } + + static const String loginScreen = '/loginScreen'; + + static const String initialRoute = '/initialRoute'; + static const String spalshscreen = '/splash'; + + static const String setting_screen = '/setting'; + + static const String newdashboard = '/newdashboard'; + + static const String studenthigh = '/studenthigh'; + static const String comprehensive = '/comprehensive'; + +// ROUTES>>> + static Map routes = { + spalshscreen: (context) => const SplashScreen(), + // studenthigh: (context) => studenthigh_entity_list_screen(), + comprehensive: (context) => FormPage(), + newdashboard: (context) => Newdashboard(), + loginScreen: (context) => LoginScreenF(true), + }; +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Bookmarks/Bookmarks_api_service.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Bookmarks/Bookmarks_api_service.dart new file mode 100644 index 0000000..6925deb --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Bookmarks/Bookmarks_api_service.dart @@ -0,0 +1,106 @@ +import 'package:dio/dio.dart'; +import 'package:http_parser/http_parser.dart'; +import 'dart:typed_data'; +import '/resources/api_constants.dart'; +import 'dart:convert'; + +import '../LogoutService/Logoutservice.dart'; + +class ApiService { + final String baseUrl = ApiConstants.baseUrl; + final Dio dio = Dio(); + + Future>> getEntities(String token) async { + try { + dio.options.headers['Authorization'] = 'Bearer $token'; + final response = await dio.get('$baseUrl/Bookmarks/Bookmarks'); + + if (response.statusCode == 401) { + LogoutService.logout(); + } + final entities = (response.data as List).cast>(); + return entities; + } catch (e) { + throw Exception('Failed to get all entities: $e'); + } + } + + Future createEntity( + String token, Map fData, dynamic selectedFile) async { + try { + String apiUrl = "$baseUrl/Bookmarks/Bookmarks"; + + final Uint8List fileBytes = selectedFile.bytes!; + final mimeType = lookupMimeType(selectedFile.name!); + + FormData formData = FormData.fromMap({ + 'file': MultipartFile.fromBytes( + fileBytes, + filename: selectedFile.name!, + contentType: MediaType.parse(mimeType!), + ), + 'data': jsonEncode( + fData), // Convert the map to JSON and include it as a parameter + }); + + Dio dio = Dio(); // Create a new Dio instance + dio.options.headers['Authorization'] = 'Bearer $token'; + + final response = await dio.post(apiUrl, data: formData); + if (response.statusCode == 401) { + LogoutService.logout(); + } + if (response.statusCode == 200) { + // Handle successful response + print('File uploaded successfully'); + } else { + print('Failed to upload file with status: ${response.statusCode}'); + } + } catch (error) { + print('Error occurred during form submission: $error'); + } + } + + String lookupMimeType(String filePath) { + final ext = filePath.split('.').last; + switch (ext) { + case 'jpg': + case 'jpeg': + return 'image/jpeg'; + case 'png': + return 'image/png'; + case 'pdf': + return 'application/pdf'; + // Add more cases for other file types as needed + default: + return 'application/octet-stream'; // Default MIME type + } + } + + Future updateEntity( + String token, int entityId, Map entity) async { + try { + dio.options.headers['Authorization'] = 'Bearer $token'; + var response = + await dio.put('$baseUrl/Bookmarks/Bookmarks/$entityId', data: entity); + if (response.statusCode == 401) { + LogoutService.logout(); + } + print(entity); + } catch (e) { + throw Exception('Failed to update entity: $e'); + } + } + + Future deleteEntity(String token, int entityId) async { + try { + dio.options.headers['Authorization'] = 'Bearer $token'; + var response = await dio.delete('$baseUrl/Bookmarks/Bookmarks/$entityId'); + if (response.statusCode == 401) { + LogoutService.logout(); + } + } catch (e) { + throw Exception('Failed to delete entity: $e'); + } + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Bookmarks/Bookmarks_create_entity_screen.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Bookmarks/Bookmarks_create_entity_screen.dart new file mode 100644 index 0000000..269769d --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Bookmarks/Bookmarks_create_entity_screen.dart @@ -0,0 +1,112 @@ +import 'package:flutter/material.dart'; + +import '/providers/token_manager.dart'; +import 'package:flutter/services.dart'; + +import 'Bookmarks_api_service.dart'; + +class CreateEntityScreen extends StatefulWidget { + const CreateEntityScreen({super.key}); + + @override + _CreateEntityScreenState createState() => _CreateEntityScreenState(); +} + +class _CreateEntityScreenState extends State { + final ApiService apiService = ApiService(); + final Map formData = {}; + final _formKey = GlobalKey(); + var selectedFileupload_Field; + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar(title: const Text('Create Bookmarks')), + body: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.all(16), + child: Form( + key: _formKey, + child: Column( + children: [ + TextFormField( + decoration: + const InputDecoration(labelText: 'bookmark_firstletter'), + onSaved: (value) => formData['bookmark_firstletter'] = value, + ), + const SizedBox(height: 16), + TextFormField( + decoration: const InputDecoration(labelText: 'bookmark_link'), + onSaved: (value) => formData['bookmark_link'] = value, + ), + const SizedBox(height: 16), + TextFormField( + decoration: + const InputDecoration(labelText: 'fileupload_field'), + onSaved: (value) => formData['fileupload_field'] = value, + ), + const SizedBox(height: 16), + Container( + margin: const EdgeInsets.symmetric(vertical: 5), // Add margin + child: ElevatedButton( + onPressed: () async { + if (_formKey.currentState!.validate()) { + _formKey.currentState!.save(); + + final token = await TokenManager.getToken(); + try { + print("token is : $token"); + print(formData); + + await apiService.createEntity( + token!, formData, selectedFileupload_Field); + + Navigator.pop(context); + } catch (e) { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: const Text('Error'), + content: Text('Failed to create entity: $e'), + actions: [ + TextButton( + child: const Text('OK'), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ], + ); + }, + ); + } + } + }, + child: Container( + width: double.infinity, + height: 50, + child: const Center( + child: Text( + 'SUBMIT', + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + ), + ), + ), + ), + ), + ), + ], + ), + ), + ), + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Bookmarks/Bookmarks_entity_list_screen.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Bookmarks/Bookmarks_entity_list_screen.dart new file mode 100644 index 0000000..e7a1ac1 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Bookmarks/Bookmarks_entity_list_screen.dart @@ -0,0 +1,375 @@ +import 'package:flutter/material.dart'; +import 'package:intl/intl.dart'; +import '/providers/token_manager.dart'; +import '../../utils/image_constant.dart'; +import '../../utils/size_utils.dart'; +import '../../theme/app_decoration.dart'; +import '../../theme/app_style.dart'; +import '../../widgets/app_bar/appbar_image.dart'; +import '../../widgets/app_bar/appbar_title.dart'; +import '../../widgets/app_bar/custom_app_bar.dart'; +import 'Bookmarks_api_service.dart'; +import 'package:url_launcher/url_launcher.dart'; + +class bookmarks_entity_list_screen extends StatefulWidget { + static const String routeName = '/entity-list'; + + @override + _bookmarks_entity_list_screenState createState() => + _bookmarks_entity_list_screenState(); +} + +class _bookmarks_entity_list_screenState + extends State { + final ApiService apiService = ApiService(); + List> entities = []; + bool showCardView = true; // Add this variable to control the view mode + + @override + void initState() { + super.initState(); + fetchEntities(); + } + + Future fetchEntities() async { + try { + final token = await TokenManager.getToken(); + + if (token != null) { + final fetchedEntities = await apiService.getEntities(token); + setState(() { + entities = fetchedEntities; + }); + } + } catch (e) { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: const Text('Error'), + content: Text('Failed to fetch entities: $e'), + actions: [ + TextButton( + child: const Text('OK'), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ], + ); + }, + ); + } + } + + Future deleteEntity(Map entity) async { + try { + final token = await TokenManager.getToken(); + await apiService.deleteEntity(token!, entity['id']); + setState(() { + entities.remove(entity); + }); + } catch (e) { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: const Text('Error'), + content: Text('Failed to delete entity: $e'), + actions: [ + TextButton( + child: const Text('OK'), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ], + ); + }, + ); + } + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: CustomAppBar( + height: getVerticalSize(49), + leadingWidth: 40, + leading: AppbarImage( + height: getSize(24), + width: getSize(24), + svgPath: ImageConstant.imgArrowleftBlueGray900, + margin: getMargin(left: 16, top: 12, bottom: 13), + onTap: () { + Navigator.pop(context); + }), + centerTitle: true, + title: AppbarTitle(text: "Bookmarks")), + body: entities.isEmpty + ? const Center( + child: Text('No BookMarks found.'), + ) + : Container( + width: double.maxFinite, + padding: getPadding(left: 16, top: 16, right: 16, bottom: 16), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Padding( + padding: getPadding(top: 22), + child: entities.length != 0 + ? ListView.separated( + physics: NeverScrollableScrollPhysics(), + shrinkWrap: true, + separatorBuilder: (context, index) { + return SizedBox(height: getVerticalSize(24)); + }, + itemCount: entities.length, + itemBuilder: (context, index) { + Map entity = entities[index]; + return Container( + width: double.maxFinite, + child: Container( + padding: getPadding( + left: 16, + top: 5, + right: 5, + bottom: 17, + ), + decoration: AppDecoration.outlineGray70011 + .copyWith( + borderRadius: BorderRadiusStyle + .roundedBorder6, + color: Colors.grey[100]), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: + CrossAxisAlignment.start, + mainAxisAlignment: + MainAxisAlignment.center, + children: [ + Padding( + padding: getPadding( + //right: 13, + ), + child: Row( + children: [ + Container( + width: MediaQuery.of(context) + .size + .width * + 0.30, + // getHorizontalSize( + // 147, + // ), + margin: getMargin( + left: 8, + top: 3, + bottom: 1, + ), + child: Column( + crossAxisAlignment: + CrossAxisAlignment + .start, + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + Text( + entity['bookmark_firstletter'] ?? + 'No bookmark_firstletter provided', + overflow: TextOverflow + .ellipsis, + textAlign: + TextAlign.left, + style: AppStyle + .txtGreenSemiBold16, + ), + ], + ), + ), + Spacer(), + ], + ), + ), + Padding( + padding: getPadding( + top: 10, + ), + child: Row( + mainAxisAlignment: + MainAxisAlignment + .spaceBetween, + children: [ + Text( + 'BookMark Link', + overflow: + TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: AppStyle + .txtGilroyMedium16Bluegray800, + ), + GestureDetector( + onTap: () { + _launchURL(entity[ + 'bookmark_link']); + }, + child: Text( + entity['bookmark_link'] ?? + 'No bookmark_link provided', + overflow: + TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: AppStyle + .txtGilroyMedium16Green600, + ), + ) + ], + ), + ), + ], + ), + ), + ); + }) + : Container( + height: MediaQuery.of(context).size.height, + child: const Center( + child: Text("No Databases available"), + )), + ) + ]))); + } + + // Function to build list items + Widget _buildListItem(Map entity) { + return showCardView ? _buildCardView(entity) : _buildNormalView(entity); + } + + // Function to build card view for a list item + Widget _buildCardView(Map entity) { + return Card( + elevation: 2, + margin: const EdgeInsets.symmetric(vertical: 8, horizontal: 16), + child: _buildNormalView(entity)); + } + + Widget _buildNormalView(Map entity) { + return ListTile( + title: Text(entity['id'].toString()), + subtitle: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(entity['bookmark_firstletter'] ?? + 'No bookmark_firstletter provided'), + const SizedBox(height: 4), + GestureDetector( + onTap: () { + _launchURL(entity['bookmark_link']); + }, + child: Text( + entity['bookmark_link'] ?? 'No bookmark_link provided', + style: TextStyle( + color: + Colors.blue, // Change the color to make it look like a link + decoration: TextDecoration.underline, // Underline the link + ), + ), + ), + const SizedBox(height: 4), + Text(entity['fileupload_field'] ?? 'No fileupload_field provided'), + const SizedBox(height: 4), + // Added address text + ], + ), + // trailing: _buildPopupMenu(entity), + // onTap: () { + // _showAdditionalFieldsDialog(context, entity); + // }, + ); + } + +// Function to launch a URL in the browser + Future _launchURL(String? url) async { + if (url != null) { + try { + if (await canLaunch(url)) { + await launch(url); + } else { + throw 'Could not launch $url'; + } + } catch (e) { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: const Text('Error'), + content: Text('Failed to launch URL: $e'), + actions: [ + TextButton( + child: const Text('OK'), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ], + ); + }, + ); + } + } + } + + // Function to show additional fields in a dialog + void _showAdditionalFieldsDialog( + BuildContext context, + Map entity, + ) { + final dateFormat = + DateFormat('yyyy-MM-dd HH:mm:ss'); // Define your desired date format + + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: const Text('Additional Fields'), + content: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Text( + 'Created At: ${_formatTimestamp(entity['createdAt'], dateFormat)}'), + Text('Created By: ${entity['createdBy'] ?? 'N/A'}'), + Text('Updated By: ${entity['updatedBy'] ?? 'N/A'}'), + Text( + 'Updated At: ${_formatTimestamp(entity['updatedAt'], dateFormat)}'), + Text('Account ID: ${entity['accountId'] ?? 'N/A'}'), + ], + ), + actions: [ + TextButton( + child: const Text('Close'), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ], + ); + }, + ); + } + + String _formatTimestamp(dynamic timestamp, DateFormat dateFormat) { + if (timestamp is int) { + // If it's an integer, assume it's a Unix timestamp in milliseconds + final DateTime dateTime = DateTime.fromMillisecondsSinceEpoch(timestamp); + return dateFormat.format(dateTime); + } else if (timestamp is String) { + // If it's a string, assume it's already formatted as a date + return timestamp; + } else { + // Handle other cases here if needed + return 'N/A'; + } + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Bookmarks/Bookmarks_update_entity_screen.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Bookmarks/Bookmarks_update_entity_screen.dart new file mode 100644 index 0000000..ac924fb --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Bookmarks/Bookmarks_update_entity_screen.dart @@ -0,0 +1,140 @@ +import 'package:flutter/material.dart'; +import 'dart:math'; +import '/providers/token_manager.dart'; + +import 'package:flutter/services.dart'; + +import 'Bookmarks_api_service.dart'; + +class UpdateEntityScreen extends StatefulWidget { + final Map entity; + + UpdateEntityScreen({required this.entity}); + + @override + _UpdateEntityScreenState createState() => _UpdateEntityScreenState(); +} + +class _UpdateEntityScreenState extends State { + final ApiService apiService = ApiService(); + final _formKey = GlobalKey(); + + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar(title: const Text('Update Bookmarks')), + body: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.all(16), + child: Form( + key: _formKey, + child: Column( + children: [ + TextFormField( + initialValue: widget.entity['bookmark_firstletter'], + decoration: + const InputDecoration(labelText: 'bookmark_firstletter'), + validator: (value) { + if (value == null || value.isEmpty) { + return 'Please enter a bookmark_firstletter'; + } + return null; + }, + onSaved: (value) { + widget.entity['bookmark_firstletter'] = value; + }, + ), + const SizedBox(height: 16), + TextFormField( + initialValue: widget.entity['bookmark_link'], + decoration: const InputDecoration(labelText: 'bookmark_link'), + validator: (value) { + if (value == null || value.isEmpty) { + return 'Please enter a bookmark_link'; + } + return null; + }, + onSaved: (value) { + widget.entity['bookmark_link'] = value; + }, + ), + const SizedBox(height: 16), + TextFormField( + initialValue: widget.entity['fileupload_field'], + decoration: + const InputDecoration(labelText: 'fileupload_field'), + validator: (value) { + if (value == null || value.isEmpty) { + return 'Please enter a fileupload_field'; + } + return null; + }, + onSaved: (value) { + widget.entity['fileupload_field'] = value; + }, + ), + const SizedBox(height: 16), + Container( + margin: const EdgeInsets.symmetric(vertical: 5), // Add margin + child: ElevatedButton( + onPressed: () async { + if (_formKey.currentState!.validate()) { + _formKey.currentState!.save(); + + final token = await TokenManager.getToken(); + try { + await apiService.updateEntity( + token!, + widget.entity[ + 'id'], // Assuming 'id' is the key in your entity map + widget.entity); + Navigator.pop(context); + } catch (e) { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: const Text('Error'), + content: Text('Failed to update entity: $e'), + actions: [ + TextButton( + child: const Text('OK'), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ], + ); + }, + ); + } + } + }, + child: Container( + width: double.infinity, + height: 50, + child: const Center( + child: Text( + 'UPDATE', + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + ), + ), + ), + ), + ), + ), + ], + ), + ), + ), + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Dashboard/CreateDashboard.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Dashboard/CreateDashboard.dart new file mode 100644 index 0000000..247a170 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Dashboard/CreateDashboard.dart @@ -0,0 +1,200 @@ +import 'package:flutter/material.dart'; + +import '../../../utils/color_constants.dart'; +import '../../../utils/image_constant.dart'; +import '../../../utils/size_utils.dart'; +import '../../../theme/app_style.dart'; +import '../../../widgets/app_bar/appbar_image.dart'; +import '../../../widgets/app_bar/appbar_title.dart'; +import '../../../widgets/app_bar/custom_app_bar.dart'; +import '../../../widgets/custom_button.dart'; +import '../../../widgets/custom_text_form_field.dart'; +import '../../providers/token_manager.dart'; +import 'Dashboard_Service.dart'; + +class CreateDashboardScreen extends StatefulWidget { + final int moduleId; // Add moduleId parameter + + CreateDashboardScreen({required this.moduleId, Key? key}) : super(key: key); + + @override + _CreateDashboardScreenState createState() => _CreateDashboardScreenState(); +} + +class _CreateDashboardScreenState extends State { + final DashboardApiService dashService = DashboardApiService(); + + final Map formData = {}; + final Map dashboardline = {}; + List> dashlineList = []; + + final _formKey = GlobalKey(); + bool istesting = false; + + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return SafeArea( + child: Scaffold( + backgroundColor: ColorConstant.gray50, + resizeToAvoidBottomInset: false, + appBar: CustomAppBar( + height: getVerticalSize(49), + leadingWidth: 40, + leading: AppbarImage( + height: getSize(24), + width: getSize(24), + svgPath: ImageConstant.imgArrowleftBlueGray900, + margin: getMargin(left: 16, top: 12, bottom: 13), + onTap: () { + onTapArrowleft21(context); + }), + centerTitle: true, + title: AppbarTitle(text: "Create Dashboard")), + body: Form( + key: _formKey, + child: Container( + width: double.maxFinite, + padding: + getPadding(left: 16, top: 27, right: 16, bottom: 27), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text("Dashboard name", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: + AppStyle.txtGilroyMedium16Bluegray900), + CustomTextFormField( + focusNode: FocusNode(), + hintText: "Please Enter Dashboard Name", + onsaved: (value) => + formData['dashboard_name'] = value + ?.replaceAll(" ", "-") + .toLowerCase(), + validator: (value) { + if (value == null || value.isEmpty) { + return 'Please Enter Dashboard name'; + } + return null; + }, + margin: getMargin(top: 7)) + ]), + Padding( + padding: getPadding(top: 19), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text("Description", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: AppStyle + .txtGilroyMedium16Bluegray900), + CustomTextFormField( + focusNode: FocusNode(), + hintText: "Enter Description", + onsaved: (value) => + formData['description'] = value, + margin: getMargin(top: 6)) + ])), + Padding( + padding: getPadding(top: 18), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text("Secuirity Profile", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: AppStyle + .txtGilroyMedium16Bluegray800), + CustomTextFormField( + focusNode: FocusNode(), + onsaved: (value) => + formData['secuirity_profile'] = + value, + hintText: "Enter secuirity profile", + margin: getMargin(top: 7), + textInputType: + TextInputType.emailAddress) + ])), + const SizedBox(width: 8), + Row(children: [ + Text("Testing", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: AppStyle.txtGilroyMedium16Bluegray900), + Checkbox( + activeColor: ColorConstant.blueA700, + value: istesting, + onChanged: (newValue) { + setState(() { + istesting = newValue!; + }); + }, + ), + ]), + CustomButton( + height: getVerticalSize(50), + text: "Submit", + margin: getMargin(top: 24, bottom: 5), + onTap: () async { + if (_formKey.currentState!.validate()) { + _formKey.currentState!.save(); + formData['testing'] = istesting; + + formData['module_id'] = widget.moduleId; + dashboardline['model'] = + '{"dashboard":[{"cols":5,"rows":5,"x":0,"y":0,"chartid":4,"component":"Bar Chart","name":"Bar Chart"}]}'; + + dashlineList.add(dashboardline); + formData['dashbord1_Line'] = dashlineList; + + final token = await TokenManager.getToken(); + try { + print(formData); + + await dashService.createdashboard( + token!, formData, context); + + Navigator.pop(context); + } catch (e) { + // ignore: use_build_context_synchronously + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: const Text('Error'), + content: Text( + 'Failed to create Dashboard: $e'), + actions: [ + TextButton( + child: const Text('OK'), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ], + ); + }, + ); + } + } + }, + ), + ]))))); + } + + onTapArrowleft21(BuildContext context) { + Navigator.pop(context); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Dashboard/Dashboard_Service.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Dashboard/Dashboard_Service.dart new file mode 100644 index 0000000..d399341 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Dashboard/Dashboard_Service.dart @@ -0,0 +1,161 @@ +import 'package:dio/dio.dart'; +import 'package:flutter/material.dart'; + +import '../../../widgets/custom_messenger.dart'; +import '../../resources/api_constants.dart'; +import '../LogoutService/Logoutservice.dart'; + +class DashboardApiService { + final String baseUrl = ApiConstants.baseUrl; + final Dio dio = Dio(); + final Map wf_formData = {}; + + Future>> getdashboardBymoduleId( + String token, + ) async { + try { + dio.options.headers['Authorization'] = 'Bearer $token'; + final response = await dio.get('$baseUrl/get_Dashboard_header'); + if (response.statusCode == 401) { + LogoutService.logout(); + } + final responseData = response.data; + if (responseData is List) { + // If the response is a list, cast it to the expected type + final entities = responseData.cast>(); + return entities; + } else if (responseData is Map) { + // If the response is a single object, wrap it in a list + return [responseData]; + } else { + // Handle other unexpected response types here + throw Exception('Unexpected response type'); + } + } catch (e) { + throw Exception('Failed to get dashboard by moduleid: $e'); + } + } + + Future createdashboard( + String token, Map entity, BuildContext context) async { + try { + dio.options.headers['Authorization'] = 'Bearer $token'; + final response = await dio.post('$baseUrl/Savedata', data: entity); + if (response.statusCode == 401) { + LogoutService.logout(); + } + print(response); + ScaffoldMessenger.of(context).showSnackBar(ShowSnackAlert.CustomMessenger( + context, + Colors.green.shade600, + Colors.green.shade900, + ' Dashboard Created')); + // final responseData = response.data; + // final headerid = responseData['id']; + + // wf_formData['header_id'] = headerid; + // wf_formData['model'] = + // '{"name":"form","description":"Form Description...","theme":{"bannerImage":""},"dashboard":[{"cols":8,"rows":2,"x":0,"y":0,"chartid":1,"name":"Text Field","charttitle":"Text Field","component":"Text Field","type":"text"}]}'; + + // print('hear id is $headerid and wfmodel is $wf_formData'); + // createwfmodel(token!, wf_formData); + } catch (e) { + throw Exception('Failed to create dashboard: $e'); + } + } + + // Future createwfmodel(String token, Map entity) async { + // try { + // dio.options.headers['Authorization'] = 'Bearer $token'; + // await dio.post('$baseUrl/r/create', data: entity); + // print('wf model is $entity'); + // } catch (e) { + // throw Exception('Failed to create dashboard: $e'); + // } + // } + + Future updatedashboard( + String token, Map entity, BuildContext context) async { + try { + dio.options.headers['Authorization'] = 'Bearer $token'; + var response = + await dio.put('$baseUrl/update_dashboard_header', data: entity); + if (response.statusCode == 401) { + LogoutService.logout(); + } + print(entity); + ScaffoldMessenger.of(context).showSnackBar(ShowSnackAlert.CustomMessenger( + context, + Colors.orange.shade400, + Colors.orange.shade900, + ' Dashboard Updated')); + } catch (e) { + throw Exception('Failed to update dashboard: $e'); + } + } + +// UPDATE DASHBOARD LINE + Future updatedashboardLine(String token, int entityId, + Map entity, BuildContext context) async { + try { + dio.options.headers['Authorization'] = 'Bearer $token'; + var response = await dio + .put('$baseUrl/update_Dashbord1_Lineby_id/$entityId', data: entity); + ScaffoldMessenger.of(context).showSnackBar(ShowSnackAlert.CustomMessenger( + context, + Colors.green.shade600, + Colors.green.shade900, + ' Update Successfull')); + if (response.statusCode == 401) { + LogoutService.logout(); + } + print(entity); + } catch (e) { + throw Exception('Failed to update dashboard line: $e'); + } + } + + Future deletedashboard( + String token, int entityId, BuildContext context) async { + try { + dio.options.headers['Authorization'] = 'Bearer $token'; + var response = await dio.delete('$baseUrl/delete_by_header_id/$entityId'); + if (response.statusCode == 401) { + LogoutService.logout(); + } + ScaffoldMessenger.of(context).showSnackBar(ShowSnackAlert.CustomMessenger( + context, + Colors.red.shade400, + Colors.red.shade900, + ' Dashboaard deleted')); + } catch (e) { + throw Exception('Failed to delete dashboard: $e'); + } + } + + Future> getDashlinebyheaderid( + String token, int header_id) async { + try { + dio.options.headers['Authorization'] = 'Bearer $token'; + final response = await dio.get('$baseUrl/r/get_wf/$header_id'); + if (response.statusCode == 401) { + LogoutService.logout(); + } + final responseData = response.data; + return responseData; + } catch (e) { + throw Exception('Failed to get data: $e'); + } + } + + // Future updateWf_model( + // String token, int headerId, Map entity) async { + // try { + // dio.options.headers['Authorization'] = 'Bearer $token'; + // await dio.put('$baseUrl/r/updatewfline/$headerId', data: entity); + // print(entity); + // } catch (e) { + // throw Exception('Failed to update dashboard: $e'); + // } + // } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Dashboard/chartlist.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Dashboard/chartlist.dart new file mode 100644 index 0000000..9e495f9 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Dashboard/chartlist.dart @@ -0,0 +1,904 @@ +import 'package:fl_chart/fl_chart.dart'; +import 'package:flutter/material.dart'; +import 'dart:math' as Math; + +class IndexWidget extends StatefulWidget { + final dynamic name; + final IconData icon; + + IndexWidget({required this.name, required this.icon}); + + @override + _IndexWidgetState createState() => _IndexWidgetState(); +} + +class _IndexWidgetState extends State { + int myProjectcount = 0; + + @override + Widget build(BuildContext context) { + return GestureDetector( + onTap: () { + // Increment the myProjectcount variable when the card is clicked + setState(() { + myProjectcount++; + }); + }, + child: Card( + color: const Color(0xff1546A0), + elevation: 5.0, + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + children: [ + Icon( + widget.icon, + color: Colors.white, + size: 24.0, + ), + Text( + myProjectcount.toString(), + style: const TextStyle( + color: Colors.white, + fontSize: 12, + ), + ), + Text( + widget.name ?? '', + style: const TextStyle( + color: Colors.white, + fontSize: 12, + ), + ), + ], + ), + ), + ), + ); + } +} + +// Bar Chart Widget +class BarChartWidget extends StatelessWidget { + final dynamic apiData; // Accept dynamic type for flexibility + + BarChartWidget({required this.apiData}); + + List convertDataToBarGroups(dynamic data) { + if (data == null) { + // Return default data if apiData is null + return List.generate(1, (index) { + return BarChartGroupData( + x: index.hashCode, // Use index as x-value for list data + barRods: [ + BarChartRodData( + toY: + 0.0, // Set a default value or any other logic for default data + color: Colors.blue, + width: 16, + ), + ], + showingTooltipIndicators: [0], + ); + }); + } else if (data is Map) { + // Extract keys and values from the map + final List keys = data.keys.toList(); + final List values = data.values.toList(); + + // Generate BarChartGroupData for each key-value pair in the map + return List.generate(keys.length, (index) { + final String key = keys[index]; + final double yValue = double.tryParse(values[index].toString()) ?? 0.0; + + return BarChartGroupData( + x: index, + barRods: [ + BarChartRodData( + toY: + 0.0, // Set a default value or any other logic for default data + color: Colors.blue, + width: 16, + ), + ], + showingTooltipIndicators: [0], + ); + }); + } else if (data is List) { + // Handle case when data is a list + return data.asMap().entries.map((entry) { + final index = entry.key; + final value = entry.value; + + if (value is Map) { + // Generate BarChartGroupData for each key-value pair in the map + return BarChartGroupData( + x: index, + barRods: value.entries.map((mapEntry) { + final rodKey = mapEntry.key; + final rodValue = + double.tryParse(mapEntry.value.toString()) ?? 0.0; + + return BarChartRodData( + toY: + 0.0, // Set a default value or any other logic for default data + color: Colors.blue, + width: 16, + ); + }).toList(), + showingTooltipIndicators: List.generate(value.length, (i) => i), + ); + } else { + // Generate a single BarChartGroupData for non-map entries + final double yValue = double.tryParse(value.toString()) ?? 0.0; + + return BarChartGroupData( + x: index, + barRods: [ + BarChartRodData( + toY: + 0.0, // Set a default value or any other logic for default data + color: Colors.blue, + width: 16, + ), + ], + showingTooltipIndicators: [0], + ); + } + }).toList(); + } else { + // Handle other cases or throw an exception based on your requirements + throw Exception('Invalid data type'); + } + } + + @override + Widget build(BuildContext context) { + double screenWidth = MediaQuery.of(context).size.width; + List> chartData = []; + apiData.forEach((key, value) { + chartData.add({'x': key, 'y': double.parse(value.toString())}); + }); + List barGroups = convertDataToBarGroups(apiData); + + return Container( + width: screenWidth, + height: 300, + padding: const EdgeInsets.all(16), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(16), + color: Colors.white, + boxShadow: [ + BoxShadow( + color: Colors.grey.withOpacity(0.5), + spreadRadius: 2, + blurRadius: 4, + offset: const Offset(0, 2), + ), + ], + ), + // child: BarChart( + // BarChartData( + // titlesData: FlTitlesData( + // show: true, + // bottomTitles: SideTitles( + // showTitles: true, + // interval: 1, + // getTitles: (value) { + // // Custom function to show x-axis titles based on the data + // int index = value.toInt(); + // if (index >= 0 && index < chartData.length) { + // return chartData[index]['x'].toString(); + // } + // return ''; + // }, + // ), + // // bottomTitles: SideTitles( + // // showTitles: true, + // // rotateAngle: 45, + // // interval: 1.0, + // // getTitles: (double value) { + // // if (value >= 0 && value < barGroups.length) { + // // // Ensure the index is within the valid range + // // return barGroups[value.toInt()].x.toInt().toString(); + // // } + // // return ''; + // // }, + // // ), + // ), + // borderData: FlBorderData( + // show: true, + // ), + // gridData: FlGridData( + // show: true, + // ), + // barGroups: barGroups, + // ), + // swapAnimationDuration: Duration(milliseconds: 150), // Optional + // swapAnimationCurve: Curves.linear, + // ), + ); + } +} + +class LineChartWidget extends StatelessWidget { + final Map apiData; + + LineChartWidget({required this.apiData}); + + @override + Widget build(BuildContext context) { + double screenWidth = MediaQuery.of(context).size.width; + + List> chartData = []; + apiData.forEach((key, value) { + chartData.add({'x': key, 'y': double.parse(value.toString())}); + }); + + return Container( + width: screenWidth, + height: 300, + padding: const EdgeInsets.all(16), + // child: LineChart( + // LineChartData( + // titlesData: FlTitlesData( + // show: true, + // // leftTitles: SideTitles( + // // showTitles: true, + // // interval: 1, + // // ), + // bottomTitles: SideTitles( + // showTitles: true, + // interval: 1, + // getTitles: (value) { + // // Custom function to show x-axis titles based on the data + // int index = value.toInt(); + // if (index >= 0 && index < chartData.length) { + // return chartData[index]['x'].toString(); + // } + // return ''; + // }, + // ), + // ), + // gridData: FlGridData( + // show: true, + // ), + // borderData: FlBorderData( + // show: true, + // ), + // minX: 0, + // maxX: chartData.length.toDouble() - 1, + // minY: 0, + // maxY: chartData + // .map((point) => (point['y'] as num?) ?? 0) + // .reduce((a, b) => a > b ? a : b) + + // 1, + // lineBarsData: [ + // LineChartBarData( + // spots: chartData + // .asMap() + // .entries + // .map((entry) => + // FlSpot(entry.key.toDouble(), entry.value['y'])) + // .toList(), + // isCurved: true, + // colors: [Colors.blue], + // dotData: FlDotData( + // show: true, + // checkToShowDot: (spot, barData) { + // return true; + // }, + // ), + // belowBarData: BarAreaData( + // show: false, + // ), + // ), + // ], + // ), + // ), + ); + } +} + +class DonutChartWidget extends StatelessWidget { + final dynamic data; + + DonutChartWidget({required this.data}); + + @override + Widget build(BuildContext context) { + double screenWidth = MediaQuery.of(context).size.width; + + List sections = []; + + // Convert values to double for chart + data.forEach((key, value) { + double numericValue = value is String + ? double.tryParse(value) ?? 0.0 + : value is int + ? value.toDouble() + : 0.0; + + sections.add( + PieChartSectionData( + value: numericValue, + color: getRandomColor(), + title: '${numericValue.toStringAsFixed(0)}%', + ), + ); + }); + + return Container( + width: screenWidth, + height: 300, + padding: const EdgeInsets.all(16), + // child: PieChart( + // PieChartData( + // sections: sections, + // borderData: FlBorderData( + // show: false, // Set to true if you want to show the border + // ), + // centerSpaceRadius: 40, // Adjust the radius for the donut effect + // ), + // ), + ); + } + + Color getRandomColor() { + return Color((DateTime.now().millisecondsSinceEpoch / 10).toInt() << 0) + .withOpacity(1.0); + } +} + +class PieChartWidget extends StatelessWidget { + final Map data; + + PieChartWidget({required this.data}); + + @override + Widget build(BuildContext context) { + double screenWidth = MediaQuery.of(context).size.width; + + List sections = []; + + data.forEach((key, value) { + double numericValue = value is String + ? double.tryParse(value) ?? 0.0 + : value is int + ? value.toDouble() + : 0.0; + + sections.add( + PieChartSectionData( + value: numericValue, + color: getRandomColor(), + title: '${numericValue.toStringAsFixed(0)}%', + ), + ); + }); + + return Container( + width: screenWidth, + height: 300, + padding: const EdgeInsets.all(16), + // child: PieChart( + // PieChartData( + // sections: sections, + // ), + // ), + ); + } + + Color getRandomColor() { + return Color((Math.Random().nextDouble() * 0xFFFFFF).toInt() << 0) + .withOpacity(1.0); + } +} + +class BubbleChartWidget extends StatelessWidget { + final Map data; + + BubbleChartWidget({required this.data}); + + @override + Widget build(BuildContext context) { + List bubbleDataList = []; + + // Extract values and map them to bubble data + data.forEach((key, value) { + double numericValue = value is String + ? double.tryParse(value) ?? 0.0 + : value is int + ? value.toDouble() + : 0.0; + + bubbleDataList.add( + BubbleChartData( + name: key, + x: getRandomCoordinate(), + y: getRandomCoordinate(), + radius: numericValue * 2, // Adjust the scaling factor as needed + color: getRandomColor(), + ), + ); + }); + + return Container( + width: double.infinity, + height: 300, + child: CustomPaint( + size: const Size(300, 300), + painter: BubbleChartPainter(bubbleDataList), + ), + ); + } + + double getRandomCoordinate() { + return Math.Random().nextDouble() * + 300; // Adjust the range based on your needs + } + + Color getRandomColor() { + return Color((Math.Random().nextDouble() * 0xFFFFFF).toInt() << 0) + .withOpacity(1.0); + } +} + +class BubbleChartData { + final String name; + final double x; + final double y; + final double radius; + final Color color; + + BubbleChartData({ + required this.name, + required this.x, + required this.y, + required this.radius, + required this.color, + }); +} + +class BubbleChartPainter extends CustomPainter { + final List data; + + BubbleChartPainter(this.data); + + @override + void paint(Canvas canvas, Size size) { + Paint paint = Paint(); + + for (var bubbleData in data) { + paint.color = bubbleData.color; + + // Draw the bubble + canvas.drawCircle( + Offset(bubbleData.x, bubbleData.y), + bubbleData.radius, + paint, + ); + + // Draw the name as text on the bubble + TextPainter textPainter = TextPainter( + text: TextSpan( + text: bubbleData.name, + style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold), + ), + textDirection: TextDirection.ltr, + ); + textPainter.layout(); + textPainter.paint( + canvas, + Offset(bubbleData.x - textPainter.width / 2, + bubbleData.y - textPainter.height / 2), + ); + } + } + + @override + bool shouldRepaint(covariant CustomPainter oldDelegate) { + return true; + } +} + +class ScatterChartWidget extends StatelessWidget { + final Map apiData; + + ScatterChartWidget({required this.apiData}); + + @override + Widget build(BuildContext context) { + double screenWidth = MediaQuery.of(context).size.width; + + List> chartData = []; + apiData.forEach((key, value) { + chartData.add({'x': key, 'y': double.parse(value.toString())}); + }); + + return Container( + width: screenWidth, + height: 300, + padding: const EdgeInsets.all(16), + // child: ScatterChart( + // ScatterChartData( + // titlesData: FlTitlesData( + // show: true, + // // leftTitles: SideTitles( + // // showTitles: true, + // // interval: 1, + // // ), + // bottomTitles: SideTitles( + // showTitles: true, + // interval: 1, + // getTitles: (value) { + // int index = value.toInt(); + // if (index >= 0 && index < chartData.length) { + // return chartData[index]['x'].toString(); + // } + // return ''; + // }, + // ), + // ), + // gridData: FlGridData( + // show: true, + // ), + // borderData: FlBorderData( + // show: true, + // ), + // minX: 0, + // maxX: chartData.length.toDouble() - 1, + // minY: 0, + // maxY: chartData + // .map((point) => (point['y'] as num?) ?? 0) + // .reduce((a, b) => a > b ? a : b) + + // 1, + // scatterSpots: chartData + // .asMap() + // .entries + // .map((entry) => + // ScatterSpot(entry.key.toDouble(), entry.value['y'])) + // .toList(), + // scatterTouchData: ScatterTouchData( + // touchTooltipData: ScatterTouchTooltipData( + // tooltipBgColor: Colors.blueAccent, + // ), + // ), + // ), + // ), + ); + } +} + +class DynamicLineChart extends StatefulWidget { + final Map data; + + DynamicLineChart({required this.data}); + + @override + _DynamicLineChartState createState() => _DynamicLineChartState(); +} + +class _DynamicLineChartState extends State { + List dataPoints = []; + + @override + void initState() { + super.initState(); + _initializeDataPoints(); + } + + void _initializeDataPoints() { + // Extract data from the widget's data map and create FlSpot objects + int index = 0; + widget.data.forEach((key, value) { + double x = index.toDouble(); + double y = double.tryParse(value.toString()) ?? 0.0; + dataPoints.add(FlSpot(x, y)); + index++; + }); + } + + void updateData() { + // Simulate data update by adding a new point + setState(() { + final double newX = dataPoints.length.toDouble(); + final double newY = newX * 2; // Example: New data point value + + dataPoints.add(FlSpot(newX, newY)); + }); + } + + @override + Widget build(BuildContext context) { + List> chartData = []; + widget.data.forEach((key, value) { + chartData.add({'x': key, 'y': double.parse(value.toString())}); + }); + return Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + // AspectRatio( + // aspectRatio: 1.5, + // child: LineChart( + // LineChartData( + // titlesData: FlTitlesData( + // // leftTitles: SideTitles(showTitles: true), + // //bottomTitles: SideTitles(showTitles: true), + // bottomTitles: SideTitles( + // showTitles: true, + // interval: 1, + // getTitles: (value) { + // int index = value.toInt(); + // if (index >= 0 && index < chartData.length) { + // return chartData[index]['x'].toString(); + // } + // return ''; + // }, + // ), + // ), + // borderData: FlBorderData(show: true), + // gridData: FlGridData(show: true), + // lineBarsData: [ + // LineChartBarData( + // spots: dataPoints, + // isCurved: true, + // colors: [Colors.blue], + // dotData: FlDotData(show: false), + // belowBarData: BarAreaData(show: false), + // ), + // ], + // ), + // ), + // ), + const SizedBox(height: 20), + ElevatedButton( + onPressed: () { + updateData(); + }, + child: const Text('Add Data Point'), + ), + ], + ); + } +} + +// class FinancialChart extends StatelessWidget { +// final Map data; +// +// FinancialChart({required this.data}); +// +// @override +// Widget build(BuildContext context) { +// // Extract keys and values from the financialData map +// List spots = data.entries.map((entry) { +// double x = double.tryParse(entry.key) ?? 0.0; +// double y = _parseDouble(entry.value) ?? 0.0; +// return FlSpot(x, y); +// }).toList(); +// +// return Container( +// decoration: BoxDecoration( +// borderRadius: BorderRadius.circular(16), +// color: Colors.white, +// boxShadow: [ +// BoxShadow( +// color: Colors.grey.withOpacity(0.5), +// spreadRadius: 2, +// blurRadius: 4, +// offset: const Offset(0, 2), +// ), +// ], +// ), +// child: LineChart( +// LineChartData( +// titlesData: FlTitlesData( +// show: true, +// leftTitles: SideTitles( +// showTitles: true, +// interval: 50.0, // Customize the interval for left titles +// ), +// bottomTitles: SideTitles( +// showTitles: true, +// rotateAngle: 45, // Rotate bottom titles for better readability +// interval: 1.0, // Customize the interval for bottom titles +// ), +// ), +// borderData: FlBorderData( +// show: true, +// ), +// gridData: FlGridData( +// show: true, +// ), +// minX: 0, // Define your minimum X-axis value +// maxX: data.length.toDouble() - 1, // Define your maximum X-axis value +// minY: 0, // Define your minimum Y-axis value +// maxY: 200, // Define your maximum Y-axis value (adjust based on your data) +// +// lineBarsData: [ +// LineChartBarData( +// spots: spots, +// isCurved: true, +// colors: [Colors.blue], // Line color +// dotData: FlDotData( +// show: true, // Show dots on the line +// checkToShowDot: (spot, barData) { +// return true; // Show dots for all spots +// }, +// ), +// belowBarData: BarAreaData( +// show: false, +// ), +// ), +// ], +// ), +// ), +// ); +// } +// +// double? _parseDouble(dynamic value) { +// if (value is num) { +// return value.toDouble(); +// } else if (value is String) { +// return double.tryParse(value); +// } +// return null; +// } +// } + +class CandlestickChart extends StatelessWidget { + final Map data; + + CandlestickChart({required this.data}); + + @override + Widget build(BuildContext context) { + return AspectRatio( + aspectRatio: 1.2, + child: Card( + elevation: 4, + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)), + color: const Color(0xff020227), + child: Padding( + padding: const EdgeInsets.all(16), + child: CandlestickChartWidget( + data: data, + ), + ), + ), + ); + } +} + +class CandlestickChartWidget extends StatelessWidget { + final Map data; + + CandlestickChartWidget({required this.data}); + + @override + Widget build(BuildContext context) { + // return LineChart( + // LineChartData( + // lineBarsData: [ + // LineChartBarData( + // spots: _generateSpots(), + // isCurved: true, + // colors: [Colors.blue], + // belowBarData: BarAreaData(show: false), + // dotData: FlDotData(show: false), + // // You can customize other properties as needed + // ), + // ], + // titlesData: FlTitlesData( + // leftTitles: SideTitles(showTitles: true), + // bottomTitles: SideTitles(showTitles: true), + // // You can customize other title properties as needed + // ), + // gridData: FlGridData(show: false), + // borderData: FlBorderData( + // show: true, + // border: Border.all( + // color: const Color(0xff37434d), + // width: 1, + // ), + // ), + // //lineBarsBorderColor: const Color(0xff37434d), + // lineTouchData: LineTouchData( + // touchTooltipData: LineTouchTooltipData( + // tooltipBgColor: const Color(0xff5500ff), + // ), + // touchCallback: (FlTouchEvent touchEvent, LineTouchResponse? touchResponse) {}, + // handleBuiltInTouches: true, + // ), + // ), + // ); + return Container(); + } + + List _generateSpots() { + // Convert your dynamic data into a list of FlSpot + List spots = []; + + // Iterate over the keys in the dynamic data + int index = 0; + data.forEach((key, value) { + // Use the index as x-coordinate and the dynamic value as y-coordinate + spots + .add(FlSpot(index.toDouble(), (value is num) ? value.toDouble() : 0)); + index++; + }); + + return spots; + } +} + +class TodoChartWidget extends StatefulWidget { + final Map data; + TodoChartWidget({required this.data}); + + @override + State createState() => _TodoChartWidgetState(); +} + +class _TodoChartWidgetState extends State { + List tasks = []; + + List mapToListOfString(Map inputMap) { + // Use the map function to extract values + List result = inputMap.entries.map((entry) { + // Concatenate key and value into a string + return '${entry.key}: ${entry.value.toString()}'; + }).toList(); + + return result; + } + + @override + void initState() { + setState(() { + tasks = mapToListOfString(widget.data); + }); + } + + @override + Widget build(BuildContext context) { + return Container( + padding: const EdgeInsets.all(16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const Text( + "To-Do List", + style: TextStyle( + fontSize: 20, + fontWeight: FontWeight.bold, + ), + ), + const SizedBox(height: 10), + ListView.builder( + shrinkWrap: true, + itemCount: tasks.length, + itemBuilder: (context, index) { + final task = tasks[index]; + return ListTile( + leading: CircleAvatar( + backgroundColor: Colors.blue, + child: Text( + (index + 1).toString(), + style: const TextStyle(color: Colors.white), + ), + ), + title: Text( + task, + style: const TextStyle( + fontSize: 16, + ), + ), + ); + }, + ), + ], + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Dashboard/create_dashboard_f.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Dashboard/create_dashboard_f.dart new file mode 100644 index 0000000..e462f6b --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Dashboard/create_dashboard_f.dart @@ -0,0 +1,262 @@ +import 'dart:convert'; + +import 'package:flutter/material.dart'; +import 'package:shared_preferences/shared_preferences.dart'; + +import '../../../utils/color_constants.dart'; +import '../../../utils/image_constant.dart'; +import '../../../utils/size_utils.dart'; +import '../../../providers/token_manager.dart'; +import '../../../theme/app_style.dart'; +import '../../../widgets/app_bar/appbar_image.dart'; +import '../../../widgets/app_bar/appbar_title.dart'; +import '../../../widgets/app_bar/custom_app_bar.dart'; +import '../../../widgets/custom_text_form_field.dart'; +import '../Login Screen/CustomButton.dart'; +import '../MenuScreen/new_dash/Newdashboard.dart'; +import 'Dashboard_Service.dart'; + +class CreateDashboardScreenF extends StatefulWidget { + const CreateDashboardScreenF({super.key}); + + @override + State createState() => _CreateDashboardScreenFState(); +} + +class _CreateDashboardScreenFState extends State { + final DashboardApiService dashService = DashboardApiService(); + var _currentIndex = 1; + + final Map formData = {}; + final Map dashboardline = {}; + List> dashlineList = []; + + final _formKey = GlobalKey(); + bool istesting = false; + + @override + void initState() { + super.initState(); + getUserData(); + } + + Map userData = {}; + + getUserData() async { + SharedPreferences prefs = await SharedPreferences.getInstance(); + var userdatastr = prefs.getString('userData'); + if (userdatastr != null) { + try { + setState(() { + userData = json.decode(userdatastr); + }); + print(userData['token']); + } catch (e) { + print("error is ..................$e"); + } + } + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: CustomAppBar( + height: getVerticalSize(49), + leadingWidth: 40, + leading: AppbarImage( + height: getSize(24), + width: getSize(24), + svgPath: ImageConstant.imgArrowleftBlueGray900, + margin: getMargin(left: 16, top: 12, bottom: 13), + onTap: () { + onTapArrowleft21(context); + }), + centerTitle: true, + title: AppbarTitle(text: "Create Dashboard")), + body: SingleChildScrollView( + child: Padding( + padding: EdgeInsets.all(16), + child: Form( + key: _formKey, + child: Container( + width: double.maxFinite, + padding: getPadding(left: 16, top: 27, right: 16, bottom: 27), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text("Dashboard name", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: AppStyle.fieldlabel), + CustomTextFormField( + focusNode: FocusNode(), + hintText: "Please Enter Dashboard Name", + onsaved: (value) => formData['dashboard_name'] = + value?.replaceAll(" ", "-").toLowerCase(), + validator: (value) { + if (value == null || value.isEmpty) { + return 'Please Enter Dashboard name'; + } + return null; + }, + ) + ]), + Padding( + padding: getPadding(top: 22), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text("Description", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: AppStyle.fieldlabel), + CustomTextFormField( + focusNode: FocusNode(), + hintText: "Enter Description", + onsaved: (value) => + formData['description'] = value, + ) + ])), + Padding( + padding: getPadding(top: 22), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text("Secuirity Profile", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: AppStyle.fieldlabel), + CustomTextFormField( + focusNode: FocusNode(), + onsaved: (value) => + formData['secuirity_profile'] = value, + hintText: "Enter secuirity profile", + textInputType: TextInputType.emailAddress) + ])), + const SizedBox(height: 20), + Row(children: [ + Text("Testing", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: AppStyle.fieldlabel), + Checkbox( + activeColor: ColorConstant.purple900, + value: istesting, + onChanged: (newValue) { + setState(() { + istesting = newValue!; + }); + }, + ), + ]), + SizedBox( + height: 270, + ), + CustomButton( + height: getVerticalSize(50), + text: "Submit", + onTap: () async { + if (_formKey.currentState!.validate()) { + _formKey.currentState!.save(); + formData['testing'] = istesting; + + dashboardline['model'] = + '{"dashboard":[{"cols":5,"rows":5,"x":0,"y":0,"chartid":4,"component":"Bar Chart","name":"Bar Chart"}]}'; + + dashlineList.add(dashboardline); + formData['dashbord1_Line'] = dashlineList; + + final token = await TokenManager.getToken(); + try { + print(formData); + + await dashService.createdashboard( + token!, formData, context); + + Navigator.pop(context); + } catch (e) { + // ignore: use_build_context_synchronously + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: const Text('Error'), + content: Text( + 'Failed to create Dashboard: $e'), + actions: [ + TextButton( + child: const Text('OK'), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ], + ); + }, + ); + } + } + }, + ), + ]))), + ), + ), + bottomNavigationBar: BottomNavigationBar( + showSelectedLabels: false, // <-- HERE + showUnselectedLabels: false, + currentIndex: _currentIndex, + selectedItemColor: Color(0xFF5E41D3), // Selected item color + unselectedItemColor: Colors.black, // Unselected item color + onTap: (index) { + setState(() { + _currentIndex = index; + + if (_currentIndex == 0) { + setState(() {}); + } + }); + }, + items: [ + BottomNavigationBarItem( + icon: Icon( + Icons.window_rounded, + color: ColorConstant.purple211, + ), + label: 'list Builders', + backgroundColor: ColorConstant.purple211, + ), + BottomNavigationBarItem( + icon: SizedBox.shrink(), + label: '', + ), + ], + ), + floatingActionButton: FloatingActionButton( + onPressed: () { + // Handle button press + Navigator.of(context) + .push(MaterialPageRoute(builder: (ctx) => Newdashboard())); + }, + child: Image.asset( + 'assets/images/panther.png', + height: 40, + width: 40, + ), // Replace with your image path + elevation: 2.0, + backgroundColor: ColorConstant.purple211, // Set the color to purple + shape: CircleBorder(), // Make the button circular + ), + floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, + ); + } +} + +onTapArrowleft21(BuildContext context) { + Navigator.pop(context); +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Dashboard/dashboard_line_f.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Dashboard/dashboard_line_f.dart new file mode 100644 index 0000000..ee8cf6d --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Dashboard/dashboard_line_f.dart @@ -0,0 +1,877 @@ +// ignore_for_file: use_build_context_synchronously + +import 'dart:convert'; +import 'package:google_fonts/google_fonts.dart'; +import 'package:http/http.dart' as http; +import 'package:flutter/material.dart'; +import 'package:flutter_reorderable_list/flutter_reorderable_list.dart'; + +import '../../../utils/image_constant.dart'; +import '../../../utils/size_utils.dart'; +import '../../../providers/token_manager.dart'; +import '../../../widgets/app_bar/appbar_image.dart'; +import '../../../widgets/app_bar/appbar_title.dart'; +import '../../../widgets/app_bar/custom_app_bar.dart'; +import '../../utils/color_constants.dart'; +import '../Login Screen/CustomButton.dart'; +import 'Dashboard_Service.dart'; +import 'chartlist.dart'; + +class DashboardLineBuilderF extends StatefulWidget { + final Map entity; + // Add moduleId parameter + + DashboardLineBuilderF({required this.entity, Key? key}) : super(key: key); + @override + _DashboardLineBuilderFState createState() => _DashboardLineBuilderFState(); +} + +class _DashboardLineBuilderFState extends State { + final DashboardApiService dashService = DashboardApiService(); + + int? editedFieldIndex; + List> formFields = []; + List> workflowfield = []; + + String model = ''; + late Map jsonData; + + String? selectedCategory; + IconData selectedIcon = Icons.ac_unit_outlined; + + // ignore: non_constant_identifier_names + TextEditingController chart_titleController = TextEditingController(); + + final TextEditingController charturlController = TextEditingController(); + final TextEditingController chartparameterController = + TextEditingController(); + final TextEditingController datasourceController = TextEditingController(); + + FocusNode nameFocus = FocusNode(); + FocusNode descriptionFocus = FocusNode(); + + Map>> categoriesFields = { + 'COMPONENTS': [ + {"name": "Index", "component": "Index"}, + {"name": "Bar Chart", "component": "Bar Chart"}, + {"component": "Line Chart", "name": "Line Chart"}, + {"component": "Doughnut Chart", "name": "Doughnut Chart"}, + {"component": "Pie Chart", "name": "Pie Chart"}, + {"component": "Radar Chart", "name": "Radar Chart"}, + // {"component": "Polar Area Chart", "name": "Polar Area Chart"}, + // {"component": "Bubble Chart", "name": "Bubble Chart"}, + // {"component": "Scatter Chart", "name": "Scatter Chart"}, + // {"component": "Dynamic Chart", "name": "Dynamic Chart"}, + // {"component": "Financial Chart", "name": "Financial Chart"}, + // {"component": "To Do Chart", "name": "To Do Chart"}, + // {"component": "Grid View", "name": "Grid View"} + ], + }; + Future _fetchModelData() async { + final modelData = widget.entity; + try { + if (modelData.isNotEmpty) { + setState(() { + model = modelData['model'].toString(); + }); + + jsonData = json.decode(model); + print('model data is ... $jsonData'); + + if (jsonData['dashboard'] != null) { + final dynamic dashboardData = jsonData['dashboard']; + + if (dashboardData is List) { + formFields = List>.from(dashboardData); + } else { + print('Error: Dashboard data is not a List'); + } + } else { + print('Error: Dashboard data is missing'); + } + } + } catch (e) { + print('Error fetching or decoding model data: $e'); + } + } + + Future getDataByType(int index) async { + //print('type is $type'); + // final List dashboard = jsonData['dashboard']; + // + // // Find the chart with the specified type + // final chart = dashboard.firstWhere( + // (entry) => entry['type'] == type, + // orElse: () => null, + // ); + if (formFields[index]['charturl'] != null) { + return fetchData(formFields[index]['charturl'] as String); + } else if (formFields[index]['chartparameter'] != null) { + return formFields[index]['chartparameter'].toString(); + } else { + return null; + } + + // if (chart != null) { + // // Return the 'charturl' property as a String + // chart['charturl'] as String; + // + // return fetchData(chart['charturl'] as String); + // } else { + // return null; + // } + } + + String? getNameByType(String type) { + print('type is $type'); + final List dashboard = jsonData['dashboard']; + + // Find the chart with the specified type + final chart = dashboard.firstWhere( + (entry) => entry['type'] == type, + orElse: () => null, + ); + + if (chart != null) { + // Return the 'charturl' property as a String + + return chart['charttitle'] as String; + } else { + return null; + } + } + + static Future fetchData(String chartUrl) async { + final response = await http.get(Uri.parse(chartUrl)); + + if (response.statusCode == 200) { + return json.decode(response.body); + } else { + throw Exception('Failed to load data'); + } + } + + @override + void initState() { + super.initState(); + _fetchModelData(); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: CustomAppBar( + height: getVerticalSize(49), + leadingWidth: 40, + leading: AppbarImage( + height: getSize(24), + width: getSize(24), + svgPath: ImageConstant.imgArrowleftBlueGray900, + margin: getMargin(left: 16, top: 12, bottom: 13), + onTap: () { + Navigator.pop(context); + }), + centerTitle: true, + title: AppbarTitle(text: "Dashboard Builder")), + body: SingleChildScrollView( + child: Column( + children: [ + Container( + height: MediaQuery.of(context).size.height, + width: double.infinity, + color: Colors.grey[200], + child: ReorderableListView( + onReorder: (oldIndex, newIndex) { + setState(() { + if (newIndex > oldIndex) { + newIndex -= 1; + } + final item = formFields.removeAt(oldIndex); + formFields.insert(newIndex, item); + }); + }, + children: [ + for (int index = 0; index < formFields.length; index++) + _buildDraggableFormField(formFields[index], index), + ], + ), + ), + const SizedBox(height: 20), + ], + ), + ), + bottomNavigationBar: BottomAppBar( + color: Colors.white, // Customize the background color + child: Container( + padding: const EdgeInsets.symmetric( + vertical: 2), // Adjust vertical padding + child: Row( + mainAxisAlignment: + MainAxisAlignment.spaceEvenly, // Distribute buttons evenly + children: [ + CustomButton( + onTap: () { + _showAddChartDialog(); + }, + text: 'Add chart', + height: 60, + width: 150, + ), + CustomButton( + height: 80, + width: 150, + onTap: () async { + // Update action + final jsonConfig = jsonEncode({ + 'dashboard': formFields, + }); + widget.entity['model'] = jsonConfig.toString(); + + final token = await TokenManager.getToken(); + try { + await dashService.updatedashboardLine( + token!, widget.entity['id'], widget.entity, context); + Navigator.pop(context); + } catch (e) { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: const Text('Error'), + content: Text('Failed to update dashboardline: $e'), + actions: [ + TextButton( + child: const Text('OK'), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ], + ); + }, + ); + } + print(jsonConfig); + }, + text: 'Update', + // Customize button text style + ), + ], + ), + ), + ), + ); + } + + void _showAddChartDialog() async { + await showDialog( + context: context, + builder: (BuildContext context) { + final double screenWidth = MediaQuery.of(context).size.width; + return AlertDialog( + title: Text('Add Chart', + textAlign: TextAlign.center, + style: GoogleFonts.poppins().copyWith( + fontSize: 24, + fontWeight: FontWeight.w600, + color: ColorConstant.purple900)), + content: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.symmetric(vertical: 4), + child: SizedBox( + width: screenWidth > 600 + ? 600 + : screenWidth, // Adjust the maximum width as needed + + child: Wrap( + alignment: WrapAlignment.center, + // Ensure the column takes minimum space + children: [ + _buildAddChartButton("Index", Icon(Icons.list_rounded)), + const SizedBox(height: 12), + _buildAddChartButton("Bar Chart", Icon(Icons.bar_chart)), + const SizedBox(height: 12), // Add space between buttons + _buildAddChartButton( + "Line Chart", Icon(Icons.line_axis_rounded)), + const SizedBox(height: 12), + _buildAddChartButton("Pie Chart", Icon(Icons.pie_chart)), + const SizedBox(height: 12), + _buildAddChartButton( + "Doughnut Chart", Icon(Icons.donut_large)), + const SizedBox(height: 12), + _buildAddChartButton( + "Bubble Chart", Icon(Icons.bubble_chart_outlined)), + const SizedBox(height: 12), + _buildAddChartButton( + "Scatter Chart", Icon(Icons.scatter_plot)), + const SizedBox(height: 12), + _buildAddChartButton( + "Dynamic Chart", Icon(Icons.dynamic_feed)), + const SizedBox(height: 12), + _buildAddChartButton("Financial Chart", + Icon(Icons.format_list_numbered_rounded)), + const SizedBox(height: 12), + _buildAddChartButton("To Do Chart", Icon(Icons.list)), + ], + ), + ), + ), + ), + actions: [ + TextButton( + child: const Text('Cancel'), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ], + ); + }, + ); + } + + Widget _buildAddChartButton(String chartType, Icon icon) { + return InkWell( + onTap: () { + _addField(chartType); + Navigator.of(context); + }, + child: Card( + child: Container( + padding: EdgeInsets.symmetric(horizontal: 6, vertical: 6), + alignment: Alignment.center, + height: 80, + width: 80, + // Make the button as wide as the parent + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + chartType, + textAlign: TextAlign.center, + ), + icon + ], + )), + ), + ); + } + + void _addField(String fieldType) { + setState(() { + // Calculate the next chartid by finding the maximum chartid in existing fields + int maxChartId = 2; + var newchart = fieldType; + for (final field in formFields) { + final int chartId = field['chartid'] ?? 0; + if (chartId > maxChartId) { + maxChartId = chartId; + } + } + + // Increment the maximum chartid to generate a unique chartid + final newChartId = maxChartId + 1; + + // Add the new chart widget to formFields (if needed) + formFields.add({ + 'charttitle': newchart, + 'type': fieldType, + "cols": 5, + "rows": 5, + "x": 0, + "y": 0, + "chartid": newChartId, + "component": fieldType, + "name": fieldType, + }); + }); + } + + Widget _buildDraggableFormField(Map field, int index) { + final GlobalKey key = GlobalKey(); // Create a unique key + + final TextEditingController charttitlecontroller = TextEditingController( + text: field['charttitle'], + ); + + charttitlecontroller.addListener(() { + formFields[index]['charttitle'] = charttitlecontroller.text; + }); + + final fieldType = field['type']; + Widget chartWidget; + if (fieldType == 'Index') { + // String? name = getNameByType(fieldType); + chartWidget = IndexWidget( + name: formFields[index]['charttitle'], + icon: Icons.ac_unit_outlined, + ); + } else if (fieldType == 'Bar Chart') { + print('field type is $fieldType'); + chartWidget = FutureBuilder( + future: getDataByType(index), + builder: (context, snapshot) { + if (snapshot.connectionState == ConnectionState.waiting) { + return const CircularProgressIndicator(); + } else if (snapshot.hasError) { + return Text('Error: ${snapshot.error}'); + } else if (snapshot.hasData) { + return BarChartWidget(apiData: snapshot.data); + } else { + return const Text('No data available'); + } + }, + ); + } else if (fieldType == 'Line Chart') { + print('field type is $fieldType'); + chartWidget = FutureBuilder( + future: getDataByType(index), + builder: (context, snapshot) { + if (snapshot.connectionState == ConnectionState.waiting) { + return const CircularProgressIndicator(); + } else if (snapshot.hasError) { + return Text('Error: ${snapshot.error}'); + } else if (snapshot.hasData) { + return LineChartWidget(apiData: snapshot.data); + } else { + return const Text('No data available'); + } + }, + ); + } else if (fieldType == 'Doughnut Chart') { + chartWidget = FutureBuilder( + future: getDataByType(index), + builder: (context, snapshot) { + if (snapshot.connectionState == ConnectionState.waiting) { + return const CircularProgressIndicator(); + } else if (snapshot.hasError) { + return Text('Error: ${snapshot.error}'); + } else if (snapshot.hasData) { + return DonutChartWidget(data: snapshot.data); + } else { + return const Text('No data available'); + } + }, + ); + //chartWidget = DonutChartWidget(); + } else if (fieldType == 'Pie Chart') { + chartWidget = FutureBuilder( + future: getDataByType(index), + builder: (context, snapshot) { + if (snapshot.connectionState == ConnectionState.waiting) { + return const CircularProgressIndicator(); + } else if (snapshot.hasError) { + return Text('Error: ${snapshot.error}'); + } else if (snapshot.hasData) { + return PieChartWidget(data: snapshot.data); + } else { + return const Text('No data available'); + } + }, + ); + } else if (fieldType == 'Bubble Chart') { + chartWidget = FutureBuilder( + future: getDataByType(index), + builder: (context, snapshot) { + if (snapshot.connectionState == ConnectionState.waiting) { + return const CircularProgressIndicator(); + } else if (snapshot.hasError) { + return Text('Error: ${snapshot.error}'); + } else if (snapshot.hasData) { + return BubbleChartWidget(data: snapshot.data); + } else { + return const Text('No data available'); + } + }, + ); + } else if (fieldType == 'Scatter Chart') { + chartWidget = FutureBuilder( + future: getDataByType(index), + builder: (context, snapshot) { + if (snapshot.connectionState == ConnectionState.waiting) { + return const CircularProgressIndicator(); + } else if (snapshot.hasError) { + return Text('Error: ${snapshot.error}'); + } else if (snapshot.hasData) { + return ScatterChartWidget(apiData: snapshot.data); + } else { + return const Text('No data available'); + } + }, + ); + } else if (fieldType == 'Dynamic Chart') { + chartWidget = FutureBuilder( + future: getDataByType(index), + builder: (context, snapshot) { + if (snapshot.connectionState == ConnectionState.waiting) { + return const CircularProgressIndicator(); + } else if (snapshot.hasError) { + return Text('Error: ${snapshot.error}'); + } else if (snapshot.hasData) { + return DynamicLineChart(data: snapshot.data); + } else { + return const Text('No data available'); + } + }, + ); + } else if (fieldType == 'Financial Chart') { + chartWidget = FutureBuilder( + future: getDataByType(index), + builder: (context, snapshot) { + if (snapshot.connectionState == ConnectionState.waiting) { + return const CircularProgressIndicator(); + } else if (snapshot.hasError) { + return Text('Error: ${snapshot.error}'); + } else if (snapshot.hasData) { + return CandlestickChart( + data: snapshot.data, + ); + } else { + return const Text('No data available'); + } + }, + ); + } else if (fieldType == 'To Do Chart') { + chartWidget = FutureBuilder( + future: getDataByType(index), + builder: (context, snapshot) { + if (snapshot.connectionState == ConnectionState.waiting) { + return const CircularProgressIndicator(); + } else if (snapshot.hasError) { + return Text('Error: ${snapshot.error}'); + } else if (snapshot.hasData) { + return TodoChartWidget( + data: snapshot.data, + ); + } else { + return const Text('No data available'); + } + }, + ); + } else { + chartWidget = Container(); // Handle other field types if needed + } + + return ReorderableListener( + key: key, + child: Dismissible( + key: UniqueKey(), + onDismissed: (direction) { + setState(() { + formFields.removeAt(index); + }); + }, + child: Card( + color: index % 2 == 0 + ? const Color.fromARGB(255, 243, 230, 245) + : const Color.fromARGB(255, 224, 215, 238), + child: Column( + children: [ + ListTile( + title: TextFormField( + controller: charttitlecontroller, + ), + subtitle: Text('$fieldType'), + trailing: Row( + mainAxisSize: MainAxisSize.min, + children: [ + IconButton( + icon: const Icon(Icons.edit), + onPressed: () { + // Implement an edit action here, e.g., show a dialog or screen + _editField( + index, + ); + }, + ), + // IconButton( + // icon: const Icon(Icons.delete), + // onPressed: () { + + // }, + // ), + ], + ), + ), + chartWidget, // Replace with your chart widget + ], + ), + ), + ), + ); + } + +// Function to handle editing a field + Future _editField(int index) async { + editedFieldIndex = index; + final field = formFields[index]; + var fieldType = field['type']; + var chartTitlecontroller = TextEditingController( + text: field['charttitle'], + ); + + // Function to update the external UI label + void updateExternalLabel() { + setState(() { + field['charttitle'] = chartTitlecontroller.text; + }); + } + + chartTitlecontroller.addListener(updateExternalLabel); + + final charturlController = TextEditingController( + text: field['charturl'] ?? '', + ); + + final chartparameterController = TextEditingController( + text: field['chartparameter'] ?? '', + ); + final datasourceController = TextEditingController( + text: field['datasource'] ?? '', + ); + + if (datasourceController.text.isEmpty) { + datasourceController.text = 'Default'; + } + + // Add missing boolean properties with default value false + field['slices'] ??= false; + field['donut'] ??= false; + field['chartcolor'] ??= false; + field['chartlegend'] ??= false; + field['showlabel'] ??= false; + field['Read Only'] ??= false; + + await showDialog( + context: context, + builder: (BuildContext context) { + return StatefulBuilder( + builder: (context, setState) { + return AlertDialog( + title: Text('Edit Field', + textAlign: TextAlign.center, + style: GoogleFonts.poppins().copyWith( + fontSize: 24, + fontWeight: FontWeight.w600, + color: ColorConstant.purple900)), + content: SingleChildScrollView( + child: Column( + children: [ + TextFormField( + controller: chartTitlecontroller, + decoration: InputDecoration( + labelText: 'Chart Title', + labelStyle: GoogleFonts.poppins().copyWith( + fontSize: 14, fontWeight: FontWeight.w600)), + onChanged: (newValue) { + field['charttitle'] = newValue; + }, + ), + + DropdownButtonFormField( + decoration: InputDecoration( + labelText: 'Data Source', + labelStyle: GoogleFonts.poppins().copyWith( + fontSize: 14, fontWeight: FontWeight.w600)), + value: datasourceController.text, + items: ['Default', 'Private'].map((Category) { + return DropdownMenuItem( + value: Category, + child: Text( + Category, + style: GoogleFonts.poppins().copyWith( + fontSize: 14, fontWeight: FontWeight.w500), + ), + ); + }).toList(), + onChanged: (value) { + setState(() { + datasourceController.text = value!; + }); + }, + onSaved: (value) { + field['datasource'] = value; + }, + ), + + TextFormField( + controller: charturlController, + decoration: InputDecoration( + labelText: 'Chart Url', + labelStyle: GoogleFonts.poppins().copyWith( + fontSize: 14, fontWeight: FontWeight.w600)), + onChanged: (newValue) { + field['charturl'] = newValue; + }, + ), + TextFormField( + controller: chartparameterController, + decoration: InputDecoration( + labelText: 'Chart Parameter', + labelStyle: GoogleFonts.poppins().copyWith( + fontSize: 14, fontWeight: FontWeight.w600)), + onChanged: (newValue) { + field['chartparameter'] = newValue; + }, + ), + + if (fieldType == 'Index') ...[ + // Add a DropdownButtonFormField for selecting icons + DropdownButtonFormField( + decoration: InputDecoration( + labelText: 'Select Icon', + labelStyle: GoogleFonts.poppins().copyWith( + fontSize: 14, fontWeight: FontWeight.w600)), + value: selectedIcon, + items: [ + Icons.ac_unit_outlined, + Icons.access_alarm_outlined, + ].map((icon) { + return DropdownMenuItem( + value: icon, + child: Icon(icon), + ); + }).toList(), + onChanged: (value) { + setState(() { + selectedIcon = value!; + formFields[index]['selectedIcon'] = selectedIcon; + }); + }, + onSaved: (value) { + // Update the field with the selected icon + formFields[index]['selectedIcon'] = + selectedIcon.toString(); + }, + ), + ], + const SizedBox( + height: 20, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text('Slices:', + style: GoogleFonts.poppins().copyWith( + fontSize: 14, fontWeight: FontWeight.w600)), + Switch( + value: field['slices'], + onChanged: (value) { + setState(() { + field['slices'] = value; + }); + }, + ), + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text('Donut:', + style: GoogleFonts.poppins().copyWith( + fontSize: 14, fontWeight: FontWeight.w600)), + Switch( + value: field['donut'], + onChanged: (value) { + setState(() { + field['donut'] = value; + }); + }, + ), + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text('Chart Color:', + style: GoogleFonts.poppins().copyWith( + fontSize: 14, fontWeight: FontWeight.w600)), + Switch( + value: field['chartcolor'], + onChanged: (value) { + setState(() { + field['chartcolor'] = value; + }); + }, + ), + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text('Chart Legend:', + style: GoogleFonts.poppins().copyWith( + fontSize: 14, fontWeight: FontWeight.w600)), + Switch( + value: field['chartlegend'], + onChanged: (value) { + setState(() { + field['chartlegend'] = value; + }); + }, + ), + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text('Show Label:', + style: GoogleFonts.poppins().copyWith( + fontSize: 14, fontWeight: FontWeight.w600)), + Switch( + value: field['showlabel'], + onChanged: (value) { + setState(() { + field['showlabel'] = value; + }); + }, + ), + ], + ), + + // Add code to edit other properties as needed + + // Values section + const SizedBox(height: 10), + ], + ), + ), + actions: [ + CustomButton( + text: 'Save', + height: 50, + width: 100, + onTap: () { + setState(() { + // Update the field properties with edited values + field['charttitle'] = chartTitlecontroller.text; + field['charturl'] = charturlController.text; + field['chartparameter'] = chartparameterController.text; + field['datasource'] = datasourceController.text; + formFields[index]['selectedIcon'] = + selectedIcon.toString(); + }); + Navigator.of(context).pop(); + }, + ), + CustomButton( + color: Colors.white, + height: 50, + width: 100, + textStyle: GoogleFonts.poppins().copyWith( + color: Colors.black, + fontSize: 16.0, + fontWeight: FontWeight.bold), + text: 'Cancel', + onTap: () { + Navigator.of(context).pop(); + }, + ), + ], + ); + }, + ); + }, + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Dashboard/dashboard_screen_f.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Dashboard/dashboard_screen_f.dart new file mode 100644 index 0000000..672fb43 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Dashboard/dashboard_screen_f.dart @@ -0,0 +1,577 @@ +import 'dart:convert'; + +import 'package:flutter/material.dart'; +import 'package:google_fonts/google_fonts.dart'; +import 'package:shared_preferences/shared_preferences.dart'; +import 'package:intl/intl.dart'; + +import '../../../utils/color_constants.dart'; +import '../../../utils/size_utils.dart'; +import '../../../providers/token_manager.dart'; +import '../../../theme/app_decoration.dart'; +import '../../../theme/app_style.dart'; +import '../../../widgets/app_bar/appbar_title.dart'; +import '../../../widgets/app_bar/custom_app_bar.dart'; +import '../Login Screen/CustomButton.dart'; +import '../MenuScreen/new_dash/Newdashboard.dart'; +import 'Dashboard_Service.dart'; +import 'create_dashboard_f.dart'; +import 'dashboard_line_f.dart'; +import 'update_dashboard_f.dart'; + +class DashboardScreenF extends StatefulWidget { + // final Function(int) callback; + + // DashboardScreenF({required this.callback}); + // DashboardScreenF({}); + + static const String routeName = '/dashboard'; + + @override + State createState() => _DashboardScreenStateF(); +} + +class _DashboardScreenStateF extends State { + final DashboardApiService dashService = DashboardApiService(); + List> entities = []; + bool showCardView = true; // Add this variable to control the view mode + + bool isloadingdata = true; + var _currentIndex = 1; + + Map userData = {}; + + var wireframeno = 0; + + // Function to send data to the parent widget + // void sendDataToParent() { + // widget.callback(wireframeno); + // } + + getUserData() async { + SharedPreferences prefs = await SharedPreferences.getInstance(); + var userdatastr = prefs.getString('userData'); + if (userdatastr != null) { + try { + setState(() { + userData = json.decode(userdatastr); + }); + print(userData['token']); + } catch (e) { + print("error is ..................$e"); + } + } + } + + @override + void initState() { + super.initState(); + fetchEntities(); + getUserData(); + } + + Future fetchEntities() async { + setState(() { + isloadingdata = true; + }); + try { + final token = await TokenManager.getToken(); + + if (token != null) { + final fetchedEntities = await dashService.getdashboardBymoduleId(token); + setState(() { + entities = fetchedEntities; + isloadingdata = false; + }); + } + } catch (e) { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: const Text('Error'), + content: Text('Failed to fetch Dashboard: $e'), + actions: [ + TextButton( + child: const Text('OK'), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ], + ); + }, + ); + } + } + + Future deleteEntity(Map entity) async { + try { + final token = await TokenManager.getToken(); + await dashService.deletedashboard(token!, entity['id'], context); + setState(() { + entities.remove(entity); + }); + } catch (e) { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: const Text('Error'), + content: Text('Failed to delete wireframe: $e'), + actions: [ + TextButton( + child: const Text('OK'), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ], + ); + }, + ); + } + } + + void _showAdditionalFieldsDialog( + BuildContext context, + Map entity, + ) { + final dateFormat = + DateFormat('yyyy-MM-dd HH:mm:ss'); // Define your desired date format + + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: const Text('Additional Fields'), + content: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Text( + 'Created At: ${_formatTimestamp(entity['createdAt'], dateFormat)}'), + Text('Created By: ${entity['createdBy'] ?? 'N/A'}'), + Text('Updated By: ${entity['updatedBy'] ?? 'N/A'}'), + Text( + 'Updated At: ${_formatTimestamp(entity['updatedAt'], dateFormat)}'), + Text('Account ID: ${entity['accountId'] ?? 'N/A'}'), + ], + ), + actions: [ + TextButton( + child: const Text('Close'), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ], + ); + }, + ); + } + + String _formatTimestamp(dynamic timestamp, DateFormat dateFormat) { + if (timestamp is int) { + // If it's an integer, assume it's a Unix timestamp in milliseconds + final DateTime dateTime = DateTime.fromMillisecondsSinceEpoch(timestamp); + return dateFormat.format(dateTime); + } else if (timestamp is String) { + // If it's a string, assume it's already formatted as a date + return timestamp; + } else { + // Handle other cases here if needed + return 'N/A'; + } + } + + Future _refreshScreen() async { + setState(() {}); + print('refreshed'); + } + + onTapArrowleft1(BuildContext context) { + Navigator.pop(context); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: ColorConstant.gray50, + appBar: CustomAppBar( + height: getVerticalSize(49), + leadingWidth: 50, + leading: IconButton( + onPressed: () { + onTapArrowleft21(context); + }, + icon: Icon(Icons.arrow_back)), + // leading: AppbarImage( + // height: getSize(24), + // width: getSize(24), + // svgPath: ImageConstant.imgArrowleft, + // margin: getMargin(left: 16, top: 12, bottom: 13), + // onTap: () { + // onTapArrowleft1(context); + // }), + centerTitle: true, + title: AppbarTitle(text: "Dashboard List"), + actions: []), + body: SingleChildScrollView( + child: isloadingdata + ? Container( + height: MediaQuery.of(context).size.height, + child: Center( + child: CircularProgressIndicator( + color: ColorConstant.blueA700, + ))) + : Container( + width: double.maxFinite, + padding: getPadding(left: 16, top: 16, right: 16, bottom: 16), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Padding( + padding: getPadding(top: 22), + child: entities.length != 0 + ? RefreshIndicator( + onRefresh: _refreshScreen, + child: ListView.separated( + physics: + const AlwaysScrollableScrollPhysics(), + shrinkWrap: true, + separatorBuilder: (context, index) { + return SizedBox( + height: getVerticalSize(24)); + }, + itemCount: entities.length, + itemBuilder: (context, index) { + Map entity = + entities[index]; + return Container( + width: double.maxFinite, + child: Container( + padding: getPadding( + left: 16, + top: 5, + right: 5, + bottom: 17, + ), + decoration: AppDecoration + .outlineGray70011 + .copyWith( + borderRadius: + BorderRadiusStyle + .roundedBorder16, + color: Color.fromARGB( + 255, 189, 183, 232)), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: + CrossAxisAlignment.start, + mainAxisAlignment: + MainAxisAlignment.center, + children: [ + Padding( + padding: getPadding( + //right: 13, + ), + child: Row( + children: [ + Container( + width: MediaQuery.of( + context) + .size + .width * + 0.30, + // getHorizontalSize( + // 147, + // ), + margin: getMargin( + left: 8, + top: 3, + bottom: 1, + ), + child: Column( + crossAxisAlignment: + CrossAxisAlignment + .start, + mainAxisAlignment: + MainAxisAlignment + .start, + children: [ + Text( + entity['dashboard_name'] ?? + 'No Name provided', + overflow: + TextOverflow + .ellipsis, + textAlign: + TextAlign + .left, + style: GoogleFonts + .poppins() + .copyWith( + fontSize: + 20, + fontWeight: + FontWeight + .w700), + ), + ], + ), + ), + Spacer(), + IconButton( + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + UpdateDashboardScreenF( + entity: + entity), + ), + ).then((_) { + fetchEntities(); + }); + }, + icon: const Icon( + Icons.edit)), + IconButton( + onPressed: () { + showDialog( + context: context, + builder: + (BuildContext + context) { + return AlertDialog( + title: const Text( + 'Confirm Deletion'), + content: + const Text( + 'Are you sure you want to delete Dashboard?'), + actions: [ + CustomButton( + text: + 'Cancel', + height: + 50, + width: + 100, + color: Colors + .white, + textStyle: GoogleFonts.poppins().copyWith( + color: Colors + .black, + fontWeight: + FontWeight.bold), + onTap: + () { + Navigator.of(context) + .pop(); + }, + ), + CustomButton( + height: + 50, + width: + 100, + text: + 'Delete', + onTap: + () { + Navigator.of(context) + .pop(); + deleteEntity( + entity); + }, + ), + ], + ); + }, + ); + }, + icon: Icon( + Icons.delete)), + IconButton( + onPressed: () { + _showAdditionalFieldsDialog( + context, entity); + }, + icon: const Icon( + Icons + .manage_accounts_outlined, + ), + ), + ], + ), + ), + Padding( + padding: getPadding( + top: 10, + right: 8, + left: 5), + child: Row( + mainAxisAlignment: + MainAxisAlignment + .spaceBetween, + children: [ + Text( + "Secuirity Profile : ", + overflow: TextOverflow + .ellipsis, + textAlign: + TextAlign.left, + style: + AppStyle.fieldlabel, + ), + Text( + entity['secuirity_profile'] ?? + 'No Secuirity Profile', + overflow: TextOverflow + .ellipsis, + textAlign: + TextAlign.left, + style: AppStyle + .txtpoppinsmedium16, + ), + ], + ), + ), + Padding( + padding: getPadding( + top: 10, + right: 8, + left: 5), + child: Row( + mainAxisAlignment: + MainAxisAlignment + .spaceBetween, + children: [ + Text( + "Dashboard Line : ", + overflow: TextOverflow + .ellipsis, + textAlign: + TextAlign.left, + style: + AppStyle.fieldlabel, + ), + GestureDetector( + onTap: () { + // sendDataToParent(); + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + DashboardLineBuilderF( + entity: entity[ + 'dashbord1_Line'][0], + ), + ), + ); + print('dash line is ...' + + entity['dashbord1_Line'] + [0]); + }, + child: Text( + 'Dashboard Line', + overflow: TextOverflow + .ellipsis, + textAlign: + TextAlign.left, + style: GoogleFonts + .poppins() + .copyWith( + color: Colors + .purple + .shade900, + fontWeight: + FontWeight + .w900), + ), + ), + ], + ), + ), + ], + ), + ), + ); + }), + ) + : Container( + height: MediaQuery.of(context).size.height, + child: const Center( + child: Text("No Dashboards found."), + )), + ) + ]))), + bottomNavigationBar: BottomNavigationBar( + showSelectedLabels: false, // <-- HERE + showUnselectedLabels: false, + currentIndex: _currentIndex, + elevation: 12, + selectedItemColor: Color(0xFF5E41D3), // Selected item color + unselectedItemColor: Colors.black, // Unselected item color + onTap: (index) { + setState(() { + _currentIndex = index; + if (_currentIndex == 2) { + Navigator.of(context) + .push(MaterialPageRoute( + builder: (ctx) => CreateDashboardScreenF())) + .then((_) { + fetchEntities(); + }); + ; + } + if (_currentIndex == 0) { + setState(() {}); + } + }); + }, + items: [ + BottomNavigationBarItem( + icon: Icon( + Icons.search, + color: ColorConstant.purple211, + ), + label: 'Dashboards', + backgroundColor: ColorConstant.purple211, + ), + BottomNavigationBarItem( + icon: SizedBox.shrink(), + label: '', + ), + BottomNavigationBarItem( + icon: Icon( + Icons.add, + color: ColorConstant.purple211, + ), + label: 'Add Dashboard', + backgroundColor: ColorConstant.purple211, + ), + ], + ), + floatingActionButton: FloatingActionButton( + onPressed: () { + // Handle button press + Navigator.of(context) + .push(MaterialPageRoute(builder: (ctx) => Newdashboard())); + }, + child: Image.asset( + 'assets/images/panther.png', + height: 40, + width: 40, + ), // Replace with your image path + highlightElevation: 10, + elevation: 15.0, + backgroundColor: ColorConstant.purple211, // Set the color to purple + shape: CircleBorder(), // Make the button circular + ), + floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Dashboard/update_dashboard_f.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Dashboard/update_dashboard_f.dart new file mode 100644 index 0000000..56343e2 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Dashboard/update_dashboard_f.dart @@ -0,0 +1,195 @@ +import 'package:flutter/material.dart'; + +import '../../../utils/color_constants.dart'; +import '../../../utils/image_constant.dart'; +import '../../../utils/size_utils.dart'; +import '../../../theme/app_style.dart'; +import '../../../widgets/app_bar/appbar_image.dart'; +import '../../../widgets/app_bar/appbar_title.dart'; +import '../../../widgets/app_bar/custom_app_bar.dart'; + +import '../../../widgets/custom_text_form_field.dart'; +import '../../providers/token_manager.dart'; +import '../Login Screen/CustomButton.dart'; +import 'Dashboard_Service.dart'; + +class UpdateDashboardScreenF extends StatefulWidget { + final Map entity; + + UpdateDashboardScreenF({required this.entity, Key? key}) : super(key: key); + + @override + _UpdateDashboardScreenFState createState() => _UpdateDashboardScreenFState(); +} + +class _UpdateDashboardScreenFState extends State { + final DashboardApiService dashService = DashboardApiService(); + final _formKey = GlobalKey(); + + bool istesting = false; + bool ischildform = false; + + @override + void initState() { + super.initState(); + + istesting = + widget.entity['testing'] ?? false; // Set initial value of checkbox + // Fetch dropdown items when the screen initializes + } + + @override + Widget build(BuildContext context) { + return SafeArea( + child: Scaffold( + backgroundColor: ColorConstant.gray50, + resizeToAvoidBottomInset: false, + appBar: CustomAppBar( + height: getVerticalSize(49), + leadingWidth: 40, + leading: AppbarImage( + height: getSize(24), + width: getSize(24), + svgPath: ImageConstant.imgArrowleftBlueGray900, + margin: getMargin(left: 16, top: 12, bottom: 13), + onTap: () { + onTapArrowleft21(context); + }), + centerTitle: true, + title: AppbarTitle(text: "Update Dashboard")), + body: Form( + key: _formKey, + child: Container( + width: double.maxFinite, + padding: + getPadding(left: 16, top: 27, right: 16, bottom: 27), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text("Dashboard name", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: AppStyle.fieldlabel), + CustomTextFormField( + //initialValue: widget.entity['dashboard_name']??'', + focusNode: FocusNode(), + hintText: "Please Enter Dashboard Name", + onsaved: (value) => widget + .entity['dashboard_name'] = + value?.replaceAll(" ", "-").toLowerCase(), + validator: (value) { + if (value == null || value.isEmpty) { + return 'Please Enter Dashboard name'; + } + return null; + }, + ) + ]), + Padding( + padding: getPadding(top: 19), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text("Description", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: AppStyle.fieldlabel), + CustomTextFormField( + //initialValue: widget.entity['description']??'', + focusNode: FocusNode(), + hintText: "Enter Description", + onsaved: (value) => + widget.entity['description'] = value, + ) + ])), + Padding( + padding: getPadding(top: 18), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text("Secuirity Profile", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: AppStyle.fieldlabel), + CustomTextFormField( + //initialValue: widget.entity['secuirity_profile']??'', + focusNode: FocusNode(), + onsaved: (value) => + widget.entity['secuirity_profile'] = + value, + hintText: "Enter secuirity profile", + textInputType: + TextInputType.emailAddress) + ])), + const SizedBox(width: 8), + Row(children: [ + Text("Testing", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: AppStyle.fieldlabel), + Checkbox( + activeColor: ColorConstant.purple900, + value: istesting, + onChanged: (newValue) { + setState(() { + istesting = newValue!; + }); + }, + ), + ]), + const SizedBox( + height: 300, + ), + CustomButton( + height: getVerticalSize(50), + text: "Update", + onTap: () async { + if (_formKey.currentState!.validate()) { + _formKey.currentState!.save(); + + widget.entity['testing'] = istesting; + + final token = await TokenManager.getToken(); + try { + await dashService.updatedashboard( + token!, + // Assuming 'id' is the key in your entity map + widget.entity, + context); + Navigator.pop(context); + } catch (e) { + // ignore: use_build_context_synchronously + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: const Text('Error'), + content: Text( + 'Failed to update Dashboard: $e'), + actions: [ + TextButton( + child: const Text('OK'), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ], + ); + }, + ); + } + } + }), + ]))))); + } + + onTapArrowleft21(BuildContext context) { + Navigator.pop(context); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Incident_Ticket/ticket_create.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Incident_Ticket/ticket_create.dart new file mode 100644 index 0000000..1bb81c6 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Incident_Ticket/ticket_create.dart @@ -0,0 +1,294 @@ +import 'dart:io'; + +import '/hadwin_components.dart'; +import 'package:flutter/material.dart'; +import 'package:fluttertoast/fluttertoast.dart'; +import 'package:http/http.dart' as http; +import 'package:image_picker/image_picker.dart'; +import 'dart:convert'; + +import '../../utils/image_constant.dart'; +import '../../utils/size_utils.dart'; +import '../../providers/token_manager.dart'; +import '../../theme/app_style.dart'; +import '../../widgets/app_bar/appbar_image.dart'; +import '../../widgets/app_bar/appbar_title.dart'; +import '../../widgets/app_bar/custom_app_bar.dart'; +import '../../widgets/custom_button.dart'; +import '../../widgets/custom_text_form_field.dart'; +import '../LogoutService/Logoutservice.dart'; + +class RaisedTicketScreen extends StatefulWidget { + final Map userData; + + const RaisedTicketScreen({Key? key, required this.userData}) + : super(key: key); + + @override + _RaisedTicketScreenState createState() => _RaisedTicketScreenState(); +} + +class _RaisedTicketScreenState extends State { + List> tickets = []; + + @override + void initState() { + super.initState(); + fetchTickets(); + } + + Future fetchTickets() async { + int userid = widget.userData['userId']; + String baseUrl = ApiConstants.baseUrl; + final token = await TokenManager.getToken(); + String apiUrl = '$baseUrl/gettickets/$userid'; + final response = await http.get(Uri.parse(apiUrl), headers: { + 'Content-Type': 'application/json', + 'Authorization': 'Bearer $token', + }); + if (response.statusCode == 401) { + LogoutService.logout(); + } + if (response.statusCode == 200) { + List data = json.decode(response.body); + setState(() { + tickets = data.cast>(); + }); + } else { + print('Failed to fetch data'); + } + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: CustomAppBar( + height: getVerticalSize(49), + leadingWidth: 40, + leading: AppbarImage( + height: getSize(24), + width: getSize(24), + svgPath: ImageConstant.imgArrowleftBlueGray900, + margin: getMargin(left: 16, top: 12, bottom: 13), + onTap: () { + Navigator.pop(context); + }), + actions: [ + GestureDetector( + child: Icon( + Icons.add, + color: Colors.black, + size: 20, + ), + onTap: () { + Navigator.of(context) + .push( + MaterialPageRoute( + builder: (context) => TicketFormScreen( + userData: widget.userData, + )), + ) + .then((value) => {fetchTickets()}); + }, + ), + const SizedBox( + width: 20, + ) + ], + centerTitle: true, + title: AppbarTitle(text: "Raised Tickets")), + body: ListView.builder( + itemCount: tickets.length, + itemBuilder: (context, index) { + final ticket = tickets[index]; + return ListTile( + title: Text( + 'Ticket ID: ${ticket['ticketid']}', + style: const TextStyle(fontSize: 12), + ), + subtitle: Text('Ticket Name: ${ticket['ticketname']}', + style: const TextStyle(fontSize: 10)), + // Add more fields as needed + ); + }, + ), + ); + } +} + +class TicketFormScreen extends StatefulWidget { + final Map userData; + + const TicketFormScreen({Key? key, required this.userData}) : super(key: key); + @override + _TicketFormScreenState createState() => _TicketFormScreenState(); +} + +class _TicketFormScreenState extends State { + final TextEditingController titleController = TextEditingController(); + final TextEditingController descriptionController = TextEditingController(); + TextEditingController projectNameController = TextEditingController(); + var screenshot; + + Future submitTicket(File file) async { + print(widget.userData); + String title = titleController.text; + String description = descriptionController.text; + String baseUrl = ApiConstants.baseUrl; + final token = await TokenManager.getToken(); + String apiUrl = '$baseUrl/service_request/raise_ticket'; + + // Create a multipart request + var request = http.MultipartRequest('POST', Uri.parse(apiUrl)); + request.headers['Authorization'] = 'Bearer $token'; + + // Add text fields to the request + request.fields['title'] = title; + request.fields['description'] = description; + request.fields['userid'] = widget.userData['userId'].toString(); + request.fields['username'] = widget.userData['fullname']; + + // Add file to the request + if (file != null) { + request.files.add( + await http.MultipartFile.fromPath('file', file.path), + ); + } + + try { + // Send the request + final response = await request.send(); + + if (response.statusCode == 401) { + LogoutService.logout(); + } + + if (response.statusCode == 200) { + Fluttertoast.showToast( + msg: 'Ticket submitted successfully', + backgroundColor: Colors.green, + ); + print('Ticket submitted successfully'); + Navigator.pop(context); + } else { + Fluttertoast.showToast( + msg: 'Failed to submit ticket.', + backgroundColor: Colors.red, + ); + print('Failed to submit ticket. Status code: ${response.statusCode}'); + } + } catch (e) { + // Handle exceptions + print('Error: $e'); + } + } + + Future _pickImage() async { + final picker = ImagePicker(); + final pickedFile = await picker.pickImage(source: ImageSource.gallery); + + setState(() { + if (pickedFile != null) { + screenshot = File(pickedFile.path); + } else { + print('No image selected.'); + } + }); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: CustomAppBar( + height: getVerticalSize(49), + leadingWidth: 40, + leading: AppbarImage( + height: getSize(24), + width: getSize(24), + svgPath: ImageConstant.imgArrowleftBlueGray900, + margin: getMargin(left: 16, top: 12, bottom: 13), + onTap: () { + Navigator.pop(context); + }), + centerTitle: true, + title: AppbarTitle(text: "Raise a Ticket")), + body: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + children: [ + Padding( + padding: getPadding(top: 19), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text("Title", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: AppStyle.txtGilroyMedium16Bluegray900), + CustomTextFormField( + focusNode: FocusNode(), + hintText: "Enter Title", + controller: titleController, + margin: getMargin(top: 6)) + ])), + Padding( + padding: getPadding(top: 19), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text("Description", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: AppStyle.txtGilroyMedium16Bluegray900), + CustomTextFormField( + focusNode: FocusNode(), + hintText: "Enter Description", + controller: descriptionController, + margin: getMargin(top: 6)) + ])), + Padding( + padding: getPadding(top: 19), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text("Project Name", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: AppStyle.txtGilroyMedium16Bluegray900), + CustomTextFormField( + focusNode: FocusNode(), + hintText: "Enter Project Name", + controller: projectNameController, + margin: getMargin(top: 6)) + ])), // Adjusted the spacing + Row( + children: [ + Text('Pick Screenshot of issue'), + IconButton( + onPressed: () { + _pickImage(); // Call the function to pick an image + }, + icon: Icon(Icons.file_copy), + ), + SizedBox(width: 8.0), + // Display the selected screenshot file name + Text(screenshot != null ? screenshot.path.split('/').last : ''), + ], + ), + CustomButton( + height: getVerticalSize(50), + text: "Submit", + margin: getMargin(top: 24, bottom: 5), + onTap: () async { + submitTicket(screenshot); + }, + ), + ], + ), + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Login Screen/CustomButton.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Login Screen/CustomButton.dart new file mode 100644 index 0000000..dad6ca4 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Login Screen/CustomButton.dart @@ -0,0 +1,45 @@ +import 'package:flutter/material.dart'; +import 'package:google_fonts/google_fonts.dart'; + +class CustomButton extends StatelessWidget { + final String text; + final VoidCallback? onTap; + final double? height; + final double? width; + final TextStyle? textStyle; + final Color? color; + + CustomButton( + {required this.text, + required this.onTap, + this.height, + this.width, + this.textStyle, + this.color}); + + @override + Widget build(BuildContext context) { + return InkWell( + onTap: onTap, + child: Container( + height: height ?? 50, + width: width ?? 400, + margin: const EdgeInsets.symmetric(horizontal: 15.0, vertical: 10.0), + decoration: BoxDecoration( + color: color ?? Color.fromARGB(255, 69, 138, 217), + borderRadius: BorderRadius.circular(8.0), + ), + child: Center( + child: Text( + text, + style: textStyle ?? + GoogleFonts.poppins().copyWith( + color: Colors.white, + fontSize: 16.0, + fontWeight: FontWeight.bold), + ), + ), + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Login Screen/LoginConstants.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Login Screen/LoginConstants.dart new file mode 100644 index 0000000..e2b7986 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Login Screen/LoginConstants.dart @@ -0,0 +1,3 @@ +class LoginConstants { + static const baseUrl = 'http://localhost:9292'; +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Login Screen/decision.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Login Screen/decision.dart new file mode 100644 index 0000000..4faac64 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Login Screen/decision.dart @@ -0,0 +1,139 @@ +import 'package:flutter/material.dart'; +import '../../core/app_export.dart'; +import '../../widgets/custom_elevated_button.dart'; +import '../signupF/SignupScreenF.dart'; +import 'login_screen_f.dart'; + +class DecisionScreen extends StatelessWidget { + const DecisionScreen({Key? key}) + : super( + key: key, + ); + + @override + Widget build(BuildContext context) { + return SafeArea( + child: Scaffold( + body: Container( + width: double.maxFinite, + padding: EdgeInsets.symmetric(vertical: 28.v), + child: Column( + children: [ + _buildStackSection(context), + SizedBox(height: 46.v), + Align( + alignment: Alignment.centerLeft, + child: Container( + width: 278.h, + margin: EdgeInsets.only(left: 54.h), + child: Text( + "Discover Now", + maxLines: 2, + overflow: TextOverflow.ellipsis, + style: theme.textTheme.displayMedium!.copyWith( + fontWeight: FontWeight.bold, // Make text bold + fontSize: 35.0, // Increase font size + height: 1.5, + ), + ), + ), + ), + const Spacer(), + // SizedBox(height: 23.v), + Padding( + padding: EdgeInsets.only( + left: 54.h, + right: 66.h, + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + CustomElevatedButton( + height: 67.v, + width: MediaQuery.of(context).size.width / 2 - 70.h, + text: "Sign in", + buttonTextStyle: CustomTextStyles.titleMedium18, + onPressed: () { + Navigator.pushAndRemoveUntil( + context, + MaterialPageRoute( + builder: (context) => const LoginScreenF(false)), + (route) => false, // Remove all routes from the stack + ); + }, + ), + const SizedBox(width: 2), + CustomElevatedButton( + height: 67.v, + width: MediaQuery.of(context).size.width / 2 - 70.h, + text: "Sign up", + buttonTextStyle: CustomTextStyles.titleMedium18, + onPressed: () { + Navigator.pushAndRemoveUntil( + context, + MaterialPageRoute( + builder: (context) => const SignupScreenF()), + (route) => false, // Remove all routes from the stack + ); + }, + ), + ], + ), + ) + ], + ), + ), + ), + ); + } + + /// Section Widget + Widget _buildStackSection(BuildContext context) { + return SizedBox( + height: 413.v, + width: double.maxFinite, + child: Stack( + alignment: Alignment.center, + children: [ + // black background + CustomImageView( + svgPath: ImageConstant.imgGroup3090, + height: 338.v, + width: 291.h, + alignment: Alignment.bottomCenter, + ), + Align( + alignment: Alignment.center, + child: SizedBox( + height: 400.v, + width: double.maxFinite, + child: Stack( + alignment: Alignment.topCenter, + children: [ + // player image + CustomImageView( + imagePath: ImageConstant.imgAlfredKenneall, + height: 408.v, + width: 428.h, + alignment: Alignment.center, + ), + + const SizedBox(height: 15), + + // cricyard logo + CustomImageView( + imagePath: ImageConstant.imgImageRemovebgPreview, + height: 51.v, + width: 337.h, + alignment: Alignment.topCenter, + margin: EdgeInsets.only(top: 9.v), + ) + ], + ), + ), + ) + ], + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Login Screen/login_screen_f.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Login Screen/login_screen_f.dart new file mode 100644 index 0000000..f1d0549 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Login Screen/login_screen_f.dart @@ -0,0 +1,604 @@ +// ignore_for_file: use_build_context_synchronously + +import 'dart:convert'; +import 'package:base_project/core/app_export.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:google_fonts/google_fonts.dart'; +import 'package:shared_preferences/shared_preferences.dart'; +import '../../utils/color_constants.dart'; +import '../../providers/token_manager.dart'; +import '../../utilities/make_api_request.dart'; +import '../../widgets/custom_messenger.dart'; +import '../MenuScreen/new_dash/Newdashboard.dart'; +import '../forgot_password/forgot_password_f.dart'; +import '../signupF/SignupScreenF.dart'; +import 'CustomButton.dart'; + +class LoginScreenF extends StatefulWidget { + const LoginScreenF(isLogin, {super.key}); + final bool isLogin = false; + + @override + State createState() => _LoginScreenFState(); +} + +class _LoginScreenFState extends State { + final _formKey = GlobalKey(); + String errorMessage1 = ""; + String errorMessage2 = ""; + String userInput = ""; + String password = ""; + bool isPasswordVisible = false; + bool stayLoggedIn = true; + bool isLoggingIn = false; + + Map userData = {}; + bool isShaking = false; + + getUserData() async { + SharedPreferences prefs = await SharedPreferences.getInstance(); + var userdatastr = prefs.getString('userData'); + if (userdatastr != null) { + try { + setState(() { + userData = json.decode(userdatastr); + }); + print(userData['token']); + } catch (e) { + print("error is ..................$e"); + } + } + } + + void initState() { + // TODO: implement initState + getUserData(); + } + + Future _saveLoggedInUserData( + String loggedInUserAuthKey, Map user) async { + try { + var userId = user['userId'].toString(); + var firstName = user['firstName'].toString(); + + final prefs = await SharedPreferences.getInstance(); + await prefs.setString('userData', json.encode(user)); + await prefs.setBool('isLoggedIn', true); + await prefs.setString('token', loggedInUserAuthKey); + + print('userId ....$userId'); + print('firstName ....$firstName'); + + if (mounted) { + debugPrint("user data saved"); + } + + return true; + } catch (e) { + return false; + } + } + + void errorMessageSetter(int fieldNumber, String message) { + setState(() { + if (fieldNumber == 1) { + errorMessage1 = message; + } else { + errorMessage2 = message; + } + }); + } + + void tryLoggingIn() async { + final dataReceived = await sendData( + urlPath: "/token/session", + data: {"email": userInput, "password": password}, + ); + print(dataReceived); + + if (dataReceived.containsKey('ClientException')) { + ScaffoldMessenger.of(context).showSnackBar(ShowSnackAlert.CustomMessenger( + context, + Colors.red.shade400, + Colors.red.shade900, + 'Connection refused ! Start Server')); + setState(() { + isLoggingIn = false; + }); + } + if (dataReceived.containsValue('ERROR') || + dataReceived.containsValue('error') | + dataReceived.containsKey('error')) { + setState(() { + isLoggingIn = false; + }); + if (dataReceived['item'] == null) { + ScaffoldMessenger.of(context).showSnackBar( + ShowSnackAlert.CustomMessenger(context, Colors.red.shade400, + Colors.red.shade900, 'User Not In Database')); + } + + var error = dataReceived['operationMessage'].toString(); + // ignore: use_build_context_synchronously + ScaffoldMessenger.of(context) + .showSnackBar(SnackBar( + elevation: 0, + behavior: SnackBarBehavior.floating, + content: Stack( + clipBehavior: Clip.none, + children: [ + Container( + padding: const EdgeInsets.all(16), + height: 90, + decoration: const BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(20)), + color: Colors.red), + child: Row( + children: [ + const SizedBox( + width: 48, + ), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const Text( + 'Oh Snap!', + style: TextStyle( + fontSize: 18, color: Colors.white), + ), + Text( + error, + style: const TextStyle( + fontSize: 12, color: Colors.white), + maxLines: 2, + overflow: TextOverflow.ellipsis, + ), + ], + ), + ), + ], + )), + Positioned( + bottom: 0, + child: ClipRRect( + borderRadius: const BorderRadius.only( + bottomLeft: Radius.circular(20)), + child: SvgPicture.asset('assets/icon/bubbles.svg', + height: 48, + width: 40, + colorFilter: const ColorFilter.mode( + Color.fromARGB(255, 136, 15, 6), BlendMode.srcIn)), + ), + ), + Positioned( + top: -20, + left: 0, + child: Stack( + alignment: Alignment.center, + children: [ + SvgPicture.asset( + 'assets/icon/fail.svg', + height: 40, + ), + Positioned( + top: 10, + child: InkWell( + onTap: () { + ScaffoldMessenger.of(context).clearSnackBars(); + }, + child: SvgPicture.asset('assets/icon/close.svg', + height: 16))) + ], + ), + ) + ], + ), + backgroundColor: Colors.transparent, + )) + .closed; + } else { + print('Data recieved is $dataReceived'); + var token = dataReceived['item']['token']; + var userId = dataReceived['item']['userId']; + + final user = await getUser(userId); + print('user is $user'); + + var user_item = dataReceived['item']; + + await TokenManager.setToken(token); + + if (stayLoggedIn) { + await _saveLoggedInUserData(token, user); + } + // ignore: use_build_context_synchronously + ScaffoldMessenger.of(context) + .showSnackBar(SnackBar( + elevation: 0, + behavior: SnackBarBehavior.floating, + content: Stack( + clipBehavior: Clip.none, + children: [ + Container( + padding: const EdgeInsets.all(16), + height: 90, + decoration: BoxDecoration( + borderRadius: + const BorderRadius.all(Radius.circular(20)), + color: Colors.green.shade300), + child: const Row( + children: [ + SizedBox( + width: 48, + ), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // Text('Oh Snap!', style: TextStyle(fontSize: 18, color: Colors.white),), + + Text( + "successfully logged in", + style: TextStyle( + fontSize: 18, color: Colors.white), + maxLines: 2, + overflow: TextOverflow.ellipsis, + ), + ], + ), + ), + ], + )), + Positioned( + bottom: 0, + child: ClipRRect( + borderRadius: const BorderRadius.only( + bottomLeft: Radius.circular(20)), + child: SvgPicture.asset('assets/icon/bubbles.svg', + height: 48, + width: 40, + colorFilter: const ColorFilter.mode( + Color.fromARGB(255, 3, 112, 14), BlendMode.srcIn)), + ), + ), + Positioned( + top: -20, + left: 0, + child: Stack( + alignment: Alignment.center, + children: [ + SvgPicture.asset( + 'assets/icon/fail.svg', + height: 40, + ), + Positioned( + top: 10, + child: InkWell( + onTap: () { + ScaffoldMessenger.of(context).clearSnackBars(); + }, + child: SvgPicture.asset('assets/icon/close.svg', + height: 16))) + ], + ), + ) + ], + ), + backgroundColor: Colors.transparent, + )) + .closed + .then((value) => Navigator.of(context) + .pushAndRemoveUntil( + MaterialPageRoute( + builder: (context) => Newdashboard(), + ), + (route) => false, + ) + .whenComplete(() { + if (widget.isLogin == true) { + ScaffoldMessenger.of(context).showSnackBar( + ShowSnackAlert.CustomMessenger( + context, + Colors.green.shade600, + Colors.green.shade900, + ' Welcome ')); + } + })); + + print('after login'); + } + } + + // void _validateLoginDetails() { + // isLoggingIn = true; + // FocusManager.instance.primaryFocus?.unfocus(); + // if (_formKey.currentState!.validate()) { + // if (errorMessage1 != "" || errorMessage2 != "") { + // setState(() { + // isLoggingIn = false; + // }); + // ScaffoldMessenger.of(context).showSnackBar( + // const SnackBar( + // content: Text('Please provide all required details'), + // backgroundColor: Colors.red, + // ), + // ); + // } else { + // tryLoggingIn(); + // } + // } + // } + + EdgeInsets loginButtonMargin = EdgeInsets.symmetric(horizontal: 0.0); + + void _validateLoginDetails() { + setState(() { + isLoggingIn = true; + FocusManager.instance.primaryFocus?.unfocus(); + if (_formKey.currentState!.validate()) { + if (errorMessage1.isNotEmpty || errorMessage2.isNotEmpty) { + isLoggingIn = false; + ScaffoldMessenger.of(context).showSnackBar( + const SnackBar( + content: Text('Please provide all required details'), + backgroundColor: Colors.red, + ), + ); + } else { + tryLoggingIn(); + } + } else { + // Trigger shake animation + loginButtonMargin = EdgeInsets.symmetric(horizontal: 10.0); + Future.delayed(const Duration(milliseconds: 100), () { + setState(() { + loginButtonMargin = EdgeInsets.symmetric(horizontal: 0.0); + }); + }); + } + }); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + //backgroundColor: Color.fromARGB(255, 233, 229, 249), + body: SingleChildScrollView( + child: Form( + key: _formKey, + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const SizedBox( + height: 40, + ), + SizedBox(height: 54.v), + Text( + "Welcome back!", + style: TextStyle(fontSize: 30, color: Colors.black), + ), + SizedBox(height: 68.v), + // const SizedBox(height: 20), + Container( + margin: const EdgeInsets.symmetric(horizontal: 22), + alignment: Alignment.centerLeft, + child: Text( + textAlign: TextAlign.center, + 'Login to your account', + style: GoogleFonts.poppins().copyWith( + fontSize: 20, + fontWeight: FontWeight.bold, + color: ColorConstant.black90001), + ), + ), + const SizedBox(height: 20), + Container( + margin: const EdgeInsets.symmetric(horizontal: 25), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const SizedBox( + child: Text( + 'Email', + style: TextStyle( + fontSize: 16, + color: Colors.black, + fontWeight: FontWeight.w400), + ), + ), + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + border: + Border.all(color: Colors.black.withOpacity(.3))), + margin: const EdgeInsets.symmetric(vertical: 5), + padding: const EdgeInsets.all(5), + child: TextFormField( + textInputAction: TextInputAction.next, + validator: (value) { + if (value == null || value.isEmpty) { + errorMessageSetter( + 1, 'You must provide an email or username'); + } else { + errorMessageSetter(1, ""); + + setState(() { + userInput = value; + }); + } + + return null; + }, + autocorrect: false, + decoration: InputDecoration( + border: InputBorder.none, + contentPadding: const EdgeInsets.only( + left: 15, bottom: 11, top: 11, right: 15), + hintText: "Username or email address", + hintStyle: TextStyle( + fontSize: 16, color: Colors.black.withOpacity(.3)), + ), + style: TextStyle( + fontSize: 16, color: Colors.black.withOpacity(.9)), + ), + ), + const SizedBox( + height: 15, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + const Text( + 'Password', + style: TextStyle( + fontSize: 16, + color: Colors.black, + fontWeight: FontWeight.w400), + ), + InkWell( + onTap: () { + Navigator.of(context).push(MaterialPageRoute( + builder: (ctx) => const ForgotPasswordF())); + }, + child: Text( + 'Forgot?', + style: TextStyle( + fontSize: 16, + color: ColorConstant.black90001, + fontWeight: FontWeight.w400), + ), + ) + ], + ), + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + border: + Border.all(color: Colors.black.withOpacity(.3))), + margin: const EdgeInsets.symmetric(vertical: 5), + padding: const EdgeInsets.all(5), + child: TextFormField( + onFieldSubmitted: (value) => _validateLoginDetails(), + textInputAction: TextInputAction.done, + validator: (value) { + if (value == null || value.isEmpty) { + errorMessageSetter(2, 'Password cannot be empty'); + } else { + errorMessageSetter(2, ""); + setState(() { + password = value; + }); + } + return null; + }, + obscureText: !isPasswordVisible, + autocorrect: false, + decoration: InputDecoration( + focusColor: Colors.blue, + suffixIcon: IconButton( + onPressed: () { + setState(() { + isPasswordVisible = !isPasswordVisible; + }); + }, + icon: Icon( + isPasswordVisible + ? Icons.visibility + : Icons.visibility_off, + ), + color: Colors.black.withOpacity(.3), + ), + border: InputBorder.none, + fillColor: Colors.white, + contentPadding: const EdgeInsets.only( + left: 15, bottom: 11, top: 11, right: 15), + hintText: "Password", + hintStyle: TextStyle( + fontSize: 16, color: Colors.black.withOpacity(.3)), + ), + style: TextStyle( + fontSize: 16, color: Colors.black.withOpacity(.9)), + ), + ), + ], + ), + ), + const SizedBox(height: 50), + isLoggingIn + ? const CircularProgressIndicator() + : Container( + height: 60, + width: 350, + child: Stack( + children: [ + AnimatedContainer( + duration: const Duration(milliseconds: 100), + margin: loginButtonMargin, + child: CustomButton( + height: 50, + width: 350, + onTap: _validateLoginDetails, + text: 'Login Now', + textStyle: const TextStyle( + fontSize: 20, + fontWeight: FontWeight.w500, + color: Colors.white), + ), + ), + ], + ), + ), + + // CheckboxListTile( + // activeColor: ColorConstant.purple900, + // title: const Text('Stay Logged In'), + // value: stayLoggedIn, + // contentPadding: const EdgeInsets.symmetric(horizontal: 80), + // onChanged: (value) { + // setState(() { + // stayLoggedIn = value!; + // }); + // }, + // ), + // const SizedBox( + // height: 50, + // ), + SizedBox(height: 22.v), + Row( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + 'Dont have An Account', + style: TextStyle( + fontSize: 18, + fontWeight: FontWeight.w400, + color: Colors.black.withOpacity(.3)), + ), + const SizedBox( + width: 10, + ), + InkWell( + onTap: () { + Navigator.of(context).push( + MaterialPageRoute(builder: (ctx) => SignupScreenF())); + }, + child: Text( + 'Sign Up', + style: TextStyle( + fontSize: 18, + fontWeight: FontWeight.w400, + color: ColorConstant.purple900), + ), + ) + ], + ) + ], + ), + )), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/LogoutService/Logoutservice.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/LogoutService/Logoutservice.dart new file mode 100644 index 0000000..6f7411c --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/LogoutService/Logoutservice.dart @@ -0,0 +1,19 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_secure_storage/flutter_secure_storage.dart'; +import 'package:shared_preferences/shared_preferences.dart'; +import '../../main.dart'; +import '../Login Screen/login_screen_f.dart'; + +class LogoutService { + static Future logout() async { + SharedPreferences prefs = await SharedPreferences.getInstance(); + await prefs.remove('userData'); + await prefs.remove('isLoggedIn'); + const storage = FlutterSecureStorage(); + await storage.delete(key: 'token'); + navigatorKey.currentState!.pushAndRemoveUntil( + MaterialPageRoute(builder: (context) => const LoginScreenF(true)), + (route) => false, // Remove all routes from the stack + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/Notification/GetAllNotification.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/Notification/GetAllNotification.dart new file mode 100644 index 0000000..6747e80 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/Notification/GetAllNotification.dart @@ -0,0 +1,402 @@ +// ignore_for_file: use_build_context_synchronously +import 'package:flutter/material.dart'; + +import '../../../theme/custom_text_style.dart'; +import '/providers/token_manager.dart'; +import 'package:speech_to_text/speech_to_text.dart' as stt; + +import 'NotificationService.dart'; + +class GetAllNotification extends StatefulWidget { + static const String routeName = '/entity-list'; + + @override + _GetAllNotificationState createState() => _GetAllNotificationState(); +} + +class _GetAllNotificationState extends State { + final NotificationService apiService = NotificationService(); + List> entities = []; + List> filteredEntities = []; + List> serachEntities = []; + + bool showCardView = true; // Add this variable to control the view mode + TextEditingController searchController = TextEditingController(); + late stt.SpeechToText _speech; + + bool isLoading = false; // Add this variable to track loading state + int currentPage = 0; + int pageSize = 10; // Adjust this based on your backend API + + final ScrollController _scrollController = ScrollController(); + @override + void initState() { + _speech = stt.SpeechToText(); + super.initState(); + fetchEntities(); + _scrollController.addListener(_scrollListener); + fetchwithoutpaging(); + } + + Future fetchwithoutpaging() async { + try { + final fetchedEntities = await apiService.getByUserId(); + print('data is $fetchedEntities'); + setState(() { + serachEntities = fetchedEntities; // Update only filteredEntities + }); + print('entity is .. $serachEntities'); + } catch (e) { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: const Text('Error'), + content: Text('Failed to fetch : $e'), + actions: [ + TextButton( + child: const Text('OK'), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ], + ); + }, + ); + } + } + + Future fetchEntities() async { + try { + setState(() { + isLoading = true; + }); + + final token = await TokenManager.getToken(); + if (token != null) { + final fetchedEntities = + await apiService.getAllWithPagination(token, currentPage, pageSize); + print('paging data is $fetchedEntities'); + setState(() { + entities.addAll(fetchedEntities); // Add new data to the existing list + filteredEntities = entities.toList(); // Update only filteredEntities + currentPage++; + }); + + print(' entity is .. $filteredEntities'); + } + } catch (e) { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: const Text('Error'), + content: Text('Failed to fetch Notification data: $e'), + actions: [ + TextButton( + child: const Text('OK'), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ], + ); + }, + ); + } finally { + setState(() { + isLoading = false; + }); + } + } + + void _scrollListener() { + if (_scrollController.position.pixels == + _scrollController.position.maxScrollExtent) { + fetchEntities(); + } + } + + void _searchEntities(String keyword) { + setState(() { + filteredEntities = serachEntities + .where((entity) => entity['notification'] + .toString() + .toLowerCase() + .contains(keyword.toLowerCase())) + .toList(); + }); + } + + void _startListening() async { + if (!_speech.isListening) { + bool available = await _speech.initialize( + onStatus: (status) { + print('Speech recognition status: $status'); + }, + onError: (error) { + print('Speech recognition error: $error'); + }, + ); + + if (available) { + _speech.listen( + onResult: (result) { + if (result.finalResult) { + searchController.text = result.recognizedWords; + _searchEntities(result.recognizedWords); + } + }, + ); + } + } + } + + void _stopListening() { + if (_speech.isListening) { + _speech.stop(); + } + } + + @override + void dispose() { + _speech.cancel(); + super.dispose(); + } + + onTapArrowleft1(BuildContext context) { + Navigator.pop(context); + } + + @override + Widget build(BuildContext context) { + return SafeArea( + child: Scaffold( + backgroundColor: Colors.grey[200], + appBar: AppBar( + backgroundColor: Colors.transparent, + elevation: 0, + forceMaterialTransparency: true, + leading: GestureDetector( + onTap: () { + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + width: 40, + decoration: BoxDecoration( + color: const Color(0xffcbfd71), + borderRadius: BorderRadius.circular(12)), + child: const Icon(Icons.arrow_back_ios_new_outlined), + ), + ), + ), + title: Text( + "Notifications", + style: CustomTextStyles.titleLargePoppinsBlack, + ), + actions: [ + Switch( + activeColor: const Color(0xff2e5b34), + activeTrackColor: Color(0xff4c9b56), + inactiveTrackColor: Color(0xffd24343), + inactiveThumbColor: Color(0xffab2424), + value: showCardView, + onChanged: (value) { + setState(() { + showCardView = value; + }); + }, + ), + ], + ), + body: RefreshIndicator( + onRefresh: () async { + currentPage = 1; + entities.clear(); + await fetchEntities(); + }, + child: Column( + children: [ + Text( + "Total notifications -${filteredEntities.length}", + style: const TextStyle(color: Colors.grey), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: TextField( + controller: searchController, + onChanged: (value) { + _searchEntities(value); + }, + decoration: InputDecoration( + hintText: 'Search...', + contentPadding: + const EdgeInsets.symmetric(horizontal: 16.0), + filled: true, + hoverColor: Colors.white, + fillColor: Colors.white, + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(10.0), + borderSide: BorderSide.none, + ), + suffixIcon: IconButton( + icon: const Icon(Icons.mic), + onPressed: () { + _startListening(); + }, + ), + ), + ), + ), + Expanded( + child: ListView.builder( + itemCount: filteredEntities.length + (isLoading ? 1 : 0), + itemBuilder: (BuildContext context, int index) { + if (index < filteredEntities.length) { + final entity = filteredEntities[index]; + return _buildListItem(entity); + } else { + // Display the loading indicator at the bottom when new data is loading + return const Padding( + padding: EdgeInsets.all(8.0), + child: Center( + child: CircularProgressIndicator(), + ), + ); + } + }, + controller: _scrollController, + ), + ), + ], + ), + ), + ), + ); + } + + Widget _buildListItem(Map entity) { + return showCardView ? _buildCardView(entity) : _buildNormalView(entity); + } + + // Function to build card view for a list item + Widget _buildCardView(Map entity) { + return _buildNormalView(entity); + } + //existing code + // void _accept(int refId) async { + // apiService.Accept(refId).then((_) => fetchEntities()); + // } + + // Future _ignore(int refId) async { + // apiService.ignored(refId).then((_) => fetchEntities()); + // } + + // code by shri + void _accept(int refId) async { + try { + await apiService.Accept(refId).then((value) => fetchEntities()); + setState(() { + final index = entities.indexWhere((entity) => entity['id'] == refId); + if (index != -1) { + entities[index]['isaccepted'] = true; + entities[index]['isignored'] = false; + } + }); + } catch (e) { + print('Failed to accept: $e'); + } + } + + Future _ignore(int refId) async { + try { + await apiService.ignored(refId).then((value) => fetchEntities()); + setState(() { + final index = entities.indexWhere((entity) => entity['id'] == refId); + if (index != -1) { + entities[index]['isignored'] = true; + entities[index]['isaccepted'] = false; + } + }); + } catch (e) { + print('Failed to ignore: $e'); + } + } + // Function to build normal view for a list item + + Widget _buildNormalView(Map entity) { + bool isAccepted = entity['isaccepted'] ?? false; + bool isIgnored = entity['isignored'] ?? false; + + return Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + padding: const EdgeInsets.all(12.0), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(12.0), color: Colors.white), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text('${entity['notification']}', + style: CustomTextStyles.titleMediumPoppins), + const SizedBox(height: 8.0), + if (isAccepted) + const Text('Accepted', + style: TextStyle( + color: Colors.green, + fontSize: 14, + fontWeight: FontWeight.w400)) + else if (isIgnored) + const Text('Ignored', + style: TextStyle( + color: Colors.red, + fontSize: 14, + fontWeight: FontWeight.w400)) + else + Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + SizedBox( + width: 70, + child: ElevatedButton( + onPressed: () { + _accept(entity['id']); + }, + style: ElevatedButton.styleFrom( + backgroundColor: Colors.green), + child: const Padding( + padding: EdgeInsets.all(8.0), + child: Text('Accept', + style: + TextStyle(color: Colors.white, fontSize: 14)), + ), + ), + ), + const SizedBox(width: 8.0), + SizedBox( + width: 70, + child: ElevatedButton( + onPressed: () { + _ignore(entity['id']); + }, + style: + ElevatedButton.styleFrom(backgroundColor: Colors.red), + child: const Padding( + padding: EdgeInsets.all(8.0), + child: Text('Ignore', + style: + TextStyle(color: Colors.white, fontSize: 14)), + ), + ), + ), + ], + ), + ], + ), + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/Notification/GetNotification.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/Notification/GetNotification.dart new file mode 100644 index 0000000..f0891db --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/Notification/GetNotification.dart @@ -0,0 +1,142 @@ +import 'package:flutter/material.dart'; + +class InviteItemWidget extends StatefulWidget { + final Map inviteItem; + final Function onAccept; + final Function onIgnore; + + const InviteItemWidget({ + required this.inviteItem, + required this.onAccept, + required this.onIgnore, + Key? key, + }) : super(key: key); + + @override + _InviteItemWidgetState createState() => _InviteItemWidgetState(); +} + +class _InviteItemWidgetState extends State { + bool isAccepted = false; + + void _accept() { + setState(() { + isAccepted = true; + }); + widget.onAccept(widget.inviteItem); + } + + void _ignore() { + setState(() { + isAccepted = false; + }); + widget.onIgnore(widget.inviteItem); + } + + @override + Widget build(BuildContext context) { + return Card( + margin: const EdgeInsets.symmetric(vertical: 8.0), + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text('Ref: ${widget.inviteItem['ref']}'), + const SizedBox(height: 8.0), + isAccepted + ? const Text('Accepted', style: TextStyle(color: Colors.green)) + : Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + ElevatedButton( + onPressed: _accept, + child: const Text('Accept', + style: TextStyle(color: Colors.green)), + ), + const SizedBox(width: 8.0), + ElevatedButton( + onPressed: _ignore, + child: const Text('Ignore'), + style: ElevatedButton.styleFrom( + backgroundColor: Colors.red, + ), + ), + ], + ), + ], + ), + ), + ); + } +} + +class InviteListWidget extends StatefulWidget { + @override + _InviteListWidgetState createState() => _InviteListWidgetState(); +} + +class _InviteListWidgetState extends State { + late Future>> _futureInvites; + final List> _invites = []; + + @override + void initState() { + super.initState(); + _futureInvites = _fetchInvites(); + } + + Future>> _fetchInvites() async { + // Simulate an API call + await Future.delayed(const Duration(seconds: 2)); + return [ + {'ref': 'INV123', 'accepted': false}, + {'ref': 'INV124', 'accepted': false}, + {'ref': 'INV125', 'accepted': true}, + ]; + } + + void _handleAccept(Map invite) { + setState(() { + invite['accepted'] = true; + }); + } + + void _handleIgnore(Map invite) { + setState(() { + invite['accepted'] = false; + }); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar(title: const Text('Invites')), + body: FutureBuilder>>( + future: _futureInvites, + builder: (context, snapshot) { + if (snapshot.connectionState == ConnectionState.waiting) { + return const Center(child: CircularProgressIndicator()); + } else if (snapshot.hasError) { + return Center(child: Text('Error: ${snapshot.error}')); + } else if (!snapshot.hasData || snapshot.data!.isEmpty) { + return const Center(child: Text('No invites found')); + } else { + _invites.addAll(snapshot.data!); + return ListView.builder( + itemCount: _invites.length, + itemBuilder: (context, index) { + final invite = _invites[index]; + return InviteItemWidget( + inviteItem: invite, + onAccept: _handleAccept, + onIgnore: _handleIgnore, + ); + }, + ); + } + }, + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/Notification/NotificationService.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/Notification/NotificationService.dart new file mode 100644 index 0000000..512a200 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/Notification/NotificationService.dart @@ -0,0 +1,261 @@ +import 'package:dio/dio.dart'; +import '../../../providers/token_manager.dart'; +import '/resources/api_constants.dart'; + +class NotificationService { + final String baseUrl = ApiConstants.baseUrl; + final Dio dio = Dio(); + +// /get by userid + Future>> getByUserId() async { + try { + final token = await TokenManager.getToken(); + + dio.options.headers['Authorization'] = 'Bearer $token'; + final response = + await dio.get('$baseUrl/notification/get_notification/userId'); + final entities = (response.data as List).cast>(); + return entities; + } catch (e) { + throw Exception('Failed to get all Notification: $e'); + } + } + + Future>> getAllWithPagination( + String token, int page, int Size) async { + try { + dio.options.headers['Authorization'] = 'Bearer $token'; + final response = await dio.get( + '$baseUrl/notification/get_notification/getall/page?page=$page&size=$Size'); + final entities = + (response.data['content'] as List).cast>(); + return entities; + } catch (e) { + throw Exception('Failed to get all without pagination: $e'); + } + } + + Future Accept(int entityId) async { + try { + final token = await TokenManager.getToken(); + + Map entity = {}; + dio.options.headers['Authorization'] = 'Bearer $token'; + await dio.put('$baseUrl/notification/get_notification/accept/$entityId', + data: entity); + print(entity); + } catch (e) { + throw Exception('Failed to Accept: $e'); + } + } + + Future ignored(int entityId) async { + try { + final token = await TokenManager.getToken(); + + Map entity = {}; + dio.options.headers['Authorization'] = 'Bearer $token'; + await dio.put('$baseUrl/notification/get_notification/ignored/$entityId', + data: entity); + print(entity); + } catch (e) { + throw Exception('Failed to ignored: $e'); + } + } + +// Future> createEntity( +// String token, Map entity) async { +// try { +// print("in post api$entity"); +// dio.options.headers['Authorization'] = 'Bearer $token'; +// final response = await dio.post('$baseUrl/Teams/Teams', data: entity); + +// print(entity); + +// // Assuming the response is a Map +// Map responseData = response.data; + +// return responseData; +// } catch (e) { +// throw Exception('Failed to create Team: $e'); +// } +// } + +// // Modify the uploadlogoimage function +// Future uploadlogoimage(String token, String ref, String refTableNmae, +// String selectedFilePath, Uint8List image_timageBytes) async { +// try { +// String apiUrl = "$baseUrl/FileUpload/Uploadeddocs/$ref/$refTableNmae"; + +// final Uint8List fileBytes = image_timageBytes!; +// final mimeType = logolookupMimeType(selectedFilePath); + +// FormData formData = FormData.fromMap({ +// 'file': MultipartFile.fromBytes( +// fileBytes, +// filename: selectedFilePath +// .split('/') +// .last, // Get the file name from the path +// contentType: MediaType.parse(mimeType!), +// ), +// }); + +// Dio dio = Dio(); // Create a new Dio instance +// dio.options.headers['Authorization'] = 'Bearer $token'; + +// final response = await dio.post(apiUrl, data: formData); + +// if (response.statusCode == 200) { +// // Handle successful response +// print('File uploaded successfully'); +// } else { +// print('Failed to upload file with status: ${response.statusCode}'); +// } +// } catch (error) { +// print('Error occurred during form submission: $error'); +// } +// } + +// // Modify the lookupMimeType function if needed +// String logolookupMimeType(String filePath) { +// final ext = filePath.split('.').last; +// switch (ext) { +// case 'jpg': +// case 'jpeg': +// return 'image/jpeg'; +// case 'png': +// return 'image/png'; +// case 'pdf': +// return 'application/pdf'; +// // Add more cases for other file types as needed +// default: +// return 'application/octet-stream'; // Default MIME type +// } +// } + +// Future updateEntity( +// String token, int entityId, Map entity) async { +// try { +// dio.options.headers['Authorization'] = 'Bearer $token'; +// await dio.put('$baseUrl/Teams/Teams/$entityId', data: entity); +// print(entity); +// } catch (e) { +// throw Exception('Failed to update entity: $e'); +// } +// } + +// Future deleteEntity(String token, int entityId) async { +// try { +// dio.options.headers['Authorization'] = 'Bearer $token'; +// await dio.delete('$baseUrl/Teams/Teams/$entityId'); +// } catch (e) { +// throw Exception('Failed to delete entity: $e'); +// } +// } + +// // my team +// Future>> getMyTeam() async { +// try { +// final token = await TokenManager.getToken(); +// dio.options.headers['Authorization'] = 'Bearer $token'; +// final response = await dio.get('$baseUrl/Teams/Teams/myTeam'); +// final entities = (response.data as List).cast>(); +// return entities; +// } catch (e) { +// throw Exception('Failed to get all Team: $e'); +// } +// } + +// // get all team by tournament id +// Future>> getMyTeamBytourId(int tourId) async { +// try { +// final token = await TokenManager.getToken(); +// dio.options.headers['Authorization'] = 'Bearer $token'; +// final response = await dio +// .get('$baseUrl/tournament/Register_tournament/teams/$tourId'); +// final entities = (response.data as List).cast>(); +// return entities; +// } catch (e) { +// throw Exception('Failed to get all Teams: $e'); +// } +// } + +// // get all member by team id +// Future>> getallmember(int teamId) async { +// try { +// final token = await TokenManager.getToken(); +// dio.options.headers['Authorization'] = 'Bearer $token'; +// final response = +// await dio.get('$baseUrl/team/Register_team/member/$teamId'); +// final entities = (response.data as List).cast>(); +// return entities; +// } catch (e) { +// throw Exception('Failed to get all Member: $e'); +// } +// } + +// // enroll in team +// Future> enrollInTeam(Map entity) async { +// final token = await TokenManager.getToken(); +// try { +// dio.options.headers['Authorization'] = 'Bearer $token'; +// final response = +// await dio.post('$baseUrl/team/Register_team', data: entity); + +// print(entity); + +// // Assuming the response is a Map +// Map responseData = response.data; + +// return responseData; +// } catch (e) { +// throw Exception('Failed to Enroll Team: $e'); +// } +// } + +// // send invitation to player +// Future invitePlayer(String mobNo, int teamId) async { +// final token = await TokenManager.getToken(); + +// Map entity = {}; +// try { +// print("in post api$entity"); +// dio.options.headers['Authorization'] = 'Bearer $token'; +// final response = await dio.post( +// '$baseUrl/Teams/Teams/invite?Mob_number=$mobNo&TeamId=$teamId', +// data: entity); + +// print(entity); + +// // Assuming the response is a Map +// // Map responseData = response.data; + +// return Future.delayed(Duration(seconds: 2), () => true); +// } catch (e) { +// throw Exception('Failed to Invite Player : $e'); +// } +// } + +// // send invitation to team +// Future inviteteam(String tournamentId, int teamId) async { +// final token = await TokenManager.getToken(); + +// Map entity = {}; +// try { +// print("in post api$entity"); +// dio.options.headers['Authorization'] = 'Bearer $token'; +// final response = await dio.post( +// '$baseUrl/My_Tournament/My_Tournament/invite?tournamentId=$tournamentId&TeamId=$teamId', +// data: entity); + +// // print(entity); + +// // // Assuming the response is a Map +// // Map responseData = response.data; + +// return Future.delayed(Duration(seconds: 2), () => true); +// } catch (e) { +// throw Exception('Failed to Invite Team : $e'); +// } +// } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_dash/Newdashboard.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_dash/Newdashboard.dart new file mode 100644 index 0000000..65a672d --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_dash/Newdashboard.dart @@ -0,0 +1,842 @@ +// ignore_for_file: deprecated_member_use + +import 'package:another_carousel_pro/another_carousel_pro.dart'; +import 'package:base_project/core/app_export.dart'; + + +import 'package:dotted_border/dotted_border.dart'; +import 'dart:async'; +import 'dart:convert'; +import 'package:flutter/material.dart'; +import 'package:google_fonts/google_fonts.dart'; +import 'package:path/path.dart'; +import 'package:provider/provider.dart'; +import 'package:shared_preferences/shared_preferences.dart'; +import '../../../providers/tab_navigation_provider.dart'; +import '../../../theme/custom_text_style.dart'; +import '../../Login Screen/decision.dart'; +import '../../ReuseableWidgets/BottomAppBarWidget.dart'; +import '../../ReuseableWidgets/CustomDrawer.dart'; +import '../../ReuseableWidgets/headerWidget.dart'; + +class Newdashboard extends StatefulWidget { + Newdashboard({super.key}); + + @override + _NewdashboardState createState() => _NewdashboardState(); +} + +class _NewdashboardState extends State { + int _currentTab = 0; + final GlobalKey _scaffoldKey = GlobalKey(); + + Map userData = {}; + var apiService = ''; + List> matchLive = []; + bool isLoading = false; + + List> dummyData2 = [ + { + 'title': 'India vs\nWest indies', + 'imgPath': 'assets/images/img_image_2.png', + 'color': Color(0xff1289bd) + }, + { + 'title': 'Australia \nTour', + 'imgPath': 'assets/images/img_image_2.png', + 'color': Color(0xff010593), + }, + { + 'title': 'England \nTour', + 'imgPath': 'assets/images/img_image_1.png', + 'color': Color(0xff930101), + }, + ]; + + void getLoginState() async { + final prefs = await SharedPreferences.getInstance(); + setState(() { + isLogin = prefs.getBool('isLoggedIn') ?? false; + }); + print("LoginState-$isLogin"); + } + + var isLogin = false; + + int _selectedIndex = 0; + + @override + void initState() { + super.initState(); + fetchMatchesLive(); + getUserData(); + getLoginState(); + // fetchData(); + print('user data is ..$userData'); + } + + getUserData() async { + SharedPreferences prefs = await SharedPreferences.getInstance(); + var userdatastr = prefs.getString('userData'); + if (userdatastr != null) { + try { + setState(() { + userData = json.decode(userdatastr); + }); + print(userData['token']); + } catch (e) { + print("error is ..................$e"); + } + } + } + + Future fetchMatchesLive() async { + setState(() { + isLoading = true; + }); + try { + // final fetchedEntities = await apiService.liveMatches(); + // print('live match is $fetchedEntities'); + setState(() { + // matchLive = fetchedEntities; + isLoading = false; + }); + print('Match by id .. $matchLive'); + } catch (e) { + setState(() { + isLoading = false; + }); + } + } + + void setTab(int index) { + setState(() { + _currentTab = index; + }); + } + + // List> notifications = []; + + // Future fetchData() async { + // String baseUrl = ApiConstants.baseUrl; + // final apiUrl = '$baseUrl/notification/get_notification'; + // final token = await TokenManager.getToken(); + // final response = await http.get( + // Uri.parse(apiUrl), + // headers: { + // 'Authorization': 'Bearer $token', + // 'Content-Type': 'application/json', + // }, + // ); + // if (response.statusCode == 401) { + // LogoutService.logout(); + // } + // if (response.statusCode <= 209) { + // final List data = jsonDecode(response.body); + // setState(() { + // notifications = data.cast>(); + // }); + // print('notifications are $notifications'); + // } else { + // // Handle errors + // print('Failed to fetch data'); + // } + // } + + @override + Widget build(BuildContext context) { + return PopScope( + // onWillPop: _onBackPress, + child: Scaffold( + key: _scaffoldKey, + drawer: CustomDrawer(context: context), + + bottomNavigationBar: BottomAppBarWidget(), + + backgroundColor: const Color(0xfffefefe), + extendBodyBehindAppBar: true, + //bottomNavigationBar: AppFooter(), + body: SizedBox( + width: double.maxFinite, + child: SingleChildScrollView( + child: Column( + children: [ + Container( + color: Colors.grey[200], + padding: EdgeInsets.symmetric( + horizontal: 15.h, + vertical: 43.v, + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + headerWidget(context, _scaffoldKey), + // _buildTelevisionRow(context), + SizedBox(height: 21.v), + Text( + "Trending now", + style: CustomTextStyles.headlineSmallSemiBold, + ), + _buildOngoingStack(context), + SizedBox(height: 10.v), + _bannerWidget(), + SizedBox(height: 10.v), + Padding( + padding: const EdgeInsets.all(8.0), + child: _slidingBannerWidget(), + ), + SizedBox(height: 10.v), + _customTabBar(), + SizedBox(height: 10.v), + _headlineWidget(), + SizedBox(height: 10.v), + // bottom card + SizedBox( + height: 270, + child: ListView.builder( + scrollDirection: Axis.horizontal, + itemCount: dummyData2.length, + itemBuilder: (context, index) { + final data = dummyData2[index]; + return _bottomCardWidget( + data['imgPath'], data['title'], data['color']); + }, + ), + ), + //_bottomCardWidget(), + ], + ), + ), + SizedBox(height: 8.v), + ], + ), + ), + ), + ), + ); + } + + Widget _loginReqWidget(BuildContext context) { + return Center( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + "Please Login to access this feature", + style: GoogleFonts.getFont('Poppins', color: Colors.black), + ), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + InkWell( + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => const DecisionScreen(), + )); + }, + child: Text( + "Click here", + style: GoogleFonts.getFont('Poppins', color: Colors.blue), + )), + SizedBox( + width: 6, + ), + Text( + "to login ", + style: GoogleFonts.getFont('Poppins', color: Colors.black), + ), + ], + ), + ], + ), + ); + } + + // /// Section Widget + Widget _buildOngoingStack(BuildContext context) { + return DottedBorder( + color: Colors.purple, + borderType: BorderType.RRect, + radius: const Radius.circular(12), + dashPattern: const [8, 4], + padding: const EdgeInsets.all(6), + child: SizedBox( + height: 260, + child: !isLogin + ? _loginReqWidget(context) + : isLoading + ? const Center(child: CircularProgressIndicator()) + : ListView.builder( + scrollDirection: Axis.horizontal, + itemCount: matchLive.length, + itemBuilder: (context, index) { + final data = matchLive[index]; + return _myContainer(context, + matchTitle: data['tournament_name'], + team1: data['team_1_name'], + team1Status: data['team1Status'] ?? 'nope', + team2: data['team_2_name'], + team1S: data['extn1'] ?? '0', + team2S: data['extn1'] ?? '0', + team1Wkts: data['extn1'] ?? '0', + team2Wkts: data['extn1'] ?? '0', + team1Overs: data['extn1'] ?? '0', + team2Overs: data['extn1'] ?? '0', + team1Crr: data['extn1'] ?? '0', + tossBy: data['extn1'] ?? '0', + team1Logo: data['team1Logo'] ?? + ImageConstant.imgEngRoundFlag, + team2Logo: data['team2Logo'] ?? + ImageConstant.imgShriLankaRoundFlag); + }))); + } + + Widget _myContainer(BuildContext context, + {required String matchTitle, + required team1, + required team1Status, + required team2, + required team1S, + required team2S, + required team1Wkts, + required team2Wkts, + required team1Overs, + required team2Overs, + required team1Crr, + required tossBy, + required team1Logo, + required team2Logo}) { + return Column( + children: [ + // top section + Padding( + padding: const EdgeInsets.all(8.0), + child: SizedBox( + width: MediaQuery.of(context).size.width * 0.87, + child: Container( + width: double.infinity, + height: 240, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(12), color: Colors.white), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // top section + Padding( + padding: const EdgeInsets.symmetric( + horizontal: 10.0, + ), + child: SizedBox( + height: 55, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + matchTitle, + style: CustomTextStyles.titleMediumBlack900Medium, + ), + Text( + '$team1 vs $team2', + style: CustomTextStyles.titleMediumBlack900Medium, + ), + Row( + children: [ + Text("Live", + style: CustomTextStyles.titleSmallGray600), + const SizedBox( + width: 10, + ), + Image.asset( + ImageConstant.imgLive, + scale: 16, + ) + ], + ), + ], + ), + ), + ), + Divider( + color: Colors.grey[200], + ), + // middle most section + SizedBox( + height: 140, + width: double.infinity, + child: Row( + children: [ + Expanded( + flex: 3, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + ListTile( + leading: CircleAvatar( + backgroundColor: Colors.transparent, + backgroundImage: AssetImage(team1Logo), + ), + title: SizedBox( + width: 130, + child: FittedBox( + fit: BoxFit.scaleDown, + child: Text( + team1, + style: CustomTextStyles + .titleMediumBlack900Medium, + ), + ), + ), + trailing: SizedBox( + width: 40, + child: team1Status == 'Bat' + ? FittedBox( + fit: BoxFit.scaleDown, + child: RichText( + text: TextSpan( + text: + "$team1S- $team1Wkts", + style: CustomTextStyles + .titleMedium18, + children: const [ + TextSpan( + text: '*', + style: TextStyle( + color: Colors.red)), + ])), + ) + : const FittedBox( + fit: BoxFit.scaleDown, + child: Text( + 'Yet to Bat', + style: TextStyle( + color: Colors.grey, + fontSize: 16), + ), + ), + )), + ListTile( + leading: CircleAvatar( + backgroundImage: AssetImage(team2Logo), + backgroundColor: Colors.transparent, + ), + title: SizedBox( + width: 130, + child: FittedBox( + fit: BoxFit.scaleDown, + child: Text( + team2, + style: CustomTextStyles + .titleMediumBlack900Medium, + ), + ), + ), + trailing: SizedBox( + width: 40, + child: team1Status == 'Ball' + ? FittedBox( + fit: BoxFit.scaleDown, + child: RichText( + text: TextSpan( + text: + "$team2S -$team2Wkts", + style: CustomTextStyles + .titleMedium18, + children: const [ + TextSpan( + text: '*', + style: TextStyle( + color: Colors.red)), + ])), + ) + : const FittedBox( + fit: BoxFit.scaleDown, + child: Text( + 'Yet to bat', + style: TextStyle( + color: Colors.grey, + fontSize: 16), + ), + ), + )), + ], + )), + Padding( + padding: const EdgeInsets.all(8.0), + child: VerticalDivider( + color: Colors.grey[200], + ), + ), + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + team1Status == 'Bat' + ? "($team2Overs)Overs" + : "($team1Overs)Overs", + style: CustomTextStyles.titleMediumMedium, + ), + Text( + "$team1Crr crr", + style: const TextStyle( + color: Colors.grey, + fontWeight: FontWeight.w700, + fontSize: 14), + ) + ], + )) + ], + ), + ), + Divider( + color: Colors.grey[200], + ), + // bottom section + Padding( + padding: const EdgeInsets.symmetric( + horizontal: 10.0, vertical: 10), + child: Text( + tossBy, + style: CustomTextStyles.titleSmallGray600, + ), + ) + ], + ), + ), + ), + ), + ], + ); + } + + Widget _bannerWidget() { + return Container( + height: 120, + width: double.infinity, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(12), + gradient: const LinearGradient( + colors: [ + Color(0xff3efafa), + Color(0xff52ecfd), + Color(0xffa058f1), + Color(0xff913bf3), + Color(0xff9a3bf3) + ], + )), + child: Row( + children: [ + Expanded( + child: Padding( + padding: const EdgeInsets.only(left: 8.0), + child: SizedBox( + height: 80.v, + child: Image.asset( + "assets/images/image_65.png", + scale: 4, + )), + )), + Expanded( + flex: 2, + child: SizedBox( + height: double.infinity, + width: double.infinity, + child: Image.asset( + "assets/images/image_204.png", + fit: BoxFit.fill, + ))), + Expanded( + flex: 2, + child: Stack( + children: [ + Padding( + padding: const EdgeInsets.only(left: 18.0), + child: Align( + alignment: Alignment.bottomRight, + child: SizedBox( + height: 240.v, + child: Image.asset( + "assets/images/image_4.png", + color: Colors.black.withOpacity(0.2), + scale: 1, + fit: BoxFit.cover, + ))), + ), + Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const Text( + "FOR STATS, LATEST \n SCORE & NEWS", + style: TextStyle( + fontSize: 14, fontWeight: FontWeight.bold), + ), + SizedBox( + height: 8.v, + ), + GestureDetector( + onTap: () {}, + child: Container( + padding: const EdgeInsets.all(10), + decoration: BoxDecoration( + color: Colors.black.withOpacity(0.4), + borderRadius: BorderRadius.circular(20)), + child: const Text( + "CLICK HERE", + style: TextStyle(fontSize: 10), + ), + ), + ), + ], + ), + ) + ], + )), + ], + ), + ); + } + + Widget _slidingBannerWidget() { + return SizedBox( + height: 400, + width: double.infinity, + child: ClipRRect( + borderRadius: BorderRadius.circular(12), + child: AnotherCarousel( + images: const [ + AssetImage( + "assets/images/image_195.png", + ), + AssetImage( + "assets/images/image_195.png", + ), + AssetImage( + "assets/images/image_195.png", + ), + ], + borderRadius: true, + radius: const Radius.circular(4), + autoplay: false, + dotColor: Colors.grey, + dotIncreasedColor: Colors.yellowAccent, + indicatorBgPadding: 1, + dotSize: 6, + ), + ), + ); + } + + Widget _customTabBar() { + return Container( + height: 70, + width: double.infinity, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(12), + ), + child: Row( + children: [ + _tabItem( + index: 0, + selectedIndex: _selectedIndex, + onTap: () { + setState(() { + _selectedIndex = 0; + }); + }, + text: "Top Headline", + ), + _tabItem( + index: 1, + selectedIndex: _selectedIndex, + onTap: () { + setState(() { + _selectedIndex = 1; + }); + }, + text: "Most Popular", + ), + ], + ), + ); + } + + Widget _tabItem( + {required int index, + selectedIndex, + required VoidCallback onTap, + required String text}) { + return Expanded( + child: GestureDetector( + onTap: onTap, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + decoration: BoxDecoration( + color: + index == selectedIndex ? Colors.yellow : Colors.transparent, + borderRadius: BorderRadius.circular(12)), + child: Center( + child: Text(text, + style: index == selectedIndex + ? CustomTextStyles.titleSmallPoppinsBlack900 + : CustomTextStyles.titleSmallGray600), + ), + ), + ), + ), + ); + } + + Widget _headlineWidget() { + return Container( + height: 160, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(12), + ), + child: Row( + children: [ + Expanded( + child: Padding( + padding: const EdgeInsets.all(4.0), + child: ClipRRect( + borderRadius: BorderRadius.circular(12), + child: SizedBox( + height: 100, + child: Image.asset( + "assets/images/image.png", + fit: BoxFit.cover, + ))), + )), + Expanded( + flex: 2, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + const Text( + "hey how are you,hey how are you,hey how are you,hey how are you,", + style: TextStyle( + color: Colors.black, + fontSize: 16, + fontWeight: FontWeight.bold), + ), + Row( + children: [ + const Text( + "PTI", + style: TextStyle( + color: Colors.black, + fontSize: 16, + fontWeight: FontWeight.bold), + ), + SizedBox( + width: 6.h, + ), + const Text( + "•", + style: TextStyle(color: Colors.grey), + ), + SizedBox( + width: 6.h, + ), + const Text( + "1 hour ago", + style: TextStyle( + color: Colors.grey, + fontSize: 16, + fontWeight: FontWeight.bold), + ), + ], + ) + ], + ), + )), + ], + ), + ); + } + + Widget _bottomCardWidget(String imgPath, title, Color color) { + return Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + width: 200, + decoration: BoxDecoration( + color: color, + borderRadius: BorderRadius.circular(12), + image: const DecorationImage( + image: AssetImage( + "assets/images/image_2.png", + ), + fit: BoxFit.cover)), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + CircleAvatar( + radius: 50, + child: Image.asset(imgPath), + ), + SizedBox( + height: 10.v, + ), + Text( + "$title", + style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 20), + ) + ], + ), + ), + ); + } + + Widget _imageSliderBannerWidget() { + return Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + height: 400, + width: double.infinity, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(12), color: Colors.red), + child: ClipRRect( + borderRadius: BorderRadius.circular(12), + child: Image.asset( + "assets/images/image_195.png", + fit: BoxFit.fill, + )), + ), + ); + } + + void _onTabChange(int index) { + if (_currentTab == 1 || _currentTab == 2) { + FocusManager.instance.primaryFocus?.unfocus(); + } + Provider.of(context as BuildContext, listen: false) + .updateTabs(_currentTab); + setState(() { + _currentTab = index; + }); + } + + Future _onBackPress() { + if (_currentTab == 0) { + return Future.value(true); + } else { + int lastTab = Provider.of(context as BuildContext, + listen: false) + .lastTab; + Provider.of(context as BuildContext, listen: false) + .removeLastTab(); + setTab(lastTab); + } + return Future.value(false); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_dash/new_dash.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_dash/new_dash.dart new file mode 100644 index 0000000..1e9c5fe --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_dash/new_dash.dart @@ -0,0 +1,894 @@ +import 'package:flutter/material.dart'; +import 'dart:ui'; +import 'package:flutter_svg/flutter_svg.dart'; +// import 'package:flutter_app/utils.dart'; +import 'package:google_fonts/google_fonts.dart'; + +class DashboardScreen extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Container( + decoration: BoxDecoration( + color: const Color(0xFFF0F5F4), + borderRadius: BorderRadius.circular(25), + ), + child: Container( + padding: const EdgeInsets.fromLTRB(0, 43, 0, 10), + child: Stack( + clipBehavior: Clip.none, + children: [ + SizedBox( + width: 1048.9, + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: const EdgeInsets.fromLTRB(46, 0, 46, 24), + child: Align( + alignment: Alignment.topLeft, + child: SizedBox( + width: 381, + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: const EdgeInsets.fromLTRB(0, 4, 20, 0), + child: SizedBox( + width: 18, + height: 34, + child: SvgPicture.asset( + 'assets/vectors/vector_29_x4.svg', + ), + ), + ), + Container( + margin: const EdgeInsets.fromLTRB(0, 0, 10, 3), + child: Container( + decoration: const BoxDecoration( + image: DecorationImage( + fit: BoxFit.cover, + image: AssetImage( + 'assets/images/image_removebg_preview_1.png', + ), + ), + ), + child: Container( + width: 272, + height: 35, + ), + ), + ), + ], + ), + ), + ), + ), + Container( + margin: const EdgeInsets.fromLTRB(42.2, 0, 42.2, 11), + child: Align( + alignment: Alignment.topLeft, + child: Text( + 'Trending Now', + style: GoogleFonts.getFont( + 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 20, + height: 1.1, + letterSpacing: -0.4, + color: const Color(0xFF2E2C2C), + ), + ), + ), + ), + Container( + margin: const EdgeInsets.fromLTRB(35, 0, 35, 125), + child: Align( + alignment: Alignment.topLeft, + child: Container( + padding: const EdgeInsets.fromLTRB(19, 19, 19, 19), + decoration: BoxDecoration( + border: Border.all(color: const Color(0xFF9747FF)), + borderRadius: BorderRadius.circular(5), + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Container( + margin: const EdgeInsets.fromLTRB(0, 0, 0, 20), + child: Container( + decoration: BoxDecoration( + color: const Color(0xFFFFFFFF), + borderRadius: BorderRadius.circular(15), + ), + child: Container( + padding: + const EdgeInsets.fromLTRB(0, 15, 0, 10), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Container( + margin: const EdgeInsets.fromLTRB( + 15, 0, 15, 10.3), + child: SizedBox( + width: 322, + child: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Container( + margin: + const EdgeInsets.fromLTRB( + 0, 7, 7, 3), + child: SizedBox( + width: 260.5, + child: Text( + 'Kabaddi | Match 8', + style: GoogleFonts.getFont( + 'Roboto', + fontWeight: + FontWeight.w400, + fontSize: 14, + height: 1, + letterSpacing: 0.2, + color: const Color( + 0xCC000000), + ), + ), + ), + ), + Row( + mainAxisAlignment: + MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Container( + margin: const EdgeInsets + .fromLTRB(0, 6, 5.5, 6), + child: Text( + 'Live', + style: + GoogleFonts.getFont( + 'Roboto', + fontWeight: + FontWeight.w400, + fontSize: 14, + height: 0.9, + color: const Color( + 0xFF000000), + ), + ), + ), + Container( + decoration: + const BoxDecoration( + image: DecorationImage( + fit: BoxFit.cover, + image: AssetImage( + 'assets/images/image_7.gif', + ), + ), + ), + child: Container( + width: 24, + height: 24, + ), + ), + ], + ), + ], + ), + ), + ), + Container( + margin: const EdgeInsets.fromLTRB( + 0, 0, 0, 9.3), + child: Container( + decoration: const BoxDecoration( + color: Color(0x1A000000), + ), + child: Container( + width: 352, + height: 1, + ), + ), + ), + Container( + margin: const EdgeInsets.fromLTRB( + 15, 0, 15, 10.2), + child: Row( + mainAxisAlignment: + MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Container( + margin: const EdgeInsets.fromLTRB( + 0, 0, 62, 40), + child: Stack( + children: [ + Row( + mainAxisAlignment: + MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + Container( + margin: const EdgeInsets + .fromLTRB( + 0, 0, 10, 0), + child: Container( + decoration: + const BoxDecoration( + image: + DecorationImage( + fit: BoxFit.cover, + image: AssetImage( + 'assets/images/image_4.png', + ), + ), + ), + child: Container( + width: 30, + height: 30, + ), + ), + ), + Container( + margin: const EdgeInsets + .fromLTRB( + 0, 3, 10.8, 3), + child: Text( + 'Patna Pirates', + style: GoogleFonts + .getFont( + 'Roboto', + fontWeight: + FontWeight.w400, + fontSize: 16, + height: 1.5, + color: const Color( + 0xCC000000), + ), + ), + ), + Container( + margin: const EdgeInsets + .fromLTRB( + 0, 3, 0, 3), + child: Text( + '33', + style: GoogleFonts + .getFont( + 'Roboto', + fontWeight: + FontWeight.w600, + fontSize: 14, + height: 1.7, + color: const Color( + 0xCC000000), + ), + ), + ), + ], + ), + Positioned( + right: -13, + bottom: -40, + child: SizedBox( + width: 175, + height: 30, + child: Row( + mainAxisAlignment: + MainAxisAlignment + .start, + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + Container( + margin: + const EdgeInsets + .fromLTRB(0, + 0, 10.9, 0), + child: Container( + decoration: + const BoxDecoration( + image: + DecorationImage( + fit: BoxFit + .cover, + image: + AssetImage( + 'assets/images/image_6.png', + ), + ), + ), + child: Container( + width: 30, + height: 30, + ), + ), + ), + Container( + margin: + const EdgeInsets + .fromLTRB(0, + 3, 10.7, 3), + child: Text( + 'Gujarat Giants', + style: GoogleFonts + .getFont( + 'Roboto', + fontWeight: + FontWeight + .w400, + fontSize: 16, + height: 1.5, + color: const Color( + 0xCC000000), + ), + ), + ), + Container( + margin: + const EdgeInsets + .fromLTRB( + 0, 3, 0, 3), + child: RichText( + text: TextSpan( + text: '30', + style: + GoogleFonts + .getFont( + 'Roboto', + fontWeight: + FontWeight + .w600, + fontSize: 14, + height: 1.7, + color: const Color( + 0xCC000000), + ), + children: [ + TextSpan( + text: '*', + style: GoogleFonts + .getFont( + 'Roboto', + fontWeight: + FontWeight + .w600, + fontSize: + 14, + height: + 1.3, + color: const Color( + 0xFFF6423A), + ), + ), + ], + ), + ), + ), + ], + ), + ), + ), + ], + ), + ), + Container( + width: 98, + decoration: const BoxDecoration( + border: Border( + left: BorderSide( + color: Color(0x1A000000), + width: 1, + ), + ), + ), + child: Container( + padding: + const EdgeInsets.fromLTRB( + 0, 13.5, 10.5, 13.5), + child: Column( + mainAxisAlignment: + MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.end, + children: [ + Container( + margin: const EdgeInsets + .fromLTRB(0, 0, 0, 5), + child: Text( + 'Empty Raid', + style: + GoogleFonts.getFont( + 'Roboto', + fontWeight: + FontWeight.w400, + fontSize: 12, + height: 1.2, + letterSpacing: 0.2, + color: const Color( + 0xFFA6A9B8), + ), + ), + ), + Container( + margin: const EdgeInsets + .fromLTRB(3, 0, 3, 0), + child: RichText( + text: TextSpan( + text: '33 : 30', + style: GoogleFonts + .getFont( + 'Roboto', + fontWeight: + FontWeight.w600, + fontSize: 16, + height: 1.5, + color: const Color( + 0xCC000000), + ), + children: [ + TextSpan( + text: '*', + style: GoogleFonts + .getFont( + 'Roboto', + fontWeight: + FontWeight + .w600, + fontSize: 16, + height: 1.3, + color: const Color( + 0xFFFF443B), + ), + ), + ], + ), + ), + ), + ], + ), + ), + ), + ], + ), + ), + Container( + margin: const EdgeInsets.fromLTRB( + 0, 0, 0, 9.3), + child: Container( + decoration: const BoxDecoration( + color: Color(0x1A000000), + ), + child: Container( + width: 352, + height: 1, + ), + ), + ), + Container( + margin: const EdgeInsets.fromLTRB( + 15, 0, 15, 0), + child: Align( + alignment: Alignment.topLeft, + child: Container( + child: Text( + 'Gujarat Giants Empty Raid', + style: GoogleFonts.getFont( + 'Roboto', + fontWeight: FontWeight.w400, + fontSize: 12, + height: 1.2, + letterSpacing: 0.2, + color: const Color(0xCC000000), + ), + ), + ), + ), + ), + ], + ), + ), + ), + ), + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: const Color(0xFFFFFFFF), + boxShadow: [ + const BoxShadow( + color: Color(0x33636363), + offset: Offset(0, 2), + blurRadius: 4, + ), + ], + ), + child: Container( + padding: + const EdgeInsets.fromLTRB(0, 15, 0, 10), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: const EdgeInsets.fromLTRB( + 15, 0, 15, 10.3), + child: SizedBox( + width: 322, + child: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Container( + margin: const EdgeInsets.fromLTRB( + 0, 7, 7, 3), + child: SizedBox( + width: 260.5, + child: Text( + 'Kabaddi | Match 8', + style: GoogleFonts.getFont( + 'Roboto', + fontWeight: FontWeight.w400, + fontSize: 14, + height: 1, + letterSpacing: 0.2, + color: + const Color(0xCC000000), + ), + ), + ), + ), + Row( + mainAxisAlignment: + MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Container( + margin: + const EdgeInsets.fromLTRB( + 0, 6, 5.5, 6), + child: Text( + 'Live', + style: GoogleFonts.getFont( + 'Roboto', + fontWeight: + FontWeight.w400, + fontSize: 14, + height: 0.9, + color: const Color( + 0xFF000000), + ), + ), + ), + Container( + decoration: + const BoxDecoration( + image: DecorationImage( + fit: BoxFit.cover, + image: AssetImage( + 'assets/images/image_7.gif', + ), + ), + ), + child: Container( + width: 24, + height: 24, + ), + ), + ], + ), + ], + ), + ), + ), + Container( + margin: const EdgeInsets.fromLTRB( + 0, 0, 0, 9.3), + child: Container( + decoration: const BoxDecoration( + color: Color(0x1A000000), + ), + child: Container( + width: 352, + height: 1, + ), + ), + ), + Container( + margin: const EdgeInsets.fromLTRB( + 15, 0, 15, 10.2), + child: Row( + mainAxisAlignment: + MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Container( + margin: const EdgeInsets.fromLTRB( + 0, 0, 62, 40), + child: Stack( + children: [ + Row( + mainAxisAlignment: + MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Container( + margin: const EdgeInsets + .fromLTRB( + 0, 0, 10, 0), + child: Container( + decoration: + const BoxDecoration( + image: + DecorationImage( + fit: BoxFit.cover, + image: AssetImage( + 'assets/images/image_4.png', + ), + ), + ), + child: Container( + width: 30, + height: 30, + ), + ), + ), + Container( + margin: const EdgeInsets + .fromLTRB( + 0, 3, 10.8, 3), + child: Text( + 'Patna Pirates', + style: + GoogleFonts.getFont( + 'Roboto', + fontWeight: + FontWeight.w400, + fontSize: 16, + height: 1.5, + color: const Color( + 0xCC000000), + ), + ), + ), + Container( + margin: const EdgeInsets + .fromLTRB(0, 3, 0, 3), + child: Text( + '33', + style: + GoogleFonts.getFont( + 'Roboto', + fontWeight: + FontWeight.w600, + fontSize: 14, + height: 1.7, + color: const Color( + 0xCC000000), + ), + ), + ), + ], + ), + Positioned( + right: -13, + bottom: -40, + child: SizedBox( + width: 175, + height: 30, + child: Row( + mainAxisAlignment: + MainAxisAlignment + .start, + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + Container( + margin: + const EdgeInsets + .fromLTRB(0, + 0, 10.9, 0), + child: Container( + decoration: + const BoxDecoration( + image: + DecorationImage( + fit: BoxFit + .cover, + image: + AssetImage( + 'assets/images/image_6.png', + ), + ), + ), + child: Container( + width: 30, + height: 30, + ), + ), + ), + Container( + margin: + const EdgeInsets + .fromLTRB(0, + 3, 10.7, 3), + child: Text( + 'Gujarat Giants', + style: GoogleFonts + .getFont( + 'Roboto', + fontWeight: + FontWeight + .w400, + fontSize: 16, + height: 1.5, + color: const Color( + 0xCC000000), + ), + ), + ), + Container( + margin: + const EdgeInsets + .fromLTRB( + 0, 3, 0, 3), + child: RichText( + text: TextSpan( + text: '30', + style: GoogleFonts + .getFont( + 'Roboto', + fontWeight: + FontWeight + .w600, + fontSize: 14, + height: 1.7, + color: const Color( + 0xCC000000), + ), + children: [ + TextSpan( + text: '*', + style: GoogleFonts + .getFont( + 'Roboto', + fontWeight: + FontWeight + .w600, + fontSize: + 14, + height: 1.3, + color: const Color( + 0xFFF6423A), + ), + ), + ], + ), + ), + ), + ], + ), + ), + ), + ], + ), + ), + Container( + width: 98, + decoration: const BoxDecoration( + border: Border( + left: BorderSide( + color: Color(0x1A000000), + width: 1, + ), + ), + ), + child: Container( + padding: + const EdgeInsets.fromLTRB( + 0, 13.5, 10.5, 13.5), + child: Column( + mainAxisAlignment: + MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.end, + children: [ + Container( + margin: const EdgeInsets + .fromLTRB(0, 0, 0, 5), + child: Text( + 'Empty Raid', + style: + GoogleFonts.getFont( + 'Roboto', + fontWeight: + FontWeight.w400, + fontSize: 12, + height: 1.2, + letterSpacing: 0.2, + color: const Color( + 0xFFA6A9B8), + ), + ), + ), + Container( + margin: const EdgeInsets + .fromLTRB(3, 0, 3, 0), + child: RichText( + text: TextSpan( + text: '33 : 30', + style: + GoogleFonts.getFont( + 'Roboto', + fontWeight: + FontWeight.w600, + fontSize: 16, + height: 1.5, + color: const Color( + 0xCC000000), + ), + children: [ + TextSpan( + text: '*', + style: GoogleFonts + .getFont( + 'Roboto', + fontWeight: + FontWeight + .w600, + fontSize: 16, + height: 1.3, + color: const Color( + 0xFFFF443B), + ), + ), + ], + ), + ), + ), + ], + ), + ), + ), + ], + ), + ), + ], + ), + ), + ), + ], + ), + ), + ), + ), + // + ], + ), + ), + // + ], + ), + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/buttons/buttons.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/buttons/buttons.dart new file mode 100644 index 0000000..0881a4e --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/buttons/buttons.dart @@ -0,0 +1,102 @@ +import 'package:flutter/material.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + home: MyHomePage(), + ); + } +} + +class MyHomePage extends StatefulWidget { + @override + _MyHomePageState createState() => _MyHomePageState(); +} + +class _MyHomePageState extends State { + List> tableTwoData = []; + final List> tableOneData = [ + {'id': '1', 'value': 'Data from Table One - Item 1'}, + {'id': '2', 'value': 'Data from Table One - Item 2'}, + // Add more dummy data as needed + ]; + + void _showInsertDialog() { + showDialog( + context: context, + builder: (context) { + return AlertDialog( + title: Text('Confirm Insert'), + content: Text('Are you sure you want to insert data from Table One to Table Two?'), + actions: [ + TextButton( + onPressed: () { + Navigator.of(context).pop(); + }, + child: Text('Cancel'), + ), + TextButton( + onPressed: () { + _insertDataToTableTwo(); + Navigator.of(context).pop(); + }, + child: Text('Confirm'), + ), + ], + ); + }, + ); + } + + void _insertDataToTableTwo() { + setState(() { + tableTwoData.addAll(tableOneData); + }); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text('Data Transfer Example',style: TextStyle(color: Colors.black,fontSize: 30),), + ), + body: Column( + children: [ + Text("Table one Data",style: TextStyle(color: Colors.black,fontSize: 30),), + Expanded( + child: ListView.builder( + itemCount: tableOneData.length, + itemBuilder: (context, index) { + final item = tableOneData[index]; + return ListTile( + title: Text(item['value'] ?? ''), + ); + }, + ), + ), + Text("Table Two Data",style: TextStyle(color: Colors.black,fontSize: 30),), + ElevatedButton( + onPressed: _showInsertDialog, + child: Text('Insert Data'), + ), + Expanded( + child: ListView.builder( + itemCount: tableTwoData.length, + itemBuilder: (context, index) { + final item = tableTwoData[index]; + return ListTile( + title: Text(item['value'] ?? ''), + ); + }, + ), + ), + ], + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/buttons/update_button.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/buttons/update_button.dart new file mode 100644 index 0000000..d77bd23 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/buttons/update_button.dart @@ -0,0 +1,111 @@ +import 'package:flutter/material.dart'; + +// Simulated API Functions +Future>> fetchTableOneData() async { + await Future.delayed(Duration(seconds: 2)); // Simulate network delay + return [ + {'id': '1', 'value': 'Data from Table One - Item 1'}, + {'id': '2', 'value': 'Data from Table One - Item 2'}, + ]; +} + +Future>> fetchTableTwoData() async { + await Future.delayed(Duration(seconds: 2)); // Simulate network delay + return [ + {'id': '1', 'value': 'Data from Table Two - Item 1'}, + {'id': '2', 'value': 'Data from Table Two - Item 2'}, + ]; +} + +class UpdateTableScreen extends StatefulWidget { + @override + _UpdateTableScreenState createState() => _UpdateTableScreenState(); +} + +class _UpdateTableScreenState extends State { + List> tableOneData = []; + List> tableTwoData = []; + + @override + void initState() { + super.initState(); + _fetchInitialData(); + } + + Future _fetchInitialData() async { + final fetchedTableOneData = await fetchTableOneData(); + final fetchedTableTwoData = await fetchTableTwoData(); + + setState(() { + tableOneData = fetchedTableOneData; + tableTwoData = fetchedTableTwoData; + }); + } + + void _showInsertDialog() { + showDialog( + context: context, + builder: (context) { + return AlertDialog( + title: Text('Confirm Insert'), + content: Text('Are you sure you want to insert data from Table One to Table Two?'), + actions: [ + TextButton( + onPressed: () { + Navigator.of(context).pop(); + }, + child: Text('Cancel'), + ), + TextButton( + onPressed: () { + _insertDataToTableTwo(); + Navigator.of(context).pop(); + }, + child: Text('Confirm'), + ), + ], + ); + }, + ); + } + + void _insertDataToTableTwo() { + setState(() { + tableTwoData.addAll(tableOneData); + }); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text('Update Table Data'), + ), + body: Column( + children: [ + ElevatedButton( + onPressed: _showInsertDialog, + child: Text('Insert Data from Table One to Table Two'), + ), + Expanded( + child: ListView.builder( + itemCount: tableTwoData.length, + itemBuilder: (context, index) { + final item = tableTwoData[index]; + return ListTile( + title: Text(item['value'] ?? ''), + ); + }, + ), + ), + ], + ), + ); + } +} + +void main() { + runApp(MaterialApp( + home: UpdateTableScreen(), + )); +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/checkboxes/create_check.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/checkboxes/create_check.dart new file mode 100644 index 0000000..cf21627 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/checkboxes/create_check.dart @@ -0,0 +1,158 @@ +import 'package:flutter/material.dart'; + +// Simulated API Function +Future>> fetchTableOneData() async { + // final response = await http.get(Uri.parse('https://yourapiurl.com/data')); + // + // if (response.statusCode == 200) { + // List data = json.decode(response.body); + // return data.map((item) => {'id': item['id'].toString(), 'value': item['value'].toString()}).toList(); + // } else { + // throw Exception('Failed to load data'); + // } + await Future.delayed(Duration(seconds: 2)); // Simulate network delay + return [ + {'id': '1', 'value': 'Data from Table One - Item 1'}, + {'id': '2', 'value': 'Data from Table One - Item 2'}, + {'id': '3', 'value': 'Data from Table One - Item 3'}, + {'id': '4', 'value': 'Data from Table One - Item 4'}, + {'id': '5', 'value': 'Data from Table One - Item 5'}, + {'id': '6', 'value': 'Data from Table One - Item 6'}, + {'id': '7', 'value': 'Data from Table One - Item 7'}, + {'id': '8', 'value': 'Data from Table One - Item 8'}, + {'id': '9', 'value': 'Data from Table One - Item 9'}, + ]; +} +class CreateEntityScreen extends StatefulWidget { + @override + _CreateEntityScreenState createState() => _CreateEntityScreenState(); +} + +class _CreateEntityScreenState extends State { + List> tableOneData = []; + Set selectedIds = Set(); + + @override + void initState() { + super.initState(); + _fetchTableOneData(); + } + + Future _fetchTableOneData() async { + final data = await fetchTableOneData(); + setState(() { + tableOneData = data; + }); + } + + void _showSelectionDialog() { + showDialog( + context: context, + builder: (context) { + Set tempSelectedIds = Set.from(selectedIds); + return AlertDialog( + title: const Text('Select Items'), + content: SingleChildScrollView( + child: Column( + children: tableOneData.map((item) { + return StatefulBuilder( + builder: (context, setState) { + return CheckboxListTile( + title: Text(item['value'] ?? ''), + value: tempSelectedIds.contains(item['id']), + onChanged: (bool? selected) { + setState(() { + if (selected == true) { + tempSelectedIds.add(item['id']!); + } else { + tempSelectedIds.remove(item['id']); + } + }); + }, + ); + }, + ); + }).toList(), + ), + ), + actions: [ + TextButton( + onPressed: () { + Navigator.of(context).pop(); + }, + child: Text('Cancel'), + ), + TextButton( + onPressed: () { + setState(() { + selectedIds = tempSelectedIds; + }); + Navigator.of(context).pop(); + }, + child: Text('Confirm'), + ), + ], + ); + }, + ); + } + + Future _submitSelection() async { + // Simulate submitting selected data to the API + await Future.delayed(Duration(seconds: 1)); + // Handle the submission logic here + print("Selected IDs: $selectedIds"); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text('Create Entity'), + ), + body: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + ElevatedButton( + onPressed: _showSelectionDialog, + child: Text('Select Data from Table One'), + ), + if(selectedIds.isEmpty) + Text("No Data selected"), + Column( + children: [ + Text('Selected Items:', style: TextStyle(fontWeight: FontWeight.bold)), + SizedBox( + height: MediaQuery.of(context).size.height*0.5, + child: Container( + height: 100, + child: ListView( + children: tableOneData + .where((item) => selectedIds.contains(item['id'])) + .map((item) => ListTile( + title: Text(item['value'] ?? ''), + )) + .toList(), + ), + ), + ), + ], + ), + ElevatedButton( + onPressed: _submitSelection, + child: Text('Submit'), + ), + ], + ), + ), + ); + } +} + +void main() { + runApp(MaterialApp( + home: CreateEntityScreen(), + )); +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/checkboxes/update_entity.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/checkboxes/update_entity.dart new file mode 100644 index 0000000..f313802 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/checkboxes/update_entity.dart @@ -0,0 +1,145 @@ +import 'package:flutter/material.dart'; + +// Simulated API Function to fetch preselected data +Future> fetchPreselectedData() async { + await Future.delayed(Duration(seconds: 2)); // Simulate network delay + return {'1', '3', '5'}; +} + +// Simulated API Function to fetch all data +Future>> fetchTableOneData() async { + await Future.delayed(Duration(seconds: 2)); // Simulate network delay + return [ + {'id': '1', 'value': 'Data from Table One - Item 1'}, + {'id': '2', 'value': 'Data from Table One - Item 2'}, + {'id': '3', 'value': 'Data from Table One - Item 3'}, + {'id': '4', 'value': 'Data from Table One - Item 4'}, + {'id': '5', 'value': 'Data from Table One - Item 5'}, + {'id': '6', 'value': 'Data from Table One - Item 6'}, + {'id': '7', 'value': 'Data from Table One - Item 7'}, + {'id': '8', 'value': 'Data from Table One - Item 8'}, + {'id': '9', 'value': 'Data from Table One - Item 9'}, + ]; +} + +class EditEntityScreen extends StatefulWidget { + @override + _EditEntityScreenState createState() => _EditEntityScreenState(); +} + +class _EditEntityScreenState extends State { + List> tableOneData = []; + Set selectedIds = Set(); + + @override + void initState() { + super.initState(); + _fetchData(); + } + + Future _fetchData() async { + final data = await fetchTableOneData(); + final preselectedData = await fetchPreselectedData(); + setState(() { + tableOneData = data; + selectedIds = preselectedData; + }); + } + + void _showSelectionDialog() { + showDialog( + context: context, + builder: (context) { + Set tempSelectedIds = Set.from(selectedIds); + return AlertDialog( + title: const Text('Select Items'), + content: SingleChildScrollView( + child: Column( + children: tableOneData.map((item) { + return StatefulBuilder( + builder: (context, setState) { + return CheckboxListTile( + title: Text(item['value'] ?? ''), + value: tempSelectedIds.contains(item['id']), + onChanged: (bool? selected) { + setState(() { + if (selected == true) { + tempSelectedIds.add(item['id']!); + } else { + tempSelectedIds.remove(item['id']); + } + }); + }, + ); + }, + ); + }).toList(), + ), + ), + actions: [ + TextButton( + onPressed: () { + Navigator.of(context).pop(); + }, + child: Text('Cancel'), + ), + TextButton( + onPressed: () { + setState(() { + selectedIds = tempSelectedIds; + }); + Navigator.of(context).pop(); + }, + child: Text('Confirm'), + ), + ], + ); + }, + ); + } + + Future _updateSelection() async { + // Simulate updating selected data to the API + await Future.delayed(Duration(seconds: 1)); + // Handle the update logic here + print("Updated Selected IDs: $selectedIds"); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text('Edit Entity'), + ), + body: Column( + children: [ + ElevatedButton( + onPressed: _showSelectionDialog, + child: Text('Select Data from Table One'), + ), + Expanded( + child: ListView.builder( + itemCount: selectedIds.length, + itemBuilder: (context, index) { + final item = tableOneData[index]; + return ListTile( + title: Text(item['value'] ?? ''), + ); + }, + ), + ), + ElevatedButton( + onPressed: _updateSelection, + child: Text('Update'), + ), + ], + ), + ); + } +} + +void main() { + runApp(MaterialApp( + home: EditEntityScreen(), + )); +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/comphrensive_form.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/comphrensive_form.dart new file mode 100644 index 0000000..c4ca617 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/comphrensive_form.dart @@ -0,0 +1,1147 @@ +import 'dart:io'; + +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:image_picker/image_picker.dart'; +import 'package:multi_select_flutter/multi_select_flutter.dart'; + +import '../../../Reuseable/reusable_date_picker_field.dart'; +import '../../../Reuseable/reusable_date_time_picker_field.dart'; + +class FormPage extends StatefulWidget { + @override + _FormPageState createState() => _FormPageState(); +} + +class _FormPageState extends State { + final _formKey = GlobalKey(); + + String? dropdownValue; + List dropdownMultiValue = []; + List mulSelectedFieldNameValue = []; + String? dropdownDynamicValue; + + List dropdownDynamicMultiValue = []; + final formData = {}; + List tags = []; + List selectedOptions = []; + File? _image; + File? _file; + DateTime? selectedDateTime; + + List isSelected = [true, false, false]; // Initial state + bool isChecked = false; + bool isSubscribed = false; + String? selectedRadio; + + // Static list of options + List checkboxOptions = ['Option 1', 'Option 2', 'Option 3']; + + List staticOptions = ['Option 1', 'Option 2', 'Option 3']; + List dynamicOptions = ['Dynamic Option 1', 'Dynamic Option 2']; + + List selectedFieldNameValue = []; + + Future> _loadFieldNameItems() async { + // Simulate a network call or data loading + await Future.delayed(const Duration(seconds: 2)); + return ['Option 1', 'Option 2', 'Option 3', 'Option 4']; + } + + // Example form data list + final List> formFields = [ + {'fieldname': 'name', 'fieldOption': 'Full Name'}, + {'fieldname': 'email', 'fieldOption': 'Email Address'}, + {'fieldname': 'phone', 'fieldOption': 'Phone Number'}, + ]; + final List> fieldnameList = [ + {}, + ]; + + final ImagePicker _picker = ImagePicker(); + + TextEditingController _dateController = TextEditingController(); + TextEditingController _dateTimeController = TextEditingController(); + + bool _isSwitched = false; + String inputValuefieldname = ''; + String outputValuefieldname = ''; + + void _convertCurrency_fieldname() { + String inputText = inputValuefieldname.replaceAll(',', ''); // Remove commas + try { + double parsedValue = double.parse(inputText); // Parse the value + String formattedValue = + parsedValue.toStringAsFixed(2); // Format to 2 decimal places + setState(() { + outputValuefieldname = formattedValue; + }); + } catch (e) { + setState(() { + outputValuefieldname = "Invalid input"; + }); + } + } + + void _toggleSwitch(bool value) { + setState(() { + _isSwitched = value; + }); + } + + int num1 = 0; + int num2 = 0; + int num3 = 0; + String selectedOperator = '+'; + String result = ''; + + final List operators = ['+', '-', '*', '/']; + + void calculateResult() { + int calculation; + switch (selectedOperator) { + case '+': + calculation = num1 + num2 + num3; + break; + case '-': + calculation = (num1 - num2) - num3; + break; + case '*': + calculation = (num1 * num2) * num3; + break; + case '/': + if (num2 == 0 || num3 == 0) { + result = 'Division by zero error'; + return; + } + calculation = ((num1 / num2) / num3).toInt(); + break; + default: + calculation = 0; + } + setState(() { + result = 'Result: $calculation'; + }); + } + + @override + Widget build(BuildContext context) { + _loadFieldNameItems(); + return SingleChildScrollView( + padding: const EdgeInsets.all(16.0), + child: Form( + key: _formKey, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // multi check box + ListView( + shrinkWrap: true, + children: checkboxOptions.map((option) { + return _buildCheckboxListTile(option); + }).toList(), + ), + const SizedBox(height: 16), + ElevatedButton( + onPressed: () { + // Handle form submission + print('Selected options: $selectedOptions'); + formData['fieldName'] = selectedOptions; + }, + child: const Text("Submit"), + ), + + ListTile( + leading: Checkbox( + value: isSubscribed, + onChanged: (newValue) { + setState(() { + isSubscribed = newValue!; + }); + }, + activeColor: Colors.teal, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(4), + ), + ), + title: const Text( + 'Field Name', + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w500, + color: Colors.black, + ), + ), + ), + const SizedBox(height: 16), + ], + ), + Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const Text( + "Label Field Name", + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w500, + color: Color(0xFF4A4A4A), // BlueGray900 color + ), + ), + const SizedBox(height: 10), + FutureBuilder>( + future: _loadFieldNameItems(), + builder: (context, snapshot) { + if (snapshot.connectionState == ConnectionState.done) { + final fieldNameItems = snapshot.data ?? []; + return Autocomplete( + optionsBuilder: (TextEditingValue textEditingValue) { + if (textEditingValue.text.isEmpty) { + return const Iterable.empty(); + } else { + return fieldNameItems.where((String option) { + return option.toLowerCase().contains( + textEditingValue.text.toLowerCase()); + }); + } + }, + onSelected: (String selection) { + setState(() { + if (selectedFieldNameValue.contains(selection)) { + selectedFieldNameValue.remove(selection); + } else { + selectedFieldNameValue.add(selection); + } + formData['fieldname'] = + selectedFieldNameValue.join(','); + }); + }, + fieldViewBuilder: (BuildContext context, + TextEditingController textEditingController, + FocusNode focusNode, + VoidCallback onFieldSubmitted) { + return TextField( + controller: textEditingController, + focusNode: focusNode, + decoration: InputDecoration( + hintText: "Enter Label Field Name", + filled: true, + fillColor: Colors.grey[200], + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(10), + borderSide: BorderSide.none, + ), + contentPadding: const EdgeInsets.symmetric( + vertical: 15, horizontal: 20), + ), + ); + }, + ); + } else { + return const Center(child: CircularProgressIndicator()); + } + }, + ), + const SizedBox(height: 16), + const Text( + 'Selected Values:', + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.bold, + ), + ), + Wrap( + spacing: 8.0, + children: selectedFieldNameValue.map((value) { + return Chip( + label: Text(value), + deleteIcon: const Icon(Icons.clear), + onDeleted: () { + setState(() { + selectedFieldNameValue.remove(value); + formData['fieldname'] = + selectedFieldNameValue.join(','); + }); + }, + ); + }).toList(), + ), + ], + ), + ), + + const Text( + "ALL Buttons", + style: TextStyle( + color: Colors.black, + fontWeight: FontWeight.bold, + fontSize: 24), + ), + Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + ElevatedButton( + onPressed: () { + // Action when button is pressed + }, + child: const Text('Elevated Button'), + ), + TextButton( + onPressed: () { + // Action when button is pressed + }, + child: const Text('Text Button'), + ), + OutlinedButton( + onPressed: () { + // Action when button is pressed + }, + child: const Text('Outlined Button'), + ), + IconButton( + icon: const Icon(Icons.add), + onPressed: () { + // Action when button is pressed + }, + ), + FloatingActionButton( + onPressed: () { + // Action when button is pressed + }, + child: const Icon(Icons.add), + ), + DropdownButton( + value: 'Option 1', + onChanged: (String? newValue) { + // Action when dropdown value changes + }, + items: ['Option 1', 'Option 2', 'Option 3'] + .map>((String value) { + return DropdownMenuItem( + value: value, + child: Text(value), + ); + }).toList(), + ), + CupertinoButton( + onPressed: () { + // Action when button is pressed + }, + child: const Text('Cupertino Button'), + ), + ToggleButtons( + children: [ + const Icon(Icons.format_bold), + const Icon(Icons.format_italic), + const Icon(Icons.format_underline), + ], + isSelected: isSelected, + onPressed: (int index) { + // Action when button at index is pressed + setState(() { + // Toggle the current state of the button at index + isSelected[index] = !isSelected[index]; + + // Optionally, you can perform an action based on the selected state + if (isSelected[index]) { + print('Button at index $index is selected.'); + } else { + print('Button at index $index is unselected.'); + } + }); + }, + ), + RawMaterialButton( + onPressed: () { + // Action when button is pressed + }, + child: const Text('Raw Material Button'), + ), + ], + ), + + // ReusableTextField( + // // initialValue: widget.entity['fieldname'], + // onSaved: (value) => formData['fieldname'] = value, + // label: "Enter Labelfieldname", + // obscureText: true, + // validator: (value) { + // if (value == null || value.isEmpty) { + // return 'Please enter a password'; + // } + // return null; + // }, + // ), + const SizedBox(height: 16), + // ReusableTextField( + // // initialValue:widget.entity['fieldname'] , + // onSaved: (value) => formData['fieldname'] = value, + // label: "Enter Labelfieldname", + // validator: (value) { + // if (value == null || value.isEmpty) { + // return 'Please enter some text'; + // } + // return null; + // }, + // ), + // ReusableTextField( + // onSaved: (value) => formData['fieldname'] = value, + // label: "Enter Labelfieldname", + // obscureText: true, + // validator: (value) { + // if (value == null || value.isEmpty) { + // return 'Please enter a password'; + // } + // return null; + // }, + // ), + // ReusableTextField( + // //initialValue: widget.entity['fieldname'], + // onSaved: (value) => formData['fieldname'] = value, + // label: "Enter Labelfieldname", + // keyboardType: TextInputType.number, + // inputFormatters: [ + // FilteringTextInputFormatter.allow((RegExp(r'[0-9]'))), + // ], + // validator: (value) { + // if (value == null || value.isEmpty) { + // return 'Please enter a number'; + // } + // return null; + // }, + // ), + // ReusableTextField( + // // initialValue: widget.entity['fieldname'], + // onSaved: (value) => formData['fieldname'] = value, + // label: "Enter Labelfieldname percentage", + // keyboardType: + // const TextInputType.numberWithOptions(decimal: true), + // inputFormatters: [ + // FilteringTextInputFormatter.allow(RegExp(r'^\d+\.?\d{0,2}$')), + // ], + // validator: (value) { + // if (value == null || value.isEmpty) { + // return 'Please enter a percentage'; + // } + // // Validate if the entered value is a valid percentage + // double? parsedValue = double.tryParse(value); + // if (parsedValue == null || + // parsedValue < 0 || + // parsedValue > 100) { + // return 'Please enter a valid percentage'; + // } + // return null; + // }, + // ), + // ReusableDateTimePickerField( + // label: 'Date time', + // controller: _dateTimeController, + // ), + // ReusableDatePickerField(label: 'Date', controller: _dateController), + // ReusableTextField( + // onSaved: (value) => formData['fieldname'] = value, + // label: "Enter Labelfieldname", + // maxLines: 5, + // ), + // ReusableTextField( + // onSaved: (value) => formData['fieldname'] = value, + // label: "Enter Labelfieldname", + // maxLines: 3, + // ), + _buildDropdownField('Dropdown Static', staticOptions, dropdownValue, + (value) { + setState(() { + dropdownValue = value; + }); + }), + Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const Text( + 'Select multiple options:', + style: TextStyle( + fontSize: 18, + fontWeight: FontWeight.bold, + color: Colors.black), + ), + const SizedBox(height: 12), + _buildMultiSelectDropdownField( + 'Dropdown Dynamic Multiselect', + dynamicOptions, + mulSelectedFieldNameValue, + 'dynamicMultiSelect', + (values) { + setState(() { + mulSelectedFieldNameValue = values; + }); + }, + ), + const SizedBox(height: 16), + const Text( + 'Selected Values:', + style: TextStyle( + fontSize: 18, + fontWeight: FontWeight.bold, + color: Colors.black), + ), + const SizedBox(height: 8), + Text( + mulSelectedFieldNameValue.join(', '), + style: + const TextStyle(fontSize: 16, color: Colors.deepPurple), + ), + const SizedBox(height: 16), + ElevatedButton( + onPressed: () { + // Perform form submission or other actions + print('Form Data: $formData'); + }, + child: const Text('Submit'), + ), + const SizedBox(height: 16), + ], + ), + ), + _buildDropdownField( + 'Dropdown Dynamic', dynamicOptions, dropdownDynamicValue, + (value) { + setState(() { + dropdownDynamicValue = value; + }); + }), + // _buildMultiSelectDropdownField('Dropdown Dynamic Multiselect', dynamicOptions, dropdownDynamicMultiValue, (values) { + // setState(() { + // dropdownDynamicMultiValue = values; + // }); + // }), + // ReusableTextField( + // // initialValue: widget.entity['fieldname'], + // onSaved: (value) => formData['fieldname'] = value, + // label: "Enter Labelfieldname", + // maxLines: 5, + // ), + _buildRadioField('Radio'), + _buildCheckboxField('Checkbox'), + // ReusableTextField( + // onSaved: (value) => formData['fieldname'] = value, + // label: "Enter Labelfieldname", + // keyboardType: TextInputType.emailAddress, + // validator: (value) { + // if (value == null || value.isEmpty) { + // return 'Please enter an email'; + // } + // final emailRegExp = + // RegExp(r'^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$'); + // if (!emailRegExp.hasMatch(value)) { + // return 'Please enter a valid email'; + // } + // return null; + // }, + // ), + // ReusableTextField( + // // initialValue: widget.entity['fieldname'], + // onSaved: (value) => formData['fieldname'] = value, + // label: "Enter Labelfieldname", + // keyboardType: TextInputType.number, + // inputFormatters: [ + // FilteringTextInputFormatter.digitsOnly, + // ], + // validator: (value) { + // if (value == null || value.isEmpty) { + // return 'Please enter a number'; + // } + // return null; + // }, + // ), + _buildImageUploadField('Image Upload'), + _buildFileUploadField('File Upload'), + _buildTagsField('Tags', tags), + // ReusableTextField( + // //initialValue: widget.entity['fieldname'], + // onSaved: (value) => formData['fieldname'] = value, + // label: "Enter Labelfieldname", + // keyboardType: TextInputType.url, + // ), + // ReusableTextField( + // //initialValue: widget.entity['fieldname'], + // onSaved: (value) => formData['fieldname'] = value, + // label: "Enter Labelfieldname", + // keyboardType: TextInputType.numberWithOptions(decimal: true), + // inputFormatters: [ + // FilteringTextInputFormatter.allow(RegExp(r'^\d*\.?\d*')), + // ], + // validator: (value) { + // if (value == null || value.isEmpty) { + // return 'Please enter a decimal number'; + // } + // final decimalRegExp = RegExp(r'^\d*\.?\d*$'); + // if (!decimalRegExp.hasMatch(value)) { + // return 'Please enter a valid decimal number'; + // } + // return null; + // }, + // ), + const SizedBox(height: 20), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const SizedBox( + height: 20, + child: Text( + 'Upper Field Name', + style: TextStyle( + fontSize: 18, + fontWeight: FontWeight.bold, + color: Colors.black, + ), + ), + ), + const SizedBox(height: 16), + ...formFields.map((field) => Column( + children: [ + buildTextFormField( + field['fieldname']!, field['fieldOption']!), + const SizedBox(height: 16), + ], + )), + ], + ), + Switch( + value: _isSwitched, + onChanged: _toggleSwitch, + activeColor: Colors.white, + activeTrackColor: Colors.green, + inactiveThumbColor: Colors.white, + inactiveTrackColor: Colors.red, + ), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const Text( + 'Multi-choosable Checkbox', + style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold), + ), + ListView( + shrinkWrap: true, + children: [ + CheckboxListTile( + title: const Text('Option 1'), + value: selectedOptions.contains('Option 1'), + onChanged: (bool? value) { + setState(() { + if (value != null && value) { + selectedOptions.add('Option 1'); + } else { + selectedOptions.remove('Option 1'); + } + }); + }, + ), + CheckboxListTile( + title: const Text('Option 2'), + value: selectedOptions.contains('Option 2'), + onChanged: (bool? value) { + setState(() { + if (value != null && value) { + selectedOptions.add('Option 2'); + } else { + selectedOptions.remove('Option 2'); + } + }); + }, + ), + CheckboxListTile( + title: const Text('Option 3'), + value: selectedOptions.contains('Option 3'), + onChanged: (bool? value) { + setState(() { + if (value != null && value) { + selectedOptions.add('Option 3'); + } else { + selectedOptions.remove('Option 3'); + } + }); + }, + ), + ], + ), + TextFormField( + decoration: const InputDecoration(labelText: 'fieldOption'), + onSaved: (value) { + if (formData['fieldname'] == null) { + formData['fieldname'] = {}; + } + formData['fieldname']['fieldOption'] = value; + }, + ), + const SizedBox(height: 16), + ElevatedButton( + onPressed: () { + formData['fieldName'] = selectedOptions; + }, + child: const Text("Submit")) + ], + ), + const SizedBox(height: 20), + Center( + child: ElevatedButton( + onPressed: () { + if (_formKey.currentState!.validate()) { + ScaffoldMessenger.of(context).showSnackBar( + const SnackBar(content: Text('Processing Data')), + ); + } + }, + child: const Text('Submit'), + ), + ), + const SizedBox( + height: 20, + child: Text( + 'Upper Field Name', + style: TextStyle( + fontSize: 18, + fontWeight: FontWeight.bold, + color: Colors.black, + ), + ), + ), + const SizedBox(height: 16), + TextFormField( + keyboardType: TextInputType.number, + onChanged: (text) { + setState(() { + inputValuefieldname = text; + }); + }, + decoration: const InputDecoration( + labelText: 'Enter Currency Value (with or without commas)', + prefixIcon: Icon(Icons.currency_rupee), + ), + onSaved: (value) { + _convertCurrency_fieldname(); + formData['fieldname'] = outputValuefieldname; + }), + const SizedBox( + height: 20, + child: Text( + 'upperfieldname', + ), + ), + Container( + color: Colors.grey[200], + height: 150, + child: ListView.builder( + shrinkWrap: true, + itemCount: fieldnameList.length, + itemBuilder: (context, index) { + return Padding( + padding: const EdgeInsets.symmetric(vertical: 8.0), + child: Row( + children: [ + SizedBox( + width: MediaQuery.of(context).size.width - 100, + child: TextFormField( + decoration: InputDecoration( + labelText: 'Item ${index + 1} - Field Option', + hintText: 'Enter your data', + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(8.0), + ), + contentPadding: const EdgeInsets.symmetric( + vertical: 12, horizontal: 16), + focusedBorder: OutlineInputBorder( + borderSide: const BorderSide( + color: Colors.blue, width: 2.0), + borderRadius: BorderRadius.circular(8.0), + ), + ), + onSaved: (value) { + if (fieldnameList.length <= index) { + fieldnameList.add({}); + } + fieldnameList[index]['fieldOption'] = value!; + }, + ), + ), + SizedBox( + width: 50, + child: IconButton( + onPressed: () { + setState(() { + fieldnameList.removeAt(index); + }); + }, + icon: const Icon(Icons.delete)), + ), + ], + ), + ); + }, + ), + ), + ElevatedButton( + onPressed: () { + setState(() { + fieldnameList.add({}); + }); + }, + child: const Text('Add Item'), + ), + const SizedBox(height: 20.0), + TextFormField( + keyboardType: TextInputType.number, + decoration: const InputDecoration(labelText: 'Number 1'), + onSaved: (value) => num1 = int.parse(value!), + onChanged: (value) { + num1 = int.parse(value); + print("num1-$num1"); + print("value-$value"); + }, + validator: (value) { + if (value == null || value.isEmpty) { + return 'Please enter a number'; + } + return null; + }, + ), + const SizedBox(height: 8.0), + TextFormField( + keyboardType: TextInputType.number, + decoration: const InputDecoration(labelText: 'Number 2'), + onSaved: (value) => num2 = int.parse(value!), + onChanged: (value) { + num2 = int.parse(value); + print("num2-$num2"); + print("value-$value"); + }, + validator: (value) { + if (value == null || value.isEmpty) { + return 'Please enter a number'; + } + return null; + }, + ), + const SizedBox(height: 8.0), + TextFormField( + keyboardType: TextInputType.number, + decoration: const InputDecoration(labelText: 'Number 3'), + onSaved: (value) => num3 = int.parse(value!), + onChanged: (value) { + num3 = int.parse(value); + print("num3-$num3"); + print("value-$value"); + }, + validator: (value) { + if (value == null || value.isEmpty) { + return 'Please enter a number'; + } + return null; + }, + ), + const SizedBox(height: 8.0), + DropdownButtonFormField( + value: selectedOperator, + items: operators.map((String operator) { + return DropdownMenuItem( + value: operator, + child: Text(operator), + ); + }).toList(), + onChanged: (value) { + setState(() { + selectedOperator = value!; + print(selectedOperator.toString()); + print("value-- $value"); + }); + }, + decoration: const InputDecoration(labelText: 'Operator'), + ), + const SizedBox(height: 20.0), + ElevatedButton( + onPressed: () { + if (_formKey.currentState!.validate()) { + _formKey.currentState?.save(); // Save the form fields + } + calculateResult(); + setState(() {}); + }, + child: const Text('Calculate'), + ), + const SizedBox(height: 20.0), + Text( + result, + style: const TextStyle(color: Colors.black), + ), + ], + ), + ), + ); + } + + Widget buildTextFormField(String fieldName, String fieldOption) { + return TextFormField( + decoration: InputDecoration( + labelText: fieldOption, + hintText: 'Enter your $fieldOption', + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(4.0), + ), + contentPadding: + const EdgeInsets.symmetric(vertical: 12, horizontal: 16), + focusedBorder: OutlineInputBorder( + borderSide: const BorderSide(color: Colors.deepPurple, width: 2.0), + borderRadius: BorderRadius.circular(4.0), + ), + ), + style: const TextStyle( + fontSize: 16, + ), + onSaved: (value) { + if (formData[fieldName] == null) { + formData[fieldName] = {}; + } + formData[fieldName][fieldOption] = value; + }, + ); + } + + Widget _buildDropdownField(String label, List options, String? value, + void Function(String?) onChanged) { + return Padding( + padding: const EdgeInsets.symmetric(vertical: 8.0), + child: DropdownButtonFormField( + decoration: InputDecoration(labelText: label), + value: value, + onChanged: onChanged, + items: options.map>((String value) { + return DropdownMenuItem( + value: value, + child: Text(value), + ); + }).toList(), + ), + ); + } + + Widget _buildMultiSelectDropdownField( + String label, + List options, + List values, + String fieldName, + void Function(List) onChanged, + ) { + return Padding( + padding: const EdgeInsets.symmetric(vertical: 8.0), + child: MultiSelectDialogField( + items: options.map((e) => MultiSelectItem(e, e)).toList(), + listType: MultiSelectListType.CHIP, + initialValue: values, + onConfirm: (selectedValues) { + onChanged(selectedValues); + setState(() { + formData[fieldName] = selectedValues; + }); + }, + decoration: BoxDecoration( + border: Border.all(color: Colors.teal), + borderRadius: BorderRadius.circular(4), + ), + title: Text(label), + ), + ); + } + + Widget _buildRadioField(String label) { + return Padding( + padding: const EdgeInsets.symmetric(vertical: 8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(label), + RadioListTile( + title: const Text('Option 1'), + value: 'Option 1', + groupValue: selectedRadio, + onChanged: (value) { + setState(() { + selectedRadio = value; + }); + }, + ), + RadioListTile( + title: const Text('Option 2'), + value: 'Option 2', + groupValue: selectedRadio, + onChanged: (value) { + setState(() { + selectedRadio = value; + }); + }, + ), + ], + ), + ); + } + + Widget _buildCheckboxListTile(String option) { + return CheckboxListTile( + title: Text(option), + value: selectedOptions.contains(option), + onChanged: (bool? value) { + setState(() { + if (value != null && value) { + selectedOptions.add(option); + } else { + selectedOptions.remove(option); + } + }); + }, + ); + } + + Widget _buildCheckboxField(String label) { + return Padding( + padding: const EdgeInsets.symmetric(vertical: 8.0), + child: CheckboxListTile( + title: Text(label), + value: isChecked, + onChanged: (bool? value) { + if (value != null) { + setState(() { + isChecked = value; + }); + } + }, + ), + ); + } + + Widget _buildImageUploadField(String label) { + return Padding( + padding: const EdgeInsets.symmetric(vertical: 8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(label), + const SizedBox(height: 10), + GestureDetector( + onTap: () async { + final pickedFile = + await _picker.pickImage(source: ImageSource.gallery); + setState(() { + if (pickedFile != null) { + _image = File(pickedFile.path); + } + }); + }, + child: _image == null + ? Container( + height: 150, + width: 150, + decoration: BoxDecoration( + border: Border.all(color: Colors.teal), + borderRadius: BorderRadius.circular(8), + ), + child: const Icon(Icons.add_a_photo, + size: 50, color: Colors.teal), + ) + : Image.file( + _image!, + height: 150, + width: 150, + fit: BoxFit.cover, + ), + ), + ], + ), + ); + } + + Widget _buildFileUploadField(String label) { + return Padding( + padding: const EdgeInsets.symmetric(vertical: 8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(label), + const SizedBox(height: 10), + ElevatedButton.icon( + onPressed: () async { + final pickedFile = + await _picker.pickImage(source: ImageSource.gallery); + setState(() { + if (pickedFile != null) { + _file = File(pickedFile.path); + } + }); + }, + icon: const Icon(Icons.upload_file), + label: const Text('Upload File'), + ), + _file == null + ? Container() + : Text( + _file!.path.split('/').last, + style: const TextStyle(fontSize: 16), + ), + ], + ), + ); + } + + Widget _buildTagsField(String label, List tags) { + return Padding( + padding: const EdgeInsets.symmetric(vertical: 8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(label), + Wrap( + spacing: 8.0, + children: tags.map((tag) => Chip(label: Text(tag))).toList(), + ), + TextField( + onSubmitted: (value) { + setState(() { + tags.add(value); + }); + }, + decoration: const InputDecoration(labelText: 'Add a tag'), + ), + ], + ), + ); + } +} + +void main() { + runApp(FormApp()); +} + +class FormApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + theme: ThemeData( + primarySwatch: Colors.teal, + inputDecorationTheme: const InputDecorationTheme( + border: OutlineInputBorder(), + ), + ), + home: Scaffold( + appBar: AppBar( + title: const Text('Interactive Form'), + ), + body: FormPage(), + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/components/audi_video.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/components/audi_video.dart new file mode 100644 index 0000000..9280771 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/components/audi_video.dart @@ -0,0 +1,158 @@ +import 'package:flutter/material.dart'; +import 'package:video_player/video_player.dart'; +import 'package:chewie/chewie.dart'; +import 'package:just_audio/just_audio.dart'; +import 'package:rxdart/rxdart.dart'; + +void main() { + runApp(MaterialApp( + home: MediaScreen(), + )); +} + +class MediaScreen extends StatefulWidget { + @override + _MediaScreenState createState() => _MediaScreenState(); +} + +class _MediaScreenState extends State { + // Video player variables + late VideoPlayerController _videoPlayerController; + ChewieController? _chewieController; + + // Audio player variables + final AudioPlayer _audioPlayer = AudioPlayer(); + + @override + void initState() { + super.initState(); + // Initialize video player + _videoPlayerController = VideoPlayerController.network( + 'https://www.learningcontainer.com/wp-content/uploads/2020/05/sample-mp4-file.mp4', + ); + _videoPlayerController.initialize().then((_) { + setState(() { + _chewieController = ChewieController( + videoPlayerController: _videoPlayerController, + autoPlay: false, + looping: false, + ); + }); + }); + + // Initialize audio player + _audioPlayer.setUrl('https://www.learningcontainer.com/wp-content/uploads/2020/02/Kalimba.mp3'); + } + + @override + void dispose() { + _videoPlayerController.dispose(); + _chewieController?.dispose(); + _audioPlayer.dispose(); + super.dispose(); + } + + Stream get _durationStream => _audioPlayer.durationStream; + Stream get _positionStream => _audioPlayer.positionStream; + Stream get _progressStream => + Rx.combineLatest2( + _positionStream, + _durationStream, + (position, duration) { + if (duration == null || duration.inMilliseconds == 0) { + return 0.0; + } + return position.inMilliseconds / duration.inMilliseconds; + }, + ); + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar(title: Text("Media Player")), + body: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'Video Player', + style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold), + ), + SizedBox(height: 8), + _chewieController != null && _chewieController!.videoPlayerController.value.isInitialized + ? AspectRatio( + aspectRatio: _videoPlayerController.value.aspectRatio, + child: Chewie(controller: _chewieController!), + ) + : Center(child: CircularProgressIndicator()), + SizedBox(height: 32), + Text( + 'Audio Player', + style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold), + ), + SizedBox(height: 8), + StreamBuilder( + stream: _progressStream, + builder: (context, snapshot) { + final progress = snapshot.data ?? 0.0; + return Column( + children: [ + LinearProgressIndicator( + value: progress, + backgroundColor: Colors.grey[300], + color: Colors.blue, + ), + SizedBox(height: 8), + StreamBuilder( + stream: _durationStream, + builder: (context, snapshot) { + final duration = snapshot.data ?? Duration.zero; + return StreamBuilder( + stream: _positionStream, + builder: (context, snapshot) { + final position = snapshot.data ?? Duration.zero; + final remaining = duration - position; + return Text( + '${position.toString().split('.').first} / ${duration.toString().split('.').first} (${remaining.toString().split('.').first} left)', + style: TextStyle(fontSize: 16), + ); + }, + ); + }, + ), + SizedBox(height: 8), + Row( + children: [ + IconButton( + icon: Icon(Icons.play_arrow), + onPressed: () { + _audioPlayer.play(); + }, + ), + IconButton( + icon: Icon(Icons.pause), + onPressed: () { + _audioPlayer.pause(); + }, + ), + IconButton( + icon: Icon(Icons.stop), + onPressed: () { + _audioPlayer.stop(); + }, + ), + ], + ), + ], + ); + }, + ), + ], + ), + ), + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/components/bar_scanner.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/components/bar_scanner.dart new file mode 100644 index 0000000..737dc73 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/components/bar_scanner.dart @@ -0,0 +1,101 @@ +import 'dart:convert'; +import 'package:flutter/material.dart'; +import 'package:flutter_barcode_scanner/flutter_barcode_scanner.dart'; +import 'package:http/http.dart' as http; + +class BarcodeScannerScreen extends StatefulWidget { + @override + _BarcodeScannerScreenState createState() => _BarcodeScannerScreenState(); +} + +class _BarcodeScannerScreenState extends State { + String scannedBarcode = 'No data'; + late Future> barcodeDataFuture; + TextEditingController barcodeController = TextEditingController(); + Map formData = {}; + + Future scanBarcode() async { + final result = await FlutterBarcodeScanner.scanBarcode( + '#ff6666', // Background color + 'Cancel', // Cancel button text + true, // Show flash icon + ScanMode.BARCODE, // Scan mode (BARCODE) + ); + + if (!mounted) return; + + setState(() { + scannedBarcode = result; + + // Fetch data for the data grid using the scanned barcode value + barcodeDataFuture = fetchData(scannedBarcode); + barcodeDataFuture.then((data) { + if (data is Map) { + final values = data.values.toList(); + if (values.isNotEmpty) { + barcodeController.text = values[1].toString(); + formData['barcode'] = barcodeController.text; + } + } + }); + }); + } + + Future> fetchData(String scannedValue) async { + // Use the scanned value to fetch data for the data grid + final url = 'https://example.com/endpoint/$scannedValue'; + + try { + final response = await http.get(Uri.parse(url)); + + if (response.statusCode >= 200 && response.statusCode <= 209) { + final dynamic jsonData = json.decode(response.body); + return jsonData; + } else { + throw Exception('Failed to load data: ${response.statusCode}'); + } + } catch (e) { + throw Exception('Failed to load data: $e'); + } + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar(title: Text('Barcode Scanner')), + body: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + TextFormField( + readOnly: true, + controller: barcodeController, + decoration: const InputDecoration(labelText: 'LabelBarcode'), + onSaved: (value) => formData['barcode'] = value!, + ), + const SizedBox(height: 16), + const Text( + 'Scanned Barcode:', + style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold), + ), + const SizedBox(height: 10), + Text( + scannedBarcode, + style: const TextStyle(fontSize: 16), + ), + const SizedBox(height: 16), + ElevatedButton.icon( + onPressed: () { + scanBarcode(); // Trigger barcode scanning + }, + icon: const Icon(Icons.camera_alt), // Camera icon + label: const Text('Scan Barcode'), + ), + const SizedBox(height: 16), + ], + ), + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/components/capcha.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/components/capcha.dart new file mode 100644 index 0000000..1bf587a --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/components/capcha.dart @@ -0,0 +1,150 @@ +import 'package:flutter/material.dart'; +import 'dart:math'; + +void main() { + runApp(MaterialApp( + home: CaptchaCheckScreen(), + )); +} + +class CaptchaCheckScreen extends StatefulWidget { + @override + _CaptchaCheckScreenState createState() => _CaptchaCheckScreenState(); +} + +class _CaptchaCheckScreenState extends State { + late String captcha; + TextEditingController _captchaController = TextEditingController(); + final GlobalKey _scaffoldKey = GlobalKey(); + + @override + void initState() { + super.initState(); + generateCaptcha(); + } + + void generateCaptcha() { + final random = Random(); + const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz'; + captcha = String.fromCharCodes(Iterable.generate( + 6, (_) => chars.codeUnitAt(random.nextInt(chars.length)))); + } + + void verifyCaptcha() { + print("Verifying captcha"); + if (_captchaController.text.isEmpty) { + print("captcha is empty"); + showSnackbar('Please enter CAPTCHA', success: false); + } else if (_captchaController.text != captcha) { + print("captcha is not matching"); + showSnackbar('CAPTCHA verification failed', success: false); + } else { + print("captcha is verified"); + showSnackbar('CAPTCHA Verified', success: true); + // Navigate to another screen after verification + // Example navigation to a new screen + Navigator.push( + context, + MaterialPageRoute(builder: (context) => NextScreen()), + ); + } + } + + void showSnackbar(String message, {required bool success}) { + ScaffoldMessenger.of(context).showSnackBar( + SnackBar( + content: Text(message), + backgroundColor: success ? Colors.green : Colors.red, + ), + ); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + key: _scaffoldKey, // Use the GlobalKey + appBar: AppBar( + title: Text('CAPTCHA Check'), + ), + body: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + 'Enter the following CAPTCHA:', + style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold), + ), + SizedBox(height: 16), + Container( + decoration: BoxDecoration( + color: Colors.grey[300], + borderRadius: BorderRadius.circular(10), + boxShadow: [ + BoxShadow( + color: Colors.black.withOpacity(0.3), + spreadRadius: 2, + blurRadius: 5, + offset: Offset(0, 3), + ), + ], + ), + padding: EdgeInsets.symmetric(horizontal: 24, vertical: 12), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + captcha, + style: TextStyle( + fontSize: 28, + fontWeight: FontWeight.bold, + color: Colors.blue, + letterSpacing: 4, + fontFamily: 'Roboto', + decoration: TextDecoration.none, + ), + ), + IconButton( + icon: Icon(Icons.refresh), + onPressed: () { + setState(() { + generateCaptcha(); + }); + }, + ), + ], + ), + ), + SizedBox(height: 24), + TextFormField( + controller: _captchaController, + decoration: InputDecoration( + labelText: 'Enter CAPTCHA', + border: OutlineInputBorder(), + ), + ), + SizedBox(height: 24), + ElevatedButton( + onPressed: verifyCaptcha, + child: Text('Verify CAPTCHA'), + ), + ], + ), + ), + ); + } +} + +class NextScreen extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text('Next Screen'), + ), + body: Center( + child: Text('Next Screen Content'), + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/components/file.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/components/file.dart new file mode 100644 index 0000000..eab408a --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/components/file.dart @@ -0,0 +1,176 @@ +import 'package:flutter/material.dart'; +import 'package:file_picker/file_picker.dart'; +import 'dart:io'; +import 'package:http/http.dart' as http; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + appBar: AppBar(title: Text('File Upload Example')), + body: FileUploadScreen(), + ), + ); + } +} + +class FileUploadScreen extends StatefulWidget { + @override + _FileUploadScreenState createState() => _FileUploadScreenState(); +} + +class _FileUploadScreenState extends State { + List> uploadedFiles = []; + bool isUploading = false; + + Future _pickFiles() async { + try { + FilePickerResult? result = await FilePicker.platform.pickFiles( + allowMultiple: true, + ); + + if (result != null) { + List pickedFiles = result.paths.map((path) => File(path!)).toList(); + for (var file in pickedFiles) { + final bytes = await file.readAsBytes(); + setState(() { + uploadedFiles.add({ + 'fileBytes': bytes, + 'fileName': file.path.split('/').last, + 'filePath': file.path, + }); + }); + } + } + } catch (e) { + print(e); + } + } + + void _removeFile(int index) { + setState(() { + uploadedFiles.removeAt(index); + }); + } + + Future _uploadFiles() async { + setState(() { + isUploading = true; + }); + + for (var file in uploadedFiles) { + await _uploadFile(file); + } + + setState(() { + isUploading = false; + }); + } + + Future _uploadFile(Map file) async { + try { + // Replace with your actual upload endpoint + final uri = Uri.parse('https://example.com/upload'); + final request = http.MultipartRequest('POST', uri) + ..files.add(http.MultipartFile.fromBytes( + 'file', + file['fileBytes'], + filename: file['fileName'], + )); + + final response = await request.send(); + + if (response.statusCode == 200) { + print('File uploaded successfully'); + } else { + print('Failed to upload file: ${response.statusCode}'); + } + } catch (e) { + print('Error uploading file: $e'); + } + } + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'Upload Files', + style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold), + ), + SizedBox(height: 10), + ElevatedButton.icon( + onPressed: _pickFiles, + icon: Icon(Icons.attach_file), + label: Text('Pick Files'), + ), + SizedBox(height: 20), + uploadedFiles.isEmpty + ? Center( + child: Text( + 'No files uploaded yet.', + style: TextStyle(fontSize: 16, color: Colors.grey), + ), + ) + : Expanded( + child: ListView.builder( + itemCount: uploadedFiles.length, + itemBuilder: (context, index) { + return Stack( + children: [ + Padding( + padding: const EdgeInsets.symmetric(vertical: 8.0), + child: Column( + children: [ + Text( + uploadedFiles[index]['fileName'], + style: TextStyle(fontSize: 16), + overflow: TextOverflow.ellipsis, + ), + SizedBox(height: 10), + Text( + uploadedFiles[index]['filePath'], + style: TextStyle(fontSize: 14, color: Colors.grey), + maxLines: 2, + overflow: TextOverflow.ellipsis, + ), + ], + ), + ), + Positioned( + top: 0, + right: 0, + child: IconButton( + icon: Icon(Icons.close, color: Colors.red), + onPressed: () => _removeFile(index), + ), + ), + ], + ); + }, + ), + ), + if (uploadedFiles.isNotEmpty) ...[ + SizedBox(height: 20), + Center( + child: ElevatedButton( + onPressed: isUploading ? null : _uploadFiles, + child: isUploading + ? CircularProgressIndicator() + : Text('Upload Files'), + ), + ), + ], + ], + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/components/image.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/components/image.dart new file mode 100644 index 0000000..4a717a6 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/components/image.dart @@ -0,0 +1,181 @@ +import 'package:flutter/material.dart'; +import 'package:image_picker/image_picker.dart'; +import 'dart:typed_data'; +import 'dart:convert'; +import 'package:http/http.dart' as http; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + appBar: AppBar(title: Text('Image Upload Example')), + body: ImageUploadScreen(), + ), + ); + } +} + +class ImageUploadScreen extends StatefulWidget { + @override + _ImageUploadScreenState createState() => _ImageUploadScreenState(); +} + +class _ImageUploadScreenState extends State { + final ImagePicker _picker = ImagePicker(); + List> uploadedImages = []; + bool isUploading = false; + + Future _pickImage(ImageSource source) async { + try { + final pickedImage = await _picker.pickImage(source: source); + if (pickedImage != null) { + final imageBytes = await pickedImage.readAsBytes(); + setState(() { + uploadedImages.add({ + 'imageBytes': imageBytes, + 'imageFileName': pickedImage.name, + 'imagePath': pickedImage.path, + }); + }); + } + } catch (e) { + print(e); + } + } + + void _removeImage(int index) { + setState(() { + uploadedImages.removeAt(index); + }); + } + + Future _uploadImages() async { + setState(() { + isUploading = true; + }); + + for (var image in uploadedImages) { + await _uploadImage(image); + } + + setState(() { + isUploading = false; + }); + } + + Future _uploadImage(Map image) async { + try { + // Assuming you have an endpoint to upload images + final uri = Uri.parse(''); + final request = http.MultipartRequest('POST', uri) + ..files.add(http.MultipartFile.fromBytes( + 'file', + image['imageBytes'], + filename: image['imageFileName'], + )); + + final response = await request.send(); + + if (response.statusCode == 200) { + print('Image uploaded successfully'); + } else { + print('Failed to upload image: ${response.statusCode}'); + } + } catch (e) { + print('Error uploading image: $e'); + } + } + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'Upload Images', + style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold), + ), + SizedBox(height: 10), + Row( + children: [ + ElevatedButton.icon( + onPressed: () => _pickImage(ImageSource.gallery), + icon: Icon(Icons.photo_library), + label: Text('From Gallery'), + ), + SizedBox(width: 10), + ElevatedButton.icon( + onPressed: () => _pickImage(ImageSource.camera), + icon: Icon(Icons.camera_alt), + label: Text('Take Photo'), + ), + ], + ), + SizedBox(height: 20), + uploadedImages.isEmpty + ? Center( + child: Text( + 'No images uploaded yet.', + style: TextStyle(fontSize: 16, color: Colors.grey), + ), + ) + : Expanded( + child: ListView.builder( + itemCount: uploadedImages.length, + itemBuilder: (context, index) { + return Stack( + children: [ + Padding( + padding: const EdgeInsets.symmetric(vertical: 8.0), + child: Column( + children: [ + Image.memory( + uploadedImages[index]['imageBytes'], + width: double.infinity, + height: 200, + fit: BoxFit.cover, + ), + SizedBox(height: 10), + Text( + uploadedImages[index]['imagePath'], + style: TextStyle(fontSize: 16), + overflow: TextOverflow.ellipsis, + ), + ], + ), + ), + Positioned( + right: 0, + child: IconButton( + icon: Icon(Icons.close, color: Colors.red), + onPressed: () => _removeImage(index), + ), + ), + ], + ); + }, + ), + ), + if (uploadedImages.isNotEmpty) ...[ + SizedBox(height: 20), + Center( + child: ElevatedButton( + onPressed: isUploading ? null : _uploadImages, + child: isUploading + ? CircularProgressIndicator() + : Text('Upload Images'), + ), + ), + ], + ], + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/components/one_to_one.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/components/one_to_one.dart new file mode 100644 index 0000000..594c9a4 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/components/one_to_one.dart @@ -0,0 +1,82 @@ +import 'package:flutter/material.dart'; + +class CustomForm extends StatelessWidget { + final Map formData = {}; + final Map entity = { + 'fieldname' : { + 'fieldOption' : 'hey how are you' + } + }; + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const SizedBox( + height: 20, + child: Text( + 'upperfieldname', + style: TextStyle( + fontSize: 18, + fontWeight: FontWeight.bold, + color: Colors.black, + ), + ), + ), + const SizedBox(height: 16), // Add space between elements + + // Example of fields in the form + buildFormField('fieldOption1'), + buildFormField('fieldOption2'), + buildFormField('fieldOption3'), + buildFormField('fieldOption4'), + buildFormField('fieldOption5'), + ], + ), + ); + } + + Widget buildFormField(String fieldOption) { + return Padding( + padding: const EdgeInsets.only(bottom: 16.0), + child: Card( + elevation: 4, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(8), + ), + child: Padding( + padding: const EdgeInsets.all(12.0), + child: TextFormField( + initialValue:entity['fieldname']['fieldOption'], + decoration: InputDecoration( + labelText: fieldOption, + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(8), + ), + ), + onSaved: (value) { + if (formData['fieldname'] == null) { + formData['fieldname'] = {}; + } + formData['fieldname'][fieldOption] = value; + }, + ), + ), + ), + ); + } +} + +void main() { + runApp(MaterialApp( + home: Scaffold( + appBar: AppBar( + title: const Text('Beautiful Form UI'), + ), + body: CustomForm(), + ), + )); +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/components/qr_and_barcode_Scanners.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/components/qr_and_barcode_Scanners.dart new file mode 100644 index 0000000..c9dc329 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/components/qr_and_barcode_Scanners.dart @@ -0,0 +1,190 @@ +import 'package:flutter/material.dart'; +import 'package:qr_flutter/qr_flutter.dart'; +import 'package:barcode_widget/barcode_widget.dart' as barcode_widget; // Use 'as' prefix +import 'package:qr_code_scanner/qr_code_scanner.dart'; +import 'package:image_picker/image_picker.dart'; +import 'dart:io'; + +class QRBarcodePage extends StatefulWidget { + @override + _QRBarcodePageState createState() => _QRBarcodePageState(); +} + +class _QRBarcodePageState extends State { + final TextEditingController _qrTextController = TextEditingController(); + final TextEditingController _barcodeTextController = TextEditingController(); + final GlobalKey qrKey = GlobalKey(debugLabel: 'QR'); + String qrScanResult = ''; + String barcodeScanResult = ''; + + @override + void dispose() { + _qrTextController.dispose(); + _barcodeTextController.dispose(); + super.dispose(); + } + + void _scanQR() async { + final result = await Navigator.push( + context, + MaterialPageRoute(builder: (context) => QRViewExample()), + ); + if (result != null) { + setState(() { + qrScanResult = result; + }); + } + } + + void _scanBarcode() async { + // Implement barcode scanning functionality here + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text('QR and Barcode Scanner/Creator'), + ), + body: SingleChildScrollView( + padding: EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + TextField( + controller: _qrTextController, + decoration: InputDecoration( + labelText: 'Enter text to generate QR Code', + border: OutlineInputBorder(), + ), + onChanged: (value) { + setState(() {}); + }, + ), + SizedBox(height: 10), + Center( + child: Container( + child: QrImageView( + data: _qrTextController.text, + version: QrVersions.auto, + size: 200.0, + ), + ), + ), + SizedBox(height: 20), + ElevatedButton( + onPressed: _scanQR, + child: Text('Scan QR Code'), + ), + SizedBox(height: 10), + Text('QR Scan Result: $qrScanResult'), + SizedBox(height: 20), + TextField( + controller: _barcodeTextController, + decoration: InputDecoration( + labelText: 'Enter text to generate Barcode', + border: OutlineInputBorder(), + ), + onChanged: (value) { + setState(() {}); + }, + ), + SizedBox(height: 10), + Center( + child: Container( + child: barcode_widget.BarcodeWidget( // Use 'barcode_widget.' prefix + data: _barcodeTextController.text, + barcode: barcode_widget.Barcode.code128(), // Use 'barcode_widget.' prefix + width: 200, + height: 100, + ), + ), + ), + SizedBox(height: 20), + ElevatedButton( + onPressed: _scanBarcode, + child: Text('Scan Barcode'), + ), + SizedBox(height: 10), + Text('Barcode Scan Result: $barcodeScanResult'), + ], + ), + ), + ); + } +} + +class QRViewExample extends StatefulWidget { + @override + State createState() => _QRViewExampleState(); +} + +class _QRViewExampleState extends State { + final GlobalKey qrKey = GlobalKey(debugLabel: 'QR'); + QRViewController? controller; + String qrScanResult = ''; + + @override + void reassemble() { + super.reassemble(); + if (Platform.isAndroid) { + controller?.pauseCamera(); + } else if (Platform.isIOS) { + controller?.resumeCamera(); + } + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text('QR Code Scanner'), + ), + body: Column( + children: [ + Expanded( + flex: 5, + child: QRView( + key: qrKey, + onQRViewCreated: _onQRViewCreated, + ), + ), + Expanded( + flex: 1, + child: Center( + child: (qrScanResult != '') + ? Text('Scan Result: $qrScanResult') + : const Text('Scan a code'), + ), + ) + ], + ), + ); + } + + void _onQRViewCreated(QRViewController controller) { + this.controller = controller; + controller.scannedDataStream.listen((scanData) { + setState(() { + qrScanResult = scanData.code!; + controller.pauseCamera(); + Navigator.pop(context, qrScanResult); + }); + }); + } + + @override + void dispose() { + controller?.dispose(); + super.dispose(); + } +} + +void main() { + runApp(MaterialApp( + theme: ThemeData( + primarySwatch: Colors.teal, + ), + home: QRBarcodePage(), + )); +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/components/qr_scanner.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/components/qr_scanner.dart new file mode 100644 index 0000000..6cdac67 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/components/qr_scanner.dart @@ -0,0 +1,116 @@ +import 'dart:convert'; +import 'package:flutter/material.dart'; +import 'package:flutter_barcode_scanner/flutter_barcode_scanner.dart'; +import 'package:http/http.dart' as http; + +import 'bar_scanner.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + home: BarcodeScannerScreen(), + ); + } +} + +class QRScannerScreen extends StatefulWidget { + @override + _QRScannerScreenState createState() => _QRScannerScreenState(); +} + +class _QRScannerScreenState extends State { + String scannedFieldnameQR = 'No data'; + late Future> fieldnamedataFuture; + TextEditingController fieldnameController = TextEditingController(); + Map formData = {}; + + Future scanFieldnameQRcode() async { + final result = await FlutterBarcodeScanner.scanBarcode( + '#ff6666', // Background color + 'Cancel', // Cancel button text + true, // Show flash icon + ScanMode.QR, // Scan mode (you can change to QR code if needed) + ); + + if (!mounted) return; + + setState(() { + scannedFieldnameQR = result; + + // Fetch data for the data grid using the scanned QR value + fieldnamedataFuture = fieldnamefetchData(scannedFieldnameQR); + fieldnamedataFuture.then((data) { + if (data is Map) { + final values = data.values.toList(); + if (values.isNotEmpty) { + fieldnameController.text = values[1].toString(); + formData['fieldname'] = fieldnameController.text; + } + } + }); + }); + } + + Future> fieldnamefetchData(String scannedValue) async { + // Use the scanned value to fetch data for the data grid + final url = 'https://example.com/endpoint/$scannedValue'; + + try { + final response = await http.get(Uri.parse(url)); + + if (response.statusCode >= 200 && response.statusCode <= 209) { + final dynamic jsonData = json.decode(response.body); + return jsonData; + } else { + throw Exception('Failed to load data: ${response.statusCode}'); + } + } catch (e) { + throw Exception('Failed to load data: $e'); + } + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar(title: Text('QR Code Scanner')), + body: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + TextFormField( + readOnly: true, + controller: fieldnameController, + decoration: const InputDecoration(labelText: 'Labelfieldname'), + onSaved: (value) => formData['fieldname'] = value!, + ), + const SizedBox(height: 16), + const Text( + 'Scanned QR Code:', + style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold), + ), + const SizedBox(height: 10), + Text( + scannedFieldnameQR, + style: const TextStyle(fontSize: 16), + ), + const SizedBox(height: 16), + ElevatedButton.icon( + onPressed: () { + scanFieldnameQRcode(); // Trigger barcode scanning + }, + icon: const Icon(Icons.camera_alt), // Camera icon + label: const Text('Scan QR Code'), + ), + const SizedBox(height: 16), + ], + ), + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/components/reusable_date_picker_field.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/components/reusable_date_picker_field.dart new file mode 100644 index 0000000..2716a3b --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/components/reusable_date_picker_field.dart @@ -0,0 +1,39 @@ +import 'package:flutter/material.dart'; +import 'package:intl/intl.dart'; + +class ReusableDatePickerField extends StatelessWidget { + final String label; + final String? initialDate; + final TextEditingController controller; + + ReusableDatePickerField({ + required this.label, + required this.controller, this.initialDate, + }); + + @override + Widget build(BuildContext context) { + return TextFormField( + initialValue: initialDate, + controller: controller, + decoration: InputDecoration( + labelText: label, + border: OutlineInputBorder(), + contentPadding: EdgeInsets.symmetric(vertical: 16.0, horizontal: 12.0), + suffixIcon: Icon(Icons.calendar_today), + ), + readOnly: true, + onTap: () async { + DateTime? selectedDate = await showDatePicker( + context: context, + initialDate: DateTime.now(), + firstDate: DateTime(2000), + lastDate: DateTime(2101), + ); + if (selectedDate != null) { + controller.text = DateFormat('yyyy-MM-dd').format(selectedDate); + } + }, + ); + } +} \ No newline at end of file diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/components/reusable_date_time_picker_field.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/components/reusable_date_time_picker_field.dart new file mode 100644 index 0000000..a30abab --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/components/reusable_date_time_picker_field.dart @@ -0,0 +1,67 @@ +import 'package:flutter/material.dart'; +import 'package:intl/intl.dart'; + +class ReusableDateTimePickerField extends StatelessWidget { + final String label; + final String? initialDateTime; + final TextEditingController controller; + + ReusableDateTimePickerField({ + required this.label, + required this.controller, this.initialDateTime, + }); + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.symmetric(vertical: 8.0), + child: TextFormField( + initialValue: initialDateTime, + controller: controller, + decoration: InputDecoration( + labelText: label, + border: const OutlineInputBorder(), + contentPadding: const EdgeInsets.symmetric(vertical: 16.0, horizontal: 12.0), + suffixIcon: const Icon(Icons.event), + ), + readOnly: true, + onTap: () async { + DateTime? selectedDateTime = await showDateTimePicker( + context: context, + initialDateTime: DateTime.now(), + ); + if (selectedDateTime != null) { + controller.text = DateFormat('yyyy-MM-dd HH:mm').format(selectedDateTime); + } + }, + ), + ); + } + + Future showDateTimePicker({ + required BuildContext context, + required DateTime initialDateTime, + }) async { + // Custom date-time picker implementation or package usage + // This is a placeholder for demonstration purposes. + return await showDatePicker( + context: context, + initialDate: initialDateTime, + firstDate: DateTime(2000), + lastDate: DateTime(2101), + ).then((date) { + if (date != null) { + return showTimePicker( + context: context, + initialTime: TimeOfDay.fromDateTime(initialDateTime), + ).then((time) { + if (time != null) { + return DateTime(date.year, date.month, date.day, time.hour, time.minute); + } + return date; + }); + } + return null; + }); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/components/reusable_dropdown_field.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/components/reusable_dropdown_field.dart new file mode 100644 index 0000000..c4daf87 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/components/reusable_dropdown_field.dart @@ -0,0 +1,38 @@ +import 'package:flutter/material.dart'; + +class ReusableDropdownField extends StatelessWidget { + final String label; + final String? selectedValue; + final List items; + final ValueChanged onChanged; + + ReusableDropdownField({ + required this.label, + required this.selectedValue, + required this.items, + required this.onChanged, + }); + + @override + Widget build(BuildContext context) { + return DropdownButtonFormField( + decoration: InputDecoration( + labelText: label, + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(12.0), + ), + contentPadding: EdgeInsets.symmetric(vertical: 16.0, horizontal: 12.0), + filled: true, + fillColor: Colors.white, + ), + value: selectedValue, + items: items.map((String value) { + return DropdownMenuItem( + value: value, + child: Text(value), + ); + }).toList(), + onChanged: onChanged, + ); + } +} \ No newline at end of file diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/data_grid/data_grid.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/data_grid/data_grid.dart new file mode 100644 index 0000000..dbd7e65 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/data_grid/data_grid.dart @@ -0,0 +1,114 @@ +import 'package:flutter/material.dart'; +import 'package:http/http.dart' as http; +import 'dart:convert'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + appBar: AppBar(title: const Text('Dynamic Data Grid')), + body: DataGrid(), + ), + ); + } +} + +class DataGrid extends StatefulWidget { + @override + _DataGridState createState() => _DataGridState(); +} + +class _DataGridState extends State { + late Future>> _dataFuture; + + @override + void initState() { + super.initState(); + _dataFuture = fetchData(); + } + + Future>> fetchData() async { + final url = 'https://api.example.com/data'; // Replace with your actual API endpoint + final token = 'your_api_token'; // Replace with your token fetching logic if needed + + // try { + // final response = await http.get( + // Uri.parse(url), + // headers: { + // 'Authorization': 'Bearer $token', + // }, + // ); + // + // if (response.statusCode >= 200 && response.statusCode <= 209) { + // final List jsonData = json.decode(response.body); + // return jsonData.cast>(); + // } else { + // throw Exception('Failed to load data: ${response.statusCode}'); + // } + // } catch (e) { + // throw Exception('Failed to load data: $e'); + // } + + // Dummy data for testing + List> dummyData = [ + {"Name": "Alice", "Age": 25, "City": "New York"}, + {"Name": "Bob", "Age": 30, "City": "San Francisco"}, + {"Name": "Charlie", "Age": 35, "City": "Chicago"}, + {"Name": "David", "Age": 40, "City": "Los Angeles"}, + {"Name": "Eve", "Age": 45, "City": "Houston"} + ]; + return dummyData; + } + + @override + Widget build(BuildContext context) { + return FutureBuilder>>( + future: _dataFuture, + builder: (context, snapshot) { + if (snapshot.connectionState == ConnectionState.waiting) { + return const Center(child: CircularProgressIndicator()); + } else if (snapshot.hasError) { + return Center(child: Text('Error: ${snapshot.error}')); + } else if (!snapshot.hasData || snapshot.data!.isEmpty) { + return const Center(child: Text('No data available..')); + } else { + final keys = snapshot.data!.first.keys.toList(); + + return SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: DataTable( + columnSpacing: 30, + headingRowColor: MaterialStateColor.resolveWith((states) => Colors.blue.shade100), + dataRowColor: MaterialStateColor.resolveWith((states) => Colors.white), + dividerThickness: 0.5, + columns: keys.map( + (key) => DataColumn( + label: Text( + key, + style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 16), + ), + ), + ) + .toList(), + rows: snapshot.data!.map((item) { + return DataRow(cells: keys.map((key) { + return DataCell( + Text( + item[key].toString(), + style: const TextStyle(fontSize: 14), + ), + ); + }).toList()); + }).toList(), + ), + ); + } + }, + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/dependent_dropdown/api_service.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/dependent_dropdown/api_service.dart new file mode 100644 index 0000000..5cb8267 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/dependent_dropdown/api_service.dart @@ -0,0 +1,15 @@ +import 'package:dio/dio.dart'; + +class DependentDropdownService { + Dio dio = Dio(); + + Future> fetchDropdownData(String url) async { + try { + Response response = await dio.get(url); + return response.data; + } on DioException catch (e) { + print('Error fetching dropdown data: ${e.message}'); + rethrow; + } + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/dependent_dropdown/multi_dependnt_dropdown.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/dependent_dropdown/multi_dependnt_dropdown.dart new file mode 100644 index 0000000..c638242 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/dependent_dropdown/multi_dependnt_dropdown.dart @@ -0,0 +1,145 @@ +import 'package:flutter/material.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + appBar: AppBar(title: Text('Dynamic Dependent Dropdowns')), + body: DependentDropdowns(), + ), + ); + } +} + +class DependentDropdowns extends StatefulWidget { + @override + _DependentDropdownsState createState() => _DependentDropdownsState(); +} + +class _DependentDropdownsState extends State { + Map dropdownData = { + "USA": { + "California": [ + {"Los Angeles": ["a", "b"]}, + {"San Francisco": ["c", "d"]} + ], + "Texas": [ + {"Houston": ["f", "g"]}, + {"Dallas": ["j", "l"]} + ], + }, + "India": { + "Maharashtra": [ + {"Mumbai": ["a", "b"]}, + {"Pune": ["c", "d"]} + ], + "Karnataka": [ + {"Bangalore": ["f", "g"]}, + {"Mysore": ["j", "l"]} + ], + }, + }; + + List selectedValues = []; + List dropdownLabels = ["Country", "State", "District", "Sub-district"]; + + @override + void initState() { + super.initState(); + _fetchDropdownData(); + } + + void _fetchDropdownData() async { + try { + // Fetch data from API if needed + // dropdownData = await DependentDropdownService().fetchDropdownData('https://api.example.com/dropdownData'); + + setState(() { + selectedValues = List.filled(dropdownLabels.length, null); + }); + } catch (e) { + print('Failed to fetch dropdown data: $e'); + } + } + + void _onDropdownChanged(int index, String? newValue) { + setState(() { + selectedValues[index] = newValue; + for (int i = index + 1; i < selectedValues.length; i++) { + selectedValues[i] = null; + } + }); + } + + List> _getDropdownItems(int index) { + List items = []; + switch (index) { + case 0: + items = dropdownData.keys.toList(); + break; + case 1: + items = dropdownData[selectedValues[0]]?.keys.toList() ?? []; + break; + case 2: + items = _getNestedItems(dropdownData[selectedValues[0]]?[selectedValues[1]]) ?? []; + break; + case 3: + items = _getDeepNestedItems(dropdownData[selectedValues[0]]?[selectedValues[1]], selectedValues[2]) ?? []; + break; + } + return items.map((item) => DropdownMenuItem(value: item, child: Text(item))).toList(); + } + + List? _getNestedItems(dynamic data) { + if (data is List) { + return data.map((e) => (e as Map).keys.first).toList(); + } + return []; + } + + List? _getDeepNestedItems(dynamic data, String? selectedItem) { + if (data is List) { + for (var item in data) { + if (item.keys.first == selectedItem) { + return List.from(item[selectedItem]); + } + } + } + return []; + } + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + children: List.generate(dropdownLabels.length, (index) { + return Padding( + padding: const EdgeInsets.symmetric(vertical: 8.0), + child: Card( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)), + elevation: 4, + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 8.0), + child: DropdownButtonHideUnderline( + child: DropdownButton( + value: selectedValues[index], + hint: Text("Select ${dropdownLabels[index]}"), + onChanged: (newValue) => _onDropdownChanged(index, newValue), + items: _getDropdownItems(index), + isExpanded: true, + ), + ), + ), + ), + ); + }), + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/payments/approval_screen.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/payments/approval_screen.dart new file mode 100644 index 0000000..b9414b2 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/payments/approval_screen.dart @@ -0,0 +1,72 @@ +import 'package:flutter/material.dart'; +import 'package:google_fonts/google_fonts.dart'; +import 'package:lottie/lottie.dart'; + +class ApprovalScreen extends StatefulWidget { + const ApprovalScreen({super.key}); + + @override + State createState() => _ApprovalScreenState(); +} + +class _ApprovalScreenState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar(), + body: Column( + children: [ + Center( + child: SizedBox( + height: MediaQuery.of(context).size.height*0.2, + child: LottieBuilder.network('https://lottie.host/87ee095f-c45e-4171-afc6-c2dd90def749/FdaBGpEjHs.json',repeat: false,frameRate: FrameRate(120),), + ), + ), + Text("Successfull!",style: GoogleFonts.getFont('Lato',color: Colors.black,fontSize: 26,fontWeight: FontWeight.bold),), + Text("Transaction successful of \$340",style: GoogleFonts.getFont('Lato',color: Colors.grey,fontSize: 18,fontWeight: FontWeight.w500),), + SizedBox(height: 30,), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 10.0), + child: Divider(color: Colors.grey,thickness: 0.5,), + ), + ListTile( + leading: Text("Transaction Number",style:GoogleFonts.getFont('Lato',color: Colors.grey,fontSize: 16,fontWeight: FontWeight.w400),), + trailing: Text("123 456 789",style:GoogleFonts.getFont('Lato',color: Colors.black,fontSize: 16,fontWeight: FontWeight.bold),), + ), + ListTile( + leading: Text("Date",style:GoogleFonts.getFont('Lato',color: Colors.grey,fontSize: 16,fontWeight: FontWeight.w400),), + trailing: Text("20 May 2023 | 10:09",style:GoogleFonts.getFont('Lato',color: Colors.black,fontSize: 16,fontWeight: FontWeight.bold),), + ), + ListTile( + leading: Text("Status",style:GoogleFonts.getFont('Lato',color: Colors.grey,fontSize: 16,fontWeight: FontWeight.w400),), + trailing: IntrinsicWidth( + child: Container( + decoration: BoxDecoration( + color: Colors.greenAccent.withOpacity(0.3), + borderRadius: BorderRadius.circular(18) + ), + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 12.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + const Icon(Icons.check,color: Colors.green,), + Text("success",style:GoogleFonts.getFont('Lato',color: Colors.greenAccent.shade700,fontSize: 16,fontWeight: FontWeight.bold),), + ], + ), + )), + ), + ), + ListTile( + leading: Text("Type of Transaction",style:GoogleFonts.getFont('Lato',color: Colors.grey,fontSize: 16,fontWeight: FontWeight.w400),), + trailing: Text("Credit card",style:GoogleFonts.getFont('Lato',color: Colors.black,fontSize: 16,fontWeight: FontWeight.bold),), + ), + ListTile( + leading: Text("Total",style:GoogleFonts.getFont('Lato',color: Colors.grey,fontSize: 16,fontWeight: FontWeight.w400),), + trailing: Text("\$340",style:GoogleFonts.getFont('Lato',color: Colors.black,fontSize: 16,fontWeight: FontWeight.bold),), + ), + ], + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/payments/payments.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/payments/payments.dart new file mode 100644 index 0000000..0652225 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/payments/payments.dart @@ -0,0 +1,240 @@ + +import 'package:flutter/material.dart'; + +import 'approval_screen.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + theme: ThemeData( + primaryColor: Colors.blue, + hintColor: Colors.blueAccent, + fontFamily: 'Roboto', + ), + initialRoute: '/approval', + routes: { + '/': (context) => PaymentMethodSelectionScreen(), + '/cardDetails': (context) => const PaymentDetailsScreen(paymentMethod: PaymentMethod.Card), + '/bankUpiDetails': (context) => const PaymentDetailsScreen(paymentMethod: PaymentMethod.BankUPI), + '/codConfirmation': (context) => const PaymentDetailsScreen(paymentMethod: PaymentMethod.COD), + '/approval': (context) => const ApprovalScreen(), + }, + ); + } +} + +enum PaymentMethod { + Card, + BankUPI, + COD, +} + +class PaymentMethodSelectionScreen extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: const Text('Select Payment Method'), + ), + body: Padding( + padding: const EdgeInsets.all(16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const SizedBox(height: 20), + PaymentOptionTile( + icon: Icons.credit_card, + title: 'Credit/Debit Card', + onTap: () { + Navigator.pushNamed(context, '/cardDetails'); + }, + ), + PaymentOptionTile( + icon: Icons.account_balance, + title: 'Bank Account / UPI', + onTap: () { + Navigator.pushNamed(context, '/bankUpiDetails'); + }, + ), + PaymentOptionTile( + icon: Icons.money, + title: 'Cash on Delivery', + onTap: () { + Navigator.pushNamed(context, '/codConfirmation'); + }, + ), + ], + ), + ), + ); + } +} + +class PaymentOptionTile extends StatelessWidget { + final IconData icon; + final String title; + final VoidCallback onTap; + + const PaymentOptionTile({super.key, + required this.icon, + required this.title, + required this.onTap, + }); + + @override + Widget build(BuildContext context) { + return Card( + elevation: 4, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10), + ), + margin: const EdgeInsets.symmetric(vertical: 8), + child: ListTile( + leading: Icon(icon, size: 20, color: Theme.of(context).primaryColor), + title: Text(title, style: const TextStyle(fontSize: 18)), + onTap: onTap, + ), + ); + } +} + +class PaymentDetailsScreen extends StatefulWidget { + final PaymentMethod paymentMethod; + + const PaymentDetailsScreen({Key? key, required this.paymentMethod}) : super(key: key); + + @override + _PaymentDetailsScreenState createState() => _PaymentDetailsScreenState(); +} + +class _PaymentDetailsScreenState extends State { + late TextEditingController _controller1; + late TextEditingController _controller2; + + @override + void initState() { + super.initState(); + _controller1 = TextEditingController(); + _controller2 = TextEditingController(); + } + + @override + void dispose() { + _controller1.dispose(); + _controller2.dispose(); + super.dispose(); + } + + void _submitForm() { + // Implement form submission logic based on payment method + switch (widget.paymentMethod) { + case PaymentMethod.Card: + // Process card details (_controller1.text, _controller2.text) + break; + case PaymentMethod.BankUPI: + // Process bank/UPI details (_controller1.text, _controller2.text) + break; + case PaymentMethod.COD: + // Process COD confirmation + break; + } + // Navigate back or proceed further + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text(_getTitle()), + ), + body: Padding( + padding: const EdgeInsets.all(16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _getDescription(), + style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold), + ), + const SizedBox(height: 20), + TextFormField( + controller: _controller1, + decoration: InputDecoration( + labelText: _getFieldLabel1(), + border: const OutlineInputBorder(), + ), + ), + const SizedBox(height: 20), + TextFormField( + controller: _controller2, + decoration: InputDecoration( + labelText: _getFieldLabel2(), + border: const OutlineInputBorder(), + ), + ), + const SizedBox(height: 30), + ElevatedButton( + onPressed: _submitForm, + child: const Text('Submit'), + style: ElevatedButton.styleFrom( + padding: const EdgeInsets.symmetric(horizontal: 50, vertical: 12), backgroundColor: Theme.of(context).hintColor, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(8), + ), + ), + ), + ], + ), + ), + ); + } + + String _getTitle() { + switch (widget.paymentMethod) { + case PaymentMethod.Card: + return 'Enter Card Details'; + case PaymentMethod.BankUPI: + return 'Enter Bank Account / UPI Details'; + case PaymentMethod.COD: + return 'Confirm Cash on Delivery'; + } + } + + String _getDescription() { + switch (widget.paymentMethod) { + case PaymentMethod.Card: + return 'Please enter your card details:'; + case PaymentMethod.BankUPI: + return 'Please enter your bank account or UPI details:'; + case PaymentMethod.COD: + return 'Confirm your cash on delivery:'; + } + } + + String _getFieldLabel1() { + switch (widget.paymentMethod) { + case PaymentMethod.Card: + return 'Card Number'; + case PaymentMethod.BankUPI: + return 'Account Number / UPI ID'; + case PaymentMethod.COD: + return 'COD Confirmation'; + } + } + + String _getFieldLabel2() { + switch (widget.paymentMethod) { + case PaymentMethod.Card: + return 'Expiry Date'; + case PaymentMethod.BankUPI: + return 'IFSC Code (if applicable)'; + case PaymentMethod.COD: + return 'Agree to pay on delivery'; + } + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/testin/file_upload.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/testin/file_upload.dart new file mode 100644 index 0000000..a79f1f1 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/testin/file_upload.dart @@ -0,0 +1,149 @@ +import 'package:flutter/material.dart'; +import 'package:fluttertoast/fluttertoast.dart'; +import 'package:image_picker/image_picker.dart'; +import 'dart:typed_data'; + +class ImageUploadWidget extends StatefulWidget { + @override + _ImageUploadWidgetState createState() => _ImageUploadWidgetState(); +} + +class _ImageUploadWidgetState extends State { + List> selectedImages = []; + + Future _pickImage(Map newImage, StateSetter setState) async { + final picker = ImagePicker(); + final XFile? pickedImage = await picker.pickImage(source: ImageSource.gallery); + + if (pickedImage != null) { + Uint8List imageBytes = await pickedImage.readAsBytes(); + setState(() { + newImage['imageBytes'] = imageBytes; + newImage['imageFileName'] = pickedImage.name; + }); + Fluttertoast.showToast( + msg: 'Image uploaded', + backgroundColor: Colors.green, + gravity: ToastGravity.TOP, + timeInSecForIosWeb: 5, + ); + } else { + print("No image selected"); + } + } + + Widget _buildUploadRow(Map newImage) { + return StatefulBuilder(builder: (context, setState) { + String? selectedFileName = newImage['imageFileName']; + Uint8List? imageBytes = newImage['imageBytes']; + return Card( + margin: const EdgeInsets.symmetric(vertical: 8.0), + child: ListTile( + leading: imageBytes != null + ? Image.memory(imageBytes, width: 50, height: 50, fit: BoxFit.cover) + : Icon(Icons.image, color: Colors.blueAccent), + title: Text(selectedFileName ?? 'No image selected', style: TextStyle(color: Colors.grey[700])), + trailing: ElevatedButton( + onPressed: () => _pickImage(newImage, setState), + child: const Text('Select Image'), + ), + ), + ); + }); + } + + void _addUploadRow() { + Map newImage = {}; + setState(() { + selectedImages.add(newImage); + }); + } + + void _removeUploadRow(int index) { + setState(() { + selectedImages.removeAt(index); + }); + } + + Future _uploadImages() async { + for (var selectedImage in selectedImages) { + // Replace this with your actual API call + await apiService.uploadImage( + 'your-token-here', + 'your-created-entity-id-here', + 'table_name', + selectedImage['imageFileName'], + selectedImage['imageBytes'], + ); + } + } + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + children: [ + Expanded( + child: ListView.builder( + itemCount: selectedImages.length, + itemBuilder: (context, index) { + return Stack( + children: [ + _buildUploadRow(selectedImages[index]), + Positioned( + right: 8, + top: 8, + child: IconButton( + icon: const Icon(Icons.remove_circle, color: Colors.redAccent), + onPressed: () { + _removeUploadRow(index); + }, + ), + ), + ], + ); + }, + ), + ), + const SizedBox(height: 16), + ElevatedButton.icon( + icon: const Icon(Icons.add), + label: const Text('Add Image Upload Row'), + onPressed: _addUploadRow, + style: ElevatedButton.styleFrom( + foregroundColor: Colors.white, backgroundColor: Colors.blueAccent, + padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 12), + textStyle: const TextStyle(fontSize: 16), + ), + ), + const SizedBox(height: 16), + ElevatedButton( + onPressed: _uploadImages, + child: const Text('Upload Images'), + style: ElevatedButton.styleFrom( + foregroundColor: Colors.white, backgroundColor: Colors.green, + padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 12), + textStyle: const TextStyle(fontSize: 16), + ), + ), + ], + ), + ); + } +} + +class apiService { + static Future uploadImage(String token, String id, String tableName, String fileName, Uint8List? imageBytes) async { + // Your API upload logic here + } +} + +void main() { + runApp(MaterialApp( + home: Scaffold( + appBar: AppBar(title: const Text('Image Upload Example')), + body: ImageUploadWidget(), + ), + )); +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/value_list/value_list.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/value_list/value_list.dart new file mode 100644 index 0000000..14a757f --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/new_work/value_list/value_list.dart @@ -0,0 +1,189 @@ +import 'dart:convert'; + +import 'package:flutter/material.dart'; +import 'package:http/http.dart' as http; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + theme: ThemeData( + primaryColor: Colors.blue, + fontFamily: 'Roboto', + ), + home: Scaffold( + appBar: AppBar( + title: const Text('Dynamic Value List'), + ), + body: FutureBuilder>( + future: fetchDataFromAPI(), // Replace with your API call + builder: (context, snapshot) { + if (snapshot.connectionState == ConnectionState.waiting) { + return const Center(child: CircularProgressIndicator()); + } else if (snapshot.hasError) { + return Center(child: Text('Error: ${snapshot.error}')); + } else if (!snapshot.hasData || snapshot.data!.isEmpty) { + return const Center(child: Text('No data available.')); + } else { + return ListView.builder( + itemCount: snapshot.data!.length, + itemBuilder: (context, index) { + return DataItemTile(data: snapshot.data![index]); + }, + ); + } + }, + ), + ), + ); + } +} + +Future> fetchDataFromAPI() async { + const url = 'https://jsonplaceholder.typicode.com/users'; // Example API endpoint + final response = await http.get(Uri.parse(url)); + + if (response.statusCode == 200) { + final List jsonData = json.decode(response.body); + return jsonData.map((item) => DataItem.fromJson(item)).toList(); + } else { + throw Exception('Failed to load data'); + } +} + +// data model +class DataItem { + int id; + String name; + String email; + String phone; + + DataItem({ + required this.id, + required this.name, + required this.email, + required this.phone, + }); + + factory DataItem.fromJson(Map json) { + return DataItem( + id: json['id'], + name: json['name'], + email: json['email'], + phone: json['phone'], + ); + } +} + +class DataItemTile extends StatelessWidget { + final DataItem data; + + const DataItemTile({required this.data}); + + @override + Widget build(BuildContext context) { + return Card( + elevation: 4, + margin: const EdgeInsets.symmetric(vertical: 8, horizontal: 16), + child: ListTile( + title: Text(data.name), + subtitle: Text(data.email), + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => DataDetailsScreen(data: data), + ), + ); + }, + ), + ); + } +} + +class DataDetailsScreen extends StatefulWidget { + final DataItem data; + + DataDetailsScreen({required this.data}); + + @override + _DataDetailsScreenState createState() => _DataDetailsScreenState(); +} + +class _DataDetailsScreenState extends State { + late TextEditingController _nameController; + late TextEditingController _emailController; + late TextEditingController _phoneController; + + @override + void initState() { + super.initState(); + _nameController = TextEditingController(text: widget.data.name); + _emailController = TextEditingController(text: widget.data.email); + _phoneController = TextEditingController(text: widget.data.phone); + } + + @override + void dispose() { + _nameController.dispose(); + _emailController.dispose(); + _phoneController.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text('Details'), + ), + body: Padding( + padding: EdgeInsets.all(16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + TextFormField( + controller: _nameController, + decoration: InputDecoration( + labelText: 'Name', + border: OutlineInputBorder(), + ), + ), + SizedBox(height: 20), + TextFormField( + controller: _emailController, + decoration: InputDecoration( + labelText: 'Email', + border: OutlineInputBorder(), + ), + ), + SizedBox(height: 20), + TextFormField( + controller: _phoneController, + decoration: InputDecoration( + labelText: 'Phone', + border: OutlineInputBorder(), + ), + ), + SizedBox(height: 20), + ElevatedButton( + onPressed: () { + // Save changes logic here + widget.data.name = _nameController.text; + widget.data.email = _emailController.text; + widget.data.phone = _phoneController.text; + Navigator.pop(context); + // Implement API call to update data + }, + child: Text('Save'), + ), + ], + ), + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/profile_screen/activity.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/profile_screen/activity.dart new file mode 100644 index 0000000..32bc3c4 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/profile_screen/activity.dart @@ -0,0 +1,590 @@ + +import 'package:base_project/core/app_export.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg_provider/flutter_svg_provider.dart' as fs; +import '../../../core/utils/image_constant.dart'; +import '../../../theme/custom_text_style.dart'; +import '../../../theme/theme_helper.dart'; +import '../../../widgets/app_bar/appbar_leading_iconbutton.dart'; +import '../../../widgets/app_bar/appbar_title.dart'; +import '../../../widgets/custom_floating_button.dart'; +import '../../../widgets/custom_icon_button.dart'; +import '../../../widgets/custom_image_view.dart'; +import '../../ReuseableWidgets/BottomAppBarWidget.dart'; +import '../../profileManagement/profile_settings_f.dart'; +import 'custom_app_bar.dart'; + +// ignore: camel_case_types +class ActivityScreen extends StatelessWidget { + ActivityScreen(this.userData, {Key? key}) + : super( + key: key, + ); + Map userData = {}; + + @override + Widget build(BuildContext context) { + return SafeArea( + child: Scaffold( + appBar: _buildAppBar(context), + body: Container( + width: double.maxFinite, + padding: EdgeInsets.symmetric( + horizontal: 20.h, + vertical: 22.v, + ), + child: Column( + children: [ + Padding( + padding: EdgeInsets.only( + top: 5.v, + bottom: 9.v, + ), + child: CustomIconButton( + height: 32.adaptSize, + width: 32.adaptSize, + // padding: EdgeInsets.all(3.h), + decoration: IconButtonStyleHelper.outlineIndigo, + onTap: () { + onTapBtnArrowleftone(context); + }, + child: CustomImageView( + svgPath: ImageConstant.imgArrowleft, + height: 32.adaptSize, + width: 32.adaptSize, + ), + ), + ), + Stack( + children: [ + CustomImageView( + imagePath: ImageConstant.imgWhatsappImage20230313, + height: 100.adaptSize, + width: 100.adaptSize, + radius: BorderRadius.circular( + 50.h, + ), + ), + Positioned( + right: 0, + bottom: 0, + child: CustomIconButton( + height: 32.adaptSize, + width: 32.adaptSize, + alignment: Alignment.centerRight, + onTap: () { + onTapBtnEdit(context); + }, + padding_f: EdgeInsets.all(8.h), + // decoration: IconButtonStyleHelper.fillPrimary, + child: CustomImageView( + imagePath: ImageConstant.editIcon, + height: 28.adaptSize, + width: 28.adaptSize, + ), + ), + ), + ], + ), + Padding( + padding: EdgeInsets.only(right: 141.h), + child: CustomIconButton( + height: 32.adaptSize, + width: 32.adaptSize, + padding_f: EdgeInsets.all(8.h), + alignment: Alignment.centerRight, + child: CustomImageView( + svgPath: ImageConstant.imgEdit, + ), + ), + ), + SizedBox(height: 2.v), + Text( + ' Hello ${userData['firstName']}!', + overflow: TextOverflow.clip, + style: CustomTextStyles.headlineSmallSemiBold, + ), + SizedBox(height: 15.v), + _buildCardOne(context), + SizedBox(height: 89.v) + ], + ), + ), + bottomNavigationBar: BottomAppBarWidget(), + // floatingActionButton: CustomFloatingButton( + // height: 64, + // width: 64, + // alignment: Alignment.topCenter, + // child: CustomImageView( + // svgPath: ImageConstant.imgLocation, + // height: 32.0.v, + // width: 32.0.h, + // ), + // ), + floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, + ), + ); + } + + /// Navigates to the Edit screen. + onTapBtnEdit(BuildContext context) { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => ProfileSettingsScreenF(userData: userData), + // SettingScreen(), + ), + ); + } + + /// Section Widget + PreferredSizeWidget _buildAppBar(BuildContext context) { + return CustomAppBar( + leadingWidth: 64.h, + leading: AppbarLeadingIconbutton( + imagePath: ImageConstant.imgArrowLeft, + margin: EdgeInsets.only( + left: 32.h, + top: 9.v, + bottom: 14.v, + ), + onTap: () { + onTapArrowleftone(context); + }, + ), + title: AppbarTitle( + text: "Activity", + margin: EdgeInsets.only(left: 32.h), + ), + height: 1, + ); + } + + /// Section Widget + Widget _buildCardOne(BuildContext context) { + return SizedBox( + height: 369.v, + width: 387.h, + child: Stack( + alignment: Alignment.topLeft, + children: [ + CustomImageView( + imagePath: ImageConstant.imgCardPerformance, + height: 369.v, + width: 387.h, + radius: BorderRadius.circular( + 25.h, + ), + alignment: Alignment.center, + ), + Align( + alignment: Alignment.topLeft, + child: Padding( + padding: EdgeInsets.only( + left: 22.h, + top: 17.v, + right: 195.h, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + "Weekly report".toUpperCase(), + style: CustomTextStyles.labelSmallBold, + ), + Text( + "21/06/2020 – 27/06/2020".toUpperCase(), + style: + CustomTextStyles.bodySmallOpenSansOnErrorContainer, + ) + ], + ), + SizedBox(height: 29.v), + Text( + "YOUR performance".toUpperCase(), + style: theme.textTheme.bodyMedium, + ), + Text( + "10% growth".toUpperCase(), + style: CustomTextStyles.headlineSmallOnErrorContainer, + ) + ], + ), + ), + ), + Align( + alignment: Alignment.topRight, + child: Opacity( + opacity: 0.3, + child: Padding( + padding: EdgeInsets.only( + top: 22.v, + right: 17.h, + ), + child: Text( + "Ludimos © all rights reserved".toUpperCase(), + style: CustomTextStyles.openSansOnErrorContainer, + ), + ), + ), + ), + CustomImageView( + imagePath: ImageConstant.imgImage60, + height: 16.v, + width: 58.h, + alignment: Alignment.topRight, + margin: EdgeInsets.only( + top: 18.v, + right: 34.h, + ), + ), + CustomImageView( + svgPath: ImageConstant.imgVectorOnerrorcontainer, + height: 68.v, + width: 156.h, + alignment: Alignment.centerLeft, + margin: EdgeInsets.only(left: 26.h), + ), + Align( + alignment: Alignment.topLeft, + child: Container( + height: 78.adaptSize, + width: 78.adaptSize, + margin: EdgeInsets.only( + left: 18.h, + top: 123.v, + ), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular( + 39.h, + ), + border: Border.all( + color: theme.colorScheme.onErrorContainer.withOpacity(1), + width: 4.h, + ), + ), + ), + ), + CustomImageView( + imagePath: ImageConstant.imgVector78x39, + height: 78.v, + width: 39.h, + radius: BorderRadius.circular( + 19.h, + ), + alignment: Alignment.topLeft, + margin: EdgeInsets.only( + left: 57.h, + top: 123.v, + ), + ), + CustomImageView( + imagePath: ImageConstant.imgMaskGroup, + height: 110.v, + width: 136.h, + alignment: Alignment.topRight, + margin: EdgeInsets.only( + top: 29.v, + right: 26.h, + ), + ), + Align( + alignment: Alignment.bottomCenter, + child: Padding( + padding: EdgeInsets.only( + left: 25.h, + right: 34.h, + bottom: 11.v, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "50".toUpperCase(), + style: theme.textTheme.labelMedium, + ), + Expanded( + child: Padding( + padding: EdgeInsets.only( + top: 5.v, + bottom: 7.v, + ), + child: Divider( + indent: 6.h, + ), + ), + ) + ], + ), + SizedBox(height: 21.v), + Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only(bottom: 39.v), + child: Column( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Text( + "10".toUpperCase(), + style: theme.textTheme.labelMedium, + ), + SizedBox(height: 20.v), + Text( + "2".toUpperCase(), + style: theme.textTheme.labelMedium, + ) + ], + ), + ), + Expanded( + child: Padding( + padding: EdgeInsets.only( + left: 6.h, + top: 6.v, + ), + child: Column( + children: [ + Divider(), + SizedBox(height: 1.v), + SizedBox( + height: 79.v, + width: 309.h, + child: Stack( + alignment: Alignment.topLeft, + children: [ + Align( + alignment: Alignment.bottomCenter, + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Divider(), + SizedBox(height: 33.v), + Container( + width: 174.h, + margin: EdgeInsets.only( + left: 33.h, + right: 101.h, + ), + child: Row( + children: [ + Text( + "21 July", + style: theme + .textTheme.labelSmall, + ), + Spacer( + flex: 50, + ), + Text( + "23 July", + style: theme + .textTheme.labelSmall, + ), + Spacer( + flex: 49, + ), + Text( + "27July", + style: theme + .textTheme.labelSmall, + ) + ], + ), + ) + ], + ), + ), + Align( + alignment: Alignment.topLeft, + child: Container( + height: 70.v, + width: 176.h, + padding: EdgeInsets.symmetric( + vertical: 10.v), + decoration: BoxDecoration( + image: DecorationImage( + image: fs.Svg( + ImageConstant.imgGroup58, + ), + fit: BoxFit.cover, + ), + ), + child: CustomImageView( + svgPath: ImageConstant.imgPath2, + height: 45.v, + width: 134.h, + alignment: Alignment.bottomLeft, + ), + ), + ) + ], + ), + ) + ], + ), + ), + ) + ], + ) + ], + ), + ), + ), + Align( + alignment: Alignment.topLeft, + child: Container( + height: 78.adaptSize, + width: 78.adaptSize, + margin: EdgeInsets.only( + left: 114.h, + top: 123.v, + ), + child: Stack( + alignment: Alignment.centerRight, + children: [ + Align( + alignment: Alignment.center, + child: SizedBox( + height: 78.adaptSize, + width: 78.adaptSize, + child: CircularProgressIndicator( + value: 0.5, + strokeWidth: 4.h, + ), + ), + ), + CustomImageView( + imagePath: ImageConstant.imgVector78x66, + height: 78.v, + width: 66.h, + radius: BorderRadius.circular( + 22.h, + ), + alignment: Alignment.centerRight, + ) + ], + ), + ), + ) + ], + ), + ); + } + + /// Section Widget + Widget _buildBottomAppBarSea(BuildContext context) { + return SizedBox( + child: SizedBox( + height: 115.v, + width: 409.h, + child: Stack( + alignment: Alignment.topCenter, + children: [ + Align( + alignment: Alignment.bottomCenter, + child: Container( + width: 409.h, + margin: EdgeInsets.only(top: 35.v), + padding: EdgeInsets.symmetric( + horizontal: 13.h, + vertical: 15.v, + ), + decoration: BoxDecoration( + image: DecorationImage( + image: fs.Svg( + ImageConstant.imgGroup146, + ), + fit: BoxFit.cover, + ), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + CustomIconButton( + height: 50.adaptSize, + width: 50.adaptSize, + padding_f: EdgeInsets.all(13.h), + child: CustomImageView( + svgPath: ImageConstant.imgSearch, + ), + ), + Padding( + padding: EdgeInsets.only(left: 27.h), + child: CustomIconButton( + height: 50.adaptSize, + width: 50.adaptSize, + padding_f: EdgeInsets.all(12.h), + child: CustomImageView( + svgPath: ImageConstant.imgBxCricketBall, + ), + ), + ), + Container( + width: 126.h, + margin: EdgeInsets.only(left: 123.h), + child: Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + CustomIconButton( + height: 50.adaptSize, + width: 50.adaptSize, + padding_f: EdgeInsets.all(12.h), + child: CustomImageView( + svgPath: ImageConstant.imgFluentLive24Filled, + ), + ), + Padding( + padding: EdgeInsets.only(left: 26.h), + child: CustomIconButton( + height: 50.adaptSize, + width: 50.adaptSize, + padding_f: EdgeInsets.all(10.h), + child: CustomImageView( + svgPath: ImageConstant.imgNotification, + ), + ), + ) + ], + ), + ) + ], + ), + ), + ), + CustomFloatingButton( + height: 64, + width: 64, + alignment: Alignment.topCenter, + child: CustomImageView( + svgPath: ImageConstant.imgLocation, + height: 32.0.v, + width: 32.0.h, + ), + ) + ], + ), + ), + ); + } + + /// Navigates back to the previous screen. + onTapArrowleftone(BuildContext context) { + Navigator.pop(context); + } + + onTapBtnArrowleftone(BuildContext context) { + Navigator.pop(context); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/profile_screen/api_service_profile_management.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/profile_screen/api_service_profile_management.dart new file mode 100644 index 0000000..0af3077 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/profile_screen/api_service_profile_management.dart @@ -0,0 +1,59 @@ +import 'dart:typed_data'; +import 'package:http/http.dart' as http; +import 'package:http_parser/http_parser.dart'; +import 'package:dio/dio.dart'; + +import '../../../resources/api_constants.dart'; +// import '../../resources/api_constants.dart'; + +class ApiServiceProfileManagement { + final String baseUrl = ApiConstants.baseUrl; + final Dio dio = Dio(); + + Future createFile( + Uint8List fileBytes, String fileName, String token) async { + try { + String apiUrl = "$baseUrl/api/upload"; + + final mimeType = 'image/jpeg'; // You can set the appropriate MIME type + + FormData formData = FormData.fromMap({ + 'imageFile': MultipartFile.fromBytes( + fileBytes, + filename: fileName, + contentType: MediaType.parse(mimeType), + ), + }); + + Dio dio = Dio(); // Create a new Dio instance + dio.options.headers['Authorization'] = 'Bearer $token'; + + final response = await dio.post(apiUrl, data: formData); + + if (response.statusCode == 200) { + // Handle successful response + print('File uploaded successfully'); + } else { + print('Failed to upload file with status: ${response.statusCode}'); + } + } catch (error) { + print('Error occurred during form submission: $error'); + } + } + + String lookupMimeType(String filePath) { + final ext = filePath.split('.').last; + switch (ext) { + case 'jpg': + case 'jpeg': + return 'image/jpeg'; + case 'png': + return 'image/png'; + case 'pdf': + return 'application/pdf'; + // Add more cases for other file types as needed + default: + return 'application/octet-stream'; // Default MIME type + } + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/profile_screen/custom_app_bar.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/profile_screen/custom_app_bar.dart new file mode 100644 index 0000000..9472501 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/profile_screen/custom_app_bar.dart @@ -0,0 +1,56 @@ +import 'package:flutter/material.dart'; + +import '../../../utils/size_utils.dart'; + +// ignore: must_be_immutable +class CustomAppBar extends StatelessWidget implements PreferredSizeWidget { + CustomAppBar( + {required this.height, + this.leadingWidth, + this.leading, + this.title, + this.bottom, + this.flexibleSpace, + this.centerTitle, + this.actions}); + + double height; + + double? leadingWidth; + + Widget? leading; + + Widget? title; + + PreferredSize? flexibleSpace; + + TabBar? bottom; + + bool? centerTitle; + + List? actions; + + @override + Widget build(BuildContext context) { + return AppBar( + elevation: 0, + toolbarHeight: height, + automaticallyImplyLeading: false, + backgroundColor: Colors.transparent, + leadingWidth: leadingWidth ?? 0, + leading: leading, + title: title, + bottom: bottom, + flexibleSpace: flexibleSpace, + titleSpacing: 0, + centerTitle: centerTitle ?? false, + actions: actions, + ); + } + + @override + Size get preferredSize => Size( + size.width, + height, + ); +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/profile_screen/login_three_page.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/profile_screen/login_three_page.dart new file mode 100644 index 0000000..aed2e83 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/profile_screen/login_three_page.dart @@ -0,0 +1,175 @@ +import 'dart:convert'; +import 'package:flutter/material.dart'; +import 'package:shared_preferences/shared_preferences.dart'; + +import '../../../theme/custom_text_style.dart'; +// import '../../core/app_export.dart'; +// import '../../widgets/custom_icon_button.dart'; +// import '../../widgets/custom_text_form_field.dart'; // ignore_for_file: must_be_immutable + +class LoginThreePage extends StatefulWidget { + const LoginThreePage({Key? key}) + : super( + key: key, + ); + + @override + LoginThreePageState createState() => LoginThreePageState(); +} + +// ignore_for_file: must_be_immutable +class LoginThreePageState extends State + with AutomaticKeepAliveClientMixin { + TextEditingController emailController = TextEditingController(); + + TextEditingController phoneController = TextEditingController(); + + TextEditingController addressController = TextEditingController(); + + final GlobalKey _formKey = GlobalKey(); + + Map userData = {}; + + getUserData() async { + SharedPreferences prefs = await SharedPreferences.getInstance(); + var userdatastr = prefs.getString('userData'); + if (userdatastr != null) { + try { + setState(() { + userData = json.decode(userdatastr); + }); + print(userData['token']); + } catch (e) { + print("error is ..................$e"); + } + } + } + + @override + void initState() { + super.initState(); + getUserData(); + } + + String capitalize(String text) { + if (text.isEmpty) return text; + return text.split(' ').map((word) { + if (word.isEmpty) return word; + return word[0].toUpperCase() + word.substring(1).toLowerCase(); + }).join(' '); + } + + @override + bool get wantKeepAlive => true; + @override + Widget build(BuildContext context) { + super.build(context); + return Scaffold( + body: Padding( + padding: const EdgeInsets.only(top: 20.0, left: 20, right: 20), + child: Container( + width: double.infinity, + height: MediaQuery.of(context).size.height * 0.5, + decoration: BoxDecoration( + color: Colors.black, borderRadius: BorderRadius.circular(12)), + child: SingleChildScrollView( + child: Form( + key: _formKey, + child: Column( + children: [ + _myListTile( + title: 'Name', + subtitle: "${userData['fullName']}" ?? '', + icon: const Icon( + Icons.person, + color: Colors.black, + )), + _myDivider(), + _myListTile( + title: 'Email', + subtitle: '${userData['email']}', + icon: const Icon( + Icons.email, + color: Colors.black, + )), + _myDivider(), + _myListTile( + title: 'Phone', + subtitle: '${userData['mob_no']}', + icon: const Icon( + Icons.phone, + color: Colors.black, + )), + _myDivider(), + _myListTile( + title: 'Unique-Id', + subtitle: '${userData['unique_player_id']}', + icon: const Icon( + Icons.text_snippet, + color: Colors.black, + )), + _myDivider(), + _myListTile( + title: 'Address', + subtitle: '${userData['city']}, ${userData['state']}', + icon: const Icon( + Icons.location_on_outlined, + color: Colors.black, + )), + _myDivider(), + _myListTile( + title: 'Father name', + subtitle: '${userData['father_name']}', + icon: const Icon( + Icons.person, + color: Colors.black, + )), + _myDivider(), + _myListTile( + title: 'Mother name', + subtitle: '${userData['mother_name']}', + icon: const Icon( + Icons.person, + color: Colors.black, + )), + ], + ), + ), + ), + ), + ), + ); + } + + Widget _myListTile( + {required String title, required subtitle, required Widget icon}) { + return Padding( + padding: const EdgeInsets.symmetric(vertical: 18.0), + child: ListTile( + leading: CircleAvatar(backgroundColor: Colors.grey, child: icon), + title: Text( + title, + style: CustomTextStyles.titleMediumMediumWhit, + ), + subtitle: Text( + subtitle, + style: CustomTextStyles.titleSmallGray600, + ), + trailing: const Icon( + Icons.arrow_forward_ios, + color: Colors.white, + ), + ), + ); + } + + Widget _myDivider() { + return const Padding( + padding: EdgeInsets.symmetric(horizontal: 40.0), + child: Divider( + color: Colors.grey, + thickness: 0.5, + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/profile_screen/pro_setting_screen.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/profile_screen/pro_setting_screen.dart new file mode 100644 index 0000000..8095a64 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/profile_screen/pro_setting_screen.dart @@ -0,0 +1,680 @@ +import 'package:flutter/material.dart'; +import 'dart:ui'; +import 'package:flutter_svg/flutter_svg.dart'; +// import 'package:flutter_app/utils.dart'; +import 'package:google_fonts/google_fonts.dart'; + +class Settings extends StatelessWidget { + @override + Widget build(BuildContext context) { + return + Container( + decoration: BoxDecoration( + color: Color(0xFFFFFFFF), + borderRadius: BorderRadius.circular(32), + ), + child: Container( + padding: EdgeInsets.fromLTRB(0, 46, 0, 0), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.fromLTRB(18, 0, 18, 47.1), + child: Align( + alignment: Alignment.topLeft, + child: SizedBox( + width: 195, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + width: 48, + height: 48, + child: Container( + padding: EdgeInsets.fromLTRB(19.5, 16, 19.5, 16), + child: Stack( + clipBehavior: Clip.none, + children: [ + Container( + width: 9, + height: 16, + child: SizedBox( + width: 9, + height: 16, + child: SvgPicture.asset( + 'assets/vectors/vector_745_x2.svg', + ), + ), + ), + Positioned( + bottom: -16, + child: Container( + width: 48, + height: 48, + decoration: BoxDecoration( + border: Border.all(color: Color(0xFFF5F5F5)), + borderRadius: BorderRadius.circular(14), + ), + ), + ), + ], + ), + ), + ), + Container( + margin: EdgeInsets.fromLTRB(0, 7, 0, 1), + child: Text( + 'Settings', + textAlign: TextAlign.center, + style: GoogleFonts.getFont( + 'Kumbh Sans', + fontWeight: FontWeight.w700, + fontSize: 24, + height: 0.8, + letterSpacing: -0.5, + color: Color(0xFF121212), + ), + ), + ), + ], + ), + ), + ), + ), + Container( + margin: EdgeInsets.fromLTRB(0, 0, 0, 35.6), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.fromLTRB(18, 0, 18, 20.2), + child: Align( + alignment: Alignment.topLeft, + child: Text( + 'Account', + style: GoogleFonts.getFont( + 'Kumbh Sans', + fontWeight: FontWeight.w400, + fontSize: 14, + height: 1.4, + letterSpacing: -0.3, + color: Color(0xFF7647EB), + ), + ), + ), + ), + Container( + margin: EdgeInsets.fromLTRB(18, 0, 29.3, 16.1), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.fromLTRB(0, 0, 10, 0), + child: SizedBox( + width: 310.3, + child: Text( + 'Edit Profile', + style: GoogleFonts.getFont( + 'Kumbh Sans', + fontWeight: FontWeight.w400, + fontSize: 16, + height: 1.3, + letterSpacing: -0.3, + color: Color(0xFF121212), + ), + ), + ), + ), + Container( + margin: EdgeInsets.fromLTRB(0, 2.3, 0, 4.3), + width: 7.5, + height: 13.4, + child: SizedBox( + width: 7.5, + height: 13.4, + child: SvgPicture.asset( + 'assets/vectors/vector_593_x2.svg', + ), + ), + ), + ], + ), + ), + Container( + margin: EdgeInsets.fromLTRB(18, 0, 0, 15.6), + child: Container( + decoration: BoxDecoration( + color: Color(0xFFF5F5F5), + ), + child: Container( + width: 357.1, + height: 1.5, + ), + ), + ), + Container( + margin: EdgeInsets.fromLTRB(18, 0, 29.3, 16.1), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.fromLTRB(0, 0, 10, 0), + child: SizedBox( + width: 310.2, + child: Text( + 'Password', + style: GoogleFonts.getFont( + 'Kumbh Sans', + fontWeight: FontWeight.w400, + fontSize: 16, + height: 1.3, + letterSpacing: -0.3, + color: Color(0xFF121212), + ), + ), + ), + ), + Container( + margin: EdgeInsets.fromLTRB(0, 5.3, 0, 1.3), + width: 7.5, + height: 13.4, + child: SizedBox( + width: 7.5, + height: 13.4, + child: SvgPicture.asset( + 'assets/vectors/vector_56_x2.svg', + ), + ), + ), + ], + ), + ), + Container( + margin: EdgeInsets.fromLTRB(18, 0, 0, 15.6), + child: Container( + decoration: BoxDecoration( + color: Color(0xFFF5F5F5), + ), + child: Container( + width: 357.1, + height: 1.5, + ), + ), + ), + Container( + margin: EdgeInsets.fromLTRB(18, 0, 29.3, 14.4), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.fromLTRB(0, 0, 10, 1.7), + child: SizedBox( + width: 310.3, + child: Text( + 'Language', + style: GoogleFonts.getFont( + 'Kumbh Sans', + fontWeight: FontWeight.w400, + fontSize: 16, + height: 1.3, + letterSpacing: -0.3, + color: Color(0xFF121212), + ), + ), + ), + ), + Container( + margin: EdgeInsets.fromLTRB(0, 8.3, 0, 0), + width: 7.5, + height: 13.4, + child: SizedBox( + width: 7.5, + height: 13.4, + child: SvgPicture.asset( + 'assets/vectors/vector_839_x2.svg', + ), + ), + ), + ], + ), + ), + Container( + decoration: BoxDecoration( + color: Color(0xFFF5F5F5), + ), + child: Container( + width: 375.1, + height: 1.5, + ), + ), + ], + ), + ), + Container( + margin: EdgeInsets.fromLTRB(0, 0, 0, 35.6), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.fromLTRB(18, 0, 18, 21.2), + child: Align( + alignment: Alignment.topLeft, + child: Text( + 'Preferences', + style: GoogleFonts.getFont( + 'Kumbh Sans', + fontWeight: FontWeight.w400, + fontSize: 14, + height: 1.4, + letterSpacing: -0.3, + color: Color(0xFF7647EB), + ), + ), + ), + ), + Container( + margin: EdgeInsets.fromLTRB(18, 0, 29.3, 16.1), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.fromLTRB(0, 0, 10, 0), + child: SizedBox( + width: 310.3, + child: Text( + 'Theme', + style: GoogleFonts.getFont( + 'Kumbh Sans', + fontWeight: FontWeight.w400, + fontSize: 16, + height: 1.3, + letterSpacing: -0.3, + color: Color(0xFF121212), + ), + ), + ), + ), + Container( + margin: EdgeInsets.fromLTRB(0, 2.3, 0, 4.3), + width: 7.5, + height: 13.4, + child: SizedBox( + width: 7.5, + height: 13.4, + child: SvgPicture.asset( + 'assets/vectors/vector_385_x2.svg', + ), + ), + ), + ], + ), + ), + Container( + margin: EdgeInsets.fromLTRB(18, 0, 0, 15.6), + child: Container( + decoration: BoxDecoration( + color: Color(0xFFF5F5F5), + ), + child: Container( + width: 357.1, + height: 1.5, + ), + ), + ), + Container( + margin: EdgeInsets.fromLTRB(18, 0, 29.3, 16.1), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.fromLTRB(0, 0, 10, 0), + child: SizedBox( + width: 310.2, + child: Text( + 'Notifications', + style: GoogleFonts.getFont( + 'Kumbh Sans', + fontWeight: FontWeight.w400, + fontSize: 16, + height: 1.3, + letterSpacing: -0.3, + color: Color(0xFF121212), + ), + ), + ), + ), + Container( + margin: EdgeInsets.fromLTRB(0, 1.3, 0, 5.3), + width: 7.5, + height: 13.4, + child: SizedBox( + width: 7.5, + height: 13.4, + child: SvgPicture.asset( + 'assets/vectors/vector_148_x2.svg', + ), + ), + ), + ], + ), + ), + Container( + margin: EdgeInsets.fromLTRB(18, 0, 0, 15.6), + child: Container( + decoration: BoxDecoration( + color: Color(0xFFF5F5F5), + ), + child: Container( + width: 357.1, + height: 1.5, + ), + ), + ), + Container( + margin: EdgeInsets.fromLTRB(18, 0, 29.3, 16.1), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.fromLTRB(0, 0, 10, 0), + child: SizedBox( + width: 310.3, + child: Text( + 'Attendance', + style: GoogleFonts.getFont( + 'Kumbh Sans', + fontWeight: FontWeight.w400, + fontSize: 16, + height: 1.3, + letterSpacing: -0.3, + color: Color(0xFF121212), + ), + ), + ), + ), + Container( + margin: EdgeInsets.fromLTRB(0, 3.3, 0, 3.3), + width: 7.5, + height: 13.4, + child: SizedBox( + width: 7.5, + height: 13.4, + child: SvgPicture.asset( + 'assets/vectors/vector_69_x2.svg', + ), + ), + ), + ], + ), + ), + Container( + decoration: BoxDecoration( + color: Color(0xFFF5F5F5), + ), + child: Container( + width: 375.1, + height: 1.5, + ), + ), + ], + ), + ), + Container( + margin: EdgeInsets.fromLTRB(0, 0, 0, 35.6), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.fromLTRB(18, 0, 18, 21.3), + child: Align( + alignment: Alignment.topLeft, + child: Text( + 'Advanced Settings', + style: GoogleFonts.getFont( + 'Kumbh Sans', + fontWeight: FontWeight.w400, + fontSize: 14, + height: 1.4, + letterSpacing: -0.3, + color: Color(0xFF7647EB), + ), + ), + ), + ), + Container( + margin: EdgeInsets.fromLTRB(18, 0, 29.3, 16.2), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.fromLTRB(0, 0, 10, 0), + child: SizedBox( + width: 310.2, + child: Text( + 'Clear Analytics Record', + style: GoogleFonts.getFont( + 'Kumbh Sans', + fontWeight: FontWeight.w400, + fontSize: 16, + height: 1.3, + letterSpacing: -0.3, + color: Color(0xFF121212), + ), + ), + ), + ), + Container( + margin: EdgeInsets.fromLTRB(0, 2.3, 0, 4.3), + width: 7.5, + height: 13.4, + child: SizedBox( + width: 7.5, + height: 13.4, + child: SvgPicture.asset( + 'assets/vectors/vector_323_x2.svg', + ), + ), + ), + ], + ), + ), + Container( + margin: EdgeInsets.fromLTRB(18, 0, 0, 15.7), + child: Container( + decoration: BoxDecoration( + color: Color(0xFFF5F5F5), + ), + child: Container( + width: 357.1, + height: 1.5, + ), + ), + ), + Container( + margin: EdgeInsets.fromLTRB(18, 0, 29.3, 16.2), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.fromLTRB(0, 0, 10, 0), + child: SizedBox( + width: 310.3, + child: Text( + 'Clear Cache', + style: GoogleFonts.getFont( + 'Kumbh Sans', + fontWeight: FontWeight.w400, + fontSize: 16, + height: 1.3, + letterSpacing: -0.3, + color: Color(0xFF121212), + ), + ), + ), + ), + Container( + margin: EdgeInsets.fromLTRB(0, 5.3, 0, 1.3), + width: 7.5, + height: 13.4, + child: SizedBox( + width: 7.5, + height: 13.4, + child: SvgPicture.asset( + 'assets/vectors/vector_410_x2.svg', + ), + ), + ), + ], + ), + ), + Container( + decoration: BoxDecoration( + color: Color(0xFFF5F5F5), + ), + child: Container( + width: 375.1, + height: 1.5, + ), + ), + ], + ), + ), + Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.fromLTRB(18, 0, 18, 11.3), + child: Align( + alignment: Alignment.topLeft, + child: Text( + 'Support', + style: GoogleFonts.getFont( + 'Kumbh Sans', + fontWeight: FontWeight.w400, + fontSize: 14, + height: 1.4, + letterSpacing: -0.3, + color: Color(0xFF7647EB), + ), + ), + ), + ), + Container( + margin: EdgeInsets.fromLTRB(18, 0, 29.3, 6.2), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.fromLTRB(0, 0, 20, 0), + child: SizedBox( + width: 300.2, + child: Text( + 'Terms of Service & Privacy', + style: GoogleFonts.getFont( + 'Kumbh Sans', + fontWeight: FontWeight.w400, + fontSize: 16, + height: 1.3, + letterSpacing: -0.3, + color: Color(0xFF121212), + ), + ), + ), + ), + Container( + margin: EdgeInsets.fromLTRB(0, 12.3, 0, 14.3), + width: 7.5, + height: 13.4, + child: SizedBox( + width: 7.5, + height: 13.4, + child: SvgPicture.asset( + 'assets/vectors/vector_318_x2.svg', + ), + ), + ), + ], + ), + ), + Container( + margin: EdgeInsets.fromLTRB(18, 0, 0, 15.7), + child: Container( + decoration: BoxDecoration( + color: Color(0xFFF5F5F5), + ), + child: Container( + width: 357.1, + height: 1.5, + ), + ), + ), + Container( + margin: EdgeInsets.fromLTRB(18, 0, 29.3, 16.2), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.fromLTRB(0, 0, 10, 0), + child: SizedBox( + width: 310.3, + child: Text( + 'Clear Cache', + style: GoogleFonts.getFont( + 'Kumbh Sans', + fontWeight: FontWeight.w400, + fontSize: 16, + height: 1.3, + letterSpacing: -0.3, + color: Color(0xFF121212), + ), + ), + ), + ), + Container( + margin: EdgeInsets.fromLTRB(0, 5.3, 0, 1.3), + width: 7.5, + height: 13.4, + child: SizedBox( + width: 7.5, + height: 13.4, + child: SvgPicture.asset( + 'assets/vectors/vector_852_x2.svg', + ), + ), + ), + ], + ), + ), + Container( + decoration: BoxDecoration( + color: Color(0xFFF5F5F5), + ), + child: Container( + width: 375.1, + height: 1.5, + ), + ), + ], + ), + ], + ), + ), + ); + } +} \ No newline at end of file diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/profile_screen/profile_edit.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/profile_screen/profile_edit.dart new file mode 100644 index 0000000..576efed --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/profile_screen/profile_edit.dart @@ -0,0 +1,129 @@ +import 'dart:typed_data'; +import 'package:flutter/material.dart'; +import 'package:image_picker/image_picker.dart'; // For selecting images +import 'package:provider/provider.dart'; +import '../../../theme/theme_helper.dart'; +import '../../../widgets/custom_elevated_button.dart'; +import 'api_service_profile_management.dart'; // Your API service class + +class ProfileEditScreen extends StatefulWidget { + @override + _ProfileEditScreenState createState() => _ProfileEditScreenState(); +} + +class _ProfileEditScreenState extends State { + final _formKey = GlobalKey(); + final TextEditingController _nameController = TextEditingController(); + final TextEditingController _emailController = TextEditingController(); + + Uint8List? _profileImage; + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text('Edit Profile'), + ), + body: Padding( + padding: const EdgeInsets.all(16.0), + child: Form( + key: _formKey, + child: ListView( + children: [ + _buildProfileImagePicker(), + TextFormField( + controller: _nameController, + decoration: const InputDecoration( + labelText: 'Name', + ), + validator: (value) { + if (value == null || value.isEmpty) { + return 'Please enter a name'; + } + return null; + }, + ), + TextFormField( + controller: _emailController, + decoration: const InputDecoration( + labelText: 'Email', + ), + validator: (value) { + if (value == null || value.isEmpty) { + return 'Please enter an email'; + } + return null; + }, + ), + // SizedBox(height: 20), + // ElevatedButton( + // onPressed: _onSubmit, + // child: const Text('Save Changes'), + // ), + + const SizedBox(height: 29), + CustomElevatedButton( + onPressed: _onSubmit, + text: "Submit", + margin: const EdgeInsets.only( + left: 17, + right: 6, + ), + buttonTextStyle: theme.textTheme.titleMedium!, + ), + ], + ), + ), + ), + ); + } + + Widget _buildProfileImagePicker() { + return Column( + children: [ + if (_profileImage != null) + CircleAvatar( + radius: 40, + backgroundImage: MemoryImage(_profileImage!), + ), + TextButton( + onPressed: _pickImage, + child: Text('Change Profile Picture'), + ), + ], + ); + } + + Future _pickImage() async { + final picker = ImagePicker(); + final pickedFile = await picker.pickImage(source: ImageSource.gallery); + + if (pickedFile != null) { + final bytes = await pickedFile.readAsBytes(); + setState(() { + _profileImage = bytes; + }); + } + } + + Future _onSubmit() async { + if (_formKey.currentState!.validate()) { + final name = _nameController.text; + final email = _emailController.text; + + // Simulate token retrieval; you'd get this from your authentication flow + final token = 'YOUR_TOKEN_HERE'; + + final apiService = ApiServiceProfileManagement(); + + if (_profileImage != null) { + // Upload the profile image + await apiService.createFile(_profileImage!, 'profile_picture.jpg', token); + } + + // Perform other actions with name, email, etc. + // You'd likely send this to your backend as well. + print('Profile updated with name: $name, email: $email'); + } + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/profile_screen/profile_edit1.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/profile_screen/profile_edit1.dart new file mode 100644 index 0000000..20eca0b --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/profile_screen/profile_edit1.dart @@ -0,0 +1,378 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_svg_provider/flutter_svg_provider.dart' as fs; +import '../../../core/utils/image_constant.dart'; +import '../../../core/utils/size_utils.dart'; +import '../../../theme/custom_button_style.dart'; +import '../../../theme/custom_text_style.dart'; +import '../../../theme/theme_helper.dart'; +import '../../../widgets/custom_drop_down.dart'; +import '../../../widgets/custom_elevated_button.dart'; +import '../../../widgets/custom_floating_button.dart'; +import '../../../widgets/custom_floating_text_field.dart'; +import '../../../widgets/custom_icon_button.dart'; +import '../../../widgets/custom_image_view.dart'; + +class ProfileEditScreen1 extends StatelessWidget { + ProfileEditScreen1({Key? key}) + : super( + key: key, + ); + + TextEditingController fullNameController = TextEditingController(); + + TextEditingController nameController = TextEditingController(); + + TextEditingController emailController = TextEditingController(); + + TextEditingController phoneNumberController = TextEditingController(); + + List dropdownItemList = ["India", "Bangladesh", "Pakistan"]; + + TextEditingController genderController = TextEditingController(); + + TextEditingController addressController = TextEditingController(); + + GlobalKey _formKey = GlobalKey(); + + @override + Widget build(BuildContext context) { + var imgArrowLeftGray90001; + var imgArrowdropdown; + return SafeArea( + child: Scaffold( + resizeToAvoidBottomInset: false, + body: SingleChildScrollView( + padding: EdgeInsets.only( + bottom: MediaQuery.of(context).viewInsets.bottom, + ), + child: SizedBox( + height: SizeUtils.height, + child: Form( + key: _formKey, + child: SizedBox( + width: double.maxFinite, + child: Column( + children: [ + Expanded( + child: Container( + padding: EdgeInsets.symmetric( + horizontal: 32.h, + vertical: 21.v, + ), + child: Column( + children: [ + SizedBox(height: 30.v), + Align( + alignment: Alignment.centerLeft, + child: Row( + children: [ + Padding( + padding: EdgeInsets.only( + top: 9.v, + bottom: 6.v, + ), + child: CustomIconButton( + height: 32.adaptSize, + width: 32.adaptSize, + // padding: EdgeInsets.all(8.h), + decoration: + IconButtonStyleHelper.outlineIndigo, + onTap: () { + onTapBtnArrowleftone(context); + }, + child: CustomImageView( + svgPath: + ImageConstant.imgArrowLeftGray90001, + ), + ), + ), + Padding( + padding: EdgeInsets.only(left: 18.h), + child: Text( + "Edit profile", + style: theme.textTheme.headlineLarge, + ), + ) + ], + ), + ), + Spacer(), + _buildFullName(context), + SizedBox(height: 24.v), + _buildName(context), + SizedBox(height: 24.v), + _buildEmail(context), + SizedBox(height: 24.v), + _buildPhoneNumber(context), + SizedBox(height: 24.v), + Padding( + padding: EdgeInsets.symmetric(horizontal: 11.h), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Expanded( + child: Padding( + padding: EdgeInsets.only(right: 8.h), + child: CustomDropDown( + icon: Container( + margin: EdgeInsets.symmetric( + horizontal: 8.h), + child: CustomImageView( + svgPath: + ImageConstant.imgArrowdropdown, + height: 24.adaptSize, + width: 24.adaptSize, + ), + ), + hintText: "Country", + items: dropdownItemList, + ), + ), + ), + _buildGender(context) + ], + ), + ), + SizedBox(height: 24.v), + _buildAddress(context), + SizedBox(height: 24.v), + _buildSubmit(context) + ], + ), + ), + ), + SizedBox(height: 5.v) + ], + ), + ), + ), + ), + ), + bottomNavigationBar: _buildBottomappbarsea(context), + floatingActionButton: CustomFloatingButton( + height: 64, + width: 64, + alignment: Alignment.topCenter, + child: CustomImageView( + svgPath: ImageConstant.imgLocation, + height: 32.0.v, + width: 32.0.h, + ), + ), + floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, + ), + ); + } + + /// Section Widget + Widget _buildFullName(BuildContext context) { + return Padding( + padding: EdgeInsets.only( + left: 10.h, + right: 12.h, + ), + child: CustomFloatingTextField( + controller: fullNameController, + labelText: "Full name", + labelStyle: theme.textTheme.bodyMedium!, + hintText: "Full name", + ), + ); + } + + /// Section Widget + Widget _buildName(BuildContext context) { + return Padding( + padding: EdgeInsets.only( + left: 10.h, + right: 12.h, + ), + child: CustomFloatingTextField( + controller: nameController, + labelText: "Nick name", + labelStyle: theme.textTheme.bodyMedium!, + hintText: "Nick name", + ), + ); + } + + /// Section Widget + Widget _buildEmail(BuildContext context) { + return Padding( + padding: EdgeInsets.only( + left: 10.h, + right: 12.h, + ), + child: CustomFloatingTextField( + controller: emailController, + labelText: "Label", + labelStyle: theme.textTheme.bodyMedium!, + hintText: "Label", + ), + ); + } + + /// Section Widget + Widget _buildPhoneNumber(BuildContext context) { + return Padding( + padding: EdgeInsets.only( + left: 10.h, + right: 12.h, + ), + child: CustomFloatingTextField( + controller: phoneNumberController, + labelText: " Phone number", + labelStyle: theme.textTheme.bodyMedium!, + hintText: " Phone number", + textInputType: TextInputType.phone, + ), + ); + } + + /// Section Widget + Widget _buildGender(BuildContext context) { + return Expanded( + child: Padding( + padding: EdgeInsets.only(left: 8.h), + child: CustomFloatingTextField( + controller: genderController, + labelText: "Genre", + labelStyle: theme.textTheme.bodyMedium!, + hintText: "Genre", + ), + ), + ); + } + + /// Section Widget + Widget _buildAddress(BuildContext context) { + return Padding( + padding: EdgeInsets.only( + left: 10.h, + right: 12.h, + ), + child: CustomFloatingTextField( + controller: addressController, + labelText: "Address", + labelStyle: theme.textTheme.bodyMedium!, + hintText: "Address", + textInputAction: TextInputAction.done, + ), + ); + } + + /// Section Widget + Widget _buildSubmit(BuildContext context) { + return CustomElevatedButton( + height: 44.v, + text: "submit".toUpperCase(), + margin: EdgeInsets.only( + left: 10.h, + right: 12.h, + ), + // buttonStyle: CustomButtonStyles.fillBlueA, + // buttonTextStyle: CustomTextStyles.titleMediumRobotoWhiteA700, + ); + } + + /// Section Widget + Widget _buildBottomappbarsea(BuildContext context) { + return SizedBox( + child: SizedBox( + height: 115.v, + width: 409.h, + child: Stack( + alignment: Alignment.topCenter, + children: [ + Align( + alignment: Alignment.bottomCenter, + child: Container( + width: 409.h, + margin: EdgeInsets.only(top: 35.v), + padding: EdgeInsets.symmetric( + horizontal: 13.h, + vertical: 15.v, + ), + decoration: BoxDecoration( + image: DecorationImage( + image: fs.Svg( + ImageConstant.imgGroup152, + ), + fit: BoxFit.cover, + ), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + CustomIconButton( + height: 50.adaptSize, + width: 50.adaptSize, + // padding: EdgeInsets.all(13.h), + child: CustomImageView( + svgPath: ImageConstant.imgSearch, + ), + ), + Padding( + padding: EdgeInsets.only(left: 27.h), + child: CustomIconButton( + height: 50.adaptSize, + width: 50.adaptSize, + // padding: EdgeInsets.all(12.h), + child: CustomImageView( + svgPath: ImageConstant.imgBxCricketBall, + ), + ), + ), + Container( + width: 126.h, + margin: EdgeInsets.only(left: 123.h), + child: Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + CustomIconButton( + height: 50.adaptSize, + width: 50.adaptSize, + // padding: EdgeInsets.all(12.h), + child: CustomImageView( + svgPath: ImageConstant.imgFluentLive24Filled, + ), + ), + Padding( + padding: EdgeInsets.only(left: 26.h), + child: CustomIconButton( + height: 50.adaptSize, + width: 50.adaptSize, + // padding: EdgeInsets.all(10.h), + child: CustomImageView( + svgPath: ImageConstant.imgNotification, + ), + ), + ) + ], + ), + ) + ], + ), + ), + ), + CustomFloatingButton( + height: 64, + width: 64, + alignment: Alignment.topCenter, + child: CustomImageView( + svgPath: ImageConstant.imgLocation, + height: 32.0.v, + width: 32.0.h, + ), + ) + ], + ), + ), + ); + } + + /// Navigates back to the previous screen. + onTapBtnArrowleftone(BuildContext context) { + Navigator.pop(context); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/profile_screen/profile_screen.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/profile_screen/profile_screen.dart new file mode 100644 index 0000000..dfc48d5 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/profile_screen/profile_screen.dart @@ -0,0 +1,364 @@ +import 'dart:convert'; +import 'dart:typed_data'; + +import 'package:base_project/core/app_export.dart'; +import 'package:http/http.dart' as http; +import 'package:flutter/material.dart'; +import 'package:shared_preferences/shared_preferences.dart'; +import '../../../core/utils/image_constant.dart'; +import '../../../providers/token_manager.dart'; +import '../../../resources/api_constants.dart'; +import '../../../routes/app_routes.dart'; +import '../../../theme/custom_text_style.dart'; +import '../../../theme/theme_helper.dart'; +import '../../../widgets/custom_floating_button.dart'; +import '../../../widgets/custom_icon_button.dart'; +import '../../../widgets/custom_image_view.dart'; +import '../../LogoutService/Logoutservice.dart'; +import '../../ReuseableWidgets/BottomAppBarWidget.dart'; +import '../../profileManagement/profile_settings_f.dart'; +import 'activity.dart'; +import 'login_three_page.dart'; +import 'setting_screen.dart'; + +// ignore: camel_case_types +class Profile_Screen extends StatefulWidget { + const Profile_Screen({Key? key}) + : super( + key: key, + ); + + @override + Profile_ScreenState createState() => Profile_ScreenState(); +} + +// ignore_for_file: must_be_immutable +class Profile_ScreenState extends State + with TickerProviderStateMixin { + late TabController tabviewController; + Uint8List? _imageBytes; + Map userData = {}; + bool isLoading = false; + + getUserData() async { + SharedPreferences prefs = await SharedPreferences.getInstance(); + var userdatastr = prefs.getString('userData'); + if (userdatastr != null) { + try { + setState(() { + userData = json.decode(userdatastr); + }); + print(userData['token']); + } catch (e) { + print("error is ..................$e"); + } + } + } + + Future fetchProfileImageData() async { + setState(() { + isLoading = true; + }); + final token = await TokenManager.getToken(); + const String baseUrl = ApiConstants.baseUrl; + const String apiUrl = '$baseUrl/api/retrieve-image'; + + print('Image URL: $apiUrl'); + try { + final response = await http.get( + Uri.parse(apiUrl), + headers: { + 'Authorization': 'Bearer $token', + }, + ); + if (response.statusCode == 401) { + LogoutService.logout(); + } + if (response.statusCode >= 200 && response.statusCode <= 209) { + String responseData = + response.body.replaceAll('"}', ''); // Remove trailing '"}' + print("Response: $responseData"); + // Find the index of the comma (",") after the prefix + final commaIndex = responseData.indexOf(','); + if (commaIndex != -1) { + final imageData = responseData.substring(commaIndex + 1); + // Decode base64-encoded image data + final bytes = base64Decode(imageData); + setState(() { + _imageBytes = bytes; + }); + print('Image data is decoded.'); + } else { + print('Invalid image data format'); + } + } else { + print('Failed to load image data: ${response.statusCode}'); + } + setState(() { + isLoading = false; + }); + } catch (e) { + print('Error fetching image data: $e'); + } + } + + @override + void initState() { + super.initState(); + fetchProfileImageData(); + getUserData(); + + tabviewController = TabController(length: 3, vsync: this); + + // Listener to detect tab changes and navigate when "Activity" is selected + tabviewController.addListener(() { + if (tabviewController.indexIsChanging) { + if (tabviewController.index == 1) { + // 1 represents the "Activity" tab index + Future.microtask(() => Navigator.push( + context, + MaterialPageRoute( + builder: (context) => ActivityScreen(userData)), + )); + } + } + }); + + // Listener to detect tab changes and navigate when "Activity" is selected + tabviewController.addListener(() { + if (tabviewController.indexIsChanging) { + if (tabviewController.index == 2) { + // 1 represents the "Activity" tab index + Future.microtask( + () => Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + // ProfileSettingsScreenF(userData: userData), + const SettingScreen(), + ), + ), + ); + } + } + }); + } + + String capitalize(String text) { + if (text.isEmpty) return text; + return text.split(' ').map((word) { + if (word.isEmpty) return word; + return word[0].toUpperCase() + word.substring(1).toLowerCase(); + }).join(' '); + } + + @override + Widget build(BuildContext context) { + return SafeArea( + child: Scaffold( + body: SingleChildScrollView( + // width: double.maxFinite, + child: Column( + children: [ + Column( + children: [ + SizedBox(height: 50.v), + Align( + alignment: Alignment.centerLeft, + child: Padding( + padding: EdgeInsets.only(left: 32.h), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only( + top: 5.v, + bottom: 9.v, + ), + child: CustomIconButton( + height: 32.adaptSize, + width: 32.adaptSize, + // padding: EdgeInsets.all(8.h), + decoration: IconButtonStyleHelper.outlineIndigo, + onTap: () { + onTapBtnArrowleftone(context); + }, + child: CustomImageView( + svgPath: ImageConstant.imgArrowleft, + height: 32.adaptSize, + width: 32.adaptSize, + ), + ), + ), + Padding( + padding: EdgeInsets.only(left: 18.h), + child: Text( + "My Profile", + style: theme.textTheme.headlineLarge, + ), + ) + ], + ), + ), + ), + SizedBox(height: 27.v), + isLoading + ? const Center(child: CircularProgressIndicator()) + : Stack( + children: [ + CircleAvatar( + radius: 100, + backgroundImage: _imageBytes != null + ? MemoryImage(_imageBytes!) + : AssetImage(ImageConstant.editModel) + as ImageProvider, + ), + Positioned( + right: 0, + bottom: 0, + child: CustomIconButton( + height: 32.adaptSize, + width: 32.adaptSize, + alignment: Alignment.centerRight, + onTap: () { + onTapBtnEdit(context); + }, + padding_f: EdgeInsets.all(8.h), + // decoration: IconButtonStyleHelper.fillPrimary, + child: CustomImageView( + imagePath: ImageConstant.editIcon, + height: 28.adaptSize, + width: 28.adaptSize, + ), + ), + ), + ], + ), + Padding( + padding: EdgeInsets.only(right: 161.h), + child: CustomIconButton( + height: 32.adaptSize, + width: 32.adaptSize, + // padding: EdgeInsets.all(8.h), + + alignment: Alignment.centerRight, + onTap: () { + onTapBtnEdit(context); + }, + padding_f: EdgeInsets.all(8.h), + decoration: IconButtonStyleHelper.fillPrimary, + child: CustomImageView( + svgPath: ImageConstant.imgEdit, + height: 28.adaptSize, + width: 28.adaptSize, + // decoration: IconButtonStyleHelper.outlineIndigo, + ), + ), + ), + SizedBox(height: 2.v), + Text( + 'Hello ${capitalize(userData['fullName'] ?? '')}!', + overflow: TextOverflow.clip, + style: CustomTextStyles.headlineSmallSemiBold, + ), + SizedBox(height: 17.v), + SizedBox( + height: 49.v, + width: 298.h, + child: TabBar( + controller: tabviewController, + labelPadding: EdgeInsets.zero, + labelColor: + theme.colorScheme.onErrorContainer.withOpacity(1), + labelStyle: TextStyle( + fontSize: 14.fSize, + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + ), + unselectedLabelColor: appTheme.black900, + unselectedLabelStyle: TextStyle( + fontSize: 14.fSize, + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + ), + indicatorSize: TabBarIndicatorSize.tab, + indicator: BoxDecoration( + color: appTheme.gray700, + borderRadius: BorderRadius.circular( + 11.h, + ), + ), + tabs: const [ + Tab( + child: Text( + "My Profile", + ), + ), + Tab( + child: Text( + "Activity", + ), + ), + Tab( + child: Text( + "Settings", + ), + ) + ], + ), + ), + _buildTabbarview(context) + ], + ), + SizedBox(height: 5.v) + ], + ), + ), + bottomNavigationBar: BottomAppBarWidget(), + floatingActionButton: CustomFloatingButton( + height: 64, + width: 64, + alignment: Alignment.topCenter, + child: CustomImageView( + svgPath: ImageConstant.imgLocation, + height: 32.0.v, + width: 32.0.h, + ), + ), + floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, + ), + ); + } + + /// Section Widget + Widget _buildTabbarview(BuildContext context) { + return SizedBox( + height: 430.v, + child: TabBarView( + controller: tabviewController, + children: const [LoginThreePage(), LoginThreePage(), LoginThreePage()], + ), + ); + } + + /// Navigates back to the previous screen. + onTapBtnArrowleftone(BuildContext context) { + Navigator.pop(context); + } + + /// Navigates to the Edit screen. + onTapBtnEdit(BuildContext context) { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => ProfileSettingsScreenF(userData: userData), + // SettingScreen(), + ), + ); + } + + /// Navigates to the Setting screen. + onTapBtnSetting(BuildContext context) { + Navigator.pushNamed(context, AppRoutes.setting_screen); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/profile_screen/profile_screen_service.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/profile_screen/profile_screen_service.dart new file mode 100644 index 0000000..0af3077 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/profile_screen/profile_screen_service.dart @@ -0,0 +1,59 @@ +import 'dart:typed_data'; +import 'package:http/http.dart' as http; +import 'package:http_parser/http_parser.dart'; +import 'package:dio/dio.dart'; + +import '../../../resources/api_constants.dart'; +// import '../../resources/api_constants.dart'; + +class ApiServiceProfileManagement { + final String baseUrl = ApiConstants.baseUrl; + final Dio dio = Dio(); + + Future createFile( + Uint8List fileBytes, String fileName, String token) async { + try { + String apiUrl = "$baseUrl/api/upload"; + + final mimeType = 'image/jpeg'; // You can set the appropriate MIME type + + FormData formData = FormData.fromMap({ + 'imageFile': MultipartFile.fromBytes( + fileBytes, + filename: fileName, + contentType: MediaType.parse(mimeType), + ), + }); + + Dio dio = Dio(); // Create a new Dio instance + dio.options.headers['Authorization'] = 'Bearer $token'; + + final response = await dio.post(apiUrl, data: formData); + + if (response.statusCode == 200) { + // Handle successful response + print('File uploaded successfully'); + } else { + print('Failed to upload file with status: ${response.statusCode}'); + } + } catch (error) { + print('Error occurred during form submission: $error'); + } + } + + String lookupMimeType(String filePath) { + final ext = filePath.split('.').last; + switch (ext) { + case 'jpg': + case 'jpeg': + return 'image/jpeg'; + case 'png': + return 'image/png'; + case 'pdf': + return 'application/pdf'; + // Add more cases for other file types as needed + default: + return 'application/octet-stream'; // Default MIME type + } + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/profile_screen/setting_screen.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/profile_screen/setting_screen.dart new file mode 100644 index 0000000..2d8ccc6 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/profile_screen/setting_screen.dart @@ -0,0 +1,610 @@ + +import 'package:base_project/core/app_export.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg_provider/flutter_svg_provider.dart' as fs; +import '../../../core/utils/image_constant.dart'; +import '../../../theme/app_decoration.dart'; +import '../../../theme/custom_text_style.dart'; +import '../../../widgets/custom_floating_button.dart'; +import '../../../widgets/custom_icon_button.dart'; +import '../../../widgets/custom_image_view.dart'; +import '../../ReuseableWidgets/BottomAppBarWidget.dart'; + +class SettingScreen extends StatelessWidget { + const SettingScreen({Key? key}) + : super( + key: key, + ); + + @override + Widget build(BuildContext context) { + return SafeArea( + child: Scaffold( + body: Container( + width: double.maxFinite, + padding: EdgeInsets.symmetric(vertical: 8.v), + child: Column( + children: [ + SizedBox(height: 52.v), + Expanded( + child: SingleChildScrollView( + child: Container( + padding: EdgeInsets.symmetric(horizontal: 32.h), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only(bottom: 15.v), + child: CustomIconButton( + height: 32.adaptSize, + width: 32.adaptSize, + // padding: EdgeInsets.all(3.h), + decoration: IconButtonStyleHelper.outlineIndigo, + onTap: () { + onTapBtnArrowleftone(context); + }, + child: CustomImageView( + svgPath: ImageConstant.imgArrowleft, + height: 32.adaptSize, + width: 32.adaptSize, + ), + ), + ), + Padding( + padding: EdgeInsets.only(left: 22.h), + child: Text( + "Settings", + style: theme.textTheme.headlineLarge, + ), + ) + ], + ), + SizedBox(height: 16.v), + Padding( + padding: EdgeInsets.only(left: 10.h, right: 16.h), + child: Text( + "Account", + style: theme.textTheme.titleMedium, + ), + ), + SizedBox(height: 6.v), + Align( + alignment: Alignment.center, + child: Container( + width: 342.h, + margin: EdgeInsets.only( + left: 6.h, + right: 16.h, + ), + padding: EdgeInsets.symmetric( + horizontal: 16.h, + vertical: 12.v, + ), + decoration: AppDecoration.fillBlueGray.copyWith( + borderRadius: BorderRadiusStyle.roundedBorder6, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Row( + children: [ + CustomImageView( + imagePath: + ImageConstant.setting_profile_logo, + height: 30.adaptSize, + width: 30.adaptSize, + ), + Padding( + padding: EdgeInsets.only( + left: 36.h, + top: 4.v, + ), + child: Text( + "Edit profile", + style: theme.textTheme.titleMedium, + ), + ) + ], + ), + SizedBox(height: 9.v), + Row( + children: [ + CustomImageView( + imagePath: + ImageConstant.setting_securitylogo, + height: 30.adaptSize, + width: 30.adaptSize, + ), + Padding( + padding: EdgeInsets.only( + left: 36.h, + top: 4.v, + ), + child: Text( + "security", + style: theme.textTheme.titleMedium, + ), + ) + ], + ), + SizedBox(height: 9.v), + Row( + children: [ + CustomImageView( + imagePath: + ImageConstant.setting_notification, + height: 30.adaptSize, + width: 30.adaptSize, + ), + Padding( + padding: EdgeInsets.only( + left: 36.h, + top: 2.v, + bottom: 3.v, + ), + child: Text( + "Notifications", + style: theme.textTheme.titleMedium, + ), + ) + ], + ), + SizedBox(height: 9.v), + Row( + children: [ + CustomImageView( + imagePath: ImageConstant.setting_privacy, + height: 30.adaptSize, + width: 30.adaptSize, + ), + Padding( + padding: EdgeInsets.only( + left: 36.h, + top: 4.v, + ), + child: Text( + "Privacy", + style: theme.textTheme.titleMedium, + ), + ) + ], + ) + ], + ), + ), + ), + SizedBox(height: 24.v), + _buildColumnsupportab(context), + SizedBox(height: 27.v), + Padding( + padding: EdgeInsets.only(left: 10.h), + child: Text( + "Cache & cellular", + style: theme.textTheme.titleMedium, + ), + ), + SizedBox(height: 21.v), + Align( + alignment: Alignment.center, + child: Container( + width: 342.h, + margin: EdgeInsets.only(right: 20.h), + padding: EdgeInsets.symmetric( + horizontal: 15.h, + vertical: 12.v, + ), + decoration: AppDecoration.fillBlueGray.copyWith( + borderRadius: BorderRadiusStyle.roundedBorder6, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Row( + children: [ + CustomImageView( + imagePath: + ImageConstant.setting_free_space, + height: 30.adaptSize, + width: 30.adaptSize, + ), + Opacity( + opacity: 0.9, + child: Padding( + padding: EdgeInsets.only( + left: 38.h, + top: 5.v, + ), + child: Text( + "Free up space", + style: CustomTextStyles + .titleMediumPrimary, + ), + ), + ) + ], + ), + SizedBox(height: 9.v), + Row( + children: [ + CustomImageView( + imagePath: + ImageConstant.setting_datasaver, + height: 30.adaptSize, + width: 30.adaptSize, + ), + Opacity( + opacity: 0.9, + child: Padding( + padding: EdgeInsets.only( + left: 38.h, + top: 3.v, + bottom: 2.v, + ), + child: Text( + "Data Saver", + style: CustomTextStyles + .titleMediumPrimary, + ), + ), + ) + ], + ) + ], + ), + ), + ), + SizedBox(height: 21.v), + _buildColumnactions(context) + ], + ), + ), + ), + ) + ], + ), + ), + bottomNavigationBar: BottomAppBarWidget(), + floatingActionButton: CustomFloatingButton( + height: 64, + width: 64, + alignment: Alignment.topCenter, + child: CustomImageView( + svgPath: ImageConstant.imgLocation, + height: 32.0.v, + width: 32.0.h, + ), + ), + floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, + ), + ); + } + + /// Section Widget + Widget _buildColumnsupportab(BuildContext context) { + return Padding( + padding: EdgeInsets.only(right: 16.h), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only(left: 11.h), + child: Text( + "Support & About", + style: theme.textTheme.titleMedium, + ), + ), + SizedBox(height: 3.v), + Container( + width: 342.h, + margin: EdgeInsets.only(left: 6.h), + padding: EdgeInsets.symmetric( + horizontal: 16.h, + vertical: 12.v, + ), + decoration: AppDecoration.fillBlueGray.copyWith( + borderRadius: BorderRadiusStyle.roundedBorder6, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + CustomImageView( + imagePath: ImageConstant.setting_subscription, + height: 30.adaptSize, + width: 30.adaptSize, + ), + Padding( + padding: EdgeInsets.only( + left: 35.h, + top: 4.v, + ), + child: Text( + "My Subscribtion", + style: theme.textTheme.titleMedium, + ), + ) + ], + ), + SizedBox(height: 9.v), + Row( + children: [ + CustomImageView( + imagePath: ImageConstant.setting_help, + height: 30.adaptSize, + width: 30.adaptSize, + ), + Padding( + padding: EdgeInsets.only( + left: 36.h, + top: 5.v, + ), + child: Text( + "Help & Support", + style: theme.textTheme.titleMedium, + ), + ) + ], + ), + SizedBox(height: 9.v), + Padding( + padding: EdgeInsets.only(right: 91.h), + child: Row( + children: [ + CustomImageView( + imagePath: ImageConstant.setting_terms, + height: 30.adaptSize, + width: 30.adaptSize, + ), + Padding( + padding: EdgeInsets.only( + left: 36.h, + top: 2.v, + bottom: 3.v, + ), + child: Text( + "Terms and Policies", + style: theme.textTheme.titleMedium, + ), + ) + ], + ), + ) + ], + ), + ) + ], + ), + ); + } + + /// Section Widget + Widget _buildColumnactions(BuildContext context) { + var fillIndigoC; + return Padding( + padding: EdgeInsets.only(right: 16.h), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only(left: 11.h), + child: Text( + "Actions", + style: theme.textTheme.titleMedium, + ), + ), + SizedBox(height: 6.v), + Container( + width: 342.h, + margin: EdgeInsets.only(left: 6.h), + padding: EdgeInsets.all(12.h), + decoration: AppDecoration.fillBlueGray.copyWith( + borderRadius: BorderRadiusStyle.roundedBorder6, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Row( + children: [ + CustomImageView( + imagePath: ImageConstant.setting_reportspam, + height: 30.adaptSize, + width: 30.adaptSize, + ), + Padding( + padding: EdgeInsets.only( + left: 36.h, + top: 5.v, + ), + child: Text( + "Report a problem", + style: theme.textTheme.titleMedium, + ), + ) + ], + ), + SizedBox(height: 9.v), + Row( + children: [ + CustomImageView( + imagePath: ImageConstant.setting_addaccount, + height: 30.adaptSize, + width: 30.adaptSize, + ), + Padding( + padding: EdgeInsets.only( + left: 36.h, + top: 3.v, + bottom: 2.v, + ), + child: Text( + "Add account", + style: theme.textTheme.titleMedium, + ), + ) + ], + ), + SizedBox(height: 9), + GestureDetector( + // onTap: () => _logoutUser(), // Define the action on tap + + child: Row( + children: [ + CustomImageView( + imagePath: ImageConstant.setting_logout, + height: 30.adaptSize, + width: 30.adaptSize, + ), + Padding( + padding: EdgeInsets.only( + left: 36.h, + top: 5.v, + ), + child: Text( + "Log out", + style: theme.textTheme.titleMedium, + ), + ) + ], + ), + ), + ], + ), + ) + ], + ), + ); + } + + /// Section Widget + Widget _buildBottomappbarsea(BuildContext context) { + return SizedBox( + child: SizedBox( + height: 115.v, + width: 409.h, + child: Stack( + alignment: Alignment.topCenter, + children: [ + Align( + alignment: Alignment.bottomCenter, + child: Container( + width: 409.h, + margin: EdgeInsets.only(top: 35.v), + padding: EdgeInsets.symmetric( + horizontal: 13.h, + vertical: 15.v, + ), + decoration: BoxDecoration( + image: DecorationImage( + image: fs.Svg( + ImageConstant.imgGroup152, + ), + fit: BoxFit.cover, + ), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + CustomIconButton( + height: 50.adaptSize, + width: 50.adaptSize, + // padding: EdgeInsets.all(13.h), + child: CustomImageView( + svgPath: ImageConstant.imgSearch, + ), + ), + Padding( + padding: EdgeInsets.only(left: 27.h), + child: CustomIconButton( + height: 50.adaptSize, + width: 50.adaptSize, + // padding: EdgeInsets.all(12.h), + child: CustomImageView( + svgPath: ImageConstant.imgBxCricketBall, + ), + ), + ), + Padding( + padding: EdgeInsets.only(left: 123.h), + child: CustomIconButton( + height: 50.adaptSize, + width: 50.adaptSize, + // padding: EdgeInsets.all(12.h), + child: CustomImageView( + svgPath: ImageConstant.imgFluentLive24Filled, + ), + ), + ), + Padding( + padding: EdgeInsets.only(left: 26.h), + child: CustomIconButton( + height: 50.adaptSize, + width: 50.adaptSize, + // padding: EdgeInsets.all(10.h), + child: CustomImageView( + svgPath: ImageConstant.imgNotification, + ), + ), + ) + ], + ), + ), + ), + CustomFloatingButton( + height: 64, + width: 64, + alignment: Alignment.topCenter, + child: CustomImageView( + svgPath: ImageConstant.imgLocation, + height: 32.0.v, + width: 32.0.h, + ), + ) + ], + ), + ), + ); + } + + /// Navigates back to the previous screen. + onTapBtnArrowleftone(BuildContext context) { + Navigator.pop(context); + } + + // Future _logoutUser() async { + // try { + // SharedPreferences prefs = await SharedPreferences.getInstance(); + + // // Remove 'userData' and 'isLoggedIn' from SharedPreferences + // await prefs.remove('userData'); + // await prefs.remove('isLoggedIn'); + // String logouturl = "${ApiConstants.baseUrl}/token/logout"; + // var response = await http.get(Uri.parse(logouturl)); + // if (response.statusCode == 401) { + // LogoutService.logout(); + // } + // if (response.statusCode <= 209) { + // // ignore: use_build_context_synchronously + // Navigator.pushAndRemoveUntil( + // context, + // MaterialPageRoute(builder: (context) => const LoginScreenF(false)), + // (route) => false, // Remove all routes from the stack + // ); + // } else { + // const Text('failed to logout'); + // } + // } catch (error) { + // print('Error occurred during logout: $error'); + // } + // } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/sys_params/sys_params_screen.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/sys_params/sys_params_screen.dart new file mode 100644 index 0000000..37f8a0f --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/sys_params/sys_params_screen.dart @@ -0,0 +1,136 @@ +import 'package:flutter/material.dart'; +import 'package:google_fonts/google_fonts.dart'; +import 'package:image_picker/image_picker.dart'; +import 'dart:io'; + +class SysParamsScreen extends StatefulWidget { + const SysParamsScreen({super.key}); + + @override + State createState() => _SysParamsScreenState(); +} + +class _SysParamsScreenState extends State { + File? _image; + bool _isLoading = false; // Variable to manage the loading state + + Future _pickImage() async { + final picker = ImagePicker(); + final pickedFile = await picker.pickImage(source: ImageSource.gallery); + + if (pickedFile != null) { + setState(() { + _image = File(pickedFile.path); + }); + } + } + + Future _saveImage() async { + if (_image == null) return; // No image to save + + setState(() { + _isLoading = true; // Start loading + }); + + // Simulate image upload (replace with actual upload logic) + await Future.delayed(const Duration(seconds: 2)); + + + setState(() { + _isLoading = false; // Stop loading + }); + + // Show a dialog or a message that the upload was successful + showDialog( + context: context, + builder: (context) => AlertDialog( + title: const Text('Upload Complete'), + content: const Text('The image has been successfully uploaded.'), + actions: [ + TextButton( + onPressed: () { + Navigator.of(context).pop(); + }, + child: const Text('OK'), + ), + ], + ), + ); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text( + "System parameters", + style: GoogleFonts.getFont('Poppins', color: Colors.black), + ), + ), + body: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + _image == null + ? const Text('No image selected.') + : Column( + children: [ + CircleAvatar( + radius: 150, + backgroundImage: FileImage(_image!), + ), + const SizedBox(height: 30), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "Uploaded logo path", + style: GoogleFonts.getFont('Poppins', + color: Colors.black54, + fontWeight: FontWeight.bold), + ), + SizedBox(height: 10), + Text( + _image!.path, + style: GoogleFonts.getFont('Poppins', color: Colors.black54), + ), + ], + ), + ], + ), + const SizedBox(height: 20), + ElevatedButton( + onPressed: _isLoading ? null : _pickImage, + style: ElevatedButton.styleFrom( + foregroundColor: Colors.white, + backgroundColor: Colors.black, + minimumSize: Size(double.infinity, 50), + ), + child: const Text('Upload Logo/Image'), + ), + const SizedBox(height: 10), + ElevatedButton( + onPressed: _isLoading ? null : _saveImage, + style: ElevatedButton.styleFrom( + foregroundColor: Colors.white, + backgroundColor: Colors.black, + minimumSize: Size(double.infinity, 50), + ), + child: _isLoading + ? const SizedBox( + width: 24, + height: 24, + child: CircularProgressIndicator( + color: Colors.white, + strokeWidth: 2, + ), + ) + : const Text('Save'), + ), + ], + ), + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/sys_params/sys_params_serverice.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/sys_params/sys_params_serverice.dart new file mode 100644 index 0000000..a53a3d6 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/MenuScreen/sys_params/sys_params_serverice.dart @@ -0,0 +1,13 @@ +import 'package:base_project/hadwin_components.dart'; +import 'package:dio/dio.dart'; + +class SysParamsServerice{ + Dio dio = Dio(); + + Future uploadedImg()async{ + final res = await dio.get('$baseUrl/FileUpload/Uploadeddocs/{product_id}/sysparam?file={file}'); + } + Future getUploadedImg()async{ + final res = await dio.get('$baseUrl/FileUpload/Uploadeddocs/{product_id}/sysparam'); + } +} \ No newline at end of file diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/ReportBuilder/ReportBuilderScreen.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/ReportBuilder/ReportBuilderScreen.dart new file mode 100644 index 0000000..7265b85 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/ReportBuilder/ReportBuilderScreen.dart @@ -0,0 +1,345 @@ +import 'dart:convert'; +import 'package:flutter/material.dart'; +import 'package:shared_preferences/shared_preferences.dart'; +import '../../../utils/image_constant.dart'; +import '../../../utils/size_utils.dart'; +import '../../../providers/token_manager.dart'; +import '../../../resources/api_constants.dart'; +import 'package:http/http.dart' as http; + +import '../../../widgets/app_bar/appbar_image.dart'; +import '../../../widgets/app_bar/appbar_title.dart'; +import '../../../widgets/app_bar/custom_app_bar.dart'; +import '../LogoutService/Logoutservice.dart'; +import 'reportbuilderedit.dart'; +import 'reportquery.dart'; + +class ReportPage extends StatefulWidget { + @override + _ReportPageState createState() => _ReportPageState(); +} + +class _ReportPageState extends State { + List> reports = []; + + Map userData = {}; + + getUserData() async { + SharedPreferences prefs = await SharedPreferences.getInstance(); + var userdatastr = prefs.getString('userData'); + if (userdatastr != null) { + try { + setState(() { + userData = json.decode(userdatastr); + }); + print(userData['token']); + } catch (e) { + print("error is ..................$e"); + } + } + } + + @override + void initState() { + getUserData(); + super.initState(); + fetchData(); + } + + Future fetchData() async { + final token = await TokenManager.getToken(); + final String baseUrl = ApiConstants.baseUrl; + final String apiUrl = '$baseUrl/Rpt_builder2/Rpt_builder2'; + try { + final response = await http.get( + Uri.parse(apiUrl), + headers: { + 'Authorization': 'Bearer $token', + }, + ); + if (response.statusCode == 401) { + LogoutService.logout(); + } + if (response.statusCode == 200) { + final List jsonData = json.decode(response.body); + setState(() { + reports = List>.from(jsonData); + }); + } else { + throw Exception('Failed to load data: ${response.reasonPhrase}'); + } + } catch (e) { + throw Exception('Failed to load data: $e'); + } + } + + void _showAddReportPopup() { + TextEditingController reportNameController = TextEditingController(); + TextEditingController descriptionController = TextEditingController(); + bool isActive = false; // Initially set to false + + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: const Text("Add Report"), + content: StatefulBuilder( + builder: (BuildContext context, StateSetter setState) { + return Column( + mainAxisSize: MainAxisSize.min, + children: [ + TextField( + controller: reportNameController, + decoration: InputDecoration(labelText: 'Report Name'), + ), + TextField( + controller: descriptionController, + decoration: InputDecoration(labelText: 'Description'), + ), + Row( + children: [ + Text("Active"), + StatefulBuilder( + builder: + (BuildContext context, StateSetter switchState) { + return Switch( + value: isActive, + onChanged: (bool newValue) { + switchState(() { + isActive = newValue; // Update isActive + }); + }, + ); + }, + ), + ], + ), + ], + ); + }, + ), + actions: [ + TextButton( + child: Text("Cancel"), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + TextButton( + child: Text("Submit"), + onPressed: () async { + String reportName = reportNameController.text; + String description = descriptionController.text; + final token = await TokenManager.getToken(); + const String baseUrlSureOps = ApiConstants.baseUrl; + const String apiUrl = + '$baseUrlSureOps/Rpt_builder2/Rpt_builder2'; + try { + final response = await http.post( + Uri.parse(apiUrl), + headers: { + 'Authorization': 'Bearer $token', + 'Content-Type': 'application/json', + }, + body: jsonEncode({ + "reportName": reportName, + "description": description, + "active": isActive, + }), + ); + if (response.statusCode == 401) { + LogoutService.logout(); + } + if (response.statusCode >= 200 && + response.statusCode <= 209) { + print("done"); + } else { + throw Exception( + 'Failed to load data: ${response.statusCode}'); + } + } catch (e) { + throw Exception('Failed to load data: $e'); + } + setState(() { + fetchData(); + }); + Navigator.of(context).pop(); + }, + ), + ], + ); + }, + ); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: CustomAppBar( + height: getVerticalSize(49), + leadingWidth: 40, + leading: AppbarImage( + height: getSize(24), + width: getSize(24), + svgPath: ImageConstant.imgArrowleft, + margin: getMargin(left: 16, top: 12, bottom: 13), + onTap: () { + Navigator.pop(context); + }), + centerTitle: true, + title: AppbarTitle(text: "Report"), + actions: [ + GestureDetector( + child: Icon( + Icons.add, + color: Colors.black, + size: 20, + ), + onTap: () { + _showAddReportPopup(); + setState(() { + fetchData(); + }); + }, + ), + const SizedBox( + width: 20, + ) + ]), + body: SingleChildScrollView( + scrollDirection: Axis.vertical, + child: SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: DataTable( + columns: const [ + DataColumn( + label: Text( + 'Go To', + style: TextStyle( + color: Colors.black, + fontWeight: FontWeight.bold, + fontSize: 12, + ), + )), + DataColumn( + label: Text('Report Name', + style: TextStyle( + color: Colors.black, + fontWeight: FontWeight.bold, + fontSize: 12, + ))), + DataColumn( + label: Text('Report Description', + style: TextStyle( + color: Colors.black, + fontWeight: FontWeight.bold, + fontSize: 12, + ))), + DataColumn( + label: Text('Active', + style: TextStyle( + color: Colors.black, + fontWeight: FontWeight.bold, + fontSize: 12, + ))), + DataColumn( + label: Text('Folder Name', + style: TextStyle( + color: Colors.black, + fontWeight: FontWeight.bold, + fontSize: 12, + ))), + DataColumn( + label: Text('Action', + style: TextStyle( + color: Colors.black, + fontWeight: FontWeight.bold, + fontSize: 12, + ))), + ], + rows: reports.map((report) { + return DataRow(cells: [ + DataCell(IconButton( + icon: Icon(Icons.settings_applications_rounded), + onPressed: () { + if (report['Rpt_builder2_lines'].length != 0 && + report['Rpt_builder2_lines'][0]['model'] != '') { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + ReportEditPage(report['id'])), + ); + } else { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => ReportQuery(report)), + ); + } + }, + )), + DataCell(Text(report['reportName'] ?? '', + style: const TextStyle( + color: Colors.black, + fontWeight: FontWeight.w500, + fontSize: 10, + ))), + DataCell(Text(report['description'] ?? '', + style: const TextStyle( + color: Colors.black, + fontWeight: FontWeight.w500, + fontSize: 10, + ))), + DataCell(Text(report['active'].toString(), + style: const TextStyle( + color: Colors.black, + fontWeight: FontWeight.w500, + fontSize: 10, + ))), + DataCell(Text(report['folderName'] ?? '', + style: const TextStyle( + color: Colors.black, + fontWeight: FontWeight.w500, + fontSize: 10, + ))), + DataCell(IconButton( + icon: Icon(Icons.delete), + onPressed: () async { + final token = await TokenManager.getToken(); + int reportid = report['id']; + const String baseUrlSureOps = ApiConstants.baseUrl; + String apiUrl = + '$baseUrlSureOps/Rpt_builder2/Rpt_builder2/$reportid'; + try { + final response = await http.delete( + Uri.parse(apiUrl), + headers: { + 'Authorization': 'Bearer $token', + }, + ); + if (response.statusCode == 401) { + LogoutService.logout(); + } + if (response.statusCode >= 200 && + response.statusCode <= 209) { + print("done"); + } else { + throw Exception( + 'Failed to load data: ${response.statusCode}'); + } + } catch (e) { + throw Exception('Failed to load data: $e'); + } + setState(() { + fetchData(); + }); + }, + )), + ]); + }).toList(), + ), + ), + )); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/ReportBuilder/report_builder_edit_f.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/ReportBuilder/report_builder_edit_f.dart new file mode 100644 index 0000000..3606218 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/ReportBuilder/report_builder_edit_f.dart @@ -0,0 +1,268 @@ +import 'dart:convert'; + +import 'package:flutter/material.dart'; + +import '../../../utils/image_constant.dart'; +import '../../../utils/size_utils.dart'; +import '../../../providers/token_manager.dart'; +import '../../../resources/api_constants.dart'; +import 'package:http/http.dart' as http; + +import '../../../widgets/app_bar/appbar_image.dart'; +import '../../../widgets/app_bar/appbar_title.dart'; +import '../../../widgets/app_bar/custom_app_bar.dart'; + +import '../Login Screen/CustomButton.dart'; +import '../LogoutService/Logoutservice.dart'; + +class NodeEditProperties { + String stdParamHtml = ''; + String adhocParamHtml = ''; + String columnStr = ''; + String connName = ''; + String dateParamReq = ''; + String sqlStr = ''; +} + +class ReportEditPageF extends StatefulWidget { + final int id; + ReportEditPageF(this.id); + @override + _ReportEditPageFState createState() => _ReportEditPageFState(); +} + +class _ReportEditPageFState extends State { + final TextEditingController connectionNameController = + TextEditingController(); + final TextEditingController dateParamReqController = TextEditingController(); + final TextEditingController stdParamHtmlController = TextEditingController(); + final TextEditingController adhocParamHtmlController = + TextEditingController(); + final TextEditingController columnStrController = TextEditingController(); + final TextEditingController sqlStrController = TextEditingController(); + + NodeEditProperties nodeEditProperties = NodeEditProperties(); + late Map ReportData; + late List builderLine; + late Map builderLineData; + List> databases = []; + List dateyesno = ["Yes", "No"]; + late int lineId; + + @override + void initState() { + super.initState(); + fetchdata(); + fetchdatabases(); + } + + //SqlworkbenchSqlcont/sql + Future fetchdatabases() async { + final token = await TokenManager.getToken(); + final String baseUrl = ApiConstants.baseUrl; + final String apiUrl = '$baseUrl/SqlworkbenchSqlcont/sql'; + try { + final response = await http.get( + Uri.parse(apiUrl), + headers: { + 'Authorization': 'Bearer $token', + }, + ); + if (response.statusCode == 401) { + LogoutService.logout(); + } + if (response.statusCode == 200) { + final dynamic jsonData = json.decode(response.body); + setState(() { + databases = List>.from(jsonData); + print(databases); + }); + } else { + throw Exception('Failed to load data: ${response.reasonPhrase}'); + } + } catch (e) { + throw Exception('Failed to load data: $e'); + } + } + + Future fetchdata() async { + int idhere = widget.id; + final token = await TokenManager.getToken(); + final String baseUrl = ApiConstants.baseUrl; + final String apiUrl = + '$baseUrl/Rpt_builder2/Rpt_builder2/' + idhere.toString(); + try { + final response = await http.get( + Uri.parse(apiUrl), + headers: { + 'Authorization': 'Bearer $token', + }, + ); + if (response.statusCode == 401) { + LogoutService.logout(); + } + if (response.statusCode == 200) { + final dynamic jsonData = json.decode(response.body); + setState(() { + ReportData = Map.from(jsonData); + builderLine = ReportData['rpt_builder2_lines']; + lineId = builderLine[0]['id']; + if (builderLine[0]['model'] != '') { + String model = builderLine[0]['model']; + print(model); + Map jsonModel = json.decode(model); + builderLineData = jsonModel; + stdParamHtmlController.text = builderLineData['std_param_html']; + adhocParamHtmlController.text = builderLineData['adhoc_param_html']; + columnStrController.text = builderLineData['column_str']; + sqlStrController.text = builderLineData['sql_str']; + dateParamReqController.text = builderLineData['date_param_req']; + connectionNameController.text = builderLineData['conn_name']; + } + }); + } else { + throw Exception('Failed to load data: ${response.reasonPhrase}'); + } + } catch (e) { + throw Exception('Failed to load data: $e'); + } + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: CustomAppBar( + height: getVerticalSize(49), + leadingWidth: 40, + leading: AppbarImage( + height: getSize(24), + width: getSize(24), + svgPath: ImageConstant.imgArrowleft, + margin: getMargin(left: 16, top: 12, bottom: 13), + onTap: () { + Navigator.pop(context); + }), + centerTitle: true, + title: AppbarTitle(text: "Report Edit"), + ), + body: SingleChildScrollView( + child: Padding( + padding: EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Text( + 'REPORT SET UP - Project Details Report (${widget.id})', + style: TextStyle( + fontWeight: FontWeight.w300, + ), + ), + SizedBox(width: 10), + ], + ), + Divider(), + DropdownButton( + value: connectionNameController.text.isEmpty + ? "value Not available" + : connectionNameController.text, // Set the default value + onChanged: (String? newValue) { + setState(() { + connectionNameController.text = newValue!; + }); + }, + items: databases.map>( + (Map database) { + return DropdownMenuItem( + value: database['name'], + child: Text(database['name']), + ); + }).toList(), + ), + DropdownButton( + value: dateyesno.contains(dateParamReqController.text) + ? dateParamReqController.text + : "Select the value", // Set the default value based on the controller's value or "Select the value" if it doesn't match any item + onChanged: (String? newValue) { + setState(() { + dateParamReqController.text = newValue!; + }); + }, + items: dateyesno.map>((String param) { + return DropdownMenuItem( + value: param, + child: Text(param), + ); + }).toList(), + ), + TextField( + controller: stdParamHtmlController, + decoration: InputDecoration( + labelText: 'Standard Parameter String (html)'), + maxLines: 3, + ), + TextField( + controller: adhocParamHtmlController, + decoration: + InputDecoration(labelText: 'Adhoc Parameter String (html)'), + maxLines: 3, + ), + TextField( + controller: columnStrController, + decoration: InputDecoration(labelText: 'Column String (html)'), + maxLines: 3, + ), + TextField( + controller: sqlStrController, + decoration: InputDecoration(labelText: 'SQL String'), + maxLines: 3, + ), + SizedBox(height: 20), + CustomButton( + height: getVerticalSize(50), + text: "Update", + onTap: () async { + builderLineData['std_param_html'] = + stdParamHtmlController.text; + builderLineData['adhoc_param_html'] = + adhocParamHtmlController.text; + builderLineData['column_str'] = columnStrController.text; + builderLineData['sql_str'] = sqlStrController.text; + builderLineData['date_param_req'] = + dateParamReqController.text; + builderLineData['conn_name'] = connectionNameController.text; + builderLine[0]['model'] = builderLineData; + String jsonString = json.encode(builderLineData); + final token = await TokenManager.getToken(); + final String baseUrl = ApiConstants.baseUrl; + final String apiUrl = + '$baseUrl/Rpt_builder2_lines/update/$lineId'; + try { + final response = await http.put(Uri.parse(apiUrl), + headers: { + 'Authorization': 'Bearer $token', + 'Content-Type': 'application/json', + }, + body: json.encode({'model': jsonString})); + if (response.statusCode == 401) { + LogoutService.logout(); + } + if (response.statusCode <= 209) { + print("success"); + Navigator.of(context).pop(); + } else { + print(response.statusCode); + } + } catch (e) { + throw Exception('Failed to Update: $e'); + } + }, + ), + ], + ), + ), + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/ReportBuilder/report_builder_screen_f.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/ReportBuilder/report_builder_screen_f.dart new file mode 100644 index 0000000..46eb01b --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/ReportBuilder/report_builder_screen_f.dart @@ -0,0 +1,411 @@ +import 'dart:convert'; + +import 'package:flutter/material.dart'; +import 'package:shared_preferences/shared_preferences.dart'; +import '../../../utils/size_utils.dart'; +import '../../../providers/token_manager.dart'; +import '../../../resources/api_constants.dart'; +import 'package:http/http.dart' as http; + +import '../../../widgets/app_bar/appbar_title.dart'; +import '../../../widgets/app_bar/custom_app_bar.dart'; +import '../../theme/app_style.dart'; +import '../../utils/color_constants.dart'; +import '../LogoutService/Logoutservice.dart'; +import '../MenuScreen/new_dash/Newdashboard.dart'; +import 'report_builder_edit_f.dart'; +import 'report_query_f.dart'; + +class ReportPageF extends StatefulWidget { + @override + _ReportPageFState createState() => _ReportPageFState(); +} + +class _ReportPageFState extends State { + List> reports = []; + var _currentIndex = 1; + + Map userData = {}; + + getUserData() async { + SharedPreferences prefs = await SharedPreferences.getInstance(); + var userdatastr = prefs.getString('userData'); + if (userdatastr != null) { + try { + setState(() { + userData = json.decode(userdatastr); + }); + print(userData['token']); + } catch (e) { + print("error is ..................$e"); + } + } + } + + @override + void initState() { + getUserData(); + super.initState(); + fetchData(); + } + + Future fetchData() async { + final token = await TokenManager.getToken(); + final String baseUrl = ApiConstants.baseUrl; + final String apiUrl = '$baseUrl/Rpt_builder2/Rpt_builder2'; + try { + final response = await http.get( + Uri.parse(apiUrl), + headers: { + 'Authorization': 'Bearer $token', + }, + ); + if (response.statusCode == 401) { + LogoutService.logout(); + } + if (response.statusCode == 200) { + final List jsonData = json.decode(response.body); + setState(() { + reports = List>.from(jsonData); + }); + } else { + throw Exception('Failed to load data: ${response.reasonPhrase}'); + } + } catch (e) { + throw Exception('Failed to load data: $e'); + } + } + + void _showAddReportPopup() { + TextEditingController reportNameController = TextEditingController(); + TextEditingController descriptionController = TextEditingController(); + bool isActive = false; // Initially set to false + + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: const Text("Add Report"), + content: StatefulBuilder( + builder: (BuildContext context, StateSetter setState) { + return Column( + mainAxisSize: MainAxisSize.min, + children: [ + TextField( + controller: reportNameController, + decoration: InputDecoration(labelText: 'Report Name'), + ), + TextField( + controller: descriptionController, + decoration: InputDecoration(labelText: 'Description'), + ), + Row( + children: [ + Text("Active"), + StatefulBuilder( + builder: + (BuildContext context, StateSetter switchState) { + return Switch( + value: isActive, + onChanged: (bool newValue) { + switchState(() { + isActive = newValue; // Update isActive + }); + }, + ); + }, + ), + ], + ), + ], + ); + }, + ), + actions: [ + TextButton( + child: Text("Cancel"), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + TextButton( + child: Text("Submit"), + onPressed: () async { + String reportName = reportNameController.text; + String description = descriptionController.text; + final token = await TokenManager.getToken(); + const String baseUrlSureOps = ApiConstants.baseUrl; + const String apiUrl = + '$baseUrlSureOps/Rpt_builder2/Rpt_builder2'; + try { + final response = await http.post( + Uri.parse(apiUrl), + headers: { + 'Authorization': 'Bearer $token', + 'Content-Type': 'application/json', + }, + body: jsonEncode({ + "reportName": reportName, + "description": description, + "active": isActive, + }), + ); + if (response.statusCode == 401) { + LogoutService.logout(); + } + if (response.statusCode >= 200 && + response.statusCode <= 209) { + print("done"); + } else { + throw Exception( + 'Failed to load data: ${response.statusCode}'); + } + } catch (e) { + throw Exception('Failed to load data: $e'); + } + setState(() { + fetchData(); + }); + Navigator.of(context).pop(); + }, + ), + ], + ); + }, + ); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: CustomAppBar( + height: getVerticalSize(49), + leadingWidth: 50, + leading: IconButton( + onPressed: () { + Navigator.pop(context); + }, + icon: Icon(Icons.arrow_back)), + // leading: AppbarImage( + // height: getSize(24), + // width: getSize(24), + // svgPath: ImageConstant.imgArrowleft, + // margin: getMargin(left: 16, top: 12, bottom: 13), + // onTap: () { + // Navigator.pop(context); + // }), + centerTitle: true, + title: AppbarTitle(text: "Report"), + actions: [ + GestureDetector( + child: Icon( + Icons.add, + color: Colors.black, + size: 20, + ), + onTap: () { + _showAddReportPopup(); + setState(() { + fetchData(); + }); + }, + ), + const SizedBox( + width: 20, + ) + ]), + body: SingleChildScrollView( + scrollDirection: Axis.vertical, + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + const SizedBox( + height: 12, + ), + GridView.builder( + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 2, + mainAxisSpacing: 5, + crossAxisSpacing: 5, + childAspectRatio: 2.5), + scrollDirection: Axis.vertical, + shrinkWrap: true, + itemCount: reports.length, + itemBuilder: (ctx, index) { + return GestureDetector( + child: Dismissible( + key: UniqueKey(), + onDismissed: (direction) async { + print('started'); + final token = await TokenManager.getToken(); + int reportid = reports[index]['id']; + const String baseUrlSureOps = ApiConstants.baseUrl; + String apiUrl = + '$baseUrlSureOps/Rpt_builder2/Rpt_builder2/$reportid'; + try { + final response = await http.delete( + Uri.parse(apiUrl), + headers: { + 'Authorization': 'Bearer $token', + }, + ); + if (response.statusCode == 401) { + LogoutService.logout(); + } + if (response.statusCode >= 200 && + response.statusCode <= 209) { + print("done"); + ScaffoldMessenger.of(context).showSnackBar( + SnackBar(content: Text('deleted'))); + } else { + throw Exception( + 'Failed to load data: ${response.statusCode}'); + } + } catch (e) { + throw Exception('Failed to load data: $e'); + } + setState(() { + fetchData(); + }); + }, + child: InkWell( + onTap: () { + if (reports[index]['Rpt_builder2_lines'].length != + 0 && + reports[index]['Rpt_builder2_lines'][0] + ['model'] != + '') { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + ReportEditPageF(reports[index]['id'])), + ); + } else { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + ReportQueryF(reports[index])), + ); + } + }, + child: Card( + margin: EdgeInsets.symmetric( + horizontal: 8, vertical: 6), + color: index % 2 == 0 + ? Color.fromARGB(255, 233, 218, 235) + : Color.fromARGB(255, 212, 204, 229), + child: Container( + padding: EdgeInsets.symmetric( + vertical: 4, + ), + margin: EdgeInsets.symmetric( + horizontal: 15, + ), + height: 65, + width: MediaQuery.of(context).size.width - 40, + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Container( + width: 150, + child: Text( + reports[index]['reportName'], + overflow: TextOverflow.ellipsis, + style: AppStyle.fieldlabel + .copyWith( + color: ColorConstant + .purple900), + )), + const SizedBox( + width: 100, + ), + + //Text(reports[index]['active'].toString()), + + SizedBox(height: 6), + Text( + reports[index]['description'] + .toString(), + style: AppStyle.txtpoppinsmedium16 + .copyWith( + fontSize: 14, + fontWeight: + FontWeight.w500), + ) + ], + ), + ], + ))), + ), + ), + ); + }), + ], + )), + bottomNavigationBar: BottomNavigationBar( + showSelectedLabels: false, // <-- HERE + showUnselectedLabels: false, + elevation: 12, + currentIndex: _currentIndex, + selectedItemColor: Color(0xFF5E41D3), // Selected item color + unselectedItemColor: Colors.black, // Unselected item color + onTap: (index) { + setState(() { + _currentIndex = index; + if (_currentIndex == 2) { + _showAddReportPopup(); + } + if (_currentIndex == 0) { + setState(() {}); + } + }); + }, + items: [ + BottomNavigationBarItem( + icon: Icon( + Icons.window_rounded, + color: ColorConstant.purple211, + ), + label: 'wireframes', + backgroundColor: ColorConstant.purple211, + ), + BottomNavigationBarItem( + icon: SizedBox.shrink(), + label: '', + ), + BottomNavigationBarItem( + icon: Icon( + Icons.add, + color: ColorConstant.purple211, + ), + label: 'Add Wireframe', + backgroundColor: ColorConstant.purple211, + ), + ], + ), + floatingActionButton: FloatingActionButton( + onPressed: () { + // Handle button press + Navigator.of(context) + .push(MaterialPageRoute(builder: (ctx) => Newdashboard())); + }, + child: Image.asset( + 'assets/images/panther.png', + height: 40, + width: 40, + ), // Replace with your image path + highlightElevation: 10, + elevation: 15.0, + backgroundColor: ColorConstant.purple211, // Set the color to purple + shape: CircleBorder(), // Make the button circular + ), + floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/ReportBuilder/report_query_f.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/ReportBuilder/report_query_f.dart new file mode 100644 index 0000000..9c5f7a2 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/ReportBuilder/report_query_f.dart @@ -0,0 +1,814 @@ +import 'dart:convert'; + +import 'package:flutter/material.dart'; +import 'package:fluttertoast/fluttertoast.dart'; + +import '../../../utils/image_constant.dart'; +import '../../../utils/size_utils.dart'; +import '../../../providers/token_manager.dart'; +import '../../../resources/api_constants.dart'; +import 'package:http/http.dart' as http; + +import '../../../theme/app_style.dart'; +import '../../../widgets/app_bar/appbar_image.dart'; +import '../../../widgets/app_bar/appbar_title.dart'; +import '../../../widgets/app_bar/custom_app_bar.dart'; + +import '../../../widgets/custom_dropdown_field.dart'; +import '../../utils/color_constants.dart'; +import '../Login Screen/CustomButton.dart'; +import '../LogoutService/Logoutservice.dart'; + +class ReportQueryF extends StatefulWidget { + ReportQueryF(Map report); + + @override + _SQLWorksheetFState createState() => _SQLWorksheetFState(); +} + +class _SQLWorksheetFState extends State { + int tablePrefix = 97; + List selectedTables = []; + List selectedColumns = []; + List columnList = []; + late Map> selectedTableandColumn; + List selectConditionsList = []; + List tableList = []; + + List getFinalDataAfterRunning = []; + String databaseName = ''; + String selectedtable = ''; + String selectedcol = ''; + String selectedcol1 = ''; + String selectedParamter = ''; + String dataParameter = ''; + String foldername = ''; + String selectedquery = ''; + int selectedIndex = 0; + bool isActive = true; + bool tableActive = false; + String selectedRowInfo = ""; + List dataColumns = []; + + @override + void initState() { + super.initState(); + } + + Future fetchTableList() async { + final token = await TokenManager.getToken(); + String baseUrl = ApiConstants.baseUrl; + final apiUrl = '$baseUrl/Table_list/$selectedRowInfo'; + + try { + final response = await http.get( + Uri.parse(apiUrl), + headers: { + 'Authorization': 'Bearer $token', // Include the token in the headers + }, + ); + if (response.statusCode == 401) { + LogoutService.logout(); + } + if (response.statusCode <= 209) { + final List responseData = json.decode(response.body); + tableList = responseData.cast(); + setState(() {}); + print(columnList); + //tableList = responseData; + } else { + Fluttertoast.showToast( + msg: 'Failed to fetch projects', + backgroundColor: Colors.red, + ); + throw Exception("Failed"); + } + } catch (error) { + Fluttertoast.showToast( + msg: 'Error: $error', + backgroundColor: Colors.red, + ); + throw Exception("Failed"); + } + } + + Future fetchColumListByTableName() async { + final token = await TokenManager.getToken(); + String baseUrl = ApiConstants.baseUrl; + String tables = selectedTables.join(","); + print(tables); + final apiUrl = '$baseUrl/Alias_Table_list/$tables'; + try { + final response = await http.get( + Uri.parse(apiUrl), + headers: { + 'Authorization': 'Bearer $token', // Include the token in the headers + }, + ); + if (response.statusCode == 401) { + LogoutService.logout(); + } + if (response.statusCode <= 209) { + final List responseData = json.decode(response.body); + columnList = responseData.cast(); + print(columnList); + setState(() {}); + //tableList = responseData; + } else { + Fluttertoast.showToast( + msg: 'Failed to fetch Data', + backgroundColor: Colors.red, + ); + throw Exception("Failed"); + } + } catch (error) { + Fluttertoast.showToast( + msg: 'Error: $error', + backgroundColor: Colors.red, + ); + throw Exception("Failed"); + } + } + + String Query = ''; + void onAddCondition() { + setState(() { + _showQueryTableDialog(); + }); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: CustomAppBar( + height: getVerticalSize(49), + leadingWidth: 40, + leading: AppbarImage( + height: getSize(24), + width: getSize(24), + svgPath: ImageConstant.imgArrowleftBlueGray900, + margin: getMargin(left: 16, top: 12, bottom: 13), + onTap: () { + Navigator.pop(context); + }), + centerTitle: true, + actions: [ + GestureDetector( + child: Icon( + Icons.edit_outlined, + color: Colors.black, + size: 20, + ), + onTap: () { + _showEditDialog(); + }, + ), + const SizedBox( + width: 20, + ) + ], + title: AppbarTitle(text: 'SQL Works.-$selectedRowInfo')), + body: SingleChildScrollView( + padding: EdgeInsets.all(14), + child: + Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // Text('Table List', style: TextStyle(fontWeight: FontWeight.bold)), + // FormField( + // builder: (FormFieldState state) { + // return InputDecorator( + // decoration: InputDecoration( + // labelText: 'Table List', + // errorText: state.hasError ? state.errorText : null, + // ), + // child: DropdownButtonFormField( + // isDense: true, + // isExpanded: true, + // // value: isActive ? selectedValue : null, // Disable the dropdown if isActive is false + // onChanged: isActive + // ? (newValue) { + // setState(() { + // if (selectedTables.contains(newValue)) { + // selectedTables.remove(newValue); + // } else { + // selectedTables.add(newValue!); + // } + // }); + // } + // : null, + // items: tableList.map((table) { + // return DropdownMenuItem( + // value: table, + // child: Row( + // children: [ + // Checkbox( + // value: selectedTables.contains(table), + // onChanged: (value) { + // setState(() { + // if (selectedTables.contains(table)) { + // selectedTables.remove(table); + // } else { + // selectedTables.add(table); + // } + // }); + // }, + // ), + // Text(table), + // ], + // ), + // ); + // }).toList(), + // ), + // ); + // }, + // ), + Padding( + padding: getPadding(top: 18), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text( + "Table List", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: AppStyle.fieldlabel, + ), + CustomDropdownFormField( + items: tableList.map((table) { + return DropdownMenuItem( + value: table, + child: Row( + children: [ + Checkbox( + value: selectedTables.contains(table), + onChanged: (value) { + setState(() { + if (selectedTables.contains(table)) { + selectedTables.remove(table); + } else { + selectedTables.add(table); + } + }); + }, + activeColor: ColorConstant.blue700, + ), + Text(table, + style: AppStyle + .txtGilroyMedium16Bluegray900), + ], + ), + ); + }).toList(), + onChanged: isActive + ? (newValue) { + setState(() { + if (selectedTables.contains(newValue)) { + selectedTables.remove(newValue); + } else { + selectedTables.add(newValue!.toString()); + } + }); + } + : null, + ) + ], + ), + ), + Text('Selected Tables: ${selectedTables.join(", ")}', + style: AppStyle.txtpoppinsmedium16), + CustomButton( + height: getVerticalSize(50), + text: "Submit", + onTap: isActive + ? () { + setState(() { + fetchColumListByTableName(); + isActive = false; + }); + } + : null, + ), + //-------------------------------------------------------------- + Padding( + padding: getPadding(top: 18), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text( + "Column List", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: AppStyle.fieldlabel, + ), + CustomDropdownFormField( + onChanged: (newValue) { + setState(() { + if (selectedColumns.contains(newValue)) { + selectedColumns.remove(newValue); + } else { + selectedColumns.add(newValue!); + } + }); + }, + items: columnList.map((table) { + return DropdownMenuItem( + value: table, + child: Row( + children: [ + Checkbox( + value: selectedColumns.contains(table), + onChanged: (value) { + setState(() { + if (selectedColumns.contains(table)) { + selectedColumns.remove(table); + } else { + selectedColumns.add(table); + } + }); + }, + ), + Text(table, + style: AppStyle + .txtGilroyMedium16Bluegray900), + ], + ), + ); + }).toList(), + ) + ], + ), + ), + Text('Selected Columns: ${selectedColumns.join(", ")}', + style: AppStyle.txtpoppinsmedium16), + //------------------------------------------------------------------ + SizedBox(height: 16.0), + ], + ), + CustomButton( + height: getVerticalSize(50), + text: "Add Conditions", + onTap: onAddCondition), + SizedBox(height: 16.0), + CustomButton( + height: getVerticalSize(50), + text: "Create Query", + onTap: () async { + List conditiondatastring = []; + conditionData.forEach((element) { + conditiondatastring.add(element['andor'] + + " " + + element['fields_name'] + + element['condition'] + + element['value'] + + " "); + }); + final token = await TokenManager.getToken(); + String baseUrl = ApiConstants.baseUrl; + final apiUrl = '$baseUrl/getQuery'; + + try { + final response = await http.post(Uri.parse(apiUrl), + headers: { + 'Authorization': 'Bearer $token', + 'Content-Type': 'application/json', + }, + body: json.encode({ + "tables": selectedTables, + "columns": selectedColumns, + "conditions": conditiondatastring + })); + if (response.statusCode == 401) { + LogoutService.logout(); + } + print(response.statusCode); + if (response.statusCode <= 209) { + Query = response.body; + setState(() {}); + print(Query); + } else { + Fluttertoast.showToast( + msg: 'Failed to fetch projects', + backgroundColor: Colors.red, + ); + throw Exception("Failed"); + } + } catch (error) { + Fluttertoast.showToast( + msg: 'Error: $error', + backgroundColor: Colors.red, + ); + throw Exception("Failed"); + } + }), + SizedBox(height: 16.0), + TextFormField( + initialValue: Query, + onChanged: (value) { + Query = value; + }, + ), + SizedBox(height: 16.0), + CustomButton( + height: getVerticalSize(50), + text: "Run", + onTap: () async { + final token = await TokenManager.getToken(); + String baseUrl = ApiConstants.baseUrl; + final apiUrl = + '$baseUrl/api/master-query-data?sql_query=$Query'; + + try { + final response = await http.get( + Uri.parse(apiUrl), + headers: { + 'Authorization': 'Bearer $token', + }, + ); + if (response.statusCode == 401) { + LogoutService.logout(); + } + final List responseData = + json.decode(response.body); + print(response.statusCode); + print(Query); + if (response.statusCode <= 209) { + getFinalDataAfterRunning = responseData.map((e) { + final map = e as Map; + return map; + }).toList(); + List keysList = []; + + for (var dynamicItem in getFinalDataAfterRunning) { + if (dynamicItem is Map) { + dynamicItem.keys.forEach((key) { + if (!keysList.contains(key)) { + keysList.add(key); + } + }); + } + } + + dataColumns = keysList; + + print(keysList); // Output: ['id', 'name'] + + print(getFinalDataAfterRunning); + if (!getFinalDataAfterRunning.isEmpty) { + tableActive = true; + } + setState(() {}); + } else { + Fluttertoast.showToast( + msg: 'Failed to fetch Data', + backgroundColor: Colors.red, + ); + throw Exception("Failed"); + } + } catch (error) { + Fluttertoast.showToast( + msg: 'Error: $error', + backgroundColor: Colors.red, + ); + throw Exception("Failed"); + } + }), + SizedBox(height: 16.0), + tableActive + ? + // DataTable( + // columns: getFinalDataAfterRunning.isNotEmpty + // ? dataColumns.map((a) { + // return DataColumn( + // label: Text(a.toString()), + // ); + // }).toList() + // : [], + // rows: getFinalDataAfterRunning.map((data) { + // int count = 0; + // return DataRow( + // cells: data[dataColumns[count]].map(val) { + // return DataCell( + // Text(val.toString()), + // ); + // }).toList(), + // ); + // }).toList(), + // ) + DataTable( + columns: getFinalDataAfterRunning.isNotEmpty + ? dataColumns.map((columnName) { + return DataColumn( + label: Text(columnName.toString()), + ); + }).toList() + : [], + rows: getFinalDataAfterRunning.map((data) { + return DataRow( + cells: dataColumns.map((columnName) { + return DataCell( + Text(data[columnName].toString()), + ); + }).toList(), + ); + }).toList(), + ) + : Text("No Data Available"), + SizedBox(height: 16.0), + ]))); + } + + List> conditionData = []; + + void deleteRow(int index) { + setState(() { + conditionData.removeAt(index); + }); + } + + void onAddLines() { + setState(() { + conditionData.add({ + 'andor': null, + 'fields_name': null, + 'condition': null, + 'value': '', + }); + }); + } + + void onSelected() { + print(conditionData); + } + + void _showQueryTableDialog() { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: Text('Condition Table'), + content: SingleChildScrollView( + child: Column( + children: [ + DataTable( + columns: [ + DataColumn(label: Text('ANDOR')), + DataColumn(label: Text('FIELD NAME')), + DataColumn(label: Text('CONDITION')), + DataColumn(label: Text('VALUE')), + DataColumn(label: Text('Action')), + ], + rows: conditionData.asMap().entries.map((entry) { + int index = entry.key; + Map data = entry.value; + return DataRow( + key: ValueKey( + index), // Set a unique key for each DataRow + cells: [ + DataCell( + DropdownButton( + value: data['andor'], + onChanged: (value) { + setState(() { + data['andor'] = value; + }); + Navigator.of(context).pop(); + _showQueryTableDialog(); + }, + items: ['AND', 'OR'].map((value) { + return DropdownMenuItem( + value: value, + child: Text(value), + ); + }).toList(), + ), + ), + DataCell( + DropdownButton( + value: data['fields_name'], + onChanged: (value) { + setState(() { + data['fields_name'] = value; + }); + Navigator.of(context).pop(); + _showQueryTableDialog(); + }, + items: columnList.map((value) { + return DropdownMenuItem( + value: value, + child: Text(value), + ); + }).toList(), + ), + ), + DataCell( + DropdownButton( + value: data['condition'], + onChanged: (value) { + setState(() { + data['condition'] = value; + }); + Navigator.of(context).pop(); + _showQueryTableDialog(); + }, + items: [ + '=', + '!=', + '<', + '>', + '<=', + '>=', + 'LIKE', + 'BETWEEN', + 'IN' + ].map((value) { + return DropdownMenuItem( + value: value, + child: Text(value), + ); + }).toList(), + ), + ), + DataCell( + TextFormField( + initialValue: data['value'], + onChanged: (value) { + setState(() { + data['value'] = value; + }); + Navigator.of(context).pop(); + _showQueryTableDialog(); + }, + decoration: InputDecoration( + border: InputBorder.none, + ), + ), + ), + DataCell( + IconButton( + icon: Icon(Icons.delete), + onPressed: () { + deleteRow(index); + Navigator.of(context).pop(); + _showQueryTableDialog(); + }, + color: Colors.red, + ), + ), + ], + ); + }).toList(), + ), + ElevatedButton( + onPressed: () { + onAddLines(); + Navigator.of(context).pop(); + _showQueryTableDialog(); + }, + child: Icon(Icons.add), + ), + SizedBox(height: 16.0), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + ElevatedButton( + onPressed: () { + print(conditionData); + Navigator.of(context).pop(); // Close the dialog + }, + child: Text('Cancel'), + ), + ], + ), + ], + ), + ), + ); + }, + ); + } + + // Function to show the edit dialog + void _showEditDialog() { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: Text("Edit Data"), + content: SingleChildScrollView( + scrollDirection: Axis.vertical, + child: SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: FutureBuilder( + future: fetchDataFromApi(), + builder: (context, snapshot) { + if (snapshot.connectionState == ConnectionState.waiting) { + return CircularProgressIndicator(); // Show a loading indicator while fetching data + } else if (snapshot.hasError) { + return Text("Error: ${snapshot.error}"); + } else { + List? data = snapshot.data; + return DataTable( + columns: [ + DataColumn(label: Text('No')), + DataColumn(label: Text('Database Name')), + DataColumn(label: Text('Description')), + DataColumn(label: Text('Active')), + DataColumn(label: Text('Type')), + DataColumn(label: Text('Action')), + ], + rows: List.generate( + data!.length, + (index) { + final rowData = data[index]; + return DataRow( + onSelectChanged: (isSelected) { + if (isSelected != null && isSelected) { + setState(() { + selectedRowInfo = rowData['name']; + fetchTableList(); + }); + Navigator.of(context).pop(); + } + }, + cells: [ + DataCell(Text(index.toString())), + DataCell(Text(rowData['name'].toString())), + DataCell(Text(rowData['description'].toString())), + DataCell(Text(rowData['active'].toString())), + DataCell(Text(rowData['type'].toString())), + DataCell(Text('Action')), + ], + ); + }, + ), + ); + } + }, + ), + ), + ), + ); + }, + ); + } + + Future> fetchDataFromApi() async { + final token = await TokenManager.getToken(); + String baseUrl = ApiConstants.baseUrl; + final apiUrl = '$baseUrl/SqlworkbenchSqlcont/sql'; + + try { + final response = await http.get( + Uri.parse(apiUrl), + headers: { + 'Authorization': 'Bearer $token', // Include the token in the headers + }, + ); + if (response.statusCode == 401) { + LogoutService.logout(); + } + final List responseData = json.decode(response.body); + if (response.statusCode <= 209) { + return responseData.map((e) { + final map = e as Map; + return map; + }).toList(); + } else { + Fluttertoast.showToast( + msg: 'Failed to fetch projects', + backgroundColor: Colors.red, + ); + throw Exception("Failed"); + } + } catch (error) { + Fluttertoast.showToast( + msg: 'Error: $error', + backgroundColor: Colors.red, + ); + throw Exception("Failed"); + } + } +} + +class DropdownModel { + int? id; + String? tabName; + + DropdownModel({this.id, this.tabName}); + + DropdownModel.fromJson(Map json) { + id = json['id']; + tabName = json['tabName']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['tabName'] = this.tabName; + return data; + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/ReportBuilder/reportbuilderedit.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/ReportBuilder/reportbuilderedit.dart new file mode 100644 index 0000000..7e62974 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/ReportBuilder/reportbuilderedit.dart @@ -0,0 +1,268 @@ +import 'dart:convert'; + +import 'package:flutter/material.dart'; + +import '../../../utils/image_constant.dart'; +import '../../../utils/size_utils.dart'; +import '../../../providers/token_manager.dart'; +import '../../../resources/api_constants.dart'; +import 'package:http/http.dart' as http; + +import '../../../widgets/app_bar/appbar_image.dart'; +import '../../../widgets/app_bar/appbar_title.dart'; +import '../../../widgets/app_bar/custom_app_bar.dart'; +import '../../../widgets/custom_button.dart'; +import '../LogoutService/Logoutservice.dart'; + +class NodeEditProperties { + String stdParamHtml = ''; + String adhocParamHtml = ''; + String columnStr = ''; + String connName = ''; + String dateParamReq = ''; + String sqlStr = ''; +} + +class ReportEditPage extends StatefulWidget { + final int id; + ReportEditPage(this.id); + @override + _ReportEditPageState createState() => _ReportEditPageState(); +} + +class _ReportEditPageState extends State { + final TextEditingController connectionNameController = + TextEditingController(); + final TextEditingController dateParamReqController = TextEditingController(); + final TextEditingController stdParamHtmlController = TextEditingController(); + final TextEditingController adhocParamHtmlController = + TextEditingController(); + final TextEditingController columnStrController = TextEditingController(); + final TextEditingController sqlStrController = TextEditingController(); + + NodeEditProperties nodeEditProperties = NodeEditProperties(); + late Map ReportData; + late List builderLine; + late Map builderLineData; + List> databases = []; + List dateyesno = ["Yes", "No"]; + late int lineId; + + @override + void initState() { + super.initState(); + fetchdata(); + fetchdatabases(); + } + + //SqlworkbenchSqlcont/sql + Future fetchdatabases() async { + final token = await TokenManager.getToken(); + final String baseUrl = ApiConstants.baseUrl; + final String apiUrl = '$baseUrl/SqlworkbenchSqlcont/sql'; + try { + final response = await http.get( + Uri.parse(apiUrl), + headers: { + 'Authorization': 'Bearer $token', + }, + ); + if (response.statusCode == 401) { + LogoutService.logout(); + } + if (response.statusCode == 200) { + final dynamic jsonData = json.decode(response.body); + setState(() { + databases = List>.from(jsonData); + print(databases); + }); + } else { + throw Exception('Failed to load data: ${response.reasonPhrase}'); + } + } catch (e) { + throw Exception('Failed to load data: $e'); + } + } + + Future fetchdata() async { + int idhere = widget.id; + final token = await TokenManager.getToken(); + final String baseUrl = ApiConstants.baseUrl; + final String apiUrl = + '$baseUrl/Rpt_builder2/Rpt_builder2/' + idhere.toString(); + try { + final response = await http.get( + Uri.parse(apiUrl), + headers: { + 'Authorization': 'Bearer $token', + }, + ); + if (response.statusCode == 401) { + LogoutService.logout(); + } + if (response.statusCode == 200) { + final dynamic jsonData = json.decode(response.body); + setState(() { + ReportData = Map.from(jsonData); + builderLine = ReportData['rpt_builder2_lines']; + lineId = builderLine[0]['id']; + if (builderLine[0]['model'] != '') { + String model = builderLine[0]['model']; + print(model); + Map jsonModel = json.decode(model); + builderLineData = jsonModel; + stdParamHtmlController.text = builderLineData['std_param_html']; + adhocParamHtmlController.text = builderLineData['adhoc_param_html']; + columnStrController.text = builderLineData['column_str']; + sqlStrController.text = builderLineData['sql_str']; + dateParamReqController.text = builderLineData['date_param_req']; + connectionNameController.text = builderLineData['conn_name']; + } + }); + } else { + throw Exception('Failed to load data: ${response.reasonPhrase}'); + } + } catch (e) { + throw Exception('Failed to load data: $e'); + } + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: CustomAppBar( + height: getVerticalSize(49), + leadingWidth: 40, + leading: AppbarImage( + height: getSize(24), + width: getSize(24), + svgPath: ImageConstant.imgArrowleft, + margin: getMargin(left: 16, top: 12, bottom: 13), + onTap: () { + Navigator.pop(context); + }), + centerTitle: true, + title: AppbarTitle(text: "Report Edit"), + ), + body: SingleChildScrollView( + child: Padding( + padding: EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Text( + 'REPORT SET UP - Project Details Report (${widget.id})', + style: TextStyle( + fontWeight: FontWeight.w300, + ), + ), + SizedBox(width: 10), + ], + ), + Divider(), + DropdownButton( + value: connectionNameController.text.isEmpty + ? "value Not available" + : connectionNameController.text, // Set the default value + onChanged: (String? newValue) { + setState(() { + connectionNameController.text = newValue!; + }); + }, + items: databases.map>( + (Map database) { + return DropdownMenuItem( + value: database['name'], + child: Text(database['name']), + ); + }).toList(), + ), + DropdownButton( + value: dateyesno.contains(dateParamReqController.text) + ? dateParamReqController.text + : "Select the value", // Set the default value based on the controller's value or "Select the value" if it doesn't match any item + onChanged: (String? newValue) { + setState(() { + dateParamReqController.text = newValue!; + }); + }, + items: dateyesno.map>((String param) { + return DropdownMenuItem( + value: param, + child: Text(param), + ); + }).toList(), + ), + TextField( + controller: stdParamHtmlController, + decoration: InputDecoration( + labelText: 'Standard Parameter String (html)'), + maxLines: 3, + ), + TextField( + controller: adhocParamHtmlController, + decoration: + InputDecoration(labelText: 'Adhoc Parameter String (html)'), + maxLines: 3, + ), + TextField( + controller: columnStrController, + decoration: InputDecoration(labelText: 'Column String (html)'), + maxLines: 3, + ), + TextField( + controller: sqlStrController, + decoration: InputDecoration(labelText: 'SQL String'), + maxLines: 3, + ), + SizedBox(height: 20), + CustomButton( + height: getVerticalSize(50), + text: "Update", + margin: getMargin(top: 24, bottom: 5), + onTap: () async { + builderLineData['std_param_html'] = + stdParamHtmlController.text; + builderLineData['adhoc_param_html'] = + adhocParamHtmlController.text; + builderLineData['column_str'] = columnStrController.text; + builderLineData['sql_str'] = sqlStrController.text; + builderLineData['date_param_req'] = + dateParamReqController.text; + builderLineData['conn_name'] = connectionNameController.text; + builderLine[0]['model'] = builderLineData; + String jsonString = json.encode(builderLineData); + final token = await TokenManager.getToken(); + final String baseUrl = ApiConstants.baseUrl; + final String apiUrl = + '$baseUrl/Rpt_builder2_lines/update/$lineId'; + try { + final response = await http.put(Uri.parse(apiUrl), + headers: { + 'Authorization': 'Bearer $token', + 'Content-Type': 'application/json', + }, + body: json.encode({'model': jsonString})); + if (response.statusCode == 401) { + LogoutService.logout(); + } + if (response.statusCode <= 209) { + print("success"); + Navigator.of(context).pop(); + } else { + print(response.statusCode); + } + } catch (e) { + throw Exception('Failed to Update: $e'); + } + }, + ), + ], + ), + ), + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/ReportBuilder/reportquery.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/ReportBuilder/reportquery.dart new file mode 100644 index 0000000..40d4fef --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/ReportBuilder/reportquery.dart @@ -0,0 +1,813 @@ +import 'dart:convert'; + +import 'package:flutter/material.dart'; +import 'package:fluttertoast/fluttertoast.dart'; + +import '../../../utils/image_constant.dart'; +import '../../../utils/size_utils.dart'; +import '../../../providers/token_manager.dart'; +import '../../../resources/api_constants.dart'; +import 'package:http/http.dart' as http; + +import '../../../theme/app_style.dart'; +import '../../../widgets/app_bar/appbar_image.dart'; +import '../../../widgets/app_bar/appbar_title.dart'; +import '../../../widgets/app_bar/custom_app_bar.dart'; +import '../../../widgets/custom_button.dart'; +import '../../../widgets/custom_dropdown_field.dart'; +import '../../utils/color_constants.dart'; +import '../LogoutService/Logoutservice.dart'; + +class ReportQuery extends StatefulWidget { + ReportQuery(Map report); + + @override + _SQLWorksheetState createState() => _SQLWorksheetState(); +} + +class _SQLWorksheetState extends State { + int tablePrefix = 97; + List selectedTables = []; + List selectedColumns = []; + List columnList = []; + late Map> selectedTableandColumn; + List selectConditionsList = []; + List tableList = []; + + List getFinalDataAfterRunning = []; + String databaseName = ''; + String selectedtable = ''; + String selectedcol = ''; + String selectedcol1 = ''; + String selectedParamter = ''; + String dataParameter = ''; + String foldername = ''; + String selectedquery = ''; + int selectedIndex = 0; + bool isActive = true; + bool tableActive = false; + String selectedRowInfo = ""; + List dataColumns = []; + + @override + void initState() { + super.initState(); + } + + Future fetchTableList() async { + final token = await TokenManager.getToken(); + String baseUrl = ApiConstants.baseUrl; + final apiUrl = '$baseUrl/Table_list/$selectedRowInfo'; + + try { + final response = await http.get( + Uri.parse(apiUrl), + headers: { + 'Authorization': 'Bearer $token', // Include the token in the headers + }, + ); + if (response.statusCode == 401) { + LogoutService.logout(); + } + if (response.statusCode <= 209) { + final List responseData = json.decode(response.body); + tableList = responseData.cast(); + setState(() {}); + print(columnList); + //tableList = responseData; + } else { + Fluttertoast.showToast( + msg: 'Failed to fetch projects', + backgroundColor: Colors.red, + ); + throw Exception("Failed"); + } + } catch (error) { + Fluttertoast.showToast( + msg: 'Error: $error', + backgroundColor: Colors.red, + ); + throw Exception("Failed"); + } + } + + Future fetchColumListByTableName() async { + final token = await TokenManager.getToken(); + String baseUrl = ApiConstants.baseUrl; + String tables = selectedTables.join(","); + print(tables); + final apiUrl = '$baseUrl/Alias_Table_list/$tables'; + try { + final response = await http.get( + Uri.parse(apiUrl), + headers: { + 'Authorization': 'Bearer $token', // Include the token in the headers + }, + ); + if (response.statusCode == 401) { + LogoutService.logout(); + } + if (response.statusCode <= 209) { + final List responseData = json.decode(response.body); + columnList = responseData.cast(); + print(columnList); + setState(() {}); + //tableList = responseData; + } else { + Fluttertoast.showToast( + msg: 'Failed to fetch Data', + backgroundColor: Colors.red, + ); + throw Exception("Failed"); + } + } catch (error) { + Fluttertoast.showToast( + msg: 'Error: $error', + backgroundColor: Colors.red, + ); + throw Exception("Failed"); + } + } + + String Query = ''; + void onAddCondition() { + setState(() { + _showQueryTableDialog(); + }); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: CustomAppBar( + height: getVerticalSize(49), + leadingWidth: 40, + leading: AppbarImage( + height: getSize(24), + width: getSize(24), + svgPath: ImageConstant.imgArrowleftBlueGray900, + margin: getMargin(left: 16, top: 12, bottom: 13), + onTap: () { + Navigator.pop(context); + }), + centerTitle: true, + actions: [ + GestureDetector( + child: Icon( + Icons.edit_outlined, + color: Colors.black, + size: 20, + ), + onTap: () { + _showEditDialog(); + }, + ), + const SizedBox( + width: 20, + ) + ], + title: AppbarTitle(text: 'SQL Works.-$selectedRowInfo')), + body: SingleChildScrollView( + child: + Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // Text('Table List', style: TextStyle(fontWeight: FontWeight.bold)), + // FormField( + // builder: (FormFieldState state) { + // return InputDecorator( + // decoration: InputDecoration( + // labelText: 'Table List', + // errorText: state.hasError ? state.errorText : null, + // ), + // child: DropdownButtonFormField( + // isDense: true, + // isExpanded: true, + // // value: isActive ? selectedValue : null, // Disable the dropdown if isActive is false + // onChanged: isActive + // ? (newValue) { + // setState(() { + // if (selectedTables.contains(newValue)) { + // selectedTables.remove(newValue); + // } else { + // selectedTables.add(newValue!); + // } + // }); + // } + // : null, + // items: tableList.map((table) { + // return DropdownMenuItem( + // value: table, + // child: Row( + // children: [ + // Checkbox( + // value: selectedTables.contains(table), + // onChanged: (value) { + // setState(() { + // if (selectedTables.contains(table)) { + // selectedTables.remove(table); + // } else { + // selectedTables.add(table); + // } + // }); + // }, + // ), + // Text(table), + // ], + // ), + // ); + // }).toList(), + // ), + // ); + // }, + // ), + Padding( + padding: getPadding(top: 18), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text( + "Table List", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: AppStyle.txtGilroyMedium16Bluegray900, + ), + CustomDropdownFormField( + items: tableList.map((table) { + return DropdownMenuItem( + value: table, + child: Row( + children: [ + Checkbox( + value: selectedTables.contains(table), + onChanged: (value) { + setState(() { + if (selectedTables.contains(table)) { + selectedTables.remove(table); + } else { + selectedTables.add(table); + } + }); + }, + activeColor: ColorConstant.blue700, + ), + Text(table, + style: AppStyle.txtGilroyMedium16Bluegray900), + ], + ), + ); + }).toList(), + onChanged: isActive + ? (newValue) { + setState(() { + if (selectedTables.contains(newValue)) { + selectedTables.remove(newValue); + } else { + selectedTables.add(newValue!); + } + }); + } + : null, + ) + ], + ), + ), + Text('Selected Tables: ${selectedTables.join(", ")}', + style: AppStyle.txtGilroyMedium16Bluegray900), + CustomButton( + height: getVerticalSize(50), + text: "Submit", + margin: getMargin(top: 24, bottom: 5), + onTap: isActive + ? () { + setState(() { + fetchColumListByTableName(); + isActive = false; + }); + } + : null, + ), + //-------------------------------------------------------------- + Padding( + padding: getPadding(top: 18), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text( + "Column List", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: AppStyle.txtGilroyMedium16Bluegray900, + ), + CustomDropdownFormField( + onChanged: (newValue) { + setState(() { + if (selectedColumns.contains(newValue)) { + selectedColumns.remove(newValue); + } else { + selectedColumns.add(newValue!); + } + }); + }, + items: columnList.map((table) { + return DropdownMenuItem( + value: table, + child: Row( + children: [ + Checkbox( + value: selectedColumns.contains(table), + onChanged: (value) { + setState(() { + if (selectedColumns.contains(table)) { + selectedColumns.remove(table); + } else { + selectedColumns.add(table); + } + }); + }, + ), + Text(table, + style: AppStyle.txtGilroyMedium16Bluegray900), + ], + ), + ); + }).toList(), + ) + ], + ), + ), + Text('Selected Columns: ${selectedColumns.join(", ")}', + style: AppStyle.txtGilroyMedium16Bluegray900), + //------------------------------------------------------------------ + SizedBox(height: 16.0), + ], + ), + CustomButton( + height: getVerticalSize(50), + text: "Add Conditions", + margin: getMargin(top: 24, bottom: 5), + onTap: onAddCondition), + SizedBox(height: 16.0), + CustomButton( + height: getVerticalSize(50), + text: "Create Query", + margin: getMargin(top: 24, bottom: 5), + onTap: () async { + List conditiondatastring = []; + conditionData.forEach((element) { + conditiondatastring.add(element['andor'] + + " " + + element['fields_name'] + + element['condition'] + + element['value'] + + " "); + }); + final token = await TokenManager.getToken(); + String baseUrl = ApiConstants.baseUrl; + final apiUrl = '$baseUrl/getQuery'; + + try { + final response = await http.post(Uri.parse(apiUrl), + headers: { + 'Authorization': 'Bearer $token', + 'Content-Type': 'application/json', + }, + body: json.encode({ + "tables": selectedTables, + "columns": selectedColumns, + "conditions": conditiondatastring + })); + if (response.statusCode == 401) { + LogoutService.logout(); + } + print(response.statusCode); + if (response.statusCode <= 209) { + Query = response.body; + setState(() {}); + print(Query); + } else { + Fluttertoast.showToast( + msg: 'Failed to fetch projects', + backgroundColor: Colors.red, + ); + throw Exception("Failed"); + } + } catch (error) { + Fluttertoast.showToast( + msg: 'Error: $error', + backgroundColor: Colors.red, + ); + throw Exception("Failed"); + } + }), + SizedBox(height: 16.0), + TextFormField( + initialValue: Query, + onChanged: (value) { + Query = value; + }, + ), + SizedBox(height: 16.0), + CustomButton( + height: getVerticalSize(50), + text: "Run", + margin: getMargin(top: 24, bottom: 5), + onTap: () async { + final token = await TokenManager.getToken(); + String baseUrl = ApiConstants.baseUrl; + final apiUrl = + '$baseUrl/api/master-query-data?sql_query=$Query'; + + try { + final response = await http.get( + Uri.parse(apiUrl), + headers: { + 'Authorization': 'Bearer $token', + }, + ); + if (response.statusCode == 401) { + LogoutService.logout(); + } + final List responseData = json.decode(response.body); + print(response.statusCode); + print(Query); + if (response.statusCode <= 209) { + getFinalDataAfterRunning = responseData.map((e) { + final map = e as Map; + return map; + }).toList(); + List keysList = []; + + for (var dynamicItem in getFinalDataAfterRunning) { + if (dynamicItem is Map) { + dynamicItem.keys.forEach((key) { + if (!keysList.contains(key)) { + keysList.add(key); + } + }); + } + } + + dataColumns = keysList; + + print(keysList); // Output: ['id', 'name'] + + print(getFinalDataAfterRunning); + if (!getFinalDataAfterRunning.isEmpty) { + tableActive = true; + } + setState(() {}); + } else { + Fluttertoast.showToast( + msg: 'Failed to fetch Data', + backgroundColor: Colors.red, + ); + throw Exception("Failed"); + } + } catch (error) { + Fluttertoast.showToast( + msg: 'Error: $error', + backgroundColor: Colors.red, + ); + throw Exception("Failed"); + } + }), + SizedBox(height: 16.0), + tableActive + ? + // DataTable( + // columns: getFinalDataAfterRunning.isNotEmpty + // ? dataColumns.map((a) { + // return DataColumn( + // label: Text(a.toString()), + // ); + // }).toList() + // : [], + // rows: getFinalDataAfterRunning.map((data) { + // int count = 0; + // return DataRow( + // cells: data[dataColumns[count]].map(val) { + // return DataCell( + // Text(val.toString()), + // ); + // }).toList(), + // ); + // }).toList(), + // ) + DataTable( + columns: getFinalDataAfterRunning.isNotEmpty + ? dataColumns.map((columnName) { + return DataColumn( + label: Text(columnName.toString()), + ); + }).toList() + : [], + rows: getFinalDataAfterRunning.map((data) { + return DataRow( + cells: dataColumns.map((columnName) { + return DataCell( + Text(data[columnName].toString()), + ); + }).toList(), + ); + }).toList(), + ) + : Text("No Data Available"), + SizedBox(height: 16.0), + ]))); + } + + List> conditionData = []; + + void deleteRow(int index) { + setState(() { + conditionData.removeAt(index); + }); + } + + void onAddLines() { + setState(() { + conditionData.add({ + 'andor': null, + 'fields_name': null, + 'condition': null, + 'value': '', + }); + }); + } + + void onSelected() { + print(conditionData); + } + + void _showQueryTableDialog() { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: Text('Condition Table'), + content: SingleChildScrollView( + child: Column( + children: [ + DataTable( + columns: [ + DataColumn(label: Text('ANDOR')), + DataColumn(label: Text('FIELD NAME')), + DataColumn(label: Text('CONDITION')), + DataColumn(label: Text('VALUE')), + DataColumn(label: Text('Action')), + ], + rows: conditionData.asMap().entries.map((entry) { + int index = entry.key; + Map data = entry.value; + return DataRow( + key: ValueKey( + index), // Set a unique key for each DataRow + cells: [ + DataCell( + DropdownButton( + value: data['andor'], + onChanged: (value) { + setState(() { + data['andor'] = value; + }); + Navigator.of(context).pop(); + _showQueryTableDialog(); + }, + items: ['AND', 'OR'].map((value) { + return DropdownMenuItem( + value: value, + child: Text(value), + ); + }).toList(), + ), + ), + DataCell( + DropdownButton( + value: data['fields_name'], + onChanged: (value) { + setState(() { + data['fields_name'] = value; + }); + Navigator.of(context).pop(); + _showQueryTableDialog(); + }, + items: columnList.map((value) { + return DropdownMenuItem( + value: value, + child: Text(value), + ); + }).toList(), + ), + ), + DataCell( + DropdownButton( + value: data['condition'], + onChanged: (value) { + setState(() { + data['condition'] = value; + }); + Navigator.of(context).pop(); + _showQueryTableDialog(); + }, + items: [ + '=', + '!=', + '<', + '>', + '<=', + '>=', + 'LIKE', + 'BETWEEN', + 'IN' + ].map((value) { + return DropdownMenuItem( + value: value, + child: Text(value), + ); + }).toList(), + ), + ), + DataCell( + TextFormField( + initialValue: data['value'], + onChanged: (value) { + setState(() { + data['value'] = value; + }); + Navigator.of(context).pop(); + _showQueryTableDialog(); + }, + decoration: InputDecoration( + border: InputBorder.none, + ), + ), + ), + DataCell( + IconButton( + icon: Icon(Icons.delete), + onPressed: () { + deleteRow(index); + Navigator.of(context).pop(); + _showQueryTableDialog(); + }, + color: Colors.red, + ), + ), + ], + ); + }).toList(), + ), + ElevatedButton( + onPressed: () { + onAddLines(); + Navigator.of(context).pop(); + _showQueryTableDialog(); + }, + child: Icon(Icons.add), + ), + SizedBox(height: 16.0), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + ElevatedButton( + onPressed: () { + print(conditionData); + Navigator.of(context).pop(); // Close the dialog + }, + child: Text('Cancel'), + ), + ], + ), + ], + ), + ), + ); + }, + ); + } + + // Function to show the edit dialog + void _showEditDialog() { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: Text("Edit Data"), + content: SingleChildScrollView( + scrollDirection: Axis.vertical, + child: SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: FutureBuilder( + future: fetchDataFromApi(), + builder: (context, snapshot) { + if (snapshot.connectionState == ConnectionState.waiting) { + return CircularProgressIndicator(); // Show a loading indicator while fetching data + } else if (snapshot.hasError) { + return Text("Error: ${snapshot.error}"); + } else { + List? data = snapshot.data; + return DataTable( + columns: [ + DataColumn(label: Text('No')), + DataColumn(label: Text('Database Name')), + DataColumn(label: Text('Description')), + DataColumn(label: Text('Active')), + DataColumn(label: Text('Type')), + DataColumn(label: Text('Action')), + ], + rows: List.generate( + data!.length, + (index) { + final rowData = data[index]; + return DataRow( + onSelectChanged: (isSelected) { + if (isSelected != null && isSelected) { + setState(() { + selectedRowInfo = rowData['name']; + fetchTableList(); + }); + Navigator.of(context).pop(); + } + }, + cells: [ + DataCell(Text(index.toString())), + DataCell(Text(rowData['name'].toString())), + DataCell(Text(rowData['description'].toString())), + DataCell(Text(rowData['active'].toString())), + DataCell(Text(rowData['type'].toString())), + DataCell(Text('Action')), + ], + ); + }, + ), + ); + } + }, + ), + ), + ), + ); + }, + ); + } + + Future> fetchDataFromApi() async { + final token = await TokenManager.getToken(); + String baseUrl = ApiConstants.baseUrl; + final apiUrl = '$baseUrl/SqlworkbenchSqlcont/sql'; + + try { + final response = await http.get( + Uri.parse(apiUrl), + headers: { + 'Authorization': 'Bearer $token', // Include the token in the headers + }, + ); + if (response.statusCode == 401) { + LogoutService.logout(); + } + final List responseData = json.decode(response.body); + if (response.statusCode <= 209) { + return responseData.map((e) { + final map = e as Map; + return map; + }).toList(); + } else { + Fluttertoast.showToast( + msg: 'Failed to fetch projects', + backgroundColor: Colors.red, + ); + throw Exception("Failed"); + } + } catch (error) { + Fluttertoast.showToast( + msg: 'Error: $error', + backgroundColor: Colors.red, + ); + throw Exception("Failed"); + } + } +} + +class DropdownModel { + int? id; + String? tabName; + + DropdownModel({this.id, this.tabName}); + + DropdownModel.fromJson(Map json) { + id = json['id']; + tabName = json['tabName']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['tabName'] = this.tabName; + return data; + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/ReportBuilder2/Reportbuilder2screenEditmode.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/ReportBuilder2/Reportbuilder2screenEditmode.dart new file mode 100644 index 0000000..1d8b57e --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/ReportBuilder2/Reportbuilder2screenEditmode.dart @@ -0,0 +1,244 @@ +import 'dart:convert'; +import 'package:flutter/material.dart'; +import 'package:fluttertoast/fluttertoast.dart'; +import '../../../providers/token_manager.dart'; +import '../../../resources/api_constants.dart'; +import 'package:http/http.dart' as http; + +import '../LogoutService/Logoutservice.dart'; + +class ReportPage2 extends StatefulWidget { + @override + _ReportPage2State createState() => _ReportPage2State(); +} + +class _ReportPage2State extends State { + bool isActive = false; + bool includeDateFilter = false; + + TextEditingController nameController = TextEditingController(); + TextEditingController descriptionController = TextEditingController(); + TextEditingController getUrlController = TextEditingController(); + + List selectedColumns = []; + List columnList = []; + + final GlobalKey _formKey = GlobalKey(); + + List dropdownItems = ["Item 1", "Item 2", "Item 3"]; + var selectedDropdownItem; + + Future fetchData() async { + print("working"); + final token = await TokenManager.getToken(); + print(token); + String baseUrl = ApiConstants.baseUrl; + var response = await http.get( + Uri.parse( + '$baseUrl/Rpt_builder2_lines/geturlkeybyurl?url=$getUrlController.text'), + headers: { + 'Authorization': 'Bearer $token', + }, + ); + if (response.statusCode == 401) { + LogoutService.logout(); + } + print(response.statusCode); + if (response.statusCode <= 209) { + columnList = response.body as List; + print(columnList); + } else { + // Handle errors + print('Failed to fetch data'); + } + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text('Report (Edit Mode)'), + ), + body: Form( + key: _formKey, + child: SingleChildScrollView( + child: Padding( + padding: EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'Report', + style: TextStyle( + fontSize: 24.0, + fontWeight: FontWeight.bold, + ), + ), + SizedBox(height: 10.0), + Text('Name:'), + TextField( + controller: nameController, + ), + SizedBox(height: 10.0), + Text('Description:'), + TextField( + controller: descriptionController, + maxLines: 3, + ), + SizedBox(height: 10.0), + Row( + children: [ + Text('Active:'), + Switch( + value: isActive, + onChanged: (value) { + setState(() { + isActive = value; + }); + }, + ), + ], + ), + Row( + children: [ + Text('Include Date Filter:'), + Switch( + value: includeDateFilter, + onChanged: (value) { + setState(() { + includeDateFilter = value; + }); + }, + ), + ], + ), + SizedBox(height: 16.0), + Text('Get URL:'), + TextFormField( + validator: (value) { + if (value!.isEmpty) { + return 'Please enter a URL'; + } + if (!Uri.parse(value).isAbsolute) { + return 'Please enter a valid URL'; + } + return null; + }, + controller: getUrlController, + decoration: InputDecoration( + labelText: 'Get URL:', + ), + onChanged: (value) { + fetchData(); + setState(() {}); + }, + ), + SizedBox(height: 16.0), + Text('Standard Parameter:'), + DropdownButtonFormField( + isDense: true, + isExpanded: true, + //value: selectedTables, + onChanged: (newValue) { + setState(() { + if (selectedColumns.contains(newValue)) { + selectedColumns.remove(newValue); + } else { + selectedColumns.add(newValue!); + } + }); + }, + items: columnList.map((table) { + return DropdownMenuItem( + value: table, + child: Row( + children: [ + Checkbox( + value: selectedColumns.contains(table), + onChanged: (value) { + setState(() { + if (selectedColumns.contains(table)) { + selectedColumns.remove(table); + } else { + selectedColumns.add(table); + } + }); + }, + ), + Text(table), + ], + ), + ); + }).toList(), + ), + Text('Selected Parameters: ${selectedColumns.join(", ")}'), + SizedBox(height: 16.0), + Text('List Dropdown:'), + DropdownButton( + value: selectedDropdownItem, + items: dropdownItems.map((item) { + return DropdownMenuItem( + value: item, + child: Text(item), + ); + }).toList(), + onChanged: (value) { + setState(() { + selectedDropdownItem = value; + }); + }, + ), + SizedBox(height: 16.0), + Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + ElevatedButton( + onPressed: () { + Navigator.pop(context); + }, + child: Text('Back'), + ), + ElevatedButton( + onPressed: () async { + _formKey.currentState!.validate(); + print("working"); + final token = await TokenManager.getToken(); + print(token); + String baseUrl = ApiConstants.baseUrl; + var response = await http.post( + Uri.parse('$baseUrl/Rpt_builder2/Rpt_builder2'), + headers: { + 'Authorization': 'Bearer $token', + 'Content-Type': + 'application/json', // You may need to adjust the content type as needed + }, + body: json.encode({ + "reportName": nameController.text, + "description": descriptionController.text, + "active": isActive, + "isSql": false + })); + if (response.statusCode == 401) { + LogoutService.logout(); + } + print(response.statusCode); + if (response.statusCode <= 209) { + Navigator.pop(context); + } else { + Fluttertoast.showToast( + msg: 'Failed to Submit', + backgroundColor: Colors.red, + ); + } + }, + child: Text('Submit'), + ), + ], + ), + ], + ), + ), + ), + )); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/ReuseableWidgets/BottomAppBarWidget.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/ReuseableWidgets/BottomAppBarWidget.dart new file mode 100644 index 0000000..95d4124 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/ReuseableWidgets/BottomAppBarWidget.dart @@ -0,0 +1,201 @@ + +import 'package:base_project/core/app_export.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg_provider/flutter_svg_provider.dart' as fs; +import 'package:google_fonts/google_fonts.dart'; + +import '../../core/utils/image_constant.dart'; +import '../../widgets/custom_icon_button.dart'; +import '../../widgets/custom_image_view.dart'; +import '../MenuScreen/new_dash/Newdashboard.dart'; + +class BottomAppBarWidget extends StatelessWidget { + @override + Widget build(BuildContext context) { + return SizedBox( + child: SizedBox( + height: 115.v, + width: double.infinity, + child: Stack( + alignment: Alignment.topCenter, + children: [ + Align( + alignment: Alignment.bottomCenter, + child: Container( + width: double.infinity, + margin: EdgeInsets.only(top: 35.v), + padding: EdgeInsets.symmetric( + horizontal: 13.h, + vertical: 15.v, + ), + decoration: BoxDecoration( + image: DecorationImage( + image: fs.Svg( + ImageConstant.imgGroup146, + ), + fit: BoxFit.cover, + ), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + CustomIconButton( + height: 50.adaptSize, + width: 50.adaptSize, + padding_f: EdgeInsets.all(13.h), + child: CustomImageView( + onTap: () { + print("Bat Ball Clicked"); + }, + svgPath: ImageConstant.imgBatball, + height: 32.0.v, // Adjusted height + width: 32.0.h, // Adjusted width + ), + ), + Padding( + padding: EdgeInsets.only(left: 27.h), + child: CustomIconButton( + height: 50.adaptSize, + width: 50.adaptSize, + padding_f: EdgeInsets.all(12.h), + child: CustomImageView( + onTap: () { + print("Ball Clicked"); + }, + svgPath: ImageConstant.imgBxCricketBall, + height: 32.0.v, // Adjusted height + width: 32.0.h, // Adjusted width + ), + ), + ), + Padding( + padding: EdgeInsets.only(left: 123.h), + child: CustomIconButton( + height: 50.adaptSize, + width: 50.adaptSize, + padding_f: EdgeInsets.all(12.h), + child: CustomImageView( + onTap: () { + print("Live Clicked"); + }, + svgPath: ImageConstant.imgFluentLive24Filled, + height: 32.0.v, // Adjusted height + width: 32.0.h, // Adjusted width + ), + ), + ), + Padding( + padding: EdgeInsets.only(left: 26.h), + child: CustomIconButton( + height: 50.adaptSize, + width: 50.adaptSize, + padding_f: EdgeInsets.all(10.h), + child: CustomImageView( + onTap: () { + print("more Clicked"); + _showModalBottomSheet(context); + }, + svgPath: ImageConstant.imgOverflowmenu, + height: 32.0.v, // Adjusted height + width: 32.0.h, // Adjusted width + ), + ), + ) + ], + ), + ), + ), + Align( + alignment: Alignment.center, + child: Padding( + padding: EdgeInsets.only(bottom: 40.0), + child: CustomIconButton( + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => Newdashboard(), + )); + }, + height: 70.adaptSize, + width: 70.adaptSize, + padding_f: EdgeInsets.all(10.h), + child: CustomImageView( + svgPath: ImageConstant.home, + height: 32.0.v, // Adjusted height + width: 32.0.h, // Adjusted width + ), + ), + ), + ), + // CustomFloatingButton( + // height: 64, + // width: 64, + // alignment: Alignment.topCenter, + // child: CustomImageView( + // svgPath: ImageConstant.imgLocation, + // height: 32.0.v, + // width: 32.0.h, + // ), + // ) + ], + ), + ), + ); + } + + void _showModalBottomSheet(BuildContext context) { + showModalBottomSheet( + context: context, + builder: (BuildContext context) { + return SizedBox( + height: MediaQuery.of(context).size.height * 0.2, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: GestureDetector( + onTap: () { + // Navigator.push(context, MaterialPageRoute(builder: (context) =>const ProductHomeScreen() ,)); + }, + child: Column( + children: [ + SizedBox( + height: 60, + child: Image.asset(ImageConstant.imgStore)), + Text( + "Go to store", + style: GoogleFonts.getFont('Poppins', + color: Colors.black), + ) + ], + ), + ), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: GestureDetector( + onTap: () { + // Navigator.push(context, MaterialPageRoute(builder: (context) =>const ProductHomeScreen() ,)); + }, + child: Column( + children: [ + SizedBox( + height: 60, + child: Image.asset(ImageConstant.imgStore)), + Text( + "Create store", + style: GoogleFonts.getFont('Poppins', + color: Colors.black), + ) + ], + ), + ), + ), + ], + )); + }, + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/ReuseableWidgets/CustomDrawer.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/ReuseableWidgets/CustomDrawer.dart new file mode 100644 index 0000000..cac5229 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/ReuseableWidgets/CustomDrawer.dart @@ -0,0 +1,304 @@ +import 'dart:io'; +import 'package:base_project/core/app_export.dart'; +import 'package:flutter/material.dart'; +import 'package:google_fonts/google_fonts.dart'; +import 'package:shared_preferences/shared_preferences.dart'; + +import '../../resources/api_constants.dart'; +import '../../widgets/custom_elevated_button.dart'; +import '../Dashboard/dashboard_screen_f.dart'; +import '../Login Screen/decision.dart'; +import '../Login Screen/login_screen_f.dart'; +import '../LogoutService/Logoutservice.dart'; +import '../MenuScreen/profile_screen/profile_screen.dart'; +import '../MenuScreen/sys_params/sys_params_screen.dart'; +import '../ReportBuilder/ReportBuilderScreen.dart'; +import '../profileManagement/change_password_f.dart'; +import 'package:http/http.dart' as http; + +// Define custom theme for button color +final ThemeData drawerButtonTheme = ThemeData( + elevatedButtonTheme: ElevatedButtonThemeData( + style: ButtonStyle( + backgroundColor: + MaterialStateProperty.all(Colors.black), // Example color + ), + ), +); + +class CustomDrawer extends StatefulWidget { + final BuildContext context; + CustomDrawer({super.key, required this.context}); + + @override + State createState() => _CustomDrawerState(); +} + +class _CustomDrawerState extends State { + String? logoPath; // Add a variable to hold the logo path + + @override + void initState() { + super.initState(); + getLoginState(); + _loadLogoPath(); // Load the logo path during initialization + } + + void getLoginState() async { + final prefs = await SharedPreferences.getInstance(); + setState(() { + isLogin = prefs.getBool('isLoggedIn') ?? false; + isGuest = isLogin ? false : true; + }); + print("LoginState-$isLogin"); + } + + Future _loadLogoPath() async { + final prefs = await SharedPreferences.getInstance(); + setState(() { + logoPath = prefs.getString('logoPath'); // Retrieve the logo path + }); + } + + var isLogin = false; + var isGuest = true; + + @override + Widget build(BuildContext context) { + return Theme( + data: drawerButtonTheme, + child: Drawer( + backgroundColor: Colors.blue[50], + width: MediaQuery.of(context).size.width * 80 / 100, + child: Container( + padding: EdgeInsets.only(left: 15.v), + child: ListView( + children: [ + SizedBox( + height: 100, + child: DrawerHeader( + child: SizedBox( + height: 50, + child: logoPath != null + ? Image.file( + File( + logoPath!), // Use Image.file to display the uploaded logo + colorBlendMode: BlendMode.luminosity, + scale: 4, + ) + : Image.asset( + ImageConstant.tempLogo, + colorBlendMode: BlendMode.luminosity, + scale: 4, + ), + ), + ), + ), + SizedBox(height: 19.v), + _buildSwitch(), + SizedBox(height: 19.v), + SizedBox(height: 23.v), + _myButton( + context, + "Profile Setting", + () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => const Profile_Screen(), + ), + ); + }, + true, + ), + SizedBox(height: 18.v), + _myButton( + context, + "Change Password", + () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => ResetPasswordScreenF(), + ), + ); + }, + true, + ), + SizedBox(height: 18.v), + _myButton( + context, + "System parameters", + () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => const SysParamsScreen(), + ), + ); + }, + false, + ), + SizedBox(height: 18.v), + _myButton( + context, + "Dashboard", + () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => DashboardScreenF(), + ), + ); + }, + false, + ), + SizedBox(height: 18.v), + + _myButton( + context, + "Report", + () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => ReportPage(), + ), + ); + }, + false, + ), + SizedBox(height: 18.v), + + // NEW MENU + + _myButton( + context, + "Logout", + () => _logoutUser(context), + true, + ), + SizedBox(height: 18.v), + ], + ), + ), + ), + ); + } + + Widget _myButton1(BuildContext context, String title, VoidCallback onTap) { + return CustomElevatedButton( + text: title, + margin: EdgeInsets.only(right: 20.h, left: 20.h), + onPressed: onTap); + } + + Widget _myButton(BuildContext context, String title, VoidCallback onTap, + bool requiresLogin) { + return CustomElevatedButton( + text: title, + margin: EdgeInsets.only(right: 20.h, left: 20.h), + onPressed: () { + if (requiresLogin && !isLogin) { + showAlert(widget.context, 'Please login to access this feature'); + } else { + onTap(); + } + }, + ); + } + + void showSnackBar(BuildContext context, String msg, Color color) { + ScaffoldMessenger.of(context).showSnackBar( + SnackBar( + content: Text( + msg, + style: const TextStyle(color: Colors.white), + ), + backgroundColor: color, + duration: const Duration(seconds: 2), + ), + ); + } + + void showAlert(BuildContext context, String message) { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: const Text("Oops!!"), + content: Text( + message, + style: GoogleFonts.getFont('Poppins', color: Colors.black), + ), + actions: [ + TextButton( + child: const Text("CANCEL"), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + TextButton( + child: const Text("LOGIN NOW"), + onPressed: () { + Navigator.of(context).pop(); + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => const DecisionScreen(), + )); + }, + ), + ], + ); + }, + ); + } + + Future _logoutUser(BuildContext context) async { + try { + SharedPreferences prefs = await SharedPreferences.getInstance(); + + // Remove 'userData' and 'isLoggedIn' from SharedPreferences + await prefs.remove('userData'); + await prefs.remove('isLoggedIn'); + String logouturl = "${ApiConstants.baseUrl}/token/logout"; + var response = await http.get(Uri.parse(logouturl)); + if (response.statusCode == 401) { + LogoutService.logout(); + } + if (response.statusCode <= 209) { + // ignore: use_build_context_synchronously + Navigator.pushAndRemoveUntil( + context, + MaterialPageRoute(builder: (context) => const LoginScreenF(false)), + (route) => false, // Remove all routes from the stack + ); + } else { + const Text('failed to logout'); + } + } catch (error) { + print('Error occurred during logout: $error'); + } + } + + Widget _buildSwitch() { + return SwitchListTile( + title: Text(!isGuest ? 'Pro' : 'Lite'), + value: !isGuest, + onChanged: (bool value) { + setState(() { + isGuest = !value; + }); + if (isLogin == false) { + Navigator.pop(context); + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => DecisionScreen(), + )); + } + }, + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/ReuseableWidgets/headerWidget.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/ReuseableWidgets/headerWidget.dart new file mode 100644 index 0000000..354963f --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/ReuseableWidgets/headerWidget.dart @@ -0,0 +1,73 @@ +import 'package:base_project/core/app_export.dart'; + +import 'package:flutter/material.dart'; + +import '../../core/utils/image_constant.dart'; +import '../MenuScreen/Notification/GetAllNotification.dart'; + +Widget headerWidget( + BuildContext context, GlobalKey scaffoldKey) { + return GestureDetector( + child: Padding( + padding: EdgeInsets.only(left: 1.h), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + GestureDetector( + onTap: () { + scaffoldKey.currentState?.openDrawer(); + }, + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 8.0), + child: SizedBox( + height: 26, child: Image.asset(ImageConstant.imgMainMenu)), + ), + ), + SizedBox( + width: 6.h, + ), + Expanded( + flex: 6, + child: Padding( + padding: const EdgeInsets.only(top: 10.0), + child: ColorFiltered( + colorFilter: ColorFilter.mode( + Colors.grey.withOpacity(0.2), // Adjust color and opacity as needed + BlendMode.darken, // You can choose other blend modes as well + ), + child: Image.asset( + ImageConstant.tempLogo, + scale: 4, + ), + ), + ), + ), + const SizedBox( + width: 20, + ), + SizedBox( + height: 26, child: Image.asset(ImageConstant.imgNotification3)), + const SizedBox( + width: 30, + ), + GestureDetector( + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => GetAllNotification(), + ), + ); + }, + child: + SizedBox(height: 26, child: Image.asset(ImageConstant.imgBell)), + ), + const SizedBox( + width: 30, + ), + ], + ), + ), + ); +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Setup/setup.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Setup/setup.dart new file mode 100644 index 0000000..0f4c5bd --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/Setup/setup.dart @@ -0,0 +1,128 @@ +import 'package:flutter/material.dart'; +import '../../utils/image_constant.dart'; +import '../../utils/size_utils.dart'; +import '../../widgets/app_bar/appbar_image.dart'; +import '../../widgets/app_bar/appbar_title.dart'; +import '../../widgets/app_bar/custom_app_bar.dart'; +import '../SysParameters/SystemParameterScreen.dart'; + +class SetupScreen extends StatelessWidget { + const SetupScreen({super.key}); + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: CustomAppBar( + height: getVerticalSize(49), + leadingWidth: 40, + leading: AppbarImage( + height: getSize(24), + width: getSize(24), + svgPath: ImageConstant.imgArrowleftBlueGray900, + margin: getMargin(left: 16, top: 12, bottom: 13), + onTap: () { + Navigator.pop(context); + }), + centerTitle: true, + title: AppbarTitle(text: "Setup Screen")), + body: SingleChildScrollView( + child: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + buildSetupBlock(context, 'User Maintenance', SysParameter()), + buildSetupBlock( + context, 'User Group Maintenance', SysParameter()), + buildSetupBlock(context, 'Menu Maintenance', SysParameter()), + buildSetupBlock(context, 'Menu Access', SysParameter()), + buildSetupBlock(context, 'System Parameter', SysParameter()), + buildSetupBlock(context, 'Access Type', SysParameter()), + // buildSetupBlock(context, 'Report', ReportPage()), + buildSetupBlock(context, 'Dashboard', SysParameter()), + ], + ), + ), + ), + ); + } + + Widget buildSetupBlock(BuildContext context, String title, Widget screen) { + return GestureDetector( + onTap: () { + Navigator.push( + context, + MaterialPageRoute(builder: (context) => screen), + ); + }, + child: Card( + color: Colors.white, + elevation: 0.0, + child: Padding( + padding: const EdgeInsets.fromLTRB(20, 40, 20, 40), + child: Column( + children: [ + // Container( + // height: getSize( + // 55, + // ), + // width: getSize( + // 55, + // ), + // margin: getMargin( + // top: 2, + // ), + // child: Stack( + // alignment: Alignment.center, + // children: [ + // Align( + // alignment: Alignment.center, + // child: Container( + // height: getSize( + // 55, + // ), + // width: getSize( + // 55, + // ), + // child: CircularProgressIndicator( + // value: 0.5, + // backgroundColor: ColorConstant.gray30099, + // color: ColorConstant.blueA700, + // ), + // ), + // ), + // Align( + // alignment: Alignment.center, + // child: Text( + // myProjectcount.toString(), + // overflow: TextOverflow.ellipsis, + // textAlign: TextAlign.left, + // style: AppStyle.txtGilroyBold18, + // ), + // ), + // ], + // ), + // ), + // Text( + // myProjectcount.toString(), + // style: const TextStyle( + // color: Colors.black, + // fontSize: 12, + // ), + // ), + const SizedBox( + height: 3, + ), + Text( + title, + style: const TextStyle( + color: Colors.black, + fontSize: 10, + ), + ), + ], + ), + ), + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/SysParameters/SystemParameterApiService.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/SysParameters/SystemParameterApiService.dart new file mode 100644 index 0000000..978c85a --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/SysParameters/SystemParameterApiService.dart @@ -0,0 +1,77 @@ +import 'dart:typed_data'; +import 'package:dio/dio.dart'; +import '/resources/api_constants.dart'; +import 'package:http_parser/http_parser.dart'; + +import '../LogoutService/Logoutservice.dart'; + +class SystemParameterApiService { + final String baseUrl = ApiConstants.baseUrl; + final Dio dio = Dio(); + + Future> getsystemparameters(String token, int id) async { + try { + dio.options.headers['Authorization'] = 'Bearer $token'; + final response = await dio.get('$baseUrl/sysparam/getSysParams/$id'); + if (response.statusCode == 401) { + LogoutService.logout(); + } + final entities = (response.data); + return entities; + } catch (e) { + throw Exception('Failed to get all projects: $e'); + } + } + + Future updateParameter( + String token, int entityId, Map entity) async { + try { + dio.options.headers['Authorization'] = 'Bearer $token'; + var response = await dio + .put('$baseUrl/sysparam/updateSysParams/$entityId', data: entity); + if (response.statusCode == 401) { + LogoutService.logout(); + } + print(entity); + } catch (e) { + throw Exception('Failed to update projects: $e'); + } + } + + Future> createFile( + Uint8List fileBytes, String fileName, String token) async { + try { + String apiUrl = "$baseUrl/api/logos/upload?ref=test"; + + const mimeType = 'image/jpeg'; // You can set the appropriate MIME type + + FormData formData = FormData.fromMap({ + 'file': MultipartFile.fromBytes( + fileBytes, + filename: fileName, + contentType: MediaType.parse(mimeType), + ), + }); + + Dio dio = Dio(); // Create a new Dio instance + dio.options.headers['Authorization'] = 'Bearer $token'; + + final response = await dio.post(apiUrl, data: formData); + if (response.statusCode == 401) { + LogoutService.logout(); + } + if (response.statusCode == 200) { + print('File uploaded successfully'); + return response.data; // Return the response data on success + } else { + print('Failed to upload file with status: ${response.statusCode}'); + // You might want to handle this error case more explicitly + throw Exception('Failed to upload file'); + } + } catch (error) { + print('Error occurred during form submission: $error'); + // You might want to handle this error case more explicitly + throw Exception('Error during file upload: $error'); + } + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/SysParameters/SystemParameterScreen.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/SysParameters/SystemParameterScreen.dart new file mode 100644 index 0000000..5aa31f3 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/SysParameters/SystemParameterScreen.dart @@ -0,0 +1,562 @@ +import 'dart:typed_data'; + +import 'package:flutter/material.dart'; +import 'package:image_picker/image_picker.dart'; + +import '../../utils/image_constant.dart'; +import '../../utils/size_utils.dart'; +import '../../providers/token_manager.dart'; +import '../../theme/app_style.dart'; +import '../../widgets/app_bar/appbar_image.dart'; +import '../../widgets/app_bar/appbar_title.dart'; +import '../../widgets/app_bar/custom_app_bar.dart'; +import '../../widgets/custom_button.dart'; +import '../../widgets/custom_text_form_field.dart'; +import 'SystemParameterApiService.dart'; + +class SysParameter extends StatefulWidget { + final int sysparameter = 1; + + // const SysParameter({Key? key, required this.sysparameter}) : super(key: key); + @override + _SysParameterState createState() => _SysParameterState(); +} + +class _SysParameterState extends State { + TextEditingController schedulerTimerController = TextEditingController(); + TextEditingController leaseTaxCodeController = TextEditingController(); + TextEditingController vesselConfirmationController = TextEditingController(); + TextEditingController rowToDisplayController = TextEditingController(); + TextEditingController linkToDisplayController = TextEditingController(); + TextEditingController rowToAddController = TextEditingController(); + TextEditingController lovRowToDisplayController = TextEditingController(); + TextEditingController lovLinkToDisplayController = TextEditingController(); + TextEditingController oidServerNameController = TextEditingController(); + TextEditingController oidBaseController = TextEditingController(); + TextEditingController oidAdminUserController = TextEditingController(); + TextEditingController oidServerPortController = TextEditingController(); + TextEditingController userDefaultGroupController = TextEditingController(); + TextEditingController defaultDepartmentController = TextEditingController(); + TextEditingController defaultPositionController = TextEditingController(); + TextEditingController singleChargeController = TextEditingController(); + TextEditingController firstDayOfWeekController = TextEditingController(); + TextEditingController hourPerShiftController = TextEditingController(); + TextEditingController cnBillingFrequencyController = TextEditingController(); + TextEditingController billingDepartmentCodeController = + TextEditingController(); + TextEditingController basePriceListController = TextEditingController(); + TextEditingController nonContainerServiceController = TextEditingController(); + TextEditingController ediMaeSchedulerController = TextEditingController(); + TextEditingController ediSchedulerController = TextEditingController(); + TextEditingController lastController = TextEditingController(); + TextEditingController companynameController = TextEditingController(); + bool isRegistrationAllow = false; + + Map formData = {}; + var logoname; + var logopath; + + SystemParameterApiService apiService = SystemParameterApiService(); + + String? uploadimageurl; + Uint8List? _imageBytes; // Uint8List to store the image data + String? _imageFileName; + + late Map sysparameter; + + @override + void initState() { + _loadParameters(); + } + + Future _loadParameters() async { + final token = await TokenManager.getToken(); + try { + final projectData = + await apiService.getsystemparameters(token!, widget.sysparameter); + setState(() { + sysparameter = projectData; + lastController.text = "('SYSADMIN','ITSUPPORTMSC')"; + schedulerTimerController.text = + sysparameter['schedulerTime'].toString() ?? ''; + isRegistrationAllow = sysparameter['regitrationAllowed'] ?? false; + leaseTaxCodeController.text = + sysparameter['leaseTaxCode'].toString() ?? ''; + vesselConfirmationController.text = + sysparameter['vesselConfProcessLimit'].toString() ?? ''; + rowToDisplayController.text = + sysparameter['rowToDisplay'].toString() ?? ''; + linkToDisplayController.text = + sysparameter['linkToDisplay'].toString() ?? ''; + rowToAddController.text = sysparameter['rowToAdd'].toString() ?? ''; + lovRowToDisplayController.text = + sysparameter['lovRowToDisplay'].toString() ?? ''; + lovLinkToDisplayController.text = + sysparameter['lovLinkToDisplay'].toString() ?? ''; + oidServerNameController.text = + sysparameter['oidserverName'].toString() ?? ''; + oidBaseController.text = sysparameter['oidBase'].toString() ?? ''; + oidAdminUserController.text = + sysparameter['oidAdminUser'].toString() ?? ''; + oidServerPortController.text = + sysparameter['oidServerPort'].toString() ?? ''; + userDefaultGroupController.text = + sysparameter['userDefaultGroup'].toString() ?? ''; + defaultDepartmentController.text = + sysparameter['defaultDepartment'].toString() ?? ''; + defaultPositionController.text = + sysparameter['defaultPosition'].toString() ?? ''; + singleChargeController.text = + sysparameter['singleCharge'].toString() ?? ''; + firstDayOfWeekController.text = + sysparameter['firstDayOftheWeek'].toString() ?? ''; + hourPerShiftController.text = + sysparameter['hourPerShift'].toString() ?? ''; + cnBillingFrequencyController.text = + sysparameter['cnBillingFrequency'].toString() ?? ''; + billingDepartmentCodeController.text = + sysparameter['billingDepartmentCode'].toString() ?? ''; + basePriceListController.text = + sysparameter['basePriceList'].toString() ?? ''; + nonContainerServiceController.text = + sysparameter['nonContainerServiceOrder'].toString() ?? ''; + ediMaeSchedulerController.text = + sysparameter['ediMaeSchedulerONOFF'].toString() ?? ''; + ediSchedulerController.text = + sysparameter['ediSchedulerONOFF'].toString() ?? ''; + lastController.text = "('SYSADMIN','ITSUPPORTMSC')" ?? ''; + companynameController.text = + sysparameter['company_Display_Name'].toString() ?? ''; + print(sysparameter['schedulerTime']); + }); + } catch (e) { + print('Failed to load projects: $e'); + } + } + + Future _uploadImageFile() async { + final imagePicker = ImagePicker(); + + try { + final pickedImage = + await imagePicker.pickImage(source: ImageSource.gallery); + + if (pickedImage != null) { + final imageBytes = await pickedImage.readAsBytes(); + + setState(() { + _imageBytes = imageBytes; + _imageFileName = pickedImage.name; // Store the file name + }); + } + _submitImage(); + } catch (e) { + print(e); + } + } + + Future _submitImage() async { + if (_imageBytes == null) { + // Show an error message if no image is selected + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: const Text('Error'), + content: Text('Please select an image.'), + actions: [ + TextButton( + child: const Text('OK'), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ], + ); + }, + ); + return; + } + + if (_imageFileName == null) { + // Handle the case where _imageFileName is null (no file name provided) + print('File name is missing.'); + return; + } + try { + final token = await TokenManager.getToken(); + Map fileuploadeddata = + await apiService.createFile(_imageBytes!, _imageFileName!, token!); + logoname = fileuploadeddata['image_name']; + logopath = fileuploadeddata['image_path']; + } catch (e) { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: const Text('Error'), + content: Text('Failed to upload image: $e'), + actions: [ + TextButton( + child: const Text('OK'), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ], + ); + }, + ); + } + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: CustomAppBar( + height: getVerticalSize(49), + leadingWidth: 40, + leading: AppbarImage( + height: getSize(24), + width: getSize(24), + svgPath: ImageConstant.imgArrowleftBlueGray900, + margin: getMargin(left: 16, top: 12, bottom: 13), + onTap: () { + Navigator.pop(context); + }), + centerTitle: true, + title: AppbarTitle(text: "System Parameter")), + body: Material( + child: SingleChildScrollView( + // Wrap the form in a SingleChildScrollView + scrollDirection: Axis.vertical, // Allow vertical scrolling + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + _buildFieldWithTooltip( + fieldName: 'Scheduler Timer', + controller: schedulerTimerController, + tooltip: 'Tooltip for Scheduler Timer', + ), + _buildFieldWithTooltip( + fieldName: 'Lease Tax Code', + controller: leaseTaxCodeController, + tooltip: 'Tooltip for Lease Tax Code', + ), + _buildFieldWithTooltip( + fieldName: 'Vessel Confirmation Process Limit', + controller: vesselConfirmationController, + tooltip: 'Tooltip for Vessel Confirmation Process Limit', + ), + _buildFieldWithTooltip( + fieldName: 'Row To Display', + controller: rowToDisplayController, + tooltip: 'Tooltip for Row To Display', + ), + _buildFieldWithTooltip( + fieldName: 'Link To Display', + controller: linkToDisplayController, + tooltip: 'Tooltip for Link To Display', + ), + _buildFieldWithTooltip( + fieldName: 'Row To Add', + controller: rowToAddController, + tooltip: 'Tooltip for Row To Add', + ), + _buildFieldWithTooltip( + fieldName: 'LOV Row To Display', + controller: lovRowToDisplayController, + tooltip: 'Tooltip for LOV Row To Display', + ), + _buildFieldWithTooltip( + fieldName: 'LOV Link To Display', + controller: lovLinkToDisplayController, + tooltip: 'Tooltip for LOV Link To Display', + ), + _buildFieldWithTooltip( + fieldName: 'OID Server Name', + controller: oidServerNameController, + tooltip: 'Tooltip for OID Server Name', + ), + _buildFieldWithTooltip( + fieldName: 'OID Base', + controller: oidBaseController, + tooltip: 'Tooltip for OID Base', + ), + _buildFieldWithTooltip( + fieldName: 'OID Admin User', + controller: oidAdminUserController, + tooltip: 'Tooltip for OID Admin User', + ), + _buildFieldWithTooltip( + fieldName: 'OID Server Port', + controller: oidServerPortController, + tooltip: 'Tooltip for OID Server Port', + ), + _buildFieldWithTooltip( + fieldName: 'User Default Group', + controller: userDefaultGroupController, + tooltip: 'Tooltip for User Default Group', + ), + _buildFieldWithTooltip( + fieldName: 'Default Department', + controller: defaultDepartmentController, + tooltip: 'Tooltip for Default Department', + ), + _buildFieldWithTooltip( + fieldName: 'Default Position', + controller: defaultPositionController, + tooltip: 'Tooltip for Default Position', + ), + _buildFieldWithTooltip( + fieldName: 'Single Charge', + controller: singleChargeController, + tooltip: 'Tooltip for Single Charge', + ), + _buildFieldWithTooltip( + fieldName: 'First Day of The Week', + controller: firstDayOfWeekController, + tooltip: 'Tooltip for First Day of The Week', + ), + _buildFieldWithTooltip( + fieldName: 'Hour per Shift', + controller: hourPerShiftController, + tooltip: 'Tooltip for Hour per Shift', + ), + _buildFieldWithTooltip( + fieldName: 'CN Billing Frequency', + controller: cnBillingFrequencyController, + tooltip: 'Tooltip for CN Billing Frequency', + ), + _buildFieldWithTooltip( + fieldName: 'Billing Department Code', + controller: billingDepartmentCodeController, + tooltip: 'Tooltip for Billing Department Code', + ), + _buildFieldWithTooltip( + fieldName: 'Base Price List', + controller: basePriceListController, + tooltip: 'Tooltip for Base Price List', + ), + _buildFieldWithTooltip( + fieldName: + 'Non-Container Service Order Auto-Approval Department Code', + controller: nonContainerServiceController, + tooltip: + 'Tooltip for Non-Container Service Order Auto-Approval Department Code', + ), + _buildFieldWithTooltip( + fieldName: 'EDI MAE Scheduler ON/OFF', + controller: ediMaeSchedulerController, + tooltip: 'Tooltip for EDI MAE Scheduler ON/OFF', + ), + _buildFieldWithTooltip( + fieldName: 'EDI Scheduler ON/OFF', + controller: ediSchedulerController, + tooltip: 'Tooltip for EDI Scheduler ON/OFF', + ), + _buildFieldWithTooltip( + fieldName: 'Company Name', + controller: companynameController, + tooltip: 'Company Name', + ), + Text("Is Registration Allowed?", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: AppStyle.txtGilroyMedium16Bluegray800), + Row( + children: [ + Radio( + value: true, + groupValue: isRegistrationAllow, + onChanged: (value) { + setState(() { + isRegistrationAllow = value as bool; + }); + }, + ), + Text("Yes", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: AppStyle.txtGilroyMedium16Bluegray800), + Radio( + value: false, + groupValue: isRegistrationAllow, + onChanged: (value) { + setState(() { + isRegistrationAllow = value as bool; + }); + }, + ), + Text("No", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: AppStyle.txtGilroyMedium16Bluegray800), + ], + ), + ElevatedButton( + onPressed: () { + _uploadImageFile(); + }, + style: ButtonStyle( + backgroundColor: _imageBytes == null + ? MaterialStateProperty.all(Colors.red) + : MaterialStateProperty.all( + Colors.green), // Change to the desired color + ), + child: _imageBytes == null + ? Text("Pick a Company Logo", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: AppStyle.txtGilroyMedium16Bluegray800) + : Text("Company Logo uploaded Successful", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: AppStyle.txtGilroyMedium16Bluegray800), + ), + Tooltip( + message: + 'Allow customer code for MSC taulia CSV generation', + child: Column( + children: [ + Text("i", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: AppStyle.txtGilroyMedium16Bluegray800), + CustomTextFormField( + focusNode: FocusNode(), + controller: lastController, + margin: getMargin(top: 7), + textInputType: TextInputType.text), + ], + ) + // TextFormField( + // controller: lastController, + // decoration: const InputDecoration( + // labelText: 'i', + // ), + // ), + ), + CustomButton( + height: getVerticalSize(50), + text: "Save", + margin: getMargin(top: 24, bottom: 5), + onTap: () async { + formData['regitrationAllowed'] = isRegistrationAllow; + formData['schedulerTime'] = schedulerTimerController.text; + formData['leaseTaxCode'] = leaseTaxCodeController.text; + formData['vesselConfProcessLimit'] = + vesselConfirmationController.text; + formData['rowToDisplay'] = rowToDisplayController.text; + formData['linkToDisplay'] = linkToDisplayController.text; + formData['rowToAdd'] = rowToAddController.text; + formData['lovRowToDisplay'] = + lovRowToDisplayController.text; + formData['lovLinkToDisplay'] = + lovLinkToDisplayController.text; + formData['oidserverName'] = oidServerNameController.text; + formData['oidBase'] = oidBaseController.text; + formData['oidAdminUser'] = oidAdminUserController.text; + formData['oidServerPort'] = oidServerPortController.text; + formData['userDefaultGroup'] = + userDefaultGroupController.text; + formData['defaultDepartment'] = + defaultDepartmentController.text; + formData['defaultPosition'] = + defaultPositionController.text; + formData['singleCharge'] = singleChargeController.text; + formData['firstDayOftheWeek'] = + firstDayOfWeekController.text; + formData['hourPerShift'] = hourPerShiftController.text; + formData['cnBillingFrequency'] = + cnBillingFrequencyController.text; + formData['billingDepartmentCode'] = + billingDepartmentCodeController.text; + formData['basePriceList'] = basePriceListController.text; + formData['nonContainerServiceOrder'] = + nonContainerServiceController.text; + formData['ediMaeSchedulerONOFF'] = + ediMaeSchedulerController.text; + formData['ediSchedulerONOFF'] = ediSchedulerController.text; + //formData['']=lastController.text; + formData['upload_Logo_name'] = logoname; + formData['upload_Logo_path'] = logopath; + formData['company_Display_Name'] = + companynameController.text; + final token = await TokenManager.getToken(); + try { + print("token is : $token"); + print(formData); + + if (formData != null) { + // Create new project + apiService.updateParameter( + token!, widget.sysparameter, formData); + } + Navigator.pop(context); + // Add navigation or any other logic after successful create/update + } catch (e) { + print('error is $e'); + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: const Text('Error'), + content: Text( + 'Failed to ${widget.sysparameter == null ? 'create' : 'update'} project: $e'), + actions: [ + TextButton( + child: const Text('OK'), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ], + ); + }, + ); + } + }, + ), + ], + ), + ), + ))); + } + + Widget _buildFieldWithTooltip({ + required String fieldName, + required TextEditingController controller, + required String tooltip, + }) { + return Tooltip( + message: tooltip, + child: Padding( + padding: getPadding(top: 18), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text("$fieldName", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: AppStyle.txtGilroyMedium16Bluegray800), + CustomTextFormField( + focusNode: FocusNode(), + controller: controller, + hintText: "Enter Your $fieldName", + margin: getMargin(top: 7), + textInputType: TextInputType.text) + ])), + + // TextFormField( + // controller: controller, + // decoration: InputDecoration( + // labelText: fieldName, + // ), + // ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/dynamic_form/UpdatedynamicForm.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/dynamic_form/UpdatedynamicForm.dart new file mode 100644 index 0000000..bbac4af --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/dynamic_form/UpdatedynamicForm.dart @@ -0,0 +1,279 @@ +import 'package:flutter/material.dart'; + +import '../../providers/token_manager.dart'; +import 'dynamic_form_service.dart'; + +class EditForm extends StatefulWidget { + final Map formData; + + EditForm({required this.formData}); + + @override + _EditFormState createState() => _EditFormState(); +} + +class _EditFormState extends State { + TextEditingController formNameController = TextEditingController(); + TextEditingController formDescController = TextEditingController(); + TextEditingController relatedToController = TextEditingController(); + TextEditingController pageEventController = TextEditingController(); + TextEditingController buttonCaptionController = TextEditingController(); + + final DynamicForApiService apiService = DynamicForApiService(); + + List components = []; // List to store table data + List relatedToFixedDropdown = ['Menu', 'Related To',]; + List pageEventFixedDropdown = ['OnClick', 'OnBlur',]; + + List typeFixedDropdown = ['text', 'dropdown','date','checkbox','textarea','togglebutton']; + List mappingFixedDropdown = ['TEXTFIELD1', 'TEXTFIELD2','TEXTFIELD3','TEXTFIELD4','TEXTFIELD5','TEXTFIELD6','TEXTFIELD7','TEXTFIELD8','TEXTFIELD9','TEXTFIELD10','TEXTFIELD11','TEXTFIELD12','TEXTFIELD13','TEXTFIELD14','TEXTFIELD15','TEXTFIELD16','TEXTFIELD17','TEXTFIELD18','TEXTFIELD19','TEXTFIELD20','TEXTFIELD21','TEXTFIELD22','TEXTFIELD23', + 'TEXTFIELD24','TEXTFIELD25','TEXTFIELD26','LONGTEXT1','LONGTEXT2','LONGTEXT3','LONGTEXT4',]; + List truefalseFixedDropdown = ['true', 'false',]; + + @override + void initState() { + super.initState(); + // Initialize text controllers with the data from the selected row + formNameController.text = widget.formData['form_name'] ?? ''; + formDescController.text = widget.formData['form_desc'] ?? ''; + relatedToController.text = widget.formData['related_to'] ?? ''; + pageEventController.text = widget.formData['page_event'] ?? ''; + buttonCaptionController.text = widget.formData['button_caption'] ?? ''; + + // Initialize the components data, or you can load it from formData['components']. + // For this example, we'll use an empty list. + components = widget.formData['components'] ?? []; + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text('Edit Form'), + ), + body: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + children: [ + TextFormField( + controller: formNameController, + decoration: InputDecoration(labelText: 'Form Name'), + ), + TextFormField( + controller: formDescController, + decoration: InputDecoration(labelText: 'Form Description'), + ), + DropdownButtonFormField( + value: relatedToController.text, + decoration: + const InputDecoration(labelText: 'Select Related To'), + items: [ + ...relatedToFixedDropdown.map>( + (item) { + return DropdownMenuItem( + value: item.toString(), + child: Text(item), + ); + }, + ), + ], + onChanged: (value) { + setState(() { + relatedToController.text = value!; + }); + }, + ), + DropdownButtonFormField( + value: pageEventController.text, + decoration: + const InputDecoration(labelText: 'Select Page Event'), + items: [ + ...pageEventFixedDropdown.map>( + (item) { + return DropdownMenuItem( + value: item.toString(), + child: Text(item), + ); + }, + ), + ], + onChanged: (value) { + setState(() { + pageEventController.text = value!; + }); + }, + ), + TextFormField( + controller: buttonCaptionController, + decoration: InputDecoration(labelText: 'Button Caption'), + ), + + const Text('Components Details'), + SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: DataTable( + columns: const [ + DataColumn(label: Text('Label')), + DataColumn(label: Text('Type')), + DataColumn(label: Text('Mapping')), + DataColumn(label: Text('Mandatory')), + DataColumn(label: Text('Readonly')), + DataColumn(label: Text('Drop Values')), + DataColumn(label: Text('SP')), + DataColumn(label: Text('Actions'), numeric: false), // Add Actions column + ], + rows: components.asMap().entries.map((entry) { + final index = entry.key; + final component = entry.value; + + return DataRow( + cells: [ + DataCell(TextField( + controller: TextEditingController(text: component['label'] ?? ''), + onChanged: (value){ + component['label']=value; + }, + )), + DataCell( + DropdownButtonFormField( + value: component['type'], + decoration: + const InputDecoration(labelText: 'Select Type'), + items: [ + ...typeFixedDropdown.map>( + (item) { + return DropdownMenuItem( + value: item.toString(), + child: Text(item), + ); + }, + ), + ], + onChanged: (value) { + setState(() { + component['type'] = value; + }); + }, + ), + + ), + DataCell( + DropdownButtonFormField( + value: component['mapping'], + decoration: + const InputDecoration(labelText: 'Select Mapping'), + items: [ + ...mappingFixedDropdown.map>( + (item) { + return DropdownMenuItem( + value: item.toString(), + child: Text(item), + ); + }, + ), + ], + onChanged: (value) { + setState(() { + component['mapping'] = value; + }); + }, + ), + + ), + DataCell(TextField( + controller: TextEditingController(text: component['mandatory'] ?? ''), + onChanged: (value){ + component['mandatory']=value; + }, + )), + DataCell( + DropdownButtonFormField( + value: component['readonly'], + decoration: + const InputDecoration(labelText: 'Select Read Only'), + items: [ + ...truefalseFixedDropdown.map>( + (item) { + return DropdownMenuItem( + value: item.toString(), + child: Text(item), + ); + }, + ), + ], + onChanged: (value) { + setState(() { + component['readonly'] = value; + }); + }, + ), + ), + DataCell(TextField( + controller: TextEditingController(text: component['drop_values'] ?? ''), + onChanged: (value){ + component['drop_values']=value; + }, + )), + DataCell(TextField( + controller: TextEditingController(text: component['sp'] ?? ''), + onChanged: (value){ + component['sp']=value; + }, + )), + DataCell( + ElevatedButton( + onPressed: () { + setState(() { + components.removeAt(index); + }); + }, + child: Text('Delete'), + ), + ), + ], + ); + }).toList(), + ), + ), + ElevatedButton( + onPressed: () { + // Add a new row to the components table + components.add({ + 'label': '', + 'type': null, + 'mapping': null, + 'mandatory': '', + 'readonly': null, + 'drop_values': '', + 'sp': '', + }); + setState(() {}); // Refresh the UI to show the new row + }, + child: Text('Add Row'), + ), + + ElevatedButton( + onPressed: () async { + // Save the updated data back to the original data list + widget.formData['form_name'] = formNameController.text; + widget.formData['form_desc'] = formDescController.text; + widget.formData['related_to'] = relatedToController.text; + widget.formData['page_event'] = pageEventController.text; + widget.formData['button_caption'] = buttonCaptionController.text; + widget.formData['components'] = components; + final token = await TokenManager.getToken(); + apiService.updateDynamicForm(token!, widget.formData['form_id'], widget.formData); + Navigator.of(context).pop(); + }, + child: Text('Update'), + ), + ], + ), + ), + ), + ); + } +} + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/dynamic_form/create_dynamicform.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/dynamic_form/create_dynamicform.dart new file mode 100644 index 0000000..6666346 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/dynamic_form/create_dynamicform.dart @@ -0,0 +1,390 @@ +import 'package:flutter/material.dart'; + +import '../../utils/image_constant.dart'; +import '../../utils/size_utils.dart'; +import '../../providers/token_manager.dart'; +import '../../theme/app_style.dart'; +import '../../widgets/app_bar/appbar_image.dart'; +import '../../widgets/app_bar/appbar_title.dart'; +import '../../widgets/app_bar/custom_app_bar.dart'; + +import '../../widgets/custom_dropdown_field.dart'; +import '../../widgets/custom_text_form_field.dart'; +import '../Login Screen/CustomButton.dart'; +import 'dynamic_form_service.dart'; + +class CreateForm extends StatefulWidget { + @override + _CreateFormState createState() => _CreateFormState(); +} + +class _CreateFormState extends State { + TextEditingController formNameController = TextEditingController(); + TextEditingController formDescController = TextEditingController(); + TextEditingController relatedToController = TextEditingController(); + TextEditingController pageEventController = TextEditingController(); + TextEditingController buttonCaptionController = TextEditingController(); + + final DynamicForApiService apiService = DynamicForApiService(); + + List> components = []; + + List relatedToFixedDropdown = [ + 'Menu', + 'Related To', + ]; + List pageEventFixedDropdown = [ + 'OnClick', + 'OnBlur', + ]; + + List typeFixedDropdown = [ + 'text', + 'dropdown', + 'date', + 'checkbox', + 'textarea', + 'togglebutton' + ]; + List mappingFixedDropdown = [ + 'TEXTFIELD1', + 'TEXTFIELD2', + 'TEXTFIELD3', + 'TEXTFIELD4', + 'TEXTFIELD5', + 'TEXTFIELD6', + 'TEXTFIELD7', + 'TEXTFIELD8', + 'TEXTFIELD9', + 'TEXTFIELD10', + 'TEXTFIELD11', + 'TEXTFIELD12', + 'TEXTFIELD13', + 'TEXTFIELD14', + 'TEXTFIELD15', + 'TEXTFIELD16', + 'TEXTFIELD17', + 'TEXTFIELD18', + 'TEXTFIELD19', + 'TEXTFIELD20', + 'TEXTFIELD21', + 'TEXTFIELD22', + 'TEXTFIELD23', + 'TEXTFIELD24', + 'TEXTFIELD25', + 'TEXTFIELD26', + 'LONGTEXT1', + 'LONGTEXT2', + 'LONGTEXT3', + 'LONGTEXT4', + ]; + List truefalseFixedDropdown = [ + 'true', + 'false', + ]; + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: CustomAppBar( + height: getVerticalSize(49), + leadingWidth: 40, + leading: AppbarImage( + height: getSize(24), + width: getSize(24), + svgPath: ImageConstant.imgArrowleft, + margin: getMargin(left: 16, top: 12, bottom: 13), + onTap: () { + Navigator.pop(context); + }), + centerTitle: true, + title: AppbarTitle(text: "Create Dynamic Form"), + ), + body: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + children: [ + Padding( + padding: getPadding(top: 19), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text("Form Name", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: TextStyle( + fontSize: 16, fontWeight: FontWeight.w700)), + CustomTextFormField( + focusNode: FocusNode(), + hintText: "Enter Form Name", + controller: formNameController, + margin: getMargin(top: 6)) + ])), + Padding( + padding: getPadding(top: 19), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text("Form Description", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: TextStyle( + fontSize: 16, fontWeight: FontWeight.w700)), + CustomTextFormField( + focusNode: FocusNode(), + hintText: "Enter Form Description", + controller: formDescController, + margin: getMargin(top: 6)) + ])), + Padding( + padding: getPadding(top: 18), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text( + "Select Related To", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: + TextStyle(fontSize: 16, fontWeight: FontWeight.w700), + ), + CustomDropdownFormField( + items: [ + ...relatedToFixedDropdown.map>( + (item) { + return DropdownMenuItem( + value: item.toString(), + child: Text(item, + style: AppStyle.txtGilroyMedium16Bluegray900), + ); + }, + ), + ], + onChanged: (value) { + setState(() { + relatedToController.text = value!; + }); + }, + ) + ], + ), + ), + Padding( + padding: getPadding(top: 18), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text( + "Select Page Event", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: + TextStyle(fontSize: 16, fontWeight: FontWeight.w700), + ), + CustomDropdownFormField( + items: [ + ...pageEventFixedDropdown.map>( + (item) { + return DropdownMenuItem( + value: item.toString(), + child: Text(item, + style: AppStyle.txtGilroyMedium16Bluegray900), + ); + }, + ), + ], + onChanged: (value) { + setState(() { + pageEventController.text = value!; + }); + }, + ) + ], + ), + ), + Padding( + padding: getPadding(top: 19), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text("Button Caption", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: TextStyle( + fontSize: 16, fontWeight: FontWeight.w700)), + CustomTextFormField( + focusNode: FocusNode(), + hintText: "Enter Button Caption", + controller: buttonCaptionController, + margin: getMargin(top: 6)) + ])), + const Text('Components Details'), + SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: DataTable( + columns: const [ + DataColumn(label: Text('Label')), + DataColumn(label: Text('Type')), + DataColumn(label: Text('Mapping')), + DataColumn(label: Text('Mandatory')), + DataColumn(label: Text('Readonly')), + DataColumn(label: Text('Drop Values')), + DataColumn(label: Text('SP')), + ], + rows: components.asMap().entries.map((entry) { + final index = entry.key; + final component = entry.value; + bool? isReadonly = false; + return DataRow( + cells: [ + DataCell(TextField( + controller: TextEditingController( + text: component['label'] ?? ''), + onChanged: (value) { + component['label'] = value; + }, + )), + DataCell( + DropdownButtonFormField( + decoration: + const InputDecoration(labelText: 'Select Type'), + items: [ + ...typeFixedDropdown + .map>( + (item) { + return DropdownMenuItem( + value: item.toString(), + child: Text(item, + style: AppStyle + .txtGilroyMedium16Bluegray900), + ); + }, + ), + ], + onChanged: (value) { + setState(() { + component['type'] = value; + }); + }, + ), + ), + DataCell( + DropdownButtonFormField( + decoration: const InputDecoration( + labelText: 'Select Mapping'), + items: [ + ...mappingFixedDropdown + .map>( + (item) { + return DropdownMenuItem( + value: item.toString(), + child: Text(item, + style: AppStyle + .txtGilroyMedium16Bluegray900), + ); + }, + ), + ], + onChanged: (value) { + setState(() { + component['mapping'] = value; + }); + }, + ), + ), + DataCell(TextField( + controller: TextEditingController( + text: component['mandatory'] ?? ''), + onChanged: (value) { + component['mandatory'] = value; + }, + )), + DataCell( + DropdownButtonFormField( + decoration: const InputDecoration( + labelText: 'Select Read Only'), + items: [ + ...truefalseFixedDropdown + .map>( + (item) { + return DropdownMenuItem( + value: item.toString(), + child: Text(item, + style: AppStyle + .txtGilroyMedium16Bluegray900), + ); + }, + ), + ], + onChanged: (value) { + setState(() { + component['readonly'] = value; + }); + }, + ), + ), + DataCell(TextField( + controller: TextEditingController( + text: component['drop_values'] ?? ''), + onChanged: (value) { + component['drop_values'] = value; + }, + )), + DataCell(TextField( + controller: TextEditingController( + text: component['sp'] ?? ''), + onChanged: (value) { + component['sp'] = value; + }, + )), + ], + ); + }).toList(), + ), + ), + CustomButton( + height: getVerticalSize(50), + text: "Add Row", + onTap: () async { + components.add({ + 'label': '', + 'type': '', + 'mapping': '', + 'mandatory': '', + 'readonly': '', + 'drop_values': '', + 'sp': '', + }); + setState(() {}); + }, + ), + CustomButton( + height: getVerticalSize(50), + text: "Create Dynamic Form", + onTap: () async { + final dynamicFormData = { + 'form_name': formNameController.text, + 'form_desc': formDescController.text, + 'related_to': relatedToController.text, + 'page_event': pageEventController.text, + 'button_caption': buttonCaptionController.text, + 'components': components, + }; + final token = await TokenManager.getToken(); + apiService.createDynamicForm(token!, dynamicFormData); + Navigator.of(context).pop(); + }, + ), + ], + ), + ), + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/dynamic_form/dynamic_form_screen_list_f.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/dynamic_form/dynamic_form_screen_list_f.dart new file mode 100644 index 0000000..4370731 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/dynamic_form/dynamic_form_screen_list_f.dart @@ -0,0 +1,321 @@ +import 'package:flutter/material.dart'; +import 'package:google_fonts/google_fonts.dart'; + +import '../../utils/color_constants.dart'; +import '../../utils/image_constant.dart'; +import '../../utils/size_utils.dart'; +import '../../providers/token_manager.dart'; +import '../../widgets/app_bar/appbar_image.dart'; +import '../../widgets/app_bar/appbar_title.dart'; +import '../../widgets/app_bar/custom_app_bar.dart'; +import 'UpdatedynamicForm.dart'; +import 'create_dynamicform.dart'; +import 'dynamic_form_service.dart'; + +class DynamicFormF extends StatefulWidget { + const DynamicFormF({super.key}); + + @override + State createState() => _DynamicFormFState(); +} + +class _DynamicFormFState extends State { + final DynamicForApiService apiService = DynamicForApiService(); + + late List> allData = []; + + bool isLoading = false; + + @override + void initState() { + super.initState(); + _loadDynamicForms(); + } + + Future _loadDynamicForms() async { + final token = await TokenManager.getToken(); + try { + final alData = await apiService.getallDynamicForms(token!); + + setState(() { + allData = alData; + + print('allData fetched...'); + }); + isLoading = true; + } catch (e) { + isLoading = true; + print('Failed to load allData: $e'); + } + } + + Future deleteEntity(Map entity) async { + try { + final token = await TokenManager.getToken(); + await apiService.deleteDynamicForm(token!, entity['form_id']); + setState(() { + allData.remove(entity); + }); + } catch (e) { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: const Text('Error'), + content: Text('Failed to delete entity: $e'), + actions: [ + TextButton( + child: const Text('OK'), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ], + ); + }, + ); + } + } + + Future _onRefresh() async { + setState(() {}); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: CustomAppBar( + height: getVerticalSize(49), + leadingWidth: 40, + leading: AppbarImage( + height: getSize(24), + width: getSize(24), + svgPath: ImageConstant.imgArrowleftBlueGray900, + margin: getMargin(left: 16, top: 12, bottom: 13), + onTap: () { + Navigator.pop(context); + }), + actions: [ + GestureDetector( + child: Icon( + Icons.add, + color: Colors.black, + size: 20, + ), + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => CreateForm(), + ), + ).then((value) => {_loadDynamicForms()}); + }, + ), + const SizedBox( + width: 20, + ) + ], + centerTitle: true, + title: AppbarTitle(text: "Dynamic Form")), + body: isLoading == false + ? const Center(child: CircularProgressIndicator()) + : allData.isEmpty + ? const Center( + child: Text('No Services available.'), + ) + : RefreshIndicator( + onRefresh: _onRefresh, + child: ListView.builder( + itemCount: allData.length, + itemBuilder: (context, index) { + return Padding( + padding: EdgeInsets.symmetric(vertical: 2), + child: Row( + children: [ + InkWell( + onLongPress: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: const Text('Confirm Deletion'), + content: const Text( + 'Are you sure you want to delete this Module?'), + actions: [ + TextButton( + child: const Text('Cancel'), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + TextButton( + child: const Text('Delete'), + onPressed: () { + Navigator.of(context).pop(); + deleteEntity(allData[index]); + }, + ), + ], + ); + }, + ); + }, + child: Card( + margin: EdgeInsets.only(left: 8, right: 3), + color: index % 2 == 0 + ? Color.fromARGB(255, 234, 203, 239) + : Color.fromARGB(255, 198, 183, 232), + child: Container( + height: 100, + width: MediaQuery.of(context).size.width * + 75 / + 100, + padding: EdgeInsets.symmetric( + horizontal: 10, vertical: 5), + child: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Row( + children: [ + //Text('Form Name'), + + Text( + allData[index]['form_name'] ?? + 'N/A', + style: GoogleFonts.poppins() + .copyWith( + fontSize: 18, + fontWeight: + FontWeight.w700, + color: ColorConstant + .purple900), + ), + ], + ), + Row( + children: [ + //Text('Form Description'), + Text( + allData[index]['form_desc'] ?? + 'N/A', + style: GoogleFonts.poppins() + .copyWith( + fontSize: 12, + fontWeight: + FontWeight.w400), + ), + ], + ), + Row( + children: [ + Text( + 'Related to - ', + style: GoogleFonts.poppins() + .copyWith( + fontSize: 14, + fontWeight: + FontWeight.w500), + ), + const SizedBox( + width: 5, + ), + Text( + allData[index] + ['related_to'] ?? + 'N/A', + style: GoogleFonts.poppins() + .copyWith( + fontSize: 14, + fontWeight: + FontWeight.w500), + ), + ], + ), + Row( + children: [ + Text( + 'Page event- ', + style: GoogleFonts.poppins() + .copyWith( + fontSize: 14, + fontWeight: + FontWeight.w500), + ), + const SizedBox( + width: 5, + ), + Text( + allData[index] + ['page_event'] ?? + 'N/A', + style: GoogleFonts.poppins() + .copyWith( + fontSize: 14, + fontWeight: + FontWeight.w500), + ), + ], + ) + ], + ), + IconButton( + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + EditForm( + formData: + allData[index]), + ), + ).then((value) => + {_loadDynamicForms()}); + }, + icon: Icon(Icons.edit)) + ], + ), + ), + ), + ), + InkWell( + onTap: () async { + print(allData[index]); + final token = await TokenManager.getToken(); + apiService.BuildForms(token!, + allData[index]['form_id'], context); + }, + child: Card( + color: index % 2 == 0 + ? Color.fromARGB(255, 234, 203, 239) + : Color.fromARGB(255, 198, 183, 232), + child: Container( + height: 100, + width: MediaQuery.of(context).size.width * + 19 / + 100, + child: GestureDetector( + child: Center( + child: Text( + 'Build', + textAlign: TextAlign.center, + style: GoogleFonts.poppins().copyWith( + fontSize: 14, + fontWeight: FontWeight.w600), + )), + ), + ), + ), + ) + ], + ), + ); + }), + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/dynamic_form/dynamic_form_service.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/dynamic_form/dynamic_form_service.dart new file mode 100644 index 0000000..a89392a --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/dynamic_form/dynamic_form_service.dart @@ -0,0 +1,104 @@ +import 'package:dio/dio.dart'; +import 'package:flutter/material.dart'; +import 'package:fluttertoast/fluttertoast.dart'; +import '../../resources/api_constants.dart'; +import '../../widgets/custom_messenger.dart'; +import '../LogoutService/Logoutservice.dart'; + +class DynamicForApiService { + final String baseUrl = ApiConstants.baseUrl; + final Dio dio = Dio(); +//api/dynamic_form_build + Future BuildForms(String token, int id, BuildContext context) async { + try { + dio.options.headers['Authorization'] = 'Bearer $token'; + final response = + await dio.get('$baseUrl/api/dynamic_form_build?form_id=$id'); + if (response.statusCode == 401) { + LogoutService.logout(); + } + if (response.statusCode! <= 209) { + // Fluttertoast.showToast( + // msg: 'Build success', + // backgroundColor: Colors.red, + // ); + ScaffoldMessenger.of(context).showSnackBar( + ShowSnackAlert.CustomMessenger(context, Colors.green.shade600, + Colors.green.shade900, ' Build Success')); + } else { + Fluttertoast.showToast( + msg: 'Unable to build', + backgroundColor: Colors.red, + ); + throw Exception('Unexpected response type'); + } + } catch (e) { + throw Exception('Failed to Build form: $e'); + } + } + + Future>> getallDynamicForms( + String token, + ) async { + try { + dio.options.headers['Authorization'] = 'Bearer $token'; + final response = await dio.get('$baseUrl/api/form_setup'); + if (response.statusCode == 401) { + LogoutService.logout(); + } + final responseData = response.data['items']; + if (responseData is List) { + final entities = responseData.cast>(); + return entities; + } else if (responseData is Map) { + return [responseData]; + } else { + throw Exception('Unexpected response type'); + } + } catch (e) { + throw Exception('Failed to get modules by projectId: $e'); + } + } + + Future createDynamicForm( + String token, Map entity) async { + try { + print("in post api...$entity"); + dio.options.headers['Authorization'] = 'Bearer $token'; + var response = await dio.post('$baseUrl/api/form_setup', data: entity); + if (response.statusCode == 401) { + LogoutService.logout(); + } + print('response is ${response.data}'); + } catch (e) { + throw Exception('Failed to create Dynamic form: $e'); + } + } + + Future updateDynamicForm( + String token, int entityId, Map entity) async { + try { + dio.options.headers['Authorization'] = 'Bearer $token'; + var response = + await dio.put('$baseUrl/api/form_setup/$entityId', data: entity); + if (response.statusCode == 401) { + LogoutService.logout(); + } + print(entity); + } catch (e) { + throw Exception('Failed to update Dynamic form: $e'); + } + } + + Future deleteDynamicForm(String token, int entityId) async { + try { + dio.options.headers['Authorization'] = 'Bearer $token'; + var response = await dio.delete('$baseUrl/api/form_setup/$entityId'); + if (response.statusCode == 401) { + LogoutService.logout(); + } + } catch (e) { + throw Exception('Failed to delete Dynamic form: $e'); + } + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/dynamic_form/list_dynamic_form_screen.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/dynamic_form/list_dynamic_form_screen.dart new file mode 100644 index 0000000..1f9a63a --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/dynamic_form/list_dynamic_form_screen.dart @@ -0,0 +1,226 @@ +// ignore_for_file: use_build_context_synchronously + +import 'package:flutter/material.dart'; +import 'package:flutter/rendering.dart'; +import '../../utils/color_constants.dart'; +import '../../utils/image_constant.dart'; +import '../../utils/size_utils.dart'; +import '../../providers/token_manager.dart'; +import '../../widgets/app_bar/appbar_image.dart'; +import '../../widgets/app_bar/appbar_title.dart'; +import '../../widgets/app_bar/custom_app_bar.dart'; +import 'UpdatedynamicForm.dart'; +import 'create_dynamicform.dart'; +import 'dynamic_form_service.dart'; + +class DynamicForm extends StatefulWidget { + @override + _DynamicFormState createState() => _DynamicFormState(); +} + +class _DynamicFormState extends State { + final DynamicForApiService apiService = DynamicForApiService(); + + late List> allData = []; + + bool isLoading = false; + + @override + void initState() { + super.initState(); + _loadDynamicForms(); + } + + Future _loadDynamicForms() async { + final token = await TokenManager.getToken(); + try { + final alData = await apiService.getallDynamicForms(token!); + + setState(() { + allData = alData; + + print('allData fetched...'); + }); + isLoading = true; + } catch (e) { + isLoading = true; + print('Failed to load allData: $e'); + } + } + + Future deleteEntity(Map entity) async { + try { + final token = await TokenManager.getToken(); + await apiService.deleteDynamicForm(token!, entity['form_id']); + setState(() { + allData.remove(entity); + }); + } catch (e) { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: const Text('Error'), + content: Text('Failed to delete entity: $e'), + actions: [ + TextButton( + child: const Text('OK'), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ], + ); + }, + ); + } + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: CustomAppBar( + height: getVerticalSize(49), + leadingWidth: 40, + leading: AppbarImage( + height: getSize(24), + width: getSize(24), + svgPath: ImageConstant.imgArrowleftBlueGray900, + margin: getMargin(left: 16, top: 12, bottom: 13), + onTap: () { + Navigator.pop(context); + }), + actions: [ + GestureDetector( + child: Icon( + Icons.add, + color: Colors.black, + size: 20, + ), + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => CreateForm(), + ), + ).then((value) => {_loadDynamicForms()}); + }, + ), + const SizedBox( + width: 20, + ) + ], + centerTitle: true, + title: AppbarTitle(text: "Dynamic Form")), + body: isLoading == false + ? const Center(child: CircularProgressIndicator()) + : allData.isEmpty + ? const Center( + child: Text('No Services available.'), + ) + : Scrollable( + viewportBuilder: + (BuildContext context, ViewportOffset position) { + return SingleChildScrollView( + scrollDirection: Axis.vertical, + child: SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: DataTable( + columns: [ + DataColumn(label: Text('Form Name')), + DataColumn(label: Text('Form Description')), + DataColumn(label: Text('Related To')), + DataColumn(label: Text('Page Event')), + DataColumn(label: Text('Button Caption')), + DataColumn(label: Text('Build')), + DataColumn(label: Text('Actions')), + ], + rows: allData.map((module) { + return DataRow( + cells: [ + DataCell( + Text('${module['form_name'] ?? 'N/A'}')), + DataCell( + Text('${module['form_desc'] ?? 'N/A'}')), + DataCell( + Text('${module['related_to'] ?? 'N/A'}')), + DataCell( + Text('${module['page_event'] ?? 'N/A'}')), + DataCell(Text( + '${module['button_caption'] ?? 'N/A'}')), + DataCell(Row( + children: [ + ElevatedButton( + onPressed: () async { + print(module); + final token = + await TokenManager.getToken(); + apiService.BuildForms( + token!, module['form_id'], context); + }, + child: Text("build"), + style: ElevatedButton.styleFrom( + backgroundColor: ColorConstant.blue700, + ), + ) + ], + )), + DataCell(Row( + children: [ + IconButton( + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + EditForm(formData: module), + ), + ).then( + (value) => {_loadDynamicForms()}); + }, + icon: Icon(Icons.edit), + ), + IconButton( + onPressed: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: const Text( + 'Confirm Deletion'), + content: const Text( + 'Are you sure you want to delete this Module?'), + actions: [ + TextButton( + child: const Text('Cancel'), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + TextButton( + child: const Text('Delete'), + onPressed: () { + Navigator.of(context).pop(); + deleteEntity(module); + }, + ), + ], + ); + }, + ); + }, + icon: Icon(Icons.delete), + ), + ], + )), + ], + ); + }).toList(), + ), + ), + ); + }, + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/forgot_password/forgot_password_f.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/forgot_password/forgot_password_f.dart new file mode 100644 index 0000000..f73119c --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/forgot_password/forgot_password_f.dart @@ -0,0 +1,201 @@ +import 'package:flutter/material.dart'; + +import '../../utils/color_constants.dart'; +import '../../providers/token_manager.dart'; +import '../../resources/api_constants.dart'; +import 'package:http/http.dart' as http; +import '../Login Screen/CustomButton.dart'; +import '../Login Screen/login_screen_f.dart'; + +class ForgotPasswordF extends StatefulWidget { + const ForgotPasswordF({super.key}); + + @override + State createState() => _ForgotPasswordFState(); +} + +class _ForgotPasswordFState extends State { + final TextEditingController emailController = TextEditingController(); + String message = ''; + bool isLoading = false; // Added to track loading state + + Future sendForgotPasswordRequest() async { + setState(() { + isLoading = true; // Show loading indicator when sending request + }); + + final email = emailController.text; + final token = await TokenManager.getToken(); + const String baseUrl = ApiConstants.baseUrl; + + try { + print('sending'); + + final response = await http.post( + headers: { + 'Authorization': 'Bearer $token', + 'Content-Type': 'application/json', + }, + Uri.parse('$baseUrl/token/resources/forgotpassword?email=$email'), + ); + // + if (response.statusCode == 200) { + print('email sent'); + setState(() { + message = 'An email with a reset link has been sent to $email.'; + }); + + // Delay for 3 seconds and then navigate to the login page + Future.delayed(const Duration(seconds: 3), () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => const LoginScreenF(false))); + }); + } else { + print(response.statusCode); + setState(() { + message = 'Failed to send the reset link. Please try again.'; + }); + } + } catch (e) { + throw Exception('error is $e'); + } + + setState(() { + isLoading = false; // Hide loading indicator when the request is complete + }); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: const Color.fromARGB(255, 233, 229, 249), + body: SingleChildScrollView( + child: Form( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + const SizedBox( + height: 50, + ), + // image container + // Container( + // alignment: Alignment.center, + // margin: const EdgeInsets.symmetric(horizontal: 40, vertical: 20), + // height: 290, + // width: 330, + // child: const Image( + // image: AssetImage('assets/images/forget-password.png'), + // ), + // ), + const SizedBox( + height: 10, + ), + Container( + margin: const EdgeInsets.symmetric(horizontal: 30, vertical: 8), + alignment: Alignment.centerLeft, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + width: 135, + child: const Text( + overflow: TextOverflow.clip, + 'Forgot Password?', + style: TextStyle( + fontSize: 26, + color: Colors.black, + fontWeight: FontWeight.bold), + ), + ), + const SizedBox( + height: 9, + ), + Container( + width: 300, + child: Text( + overflow: TextOverflow.clip, + 'Don’t worry ! It happens. Please enter the phone number we will send the OTP in this phone number.', + style: TextStyle( + fontSize: 16, color: Colors.black.withOpacity(.5)), + ), + ), + const SizedBox(height: 20), + SizedBox( + child: Text( + 'Enter your email', + style: TextStyle( + fontSize: 18, + color: Colors.black.withOpacity(.7), + fontWeight: FontWeight.w500), + ), + ), + const SizedBox( + height: 10, + ), + InkWell( + child: Container( + height: 50, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + border: Border.all(color: Colors.white), + color: Colors.white), + child: TextFormField( + controller: emailController, + decoration: InputDecoration( + border: InputBorder.none, + hintText: 'Email Address', + hintStyle: + TextStyle(color: Colors.black.withOpacity(.2))), + ), + ), + ), + const SizedBox(height: 6), + Row( + children: [ + Text( + textAlign: TextAlign.right, + ' Already have an account?,', + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w300, + color: Colors.black.withOpacity(.4)), + ), + InkWell( + child: const Text( + textAlign: TextAlign.right, + ' Login', + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w300, + color: Colors.blue), + ), + onTap: () { + Navigator.of(context).push(MaterialPageRoute( + builder: (ctx) => const LoginScreenF(false))); + }, + ), + ], + ), + const SizedBox(height: 60), + isLoading == false + ? CustomButton( + text: 'Continue', + height: 60, + width: 370, + onTap: () { + sendForgotPasswordRequest(); + }, + ) + : const Center(child: CircularProgressIndicator()) + ], + ), + ) + ], + )), + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/main_app_screen/CustomizeFooter.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/main_app_screen/CustomizeFooter.dart new file mode 100644 index 0000000..a518f37 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/main_app_screen/CustomizeFooter.dart @@ -0,0 +1,54 @@ +import 'package:flutter/material.dart'; + +class CustomizedFooter extends StatelessWidget { + final IconData homeIcon; + final IconData squareIcon; + final IconData addIcon; + final List labels; + final List onTapActions; + + CustomizedFooter({ + required this.homeIcon, + required this.squareIcon, + required this.addIcon, + required this.labels, + required this.onTapActions, + }); + + @override + Widget build(BuildContext context) { + assert(labels.length == 3 && onTapActions.length == 3); + + return Container( + decoration: BoxDecoration( + boxShadow: [ + BoxShadow( + color: Colors.grey.withOpacity(0.5), + spreadRadius: 5, + blurRadius: 7, + offset: const Offset(0, 3), + ), + ], + ), + child: BottomNavigationBar( + onTap: (index) { + onTapActions[index](); + }, + items: [ + BottomNavigationBarItem( + icon: Icon(homeIcon), + label: labels[0], + ), + BottomNavigationBarItem( + icon: Icon(squareIcon), + label: labels[1], + ), + BottomNavigationBarItem( + icon: Icon(addIcon), + label: labels[2], + ), + ], + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/main_app_screen/Dashboard.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/main_app_screen/Dashboard.dart new file mode 100644 index 0000000..eb0425d --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/main_app_screen/Dashboard.dart @@ -0,0 +1,431 @@ +// import 'package:flutter/material.dart'; +// import 'package:flutter_svg_provider/flutter_svg_provider.dart' as fs; +// import 'package:readmore/readmore.dart'; +// import '../../core/app_export.dart'; +// import '../../widgets/custom_floating_button.dart'; +// import '../../widgets/custom_icon_button.dart'; +// import 'side_slide_menu_draweritem.dart'; + +// class Dashboardcreen extends StatelessWidget { +// Dashboardcreen({Key? key}) +// : super( +// key: key, +// ); + +// final GlobalKey _scaffoldKey = GlobalKey(); + +// @override +// Widget build(BuildContext context) { +// return SafeArea( +// child: Scaffold( +// body: SizedBox( +// width: double.maxFinite, +// child: Column( +// children: [ +// Container( +// padding: EdgeInsets.symmetric( +// horizontal: 15.h, +// vertical: 43.v, +// ), +// child: Column( +// children: [ +// _buildTelevisionRow(context), +// SizedBox(height: 61.v), +// _buildOngoingStack(context), +// Divider( +// color: theme.colorScheme.primaryContainer, +// indent: 37.h, +// endIndent: 28.h, +// ), +// SizedBox(height: 9.v), +// Container( +// padding: EdgeInsets.symmetric(horizontal: 3.h), +// decoration: AppDecoration.fillGray700.copyWith( +// borderRadius: BorderRadiusStyle.roundedBorder10, +// ), +// child: Row( +// mainAxisAlignment: MainAxisAlignment.center, +// mainAxisSize: MainAxisSize.min, +// children: [ +// Container( +// margin: EdgeInsets.only( +// left: 1.h, +// top: 9.v, +// bottom: 4.v, +// ), +// decoration: AppDecoration.outlineBlack, +// child: Text( +// "Live SCORE ", +// style: theme.textTheme.bodySmall, +// ), +// ), +// CustomImageView( +// imagePath: ImageConstant.imgLive11, +// height: 32.adaptSize, +// width: 32.adaptSize, +// ) +// ], +// ), +// ), +// SizedBox(height: 9.v), +// Container( +// width: 111.h, +// padding: EdgeInsets.symmetric( +// horizontal: 4.h, +// vertical: 5.v, +// ), +// decoration: AppDecoration.fillGray700.copyWith( +// borderRadius: BorderRadiusStyle.roundedBorder10, +// ), +// child: Text( +// "Fixtures/Results", +// style: CustomTextStyles.bodyMediumPoppinsBluegray50, +// ), +// ), +// SizedBox(height: 18.v), +// Divider( +// color: theme.colorScheme.primaryContainer, +// indent: 37.h, +// endIndent: 28.h, +// ), +// SizedBox(height: 6.v), +// Align( +// alignment: Alignment.centerLeft, +// child: Padding( +// padding: EdgeInsets.only(left: 40.h), +// child: Text( +// "Stories", +// style: CustomTextStyles.headlineLargeSemiBold, +// ), +// ), +// ), +// SizedBox(height: 17.v), +// CustomImageView( +// imagePath: ImageConstant.imgImage3, +// height: 136.v, +// width: 167.h, +// radius: BorderRadius.circular( +// 5.h, +// ), +// ), +// SizedBox(height: 7.v), +// ReadMoreText( +// "Lucknow beat Punjab in RUN FEST", +// trimLines: 2, +// colorClickableText: appTheme.black900, +// trimMode: TrimMode.Line, +// trimCollapsedText: "Read more", +// moreStyle: CustomTextStyles.titleMediumBlack900Medium, +// lessStyle: CustomTextStyles.titleMediumBlack900Medium, +// ) +// ], +// ), +// ), +// SizedBox(height: 8.v) +// ], +// ), +// ), +// bottomNavigationBar: _buildBottomAppBarStack(context), +// floatingActionButton: CustomFloatingButton( +// height: 64, +// width: 64, +// alignment: Alignment.topCenter, +// child: CustomImageView( +// svgPath: ImageConstant.imgLocation, +// height: 32.0.v, +// width: 32.0.h, +// ), +// ), +// floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, +// ), +// ); +// } + +// // Section Widget +// Widget _buildTelevisionRow(BuildContext context) { +// return GestureDetector( +// onTap: () { +// _scaffoldKey.currentState?.openDrawer(); +// }, +// child: Padding( +// padding: EdgeInsets.only(left: 13.h), +// child: Row( +// mainAxisAlignment: MainAxisAlignment.center, +// crossAxisAlignment: CrossAxisAlignment.end, +// children: [ +// IconButton( +// icon: const Icon( +// Icons.circle_outlined, +// color: Colors.black, +// ), +// onPressed: () {}), +// CustomImageView( +// svgPath: ImageConstant.imgTelevision, +// height: 24.adaptSize, +// width: 24.adaptSize, +// margin: EdgeInsets.only( +// top: 11.v, +// bottom: 2.v, +// ), +// ), +// CustomImageView( +// imagePath: ImageConstant.imgImageRemovebgPreview, +// height: 35.v, +// width: 272.h, +// margin: EdgeInsets.only( +// left: 15.h, +// bottom: 2.v, +// ), +// ), +// CustomImageView( +// svgPath: ImageConstant.imgTelevisionPrimarycontainer, +// height: 24.adaptSize, +// width: 24.adaptSize, +// margin: EdgeInsets.only( +// left: 15.h, +// top: 11.v, +// ), +// ), +// Padding( +// padding: EdgeInsets.only( +// left: 11.h, +// top: 11.v, +// bottom: 2.v, +// ), +// child: CustomIconButton( +// height: 24.adaptSize, +// width: 24.adaptSize, +// decoration: IconButtonStyleHelper.fillPrimaryContainer, +// child: CustomImageView( +// svgPath: ImageConstant.imgVector, +// ), +// ), +// ) +// ], +// ), +// ), +// ); +// } + +// /// Section Widget +// Widget _buildOngoingStack(BuildContext context) { +// return SizedBox( +// height: 204.v, +// width: 350.h, +// child: Stack( +// alignment: Alignment.bottomLeft, +// children: [ +// Align( +// alignment: Alignment.topCenter, +// child: Text( +// "Ongoing", +// style: CustomTextStyles.headlineLargeSemiBold, +// ), +// ), +// Align( +// alignment: Alignment.bottomLeft, +// child: Padding( +// padding: EdgeInsets.only( +// left: 10.h, +// right: 191.h, +// bottom: 33.v, +// ), +// child: Column( +// mainAxisSize: MainAxisSize.min, +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Align( +// alignment: Alignment.centerRight, +// child: Text( +// "4.3 Ov.", +// style: theme.textTheme.titleLarge, +// ), +// ), +// SizedBox(height: 5.v), +// Text( +// "Team 1", +// style: theme.textTheme.headlineSmall, +// ) +// ], +// ), +// ), +// ), +// Align( +// alignment: Alignment.bottomLeft, +// child: Padding( +// padding: EdgeInsets.only(left: 80.h), +// child: Text( +// "Run Rate 2.80", +// style: theme.textTheme.headlineSmall, +// ), +// ), +// ), +// Align( +// alignment: Alignment.topLeft, +// child: Padding( +// padding: EdgeInsets.only( +// left: 96.h, +// top: 65.v, +// ), +// child: Text( +// "12/0-", +// style: theme.textTheme.titleLarge, +// ), +// ), +// ), +// Align( +// alignment: Alignment.bottomRight, +// child: Padding( +// padding: EdgeInsets.only( +// right: 2.h, +// bottom: 31.v, +// ), +// child: Text( +// "Team 2", +// style: theme.textTheme.headlineSmall, +// ), +// ), +// ), +// CustomImageView( +// imagePath: ImageConstant.imgImage1, +// height: 102.v, +// width: 95.h, +// alignment: Alignment.topLeft, +// margin: EdgeInsets.only(top: 38.v), +// ), +// CustomImageView( +// imagePath: ImageConstant.imgImage2, +// height: 102.adaptSize, +// width: 102.adaptSize, +// alignment: Alignment.topRight, +// margin: EdgeInsets.only(top: 41.v), +// ), +// Align( +// alignment: Alignment.center, +// child: SizedBox( +// height: 100.v, +// child: VerticalDivider( +// width: 1.h, +// thickness: 1.v, +// ), +// ), +// ), +// Align( +// alignment: Alignment.topRight, +// child: Padding( +// padding: EdgeInsets.only( +// left: 187.h, +// top: 66.v, +// right: 100.h, +// ), +// child: Column( +// mainAxisSize: MainAxisSize.min, +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Text( +// "To Bat", +// style: theme.textTheme.titleLarge, +// ), +// Text( +// "0 Ov.", +// style: theme.textTheme.titleLarge, +// ) +// ], +// ), +// ), +// ) +// ], +// ), +// ); +// } + +// /// Section Widget +// Widget _buildBottomAppBarStack(BuildContext context) { +// return SizedBox( +// child: SizedBox( +// height: 115.v, +// width: 409.h, +// child: Stack( +// alignment: Alignment.topCenter, +// children: [ +// Align( +// alignment: Alignment.bottomCenter, +// child: Container( +// width: 409.h, +// margin: EdgeInsets.only(top: 35.v), +// padding: EdgeInsets.symmetric( +// horizontal: 13.h, +// vertical: 15.v, +// ), +// decoration: BoxDecoration( +// image: DecorationImage( +// image: fs.Svg( +// ImageConstant.imgGroup146, +// ), +// fit: BoxFit.cover, +// ), +// ), +// child: Row( +// mainAxisAlignment: MainAxisAlignment.end, +// children: [ +// CustomIconButton( +// height: 50.adaptSize, +// width: 50.adaptSize, +// padding_f: EdgeInsets.all(13.h), +// child: CustomImageView( +// svgPath: ImageConstant.imgSearch, +// ), +// ), +// Padding( +// padding: EdgeInsets.only(left: 27.h), +// child: CustomIconButton( +// height: 50.adaptSize, +// width: 50.adaptSize, +// padding_f: EdgeInsets.all(12.h), +// child: CustomImageView( +// svgPath: ImageConstant.imgBxCricketBall, +// ), +// ), +// ), +// Padding( +// padding: EdgeInsets.only(left: 123.h), +// child: CustomIconButton( +// height: 50.adaptSize, +// width: 50.adaptSize, +// padding_f: EdgeInsets.all(12.h), +// child: CustomImageView( +// svgPath: ImageConstant.imgFluentLive24Filled, +// ), +// ), +// ), +// Padding( +// padding: EdgeInsets.only(left: 26.h), +// child: CustomIconButton( +// height: 50.adaptSize, +// width: 50.adaptSize, +// padding_f: EdgeInsets.all(10.h), +// child: CustomImageView( +// svgPath: ImageConstant.imgNotification, +// ), +// ), +// ) +// ], +// ), +// ), +// ), +// CustomFloatingButton( +// height: 64, +// width: 64, +// alignment: Alignment.topCenter, +// child: CustomImageView( +// svgPath: ImageConstant.imgLocation, +// height: 32.0.v, +// width: 32.0.h, +// ), +// ) +// ], +// ), +// ), +// ); +// } +// } diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/main_app_screen/list_group_524.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/main_app_screen/list_group_524.dart new file mode 100644 index 0000000..e613246 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/main_app_screen/list_group_524.dart @@ -0,0 +1,339 @@ +import 'dart:convert'; + +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg_provider/flutter_svg_provider.dart' as fs; +import '../../utils/color_constants.dart'; +import '../../utils/image_constant.dart'; +import '../../utils/size_utils.dart'; +import '../../providers/token_manager.dart'; +import '../../resources/api_constants.dart'; +import '../../theme/app_style.dart'; +import '../LogoutService/Logoutservice.dart'; +import 'package:http/http.dart' as http; + +class Listgroup524ItemWidget extends StatefulWidget { + final Map userData; + Listgroup524ItemWidget({required this.userData}); + + @override + State createState() => _Listgroup524ItemWidgetState(); +} + +class _Listgroup524ItemWidgetState extends State { + int myProjectcount = 0; + int sharedWithMeCount = 0; + int allprojectCount = 0; + + @override + void initState() { + super.initState(); + fetchData(); + } + + Future fetchData() async { + print("working"); + final token = await TokenManager.getToken(); + print(token); + String baseUrl = ApiConstants.baseUrl; + var myProjectcountres = await http.get( + Uri.parse('$baseUrl/workspace/secworkspaceuser/count_myproject'), + headers: { + 'Authorization': 'Bearer $token', + 'Content-Type': + 'application/json', // You may need to adjust the content type as needed + }, + ); + var sharedWithMeCountres = await http.get( + Uri.parse('$baseUrl/workspace/secworkspaceuser/count_sharedwithme'), + headers: { + 'Authorization': 'Bearer $token', + 'Content-Type': + 'application/json', // You may need to adjust the content type as needed + }, + ); + var allProjectsCountres = await http.get( + Uri.parse('$baseUrl/workspace/secworkspaceuser/count_allproject'), + headers: { + 'Authorization': 'Bearer $token', + 'Content-Type': + 'application/json', // You may need to adjust the content type as needed + }, + ); + if (myProjectcountres.statusCode == 401) { + LogoutService.logout(); + } + print(myProjectcountres.statusCode); + if (myProjectcountres.statusCode <= 209 && + sharedWithMeCountres.statusCode <= 209) { + final myProjectData = jsonDecode(myProjectcountres.body); + final sharedData = jsonDecode(sharedWithMeCountres.body); + final allData = jsonDecode(allProjectsCountres.body); + setState(() { + myProjectcount = myProjectData; + sharedWithMeCount = sharedData; + allprojectCount = allData; + }); + } else { + // Handle errors + print('Failed to fetch data'); + } + } + + @override + Widget build(BuildContext context) { + return Center( + child: Container( + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + GestureDetector( + onTap: () { + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (context) => ProjectListScreen( + // userData: widget.userData, + // type: "myproject"), // Get all projects + // ), + // ); + }, + child: Card( + color: Colors.white, + elevation: 0.0, + child: Padding( + padding: const EdgeInsets.fromLTRB(20, 10, 20, 10), + child: Column( + children: [ + Container( + height: getSize( + 55, + ), + width: getSize( + 55, + ), + margin: getMargin( + top: 2, + ), + child: Stack( + alignment: Alignment.center, + children: [ + Align( + alignment: Alignment.center, + child: Container( + height: getSize( + 55, + ), + width: getSize( + 55, + ), + child: CircularProgressIndicator( + value: 0.5, + backgroundColor: ColorConstant.gray30099, + color: ColorConstant.blueA700, + ), + ), + ), + Align( + alignment: Alignment.center, + child: Text( + myProjectcount.toString(), + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: AppStyle.txtGilroyBold18, + ), + ), + ], + ), + ), + // Text( + // myProjectcount.toString(), + // style: const TextStyle( + // color: Colors.black, + // fontSize: 12, + // ), + // ), + const SizedBox( + height: 3, + ), + const Text( + 'My Projects', + style: TextStyle( + color: Colors.black, + fontSize: 10, + ), + ), + ], + ), + ), + ), + ), + GestureDetector( + onTap: () { + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (context) => ProjectListScreen( + // userData: widget.userData, + // type: "sharedproject"), // Get all projects + // ), + // ); + }, + child: Card( + color: Colors.white, + elevation: 0.0, + child: Padding( + padding: const EdgeInsets.fromLTRB(20, 10, 20, 10), + child: Column( + children: [ + Container( + height: getSize( + 55, + ), + width: getSize( + 55, + ), + margin: getMargin( + top: 2, + ), + child: Stack( + alignment: Alignment.center, + children: [ + Align( + alignment: Alignment.center, + child: Container( + height: getSize( + 55, + ), + width: getSize( + 55, + ), + child: CircularProgressIndicator( + value: 0.5, + backgroundColor: ColorConstant.gray30099, + color: ColorConstant.blueA700, + ), + ), + ), + Align( + alignment: Alignment.center, + child: Text( + sharedWithMeCount.toString(), + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: AppStyle.txtGilroyBold18, + ), + ), + ], + ), + ), + // Text( + // myProjectcount.toString(), + // style: const TextStyle( + // color: Colors.black, + // fontSize: 12, + // ), + // ), + const SizedBox( + height: 3, + ), + const Text( + 'Shared with me', + style: TextStyle( + color: Colors.black, + fontSize: 10, + ), + ), + ], + ), + ), + ), + ), + GestureDetector( + onTap: () { + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (context) => ProjectListScreen( + // userData: widget.userData, + // type: "allproject"), // Get all projects + // ), + // ); + }, + child: Card( + color: Colors.white, + elevation: 0.0, + child: Padding( + padding: const EdgeInsets.fromLTRB(20, 10, 20, 10), + child: Column( + children: [ + Container( + height: getSize( + 55, + ), + width: getSize( + 55, + ), + margin: getMargin( + top: 2, + ), + child: Stack( + alignment: Alignment.center, + children: [ + Align( + alignment: Alignment.center, + child: Container( + height: getSize( + 55, + ), + width: getSize( + 55, + ), + child: CircularProgressIndicator( + value: 0.5, + backgroundColor: ColorConstant.gray30099, + color: ColorConstant.blueA700, + ), + ), + ), + Align( + alignment: Alignment.center, + child: Text( + allprojectCount.toString(), + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: AppStyle.txtGilroyBold18, + ), + ), + ], + ), + ), + // Text( + // myProjectcount.toString(), + // style: const TextStyle( + // color: Colors.black, + // fontSize: 12, + // ), + // ), + const SizedBox( + height: 3, + ), + const Text( + 'All Projects', + style: TextStyle( + color: Colors.black, + fontSize: 10, + ), + ), + ], + ), + ), + ), + ), + ], + ), + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/main_app_screen/list_group__.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/main_app_screen/list_group__.dart new file mode 100644 index 0000000..783dc60 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/main_app_screen/list_group__.dart @@ -0,0 +1,54 @@ +import 'package:flutter/material.dart'; + +import '../../utils/size_utils.dart'; +import '../../theme/app_style.dart'; + +// ignore: must_be_immutable +class ListtextItemWidget extends StatelessWidget { + ListtextItemWidget(); + + @override + Widget build(BuildContext context) { + return Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text( + "Lorem ipsum", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: AppStyle.txtGilroySemiBold16, + ), + Padding( + padding: getPadding( + top: 10, + ), + child: Text( + "Lorem ipsum", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: AppStyle.txtGilroyRegular14, + ), + ), + ], + ), + Padding( + padding: getPadding( + top: 11, + bottom: 13, + ), + child: Text( + "7.5", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: AppStyle.txtGilroySemiBold18, + ), + ), + ], + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/main_app_screen/local_splash_screen_component.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/main_app_screen/local_splash_screen_component.dart new file mode 100644 index 0000000..79ead6e --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/main_app_screen/local_splash_screen_component.dart @@ -0,0 +1,21 @@ +import 'package:flutter/material.dart'; + +class LocalSplashScreenComponent extends StatelessWidget { + const LocalSplashScreenComponent({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return Container( + color: Color(0xff2f73b9), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Image.asset( + 'assets/images/hadwin_system/hadwin-splash-screen-logo.png', + height: 128.0, + ), + ], + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/main_app_screen/logs_screen_f.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/main_app_screen/logs_screen_f.dart new file mode 100644 index 0000000..9b3f1c5 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/main_app_screen/logs_screen_f.dart @@ -0,0 +1,149 @@ +import 'dart:convert'; + +import 'package:flutter/material.dart'; +import 'package:google_fonts/google_fonts.dart'; +import 'package:shared_preferences/shared_preferences.dart'; + +import '../../utils/color_constants.dart'; +import '../../utils/size_utils.dart'; +import '../../widgets/app_bar/appbar_title.dart'; +import '../../widgets/app_bar/custom_app_bar.dart'; + +class LogsScreen extends StatefulWidget { + const LogsScreen({ + super.key, + }); + + @override + State createState() => _LogsScreenState(); +} + +class _LogsScreenState extends State + with SingleTickerProviderStateMixin { + int _selectedTabIndex = 0; + late TabController _tabController; + + Map userData = {}; + + getUserData() async { + SharedPreferences prefs = await SharedPreferences.getInstance(); + var userdatastr = prefs.getString('userData'); + if (userdatastr != null) { + try { + setState(() { + userData = json.decode(userdatastr); + }); + print(userData['token']); + } catch (e) { + print("error is ..................$e"); + } + } + } + + @override + void initState() { + // TODO: implement initState + super.initState(); + _tabController = TabController(length: 2, vsync: this); + _tabController.addListener(() { + setState(() { + _selectedTabIndex = _tabController.index; + }); + }); + getUserData(); + } + + @override + Widget build(BuildContext context) { + return DefaultTabController( + length: 2, + child: Scaffold( + appBar: CustomAppBar( + height: getVerticalSize(130), + leadingWidth: 50, + leading: IconButton( + onPressed: () { + Navigator.of(context).pop(); + }, + icon: Icon(Icons.arrow_back)), + centerTitle: true, + + title: AppbarTitle(text: "Logs"), + // actions: [ + // Text( + // widget.project['projectName'], + // style: AppStyle.txtGilroySemiBold24.copyWith( + // color: ColorConstant.blueGray900, + // ), + // ), + // ], + bottom: TabBar( + controller: _tabController, + labelPadding: EdgeInsets.zero, + unselectedLabelColor: Colors.blue, + labelColor: Colors.black, + indicatorColor: ColorConstant.purple211, + // indicatorSize: TabBarIndicatorSize.tab, + // indicatorPadding: EdgeInsets.symmetric(horizontal:20), + indicatorWeight: 5, + tabs: [ + Tab( + height: 50, + child: Container( + height: double.infinity, + width: double.infinity, + color: Color.fromARGB(255, 198, 183, 232), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + 'Activity', + style: GoogleFonts.poppins().copyWith( + fontSize: 18, + color: _tabController.index == 0 + ? ColorConstant.purple900 + : Colors.white, + fontWeight: FontWeight.bold), + ), + ], + ), + ), + ), + Tab( + height: 50, + child: Container( + height: double.infinity, + width: double.infinity, + color: Color.fromARGB(255, 198, 183, 232), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + 'Suggestions', + style: GoogleFonts.poppins().copyWith( + fontSize: 18, + color: _tabController.index == 1 + ? ColorConstant.purple900 + : Colors.white, + fontWeight: FontWeight.bold), + ), + ], + ), + ), + ), + ], + ), + ), + body: TabBarView( + controller: _tabController, + children: [ + // NotificationsScreenF(), + // SuggestionsScreen(type: 'myproject', userData: userData) + ], + ), + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/main_app_screen/newlanding_page.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/main_app_screen/newlanding_page.dart new file mode 100644 index 0000000..3e7ded3 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/main_app_screen/newlanding_page.dart @@ -0,0 +1,1018 @@ + +// /../Entity/gaurav/Gauravtest1/Gauravtest1_entity_list_screen.dart'; + +// import 'dart:convert'; +// import 'dart:io'; + +// import 'package:flutter/material.dart'; +// import 'package:shared_preferences/shared_preferences.dart'; +// import '../../Utils/color_constants.dart'; +// import '../../Utils/image_constant.dart'; +// import '../../Utils/size_utils.dart'; +// import '../../providers/token_manager.dart'; +// import '../../resources/api_constants.dart'; +// import '../../theme/app_decoration.dart'; +// import '../../theme/app_style.dart'; +// import '../../widgets/app_bar/appbar_image.dart'; +// import '../../widgets/app_bar/appbar_title.dart'; +// import '../../widgets/app_bar/custom_app_bar.dart'; +// import '../../widgets/custom_image_view.dart'; +// import '../Bookmarks/Bookmarks_entity_list_screen.dart'; +// import '../Incident_Ticket/ticket_create.dart'; +// import '../LayoutReportBuilder/LayoutReportBuilder.dart'; +// import '../Login Screen/login_screen.dart'; +// import '../LogoutService/Logoutservice.dart'; +// import '../QrBarCode/Qr_BarCode/Qr_BarCode_create_entity_screen.dart'; +// import '../Setup/setup.dart'; +// import '../SysParameters/SystemParameterScreen.dart'; +// import '../dynamic_form/list_dynamic_form_screen.dart'; +// import '../profileManagement/Profilesettings.dart'; +// import '../profileManagement/about.dart'; +// import '../profileManagement/changepassword.dart'; + +// import 'list_group_524.dart'; +// import 'list_group__.dart'; +// import 'notification_item.dart'; +// import 'package:http/http.dart' as http; + +// class TabbedLayoutComponentb extends StatefulWidget { +// // final Map userData; +// // const TabbedLayoutComponentb({required this.userData, Key? key}) +// // : super(key: key); +// @override +// _TabbedLayoutComponentState createState() => _TabbedLayoutComponentState(); +// } + +// class _TabbedLayoutComponentState extends State { +// List> notifications = []; + +// Map userData = {}; + +// @override +// void initState() { +// super.initState(); +// getUserData(); +// fetchData(); +// } + +// getUserData() async { +// SharedPreferences prefs = await SharedPreferences.getInstance(); +// var userdatastr = prefs.getString('userData'); +// if (userdatastr != null) { +// try { +// setState(() { +// userData = json.decode(userdatastr); +// }); +// print(userData['token']); +// } catch (e) { +// print("error is ..................$e"); +// } +// } +// } + +// Future _logoutUser() async { +// try { +// SharedPreferences prefs = await SharedPreferences.getInstance(); + +// await prefs.remove('userData'); +// await prefs.remove('isLoggedIn'); +// String logouturl = "${ApiConstants.baseUrl}/token/logout"; +// var response = await http.get(Uri.parse(logouturl)); +// if (response.statusCode == 401) { +// LogoutService.logout(); +// } +// if (response.statusCode <= 209) { +// // ignore: use_build_context_synchronously +// Navigator.pushAndRemoveUntil( +// context, +// MaterialPageRoute(builder: (context) => LoginScreen()), +// (route) => false, // Remove all routes from the stack +// ); +// } else { +// const Text('failed to logout'); +// } +// } catch (error) { +// print('Error occurred during logout: $error'); +// } +// } + +// Future fetchData() async { +// String baseUrl = ApiConstants.baseUrl; +// final apiUrl = '$baseUrl/notification/get_notification'; +// final token = await TokenManager.getToken(); +// final response = await http.get( +// Uri.parse(apiUrl), +// headers: { +// 'Authorization': 'Bearer $token', +// 'Content-Type': 'application/json', +// }, +// ); +// if (response.statusCode == 401) { +// LogoutService.logout(); +// } +// if (response.statusCode <= 209) { +// final List data = jsonDecode(response.body); +// setState(() { +// notifications = data.cast>(); +// }); +// } else { +// // Handle errors +// print('Failed to fetch data'); +// } +// } + +// @override +// Widget build(BuildContext context) { +// return Scaffold( +// backgroundColor: ColorConstant.gray50, +// appBar: CustomAppBar( +// height: getVerticalSize(53), +// leadingWidth: 40, +// // leading: AppbarImage( +// // height: getSize(24), +// // width: getSize(24), +// // svgPath: ImageConstant.imgArrowleft, +// // margin: getMargin(left: 16, top: 12, bottom: 17), +// // onTap: () { +// // onTapArrowleft(context); +// // }), +// centerTitle: true, +// title: AppbarTitle(text: "CloudnSure"), +// actions: [ +// // AppbarImage( +// // height: getSize(24), +// // width: getSize(24), +// // +// // svgPath: ImageConstant.imgOverflowmenu, +// // margin: +// // getMargin(left: 16, top: 12, right: 16, bottom: 17)), + +// //-- +// PopupMenuButton( +// icon: Icon( +// Icons.more_vert, +// color: Colors.black, +// ), +// onSelected: (String result) { +// // Handle the selected option +// print("Selected: $result"); +// }, +// itemBuilder: (BuildContext context) => [ +// PopupMenuItem( +// //value: 'Option 1', +// child: Text( +// 'Raise A Ticket', +// style: AppStyle.txtGilroySemiBold16, +// ), +// onTap: () { +// Navigator.push( +// context, +// MaterialPageRoute( +// builder: (context) => RaisedTicketScreen( +// userData: userData, +// ), +// ), +// ); +// }, +// ), +// PopupMenuItem( +// //value: 'Option 1', +// child: Text( +// 'Profile Settings', +// style: AppStyle.txtGilroySemiBold16, +// ), +// onTap: () { +// // Closes the drawer +// Navigator.push( +// context, +// MaterialPageRoute( +// builder: (context) => ProfileSettingsScreen( +// userData: userData), //go to get all entity +// ), +// ); +// // Add your logic for menu 2 here +// }, +// ), +// PopupMenuItem( +// //value: 'Option 1', +// child: Text( +// 'Change Password', +// style: AppStyle.txtGilroySemiBold16, +// ), +// onTap: () { +// // Closes the drawer +// Navigator.push( +// context, +// MaterialPageRoute( +// builder: (context) => ResetPasswordScreen( +// userEmail: userData['email'], +// userData: userData), //go to get all entity +// ), +// ); +// // Add your logic for menu 2 here +// }, +// ), +// PopupMenuItem( +// //value: 'Option 1', +// child: Text( +// 'DynamicForm', +// style: AppStyle.txtGilroySemiBold16, +// ), +// onTap: () { +// // Closes the drawer +// Navigator.push( +// context, +// MaterialPageRoute( +// builder: (context) => +// DynamicForm(), //go to get all entity +// ), +// ); +// // Add your logic for menu 2 here +// }, +// ), +// PopupMenuItem( +// //value: 'Option 1', +// child: Text( +// 'Setup Screen', +// style: AppStyle.txtGilroySemiBold16, +// ), +// onTap: () { +// Navigator.push( +// context, +// MaterialPageRoute( +// builder: (context) => +// SetupScreen(), //go to get all entity +// ), +// ); +// // Add your logic for menu 2 here +// }, +// ), +// PopupMenuItem( +// //value: 'Option 1', +// child: Text( +// 'BookMark', +// style: AppStyle.txtGilroySemiBold16, +// ), +// onTap: () { +// // Closes the drawer +// Navigator.push( +// context, +// MaterialPageRoute( +// builder: (context) => +// bookmarks_entity_list_screen(), //go to get all entity +// ), +// ); +// // Add your logic for menu 2 here +// }, +// ), +// PopupMenuItem( +// //value: 'Option 1', +// child: Text( +// 'Report layout builder', +// style: AppStyle.txtGilroySemiBold16, +// ), +// onTap: () { +// Navigator.push( +// context, +// MaterialPageRoute( +// builder: (context) => ReportEditor(), +// ), +// ); +// }, +// ), +// PopupMenuItem( +// //value: 'Option 1', +// child: Text( +// 'System Parameter', +// style: AppStyle.txtGilroySemiBold16, +// ), +// onTap: () { +// Navigator.push( +// context, +// MaterialPageRoute( +// builder: (context) => +// SysParameter(), //go to get all entity +// ), +// ); +// // Add your logic for menu 2 here +// }, +// ), +// PopupMenuItem( +// //value: 'Option 1', +// child: Text( +// 'Addition Menu', +// style: AppStyle.txtGilroySemiBold16, +// ), +// onTap: () { +// Navigator.push( +// context, +// MaterialPageRoute( +// builder: (context) => const QrBarCodeScreen(), +// ), +// ); +// }, +// ), +// PopupMenuItem( +// //value: 'Option 1', +// child: Text( +// 'About', +// style: AppStyle.txtGilroySemiBold16, +// ), +// onTap: () { +// Navigator.push( +// context, +// MaterialPageRoute( +// builder: (context) => +// AboutScreen(), //go to get all entity +// ), +// ); +// // Add your logic for menu 2 here +// }, +// ), +// PopupMenuItem( +// //value: 'Option 1', +// child: Text( +// 'LogOut', +// style: AppStyle.txtGilroySemiBold16, +// ), +// onTap: () { +// _logoutUser(); +// }, +// ), +// ], +// ), +// ]), +// body: SingleChildScrollView( +// child: Container( +// width: double.maxFinite, +// padding: getPadding(left: 16, top: 20, right: 16, bottom: 20), +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.center, +// mainAxisAlignment: MainAxisAlignment.center, +// children: [ +// Container( +// height: getVerticalSize(158), +// child: ListView.separated( +// separatorBuilder: (context, index) { +// return SizedBox(height: getVerticalSize(16)); +// }, +// itemCount: 1, +// itemBuilder: (context, index) { +// return Listgroup524ItemWidget( +// userData: userData, +// ); +// })), +// Card( +// clipBehavior: Clip.antiAlias, +// elevation: 0, +// margin: getMargin(top: 5), +// color: ColorConstant.whiteA70099, +// shape: RoundedRectangleBorder( +// borderRadius: BorderRadiusStyle.roundedBorder6), +// child: Container( +// height: getVerticalSize(224), +// width: MediaQuery.of(context) +// .size +// .width, //getHorizontalSize(396), +// // padding: getPadding( +// // left: 16, top: 17, right: 16, bottom: 17), +// decoration: AppDecoration.outlineGray70026.copyWith( +// borderRadius: BorderRadiusStyle.roundedBorder6), +// child: Stack( +// alignment: Alignment.centerRight, +// children: [ +// Align( +// alignment: Alignment.topCenter, +// child: Padding( +// padding: getPadding(left: 1), +// child: Column( +// mainAxisSize: MainAxisSize.min, +// mainAxisAlignment: +// MainAxisAlignment.start, +// children: [ +// Row( +// mainAxisAlignment: +// MainAxisAlignment +// .center, +// children: [ +// Text("08", +// overflow: TextOverflow +// .ellipsis, +// textAlign: +// TextAlign.left, +// style: AppStyle +// .txtGilroyMedium10), +// Expanded( +// child: Padding( +// padding: getPadding( +// top: 6, +// bottom: 5), +// child: Divider( +// height: +// getVerticalSize( +// 1), +// thickness: +// getVerticalSize( +// 1), +// color: ColorConstant +// .blueGray400, +// indent: +// getHorizontalSize( +// 9)))) +// ]), +// Padding( +// padding: +// getPadding(top: 28), +// child: Row( +// mainAxisAlignment: +// MainAxisAlignment +// .center, +// children: [ +// Text("06", +// overflow: +// TextOverflow +// .ellipsis, +// textAlign: +// TextAlign +// .left, +// style: AppStyle +// .txtGilroyMedium10), +// Expanded( +// child: Padding( +// padding: +// getPadding( +// top: +// 6, +// bottom: +// 5), +// child: Divider( +// height: +// getVerticalSize( +// 1), +// thickness: +// getVerticalSize( +// 1), +// color: ColorConstant +// .blueGray400, +// indent: +// getHorizontalSize( +// 9)))) +// ])), +// Padding( +// padding: +// getPadding(top: 28), +// child: Row( +// mainAxisAlignment: +// MainAxisAlignment +// .center, +// children: [ +// Text("04", +// overflow: +// TextOverflow +// .ellipsis, +// textAlign: +// TextAlign +// .left, +// style: AppStyle +// .txtGilroyMedium10), +// Expanded( +// child: Padding( +// padding: +// getPadding( +// top: +// 6, +// bottom: +// 5), +// child: Divider( +// height: +// getVerticalSize( +// 1), +// thickness: +// getVerticalSize( +// 1), +// color: ColorConstant +// .blueGray400, +// indent: +// getHorizontalSize( +// 9)))) +// ])), +// Padding( +// padding: +// getPadding(top: 28), +// child: Row( +// mainAxisAlignment: +// MainAxisAlignment +// .center, +// children: [ +// Text("02", +// overflow: +// TextOverflow +// .ellipsis, +// textAlign: +// TextAlign +// .left, +// style: AppStyle +// .txtGilroyMedium10), +// Expanded( +// child: Padding( +// padding: +// getPadding( +// top: +// 6, +// bottom: +// 5), +// child: Divider( +// height: +// getVerticalSize( +// 1), +// thickness: +// getVerticalSize( +// 1), +// color: ColorConstant +// .blueGray400, +// indent: getHorizontalSize( +// 10)))) +// ])), +// Padding( +// padding: +// getPadding(top: 28), +// child: Row( +// mainAxisAlignment: +// MainAxisAlignment +// .center, +// children: [ +// Text("00", +// overflow: +// TextOverflow +// .ellipsis, +// textAlign: +// TextAlign +// .left, +// style: AppStyle +// .txtGilroyMedium10), +// Expanded( +// child: Padding( +// padding: +// getPadding( +// top: +// 6, +// bottom: +// 5), +// child: Divider( +// height: +// getVerticalSize( +// 1), +// thickness: +// getVerticalSize( +// 1), +// color: ColorConstant +// .blueGray400, +// indent: +// getHorizontalSize( +// 9)))) +// ])) +// ]))), +// Align( +// alignment: Alignment.centerRight, +// child: Row( +// mainAxisAlignment: +// MainAxisAlignment.center, +// crossAxisAlignment: +// CrossAxisAlignment.end, +// children: [ +// buildContainer( +// height: 97, +// width: MediaQuery.of(context) +// .size +// .width * +// 0.016, +// margin: EdgeInsets.only(top: 45), +// text: "08/21"), +// buildContainer( +// height: 138, +// width: MediaQuery.of(context) +// .size +// .width * +// 0.016, +// margin: EdgeInsets.only( +// left: 23, top: 19), +// text: "08/22"), +// buildContainer( +// height: 160, +// width: MediaQuery.of(context) +// .size +// .width * +// 0.016, +// margin: EdgeInsets.only( +// left: 21, top: 5), +// text: "08/23"), +// buildContainer( +// height: 83, +// width: MediaQuery.of(context) +// .size +// .width * +// 0.016, +// margin: EdgeInsets.only( +// left: 21, top: 53), +// text: "08/24"), +// buildContainer( +// height: 64, +// width: MediaQuery.of(context) +// .size +// .width * +// 0.016, +// margin: EdgeInsets.only( +// left: 20, top: 65), +// text: "08/25"), +// buildContainer( +// height: 126, +// width: MediaQuery.of(context) +// .size +// .width * +// 0.016, +// margin: EdgeInsets.only( +// left: 21, top: 26), +// text: "08/26"), +// buildContainer( +// height: 83, +// width: MediaQuery.of(context) +// .size +// .width * +// 0.016, +// margin: EdgeInsets.only( +// left: 22, top: 53), +// text: "08/27"), +// ], +// ), +// ) +// // Align( +// // alignment: Alignment.centerRight, +// // child: Padding( +// // padding: getPadding(right: 8), +// // child: Row( +// // mainAxisAlignment: +// // MainAxisAlignment.center, +// // crossAxisAlignment: +// // CrossAxisAlignment.end, +// // mainAxisSize: MainAxisSize.min, +// // children: [ +// // Container( +// // width: +// // getHorizontalSize(25), +// // margin: +// // getMargin(top: 63), +// // child: Column( +// // mainAxisAlignment: +// // MainAxisAlignment +// // .start, +// // children: [ +// // Container( +// // height: +// // getVerticalSize( +// // 97), +// // width: +// // getHorizontalSize( +// // 24), +// // decoration: BoxDecoration( +// // color: ColorConstant +// // .blueA700, +// // borderRadius: BorderRadius.only( +// // topLeft: +// // Radius.circular(getHorizontalSize( +// // 4)), +// // topRight: +// // Radius.circular(getHorizontalSize(4))))), +// // Padding( +// // padding: +// // getPadding( +// // top: 9), +// // child: Text( +// // "08/21", +// // overflow: +// // TextOverflow +// // .ellipsis, +// // textAlign: +// // TextAlign +// // .left, +// // style: AppStyle +// // .txtGilroyMedium10)) +// // ])), +// // Container( +// // width: +// // getHorizontalSize(28), +// // margin: getMargin( +// // left: 23, top: 22), +// // child: Column( +// // mainAxisAlignment: +// // MainAxisAlignment +// // .start, +// // children: [ +// // Container( +// // height: +// // getVerticalSize( +// // 138), +// // width: +// // getHorizontalSize( +// // 24), +// // decoration: BoxDecoration( +// // color: ColorConstant +// // .blueA700, +// // borderRadius: BorderRadius.only( +// // topLeft: +// // Radius.circular(getHorizontalSize( +// // 4)), +// // topRight: +// // Radius.circular(getHorizontalSize(4))))), +// // Padding( +// // padding: +// // getPadding( +// // top: 9), +// // child: Text( +// // "08/22", +// // overflow: +// // TextOverflow +// // .ellipsis, +// // textAlign: +// // TextAlign +// // .left, +// // style: AppStyle +// // .txtGilroyMedium10)) +// // ])), +// // Container( +// // width: +// // getHorizontalSize(28), +// // margin: +// // getMargin(left: 21), +// // child: Column( +// // mainAxisAlignment: +// // MainAxisAlignment +// // .start, +// // children: [ +// // Container( +// // height: +// // getVerticalSize( +// // 160), +// // width: +// // getHorizontalSize( +// // 24), +// // decoration: BoxDecoration( +// // color: ColorConstant +// // .blueA700, +// // borderRadius: BorderRadius.only( +// // topLeft: +// // Radius.circular(getHorizontalSize( +// // 4)), +// // topRight: +// // Radius.circular(getHorizontalSize(4))))), +// // Padding( +// // padding: +// // getPadding( +// // top: 9), +// // child: Text( +// // "08/23", +// // overflow: +// // TextOverflow +// // .ellipsis, +// // textAlign: +// // TextAlign +// // .left, +// // style: AppStyle +// // .txtGilroyMedium10)) +// // ])), +// // Container( +// // width: +// // getHorizontalSize(29), +// // margin: getMargin( +// // left: 21, top: 77), +// // child: Column( +// // mainAxisAlignment: +// // MainAxisAlignment +// // .start, +// // children: [ +// // Container( +// // height: +// // getVerticalSize( +// // 83), +// // width: +// // getHorizontalSize( +// // 24), +// // decoration: BoxDecoration( +// // color: ColorConstant +// // .blueA700, +// // borderRadius: BorderRadius.only( +// // topLeft: +// // Radius.circular(getHorizontalSize( +// // 4)), +// // topRight: +// // Radius.circular(getHorizontalSize(4))))), +// // Padding( +// // padding: +// // getPadding( +// // top: 9), +// // child: Text( +// // "08/24", +// // overflow: +// // TextOverflow +// // .ellipsis, +// // textAlign: +// // TextAlign +// // .left, +// // style: AppStyle +// // .txtGilroyMedium10)) +// // ])), +// // Container( +// // width: +// // getHorizontalSize(28), +// // margin: getMargin( +// // left: 20, top: 96), +// // child: Column( +// // mainAxisAlignment: +// // MainAxisAlignment +// // .start, +// // children: [ +// // Container( +// // height: +// // getVerticalSize( +// // 64), +// // width: +// // getHorizontalSize( +// // 24), +// // decoration: BoxDecoration( +// // color: ColorConstant +// // .blueA700, +// // borderRadius: BorderRadius.only( +// // topLeft: +// // Radius.circular(getHorizontalSize( +// // 4)), +// // topRight: +// // Radius.circular(getHorizontalSize(4))))), +// // Padding( +// // padding: +// // getPadding( +// // top: 9), +// // child: Text( +// // "08/25", +// // overflow: +// // TextOverflow +// // .ellipsis, +// // textAlign: +// // TextAlign +// // .left, +// // style: AppStyle +// // .txtGilroyMedium10)) +// // ])), +// // Container( +// // width: +// // getHorizontalSize(28), +// // margin: getMargin( +// // left: 21, top: 34), +// // child: Column( +// // mainAxisAlignment: +// // MainAxisAlignment +// // .start, +// // children: [ +// // Container( +// // height: +// // getVerticalSize( +// // 126), +// // width: +// // getHorizontalSize( +// // 24), +// // decoration: BoxDecoration( +// // color: ColorConstant +// // .blueA700, +// // borderRadius: BorderRadius.only( +// // topLeft: +// // Radius.circular(getHorizontalSize( +// // 4)), +// // topRight: +// // Radius.circular(getHorizontalSize(4))))), +// // Padding( +// // padding: +// // getPadding( +// // top: 9), +// // child: Text( +// // "08/26", +// // overflow: +// // TextOverflow +// // .ellipsis, +// // textAlign: +// // TextAlign +// // .left, +// // style: AppStyle +// // .txtGilroyMedium10)) +// // ])), +// // Container( +// // width: +// // getHorizontalSize(27), +// // margin: getMargin( +// // left: 22, top: 77), +// // child: Column( +// // mainAxisAlignment: +// // MainAxisAlignment +// // .start, +// // children: [ +// // Container( +// // height: +// // getVerticalSize( +// // 83), +// // width: +// // getHorizontalSize( +// // 24), +// // decoration: BoxDecoration( +// // color: ColorConstant +// // .blueA700, +// // borderRadius: BorderRadius.only( +// // topLeft: +// // Radius.circular(getHorizontalSize( +// // 4)), +// // topRight: +// // Radius.circular(getHorizontalSize(4))))), +// // Padding( +// // padding: +// // getPadding( +// // top: 9), +// // child: Text( +// // "08/27", +// // overflow: +// // TextOverflow +// // .ellipsis, +// // textAlign: +// // TextAlign +// // .left, +// // style: AppStyle +// // .txtGilroyMedium10)) +// // ])) +// // ]))) +// ]))), +// Padding( +// padding: getPadding(top: 29), +// child: Text("Notifications", +// overflow: TextOverflow.ellipsis, +// textAlign: TextAlign.left, +// style: AppStyle.txtGilroySemiBold18)), +// Padding( +// padding: getPadding(top: 21), +// child: ListView.separated( +// physics: NeverScrollableScrollPhysics(), +// shrinkWrap: true, +// separatorBuilder: (context, index) { +// return Padding( +// padding: getPadding(top: 18.5, bottom: 18.5), +// child: SizedBox( +// width: getHorizontalSize(396), +// child: Divider( +// height: getVerticalSize(1), +// thickness: getVerticalSize(1), +// color: ColorConstant.blueGray100))); +// }, +// itemCount: notifications.length, +// itemBuilder: (context, index) { +// return NotificationItem( +// notification: notifications[index]); +// })), +// Padding( +// padding: getPadding(top: 17, bottom: 5), +// child: Divider( +// height: getVerticalSize(1), +// thickness: getVerticalSize(1), +// color: ColorConstant.blueGray100)) +// ])), +// )); +// } + +// Widget buildContainer( +// {required double height, +// required double width, +// required EdgeInsets margin, +// required String text}) { +// return Container( +// width: getHorizontalSize(width), +// margin: margin, +// child: Column( +// mainAxisAlignment: MainAxisAlignment.start, +// children: [ +// Container( +// height: getVerticalSize(height), +// decoration: BoxDecoration( +// color: ColorConstant.blueA700, +// borderRadius: BorderRadius.only( +// topLeft: Radius.circular(getHorizontalSize(4)), +// topRight: Radius.circular(getHorizontalSize(4)), +// ), +// ), +// ), +// Padding( +// padding: getPadding(top: 9), +// child: Text( +// text, +// overflow: TextOverflow.ellipsis, +// textAlign: TextAlign.left, +// style: AppStyle.txtGilroyMedium10, +// ), +// ), +// ], +// ), +// ); +// } +// } \ No newline at end of file diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/main_app_screen/notification_item.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/main_app_screen/notification_item.dart new file mode 100644 index 0000000..4bea362 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/main_app_screen/notification_item.dart @@ -0,0 +1,86 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +import '../../utils/size_utils.dart'; +import '../../theme/app_style.dart'; + +class NotificationItem extends StatelessWidget { + final Map notification; + + const NotificationItem({required this.notification}); + + @override + Widget build(BuildContext context) { + final notificationText = notification['notification'] as String; + final time = notification['time'] as String; + final timeDifference = calculateTimeDifference(time); + + return Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + // Text( + // notificationText, + // overflow: TextOverflow.ellipsis, + // textAlign: TextAlign.left, + // style: AppStyle.txtGilroySemiBold16, + // ), + Padding( + padding: getPadding( + top: 10, + ), + child: Text( + notificationText, + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: AppStyle.txtGilroyRegular14, + ), + ), + ], + ), + Padding( + padding: getPadding( + top: 11, + bottom: 13, + ), + child: Text( + timeDifference, + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: AppStyle.txtGilroySemiBold18, + ), + ), + ], + ); + + ListTile( + title: Text(notificationText), + subtitle: Text(timeDifference), + ); + } + + String calculateTimeDifference(String time) { + final currentTime = DateTime.now(); + final notificationTime = DateTime.parse(time); + + final difference = currentTime.difference(notificationTime); + + if (difference.inDays >= 365) { + final years = (difference.inDays / 365).floor(); + return '${years} ${years == 1 ? 'year' : 'years'} ago'; + } else if (difference.inDays >= 30) { + final months = (difference.inDays / 30).floor(); + return '${months} ${months == 1 ? 'month' : 'months'} ago'; + } else if (difference.inDays > 0) { + return '${difference.inDays} ${difference.inDays == 1 ? 'day' : 'days'} ago'; + } else if (difference.inHours > 0) { + return '${difference.inHours} ${difference.inHours == 1 ? 'hour' : 'hours'} ago'; + } else { + return 'Just now'; + } + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/main_app_screen/side_slide_menu_draweritem.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/main_app_screen/side_slide_menu_draweritem.dart new file mode 100644 index 0000000..cf9058c --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/main_app_screen/side_slide_menu_draweritem.dart @@ -0,0 +1,139 @@ +import 'package:flutter/material.dart'; +import '../../core/app_export.dart'; +import '../../widgets/custom_elevated_button.dart'; // ignore_for_file: must_be_immutable + +class SideSlideMenuDraweritem extends StatelessWidget { + const SideSlideMenuDraweritem({Key? key}) + : super( + key: key, + ); + + @override + Widget build(BuildContext context) { + return Drawer( + child: SingleChildScrollView( + child: Container( + margin: EdgeInsets.only(bottom: 7.v), + padding: EdgeInsets.only( + left: 28.h, + top: 174.v, + right: 28.h, + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + width: 284.h, + margin: EdgeInsets.only(right: 88.h), + padding: EdgeInsets.symmetric( + horizontal: 43.h, + vertical: 5.v, + ), + decoration: AppDecoration.fillPrimary.copyWith( + borderRadius: BorderRadiusStyle.roundedBorder15, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox(height: 3.v), + Text( + "Leaderboard", + style: CustomTextStyles.titleMediumWhiteA700, + ) + ], + ), + ), + SizedBox(height: 21.v), + Container( + width: 284.h, + margin: EdgeInsets.only(right: 88.h), + padding: EdgeInsets.symmetric( + horizontal: 46.h, + vertical: 6.v, + ), + decoration: AppDecoration.fillPrimary.copyWith( + borderRadius: BorderRadiusStyle.roundedBorder15, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox(height: 1.v), + Text( + "GoLive", + style: CustomTextStyles.titleMediumGray300, + ) + ], + ), + ), + SizedBox(height: 19.v), + _buildMyMatchesButton(context), + SizedBox(height: 23.v), + _buildMyTournamentsButton(context), + SizedBox(height: 21.v), + _buildMyHighlightsButton(context), + SizedBox(height: 23.v), + _buildChangeLanguageButton(context), + SizedBox(height: 18.v), + _buildCommunityButton(context), + SizedBox(height: 18.v), + _buildFindFriendsButton(context), + SizedBox(height: 18.v) + ], + ), + ), + ), + ); + } + + /// Section Widget + Widget _buildMyMatchesButton(BuildContext context) { + return CustomElevatedButton( + text: "My Matches", + margin: EdgeInsets.only(right: 88.h), + ); + } + + /// Section Widget + Widget _buildMyTournamentsButton(BuildContext context) { + return CustomElevatedButton( + text: "My Tournaments", + margin: EdgeInsets.only(right: 88.h), + ); + } + + /// Section Widget + Widget _buildMyHighlightsButton(BuildContext context) { + return CustomElevatedButton( + text: "My Highlights", + margin: EdgeInsets.only(right: 88.h), + ); + } + + /// Section Widget + Widget _buildChangeLanguageButton(BuildContext context) { + return CustomElevatedButton( + text: "Change language", + margin: EdgeInsets.only(right: 88.h), + ); + } + + /// Section Widget + Widget _buildCommunityButton(BuildContext context) { + return CustomElevatedButton( + text: "Community", + margin: EdgeInsets.only(right: 88.h), + ); + } + + /// Section Widget + Widget _buildFindFriendsButton(BuildContext context) { + return CustomElevatedButton( + text: "Find Friends", + margin: EdgeInsets.only(right: 88.h), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/main_app_screen/tabbed_layout_component_f copy 2.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/main_app_screen/tabbed_layout_component_f copy 2.dart new file mode 100644 index 0000000..8e4f9ab --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/main_app_screen/tabbed_layout_component_f copy 2.dart @@ -0,0 +1,1491 @@ +// import 'dart:typed_data'; + +// import 'package:flutter_svg/flutter_svg.dart'; +// import 'package:google_fonts/google_fonts.dart'; + +// import 'dart:async'; +// import 'dart:convert'; +// import 'dart:ui'; + +// import 'package:fluentui_system_icons/fluentui_system_icons.dart'; +// import 'package:flutter/material.dart'; + +// import 'package:google_nav_bar/google_nav_bar.dart'; +// import 'package:provider/provider.dart'; +// import 'package:http/http.dart' as http; +// import 'package:shared_preferences/shared_preferences.dart'; +// import '../../Utils/color_constants.dart'; +// import '../../Utils/size_utils.dart'; +// import '../../providers/tab_navigation_provider.dart'; +// import '../../providers/token_manager.dart'; +// import '../../resources/api_constants.dart'; +// import '../../theme/app_decoration.dart'; +// import '../../theme/app_style.dart'; +// import '../Incident_Ticket/ticket_create.dart'; +// import '../Login Screen/login_screen_f.dart'; +// import '../LogoutService/Logoutservice.dart'; +// import '../dynamic_form/dynamic_form_screen_list_f.dart'; +// import '../profileManagement/about.dart'; +// import '../profileManagement/apiserviceprofilemanagement.dart'; +// import '../profileManagement/change_password_f.dart'; +// import '../profileManagement/profile_settings_f.dart'; +// import 'logs_screen_f.dart'; + +// class TabbedLayoutComponentF extends StatefulWidget { +// TabbedLayoutComponentF(this.userData, {super.key}); +// Map userData = {}; +// @override +// _TabbedLayoutComponentFState createState() => _TabbedLayoutComponentFState(); +// } + +// class _TabbedLayoutComponentFState extends State { +// int _currentTab = 0; +// final GlobalKey _scaffoldKey = GlobalKey(); + +// Map userData = {}; + +// @override +// void initState() { +// super.initState(); +// getUserData(); +// fetchData(); +// print('user data is'); +// print(userData); +// } + +// getUserData() async { +// SharedPreferences prefs = await SharedPreferences.getInstance(); +// var userdatastr = prefs.getString('userData'); +// if (userdatastr != null) { +// try { +// setState(() { +// userData = json.decode(userdatastr); +// }); +// print(userData['token']); +// } catch (e) { +// print("error is ..................$e"); +// } +// } +// } + +// void setTab(int index) { +// setState(() { +// _currentTab = index; +// }); +// } + +// List> notifications = []; + +// Future fetchData() async { +// String baseUrl = ApiConstants.baseUrl; +// final apiUrl = '$baseUrl/notification/get_notification'; +// final token = await TokenManager.getToken(); +// final response = await http.get( +// Uri.parse(apiUrl), +// headers: { +// 'Authorization': 'Bearer $token', +// 'Content-Type': 'application/json', +// }, +// ); +// if (response.statusCode == 401) { +// LogoutService.logout(); +// } +// if (response.statusCode <= 209) { +// final List data = jsonDecode(response.body); +// setState(() { +// notifications = data.cast>(); +// }); +// print('notifications are $notifications'); +// } else { +// // Handle errors +// print('Failed to fetch data'); +// } +// } + +// @override +// Widget build(BuildContext context) { +// final userAuthKey = TokenManager.getToken().toString(); + +// print('user auth key is .....$userAuthKey'); + +// List screens = [ +// Padding( +// padding: const EdgeInsets.all(10.0), +// child: StaticChartsScreen( +// userData: userData, +// ), +// ), +// Padding( +// padding: const EdgeInsets.all(10), +// child: HomeDashboardScreen( +// userData: userData, +// ), +// ), +// const SizedBox(height: 15), +// ]; +// var _currentIndex = 0; +// String? fetchedimageurl = +// 'http://43.205.154.152:30165/assets/images/profile-icon.png'; +// return WillPopScope( +// onWillPop: _onBackPress, +// child: Scaffold( +// key: _scaffoldKey, +// bottomNavigationBar: BottomNavigationBar( +// elevation: 12, +// showSelectedLabels: false, +// // <-- HERE +// showUnselectedLabels: false, +// currentIndex: _currentIndex, +// selectedItemColor: const Color(0xFF5E41D3), // Selected item color +// unselectedItemColor: Colors.black, // Unselected item color +// onTap: (index) { +// setState(() { +// _currentIndex = index; +// if (_currentIndex == 2) { +// Navigator.of(context).push(MaterialPageRoute( +// builder: (ctx) => +// ProfileSettingsScreenF(userData: userData))); +// } +// if (_currentIndex == 0) { +// // Navigator.of(context) +// // .push(MaterialPageRoute(builder: (ctx) => SearchScreen())); +// } +// }); +// }, +// items: [ +// BottomNavigationBarItem( +// icon: Icon( +// Icons.search, +// color: ColorConstant.purple211, +// ), +// label: 'Search', +// backgroundColor: ColorConstant.purple211, +// ), +// const BottomNavigationBarItem( +// icon: SizedBox.shrink(), +// label: '', +// ), +// BottomNavigationBarItem( +// icon: Icon( +// Icons.person_2_outlined, +// color: ColorConstant.purple211, +// ), +// label: 'Profile', +// backgroundColor: ColorConstant.purple211, +// ), +// ], +// ), +// floatingActionButton: FloatingActionButton( +// highlightElevation: 10, +// onPressed: () { +// // Handle button press +// Navigator.of(context) +// .push(MaterialPageRoute(builder: (ctx) => const LogsScreen())); +// }, // Replace with your image path +// elevation: 15.0, +// backgroundColor: ColorConstant.purple211, // Set the color to purple +// shape: const CircleBorder(), +// child: Image.asset( +// 'assets/images/panther.png', +// height: 40, +// width: 40, +// ), // Make the button circular +// ), +// floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, + +// drawer: Drawer( +// backgroundColor: const Color.fromARGB(255, 245, 244, 246), +// width: MediaQuery.of(context).size.width * 80 / 100, +// child: ListView( +// children: [ +// SizedBox( +// height: 200, +// child: DrawerHeader( +// child: Card( +// elevation: 3, +// color: const Color.fromARGB(255, 212, 218, 247), +// child: Container( +// height: 130, +// width: 330, +// // decoration: BoxDecoration( +// // border: Border.all( +// // color: Colors.grey +// // ) + +// // ), +// padding: const EdgeInsets.only(right: 3, left: 3), +// child: Column( +// mainAxisAlignment: MainAxisAlignment.spaceEvenly, +// children: [ +// Container( +// child: Row( +// mainAxisAlignment: +// MainAxisAlignment.spaceBetween, +// children: [ +// Container( +// padding: const EdgeInsets.all(5), +// child: Row( +// children: [ +// Image.asset( +// 'assets/images/Transparent.png', +// height: 70, +// width: 70, +// ), +// const SizedBox( +// width: 5, +// ), +// SingleChildScrollView( +// child: Container( +// width: MediaQuery.of(context) +// .size +// .width * +// 48 / +// 100, +// alignment: Alignment.centerLeft, +// child: Column( +// crossAxisAlignment: +// CrossAxisAlignment.start, +// children: [ +// Text( +// ' Hello ${userData['firstName'] ?? 'N/A'}!', +// overflow: TextOverflow.clip, +// style: GoogleFonts.poppins() +// .copyWith( +// fontSize: 18, +// fontWeight: +// FontWeight +// .bold), +// ), +// Row( +// children: [ +// const SizedBox( +// width: 4, +// ), +// Text( +// userData['email'] ?? +// "N/A", +// style: const TextStyle( +// fontWeight: +// FontWeight +// .w300), +// ), +// ], +// ) +// ], +// ), +// ), +// ), +// ], +// )), +// ], +// ), +// ), +// ], +// ), +// ), +// ), +// ), +// ), +// ListTile( +// iconColor: Colors.purple.shade900, +// leading: const Icon( +// Icons.arrow_upward, +// ), +// title: Text( +// 'Raise a Ticket', +// style: AppStyle.txtpoppinsmedium16.copyWith( +// fontWeight: FontWeight.w700, +// color: Colors.purple.shade900), +// ), +// onTap: () { +// Navigator.push( +// context, +// MaterialPageRoute( +// builder: (context) => RaisedTicketScreen( +// userData: userData, +// ), +// ), +// ); +// }, +// ), +// ListTile( +// iconColor: Colors.purple.shade900, +// leading: const Icon(Icons.person_2_rounded), +// title: Text( +// 'Profile Settings', +// style: AppStyle.txtpoppinsmedium16.copyWith( +// fontWeight: FontWeight.w700, +// color: Colors.purple.shade900), +// ), +// onTap: () { +// // Closes the drawer +// Navigator.push( +// context, +// MaterialPageRoute( +// builder: (context) => +// ProfileSettingsScreenF(userData: userData), +// ), +// ); +// // Add your logic for menu 2 here +// }, +// ), +// ListTile( +// iconColor: Colors.purple.shade900, +// leading: const Icon(Icons.password), +// title: Text( +// 'Change Password', +// style: AppStyle.txtpoppinsmedium16.copyWith( +// fontWeight: FontWeight.w700, +// color: Colors.purple.shade900), +// ), +// onTap: () { +// // Closes the drawer +// Navigator.push( +// context, +// MaterialPageRoute( +// builder: (context) => +// ResetPasswordScreenF(), //go to get all entity +// ), +// ); +// // Add your logic for menu 2 here +// }, +// ), +// ListTile( +// iconColor: Colors.purple.shade900, +// leading: const Icon(Icons.group), +// title: Text( +// 'My Workspace', +// style: AppStyle.txtpoppinsmedium16.copyWith( +// fontWeight: FontWeight.w700, +// color: Colors.purple.shade900), +// ), +// // onTap: () { +// // // Closes the drawer +// // Navigator.push( +// // context, +// // MaterialPageRoute( +// // builder: (context) => MyWorkspaceF( +// // userData: userData), //go to get all entity +// // ), +// // ); +// // // Add your logic for menu 2 here +// // }, +// ), +// ListTile( +// iconColor: Colors.purple.shade900, +// leading: const Icon(Icons.subject), +// title: Text( +// 'Dynamic Form', +// style: AppStyle.txtpoppinsmedium16.copyWith( +// fontWeight: FontWeight.w700, +// color: Colors.purple.shade900), +// ), +// onTap: () { +// // Closes the drawer +// Navigator.push( +// context, +// MaterialPageRoute( +// builder: (context) => +// const DynamicFormF(), //go to get all entity +// ), +// ); +// // Add your logic for menu 2 here +// }, +// ), +// ListTile( +// iconColor: Colors.purple.shade900, +// leading: const Icon(Icons.bookmark_outlined), +// title: Text( +// 'Bookmarks', +// style: AppStyle.txtpoppinsmedium16.copyWith( +// fontWeight: FontWeight.w700, +// color: Colors.purple.shade900), +// ), +// // onTap: () { +// // // Closes the drawer +// // Navigator.push( +// // context, +// // MaterialPageRoute( +// // builder: (context) => +// // BookmarksEntityListScreenF(), //go to get all entity +// // ), +// // ); +// // // Add your logic for menu 2 here +// // }, +// ), +// ListTile( +// iconColor: Colors.purple.shade900, +// leading: const Icon(Icons.info), +// title: Text( +// 'About', +// style: AppStyle.txtpoppinsmedium16.copyWith( +// fontWeight: FontWeight.w700, +// color: Colors.purple.shade900), +// ), +// onTap: () { +// Navigator.push( +// context, +// MaterialPageRoute( +// builder: (context) => +// AboutScreen(), //go to get all entity +// ), +// ); +// // Add your logic for menu 2 here +// }, +// ), +// ListTile( +// iconColor: Colors.purple.shade900, +// leading: const Icon(Icons.password), +// title: Text( +// 'live Stream', +// style: AppStyle.txtpoppinsmedium16.copyWith( +// fontWeight: FontWeight.w700, +// color: Colors.purple.shade900), +// ), +// // onTap: () { +// // // Closes the drawer +// // Navigator.push( +// // context, +// // MaterialPageRoute( +// // builder: (context) => +// // VideoStreamPage(), //go to get all entity +// // ), +// // ); +// // // Add your logic for menu 2 here +// // }, +// ), +// ListTile( +// iconColor: Colors.purple.shade900, +// leading: const Icon(Icons.logout_rounded), +// title: Text( +// 'Log Out', +// style: AppStyle.txtpoppinsmedium16.copyWith( +// fontWeight: FontWeight.w700, +// color: Colors.purple.shade900), +// ), +// onTap: () { +// _logoutUser(); +// }, +// ), +// ], +// )), +// appBar: AppBar( +// centerTitle: true, +// backgroundColor: Colors.white, +// toolbarHeight: 70, +// title: Text("io8.dev", +// style: GoogleFonts.poppins().copyWith( +// fontSize: 30, +// fontWeight: FontWeight.bold, +// color: const Color.fromARGB(255, 93, 63, 211))), +// ), +// backgroundColor: const Color(0xfffefefe), +// extendBodyBehindAppBar: true, +// //bottomNavigationBar: AppFooter(), +// body: screens.isEmpty +// ? const Text("Loading...") +// : ListView.builder( +// itemCount: screens.length, +// scrollDirection: Axis.vertical, +// itemBuilder: (context, index) => screens[index], +// ), +// ), +// ); +// } + +// Future _logoutUser() async { +// try { +// SharedPreferences prefs = await SharedPreferences.getInstance(); + +// // Remove 'userData' and 'isLoggedIn' from SharedPreferences +// await prefs.remove('userData'); +// await prefs.remove('isLoggedIn'); +// String logouturl = "${ApiConstants.baseUrl}/token/logout"; +// var response = await http.get(Uri.parse(logouturl)); +// if (response.statusCode == 401) { +// LogoutService.logout(); +// } +// if (response.statusCode <= 209) { +// // ignore: use_build_context_synchronously +// Navigator.pushAndRemoveUntil( +// context, +// MaterialPageRoute(builder: (context) => const LoginScreenF(false)), +// (route) => false, // Remove all routes from the stack +// ); +// } else { +// const Text('failed to logout'); +// } +// } catch (error) { +// print('Error occurred during logout: $error'); +// } +// } + +// Widget googleNavBar() { +// return Container( +// child: Padding( +// padding: const EdgeInsets.symmetric(horizontal: 6.18, vertical: 1), +// child: GNav( +// haptic: false, +// gap: 6, +// activeColor: const Color(0xFF0070BA), +// iconSize: 24, +// padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 11), +// duration: const Duration(milliseconds: 300), +// color: const Color(0xFF243656), +// tabs: [ +// GButton( +// icon: FluentIcons.home_32_regular, +// iconSize: 36, +// text: 'Home', +// onPressed: () { +// print('home'); +// }, +// ), +// GButton( +// icon: FluentIcons.people_32_regular, +// iconSize: 36, +// text: 'Contacts', +// onPressed: () { +// print('contacts'); +// // Navigator.push( +// // context, +// // MaterialPageRoute( +// // builder: (context) => AllContactsScreen( +// // setTab: setTab, +// // ), +// // ), +// // ); +// }, +// ), +// GButton( +// icon: Icons.wallet, +// text: 'Wallet', +// iconSize: 34, +// onPressed: () { +// print('wallet'); +// }, +// ), +// ], +// selectedIndex: _currentTab, +// onTabChange: _onTabChange, +// ), +// ), +// ); +// } + +// void _onTabChange(int index) { +// if (_currentTab == 1 || _currentTab == 2) { +// FocusManager.instance.primaryFocus?.unfocus(); +// } +// Provider.of(context, listen: false) +// .updateTabs(_currentTab); +// setState(() { +// _currentTab = index; +// }); +// } + +// Future _onBackPress() { +// if (_currentTab == 0) { +// return Future.value(true); +// } else { +// int lastTab = +// Provider.of(context, listen: false).lastTab; +// Provider.of(context, listen: false) +// .removeLastTab(); +// setTab(lastTab); +// } +// return Future.value(false); +// } +// } + +// class StaticChartsScreen extends StatefulWidget { +// final Map userData; +// const StaticChartsScreen({required this.userData, Key? key}) +// : super(key: key); +// @override +// _StaticChartsScreenState createState() => _StaticChartsScreenState(); +// } + +// class _StaticChartsScreenState extends State { +// int myProjectcount = 0; +// int sharedWithMeCount = 0; +// int allprojectCount = 0; +// Map userData = {}; +// getUserData() async { +// SharedPreferences prefs = await SharedPreferences.getInstance(); +// var userdatastr = prefs.getString('userData'); +// if (userdatastr != null) { +// try { +// setState(() { +// userData = json.decode(userdatastr); +// }); +// print(userData['token']); +// } catch (e) { +// print("error is ..................$e"); +// } +// } +// } + +// @override +// void initState() { +// super.initState(); +// fetchData(); +// getUserData(); +// fetchProfileImageData(); +// } + +// Future fetchData() async { +// print("working"); +// final token = await TokenManager.getToken(); +// print(token); +// String baseUrl = ApiConstants.baseUrl; +// var myProjectcountres = await http.get( +// Uri.parse('$baseUrl/workspace/secworkspaceuser/count_myproject'), +// headers: { +// 'Authorization': 'Bearer $token', +// 'Content-Type': +// 'application/json', // You may need to adjust the content type as needed +// }, +// ); +// var sharedWithMeCountres = await http.get( +// Uri.parse('$baseUrl/workspace/secworkspaceuser/count_sharedwithme'), +// headers: { +// 'Authorization': 'Bearer $token', +// 'Content-Type': +// 'application/json', // You may need to adjust the content type as needed +// }, +// ); +// var allProjectsCountres = await http.get( +// Uri.parse('$baseUrl/workspace/secworkspaceuser/count_allproject'), +// headers: { +// 'Authorization': 'Bearer $token', +// 'Content-Type': +// 'application/json', // You may need to adjust the content type as needed +// }, +// ); +// if (myProjectcountres.statusCode == 401) { +// LogoutService.logout(); +// } +// print(myProjectcountres.statusCode); +// if (myProjectcountres.statusCode <= 209 && +// sharedWithMeCountres.statusCode <= 209) { +// final myProjectData = jsonDecode(myProjectcountres.body); +// final sharedData = jsonDecode(sharedWithMeCountres.body); +// final allData = jsonDecode(allProjectsCountres.body); +// if (myProjectData == 0) { +// ScaffoldMessenger.of(context) +// .showSnackBar(SnackBar( +// elevation: 0, +// behavior: SnackBarBehavior.floating, +// content: Stack( +// clipBehavior: Clip.none, +// children: [ +// Container( +// padding: const EdgeInsets.all(16), +// height: 100, +// decoration: const BoxDecoration( +// borderRadius: BorderRadius.all(Radius.circular(20)), +// color: Color.fromARGB(255, 233, 155, 38)), +// child: const Row( +// children: [ +// const SizedBox( +// width: 48, +// ), +// Expanded( +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Text( +// 'Oh Snap!', +// style: TextStyle( +// fontSize: 18, color: Colors.white), +// ), +// Text( +// "Looks like you don't have a project in progress, Start with adding one", +// style: TextStyle( +// fontSize: 12, color: Colors.white), +// maxLines: 2, +// overflow: TextOverflow.ellipsis, +// ), +// ], +// ), +// ), +// ], +// )), +// Positioned( +// bottom: 0, +// child: ClipRRect( +// borderRadius: const BorderRadius.only( +// bottomLeft: Radius.circular(20)), +// child: SvgPicture.asset('assets/icon/bubbles.svg', +// height: 48, +// width: 40, +// colorFilter: const ColorFilter.mode( +// Color.fromARGB(255, 228, 111, 22), +// BlendMode.srcIn)), +// ), +// ), +// Positioned( +// top: -20, +// left: 0, +// child: Stack( +// alignment: Alignment.center, +// children: [ +// SvgPicture.asset( +// 'assets/icon/fail.svg', +// height: 40, +// ), +// Positioned( +// top: 10, +// child: InkWell( +// onTap: () { +// ScaffoldMessenger.of(context) +// .clearSnackBars(); +// }, +// child: SvgPicture.asset('assets/icon/close.svg', +// height: 16))) +// ], +// ), +// ) +// ], +// ), +// backgroundColor: Colors.transparent, +// )) +// .closed; +// } +// setState(() { +// myProjectcount = myProjectData; +// sharedWithMeCount = sharedData; +// allprojectCount = allData; +// }); +// } else { +// // Handle errors +// print('Failed to fetch data'); +// } +// } + +// String? fetchedimageurl; +// Uint8List? _imageBytes; // Uint8List to store the image data +// String? _imageFileName; +// Future fetchProfileImageData() async { +// final token = await TokenManager.getToken(); +// final String baseUrl = ApiConstants.baseUrl; +// final String apiUrl = '$baseUrl/api/retrieve-image'; +// try { +// final response = await http.get( +// Uri.parse(apiUrl), +// headers: { +// 'Authorization': 'Bearer $token', +// }, +// ); +// if (response.statusCode == 401) { +// LogoutService.logout(); +// } +// if (response.statusCode >= 200 && response.statusCode <= 209) { +// final Map jsonData = json.decode(response.body); +// final trustedImageUrl = Uri.dataFromString(jsonData['image'], +// mimeType: 'image/*', encoding: Encoding.getByName('utf-8')) +// .toString(); +// fetchedimageurl = trustedImageUrl; +// } else { +// throw Exception('Failed to load data: ${response.statusCode}'); +// } +// } catch (e) { +// throw Exception('Failed to load data: $e'); +// } +// } + +// void _openInvitePeoplePopup() { +// // showDialog( +// // context: context, +// // // builder: (BuildContext context) { +// // // // return InvitePeoplePopup( +// // // // onClose: _closeInvitePeoplePopup, +// // // // onInvite: _handleInvite, +// // // // ); +// // // }, +// // ); +// } + +// // Close the Invite People Popup +// void _closeInvitePeoplePopup() { +// Navigator.of(context).pop(); +// } + +// // Handle the Invite action (Replace with your API call logic) +// void _handleInvite() async { +// // Replace with your API call logic +// // After the API call is done, close the popup +// _closeInvitePeoplePopup(); +// } + +// @override +// Widget build(BuildContext context) { +// return Column( +// children: [ +// Card( +// elevation: 3, +// color: const Color.fromARGB(255, 212, 218, 247), +// child: Container( +// height: 130, +// width: MediaQuery.of(context).size.width - 20, +// // decoration: BoxDecoration( +// // border: Border.all( +// // color: Colors.grey +// // ) + +// // ), +// padding: const EdgeInsets.only(right: 3, left: 3), +// child: Column( +// mainAxisAlignment: MainAxisAlignment.spaceEvenly, +// children: [ +// Container( +// child: Row( +// mainAxisAlignment: MainAxisAlignment.spaceBetween, +// children: [ +// Container( +// padding: const EdgeInsets.all(5), +// child: Row( +// children: [ +// fetchedimageurl == null +// ? Image.asset( +// 'assets/images/Transparent .png', +// height: 100, +// width: 100, +// ) +// : CircleAvatar( +// radius: 45, +// backgroundImage: +// NetworkImage("$fetchedimageurl") +// as ImageProvider, +// ), +// const SizedBox( +// width: 10, +// ), +// Container( +// width: MediaQuery.of(context).size.width * +// 48 / +// 100, +// alignment: Alignment.centerLeft, +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Text( +// 'Hello ${userData['firstName'] ?? 'N/A'}!', +// overflow: TextOverflow.clip, +// style: GoogleFonts.poppins().copyWith( +// fontSize: 18, +// fontWeight: FontWeight.bold), +// ), +// Text( +// userData['email'] ?? "N/A", +// style: const TextStyle( +// fontWeight: FontWeight.w300), +// ) +// ], +// ), +// ), +// ], +// )), +// IconButton( +// onPressed: () { +// _openInvitePeoplePopup(); +// }, +// icon: const Icon( +// Icons.person_add_alt_rounded, +// size: 30, +// )), +// const SizedBox( +// width: 10, +// ) +// ], +// ), +// ), +// ], +// ), +// ), +// ), +// const SizedBox( +// height: 8, +// ), +// Row( +// mainAxisAlignment: MainAxisAlignment.spaceEvenly, +// children: [ +// GestureDetector( +// // onTap: () { +// // Navigator.push( +// // context, +// // MaterialPageRoute( +// // builder: (context) => ProjectListScreenF( +// // type: "myproject"), // Get all projects +// // // VideoStreamPage(), +// // ), +// // ); +// // }, +// child: Card( +// color: const Color.fromARGB(255, 125, 81, 172), +// elevation: 2.0, +// child: Container( +// // height: 70, width: 70, +// height: 120, +// child: Padding( +// padding: const EdgeInsets.all(16.0), +// child: Column( +// children: [ +// Image.asset( +// 'assets/images/myproj.png', +// height: 60, +// color: Colors.white, +// ), +// const SizedBox( +// height: 6, +// ), +// const Text( +// 'My Projects', +// style: TextStyle( +// color: Colors.white, +// fontSize: 14, +// fontWeight: FontWeight.w600), +// ), +// ], +// ), +// ), +// ), +// ), +// ), +// GestureDetector( +// // onTap: () { +// // Navigator.push( +// // context, +// // MaterialPageRoute( +// // builder: (context) => ProjectListScreenF( +// // type: "sharedproject"), // Get all projects +// // ), +// // ); +// // }, +// child: Card( +// color: const Color.fromARGB(255, 110, 172, 253), +// elevation: 2.0, +// child: Container( +// height: 120, +// child: Padding( +// padding: const EdgeInsets.all(16.0), +// child: Column( +// children: [ +// const SizedBox( +// height: 6, +// ), +// Image.asset( +// 'assets/images/sharedwme.png', +// height: 42, +// color: Colors.white, +// ), +// const SizedBox( +// height: 19, +// ), +// Container( +// width: MediaQuery.of(context).size.width * 18 / 100, +// child: const Text( +// 'Shared', +// textAlign: TextAlign.center, +// style: TextStyle( +// color: Colors.white, +// fontSize: 14, +// fontWeight: FontWeight.w600), +// ), +// ), +// // Text( +// // sharedWithMeCount.toString(), +// // style: const TextStyle( +// // fontSize: 12, +// // fontWeight: FontWeight.w800 +// // ), +// // ), +// ], +// ), +// ), +// ), +// ), +// ), +// GestureDetector( +// // onTap: () { +// // Navigator.push( +// // context, +// // MaterialPageRoute( +// // builder: (context) => ProjectListScreenF( +// // type: "allproject"), // Get all projects +// // ), +// // ); +// // }, +// child: Card( +// color: Colors.green.shade300, +// elevation: 2.0, +// child: Container( +// height: 120, +// child: Padding( +// padding: const EdgeInsets.all(16.0), +// child: Column( +// children: [ +// Image.asset( +// 'assets/images/allproj.png', +// height: 60, +// color: Colors.white, +// ), +// const SizedBox( +// height: 6, +// ), +// const Text( +// 'All Projects', +// style: TextStyle( +// color: Colors.white, +// fontSize: 14, +// fontWeight: FontWeight.w600), +// ), +// // Text( +// // allprojectCount.toString(), +// // style: const TextStyle( +// // fontSize: 12, +// // fontWeight: FontWeight.w800 +// // ), +// // ), +// ], +// ), +// ), +// ), +// ), +// ), +// ], +// ), +// ], +// ); +// } +// } + +// class HomeDashboardScreen extends StatelessWidget { +// final Map userData; + +// const HomeDashboardScreen({super.key, required this.userData}); + +// @override +// Widget build(BuildContext context) { +// var firstName = userData['firstName'].toString(); +// return Card( +// color: Colors.white, +// shadowColor: Colors.white, +// elevation: 2, +// margin: const EdgeInsets.symmetric(horizontal: 10), +// child: Column( +// children: [ +// const SizedBox( +// height: 8, +// ), +// const Text( +// 'Activity', +// style: TextStyle(fontSize: 18, fontWeight: FontWeight.w600), +// ), +// Container( +// child: Padding( +// padding: const EdgeInsets.all(12.0), +// child: Card( +// clipBehavior: Clip.antiAlias, +// elevation: 0, +// margin: getMargin(top: 5), +// color: ColorConstant.whiteA70099, +// shape: RoundedRectangleBorder( +// borderRadius: BorderRadiusStyle.roundedBorder6), +// child: Container( +// height: getVerticalSize(210), +// width: MediaQuery.of(context) +// .size +// .width, //getHorizontalSize(396), +// // padding: getPadding( +// // left: 16, top: 17, right: 16, bottom: 17), +// decoration: AppDecoration.outlineGray70026.copyWith( +// borderRadius: BorderRadiusStyle.roundedBorder6), +// child: Stack(alignment: Alignment.centerRight, children: [ +// Align( +// alignment: Alignment.topCenter, +// child: Padding( +// padding: getPadding(left: 1), +// child: Column( +// mainAxisSize: MainAxisSize.min, +// mainAxisAlignment: MainAxisAlignment.start, +// children: [ +// Row( +// mainAxisAlignment: +// MainAxisAlignment.center, +// children: [ +// Text("08", +// overflow: TextOverflow.ellipsis, +// textAlign: TextAlign.left, +// style: AppStyle.txtGilroyMedium10 +// .copyWith( +// color: Colors.black, +// fontSize: 12)), +// Expanded( +// child: Padding( +// padding: +// getPadding(top: 6, bottom: 5), +// // child: Divider( +// // height: getVerticalSize(1), +// // thickness: getVerticalSize(1), +// // color: +// // ColorConstant.blueGray400, +// // indent: getHorizontalSize(9)) +// )) +// ]), +// Padding( +// padding: getPadding(top: 28), +// child: Row( +// mainAxisAlignment: +// MainAxisAlignment.center, +// children: [ +// Text("06", +// overflow: +// TextOverflow.ellipsis, +// textAlign: TextAlign.left, +// style: AppStyle +// .txtGilroyMedium10 +// .copyWith( +// color: Colors.black, +// fontSize: 12)), +// Expanded( +// child: Padding( +// padding: getPadding( +// top: 6, bottom: 5), +// // child: Divider( +// // height: getVerticalSize(1), +// // thickness: +// // getVerticalSize(1), +// // color: ColorConstant +// // .blueGray400, +// // indent: +// // getHorizontalSize(9)) +// )) +// ])), +// Padding( +// padding: getPadding(top: 28), +// child: Row( +// mainAxisAlignment: +// MainAxisAlignment.center, +// children: [ +// Text("04", +// overflow: +// TextOverflow.ellipsis, +// textAlign: TextAlign.left, +// style: AppStyle +// .txtGilroyMedium10 +// .copyWith( +// color: Colors.black, +// fontSize: 12)), +// Expanded( +// child: Padding( +// padding: getPadding( +// top: 6, bottom: 5), +// // child: Divider( +// // height: getVerticalSize(1), +// // thickness: +// // getVerticalSize(1), +// // color: ColorConstant +// // .blueGray400, +// // indent: +// // getHorizontalSize(9)) +// )) +// ])), +// Padding( +// padding: getPadding(top: 28), +// child: Row( +// mainAxisAlignment: +// MainAxisAlignment.center, +// children: [ +// Text("02", +// overflow: +// TextOverflow.ellipsis, +// textAlign: TextAlign.left, +// style: AppStyle +// .txtGilroyMedium10 +// .copyWith( +// color: Colors.black, +// fontSize: 12)), +// Expanded( +// child: Padding( +// padding: getPadding( +// top: 6, bottom: 5), +// // child: Divider( +// // height: getVerticalSize(1), +// // thickness: +// // getVerticalSize(1), +// // color: ColorConstant +// // .blueGray400, +// // indent: +// // getHorizontalSize(10)) +// )) +// ])), +// Padding( +// padding: getPadding(top: 28), +// child: Row( +// mainAxisAlignment: +// MainAxisAlignment.center, +// children: [ +// Text("00", +// overflow: +// TextOverflow.ellipsis, +// textAlign: TextAlign.left, +// style: AppStyle +// .txtGilroyMedium10 +// .copyWith( +// color: Colors.black, +// fontSize: 12)), +// Expanded( +// child: Padding( +// padding: getPadding( +// top: 6, bottom: 5), +// // child: Divider( +// // height: getVerticalSize(1), +// // thickness: +// // getVerticalSize(1), +// // color: ColorConstant +// // .blueGray400, +// // indent: +// // getHorizontalSize(9)) +// )) +// ])) +// ]))), +// Align( +// alignment: Alignment.centerRight, +// child: Row( +// mainAxisAlignment: MainAxisAlignment.center, +// crossAxisAlignment: CrossAxisAlignment.end, +// children: [ +// buildContainer( +// height: 97, +// width: +// MediaQuery.of(context).size.width * 0.028, +// margin: const EdgeInsets.only(top: 45), +// text: "08/21"), +// buildContainer( +// height: 138, +// width: +// MediaQuery.of(context).size.width * 0.028, +// margin: +// const EdgeInsets.only(left: 23, top: 19), +// text: "08/22"), +// buildContainer( +// height: 160, +// width: +// MediaQuery.of(context).size.width * 0.028, +// margin: const EdgeInsets.only(left: 21, top: 5), +// text: "08/23"), +// buildContainer( +// height: 83, +// width: +// MediaQuery.of(context).size.width * 0.028, +// margin: +// const EdgeInsets.only(left: 21, top: 53), +// text: "08/24"), +// buildContainer( +// height: 64, +// width: +// MediaQuery.of(context).size.width * 0.028, +// margin: +// const EdgeInsets.only(left: 20, top: 65), +// text: "08/25"), +// buildContainer( +// height: 126, +// width: +// MediaQuery.of(context).size.width * 0.028, +// margin: +// const EdgeInsets.only(left: 21, top: 26), +// text: "08/26"), +// buildContainer( +// height: 83, +// width: +// MediaQuery.of(context).size.width * 0.028, +// margin: +// const EdgeInsets.only(left: 22, top: 53), +// text: "08/27"), +// ], +// ), +// ) +// ]))), +// )), +// ], +// ), +// ); +// // ); +// } + +// Widget buildContainer( +// {required double height, +// required double width, +// required EdgeInsets margin, +// required String text}) { +// return Container( +// width: getHorizontalSize(width), +// margin: margin, +// child: Column( +// mainAxisAlignment: MainAxisAlignment.start, +// children: [ +// Container( +// height: getVerticalSize(height), +// decoration: BoxDecoration( +// color: const Color.fromARGB(255, 198, 183, 232), +// borderRadius: BorderRadius.only( +// topLeft: Radius.circular(getHorizontalSize(4)), +// topRight: Radius.circular(getHorizontalSize(4)), +// ), +// ), +// ), +// Padding( +// padding: getPadding(top: 9), +// child: Text( +// text, +// overflow: TextOverflow.ellipsis, +// textAlign: TextAlign.left, +// style: AppStyle.txtGilroyMedium10, +// ), +// ), +// ], +// ), +// ); +// } +// } + +// class NotificationItem extends StatelessWidget { +// final Map notification; + +// NotificationItem({required this.notification}); +// ApiServiceProfileManagement api = ApiServiceProfileManagement(); + +// @override +// Widget build(BuildContext context) { +// String? imageUrl = +// 'http://43.205.154.152:30165/assets/images/profile-icon.png'; +// ; +// Future _getImage(Map notification) async { +// final token = await TokenManager.getToken(); +// final String baseUrl = ApiConstants.baseUrl; +// final String apiUrl = '$baseUrl/api/user-profile'; +// try { +// final response = await http.get( +// Uri.parse(apiUrl), +// headers: { +// 'Authorization': 'Bearer $token', +// }, +// ); +// if (response.statusCode == 401) { +// LogoutService.logout(); +// } +// if (response.statusCode >= 200 && response.statusCode <= 209) { +// final Map jsonData = json.decode(response.body); +// print('image is ${jsonData['image']}'); +// final trustedImageUrl = Uri.dataFromString(jsonData['image'], +// mimeType: 'image/*', encoding: Encoding.getByName('utf-8')) +// .toString(); + +// // print('Url Fetched....... $imageUrl'); +// if (jsonData['image'] == null) { +// return 'http://43.205.154.152:30165/assets/images/profile-icon.png'; +// } else { +// imageUrl = trustedImageUrl; +// return imageUrl; +// } +// } else { +// throw Exception('Failed to load data: ${response.statusCode}'); +// } +// } catch (e) { +// throw Exception('Failed to load : $e'); +// } +// } + +// final notificationText = notification['notification'] as String; +// final time = notification['time'] as String; +// final timeDifference = calculateTimeDifference(time); + +// Widget avatar = FutureBuilder( +// future: _getImage(notification), +// builder: (context, snapshot) { +// if (snapshot.connectionState == ConnectionState.waiting) { +// return const Center(child: CircularProgressIndicator()); +// } else if (snapshot.hasError) { +// print(snapshot.error); +// // ScaffoldMessenger.of(context).showSnackBar( +// //SnackBar(content: Text('Error: ${snapshot.error}'))); +// return CircleAvatar( +// radius: 20, backgroundImage: NetworkImage(imageUrl!)); +// } else { +// imageUrl = snapshot.data; + +// return CircleAvatar( +// radius: 5, +// backgroundImage: NetworkImage(imageUrl!), +// ); +// } +// }); + +// Widget content = Container( +// height: 40, +// child: ListTile( +// leading: avatar, +// // title: Text( +// // notificationText, +// // style: TextStyle(fontSize: 12, color: Colors.grey[800]), +// // ), +// // subtitle: Text(timeDifference), +// ), +// ); + +// Widget c = Container( +// padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 10), +// child: Row( +// mainAxisAlignment: MainAxisAlignment.start, +// children: [ +// avatar, +// const SizedBox( +// width: 6, +// ), +// Column( +// mainAxisAlignment: MainAxisAlignment.center, +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Text( +// notificationText, +// style: TextStyle(fontSize: 12, color: Colors.grey[800]), +// ), +// const SizedBox( +// height: 4, +// ), +// Text( +// timeDifference, +// style: TextStyle(fontSize: 12, color: Colors.grey[800]), +// ), +// ], +// ) +// ], +// ), +// ); + +// return content; +// } + +// String calculateTimeDifference(String time) { +// final currentTime = DateTime.now(); +// final notificationTime = DateTime.parse(time); + +// final difference = currentTime.difference(notificationTime); + +// if (difference.inDays >= 365) { +// final years = (difference.inDays / 365).floor(); +// return '${years} ${years == 1 ? 'year' : 'years'} ago'; +// } else if (difference.inDays >= 30) { +// final months = (difference.inDays / 30).floor(); +// return '${months} ${months == 1 ? 'month' : 'months'} ago'; +// } else if (difference.inDays > 0) { +// return '${difference.inDays} ${difference.inDays == 1 ? 'day' : 'days'} ago'; +// } else if (difference.inHours > 0) { +// return '${difference.inHours} ${difference.inHours == 1 ? 'hour' : 'hours'} ago'; +// } else { +// return 'Just now'; +// } +// } +// } diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/main_app_screen/tabbed_layout_component_f copy.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/main_app_screen/tabbed_layout_component_f copy.dart new file mode 100644 index 0000000..6e61994 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/main_app_screen/tabbed_layout_component_f copy.dart @@ -0,0 +1,809 @@ +// // ignore_for_file: deprecated_member_use + +// import 'package:cricyard/core/utils/size_utils.dart'; +// import 'dart:async'; +// import 'dart:convert'; +// import 'dart:ui'; +// import 'package:flutter/material.dart'; +// import 'package:flutter_svg_provider/flutter_svg_provider.dart' as fs; + +// import 'package:google_nav_bar/google_nav_bar.dart'; +// import 'package:provider/provider.dart'; +// import 'package:http/http.dart' as http; +// import 'package:readmore/readmore.dart'; +// import 'package:shared_preferences/shared_preferences.dart'; +// import '../../core/utils/image_constant.dart'; +// import '../../providers/tab_navigation_provider.dart'; +// import '../../providers/token_manager.dart'; +// import '../../resources/api_constants.dart'; +// import '../../theme/app_decoration.dart'; +// import '../../theme/custom_text_style.dart'; +// import '../../theme/theme_helper.dart'; +// import '../../widgets/custom_elevated_button.dart'; +// import '../../widgets/custom_floating_button.dart'; +// import '../../widgets/custom_icon_button.dart'; +// import '../../widgets/custom_image_view.dart'; +// import '../Login Screen/login_screen_f.dart'; +// import '../LogoutService/Logoutservice.dart'; +// import '../profileManagement/change_password_f.dart'; +// import '../profileManagement/profile_settings_f.dart'; + +// class TabbedLayoutComponentcopyF extends StatefulWidget { +// TabbedLayoutComponentcopyF(this.userData, {super.key}); +// Map userData = {}; +// @override +// _TabbedLayoutComponentcopyFState createState() => +// _TabbedLayoutComponentcopyFState(); +// } + +// class _TabbedLayoutComponentcopyFState +// extends State { +// int _currentTab = 0; +// final GlobalKey _scaffoldKey = GlobalKey(); + +// Map userData = {}; + +// @override +// void initState() { +// super.initState(); +// getUserData(); +// fetchData(); +// print('user data is ..$userData'); +// } + +// getUserData() async { +// SharedPreferences prefs = await SharedPreferences.getInstance(); +// var userdatastr = prefs.getString('userData'); +// if (userdatastr != null) { +// try { +// setState(() { +// userData = json.decode(userdatastr); +// }); +// print(userData['token']); +// } catch (e) { +// print("error is ..................$e"); +// } +// } +// } + +// void setTab(int index) { +// setState(() { +// _currentTab = index; +// }); +// } + +// List> notifications = []; + +// Future fetchData() async { +// String baseUrl = ApiConstants.baseUrl; +// final apiUrl = '$baseUrl/notification/get_notification'; +// final token = await TokenManager.getToken(); +// final response = await http.get( +// Uri.parse(apiUrl), +// headers: { +// 'Authorization': 'Bearer $token', +// 'Content-Type': 'application/json', +// }, +// ); +// if (response.statusCode == 401) { +// LogoutService.logout(); +// } +// if (response.statusCode <= 209) { +// final List data = jsonDecode(response.body); +// setState(() { +// notifications = data.cast>(); +// }); +// print('notifications are $notifications'); +// } else { +// // Handle errors +// print('Failed to fetch data'); +// } +// } + +// @override +// Widget build(BuildContext context) { +// final userAuthKey = TokenManager.getToken().toString(); + +// print('user auth key is .....$userAuthKey'); + +// return WillPopScope( +// onWillPop: _onBackPress, +// child: Scaffold( +// key: _scaffoldKey, +// bottomNavigationBar: _buildBottomAppBarStack(context), +// floatingActionButton: CustomFloatingButton( +// height: 64, +// width: 64, +// alignment: Alignment.topCenter, +// child: CustomImageView( +// svgPath: ImageConstant.imgLocation, +// height: 32.0.v, +// width: 32.0.h, +// ), +// ), +// floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, +// drawer: Drawer( +// backgroundColor: Color.fromARGB(182, 162, 241, 5), +// width: MediaQuery.of(context).size.width * 80 / 100, +// child: ListView( +// children: [ +// SizedBox( +// height: 200, +// child: DrawerHeader( +// child: Container( +// height: 130, +// width: 330, +// padding: const EdgeInsets.only(right: 3, left: 3), +// child: Column( +// mainAxisAlignment: MainAxisAlignment.spaceEvenly, +// children: [ +// Row( +// mainAxisAlignment: MainAxisAlignment.spaceBetween, +// children: [ +// Container( +// padding: const EdgeInsets.all(5), +// child: Row( +// children: [ +// CustomImageView( +// imagePath: ImageConstant.imgImage3, +// height: 136.v, +// width: 167.h, +// radius: BorderRadius.circular( +// 5.h, +// ), +// ), +// const SizedBox( +// width: 5, +// ), +// Column( +// crossAxisAlignment: +// CrossAxisAlignment.start, +// children: [ +// Container( +// width: 121.h, +// height: 35.h, +// margin: +// EdgeInsets.only(right: 21.h), +// padding: EdgeInsets.symmetric( +// horizontal: 43.h, +// vertical: 5.v, +// ), +// decoration: AppDecoration +// .fillPrimary +// .copyWith( +// borderRadius: BorderRadiusStyle +// .roundedBorder15, +// ), +// child: Column( +// mainAxisSize: MainAxisSize.min, +// crossAxisAlignment: +// CrossAxisAlignment.start, +// mainAxisAlignment: +// MainAxisAlignment.center, +// children: [ +// SizedBox(height: 2.v), +// Text( +// "Profile", +// style: CustomTextStyles +// .titleMediumWhiteA700, +// ) +// ], +// ), +// ), +// ], +// ), +// ], +// )), +// ], +// ), +// ], +// ), +// ), +// ), +// ), +// SizedBox(height: 19.v), +// _buildleaderBoardButton(context), +// SizedBox(height: 23.v), +// _buildGoLiveButton(context), +// SizedBox(height: 23.v), +// _buildMyMatchesButton(context), +// SizedBox(height: 23.v), +// _buildMyTournamentsButton(context), +// SizedBox(height: 21.v), +// _buildMyHighlightsButton(context), +// SizedBox(height: 23.v), +// _buildChangeLanguageButton(context), +// SizedBox(height: 18.v), +// _buildCommunityButton(context), +// SizedBox(height: 18.v), +// _buildFindFriendsButton(context), +// SizedBox(height: 18.v), +// _buildLogoutButton(context), +// SizedBox(height: 18.v), +// // ListTile( +// // iconColor: Colors.purple.shade900, +// // leading: const Icon( +// // Icons.arrow_upward, +// // ), +// // title: Text( +// // 'Raise a Ticket', +// // style: AppStyle.txtpoppinsmedium16.copyWith( +// // fontWeight: FontWeight.w700, +// // color: Colors.purple.shade900), +// // ), +// // onTap: () { +// // Navigator.push( +// // context, +// // MaterialPageRoute( +// // builder: (context) => RaisedTicketScreen( +// // userData: userData, +// // ), +// // ), +// // ); +// // }, +// // ), +// ], +// )), +// appBar: AppBar( +// centerTitle: true, +// backgroundColor: Colors.white, +// toolbarHeight: 70, +// // title: Text("io81.dev", +// // style: GoogleFonts.poppins().copyWith( +// // fontSize: 30, +// // fontWeight: FontWeight.bold, +// // color: const Color.fromARGB(255, 93, 63, 211))), +// ), +// backgroundColor: const Color(0xfffefefe), +// extendBodyBehindAppBar: true, +// //bottomNavigationBar: AppFooter(), +// body: SizedBox( +// width: double.maxFinite, +// child: Column( +// children: [ +// Container( +// padding: EdgeInsets.symmetric( +// horizontal: 15.h, +// vertical: 43.v, +// ), +// child: Column( +// children: [ +// _buildTelevisionRow(context), +// SizedBox(height: 61.v), +// _buildOngoingStack(context), +// Divider( +// color: theme.colorScheme.primaryContainer, +// indent: 37.h, +// endIndent: 28.h, +// ), +// SizedBox(height: 9.v), +// Container( +// padding: EdgeInsets.symmetric(horizontal: 3.h), +// decoration: AppDecoration.fillGray700.copyWith( +// borderRadius: BorderRadiusStyle.roundedBorder10, +// ), +// child: Row( +// mainAxisAlignment: MainAxisAlignment.center, +// mainAxisSize: MainAxisSize.min, +// children: [ +// Container( +// margin: EdgeInsets.only( +// left: 1.h, +// top: 9.v, +// bottom: 4.v, +// ), +// decoration: AppDecoration.outlineBlack, +// child: Text( +// "Live SCORE ", +// style: theme.textTheme.bodySmall, +// ), +// ), +// CustomImageView( +// imagePath: ImageConstant.imgLive11, +// height: 32.adaptSize, +// width: 32.adaptSize, +// ) +// ], +// ), +// ), +// SizedBox(height: 9.v), +// Container( +// width: 111.h, +// padding: EdgeInsets.symmetric( +// horizontal: 4.h, +// vertical: 5.v, +// ), +// decoration: AppDecoration.fillGray700.copyWith( +// borderRadius: BorderRadiusStyle.roundedBorder10, +// ), +// child: Text( +// "Fixtures/Results", +// style: CustomTextStyles.bodyMediumPoppinsBluegray50, +// ), +// ), +// SizedBox(height: 18.v), +// Divider( +// color: theme.colorScheme.primaryContainer, +// indent: 37.h, +// endIndent: 28.h, +// ), +// SizedBox(height: 6.v), +// Align( +// alignment: Alignment.centerLeft, +// child: Padding( +// padding: EdgeInsets.only(left: 40.h), +// child: Text( +// "Stories", +// style: CustomTextStyles.headlineLargeSemiBold, +// ), +// ), +// ), +// SizedBox(height: 5.v), +// CustomImageView( +// imagePath: ImageConstant.imgImage3, +// height: 125.v, +// width: 167.h, +// radius: BorderRadius.circular( +// 5.h, +// ), +// ), +// SizedBox(height: 5.v), +// ReadMoreText( +// "Lucknow beat Punjab in RUN FEST", +// trimLines: 2, +// colorClickableText: appTheme.black900, +// trimMode: TrimMode.Line, +// trimCollapsedText: "Read more", +// moreStyle: CustomTextStyles.titleMediumBlack900Medium, +// lessStyle: CustomTextStyles.titleMediumBlack900Medium, +// ) +// ], +// ), +// ), +// SizedBox(height: 8.v), +// ], +// ), +// ), +// ), +// ); +// } + +// /// Section Widget +// Widget _buildleaderBoardButton(BuildContext context) { +// return CustomElevatedButton( +// text: "Leaderboard", +// margin: EdgeInsets.only(right: 88.h), +// ); +// } + +// /// Section Widget +// Widget _buildGoLiveButton(BuildContext context) { +// return CustomElevatedButton( +// text: "Go Live", +// margin: EdgeInsets.only(right: 88.h), +// ); +// } + +// /// Section Widget +// Widget _buildMyMatchesButton(BuildContext context) { +// return CustomElevatedButton( +// text: "My Matches", +// margin: EdgeInsets.only(right: 88.h), +// ); +// } + +// /// Section Widget +// Widget _buildMyTournamentsButton(BuildContext context) { +// return CustomElevatedButton( +// text: "My Tournaments", +// margin: EdgeInsets.only(right: 88.h), +// ); +// } + +// /// Section Widget +// Widget _buildMyHighlightsButton(BuildContext context) { +// return CustomElevatedButton( +// text: "My Highlights", +// margin: EdgeInsets.only(right: 88.h), +// ); +// } + +// /// Section Widget +// Widget _buildChangeLanguageButton(BuildContext context) { +// return CustomElevatedButton( +// text: "Change language", +// margin: EdgeInsets.only(right: 88.h), +// ); +// } + +// /// Section Widget +// Widget _buildCommunityButton(BuildContext context) { +// return CustomElevatedButton( +// text: "Community", +// margin: EdgeInsets.only(right: 88.h), +// ); +// } + +// /// Section Widget +// Widget _buildFindFriendsButton(BuildContext context) { +// return CustomElevatedButton( +// text: "Find Friends", +// margin: EdgeInsets.only(right: 88.h), +// ); +// } + +// /// Section Widget +// Widget _buildLogoutButton(BuildContext context) { +// return CustomElevatedButton( +// text: "Logout", +// margin: EdgeInsets.only(right: 88.h), +// onPressed: _logoutUser, +// ); +// } + +// /// Section Widget +// Widget _buildProfileSettingButton(BuildContext context) { +// return CustomElevatedButton( +// text: "Profile Settings", +// margin: EdgeInsets.only(right: 88.h), +// onPressed: () { +// // Closes the drawer +// Navigator.push( +// context, +// MaterialPageRoute( +// builder: (context) => ProfileSettingsScreenF(userData: userData), +// ), +// ); +// // Add your logic for menu 2 here +// }, +// ); +// } + +// /// Section Widget +// Widget _buildChangePasswordButton(BuildContext context) { +// return CustomElevatedButton( +// text: "Change Password", +// margin: EdgeInsets.only(right: 88.h), +// onPressed: () { +// Navigator.push(context, +// MaterialPageRoute(builder: (context) => ResetPasswordScreenF())); +// }, +// ); +// } + +// Future _logoutUser() async { +// try { +// SharedPreferences prefs = await SharedPreferences.getInstance(); + +// // Remove 'userData' and 'isLoggedIn' from SharedPreferences +// await prefs.remove('userData'); +// await prefs.remove('isLoggedIn'); +// String logouturl = "${ApiConstants.baseUrl}/token/logout"; +// var response = await http.get(Uri.parse(logouturl)); +// if (response.statusCode == 401) { +// LogoutService.logout(); +// } +// if (response.statusCode <= 209) { +// // ignore: use_build_context_synchronously +// Navigator.pushAndRemoveUntil( +// context, +// MaterialPageRoute(builder: (context) => const LoginScreenF(false)), +// (route) => false, // Remove all routes from the stack +// ); +// } else { +// const Text('failed to logout'); +// } +// } catch (error) { +// print('Error occurred during logout: $error'); +// } +// } + +// void _onTabChange(int index) { +// if (_currentTab == 1 || _currentTab == 2) { +// FocusManager.instance.primaryFocus?.unfocus(); +// } +// Provider.of(context, listen: false) +// .updateTabs(_currentTab); +// setState(() { +// _currentTab = index; +// }); +// } + +// Future _onBackPress() { +// if (_currentTab == 0) { +// return Future.value(true); +// } else { +// int lastTab = +// Provider.of(context, listen: false).lastTab; +// Provider.of(context, listen: false) +// .removeLastTab(); +// setTab(lastTab); +// } +// return Future.value(false); +// } + +// // Section Widget +// Widget _buildTelevisionRow(BuildContext context) { +// return GestureDetector( +// child: Padding( +// padding: EdgeInsets.only(left: 13.h), +// child: Row( +// mainAxisAlignment: MainAxisAlignment.center, +// crossAxisAlignment: CrossAxisAlignment.end, +// children: [ +// IconButton( +// icon: const Icon( +// Icons.circle_outlined, +// color: Colors.black, +// ), +// onPressed: () {}), +// CustomImageView( +// svgPath: ImageConstant.imgTelevision, +// height: 24.adaptSize, +// width: 24.adaptSize, +// margin: EdgeInsets.only( +// top: 11.v, +// bottom: 2.v, +// ), +// ), +// CustomImageView( +// imagePath: ImageConstant.imgImageRemovebgPreview, +// height: 35.v, +// width: 272.h, +// margin: EdgeInsets.only( +// left: 15.h, +// bottom: 2.v, +// ), +// ), +// CustomImageView( +// svgPath: ImageConstant.imgTelevisionPrimarycontainer, +// height: 24.adaptSize, +// width: 24.adaptSize, +// margin: EdgeInsets.only( +// left: 15.h, +// top: 11.v, +// ), +// ), +// Padding( +// padding: EdgeInsets.only( +// left: 11.h, +// top: 11.v, +// bottom: 2.v, +// ), +// child: CustomIconButton( +// height: 24.adaptSize, +// width: 24.adaptSize, +// decoration: IconButtonStyleHelper.fillPrimaryContainer, +// child: CustomImageView( +// svgPath: ImageConstant.imgVector, +// ), +// ), +// ) +// ], +// ), +// ), +// ); +// } + +// /// Section Widget +// Widget _buildOngoingStack(BuildContext context) { +// return SizedBox( +// height: 204.v, +// width: 350.h, +// child: Stack( +// alignment: Alignment.bottomLeft, +// children: [ +// Align( +// alignment: Alignment.topCenter, +// child: Text( +// "Ongoing", +// style: CustomTextStyles.headlineLargeSemiBold, +// ), +// ), +// Align( +// alignment: Alignment.bottomLeft, +// child: Padding( +// padding: EdgeInsets.only( +// left: 10.h, +// right: 191.h, +// bottom: 33.v, +// ), +// child: Column( +// mainAxisSize: MainAxisSize.min, +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Align( +// alignment: Alignment.centerRight, +// child: Text( +// "4.3 Ov.", +// style: theme.textTheme.titleLarge, +// ), +// ), +// SizedBox(height: 5.v), +// Text( +// "Team 1", +// style: theme.textTheme.headlineSmall, +// ) +// ], +// ), +// ), +// ), +// Align( +// alignment: Alignment.bottomLeft, +// child: Padding( +// padding: EdgeInsets.only(left: 80.h), +// child: Text( +// "Run Rate 2.80", +// style: theme.textTheme.headlineSmall, +// ), +// ), +// ), +// Align( +// alignment: Alignment.topLeft, +// child: Padding( +// padding: EdgeInsets.only( +// left: 96.h, +// top: 65.v, +// ), +// child: Text( +// "12/0-", +// style: theme.textTheme.titleLarge, +// ), +// ), +// ), +// Align( +// alignment: Alignment.bottomRight, +// child: Padding( +// padding: EdgeInsets.only( +// right: 2.h, +// bottom: 31.v, +// ), +// child: Text( +// "Team 2", +// style: theme.textTheme.headlineSmall, +// ), +// ), +// ), +// CustomImageView( +// imagePath: ImageConstant.imgImage1, +// height: 102.v, +// width: 95.h, +// alignment: Alignment.topLeft, +// margin: EdgeInsets.only(top: 38.v), +// ), +// CustomImageView( +// imagePath: ImageConstant.imgImage2, +// height: 102.adaptSize, +// width: 102.adaptSize, +// alignment: Alignment.topRight, +// margin: EdgeInsets.only(top: 41.v), +// ), +// Align( +// alignment: Alignment.center, +// child: SizedBox( +// height: 100.v, +// child: VerticalDivider( +// width: 1.h, +// thickness: 1.v, +// ), +// ), +// ), +// Align( +// alignment: Alignment.topRight, +// child: Padding( +// padding: EdgeInsets.only( +// left: 187.h, +// top: 66.v, +// right: 100.h, +// ), +// child: Column( +// mainAxisSize: MainAxisSize.min, +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Text( +// "To Bat", +// style: theme.textTheme.titleLarge, +// ), +// Text( +// "0 Ov.", +// style: theme.textTheme.titleLarge, +// ) +// ], +// ), +// ), +// ) +// ], +// ), +// ); +// } + +// /// Section Widget +// Widget _buildBottomAppBarStack(BuildContext context) { +// return SizedBox( +// child: SizedBox( +// height: 115.v, +// width: 409.h, +// child: Stack( +// alignment: Alignment.topCenter, +// children: [ +// Align( +// alignment: Alignment.bottomCenter, +// child: Container( +// width: 409.h, +// margin: EdgeInsets.only(top: 35.v), +// padding: EdgeInsets.symmetric( +// horizontal: 13.h, +// vertical: 15.v, +// ), +// decoration: BoxDecoration( +// image: DecorationImage( +// image: fs.Svg( +// ImageConstant.imgGroup146, +// ), +// fit: BoxFit.cover, +// ), +// ), +// child: Row( +// mainAxisAlignment: MainAxisAlignment.end, +// children: [ +// CustomIconButton( +// height: 50.adaptSize, +// width: 50.adaptSize, +// padding_f: EdgeInsets.all(13.h), +// child: CustomImageView( +// svgPath: ImageConstant.imgSearch, +// ), +// ), +// Padding( +// padding: EdgeInsets.only(left: 27.h), +// child: CustomIconButton( +// height: 50.adaptSize, +// width: 50.adaptSize, +// padding_f: EdgeInsets.all(12.h), +// child: CustomImageView( +// svgPath: ImageConstant.imgBxCricketBall, +// ), +// ), +// ), +// Padding( +// padding: EdgeInsets.only(left: 123.h), +// child: CustomIconButton( +// height: 50.adaptSize, +// width: 50.adaptSize, +// padding_f: EdgeInsets.all(12.h), +// child: CustomImageView( +// svgPath: ImageConstant.imgFluentLive24Filled, +// ), +// ), +// ), +// Padding( +// padding: EdgeInsets.only(left: 26.h), +// child: CustomIconButton( +// height: 50.adaptSize, +// width: 50.adaptSize, +// padding_f: EdgeInsets.all(10.h), +// child: CustomImageView( +// svgPath: ImageConstant.imgNotification, +// ), +// ), +// ) +// ], +// ), +// ), +// ), +// CustomFloatingButton( +// height: 64, +// width: 64, +// alignment: Alignment.topCenter, +// child: CustomImageView( +// svgPath: ImageConstant.imgLocation, +// height: 32.0.v, +// width: 32.0.h, +// ), +// ) +// ], +// ), +// ), +// ); +// } +// } diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/main_app_screen/tabbed_layout_component_f.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/main_app_screen/tabbed_layout_component_f.dart new file mode 100644 index 0000000..f278311 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/main_app_screen/tabbed_layout_component_f.dart @@ -0,0 +1,430 @@ +// // ignore_for_file: deprecated_member_use + +// import 'package:cricyard/core/utils/size_utils.dart'; +// import 'dart:async'; +// import 'dart:convert'; +// import 'package:flutter/material.dart'; +// import 'package:provider/provider.dart'; +// import 'package:readmore/readmore.dart'; +// import 'package:shared_preferences/shared_preferences.dart'; +// import '../../core/utils/image_constant.dart'; +// import '../../providers/tab_navigation_provider.dart'; +// import '../../theme/app_decoration.dart'; +// import '../../theme/custom_text_style.dart'; +// import '../../theme/theme_helper.dart'; +// import '../../widgets/custom_image_view.dart'; +// import '../ReuseableWidgets/BottomAppBarWidget.dart'; +// import '../ReuseableWidgets/CustomDrawer.dart'; +// import '../ReuseableWidgets/headerWidget.dart'; + +// class TabbedLayoutComponentF extends StatefulWidget { +// TabbedLayoutComponentF(this.userData, {super.key}); +// Map userData = {}; +// @override +// _TabbedLayoutComponentFState createState() => _TabbedLayoutComponentFState(); +// } + +// class _TabbedLayoutComponentFState extends State { +// int _currentTab = 0; +// final GlobalKey _scaffoldKey = GlobalKey(); + +// Map userData = {}; + +// @override +// void initState() { +// super.initState(); +// getUserData(); +// print('user data is ..$userData'); +// } + +// getUserData() async { +// SharedPreferences prefs = await SharedPreferences.getInstance(); +// var userdatastr = prefs.getString('userData'); +// if (userdatastr != null) { +// try { +// setState(() { +// userData = json.decode(userdatastr); +// }); +// print(userData['token']); +// } catch (e) { +// print("error is ..................$e"); +// } +// } +// } + +// void setTab(int index) { +// setState(() { +// _currentTab = index; +// }); +// } + +// // List> notifications = []; + +// // Future fetchData() async { +// // String baseUrl = ApiConstants.baseUrl; +// // final apiUrl = '$baseUrl/notification/get_notification'; +// // final token = await TokenManager.getToken(); +// // final response = await http.get( +// // Uri.parse(apiUrl), +// // headers: { +// // 'Authorization': 'Bearer $token', +// // 'Content-Type': 'application/json', +// // }, +// // ); +// // if (response.statusCode == 401) { +// // LogoutService.logout(); +// // } +// // if (response.statusCode <= 209) { +// // final List data = jsonDecode(response.body); +// // setState(() { +// // notifications = data.cast>(); +// // }); +// // print('notifications are $notifications'); +// // } else { +// // // Handle errors +// // print('Failed to fetch data'); +// // } +// // } + +// @override +// Widget build(BuildContext context) { +// return PopScope( +// // onWillPop: _onBackPress, +// child: Scaffold( +// key: _scaffoldKey, +// drawer: CustomDrawer(context: context), + +// bottomNavigationBar: BottomAppBarWidget(), +// backgroundColor: const Color(0xfffefefe), +// extendBodyBehindAppBar: true, +// //bottomNavigationBar: AppFooter(), +// body: SizedBox( +// width: double.maxFinite, +// child: Column( +// children: [ +// Container( +// padding: EdgeInsets.symmetric( +// horizontal: 15.h, +// vertical: 43.v, +// ), +// child: Column( +// children: [ +// headerWidget(context, _scaffoldKey), +// // _buildTelevisionRow(context), +// SizedBox(height: 21.v), +// _buildOngoingStack(context), +// Divider( +// color: theme.colorScheme.primaryContainer, +// indent: 37.h, +// endIndent: 28.h, +// ), +// SizedBox(height: 9.v), +// Container( +// padding: EdgeInsets.symmetric(horizontal: 3.h), +// decoration: AppDecoration.fillGray700.copyWith( +// borderRadius: BorderRadiusStyle.roundedBorder10, +// ), +// child: Row( +// mainAxisAlignment: MainAxisAlignment.center, +// mainAxisSize: MainAxisSize.min, +// children: [ +// Container( +// margin: EdgeInsets.only( +// left: 1.h, +// top: 9.v, +// bottom: 4.v, +// ), +// decoration: AppDecoration.outlineBlack, +// child: Text( +// "Live SCORE ", +// style: theme.textTheme.bodySmall, +// ), +// ), +// CustomImageView( +// imagePath: ImageConstant.imgLive11, +// height: 32.adaptSize, +// width: 32.adaptSize, +// ) +// ], +// ), +// ), +// SizedBox(height: 9.v), +// Container( +// width: 111.h, +// padding: EdgeInsets.symmetric( +// horizontal: 4.h, +// vertical: 5.v, +// ), +// decoration: AppDecoration.fillGray700.copyWith( +// borderRadius: BorderRadiusStyle.roundedBorder10, +// ), +// child: Text( +// "Fixtures/Results", +// style: CustomTextStyles.bodyMediumPoppinsBluegray50, +// ), +// ), +// SizedBox(height: 18.v), +// Divider( +// color: theme.colorScheme.primaryContainer, +// indent: 37.h, +// endIndent: 28.h, +// ), +// SizedBox(height: 6.v), +// Align( +// alignment: Alignment.centerLeft, +// child: Padding( +// padding: EdgeInsets.only(left: 40.h), +// child: Text( +// "Stories", +// style: CustomTextStyles.headlineLargeSemiBold, +// ), +// ), +// ), +// SizedBox(height: 5.v), +// CustomImageView( +// imagePath: ImageConstant.imgImage3, +// height: 125.v, +// width: 167.h, +// radius: BorderRadius.circular( +// 5.h, +// ), +// ), +// SizedBox(height: 5.v), +// ReadMoreText( +// "Lucknow beat Punjab in RUN FEST", +// trimLines: 2, +// colorClickableText: appTheme.black900, +// trimMode: TrimMode.Line, +// trimCollapsedText: "Read more", +// moreStyle: CustomTextStyles.titleMediumBlack900Medium, +// lessStyle: CustomTextStyles.titleMediumBlack900Medium, +// ) +// ], +// ), +// ), +// SizedBox(height: 8.v), +// ], +// ), +// ), +// ), +// ); +// } + +// // Section Widget +// // Widget _buildTelevisionRow(BuildContext context) { +// // return GestureDetector( +// // child: Padding( +// // padding: EdgeInsets.only(left: 1.h), +// // child: Row( +// // mainAxisAlignment: MainAxisAlignment.center, +// // crossAxisAlignment: CrossAxisAlignment.end, +// // children: [ +// // GestureDetector( +// // onTap: () { +// // _scaffoldKey.currentState?.openDrawer(); +// // }, +// // child: CustomImageView( +// // svgPath: ImageConstant.imgTelevision, +// // height: 24.adaptSize, +// // width: 24.adaptSize, +// // margin: EdgeInsets.only( +// // top: 11.v, +// // bottom: 2.v, +// // ), +// // ), +// // ), +// // CustomImageView( +// // imagePath: ImageConstant.imgImageRemovebgPreview, +// // height: 75.v, +// // width: 272.h, +// // margin: EdgeInsets.only( +// // left: 15.h, +// // bottom: 2.v, +// // ), +// // ), +// // CustomImageView( +// // svgPath: ImageConstant.imgTelevisionPrimarycontainer, +// // height: 24.adaptSize, +// // width: 24.adaptSize, +// // margin: EdgeInsets.only( +// // left: 15.h, +// // top: 11.v, +// // ), +// // ), +// // Padding( +// // padding: EdgeInsets.only( +// // left: 11.h, +// // top: 11.v, +// // bottom: 2.v, +// // ), +// // child: CustomIconButton( +// // height: 24.adaptSize, +// // width: 24.adaptSize, +// // decoration: IconButtonStyleHelper.fillPrimaryContainer, +// // child: CustomImageView( +// // svgPath: ImageConstant.imgVector, +// // ), +// // ), +// // ) +// // ], +// // ), +// // ), +// // ); +// // } + +// // /// Section Widget +// Widget _buildOngoingStack(BuildContext context) { +// return SizedBox( +// height: 204.v, +// width: 350.h, +// child: Stack( +// alignment: Alignment.bottomLeft, +// children: [ +// Align( +// alignment: Alignment.topCenter, +// child: Text( +// "Ongoing", +// style: CustomTextStyles.headlineLargeSemiBold, +// ), +// ), +// Align( +// alignment: Alignment.bottomLeft, +// child: Padding( +// padding: EdgeInsets.only( +// left: 10.h, +// right: 191.h, +// bottom: 33.v, +// ), +// child: Column( +// mainAxisSize: MainAxisSize.min, +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Align( +// alignment: Alignment.centerRight, +// child: Text( +// "4.3 Ov.", +// style: theme.textTheme.titleLarge, +// ), +// ), +// SizedBox(height: 5.v), +// Text( +// "Team 1", +// style: theme.textTheme.headlineSmall, +// ) +// ], +// ), +// ), +// ), +// Align( +// alignment: Alignment.bottomLeft, +// child: Padding( +// padding: EdgeInsets.only(left: 80.h), +// child: Text( +// "Run Rate 2.80", +// style: theme.textTheme.headlineSmall, +// ), +// ), +// ), +// Align( +// alignment: Alignment.topLeft, +// child: Padding( +// padding: EdgeInsets.only( +// left: 96.h, +// top: 65.v, +// ), +// child: Text( +// "12/0-", +// style: theme.textTheme.titleLarge, +// ), +// ), +// ), +// Align( +// alignment: Alignment.bottomRight, +// child: Padding( +// padding: EdgeInsets.only( +// right: 2.h, +// bottom: 31.v, +// ), +// child: Text( +// "Team 2", +// style: theme.textTheme.headlineSmall, +// ), +// ), +// ), +// CustomImageView( +// imagePath: ImageConstant.imgImage1, +// height: 102.v, +// width: 95.h, +// alignment: Alignment.topLeft, +// margin: EdgeInsets.only(top: 38.v), +// ), +// CustomImageView( +// imagePath: ImageConstant.imgImage2, +// height: 102.adaptSize, +// width: 102.adaptSize, +// alignment: Alignment.topRight, +// margin: EdgeInsets.only(top: 41.v), +// ), +// Align( +// alignment: Alignment.center, +// child: SizedBox( +// height: 100.v, +// child: VerticalDivider( +// width: 1.h, +// thickness: 1.v, +// ), +// ), +// ), +// Align( +// alignment: Alignment.topRight, +// child: Padding( +// padding: EdgeInsets.only( +// left: 187.h, +// top: 66.v, +// right: 100.h, +// ), +// child: Column( +// mainAxisSize: MainAxisSize.min, +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Text( +// "To Bat", +// style: theme.textTheme.titleLarge, +// ), +// Text( +// "0 Ov.", +// style: theme.textTheme.titleLarge, +// ) +// ], +// ), +// ), +// ) +// ], +// ), +// ); +// } + +// void _onTabChange(int index) { +// if (_currentTab == 1 || _currentTab == 2) { +// FocusManager.instance.primaryFocus?.unfocus(); +// } +// Provider.of(context, listen: false) +// .updateTabs(_currentTab); +// setState(() { +// _currentTab = index; +// }); +// } + +// Future _onBackPress() { +// if (_currentTab == 0) { +// return Future.value(true); +// } else { +// int lastTab = +// Provider.of(context, listen: false).lastTab; +// Provider.of(context, listen: false) +// .removeLastTab(); +// setTab(lastTab); +// } +// return Future.value(false); +// } +// } diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/profileManagement/about.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/profileManagement/about.dart new file mode 100644 index 0000000..b377ea9 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/profileManagement/about.dart @@ -0,0 +1,179 @@ +import 'dart:convert'; + +import 'package:flutter/material.dart'; +import 'package:flutter/rendering.dart'; +import 'package:google_fonts/google_fonts.dart'; +import 'package:shared_preferences/shared_preferences.dart'; + +import '../../utils/color_constants.dart'; +import '../../utils/image_constant.dart'; +import '../../utils/size_utils.dart'; +import '../../theme/app_style.dart'; +import '../../widgets/app_bar/appbar_image.dart'; +import '../../widgets/app_bar/appbar_title.dart'; +import '../../widgets/app_bar/custom_app_bar.dart'; +import 'contact_us_f.dart'; +import 'policy_details_page.dart'; + +class AboutScreen extends StatefulWidget { + @override + State createState() => _AboutScreenState(); +} + +class _AboutScreenState extends State + with SingleTickerProviderStateMixin { + Map userData = {}; + + var _selectedTabIndex = 0; + final Map formData = {}; + + getUserData() async { + SharedPreferences prefs = await SharedPreferences.getInstance(); + var userdatastr = prefs.getString('userData'); + if (userdatastr != null) { + try { + setState(() { + userData = json.decode(userdatastr); + }); + print(userData['token']); + } catch (e) { + print("error is ..................$e"); + } + } + } + + @override + void initState() { + // TODO: implement initState + super.initState(); + _tabController = TabController(length: 4, vsync: this); + _tabController.addListener(() { + setState(() { + _selectedTabIndex = _tabController.index; + }); + }); + getUserData(); + } + + Widget About = Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Image.asset( + 'assets/images/Transparent .png', + height: 200, + width: 200, + alignment: Alignment.center, + ), + const SizedBox( + height: 100, + ), + Text( + 'About Us', + style: AppStyle.fieldlabel.copyWith(fontSize: 24), + ), + const SizedBox(height: 20), + Padding( + padding: EdgeInsets.symmetric(horizontal: 15), + child: Text( + 'Create a new project if you have access, if you don\'t have access, then contact the admin.', + textAlign: TextAlign.center, + style: AppStyle.fieldlabel.copyWith(color: ColorConstant.purple900), + ), + ), + ], + ), + ); + + Widget HelpCenter = Center( + child: Text( + 'Help Center', + style: GoogleFonts.poppins().copyWith( + fontSize: 24, + color: ColorConstant.purple900, + fontWeight: FontWeight.w700), + ), + ); + + late TabController _tabController; + + @override + Widget build(BuildContext context) { + return DefaultTabController( + length: 4, + child: Scaffold( + appBar: CustomAppBar( + height: getVerticalSize(130), + leadingWidth: 40, + leading: AppbarImage( + height: getSize(24), + width: getSize(24), + svgPath: ImageConstant.imgArrowleftBlueGray900, + margin: getMargin(left: 16, top: 12, bottom: 13), + onTap: () { + Navigator.pop(context); + }), + centerTitle: true, + title: AppbarTitle(text: "About Us"), + bottom: TabBar(controller: _tabController, tabs: [ + Tab( + child: Text( + "About", + style: GoogleFonts.poppins().copyWith( + color: _tabController.index == 0 + ? ColorConstant.purple900 + : Colors.black54, + fontWeight: FontWeight.w700), + ), + ), + Tab( + child: Text( + "Help Center", + style: GoogleFonts.poppins().copyWith( + color: _tabController.index == 1 + ? ColorConstant.purple900 + : Colors.black54, + fontWeight: FontWeight.w700), + ), + ), + Tab( + child: Text( + "Contact Us", + style: GoogleFonts.poppins().copyWith( + color: _tabController.index == 2 + ? ColorConstant.purple900 + : Colors.black54, + fontWeight: FontWeight.w700), + ), + ), + Tab( + child: Text( + "Policies", + style: GoogleFonts.poppins().copyWith( + color: _tabController.index == 3 + ? ColorConstant.purple900 + : Colors.black54, + fontWeight: FontWeight.w700), + ), + ) + ]), + ), + body: TabBarView(controller: _tabController, children: [ + About, + HelpCenter, + ContactUsScreenF(), + Column( + children: [ + GestureDetector( + onTap: () { + Navigator.of(context).push(MaterialPageRoute( + builder: (ctx) => PolicyDetails( + data: 'data', title: 'Privacy Policy'))); + }, + child: Text('Privacy Policy')) + ], + ) + ])), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/profileManagement/apiserviceprofilemanagement.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/profileManagement/apiserviceprofilemanagement.dart new file mode 100644 index 0000000..e792c08 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/profileManagement/apiserviceprofilemanagement.dart @@ -0,0 +1,88 @@ +import 'dart:typed_data'; +import 'package:http_parser/http_parser.dart'; +import 'package:dio/dio.dart'; +import '../../resources/api_constants.dart'; +import '../LogoutService/Logoutservice.dart'; + +class ApiServiceProfileManagement { + final String baseUrl = ApiConstants.baseUrl; + final Dio dio = Dio(); + + Future createFile( + Uint8List fileBytes, String fileName, String token) async { + try { + String apiUrl = "$baseUrl/api/upload"; + + const mimeType = 'image/jpeg'; // You can set the appropriate MIME type + + FormData formData = FormData.fromMap({ + 'imageFile': MultipartFile.fromBytes( + fileBytes, + filename: fileName, + contentType: MediaType.parse(mimeType), + ), + }); + + Dio dio = Dio(); // Create a new Dio instance + dio.options.headers['Authorization'] = 'Bearer $token'; + + final response = await dio.post(apiUrl, data: formData); + print('completed'); + + if (response.statusCode == 200) { + // Handle successful response + print('File uploaded successfully'); + } else { + print('Failed to upload file with status: ${response.statusCode}'); + } + } catch (error) { + print('Error occurred during form submission: $error'); + } + } + + String lookupMimeType(String filePath) { + final ext = filePath.split('.').last; + switch (ext) { + case 'jpg': + case 'jpeg': + return 'image/jpeg'; + case 'png': + return 'image/png'; + case 'pdf': + return 'application/pdf'; + // Add more cases for other file types as needed + default: + return 'application/octet-stream'; // Default MIME type + } + } + + Future getImage(String token, int userId) async { + try { + dio.options.headers['Authorization'] = 'Bearer $token'; + + print(userId); + + final response = + await dio.get('$baseUrl/userId/retrieve-image?UserId=${userId}'); + print('response is $response'); + if (response.statusCode == 401) { + LogoutService.logout(); + } + final String imageFile = response.data; + print(imageFile); + + if (response.statusCode! <= 209) { + if (imageFile == null) { + String f = 'assets/images/userImage.avif'; + return f; + } else { + return imageFile; + } + } else { + throw Exception('errrorrrrrr isssss $response.statusMessage'); + } + } catch (e) { + throw Exception('Unable to fetch image: $e'); + } + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/profileManagement/change_password_f.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/profileManagement/change_password_f.dart new file mode 100644 index 0000000..c3e277f --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/profileManagement/change_password_f.dart @@ -0,0 +1,307 @@ +import 'dart:convert'; +import 'package:flutter/material.dart'; +import 'package:shared_preferences/shared_preferences.dart'; + +import '../../utils/image_constant.dart'; +import '../../utils/size_utils.dart'; +import '../../providers/token_manager.dart'; +import '../../resources/api_constants.dart'; +import 'package:http/http.dart' as http; + +import '../../theme/app_style.dart'; +import '../../widgets/app_bar/appbar_image.dart'; +import '../../widgets/app_bar/appbar_title.dart'; +import '../../widgets/app_bar/custom_app_bar.dart'; + +import '../../widgets/custom_text_form_field.dart'; +import '../Login Screen/CustomButton.dart'; +import '../Login Screen/login_screen_f.dart'; +import '../LogoutService/Logoutservice.dart'; + +class ResetPasswordScreenF extends StatefulWidget { + ResetPasswordScreenF({super.key}); + @override + _ResetPasswordScreenFState createState() => _ResetPasswordScreenFState(); +} + +class _ResetPasswordScreenFState extends State { + Map userData = {}; + + @override + void initState() { + super.initState(); + getUserData(); + print('user data is ..$userData'); + } + + getUserData() async { + SharedPreferences prefs = await SharedPreferences.getInstance(); + var userdatastr = prefs.getString('userData'); + if (userdatastr != null) { + try { + setState(() { + userData = json.decode(userdatastr); + }); + } catch (e) { + print("error is ..................$e"); + } + } + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: CustomAppBar( + height: getVerticalSize(49), + leadingWidth: 40, + leading: AppbarImage( + height: getSize(24), + width: getSize(24), + svgPath: ImageConstant.imgArrowleftBlueGray900, + margin: getMargin(left: 16, top: 12, bottom: 13), + onTap: () { + Navigator.pop(context); + }), + centerTitle: true, + title: AppbarTitle(text: "Reset Your Password")), + body: SingleChildScrollView( + padding: const EdgeInsets.all(16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text("You're signed in as - ${userData['email']}", + style: AppStyle.txtGilroyMedium16Bluegray800), + const SizedBox(height: 20), + ResetPasswordFormF( + userData: userData, userEmail: userData['email']), + const SizedBox(height: 20), + ], + ), + ), + ); + } +} + +class ResetPasswordFormF extends StatefulWidget { + final String userEmail; + + final Map userData; + + const ResetPasswordFormF( + {super.key, required this.userEmail, required this.userData}); + + @override + _ResetPasswordFormFState createState() => _ResetPasswordFormFState(); +} + +class _ResetPasswordFormFState extends State { + final TextEditingController oldPasswordController = TextEditingController(); + final TextEditingController newPasswordController = TextEditingController(); + final TextEditingController reEnterNewPasswordController = + TextEditingController(); + + var responseMessage; + var isVisible = false; + bool issuccess = false; + + bool isOldPasswordVisible = false; + bool isNewPasswordVisible = false; + bool isReEnterNewPasswordVisible = false; + + bool _isPasswordValid1 = true; + void _validatePassword1(String password) { + setState(() { + _isPasswordValid1 = password.isNotEmpty; + }); + } + + bool _isPasswordValid2 = true; + void _validatePassword2(String password) { + setState(() { + _isPasswordValid2 = password.isNotEmpty; + }); + } + + bool _isPasswordValid3 = true; + void _validatePassword3(String password) { + setState(() { + _isPasswordValid3 = + password.isNotEmpty && password == newPasswordController.text; + }); + } + + @override + Widget build(BuildContext context) { + return Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + isVisible + ? Text(responseMessage, + style: TextStyle( + color: issuccess + ? Colors.green + : Colors.red, // Set the text color to red + )) + : const Text(''), + Padding( + padding: getPadding(top: 19), + child: const Text("Enter Old Password", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: TextStyle( + fontSize: 16, + color: Colors.black, + fontWeight: FontWeight.w700))), + CustomTextFormField( + focusNode: FocusNode(), + controller: oldPasswordController, + hintText: "Enter Old Password", + onChanged: _validatePassword1, + validator: (value) { + if (value!.isEmpty && _isPasswordValid1) { + return 'Please enter your old password'; + } + return null; // Return null to indicate no error + }, + textInputType: TextInputType.visiblePassword, + suffix: IconButton( + icon: Icon( + isOldPasswordVisible ? Icons.visibility : Icons.visibility_off, + ), + onPressed: () { + setState(() { + isOldPasswordVisible = !isOldPasswordVisible; + }); + }, + ), + isObscureText: !isOldPasswordVisible), + Padding( + padding: getPadding(top: 19), + child: const Text("Enter New Password", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: TextStyle( + fontSize: 16, + color: Colors.black, + fontWeight: FontWeight.w700))), + CustomTextFormField( + focusNode: FocusNode(), + controller: newPasswordController, + hintText: "Enter New Password", + suffix: IconButton( + icon: Icon( + isNewPasswordVisible ? Icons.visibility : Icons.visibility_off, + ), + onPressed: () { + setState(() { + isNewPasswordVisible = !isNewPasswordVisible; + }); + }, + ), + onChanged: _validatePassword2, + validator: (value) { + if (value!.isEmpty && _isPasswordValid2) { + return 'Please enter your new password'; + } + return null; + }, + isObscureText: !isNewPasswordVisible, + ), + Padding( + padding: getPadding(top: 19), + child: const Text("Re-Enter New Password", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: TextStyle( + fontSize: 16, + color: Colors.black, + fontWeight: FontWeight.w700))), + CustomTextFormField( + focusNode: FocusNode(), + controller: reEnterNewPasswordController, + hintText: "Re-Enter New Password", + onChanged: _validatePassword3, + validator: (value) { + if (value!.isEmpty && _isPasswordValid3) { + return 'Please re-enter your new password'; + } + if (value != newPasswordController.text) { + return 'Passwords do not match'; + } + return null; + }, + isObscureText: !isReEnterNewPasswordVisible, + ), + const SizedBox( + height: 280, + ), + CustomButton( + height: getVerticalSize(50), + text: "Continue", + onTap: () async { + if (oldPasswordController.text.isEmpty || + newPasswordController.text.isEmpty || + reEnterNewPasswordController.text.isEmpty) { + print(oldPasswordController.text); + print(newPasswordController.text); + print(reEnterNewPasswordController.text); + } else { + Map passwordData = { + "userId": widget.userData['userId'], + "oldPassword": oldPasswordController.text, + "newPassword": newPasswordController.text, + "confirmPassword": reEnterNewPasswordController.text, + }; + print(passwordData); + final token = await TokenManager.getToken(); + const String baseUrl = ApiConstants.baseUrl; + const String apiUrl = '$baseUrl/api/reset_password'; + + try { + final response = await http.post(Uri.parse(apiUrl), + headers: { + 'Authorization': 'Bearer $token', + 'Content-Type': 'application/json', + }, + body: json.encode(passwordData)); + if (response.statusCode == 401) { + LogoutService.logout(); + } + if (response.statusCode <= 209) { + setState(() { + isVisible = true; + issuccess = true; + responseMessage = "Password Changes Successfully"; + }); + print("success"); + Navigator.pushAndRemoveUntil( + context, + MaterialPageRoute( + builder: (context) => const LoginScreenF(false)), + (route) => false, + ); + } else { + setState(() { + isVisible = true; + responseMessage = "Incorrect Password"; + }); + print(response.statusCode); + } + } catch (e) { + throw Exception('Failed to Update: $e'); + } + } + }, + ), + ], + ); + } + + @override + void dispose() { + oldPasswordController.dispose(); + newPasswordController.dispose(); + reEnterNewPasswordController.dispose(); + super.dispose(); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/profileManagement/contact_us_f.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/profileManagement/contact_us_f.dart new file mode 100644 index 0000000..c071a0e --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/profileManagement/contact_us_f.dart @@ -0,0 +1,149 @@ +import 'package:flutter/material.dart'; + +import '../../utils/size_utils.dart'; +import '../../theme/app_style.dart'; +import '../../widgets/custom_button.dart'; +import '../../widgets/custom_messenger.dart'; +import '../../widgets/custom_text_form_field.dart'; + +class ContactUsScreenF extends StatefulWidget { + const ContactUsScreenF({super.key}); + + @override + State createState() => _ContactUsScreenFState(); +} + +class _ContactUsScreenFState extends State { + final Map formData = {}; + final _formKey = GlobalKey(); + @override + Widget build(BuildContext context) { + return SingleChildScrollView( + child: SafeArea( + child: Padding( + padding: EdgeInsets.symmetric(horizontal: 15), + child: Form( + key: _formKey, + child: Column( + children: [ + Padding( + padding: getPadding(top: 18), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text("Name", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: AppStyle.fieldlabel), + CustomTextFormField( + focusNode: FocusNode(), + hintText: "Please Enter Name", + onsaved: (value) => formData['name'] = value, + validator: (value) { + if (value == null || value.isEmpty) { + return 'Please Enter Name'; + } + return null; + }, + ) + ]), + ), + Padding( + padding: getPadding(top: 18), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text("Email Address", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: AppStyle.fieldlabel), + CustomTextFormField( + focusNode: FocusNode(), + hintText: "Please Enter Email", + onsaved: (value) => formData['email'] = value, + validator: (value) { + if (value == null || value.isEmpty) { + return 'Please Enter Email'; + } + return null; + }, + ) + ]), + ), + Padding( + padding: getPadding(top: 18), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text("Subject", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: AppStyle.fieldlabel), + CustomTextFormField( + focusNode: FocusNode(), + hintText: "Please Enter Subject", + onsaved: (value) => formData['subject'] = value, + validator: (value) { + if (value == null || value.isEmpty) { + return 'Please Enter Subject'; + } + return null; + }, + ) + ]), + ), + Padding( + padding: getPadding(top: 18), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text("Message", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: AppStyle.fieldlabel), + CustomTextFormField( + maxLines: 4, + focusNode: FocusNode(), + hintText: "Please Enter Your Message", + onsaved: (value) => formData['message'] = value, + validator: (value) { + if (value == null || value.isEmpty) { + return 'Please Enter Message'; + } + return null; + }, + ) + ]), + ), + const SizedBox( + height: 220, + ), + CustomButton( + onTap: () { + if (_formKey.currentState!.validate()) { + _formKey.currentState!.save(); + ScaffoldMessenger.of(context).showSnackBar( + ShowSnackAlert.CustomMessenger( + context, + Colors.green.shade600, + Colors.green.shade900, + 'You will be Reverted Shortly')); + setState(() { + _formKey.currentState!.reset(); + }); + } + }, + height: 50, + text: 'Submit', + ) + ], + ), + ), + )), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/profileManagement/policy_details_page.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/profileManagement/policy_details_page.dart new file mode 100644 index 0000000..845fe17 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/profileManagement/policy_details_page.dart @@ -0,0 +1,25 @@ +import 'package:flutter/material.dart'; + +import '../../widgets/app_bar/appbar_title.dart'; +import '../../widgets/app_bar/custom_app_bar.dart'; + +class PolicyDetails extends StatelessWidget { + final String data; + final String title; + const PolicyDetails({super.key, required this.data, required this.title}); + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: CustomAppBar( + height: 50, + title: AppbarTitle(text: title), + centerTitle: true, + ), + body: Padding( + padding: EdgeInsets.all(15), + child: SingleChildScrollView(child: Text(data)), + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/profileManagement/profile_settings_f.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/profileManagement/profile_settings_f.dart new file mode 100644 index 0000000..a319631 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/profileManagement/profile_settings_f.dart @@ -0,0 +1,430 @@ +import 'dart:convert'; +import 'dart:typed_data'; + +import 'package:base_project/core/app_export.dart'; +import 'package:flutter/material.dart'; +import 'package:image_picker/image_picker.dart'; +import 'package:http/http.dart' as http; + +import '../../core/utils/image_constant.dart'; +import '../../providers/token_manager.dart'; +import '../../resources/api_constants.dart'; +import '../../widgets/app_bar/appbar_title.dart'; +import '../../widgets/custom_icon_button.dart'; +import '../../widgets/custom_image_view.dart'; +import '../../widgets/custom_text_form_field.dart'; +import '../Login Screen/CustomButton.dart'; +import '../Login Screen/login_screen_f.dart'; +import '../LogoutService/Logoutservice.dart'; +import '../ReuseableWidgets/BottomAppBarWidget.dart'; +import 'apiserviceprofilemanagement.dart'; + +class ProfileSettingsScreenF extends StatefulWidget { + final Map userData; + + ProfileSettingsScreenF({required this.userData}); + + @override + _ProfileSettingsScreenFState createState() => _ProfileSettingsScreenFState(); +} + +class _ProfileSettingsScreenFState extends State { + ApiServiceProfileManagement apiService = ApiServiceProfileManagement(); + Uint8List? _imageBytes; + String? _imageFileName; + bool isLoading = false; + final _formKey = GlobalKey(); + + TextEditingController fullNameController = TextEditingController(); + TextEditingController pronounsController = TextEditingController(); + TextEditingController roleController = TextEditingController(); + TextEditingController departmentController = TextEditingController(); + TextEditingController emailController = TextEditingController(); + TextEditingController aboutMeController = TextEditingController(); + + @override + void initState() { + super.initState(); + fetchProfileImageData(); + fetchUserProfileData(); + } + + Future _uploadImageFile() async { + final imagePicker = ImagePicker(); + try { + final pickedImage = + await imagePicker.pickImage(source: ImageSource.gallery); + if (pickedImage != null) { + final imageBytes = await pickedImage.readAsBytes(); + setState(() { + _imageBytes = imageBytes; + _imageFileName = pickedImage.name; + }); + } + } catch (e) { + print(e); + _showErrorDialog('Failed to pick image'); + } + } + + Future fetchUserProfileData() async { + setState(() { + isLoading = true; + }); + final token = await TokenManager.getToken(); + const String baseUrl = ApiConstants.baseUrl; + const String apiUrl = '$baseUrl/api/user-profile'; + try { + final response = await http.get( + Uri.parse(apiUrl), + headers: { + 'Authorization': 'Bearer $token', + }, + ); + if (response.statusCode == 401) { + LogoutService.logout(); + } + if (response.statusCode >= 200 && response.statusCode <= 209) { + final Map jsonData = json.decode(response.body); + setState(() { + fullNameController.text = jsonData['fullName'] ?? ''; + pronounsController.text = jsonData['pronouns'] ?? ''; + roleController.text = jsonData['role'] ?? ''; + departmentController.text = jsonData['department'] ?? ''; + emailController.text = jsonData['email'] ?? ''; + aboutMeController.text = jsonData['about'] ?? ''; + isLoading = false; + }); + } else { + throw Exception('Failed to load data: ${response.statusCode}'); + } + } catch (e) { + setState(() { + isLoading = false; + }); + _showErrorDialog('Failed to load profile data: $e'); + } + } + + Future fetchProfileImageData() async { + final token = await TokenManager.getToken(); + const String baseUrl = ApiConstants.baseUrl; + const String apiUrl = '$baseUrl/api/retrieve-image'; + + print('Image URL: $apiUrl'); + try { + final response = await http.get( + Uri.parse(apiUrl), + headers: { + 'Authorization': 'Bearer $token', + }, + ); + if (response.statusCode == 401) { + LogoutService.logout(); + } + if (response.statusCode >= 200 && response.statusCode <= 209) { + String responseData = + response.body.replaceAll('"}', ''); // Remove trailing '"}' + print("Response: $responseData"); + // Find the index of the comma (",") after the prefix + final commaIndex = responseData.indexOf(','); + if (commaIndex != -1) { + final imageData = responseData.substring(commaIndex + 1); + // Decode base64-encoded image data + final bytes = base64Decode(imageData); + setState(() { + _imageBytes = bytes; + }); + print('Image data is decoded.'); + } else { + print('Invalid image data format'); + } + } else { + print('Failed to load image data: ${response.statusCode}'); + } + } catch (e) { + print('Error fetching image data: $e'); + } + } + + Future _submitImage() async { + if (_imageBytes == null || _imageFileName == null) { + _showErrorDialog('Please select an image first.'); + return; + } + try { + final token = await TokenManager.getToken(); + await apiService.createFile(_imageBytes!, _imageFileName!, token!); + _showSuccessDialog('Image uploaded successfully'); + } catch (e) { + _showErrorDialog('Failed to upload image: $e'); + } + } + + Future _updateProfile() async { + if (_formKey.currentState!.validate()) { + final profileData = { + 'fullName': fullNameController.text, + 'email': emailController.text, + }; + + final token = await TokenManager.getToken(); + const String baseUrl = ApiConstants.baseUrl; + const String apiUrl = '$baseUrl/api/updateAppUser'; + try { + final response = await http.put( + Uri.parse(apiUrl), + headers: { + 'Authorization': 'Bearer $token', + 'Content-Type': 'application/json', + }, + body: json.encode(profileData), + ); + if (response.statusCode == 401) { + LogoutService.logout(); + } + if (response.statusCode <= 209) { + Navigator.of(context).pop(); + } else { + print(response.statusCode); + } + } catch (e) { + _showErrorDialog('Failed to update profile: $e'); + } + } + } + + Future _logoutUser() async { + try { + String logouturl = "${ApiConstants.baseUrl}/token/logout"; + var response = await http.get(Uri.parse(logouturl)); + if (response.statusCode <= 209) { + Navigator.pushAndRemoveUntil( + context, + MaterialPageRoute(builder: (context) => const LoginScreenF(false)), + (route) => false, + ); + } else { + _showErrorDialog('Failed to logout'); + } + } catch (error) { + _showErrorDialog('Error occurred during logout: $error'); + } + } + + Future _logoutAllSessions() async { + try { + String logouturl = "${ApiConstants.baseUrl}/token/logout/allsessions"; + var response = await http.get(Uri.parse(logouturl)); + if (response.statusCode <= 209) { + Navigator.pushAndRemoveUntil( + context, + MaterialPageRoute(builder: (context) => const LoginScreenF(false)), + (route) => false, + ); + } else { + _showErrorDialog('Failed to logout'); + } + } catch (error) { + _showErrorDialog('Error occurred during logout: $error'); + } + } + + void _showErrorDialog(String message) { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: const Text('Error'), + content: Text(message), + actions: [ + TextButton( + child: const Text('OK'), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ], + ); + }, + ); + } + + void _showSuccessDialog(String message) { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: const Text('Success'), + content: Text(message), + actions: [ + TextButton( + child: const Text('OK'), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ], + ); + }, + ); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + bottomNavigationBar: BottomAppBarWidget(), + body: SingleChildScrollView( + padding: const EdgeInsets.all(16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Align( + alignment: Alignment.centerLeft, + child: Row( + children: [ + Padding( + padding: EdgeInsets.only( + top: 9.v, + bottom: 6.v, + ), + child: CustomIconButton( + height: 32.adaptSize, + width: 32.adaptSize, + decoration: IconButtonStyleHelper.outlineIndigo, + onTap: () { + Navigator.pop(context); + }, + child: CustomImageView( + svgPath: ImageConstant.imgArrowleft, + ), + ), + ), + Padding( + padding: EdgeInsets.only(left: 80.adaptSize), + child: AppbarTitle(text: 'Edit Profile'), + ), + ], + ), + ), + const SizedBox(height: 24), + isLoading + ? const Center(child: CircularProgressIndicator()) + : GestureDetector( + onTap: _uploadImageFile, + child: Center( + child: Stack( + children: [ + CircleAvatar( + radius: 100, + backgroundImage: _imageBytes != null + ? MemoryImage(_imageBytes!) + : AssetImage(ImageConstant.editModel) + as ImageProvider, + ), + Positioned( + bottom: 0, + right: 5, + child: IconButton( + onPressed: _uploadImageFile, + icon: const Icon(Icons.camera_alt), + color: Colors.grey[800], + ), + ), + ], + ), + ), + ), + const SizedBox(height: 16), + Form( + key: _formKey, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const Text( + "Full Name", + style: TextStyle(color: Colors.black), + ), + CustomTextFormField( + controller: fullNameController, + hintText: 'Full Name', + validator: (value) => + value!.isEmpty ? 'Please enter your full name' : null, + ), + const SizedBox(height: 16), + const Text( + "Pronouns", + style: TextStyle(color: Colors.black), + ), + CustomTextFormField( + controller: pronounsController, + hintText: 'Pronouns', + ), + const SizedBox(height: 16), + const Text( + "Role", + style: TextStyle(color: Colors.black), + ), + CustomTextFormField( + controller: roleController, + hintText: 'Role', + ), + const SizedBox(height: 16), + const Text( + "Department", + style: TextStyle(color: Colors.black), + ), + CustomTextFormField( + controller: departmentController, + hintText: 'Department', + ), + const SizedBox(height: 16), + const Text( + "Email", + style: TextStyle(color: Colors.black), + ), + CustomTextFormField( + controller: emailController, + hintText: 'Email', + validator: (value) => + value!.isEmpty ? 'Please enter your email' : null, + ), + const SizedBox(height: 16), + const Text( + "About me", + style: TextStyle(color: Colors.black), + ), + CustomTextFormField( + controller: aboutMeController, + hintText: 'About Me', + maxLines: 3, + ), + const SizedBox(height: 24), + CustomButton( + text: 'Update Profile', + onTap: _updateProfile, + ), + const SizedBox(height: 16), + CustomButton( + text: 'Upload Image', + onTap: _submitImage, + ), + const SizedBox(height: 16), + CustomButton( + text: 'Logout', + onTap: _logoutUser, + ), + const SizedBox(height: 16), + CustomButton( + text: 'Logout All Sessions', + onTap: _logoutAllSessions, + ), + ], + ), + ), + ], + ), + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/settings_screen/credits_loading.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/settings_screen/credits_loading.dart new file mode 100644 index 0000000..fa4a8c1 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/settings_screen/credits_loading.dart @@ -0,0 +1,102 @@ +import 'package:fade_shimmer/fade_shimmer.dart'; +import 'package:flutter/material.dart'; + +Widget _creditsloadingTile(BuildContext context) { + List socialLinks = List.generate( + 6, + (index) => Container( + child: const FadeShimmer( + radius: 16.18, + height: 48, + width: 48, + fadeTheme: FadeTheme.light, + ), + padding: const EdgeInsets.all(2), + ), + ); + return Container( + width: MediaQuery.of(context).size.width - 10, + padding: const EdgeInsets.all(16), + decoration: BoxDecoration( + color: Colors.blueGrey.shade100.withOpacity(0.1618), + borderRadius: const BorderRadius.all(Radius.circular(16.18))), + margin: const EdgeInsets.symmetric(vertical: 3, horizontal: 6.18), + child: Wrap( + direction: Axis.vertical, + children: [ + Container( + width: MediaQuery.of(context).size.width - 48, + padding: const EdgeInsets.all(6.18), + child: Wrap( + alignment: WrapAlignment.spaceBetween, + children: [ + Wrap(direction: Axis.vertical, children: [ + Container( + child: const FadeShimmer( + radius: 16.18, + height: 27, + width: 96, + fadeTheme: FadeTheme.light, + ), + padding: const EdgeInsets.all(2), + ), + Container( + child: const FadeShimmer( + radius: 16.18, + height: 20, + width: 72, + fadeTheme: FadeTheme.light, + ), + padding: const EdgeInsets.all(2), + ), + ]), + Container( + child: const FadeShimmer( + radius: 16.18, + height: 64, + width: 64, + fadeTheme: FadeTheme.light, + ), + ), + ], + ), + ), + Container( + child: const FadeShimmer( + radius: 16.18, + height: 16, + width: 96, + fadeTheme: FadeTheme.light, + ), + padding: const EdgeInsets.all(2), + ), + Container( + height: 72, + width: MediaQuery.of(context).size.width - 48, + padding: const EdgeInsets.all(0), + color: Colors.transparent, + child: ListView.separated( + scrollDirection: Axis.horizontal, + itemBuilder: (_, index) => socialLinks[index], + separatorBuilder: (_, b) => const SizedBox( + width: 16.18, + ), + itemCount: socialLinks.length), + ) + ], + ), + ); +} + +Widget creditsLoadingList(int items, BuildContext context) { + return Padding( + padding: const EdgeInsets.symmetric(horizontal: 5), + child: ListView.builder( + padding: const EdgeInsets.all(0), + itemBuilder: (_, index) => Padding( + padding: const EdgeInsets.all(5), + child: _creditsloadingTile(context)), + itemCount: items, + ), + ); +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/signupF/SignUpService.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/signupF/SignUpService.dart new file mode 100644 index 0000000..fa4d9e3 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/signupF/SignUpService.dart @@ -0,0 +1,246 @@ +import 'package:dio/dio.dart'; +import 'package:flutter/material.dart'; +import 'package:fluttertoast/fluttertoast.dart'; + +import '../../providers/token_manager.dart'; +import '../../resources/api_constants.dart'; + +class SignUpApiService { + final String baseUrl = ApiConstants.baseUrl; + final Dio dio = Dio(); + +// get all account + Future>> getallAccount(String token) async { + try { + dio.options.headers['Authorization'] = 'Bearer $token'; + final response = await dio.get('$baseUrl/users/sysaccount/sysaccount'); + + final responseData = response.data; + + print('response data is ... $responseData'); + + if (responseData is List) { + // If the response is a list, cast it to the expected type + final entities = responseData.cast>(); + return entities; + } else if (responseData is Map) { + // If the response is a single object, wrap it in a list + return [responseData]; + } else { + // Handle other unexpected response types here + throw Exception('Unexpected response type'); + } + } catch (e) { + throw Exception('Failed to Account: $e'); + } + } + +// get all user + Future>> getallUser() async { + try { + final token = await TokenManager.getToken(); + dio.options.headers['Authorization'] = 'Bearer $token'; + final response = await dio.get('$baseUrl/api//token/getalluser'); + + final responseData = response.data; + + print('response data is ... $responseData'); + + if (responseData is List) { + // If the response is a list, cast it to the expected type + final entities = responseData.cast>(); + return entities; + } else if (responseData is Map) { + // If the response is a single object, wrap it in a list + return [responseData]; + } else { + // Handle other unexpected response types here + throw Exception('Unexpected response type'); + } + } catch (e) { + throw Exception('Failed to Get All User: $e'); + } + } + +// get by mobile Number + Future> getByMobNumber(String mobNo) async { + try { + // dio.options.headers['Authorization'] = 'Bearer $token'; + final response = + await dio.get('$baseUrl/api/getuser/mobile?mob_num=$mobNo'); + print(response.data); + + // return response.data; + return Future.delayed( + Duration(seconds: 2), + () => {'fullName': response.data['fullName']}, + ); + } catch (e) { + print('error is $e'); + throw Exception('Failed To Get User: $e'); + } + } + +// Create account + Future> createAccount( + Map entity) async { + print('sysaccout :$entity'); + try { + // dio.options.headers['Authorization'] = 'Bearer $token'; + final response = await dio + .post('$baseUrl/token/users/sysaccount/savesysaccount', data: entity); + + print(' created account is $response'); + return response.data; + } catch (e) { + print('error is $e'); + throw Exception('Failed To Create Account: $e'); + } + } + +// SEND EMAIL FOR OTP + Future sendEmail(Map entity) async { + try { + print("in post api...$entity"); + // dio.options.headers['Authorization'] = 'Bearer $token'; + final response = + await dio.post('$baseUrl/token/user/send_email', data: entity); + print(entity); + print('email response is: $response'); + + return response; + } catch (e) { + throw Exception('Failed to Send Email: $e'); + } + } + + // RESEND EMAIL FOR OTP + Future resendEmail(String email) async { + try { + print('resend otp start $baseUrl/token/user/resend_otp/email=$email'); + + // dio.options.headers['Authorization'] = 'Bearer $token'; + final response = + await dio.post('$baseUrl/token/user/resend_otp?email=$email'); + print('resend donee'); + print(response); + } catch (e) { + throw Exception('Failed to ReSend Email: $e'); + } + } + + // OTP VEFICATION + + Future otpVerification(String email, String otp) async { + try { + final response = await dio.post( + '$baseUrl/token/user/otp_verification', + queryParameters: {'email': email, 'otp': otp}, + ); + + if (response.statusCode == 200) { + Fluttertoast.showToast( + msg: "OTP verified successfully!", + toastLength: Toast.LENGTH_LONG, + gravity: ToastGravity.BOTTOM, + backgroundColor: Colors.green, + textColor: Colors.white, + ); + } else if (response.statusCode == 400) { + Fluttertoast.showToast( + msg: "Bad request: Wrong OTP", + toastLength: Toast.LENGTH_LONG, + gravity: ToastGravity.BOTTOM, + backgroundColor: Colors.red, + textColor: Colors.white, + ); + } else { + Fluttertoast.showToast( + msg: "Error: ${response.statusMessage}", + toastLength: Toast.LENGTH_LONG, + gravity: ToastGravity.BOTTOM, + backgroundColor: Colors.red, + textColor: Colors.white, + ); + } + + return response; + } catch (e) { + Fluttertoast.showToast( + msg: "Failed to Verify OTP: $e", + toastLength: Toast.LENGTH_LONG, + gravity: ToastGravity.BOTTOM, + backgroundColor: Colors.red, + textColor: Colors.white, + ); + throw Exception('Failed to Verify OTP: $e'); + } + } +// Future otpVerification(String email, String otp) async { +// try { +// final response = await dio.post( +// '$baseUrl/token/user/otp_verification', +// queryParameters: {'email': email, 'otp': otp}, +// ); + +// if (response.statusCode == 200) { +// Fluttertoast.showToast( +// msg: "OTP verified successfully!", +// toastLength: Toast.LENGTH_LONG, +// gravity: ToastGravity.BOTTOM, +// backgroundColor: Colors.green, +// textColor: Colors.white, +// ); +// } else if (response.statusCode == 400) { +// Fluttertoast.showToast( +// msg: "Bad request: Wrong OTP", +// toastLength: Toast.LENGTH_LONG, +// gravity: ToastGravity.BOTTOM, +// backgroundColor: Colors.red, +// textColor: Colors.white, +// ); +// } +// } catch (e) { +// Fluttertoast.showToast( +// msg: "Failed to Verify OTP: $e", +// toastLength: Toast.LENGTH_LONG, +// gravity: ToastGravity.BOTTOM, +// backgroundColor: Colors.red, +// textColor: Colors.white, +// ); +// } +// } + + Future createuser(Map entity) async { + //print("user......$token"); + print("user......$entity"); + try { + print("in post api...$entity"); + //dio.options.headers['Authorization'] = 'Bearer $token'; + await dio.post('$baseUrl/token/addOneAppUser', data: entity); + print(entity); + } catch (e) { + throw Exception('Failed to create User: $e'); + } + } + + Future updateUser( + String token, int entityId, Map entity) async { + try { + dio.options.headers['Authorization'] = 'Bearer $token'; + await dio.put('$baseUrl/api/updateAppUserDto/$entityId', data: entity); + print(entity); + } catch (e) { + throw Exception('Failed to update Backend: $e'); + } + } + + Future deleteUser(String token, int entityId) async { + try { + dio.options.headers['Authorization'] = 'Bearer $token'; + await dio.delete('$baseUrl/api/delete_usr/$entityId'); + } catch (e) { + throw Exception('Failed to delete User: $e'); + } + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/signupF/SignupScreenF.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/signupF/SignupScreenF.dart new file mode 100644 index 0000000..6ab991f --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/signupF/SignupScreenF.dart @@ -0,0 +1,616 @@ +// ignore_for_file: use_build_context_synchronously + +import 'package:base_project/core/app_export.dart'; +import 'package:confetti/confetti.dart'; +import 'package:flutter/material.dart'; +import 'package:fluttertoast/fluttertoast.dart'; +import 'package:google_fonts/google_fonts.dart'; +import 'package:pinput/pinput.dart'; +import '../../utils/color_constants.dart'; +import '../../utils/size_utils.dart'; +import '../../core/utils/image_constant.dart'; +import '../../theme/app_style.dart'; +import '../../widgets/custom_image_view.dart'; +import '../Login Screen/CustomButton.dart'; +import '../Login Screen/login_screen_f.dart'; +import 'SignUpService.dart'; +import '../../widgets/app_bar/appbar_image.dart'; +import '../../widgets/app_bar/appbar_title.dart'; +import '../../widgets/app_bar/custom_app_bar.dart'; +import 'registration_details_f.dart'; + +enum RegistrationStep { + SendOTP, + VerifyOTP, + EnterUserInfo, + SelectAccount, +} + +class SignupScreenF extends StatefulWidget { + const SignupScreenF({super.key}); + + @override + State createState() => _SignupState(); +} + +class _SignupState extends State { + final SignUpApiService userService = SignUpApiService(); + + final GlobalKey _scaffoldKey = GlobalKey(); + final Map formData = {}; + final _formKey = GlobalKey(); + + var selectedAccount; + TextEditingController emailcontroller = TextEditingController(); + var email; + var otp; + var confirmPassword; + + bool _passwordVisible = false; + bool _isPasswordValid = true; + void _validatePassword(String password) { + setState(() { + _isPasswordValid = password.isNotEmpty; + }); + } + + bool agree_tc = false; + bool agree_userlicence = false; + + RegistrationStep currentStep = RegistrationStep.SendOTP; + + void moveToNextStep() { + setState(() { + if (currentStep == RegistrationStep.SendOTP) { + currentStep = RegistrationStep.VerifyOTP; + } else if (currentStep == RegistrationStep.VerifyOTP) { + currentStep = RegistrationStep.EnterUserInfo; + } else if (currentStep == RegistrationStep.EnterUserInfo) { + currentStep = RegistrationStep.SelectAccount; + } + }); + } + + void showSuccessMessage(String message) { + ScaffoldMessenger.of(context).showSnackBar( + SnackBar( + content: Text(message), + duration: const Duration(seconds: 2), + backgroundColor: Colors.green, + ), + ); + } + + void showErrorMessage(String error) { + ScaffoldMessenger.of(context).showSnackBar( + SnackBar( + content: Text(error), + duration: const Duration(seconds: 2), + backgroundColor: Colors.red, + ), + ); + } + + Future _sendEmail(Map formData) async { + final response = await userService.sendEmail(formData); + + print('response is: $response'); + + if (response == 'Otp send successfully') { + // Update invite status and show snack bar + + _showCustomSnackBar2(context, 'Otp send successfully!', true); + } else if (response == '${formData['email']} already exist') { + // Update invite status and show snack bar + + _showCustomSnackBar2( + context, '${formData['email']} already exist!', false); + } else { + // Handle failed invite + _showCustomSnackBar2(context, 'Failed to send Email.', false); + } + } + + void _showCustomSnackBar2( + BuildContext context, String message, bool isSuccess) { + final overlay = Overlay.of(context); + final confettiController = + ConfettiController(duration: const Duration(seconds: 2)); + + final overlayEntry = OverlayEntry( + builder: (context) => Stack( + children: [ + Center( + child: Material( + color: Colors.transparent, + child: Container( + padding: + const EdgeInsets.symmetric(horizontal: 16.0, vertical: 8.0), + decoration: BoxDecoration( + color: isSuccess ? Colors.white : Colors.red.withOpacity(0.8), + borderRadius: BorderRadius.circular(8.0), + boxShadow: const [ + BoxShadow( + color: Colors.black26, + blurRadius: 10.0, + offset: Offset(0, 4), + ), + ], + ), + child: Text( + message, + style: TextStyle( + color: isSuccess ? Colors.black : Colors.white, + fontSize: 16.0, + ), + ), + ), + ), + ), + if (isSuccess) + Center( + child: ConfettiWidget( + confettiController: confettiController, + blastDirectionality: BlastDirectionality.explosive, + shouldLoop: false, + colors: const [ + Colors.red, + Colors.green, + Colors.blue, + Colors.yellow, + Colors.purple, + Colors.orange, + ], + ), + ), + ], + ), + ); + + overlay.insert(overlayEntry); + + if (isSuccess) { + confettiController.play(); + } + + Future.delayed(const Duration(seconds: 3), () { + overlayEntry.remove(); + confettiController.dispose(); + }); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + //backgroundColor: Color.fromARGB(255, 233, 229, 249), + key: _scaffoldKey, + appBar: CustomAppBar( + height: getVerticalSize(54), + leadingWidth: 40, + leading: AppbarImage( + height: getSize(24), + width: getSize(24), + svgPath: ImageConstant.imgArrowleft, + margin: getMargin(left: 16, top: 13, bottom: 17), + onTap: () { + Navigator.pop(context); + }), + centerTitle: true, + title: AppbarTitle(text: "Create an Account")), + body: Builder(builder: (ctx) { + return SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.all(15), + child: Form( + key: _formKey, + child: SizedBox( + height: MediaQuery.of(context).size.height, + child: ListView.builder( + itemCount: 1, + itemBuilder: (ctx, index) { + if (currentStep == RegistrationStep.SendOTP) { + return Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Column( + children: [ + // Container( + // height: 170, + // width: 170, + // child: Image.asset( + // 'assets/images/Transparent .png'), + // ), + CustomImageView( + imagePath: + ImageConstant.imgImageRemovebgPreview, + height: 59.v, + width: 382.h, + ), + const SizedBox( + height: 20, + ), + Container( + alignment: Alignment.topCenter, + child: Text('Welcome to CricYard', + style: GoogleFonts.bebasNeue().copyWith( + fontSize: 24, + fontWeight: FontWeight.w300, + color: ColorConstant.black90001)), + ), + const SizedBox(height: 25), + Container( + margin: const EdgeInsets.symmetric( + horizontal: 25), + alignment: Alignment.centerLeft, + child: const SizedBox( + child: Text( + 'Enter Your Email Address', + style: TextStyle( + fontSize: 16, + color: Colors.black, + fontWeight: FontWeight.w400), + ), + ), + ), + const SizedBox(height: 12), + InkWell( + child: Container( + height: 50, + margin: const EdgeInsets.symmetric( + horizontal: 25), + decoration: BoxDecoration( + borderRadius: + BorderRadius.circular(10), + border: + Border.all(color: Colors.white), + color: Colors.white), + child: TextFormField( + controller: emailcontroller, + keyboardType: + TextInputType.emailAddress, + validator: (value) { + if (value!.isEmpty || + value == null) { + return 'enter email address'; + } + return null; + }, + decoration: InputDecoration( + border: InputBorder.none, + hintText: 'Email Address', + hintStyle: TextStyle( + color: Colors.black + .withOpacity(.2)))), + ), + ), + const SizedBox(height: 250), + ], + ), + Column( + children: [ + CustomButton( + text: 'Send OTP', + textStyle: const TextStyle( + fontSize: 20, + fontWeight: FontWeight.w500, + color: Colors.white), + height: 50, + width: 400, + onTap: () async { + if (_formKey.currentState!.validate()) { + _formKey.currentState!.save(); + email = emailcontroller.text; + formData['usrGrpId'] = 1; + formData['email'] = + emailcontroller.text; + try { + print('send email data is $formData'); + + // await userService.sendEmail(formData); + // _sendEmail(formData); + final response = await userService + .sendEmail(formData); + + print('response is: $response'); + + if (response.statusCode == 200) { + // Update invite status and show snack bar + + _showCustomSnackBar2(context, + 'Otp send successfully!', true); + } else if (response.statusCode == + '${formData['email']} already exist') { + // Update invite status and show snack bar + + _showCustomSnackBar2( + context, + '${formData['email']} already exist!', + false); + } else if (response.statusCode == + 500) { + // Update invite status and show snack bar + + _showCustomSnackBar2(context, + 'Invalid Email!', false); + } else { + // Handle failed invite + _showCustomSnackBar2(context, + 'Failed to send Email.', false); + } + + await Future.delayed( + const Duration(seconds: 2)); + + if (response.statusCode == 200) + moveToNextStep(); + } catch (e) { + showErrorMessage( + 'Failed to send OTP: $e'); + } + } + }, + ), + const SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text('Already Have an Account ?', + style: TextStyle( + fontSize: 18, + fontWeight: FontWeight.w400, + color: Colors.black + .withOpacity(.6))), + InkWell( + child: Text(' Login', + style: TextStyle( + fontSize: 18, + fontWeight: FontWeight.w400, + color: + ColorConstant.purple211)), + onTap: () { + Navigator.of(context).push( + MaterialPageRoute( + builder: (ctx) => + const LoginScreenF( + false))); + }, + ), + ], + ), + ], + ) + ], + ); + } else if (currentStep == RegistrationStep.VerifyOTP) { + return SingleChildScrollView( + child: Form( + child: Column( + children: [ + const SizedBox( + height: 20, + ), + // Container( + // height: 220, + // width: 220, + // child: Image.asset( + // 'assets/images/forget-password.png'), + // ), + const SizedBox(height: 12), + Container( + child: Column( + children: [ + Text( + 'OTP verification', + style: TextStyle( + fontSize: 22, + fontWeight: FontWeight.bold, + color: ColorConstant.black90001), + ), + const SizedBox( + height: 8, + ), + Text( + style: TextStyle( + color: + Colors.black.withOpacity(.6)), + "A mail with a 6-digit verification code was just sent to $email", + maxLines: null, + textAlign: TextAlign.center, + ), + ], + ), + ), + const SizedBox( + height: 30, + ), + Row(children: [ + Checkbox( + activeColor: ColorConstant.blueA700, + value: agree_tc, + onChanged: (newValue) { + setState(() { + agree_tc = newValue!; + }); + }, + ), + Text( + "you agree to our Terms and Privacy Policy.", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: AppStyle + .txtGilroyMedium16Bluegray900), + ]), + Row(children: [ + Checkbox( + activeColor: ColorConstant.blueA700, + value: agree_userlicence, + onChanged: (newValue) { + setState(() { + agree_userlicence = newValue!; + }); + }, + ), + Text("you agree to our User Licence.", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: AppStyle + .txtGilroyMedium16Bluegray900), + ]), + const SizedBox( + height: 20, + ), + Pinput( + length: 6, + showCursor: true, + defaultPinTheme: PinTheme( + width: 50, + height: 50, + decoration: BoxDecoration( + boxShadow: const [ + BoxShadow( + color: Colors.white, + ) + ], + color: + const Color.fromARGB(206, 70, 15, 15), + borderRadius: BorderRadius.circular(10), + border: Border.all(color: Colors.white), + ), + textStyle: const TextStyle( + fontSize: 20, + fontWeight: FontWeight.w600, + ), + ), + onCompleted: (value) { + setState(() { + otp = value; + }); + }, + ), + const SizedBox( + height: 30, + ), + const Text( + 'Your OTP expires in 120 seconds', + style: TextStyle( + fontWeight: FontWeight.w700, + color: Colors.blueAccent, + ), + ), + Container( + alignment: Alignment.center, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const Text( + 'Didnt Recieve OTP', + style: TextStyle( + fontWeight: FontWeight.w700, + color: Colors.blueAccent, + ), + ), + const SizedBox( + width: 5, + ), + InkWell( + onTap: () async { + try { + await userService + .resendEmail(email); + + await Future.delayed( + const Duration(seconds: 5)); + showSuccessMessage('OTP RESEND'); + } catch (e) { + showErrorMessage( + 'Failed to resend OTP: $e'); + } + }, + child: Text( + 'Resend', + style: TextStyle( + fontWeight: FontWeight.w700, + color: Colors.purple.shade900), + ), + ) + ], + ), + ), + const SizedBox(height: 10), + CustomButton( + height: 50, + width: 400, + onTap: () async { + if (agree_tc && agree_userlicence) { + try { + print( + 'email is $email and otp is $otp'); + final response = + await userService.otpVerification( + emailcontroller.text, otp); + + if (response.statusCode == 200) { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + RegstrationDetailsF( + email: + emailcontroller.text), + ), + ); + moveToNextStep(); + showSuccessMessage( + 'Email verified successfully'); + } + } catch (e) { + showErrorMessage( + 'Failed to verify OTP: $e'); + } + } else { + Fluttertoast.showToast( + msg: + 'Please First Agree terms and Conditions', + backgroundColor: Colors.red, + ); + } + }, + text: 'Submit', + textStyle: const TextStyle( + fontSize: 20, + fontWeight: FontWeight.w500, + color: Colors.white), + ) + ], + )), + ); + } else if (currentStep == + RegistrationStep.EnterUserInfo) { + return Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + CustomButton( + text: "Registration Details", + height: 50, + width: 400, + onTap: () async { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => RegstrationDetailsF( + email: emailcontroller.text), + ), + ); + }, + ) + ], + ); + } + }), + )), + )); + })); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/signupF/after_signup_welcome_pade_f.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/signupF/after_signup_welcome_pade_f.dart new file mode 100644 index 0000000..4481b21 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/signupF/after_signup_welcome_pade_f.dart @@ -0,0 +1,221 @@ +import 'dart:convert'; + +import 'package:flutter/material.dart'; +import 'package:google_fonts/google_fonts.dart'; +import 'package:shared_preferences/shared_preferences.dart'; + +import '../../utils/image_constant.dart'; +import '../../utils/size_utils.dart'; +import '../../widgets/app_bar/appbar_image.dart'; +import '../../widgets/app_bar/appbar_title.dart'; +import '../../widgets/app_bar/custom_app_bar.dart'; + +import '../../widgets/custom_messenger.dart'; +import '../Login Screen/CustomButton.dart'; +import '../Login Screen/login_screen_f.dart'; + +class SuccessScreenF extends StatefulWidget { + final String packageName; + + SuccessScreenF({required this.packageName}); + + @override + State createState() => _SuccessScreenFState(); +} + +class _SuccessScreenFState extends State { + List selectedWorkButtons = []; + + List selectedRoleButtons = []; + + List selectedSourceButtons = []; + + List selectedBuildingPurpose = []; + Map userData = {}; + + getUserData() async { + SharedPreferences prefs = await SharedPreferences.getInstance(); + var userdatastr = prefs.getString('userData'); + if (userdatastr != null) { + try { + setState(() { + userData = json.decode(userdatastr); + }); + print(userData['token']); + } catch (e) { + print("error is ..................$e"); + } + } + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: CustomAppBar( + height: getVerticalSize(49), + leadingWidth: 40, + centerTitle: true, + title: AppbarTitle( + text: "Welcome to CricYard!", + )), + body: SingleChildScrollView( + child: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + 'How do you know about us', + style: GoogleFonts.poppins() + .copyWith(fontSize: 20, fontWeight: FontWeight.bold), + ), + // buildQuestion( + // 'Where do you work?*', + // [ + // 'Startup', + // 'Freelancer', + // 'Design Agency', + // 'Large Company', + // 'Dev Shop', + // 'Small/Medium Company', + // 'Other' + // ], + // selectedWorkButtons, + // ), + // buildQuestion( + // 'What is your primary role?*', + // [ + // 'Executive', + // 'Founder', + // 'Developer', + // 'Product Manager', + // 'Designer', + // 'Other' + // ], + // selectedRoleButtons, + // ), + buildQuestion( + 'How did you hear about us?*', + [ + 'LinkedIn', + 'YouTube', + 'Twitter', + 'Flutter Forword', + 'Search', + 'TikTok', + 'Friend/Coworker', + 'Other' + ], + selectedSourceButtons, + ), + // buildQuestion( + // 'Are you building the app for yourself or for your job?*', + // ['Myself', 'My Job'], + // selectedBuildingPurpose, + // ), + SizedBox(height: 20), + Padding( + padding: const EdgeInsets.all(8.0), + child: CustomButton( + height: getVerticalSize(50), + text: "Continue", + width: 400, + onTap: () async { + print('Work: $selectedWorkButtons'); + print('Role: $selectedRoleButtons'); + print('Source: $selectedSourceButtons'); + print('Building Purpose: $selectedBuildingPurpose'); + ScaffoldMessenger.of(context).showSnackBar( + ShowSnackAlert.CustomMessenger( + context, + Colors.green.shade600, + Colors.green.shade900, + 'User Created Successfully ')); + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (context) => + // const LoginScreen())); + Navigator.pushAndRemoveUntil( + context, + MaterialPageRoute( + builder: (context) => const LoginScreenF(true)), + (Route route) => false, + ); + }, + ), + ), + ], + ), + ), + ), + ); + } + + void showSuccessMessage(String message) { + ScaffoldMessenger.of(context).showSnackBar( + SnackBar( + content: Text(message), + duration: const Duration(seconds: 2), + backgroundColor: Colors.green, + ), + ); + } + + Widget buildQuestion( + String heading, List options, List selectedButtons) { + return Padding( + padding: const EdgeInsets.fromLTRB(50.0, 10, 50, 2), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox(height: 16), + Text( + heading, + style: GoogleFonts.poppins().copyWith( + fontSize: 16, + fontWeight: FontWeight.bold, + ), + ), + SizedBox(height: 8), + Wrap( + spacing: 8.0, + runSpacing: 8.0, + children: options.map((option) { + bool isSelected = selectedButtons.contains(option); + return ElevatedButton( + onPressed: () { + setState(() { + if (isSelected) { + selectedButtons.remove(option); + } else { + selectedButtons.add(option); + } + }); + }, + style: ButtonStyle( + backgroundColor: MaterialStateProperty.all(isSelected + ? Color.fromARGB(255, 147, 78, 225) + : Color.fromARGB(255, 222, 199, 240)), + shape: MaterialStateProperty.all( + RoundedRectangleBorder( + borderRadius: BorderRadius.circular( + 15.0), // Adjust the value as needed + ), + ), + ), + child: Text( + option, + style: GoogleFonts.poppins().copyWith( + fontSize: 14, + fontWeight: FontWeight.w400, + color: isSelected ? Colors.white : Colors.black), + ), + ); + }).toList(), + ), + ], + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/signupF/choose_package_screen.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/signupF/choose_package_screen.dart new file mode 100644 index 0000000..26d25a3 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/signupF/choose_package_screen.dart @@ -0,0 +1,234 @@ +import 'dart:convert'; + +import 'package:flutter/material.dart'; +import 'package:google_fonts/google_fonts.dart'; +import 'package:http/http.dart' as http; +import '../../utils/color_constants.dart'; +import '../../utils/image_constant.dart'; +import '../../utils/size_utils.dart'; +import '../../resources/api_constants.dart'; +import '../../theme/app_style.dart'; +import '../../widgets/app_bar/appbar_image.dart'; +import '../../widgets/app_bar/appbar_title.dart'; +import '../../widgets/app_bar/custom_app_bar.dart'; + +import '../Login Screen/CustomButton.dart'; +import 'after_signup_welcome_pade_f.dart'; + +class PlanSelectionScreen extends StatefulWidget { + const PlanSelectionScreen({super.key}); + + @override + _PlanSelectionScreenState createState() => _PlanSelectionScreenState(); +} + +class _PlanSelectionScreenState extends State { + List> packages = []; + bool isMonthly = true; + + @override + void initState() { + super.initState(); + fetchData(); + } + + Future fetchData() async { + final response = await http.get(Uri.parse( + "${ApiConstants.baseUrl}/token/SubscriptionPackage/SubscriptionPackage")); + + if (response.statusCode <= 209) { + final List data = jsonDecode(response.body); + setState(() { + packages = List>.from(data); + }); + } else { + print('Failed to load data: ${response.statusCode}'); + } + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: CustomAppBar( + height: getVerticalSize(49), + leadingWidth: 40, + leading: AppbarImage( + height: getSize(24), + width: getSize(24), + svgPath: ImageConstant.imgArrowleftBlueGray900, + margin: getMargin(left: 16, top: 12, bottom: 13), + onTap: () { + Navigator.pop(context); + }), + centerTitle: true, + title: AppbarTitle(text: "Choose A Plan")), + body: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Row(children: [ + Text(!isMonthly ? 'Annual Plans' : 'Monthly Plans', + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: AppStyle.txtGilroyBold18Bluegray900), + Transform.scale( + scale: 0.7, // Adjust the scale factor as needed + child: Switch( + activeColor: ColorConstant.purple900, + value: isMonthly, + onChanged: (newValue) { + setState(() { + isMonthly = newValue; + }); + }, + ), + ), + ]), + ), + Expanded( + child: ListView.builder( + itemCount: packages.length, + itemBuilder: (context, index) { + final package = packages[index]; + return PackageCart( + package: package, isMonthly: isMonthly, index: index); + }, + ), + ), + ], + ), + ); + } +} + +class PackageCart extends StatefulWidget { + final Map package; + final bool isMonthly; + final int index; + + PackageCart( + {required this.package, required this.isMonthly, required this.index}); + + @override + State createState() => _PackageCartState(); +} + +class _PackageCartState extends State { + @override + void initState() { + super.initState(); + fetchData(widget.package['id']); + } + + List> dataforlist = []; + + Future fetchData(int id) async { + final response = await http.get(Uri.parse( + "${ApiConstants.baseUrl}/token/Billing/PackageService/bysubscriptionPkgId/$id")); + + if (response.statusCode <= 209) { + final List data = jsonDecode(response.body); + setState(() { + dataforlist = List>.from(data); + }); + } else { + print('Failed to load data: ${response.statusCode}'); + } + } + + @override + Widget build(BuildContext context) { + final price = widget.isMonthly + ? widget.package['monthlyPrice'] + : widget.package['annuallyPrice']; + + return Card( + color: widget.index % 2 == 0 + ? Color.fromARGB(255, 234, 217, 246) + : Color.fromARGB(255, 235, 210, 239), + margin: EdgeInsets.all(16.0), + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + widget.package['packageName'], + style: GoogleFonts.poppins() + .copyWith(fontSize: 20, fontWeight: FontWeight.bold), + ), + const SizedBox(height: 8.0), + Text( + widget.package['description'], + style: GoogleFonts.poppins().copyWith( + color: ColorConstant.blueGray900, + fontSize: getFontSize( + 16, + ), + fontWeight: FontWeight.w500, + ), + ), + const SizedBox(height: 8.0), + Text( + 'Discount: ${widget.package['discountedComment']}', + style: AppStyle.txtGilroyMedium14Bluegray400, + ), + const SizedBox(height: 8.0), + Text( + widget.package['packageName'] == 'ENTERPRISE' + ? '$price' + : '₹ $price', + style: const TextStyle(fontSize: 26, fontWeight: FontWeight.bold), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: CustomButton( + height: getVerticalSize(50), + text: "Get Started", + onTap: () async { + print('Selected Package: ${widget.package['packageName']}'); + print('Selected Price: $price'); + // Navigate to a new screen on success + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => SuccessScreenF( + packageName: widget.package['packageName']), + ), + ); + }, + ), + ), + Column( + children: [ + Text( + widget.package['packageName'] + " plan features :", + style: AppStyle.txtGilroyMedium16Black90001, + ), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: forFeatures(dataforlist), + ), + ], + ) + ], + ), + ), + ); + } + + List forFeatures(List> featureList) { + return featureList.map((feature) { + return buildRichText('✓${feature['name']}'); + }).toList(); + } + + Widget buildRichText(String text) { + return Text( + text, + style: AppStyle.txtGilroyMedium12Bluegray400, + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/signupF/create_account_f.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/signupF/create_account_f.dart new file mode 100644 index 0000000..c4d03db --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/signupF/create_account_f.dart @@ -0,0 +1,346 @@ +import 'package:flutter/material.dart'; + +import '../../utils/image_constant.dart'; +import '../../utils/size_utils.dart'; +import '../../widgets/app_bar/appbar_image.dart'; +import '../../widgets/app_bar/appbar_title.dart'; +import '../../widgets/app_bar/custom_app_bar.dart'; +import '../../widgets/custom_textformfield.dart'; +import '../Login Screen/CustomButton.dart'; +import 'SignUpService.dart'; + +class CreateAccountF extends StatefulWidget { + const CreateAccountF({super.key}); + + @override + State createState() => _CreateAccountFState(); +} + +class _CreateAccountFState extends State { + final SignUpApiService userService = SignUpApiService(); + + final Map formData = {}; + final _formKey = GlobalKey(); + + late BuildContext _context; // Store the current context + late var account_id; // Store the account_id + + bool _isEmailValid = true; + void _validateEmail(String email) { + setState(() { + _isEmailValid = + RegExp(r'^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$').hasMatch(email); + }); + } + + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + _context = context; + return Scaffold( + appBar: CustomAppBar( + height: getVerticalSize(54), + leadingWidth: 40, + leading: AppbarImage( + height: getSize(24), + width: getSize(24), + svgPath: ImageConstant.imgArrowleft, + margin: getMargin(left: 16, top: 13, bottom: 17), + onTap: () { + Navigator.pop(context); + }), + centerTitle: true, + title: AppbarTitle(text: "Create Account")), + body: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.all(20.0), + child: Form( + key: _formKey, + child: Column( + children: [ + Padding( + padding: getPadding(top: 19), + child: const SizedBox( + width: double.infinity, + child: Text( + "Company Name", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.w700, color: Colors.black), + ), + )), + CustomTextField( + hintText: 'Enter Company Name', + onSaved: (value) => formData['companyName'] = value, + validator: (value) { + if (value == null || value.isEmpty) { + return 'Please enter Company Name'; + } + return null; + }, + ), + Padding( + padding: getPadding(top: 19), + child: const SizedBox( + width: double.infinity, + child: Text( + "Email", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.w700, color: Colors.black), + ), + )), + CustomTextField( + hintText: 'Enter Email', + onSaved: (value) => formData['email'] = value, + onChanged: _validateEmail, + validator: (value) { + if (value == null || value.isEmpty) { + return 'Please enter Email'; + } else if (!_isEmailValid) { + return 'Please enter a valid email'; + } + return null; + }, + ), + Padding( + padding: getPadding(top: 19), + child: const SizedBox( + width: double.infinity, + child: Text( + "Mobile Number", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.w700, color: Colors.black), + ), + )), + CustomTextField( + hintText: 'Enter Mobile Number', + onSaved: (value) => formData['mobile'] = value, + validator: (value) { + if (value == null || value.isEmpty) { + return 'Please enter Mob No'; + } + return null; + }, + ), + Padding( + padding: getPadding(top: 19), + child: const SizedBox( + width: double.infinity, + child: Text( + "Workspace", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.w700, color: Colors.black), + ), + )), + CustomTextField( + onSaved: (value) => formData['workspace'] = value, + validator: (value) { + if (value == null || value.isEmpty) { + return 'Please enter Workspace'; + } + return null; + }, + hintText: "enter Workspace", + ), + Padding( + padding: getPadding(top: 19), + child: const SizedBox( + width: double.infinity, + child: Text( + "GST no.", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.w700, color: Colors.black), + ), + )), + CustomTextField( + onSaved: (value) => formData['gstNumber'] = value, + validator: (value) { + if (value == null || value.isEmpty) { + return 'Please enter Gst Number'; + } + return null; + }, + hintText: "enter Gst Number", + ), + Padding( + padding: getPadding(top: 19), + child: const SizedBox( + width: double.infinity, + child: Text( + "PAN card ", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.w700, color: Colors.black), + ), + )), + CustomTextField( + onSaved: (value) => formData['pancard'] = value, + validator: (value) { + if (value == null || value.isEmpty) { + return 'Please enter Pancard'; + } + return null; + }, + hintText: "enter pancard", + ), + Padding( + padding: getPadding(top: 19), + child: const SizedBox( + width: double.infinity, + child: Text( + "Country", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.w700, color: Colors.black), + ), + )), + CustomTextField( + onSaved: (value) => formData['country'] = value, + validator: (value) { + if (value == null || value.isEmpty) { + return 'Please enter Country'; + } + return null; + }, + hintText: "enter Country", + ), + Padding( + padding: getPadding(top: 19), + child: const SizedBox( + width: double.infinity, + child: Text( + "State/Province", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.w700, color: Colors.black), + ), + )), + CustomTextField( + onSaved: (value) => formData['state'] = value, + validator: (value) { + if (value == null || value.isEmpty) { + return 'Please enter State'; + } + return null; + }, + hintText: "Enter State", + ), + Padding( + padding: getPadding(top: 19), + child: const SizedBox( + width: double.infinity, + child: Text( + "City", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.w700, color: Colors.black), + ), + )), + CustomTextField( + onSaved: (value) => formData['city'] = value, + validator: (value) { + if (value == null || value.isEmpty) { + return 'Please enter City'; + } + return null; + }, + hintText: "Enter City", + ), + Padding( + padding: getPadding(top: 19), + child: const SizedBox( + width: double.infinity, + child: Text( + "Working ", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.w700, color: Colors.black), + ), + )), + CustomTextField( + onSaved: (value) => formData['working'] = value, + validator: (value) { + if (value == null || value.isEmpty) { + return 'Please enter Working'; + } + return null; + }, + hintText: "enter Working", + ), + const SizedBox( + height: 20, + ), + CustomButton( + height: 50, + width: 400, + text: 'Submit', + onTap: () async { + if (_formKey.currentState!.validate()) { + _formKey.currentState!.save(); + { + try { + print('form data is $formData'); + + final response = + await userService.createAccount(formData); + + account_id = response['account_id'].toString(); + print( + 'after create account account id is $account_id'); + // ignore: use_build_context_synchronously + Navigator.pop( + _context, account_id); // Pop with account_id + + // Navigator.pop(context); + } catch (e) { + // ignore: use_build_context_synchronously + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: const Text('Error'), + content: Text('Account Creation Failed: $e', + style: const TextStyle( + fontWeight: FontWeight.w700, + color: Colors.black)), + actions: [ + TextButton( + child: const Text('OK'), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ], + ); + }, + ); + } + } + } + }, + ) + ], + )), + ), + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/signupF/registration_details_f.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/signupF/registration_details_f.dart new file mode 100644 index 0000000..2afc497 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/signupF/registration_details_f.dart @@ -0,0 +1,502 @@ +import 'package:dropdown_search/dropdown_search.dart'; +import 'package:flutter/material.dart'; + +import '../../utils/image_constant.dart'; +import '../../utils/size_utils.dart'; +import '../../widgets/app_bar/appbar_image.dart'; +import '../../widgets/app_bar/appbar_title.dart'; +import '../../widgets/app_bar/custom_app_bar.dart'; +import '../../widgets/custom_dropdownfield.dart'; +import '../../widgets/custom_textformfield.dart'; +import '../Login Screen/CustomButton.dart'; +import '../Login Screen/login_screen_f.dart'; +import 'SignUpService.dart'; +import 'choose_package_screen.dart'; +import 'create_account_f.dart'; + +class RegstrationDetailsF extends StatefulWidget { + RegstrationDetailsF({super.key, required this.email}); + var email; + + @override + State createState() => _RegstrationDetailsFState(); +} + +class _RegstrationDetailsFState extends State { + final SignUpApiService userService = SignUpApiService(); + final Map formData = {}; + final Map accountformData = {}; + final _formKey = GlobalKey(); + + var account_id = null; + var selectedAccount; + var newPassword = ''; + var confirmPassword = ''; + bool _newpasswordVisible = false; + bool _confirmpasswordVisible = false; + bool _isPasswordValid = true; + var selectedgender = ''; + var selectedCity = ''; + DateTime selectedDate = DateTime.now(); + + // final List cityList = [ + // // List of some Indian cities for demonstration + // 'Pune', 'Mumbai', 'Delhi', 'Bengaluru', 'Hyderabad', 'Ahmedabad', 'Chennai', + // 'Kolkata', 'Jaipur', 'Surat', 'Lucknow', 'Kanpur', 'Nagpur', + // 'Indore', 'Thane', 'Bhopal', 'Visakhapatnam', 'Pimpri-Chinchwad', + // 'Patna', 'Vadodara' + // ]; + String? _validatePasswordMatch(String value) { + if (value != newPassword) { + print('value is $value and new is $newPassword'); + return 'Passwords do not match'; + } + return null; + } + + void _validatePassword(String password) { + setState(() { + _isPasswordValid = password.isNotEmpty; + }); + } + + void showSuccessMessage(String message) { + ScaffoldMessenger.of(context).showSnackBar( + SnackBar( + content: Text(message), + duration: const Duration(seconds: 2), + backgroundColor: Colors.green, + ), + ); + } + + void showErrorMessage(String error) { + ScaffoldMessenger.of(context).showSnackBar( + SnackBar( + content: Text(error), + duration: const Duration(seconds: 2), + backgroundColor: Colors.red, + ), + ); + } + + Future _selectDate(BuildContext context) async { + final DateTime? picked = await showDatePicker( + context: context, + initialDate: selectedDate, + firstDate: DateTime(1900), + lastDate: DateTime.now(), + ); + if (picked != null && picked != selectedDate) { + setState(() { + selectedDate = picked; + }); + } + } + + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: CustomAppBar( + height: getVerticalSize(54), + centerTitle: true, + leading: AppbarImage( + height: getSize(24), + width: getSize(24), + svgPath: ImageConstant.imgArrowleft, + margin: getMargin(left: 16, top: 13, bottom: 17), + onTap: () { + Navigator.pop(context); + }), + title: AppbarTitle(text: 'Registration Details'), + ), + body: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.all(16), + child: Form( + key: _formKey, + child: Column(children: [ + const SizedBox( + width: double.infinity, + child: Text( + 'First Name', + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.w700, color: Colors.black), + ), + ), + CustomTextField( + hintText: 'Enter First Name', + onSaved: (value) => formData['first_name'] = value, + validator: (value) { + if (value == null || value.isEmpty) { + return 'Please enter First Name'; + } + return null; + }, + ), + Padding( + padding: getPadding(top: 22), + child: const SizedBox( + width: double.infinity, + child: Text( + "Last Name", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.w700, color: Colors.black), + ), + ), + ), + CustomTextField( + hintText: 'Enter Last Name', + onSaved: (value) => formData['last_name'] = value, + validator: (value) { + if (value == null || value.isEmpty) { + return 'Please enter Last Name'; + } + return null; + }, + ), + + // Padding( + // padding: getPadding(top: 22), + // child: const SizedBox( + // width: double.infinity, + // child: Text( + // "Father Name", + // overflow: TextOverflow.ellipsis, + // textAlign: TextAlign.left, + // style: TextStyle( + // fontWeight: FontWeight.w700, color: Colors.black), + // ), + // ), + // ), + // CustomTextField( + // hintText: 'Enter Father Name', + // onSaved: (value) => formData['father_name'] = value, + // validator: (value) { + // if (value == null || value.isEmpty) { + // return 'Please enter Father Name'; + // } + // return null; + // }, + // ), + + // Padding( + // padding: getPadding(top: 22), + // child: const SizedBox( + // width: double.infinity, + // child: Text( + // "Mother Name", + // overflow: TextOverflow.ellipsis, + // textAlign: TextAlign.left, + // style: TextStyle( + // fontWeight: FontWeight.w700, color: Colors.black), + // ), + // ), + // ), + // CustomTextField( + // hintText: 'Enter Mother Name', + // onSaved: (value) => formData['mother_name'] = value, + // validator: (value) { + // if (value == null || value.isEmpty) { + // return 'Please enter Mother Name'; + // } + // return null; + // }, + // ), + Padding( + padding: getPadding(top: 22), + child: const SizedBox( + width: double.infinity, + child: Text( + "Mobile Number", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.w700, color: Colors.black), + ), + )), + CustomTextField( + textInputType: TextInputType.number, + hintText: 'Enter Mobile Number', + onSaved: (value) => formData['mob_no'] = value, + validator: (value) { + if (value == null || value.isEmpty) { + return 'Please enter Mobile Number'; + } + return null; + }, + ), + Padding( + padding: getPadding(top: 22), + child: const SizedBox( + width: double.infinity, + child: Text( + "Gender", + style: TextStyle( + fontWeight: FontWeight.w700, color: Colors.black), + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + ), + ), + ), + CustomDropdownField( + value: selectedgender, + items: [ + const DropdownMenuItem( + value: '', + child: Text( + 'Select Gender', + ), + ), + ...['Male', 'Female', 'Other'] + .map>((item) { + return DropdownMenuItem( + value: item, + child: Text( + item, + ), + ); + }), + ], + onChanged: (value) { + setState(() { + selectedgender = value!; + }); + }, + onSaved: (value) { + if (selectedgender.isEmpty) { + selectedgender = ''; + } + formData['gender'] = selectedgender; + }, + ), + // Padding( + // padding: getPadding(top: 22), + // child: const SizedBox( + // width: double.infinity, + // child: Text( + // "Location", + // style: TextStyle( + // fontWeight: FontWeight.w700, color: Colors.black), + // overflow: TextOverflow.ellipsis, + // textAlign: TextAlign.left, + // ), + // ), + // ), + // DropdownSearch( + // popupProps: const PopupProps.menu( + // showSelectedItems: true, + // // disabledItemFn: (String s) => s.startsWith('I'), + // ), + // dropdownDecoratorProps: const DropDownDecoratorProps( + // dropdownSearchDecoration: InputDecoration( + // labelText: "City", + // hintText: "Select City", + // hintStyle: + // TextStyle(color: Colors.black), // Set hint text color + // labelStyle: TextStyle( + // color: Colors.black), // Set label text color + // ), + // ), + // items: cityList, + // onChanged: (value) { + // setState(() { + // selectedCity = value!; + // }); + // }, + // selectedItem: selectedCity, + // validator: (value) { + // if (value == null || value.isEmpty) { + // return 'Please select a city'; + // } + // return null; + // }, + // onSaved: (value) { + // formData['location'] = value!; + // }, + // ), + Padding( + padding: getPadding(top: 22), + child: const SizedBox( + width: double.infinity, + child: Text( + "Date of Birth", + style: TextStyle( + fontWeight: FontWeight.w700, color: Colors.black), + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + ), + )), + CustomTextField( + hintText: "${selectedDate.toLocal()}".split(' ')[0], + onTap: () => _selectDate(context), + onSaved: (value) => + formData['date_of_birth'] = selectedDate.toString(), + ), + Padding( + padding: getPadding(top: 22), + child: const SizedBox( + width: double.infinity, + child: Text( + "Enter Password", + style: TextStyle( + fontWeight: FontWeight.w700, color: Colors.black), + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + ), + )), + CustomTextField( + suffixIcon: IconButton( + icon: Icon( + _newpasswordVisible + ? Icons.visibility + : Icons.visibility_off, + ), + onPressed: () { + setState(() { + _newpasswordVisible = !_newpasswordVisible; + }); + }, + ), + hintText: 'Enter Password', + onSaved: (value) => formData['new_password'] = value, + onChanged: (value) { + setState(() { + newPassword = value!; + }); + _validatePassword; + }, + validator: (value) { + if (value == null || value.isEmpty) { + return 'Please enter Password'; + } else if (!_isPasswordValid) { + return 'Please enter a valid password'; + } + return null; + }, + isObscureText: !_newpasswordVisible), + Padding( + padding: getPadding(top: 22), + child: const SizedBox( + width: double.infinity, + child: Text( + "Confirm Password", + style: TextStyle( + fontWeight: FontWeight.w700, color: Colors.black), + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + ), + )), + CustomTextField( + hintText: "Confirm Password", + textInputType: TextInputType.visiblePassword, + validator: (value) { + if (value == null || value.isEmpty) { + return 'Please enter Password'; + } + return _validatePasswordMatch(confirmPassword); + }, + onSaved: (value) => formData['confirm_password'] = value, + onChanged: (value) { + setState(() { + confirmPassword = value!; // Update confirmPassword + }); + }, + suffixIcon: IconButton( + icon: Icon( + _confirmpasswordVisible + ? Icons.visibility + : Icons.visibility_off, + ), + onPressed: () { + setState(() { + _confirmpasswordVisible = !_confirmpasswordVisible; + }); + }, + ), + isObscureText: !_confirmpasswordVisible, + ), + const SizedBox(height: 20), + + // CustomButton( + // height: 50, + // width: 400, + // onTap: () async { + // final accountId = await Navigator.push( + // context, + // MaterialPageRoute( + // builder: (context) => const CreateAccountF() + // //CreateAccountScreen(), + // ), + // ); + + // if (accountId != null) { + // setState(() { + // selectedAccount = accountId; + // formData['account_id'] = accountId; + // account_id = accountId; // Update the account_id here + // }); + // } + // }, + // text: 'Add account', + // ), + // if (account_id != null) + Container( + margin: const EdgeInsets.symmetric(vertical: 5), // Add margin + child: CustomButton( + height: getVerticalSize(50), + width: getHorizontalSize(396), + text: "SUBMIT", + onTap: () async { + if (_formKey.currentState!.validate()) { + _formKey.currentState!.save(); + + print('formdata is $formData'); + + accountformData['email'] = widget.email; + + final response = + await userService.createAccount(accountformData); + + account_id = response['account_id'].toString(); + + formData['usrGrpId'] = 1; + formData['account_id'] = account_id; + formData['email'] = widget.email; + try { + print('working'); + await userService.createuser(formData).then((_) => { + const LoginScreenF(false), + }); + await Future.delayed(const Duration(seconds: 5)); + + //showSuccessMessage('User created successfully'); + // ignore: use_build_context_synchronously + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + const PlanSelectionScreen())); + //moveToNextStep(); + } catch (e) { + print(e); + showErrorMessage('Failed to create User: $e'); + } + } + }, + ), + ), + ])), + ), + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/splash_screen/splash_screen.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/splash_screen/splash_screen.dart new file mode 100644 index 0000000..ba3fa40 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/screens/splash_screen/splash_screen.dart @@ -0,0 +1,144 @@ + +import 'package:base_project/core/app_export.dart'; +import 'package:flutter/material.dart'; +import '../../core/utils/image_constant.dart'; +import '../../theme/theme_helper.dart'; +import '../../widgets/custom_image_view.dart'; +import '../MenuScreen/new_dash/Newdashboard.dart'; + +class SplashScreen extends StatefulWidget { + const SplashScreen({super.key}); + + @override + State createState() => _SplashScreenState(); +} + +class _SplashScreenState extends State { + // var isLogin = false; + // + // Map userData = {}; + // + // Future checkifLogin() async { + // SharedPreferences prefs = await SharedPreferences.getInstance(); + // bool? isLoggedIn = prefs.getBool('isLoggedIn'); + // var userdatastr = prefs.getString('userData'); + // + // if (kDebugMode) { + // print('userData....$userdatastr'); + // } + // if (isLoggedIn != null && isLoggedIn) { + // setState(() { + // isLogin = true; + // }); + // } + // + // if (userdatastr != null) { + // try { + // userData = json.decode(userdatastr); + // if (kDebugMode) { + // print(userData['token']); + // } + // } catch (e) { + // if (kDebugMode) { + // print("error is ..................$e"); + // } + // } + // } else { + // setState(() { + // isLogin = false; + // }); + // } + // } + + @override + void initState() { + super.initState(); + Future.delayed(Duration(seconds: 5)) + .then((value) => Navigator.pushReplacement( + context, + MaterialPageRoute( + builder: (context) => Newdashboard(), + ))); + // checkifLogin().then((value) async => { + // Future.delayed(const Duration(seconds: 3), () { + // Navigator.pushReplacement( + // context, + // MaterialPageRoute( + // builder: (context) => + // isLogin ? Newdashboard() : const DecisionScreen()), + // // isLogin ? Dashboardcreen() : const LoginScreenF(false)), + // ); + // }) + // }); + } + + @override + Widget build(BuildContext context) { + return SafeArea( + child: Scaffold( + extendBody: true, + extendBodyBehindAppBar: true, + backgroundColor: appTheme.black900, + body: Container( + width: MediaQuery.of(context).size.width, + height: MediaQuery.of(context).size.height, + decoration: BoxDecoration( + color: appTheme.black900, + image: DecorationImage( + image: AssetImage( + ImageConstant.imgLogin, + ), + fit: BoxFit.cover, + ), + ), + child: Container( + height: 64, + padding: EdgeInsets.symmetric( + horizontal: 23.h, + vertical: 83.v, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + CustomImageView( + imagePath: ImageConstant.imgImageRemovebgPreview, + height: 59.v, + width: 382.h, + ), + const Spacer( + flex: 62, + ), + CustomImageView( + imagePath: ImageConstant.imgCricyard1, + height: 251.v, + width: 291.h, + ), + const Spacer( + flex: 37, + ) + ], + ), + ), + ), + ), + ); + } + + // @override + // Widget build(BuildContext context) { + // return Scaffold( + // body: SingleChildScrollView( + // child: SizedBox( + // width: MediaQuery.of(context).size.width, + // height: MediaQuery.of(context).size.height, + // child: Center( + // child: SvgPicture.asset( + // 'assets/images/cloudnsuresp.svg', + // width: 100, + // ), + // ), + // ), + // ), + // ); + // } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/theme/app_decoration.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/theme/app_decoration.dart new file mode 100644 index 0000000..6aa3b4f --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/theme/app_decoration.dart @@ -0,0 +1,663 @@ +import 'package:base_project/core/app_export.dart'; +import 'package:flutter/material.dart'; + +import '../utils/color_constants.dart'; +import '../utils/size_utils.dart'; +import 'theme_helper.dart'; + +class AppDecoration { + // Gradient decorations + static BoxDecoration get gradientOnErrorContainerToOnErrorContainer => + BoxDecoration( + gradient: LinearGradient( + begin: Alignment(0.32, 0.2), + end: Alignment(0.75, 0.83), + colors: [ + theme.colorScheme.onErrorContainer.withOpacity(0.7), + theme.colorScheme.onErrorContainer.withOpacity(0.7), + theme.colorScheme.onErrorContainer.withOpacity(0.7) + ], + ), + ); + static BoxDecoration get fillBlueGray => BoxDecoration( + color: appTheme.blueGray100, + ); + static BoxDecoration get fillBlue5001 => BoxDecoration( + color: ColorConstant.blue5001, + ); + static BoxDecoration get outlineGray5002 => BoxDecoration( + color: ColorConstant.gray5002, + border: Border.all( + color: ColorConstant.gray5002, + width: getHorizontalSize( + 1, + ), + ), + ); + static BoxDecoration get outlineBlueA70001 => BoxDecoration( + border: Border.all( + color: ColorConstant.blueA70001, + width: getHorizontalSize( + 1, + ), + ), + ); + static BoxDecoration get outlineGray60026 => BoxDecoration( + color: ColorConstant.whiteA700, + boxShadow: [ + BoxShadow( + color: ColorConstant.gray60026, + spreadRadius: getHorizontalSize( + 2, + ), + blurRadius: getHorizontalSize( + 2, + ), + offset: const Offset( + 0, + 2.41, + ), + ), + ], + ); + static BoxDecoration get txtFillBluegray100 => BoxDecoration( + color: ColorConstant.blueGray100, + ); + static BoxDecoration get fillBlueA700 => BoxDecoration( + color: ColorConstant.blueA700, + ); + static BoxDecoration get fillBluegray50 => BoxDecoration( + color: ColorConstant.blueGray50, + ); + + static BoxDecoration get fillBlack => BoxDecoration( + color: appTheme.black900, + ); + static BoxDecoration get fillGray => BoxDecoration( + color: appTheme.gray10001, + ); + static BoxDecoration get fillGray700 => BoxDecoration( + color: appTheme.gray700, + ); + static BoxDecoration get fillLightGreenA => BoxDecoration( + color: appTheme.lightGreenA200, + ); + static BoxDecoration get fillOnErrorContainer => BoxDecoration( + color: theme.colorScheme.onErrorContainer.withOpacity(1), + ); + static BoxDecoration get fillPrimary => BoxDecoration( + color: theme.colorScheme.primary, + ); + static BoxDecoration get outlineBlueA7002 => BoxDecoration( + color: ColorConstant.whiteA700, + border: Border.all( + color: ColorConstant.blueA700, + width: getHorizontalSize( + 1, + ), + ), + ); + static BoxDecoration get outlineBlueA7001 => BoxDecoration( + color: ColorConstant.whiteA700, + border: Border.all( + color: ColorConstant.blueA700, + width: getHorizontalSize( + 1, + ), + ), + boxShadow: [ + BoxShadow( + color: ColorConstant.gray60019, + spreadRadius: getHorizontalSize( + 2, + ), + blurRadius: getHorizontalSize( + 2, + ), + offset: const Offset( + 0, + 12, + ), + ), + ], + ); + static BoxDecoration get outlineGray70011 => BoxDecoration( + color: ColorConstant.whiteA700, + boxShadow: [ + BoxShadow( + color: ColorConstant.gray70011, + spreadRadius: getHorizontalSize( + 2, + ), + blurRadius: getHorizontalSize( + 2, + ), + offset: const Offset( + 0, + 0, + ), + ), + ], + ); + static BoxDecoration get outlineGray600191 => const BoxDecoration(); + static BoxDecoration get txtOutlineBlueA700 => BoxDecoration( + border: Border.all( + color: ColorConstant.blueA700, + width: getHorizontalSize( + 1, + ), + ), + ); + static BoxDecoration get outlineBlue50 => BoxDecoration( + color: ColorConstant.whiteA700, + border: Border.all( + color: ColorConstant.blue50, + width: getHorizontalSize( + 1, + ), + ), + ); + static BoxDecoration get txtFillBlueA700 => BoxDecoration( + color: ColorConstant.blueA700, + ); + static BoxDecoration get outlineBlack90019 => BoxDecoration( + color: ColorConstant.blueA700, + boxShadow: [ + BoxShadow( + color: ColorConstant.black90019, + spreadRadius: getHorizontalSize( + 2, + ), + blurRadius: getHorizontalSize( + 2, + ), + offset: const Offset( + 0, + 2, + ), + ), + ], + ); + static BoxDecoration get outlineBluegray100 => BoxDecoration( + color: ColorConstant.gray50, + border: Border( + bottom: BorderSide( + color: ColorConstant.blueGray100, + width: getHorizontalSize( + 1, + ), + ), + ), + ); + static BoxDecoration get fillGray50 => BoxDecoration( + color: ColorConstant.gray50, + ); + static BoxDecoration get outlineBluegray10001 => BoxDecoration( + color: ColorConstant.whiteA700, + border: Border.all( + color: ColorConstant.blueGray10001, + width: getHorizontalSize( + 1, + ), + ), + boxShadow: [ + BoxShadow( + color: ColorConstant.black90033, + spreadRadius: getHorizontalSize( + 2, + ), + blurRadius: getHorizontalSize( + 2, + ), + offset: const Offset( + 0, + 1, + ), + ), + ], + ); + static BoxDecoration get fillBlack900b2 => BoxDecoration( + color: ColorConstant.black900B2, + ); + static BoxDecoration get outlineBlack90033 => BoxDecoration( + border: Border.all( + color: ColorConstant.black90033, + width: getHorizontalSize( + 1, + ), + ), + ); + static BoxDecoration get outlineBlack90011 => BoxDecoration( + color: ColorConstant.whiteA700, + boxShadow: [ + BoxShadow( + color: ColorConstant.black90011, + spreadRadius: getHorizontalSize( + 2, + ), + blurRadius: getHorizontalSize( + 2, + ), + offset: const Offset( + 0, + 0, + ), + ), + ], + ); + static BoxDecoration get outlineGray30001 => BoxDecoration( + border: Border.all( + color: ColorConstant.gray30001, + width: getHorizontalSize( + 1, + ), + ), + ); + static BoxDecoration get outlineBlue200 => BoxDecoration( + border: Border.all( + color: ColorConstant.blue200, + width: getHorizontalSize( + 1, + ), + ), + ); + static BoxDecoration get outlineGray60019 => BoxDecoration( + color: ColorConstant.whiteA700, + boxShadow: [ + BoxShadow( + color: ColorConstant.gray60019, + spreadRadius: getHorizontalSize( + 2, + ), + blurRadius: getHorizontalSize( + 2, + ), + offset: const Offset( + 0, + 12, + ), + ), + ], + ); + static BoxDecoration get outlineGray700261 => BoxDecoration( + color: ColorConstant.whiteA700, + boxShadow: [ + BoxShadow( + color: ColorConstant.gray70026, + spreadRadius: getHorizontalSize( + 2, + ), + blurRadius: getHorizontalSize( + 2, + ), + offset: const Offset( + 0, + 0, + ), + ), + ], + ); + static BoxDecoration get fillWhiteA700 => BoxDecoration( + color: ColorConstant.whiteA700, + ); + static BoxDecoration get outlineBlueA700 => BoxDecoration( + color: ColorConstant.gray50, + border: Border.all( + color: ColorConstant.blueA700, + width: getHorizontalSize( + 2, + ), + strokeAlign: strokeAlignOutside, + ), + ); + static BoxDecoration get fillBlue900 => BoxDecoration( + color: ColorConstant.blue900, + ); + static BoxDecoration get outlineBluegray1002 => BoxDecoration( + color: ColorConstant.whiteA700, + border: Border( + top: BorderSide( + color: ColorConstant.blueGray100, + width: getHorizontalSize( + 1, + ), + ), + bottom: BorderSide( + color: ColorConstant.blueGray100, + width: getHorizontalSize( + 1, + ), + ), + ), + ); + static BoxDecoration get fillRed100 => BoxDecoration( + color: ColorConstant.red100, + ); + static BoxDecoration get outlineBluegray1001 => BoxDecoration( + color: ColorConstant.whiteA700, + border: Border.all( + color: ColorConstant.blueGray100, + width: getHorizontalSize( + 1, + ), + ), + ); + static BoxDecoration get outlineYellow9003f => BoxDecoration( + color: ColorConstant.whiteA700, + border: Border.all( + color: ColorConstant.yellow9003f, + width: getHorizontalSize( + 1, + ), + strokeAlign: strokeAlignOutside, + ), + ); + static BoxDecoration get fillBlue50 => BoxDecoration( + color: ColorConstant.blue50, + ); + static BoxDecoration get outlineGray70026 => BoxDecoration( + color: ColorConstant.whiteA70099, + boxShadow: [ + BoxShadow( + color: ColorConstant.gray70026, + spreadRadius: getHorizontalSize( + 2, + ), + blurRadius: getHorizontalSize( + 2, + ), + offset: const Offset( + 0, + 0, + ), + ), + ], + ); + static BoxDecoration get txtOutlineBlack9000c => BoxDecoration( + color: ColorConstant.gray100, + border: Border.all( + color: ColorConstant.black9000c, + width: getHorizontalSize( + 1, + ), + ), + ); + static BoxDecoration get fillRed700 => BoxDecoration( + color: ColorConstant.red700, + ); + static BoxDecoration get fillGray5003 => BoxDecoration( + color: ColorConstant.gray5003, + ); + static BoxDecoration get fillGray200 => BoxDecoration( + color: ColorConstant.gray200, + ); + static BoxDecoration get outlineBluegray50 => BoxDecoration( + color: ColorConstant.whiteA700, + border: Border.all( + color: ColorConstant.blueGray50, + width: getHorizontalSize( + 1, + ), + ), + ); + + // Outline decorations + static BoxDecoration get outlineOnPrimaryContainer => BoxDecoration( + color: appTheme.whiteA700, + border: Border.all( + color: theme.colorScheme.onPrimaryContainer, + width: 1.h, + ), + ); + + // Outline decorations + static BoxDecoration get outlineBlack => BoxDecoration(); + + // Fill decorations + static BoxDecoration get fillBlueA => BoxDecoration( + color: appTheme.blueA200, + ); + + static BoxDecoration get fillGray800 => BoxDecoration( + color: appTheme.gray800, + ); + static BoxDecoration get fillOnError => BoxDecoration( + color: theme.colorScheme.onError, + ); + static BoxDecoration get fillPink => BoxDecoration( + color: appTheme.pink400, + ); + + static BoxDecoration get fillPrimary1 => BoxDecoration( + color: theme.colorScheme.primary.withOpacity(0.05), + ); + static BoxDecoration get fillPrimary2 => BoxDecoration( + color: theme.colorScheme.primary.withOpacity(0.1), + ); + static BoxDecoration get fillWhiteA => BoxDecoration( + color: appTheme.whiteA700, + ); + + static BoxDecoration get fillYellow => BoxDecoration( + color: appTheme.yellow600, + ); +// Outline decorations + static BoxDecoration get outlineGray => BoxDecoration( + color: appTheme.whiteA700.withOpacity(0.6), + border: Border.all( + color: appTheme.gray300, + width: 1.h, + ), + ); + static BoxDecoration get outlineGray300 => BoxDecoration( + color: appTheme.whiteA700.withOpacity(0.6), + border: Border( + bottom: BorderSide( + color: appTheme.gray300, + width: 1.h, + ), + ), + ); + static BoxDecoration get outlineGray3001 => BoxDecoration( + color: appTheme.whiteA700, + border: Border( + bottom: BorderSide( + color: appTheme.gray300, + width: 1.h, + ), + ), + ); + static BoxDecoration get outlineGray3002 => BoxDecoration( + border: Border( + bottom: BorderSide( + color: appTheme.gray300, + width: 1.h, + ), + ), + ); + static BoxDecoration get outlineGray3003 => BoxDecoration( + border: Border.all( + color: appTheme.gray300, + width: 1.h, + ), + ); + static BoxDecoration get outlineGray3004 => BoxDecoration( + border: Border( + left: BorderSide( + color: appTheme.gray300, + width: 1.h, + ), + right: BorderSide( + color: appTheme.gray300, + width: 1.h, + ), + ), + ); + static BoxDecoration get outlineGray3005 => BoxDecoration( + color: appTheme.whiteA700.withOpacity(0.05), + border: Border.all( + color: appTheme.gray300, + width: 1.h, + ), + ); + static BoxDecoration get outlineGray3006 => BoxDecoration( + border: Border( + bottom: BorderSide( + color: appTheme.gray300, + width: 1.h, + ), + ), + ); +} + +class BorderRadiusStyle { + static BorderRadius customBorderTL50 = BorderRadius.only( + topLeft: Radius.circular( + getHorizontalSize( + 50, + ), + ), + bottomLeft: Radius.circular( + getHorizontalSize( + 50, + ), + ), + ); + + static BorderRadius customBorderTL10 = BorderRadius.only( + topLeft: Radius.circular( + getHorizontalSize( + 10, + ), + ), + topRight: Radius.circular( + getHorizontalSize( + 10, + ), + ), + ); + + static BorderRadius circleBorder9 = BorderRadius.circular( + getHorizontalSize( + 9, + ), + ); + + static BorderRadius circleBorder22 = BorderRadius.circular( + getHorizontalSize( + 22, + ), + ); + + static BorderRadius roundedBorder16 = BorderRadius.circular( + getHorizontalSize( + 16, + ), + ); + + static BorderRadius circleBorder12 = BorderRadius.circular( + getHorizontalSize( + 12, + ), + ); + + static BorderRadius roundedBorder6 = BorderRadius.circular( + getHorizontalSize( + 6, + ), + ); + + static BorderRadius circleBorder25 = BorderRadius.circular( + getHorizontalSize( + 25, + ), + ); + + static BorderRadius roundedBorder3 = BorderRadius.circular( + getHorizontalSize( + 3, + ), + ); + + static BorderRadius circleBorder30 = BorderRadius.circular( + getHorizontalSize( + 30, + ), + ); + + static BorderRadius circleBorder76 = BorderRadius.circular( + getHorizontalSize( + 76, + ), + ); + + static BorderRadius txtRoundedBorder6 = BorderRadius.circular( + getHorizontalSize( + 6, + ), + ); + + static BorderRadius circleBorder61 = BorderRadius.circular( + getHorizontalSize( + 61, + ), + ); + static BorderRadius get roundedBorder8 => BorderRadius.circular( + 8.h, + ); + + // Circle borders + static BorderRadius get circleBorder24 => BorderRadius.circular( + 24.h, + ); + static BorderRadius get circleBorder50 => BorderRadius.circular( + 50.h, + ); +// Rounded borders + static BorderRadius get roundedBorder10 => BorderRadius.circular( + 10.h, + ); + static BorderRadius get roundedBorder15 => BorderRadius.circular( + 15.h, + ); + static BorderRadius get roundedBorder19 => BorderRadius.circular( + 19.h, + ); + static BorderRadius get roundedBorder5 => BorderRadius.circular( + 5.h, + ); + + static BorderRadius get circleBorder20 => BorderRadius.circular( + 20.h, + ); +// Custom borders + static BorderRadius get customBorderBL12 => BorderRadius.vertical( + bottom: Radius.circular(12.h), + ); + static BorderRadius get customBorderTL12 => BorderRadius.vertical( + top: Radius.circular(12.h), + ); + + static BorderRadius get roundedBorder24 => BorderRadius.circular( + 24.h, + ); +} + +// Comment/Uncomment the below code based on your Flutter SDK version. + +// For Flutter SDK Version 3.7.2 or greater. + +double get strokeAlignInside => BorderSide.strokeAlignInside; + +double get strokeAlignCenter => BorderSide.strokeAlignCenter; + +double get strokeAlignOutside => BorderSide.strokeAlignOutside; + +// For Flutter SDK Version 3.7.1 or less. + +// StrokeAlign get strokeAlignInside => StrokeAlign.inside; +// +// StrokeAlign get strokeAlignCenter => StrokeAlign.center; +// +// StrokeAlign get strokeAlignOutside => StrokeAlign.outside; + \ No newline at end of file diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/theme/app_style.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/theme/app_style.dart new file mode 100644 index 0000000..eae274c --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/theme/app_style.dart @@ -0,0 +1,1049 @@ +import 'package:flutter/material.dart'; +import 'package:google_fonts/google_fonts.dart'; + +import '../utils/color_constants.dart'; +import '../utils/size_utils.dart'; + +class AppStyle { + static TextStyle txtGilroySemiBold16Black90002 = TextStyle( + color: ColorConstant.black90002, + fontSize: getFontSize( + 16, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w600, + ); + static TextStyle txtblack16semibold700 = + const TextStyle(fontSize: 16, fontWeight: FontWeight.w700); + + static TextStyle txtgrey16semibold400 = TextStyle( + fontSize: 16, + fontWeight: FontWeight.w400, + color: Colors.black.withOpacity(.5)); + + static TextStyle txtpurplesemibold20 = TextStyle( + color: ColorConstant.purple900, + fontSize: 24, + fontWeight: FontWeight.w700); + + static TextStyle txtwhite16semibold = TextStyle( + color: Colors.white, + fontSize: getFontSize( + 16, + ), + fontWeight: FontWeight.w600, + ); + + static TextStyle fieldlabel = + GoogleFonts.poppins().copyWith(fontSize: 16, fontWeight: FontWeight.w700); + + static TextStyle poppinsnormal = + GoogleFonts.poppins().copyWith(fontSize: 12, fontWeight: FontWeight.w400); + + static TextStyle txtGilroySemiBold10Bluegray900 = TextStyle( + color: ColorConstant.blueGray900, + fontSize: getFontSize( + 10, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w600, + ); + + static TextStyle txtGilroyBold36 = TextStyle( + color: ColorConstant.whiteA700, + fontSize: getFontSize( + 36, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w700, + ); + + static TextStyle txtSFProTextRegular15 = TextStyle( + color: ColorConstant.gray80099, + fontSize: getFontSize( + 15, + ), + fontFamily: 'SF Pro Text', + fontWeight: FontWeight.w400, + ); + + static TextStyle txtGilroySemiBold16WhiteA700 = TextStyle( + color: ColorConstant.whiteA700, + fontSize: getFontSize( + 16, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w600, + ); + + static TextStyle txtGilroyBold32 = TextStyle( + color: ColorConstant.whiteA700, + fontSize: getFontSize( + 32, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w700, + ); + + static TextStyle txtGilroyRegular12Green600 = TextStyle( + color: ColorConstant.green600, + fontSize: getFontSize( + 12, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w400, + ); + + static TextStyle txtSFProTextRegular11 = TextStyle( + color: ColorConstant.black90001, + fontSize: getFontSize( + 11, + ), + fontFamily: 'SF Pro Text', + fontWeight: FontWeight.w400, + ); + + static TextStyle txtRobotoBlack1418 = TextStyle( + color: ColorConstant.blueA700, + fontSize: getFontSize( + 14.18, + ), + fontFamily: 'Roboto', + fontWeight: FontWeight.w900, + ); + + static TextStyle txtGilroySemiBold24Black90001 = TextStyle( + color: ColorConstant.black90001, + fontSize: getFontSize( + 24, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w600, + ); + + static TextStyle txtLatoBold12 = TextStyle( + color: ColorConstant.black90001, + fontSize: getFontSize( + 12, + ), + fontFamily: 'Lato', + fontWeight: FontWeight.w700, + ); + + static TextStyle txtLatoBold10 = TextStyle( + color: ColorConstant.gray400, + fontSize: getFontSize( + 10, + ), + fontFamily: 'Lato', + fontWeight: FontWeight.w700, + ); + + static TextStyle txtGilroyMedium16BlueA700 = TextStyle( + color: ColorConstant.blueA700, + fontSize: getFontSize( + 16, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + + static TextStyle txtGilroyRegular14Bluegray300 = TextStyle( + color: ColorConstant.blueGray300, + fontSize: getFontSize( + 14, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w400, + ); + + static TextStyle txtGilroyRegular12Bluegray90001 = TextStyle( + color: ColorConstant.blueGray90001, + fontSize: getFontSize( + 12, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w400, + ); + + static TextStyle txtGilroyMedium18Gray700 = TextStyle( + color: ColorConstant.gray700, + fontSize: getFontSize( + 18, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + + static TextStyle txtGilroyBold18Bluegray900 = TextStyle( + color: ColorConstant.blueGray900, + fontSize: getFontSize( + 18, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w700, + ); + + static TextStyle txtGilroyBold28 = TextStyle( + color: ColorConstant.blueGray900, + fontSize: getFontSize( + 28, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w700, + ); + + static TextStyle txtGilroySemiBold18Green600 = TextStyle( + color: ColorConstant.green600, + fontSize: getFontSize( + 18, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w600, + ); + + static TextStyle txtGilroyBold24WhiteA700 = TextStyle( + color: ColorConstant.whiteA700, + fontSize: getFontSize( + 24, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w700, + ); + + static TextStyle txtGilroyBold24 = TextStyle( + color: ColorConstant.blueGray900, + fontSize: getFontSize( + 24, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w700, + ); + + static TextStyle txtGilroyBold20 = TextStyle( + color: ColorConstant.blueGray900, + fontSize: getFontSize( + 20, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w700, + ); + + static TextStyle txtGilroyMedium16Bluegray900 = TextStyle( + color: ColorConstant.blueGray900, + fontSize: getFontSize( + 16, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + + static TextStyle txtpoppinsmedium16 = GoogleFonts.poppins().copyWith( + color: ColorConstant.blueGray900, + fontSize: getFontSize( + 16, + ), + fontWeight: FontWeight.w500, + ); + + static TextStyle txtGilroySemiBold14Bluegray300 = TextStyle( + color: ColorConstant.blueGray300, + fontSize: getFontSize( + 14, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w600, + ); + + static TextStyle txtGilroyMedium8Black90001 = TextStyle( + color: ColorConstant.black90001, + fontSize: getFontSize( + 8, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + + static TextStyle txtGilroySemiBold1047 = TextStyle( + color: ColorConstant.black900, + fontSize: getFontSize( + 10.47, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w600, + ); + + static TextStyle txtGilroySemiBold16Black900 = TextStyle( + color: ColorConstant.black900, + fontSize: getFontSize( + 16, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w600, + ); + + static TextStyle txtGilroyMedium14Bluegray400 = TextStyle( + color: ColorConstant.blueGray400, + fontSize: getFontSize( + 14, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + + static TextStyle txtGilroySemiBold18BlueA700 = TextStyle( + color: ColorConstant.blueA700, + fontSize: getFontSize( + 18, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w600, + ); + + static TextStyle txtGilroyMedium8Red700 = TextStyle( + color: ColorConstant.red700, + fontSize: getFontSize( + 8, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + + static TextStyle txtGilroyMedium12Black90087 = TextStyle( + color: ColorConstant.black90087, + fontSize: getFontSize( + 12, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + + static TextStyle txtGilroySemiBold20BlueA700 = TextStyle( + color: ColorConstant.blueA700, + fontSize: getFontSize( + 20, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w600, + ); + + static TextStyle txtSFUIDisplayRegular10 = TextStyle( + color: ColorConstant.black90087, + fontSize: getFontSize( + 10, + ), + fontFamily: 'SF UI Display', + fontWeight: FontWeight.w400, + ); + + static TextStyle txtGilroyRegular14WhiteA700 = TextStyle( + color: ColorConstant.whiteA700, + fontSize: getFontSize( + 14, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w400, + ); + + static TextStyle txtGilroySemiBold10Bluegray400 = TextStyle( + color: ColorConstant.blueGray400, + fontSize: getFontSize( + 10, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w600, + ); + + static TextStyle txtPilatExtendedHeavy16 = TextStyle( + color: ColorConstant.black90075, + fontSize: getFontSize( + 16, + ), + fontFamily: 'Pilat Extended', + fontWeight: FontWeight.w800, + ); + + static TextStyle txtGilroyBold18BlueA700 = TextStyle( + color: ColorConstant.blueA700, + fontSize: getFontSize( + 18, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w700, + ); + + static TextStyle txtPilatExtendedHeavy18 = TextStyle( + color: ColorConstant.black90001, + fontSize: getFontSize( + 18, + ), + fontFamily: 'Pilat Extended', + fontWeight: FontWeight.w800, + ); + + static TextStyle txtGilroyMedium16Bluegray800 = TextStyle( + color: ColorConstant.blueGray800, + fontSize: getFontSize( + 16, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + + static TextStyle txtGilroyMedium18WhiteA700 = TextStyle( + color: ColorConstant.whiteA700, + fontSize: getFontSize( + 18, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + + static TextStyle txtGilroySemiBold24BlueA700 = TextStyle( + color: ColorConstant.blueA700, + fontSize: getFontSize( + 24, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w600, + ); + + static TextStyle txtGilroySemiBold14Bluegray900 = TextStyle( + color: ColorConstant.blueGray900, + fontSize: getFontSize( + 14, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w600, + ); + + static TextStyle txtGilroyRegular14Bluegray400 = TextStyle( + color: ColorConstant.blueGray400, + fontSize: getFontSize( + 14, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w400, + ); + + static TextStyle txtGilroyMedium16Green600 = TextStyle( + color: ColorConstant.green600, + fontSize: getFontSize( + 16, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + + static TextStyle txtGilroyMedium14Black90001 = TextStyle( + color: ColorConstant.black90001, + fontSize: getFontSize( + 14, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + + static TextStyle txtGilroyMedium14Black90002 = TextStyle( + color: ColorConstant.black90002, + fontSize: getFontSize( + 14, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + + static TextStyle txtGilroySemiBold10 = TextStyle( + color: ColorConstant.whiteA700, + fontSize: getFontSize( + 10, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w600, + ); + + static TextStyle txtGilroyRegular16Bluegray400 = TextStyle( + color: ColorConstant.blueGray400, + fontSize: getFontSize( + 16, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w400, + ); + + static TextStyle txtGilroyRegular12 = TextStyle( + color: ColorConstant.red700, + fontSize: getFontSize( + 12, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w400, + ); + + static TextStyle txtGilroySemiBold18Bluegray90002 = TextStyle( + color: ColorConstant.blueGray90002, + fontSize: getFontSize( + 18, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w600, + ); + + static TextStyle txtGilroySemiBold18 = TextStyle( + color: ColorConstant.black90001, + fontSize: getFontSize( + 18, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w600, + ); + + static TextStyle txtGilroySemiBold16 = TextStyle( + color: ColorConstant.blueGray900, + fontSize: getFontSize( + 16, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w600, + ); + + static TextStyle txtGreenSemiBold16 = TextStyle( + color: ColorConstant.green600, + fontSize: getFontSize( + 16, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w600, + ); + + static TextStyle txtGilroyRegular16 = TextStyle( + color: ColorConstant.blueGray900, + fontSize: getFontSize( + 16, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w400, + ); + + static TextStyle txtGilroySemiBold14Bluegray400 = TextStyle( + color: ColorConstant.blueGray400, + fontSize: getFontSize( + 14, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w600, + ); + + static TextStyle txtPilatExtendedHeavy18Black90087 = TextStyle( + color: ColorConstant.black90087, + fontSize: getFontSize( + 18, + ), + fontFamily: 'Pilat Extended', + fontWeight: FontWeight.w800, + ); + + static TextStyle txtGilroyRegular14 = TextStyle( + color: ColorConstant.blueGray600, + fontSize: getFontSize( + 14, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w400, + ); + + static TextStyle txtGilroySemiBold14 = TextStyle( + color: ColorConstant.blueA700, + fontSize: getFontSize( + 14, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w600, + ); + + static TextStyle txtRobotoRegular12 = TextStyle( + color: ColorConstant.blueGray400, + fontSize: getFontSize( + 12, + ), + fontFamily: 'Roboto', + fontWeight: FontWeight.w400, + ); + + static TextStyle txtGilroyRegular14Black90003 = TextStyle( + color: ColorConstant.black90003, + fontSize: getFontSize( + 14, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w400, + ); + + static TextStyle txtRobotoRegular16 = TextStyle( + color: ColorConstant.blueGray40001, + fontSize: getFontSize( + 16, + ), + fontFamily: 'Roboto', + fontWeight: FontWeight.w400, + ); + + static TextStyle txtGilroyMedium14Bluegray300 = TextStyle( + color: ColorConstant.blueGray300, + fontSize: getFontSize( + 14, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + + static TextStyle txtGilroyMedium18Bluegray400 = TextStyle( + color: ColorConstant.blueGray400, + fontSize: getFontSize( + 18, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + + static TextStyle txtGilroyMedium16WhiteA700 = TextStyle( + color: ColorConstant.whiteA700, + fontSize: getFontSize( + 16, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + + static TextStyle txtGilroyBold24Blue800 = TextStyle( + color: ColorConstant.blue800, + fontSize: getFontSize( + 24, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w700, + ); + + static TextStyle txtGilroySemiBold24 = TextStyle( + color: ColorConstant.blueGray900, + fontSize: getFontSize( + 24, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w600, + ); + + static TextStyle txtGilroyBold36BlueA700 = TextStyle( + color: ColorConstant.blueA700, + fontSize: getFontSize( + 36, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w700, + ); + + static TextStyle txtGilroySemiBold28WhiteA700 = TextStyle( + color: ColorConstant.whiteA700, + fontSize: getFontSize( + 28, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w600, + ); + + static TextStyle txtGilroySemiBold20 = TextStyle( + color: ColorConstant.green600, + fontSize: getFontSize( + 20, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w600, + ); + + static TextStyle txtGilroySemiBold16Bluegray300 = TextStyle( + color: ColorConstant.blueGray300, + fontSize: getFontSize( + 16, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w600, + ); + + static TextStyle txtGilroySemiBold28 = TextStyle( + color: ColorConstant.blueA700, + fontSize: getFontSize( + 28, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w600, + ); + + static TextStyle txtGilroySemiBold18Red700 = TextStyle( + color: ColorConstant.red700, + fontSize: getFontSize( + 18, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w600, + ); + + static TextStyle txtInterExtraBold16 = TextStyle( + color: ColorConstant.gray90002, + fontSize: getFontSize( + 16, + ), + fontFamily: 'Inter', + fontWeight: FontWeight.w800, + ); + + static TextStyle txtGilroyMedium16Indigo400 = TextStyle( + color: ColorConstant.indigo400, + fontSize: getFontSize( + 16, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + + static TextStyle txtGilroySemiBold18Bluegray900 = TextStyle( + color: ColorConstant.blueGray900, + fontSize: getFontSize( + 18, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w600, + ); + + static TextStyle txtGilroyMedium12Bluegray400 = TextStyle( + color: ColorConstant.blueGray400, + fontSize: getFontSize( + 12, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + + static TextStyle txtGilroyMedium8 = TextStyle( + color: ColorConstant.blueGray300, + fontSize: getFontSize( + 8, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + + static TextStyle txtRobotoRegular20 = TextStyle( + color: ColorConstant.black90004, + fontSize: getFontSize( + 20, + ), + fontFamily: 'Roboto', + fontWeight: FontWeight.w400, + ); + + static TextStyle txtGilroyMedium14BlueA700 = TextStyle( + color: ColorConstant.blueA700, + fontSize: getFontSize( + 14, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + + static TextStyle txtGilroySemiBold18Bluegray400 = TextStyle( + color: ColorConstant.blueGray400, + fontSize: getFontSize( + 18, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w600, + ); + + static TextStyle txtGilroyMedium16Black90001 = TextStyle( + color: ColorConstant.black90001, + fontSize: getFontSize( + 16, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + + static TextStyle txtGilroySemiBold36 = TextStyle( + color: ColorConstant.blueA700, + fontSize: getFontSize( + 36, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w600, + ); + + static TextStyle txtGilroyMedium18Bluegray900 = TextStyle( + color: ColorConstant.blueGray900, + fontSize: getFontSize( + 18, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + + static TextStyle txtGilroyMedium14Bluegray20001 = TextStyle( + color: ColorConstant.blueGray20001, + fontSize: getFontSize( + 14, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + + static TextStyle txtPilatExtendedHeavy16Black90001 = TextStyle( + color: ColorConstant.black90001, + fontSize: getFontSize( + 16, + ), + fontFamily: 'Pilat Extended', + fontWeight: FontWeight.w800, + ); + + static TextStyle txtGilroyMedium14Gray40001 = TextStyle( + color: ColorConstant.gray40001, + fontSize: getFontSize( + 14, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + + static TextStyle txtGilroySemiBold16BlueA700 = TextStyle( + color: ColorConstant.blueA700, + fontSize: getFontSize( + 16, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w600, + ); + + static TextStyle txtGilroySemiBold14Gray900 = TextStyle( + color: ColorConstant.gray900, + fontSize: getFontSize( + 14, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w600, + ); + + static TextStyle txtGilroyBold16 = TextStyle( + color: ColorConstant.amber500, + fontSize: getFontSize( + 16, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w700, + ); + + static TextStyle txtGilroyBold18 = TextStyle( + color: ColorConstant.black90001, + fontSize: getFontSize( + 18, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w700, + ); + + static TextStyle txtGilroyMedium10Bluegray400 = TextStyle( + color: ColorConstant.blueGray400, + fontSize: getFontSize( + 10, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + + static TextStyle txtGilroyBold12 = TextStyle( + color: ColorConstant.black90001, + fontSize: getFontSize( + 12, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w700, + ); + + static TextStyle txtGilroyRegular12Bluegray900 = TextStyle( + color: ColorConstant.blueGray900, + fontSize: getFontSize( + 12, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w400, + ); + + static TextStyle txtGilroyMedium14Bluegray900 = TextStyle( + color: ColorConstant.blueGray900, + fontSize: getFontSize( + 14, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + + static TextStyle txtGilroySemiBold14Bluegray700 = TextStyle( + color: ColorConstant.blueGray700, + fontSize: getFontSize( + 14, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w600, + ); + + static TextStyle txtGilroyBold16BlueA700 = TextStyle( + color: ColorConstant.blueA700, + fontSize: getFontSize( + 16, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w700, + ); + + static TextStyle txtRubikMedium12 = TextStyle( + color: ColorConstant.blueA700, + fontSize: getFontSize( + 12, + ), + fontFamily: 'Rubik', + fontWeight: FontWeight.w500, + ); + + static TextStyle txtGilroyRegular14BlueA700 = TextStyle( + color: ColorConstant.blueA700, + fontSize: getFontSize( + 14, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w400, + ); + + static TextStyle txtGilroyMedium14Black900 = TextStyle( + color: ColorConstant.black900, + fontSize: getFontSize( + 14, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + + static TextStyle txtGilroyMedium12Bluegray900 = TextStyle( + color: ColorConstant.blueGray900, + fontSize: getFontSize( + 12, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + + static TextStyle txtGilroyMedium10 = TextStyle( + color: ColorConstant.blueGray300, + fontSize: getFontSize( + 10, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + + static TextStyle txtMontserratMedium14 = TextStyle( + color: ColorConstant.redA200, + fontSize: getFontSize( + 14, + ), + fontFamily: 'Montserrat', + fontWeight: FontWeight.w500, + ); + + static TextStyle txtGilroyRegular16Bluegray200 = TextStyle( + color: ColorConstant.blueGray200, + fontSize: getFontSize( + 16, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w400, + ); + + static TextStyle txtGilroyMedium14 = TextStyle( + color: ColorConstant.blueGray200, + fontSize: getFontSize( + 14, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + + static TextStyle txtGilroyMedium12 = TextStyle( + color: ColorConstant.blueGray300, + fontSize: getFontSize( + 12, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + + static TextStyle txtGilroyRegular16Gray900 = TextStyle( + color: ColorConstant.gray900, + fontSize: getFontSize( + 16, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w400, + ); + + static TextStyle txtGilroyMedium18 = TextStyle( + color: ColorConstant.black90001, + fontSize: getFontSize( + 18, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + + static TextStyle txtGilroyMedium16 = TextStyle( + color: ColorConstant.blueGray400, + fontSize: getFontSize( + 16, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + + static TextStyle txtGilroyMedium18Bluegray600 = TextStyle( + color: ColorConstant.blueGray600, + fontSize: getFontSize( + 18, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + + static TextStyle txtGilroySemiBold16Bluegray700 = TextStyle( + color: ColorConstant.blueGray700, + fontSize: getFontSize( + 16, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w600, + ); + + static TextStyle txtGilroySemiBold18Gray90002 = TextStyle( + color: ColorConstant.gray90002, + fontSize: getFontSize( + 18, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w600, + ); + + static TextStyle txtGilroySemiBold18Gray90001 = TextStyle( + color: ColorConstant.gray90001, + fontSize: getFontSize( + 18, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w600, + ); +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/theme/custom_button_style.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/theme/custom_button_style.dart new file mode 100644 index 0000000..8c5f0ed --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/theme/custom_button_style.dart @@ -0,0 +1,143 @@ +import 'package:flutter/material.dart'; +import '../core/app_export.dart'; + +/// A class that offers pre-defined button styles for customizing button appearance. +class CustomButtonStyles { + static BoxDecoration get fullyBlack => BoxDecoration( + borderRadius: BorderRadius.circular(24.h), + color: Colors.black, + ); + static BoxDecoration + get gradientOnErrorContainerToOnErrorContainerDecoration => BoxDecoration( + borderRadius: BorderRadius.circular(24.h), + boxShadow: [ + BoxShadow( + color: appTheme.black900.withOpacity(0.5), + spreadRadius: 2.h, + blurRadius: 2.h, + offset: const Offset( + 4, + 38, + ), + ) + ], + gradient: LinearGradient( + begin: const Alignment(0.32, 0), + end: const Alignment(0.75, 0), + colors: [ + theme.colorScheme.onErrorContainer.withOpacity(0.7), + theme.colorScheme.onErrorContainer.withOpacity(0.7) + ], + ), + ); + + static BoxDecoration get gradientGrayBToOnErrorContainerDecoration => + BoxDecoration( + borderRadius: BorderRadius.circular(24.h), + boxShadow: [ + BoxShadow( + color: appTheme.black900.withOpacity(0.5), + spreadRadius: 2.h, + blurRadius: 2.h, + offset: const Offset( + 4, + 38, + ), + ) + ], + color: Colors.black, + gradient: LinearGradient( + begin: const Alignment(0.32, 0), + end: const Alignment(0.75, 0), + colors: [ + appTheme.black900, + theme.colorScheme.onErrorContainer.withOpacity(1) + ], + ), + ); + + static BoxDecoration get gradientWhiteAToWhiteADecoration => BoxDecoration( + borderRadius: BorderRadius.circular(17.h), + gradient: LinearGradient( + begin: const Alignment(0.32, 0), + end: const Alignment(0.75, 0), + colors: [ + appTheme.whiteA700.withOpacity(0.7), + appTheme.whiteA700.withOpacity(0.7) + ], + ), + ); +// Outline button style + static ButtonStyle get outlineBlack => ElevatedButton.styleFrom( + backgroundColor: appTheme.blueA100, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(8.h), + ), + shadowColor: appTheme.black900.withOpacity(0.4), + elevation: 2, + ); +// text button style + static ButtonStyle get none => ButtonStyle( + backgroundColor: MaterialStateProperty.all(Colors.transparent), + elevation: MaterialStateProperty.all(0), + ); + + // Filled button style + static ButtonStyle get fillBlueA => ElevatedButton.styleFrom( + backgroundColor: appTheme.blueA20001, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(21.h), + ), + ); + static ButtonStyle get fillPrimary => ElevatedButton.styleFrom( + backgroundColor: theme.colorScheme.primary, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(20.h), + ), + ); + static ButtonStyle get fillPrimaryTL16 => ElevatedButton.styleFrom( + backgroundColor: theme.colorScheme.primary, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(16.h), + ), + ); + static ButtonStyle get fillWhiteA => ElevatedButton.styleFrom( + backgroundColor: appTheme.whiteA700, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(20.h), + ), + ); +// Gradient button style + static BoxDecoration get gradientGrayBToWhiteADecoration => BoxDecoration( + borderRadius: BorderRadius.circular(24.h), + boxShadow: [ + BoxShadow( + color: theme.colorScheme.primary.withOpacity(0.5), + spreadRadius: 2.h, + blurRadius: 2.h, + offset: Offset( + 4, + 38, + ), + ) + ], + gradient: LinearGradient( + begin: Alignment(0.32, 0), + end: Alignment(0.75, 0), + colors: [appTheme.gray100B2, appTheme.whiteA700.withOpacity(0.7)], + ), + ); + + static BoxDecoration get gradientWhiteAToWhiteATL25Decoration => + BoxDecoration( + borderRadius: BorderRadius.circular(25.h), + gradient: LinearGradient( + begin: Alignment(0.32, 0), + end: Alignment(0.75, 0), + colors: [ + appTheme.whiteA700.withOpacity(0.7), + appTheme.whiteA700.withOpacity(0.7) + ], + ), + ); +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/theme/custom_text_style.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/theme/custom_text_style.dart new file mode 100644 index 0000000..4bb3be3 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/theme/custom_text_style.dart @@ -0,0 +1,493 @@ +import 'package:flutter/material.dart'; +import '../core/app_export.dart'; +import 'theme_helper.dart'; + +extension on TextStyle { + TextStyle get poppins { + return copyWith( + fontFamily: 'Poppins', + ); + } + + TextStyle get openSans { + return copyWith( + fontFamily: 'Open Sans', + ); + } + + TextStyle get roboto { + return copyWith( + fontFamily: 'Roboto', + ); + } + + TextStyle get montserrat { + return copyWith( + fontFamily: 'Montserrat', + ); + } + + TextStyle get dMSans { + return copyWith( + fontFamily: 'DM Sans', + ); + } + + TextStyle get sourceSansPro { + return copyWith( + fontFamily: 'Source Sans Pro', + ); + } + + TextStyle get dMMono { + return copyWith( + fontFamily: 'DM Mono', + ); + } + + TextStyle get sFProText { + return copyWith( + fontFamily: 'SF Pro Text', + ); + } + + TextStyle get hammersmithOne { + return copyWith( + fontFamily: 'Hammersmith One', + ); + } + + TextStyle get urbanist { + return copyWith( + fontFamily: 'Urbanist', + ); + } + + TextStyle get sFPro { + return copyWith( + fontFamily: 'SF Pro', + ); + } +} + +/// A collection of pre-defined text styles for customizing text appearance, +/// categorized by different font families and weights. +/// Additionally, this class includes extensions on [TextStyle] to easily apply specific font families to text. +class CustomTextStyles { + static get titleLargePoppinsBlack40 => + theme.textTheme.titleMedium!.poppins.copyWith( + color: Colors.black, + fontWeight: FontWeight.bold, + fontSize: 40.fSize, + ); + static get titleSmallPoppinsWhite => + theme.textTheme.titleSmall!.poppins.copyWith( + color: Colors.white, + fontWeight: FontWeight.bold, + fontSize: 22.fSize, + ); + static get titleSmallRed700 => theme.textTheme.titleSmall!.copyWith( + color: appTheme.red700, + fontWeight: FontWeight.w700, + ); + static get titleLargePoppinsBlack => + theme.textTheme.titleMedium!.poppins.copyWith( + color: Colors.black, + fontSize: 30.fSize, + ); + static get titleMediumMediumWhit => theme.textTheme.titleMedium!.copyWith( + fontSize: 16.fSize, fontWeight: FontWeight.w500, color: Colors.white); + + // Headline text style + static get headlineLargePoppinsBlack900 => + theme.textTheme.headlineLarge!.poppins.copyWith( + color: appTheme.black900, + fontWeight: FontWeight.w700, + ); +// Label text style + static get labelLargeCyan900 => theme.textTheme.labelLarge!.copyWith( + color: appTheme.cyan900, + ); + static get labelLargeGray500 => theme.textTheme.labelLarge!.copyWith( + color: appTheme.gray500, + fontWeight: FontWeight.w500, + ); +// Title text style + static get titleSmallMontserratBlack900 => + theme.textTheme.titleSmall!.montserrat.copyWith( + color: appTheme.black900, + fontSize: 14.fSize, + fontWeight: FontWeight.w700, + ); + static get titleSmallPoppinsWhiteA700 => + theme.textTheme.titleSmall!.poppins.copyWith( + color: appTheme.whiteA700, + fontSize: 14.fSize, + fontWeight: FontWeight.w700, + ); + + static get headlineSmallBlack900 => theme.textTheme.headlineSmall!.copyWith( + color: appTheme.black900, + fontWeight: FontWeight.w500, + ); + static get headlineSmallBlack900_1 => theme.textTheme.headlineSmall!.copyWith( + color: appTheme.black900, + ); +// Headline text style + static get headlineLargeGray900 => theme.textTheme.headlineLarge!.copyWith( + color: appTheme.gray900, + ); +// Title text style + static get titleMedium18 => theme.textTheme.titleMedium!.copyWith( + fontSize: 18.fSize, + ); + static get titleMediumErrorContainer => theme.textTheme.titleMedium!.copyWith( + color: theme.colorScheme.errorContainer, + fontWeight: FontWeight.w500, + ); + static get titleMediumPrimary => theme.textTheme.titleMedium!.copyWith( + color: theme.colorScheme.primary, + fontSize: 18.fSize, + ); + + static get titleSmallDeeppurpleA400 => theme.textTheme.titleSmall!.copyWith( + color: appTheme.deepPurpleA400, + fontWeight: FontWeight.w700, + ); + static get titleSmallErrorContainer => theme.textTheme.titleSmall!.copyWith( + color: theme.colorScheme.errorContainer, + ); + static get titleSmallGray600 => theme.textTheme.titleSmall!.copyWith( + color: appTheme.gray600, + fontSize: 14.fSize, + fontWeight: FontWeight.w600, + ); + static get titleSmallPoppinsBlack900 => + theme.textTheme.titleSmall!.poppins.copyWith( + color: appTheme.black900, + ); + static get titleSmallPoppinsDeeppurpleA400 => + theme.textTheme.titleSmall!.poppins.copyWith( + color: appTheme.deepPurpleA400, + fontWeight: FontWeight.w700, + ); + static get titleSmallPoppinsGray90001 => + theme.textTheme.titleSmall!.poppins.copyWith( + color: appTheme.gray90001, + ); + static get titleSmallPoppinsPrimaryContainer => + theme.textTheme.titleSmall!.poppins.copyWith( + color: theme.colorScheme.primaryContainer, + fontWeight: FontWeight.w600, + ); + static get titleSmallPoppinsPrimaryContainer_1 => + theme.textTheme.titleSmall!.poppins.copyWith( + color: theme.colorScheme.primaryContainer, + ); + + static get titleSmallPrimaryContainer => theme.textTheme.titleSmall!.copyWith( + color: theme.colorScheme.primaryContainer, + ); + + // Body text style + static get bodyMediumPoppinsBluegray50 => + theme.textTheme.bodyMedium!.poppins.copyWith( + color: appTheme.blueGray50, + ); + static get bodySmallMontserratBluegray400 => + theme.textTheme.bodySmall!.montserrat.copyWith( + color: appTheme.blueGray400, + fontSize: 10.fSize, + fontWeight: FontWeight.w400, + ); + static get bodySmallOpenSansOnPrimaryContainer => + theme.textTheme.bodySmall!.openSans.copyWith( + color: theme.colorScheme.onPrimaryContainer.withOpacity(1), + fontWeight: FontWeight.w400, + ); + static get bodySmallRegular => theme.textTheme.bodySmall!.copyWith( + fontSize: 10.fSize, + fontWeight: FontWeight.w400, + ); + static get bodySmallYellow900 => theme.textTheme.bodySmall!.copyWith( + color: appTheme.yellow900, + fontSize: 12.fSize, + fontWeight: FontWeight.w400, + ); +// Headline text style + static get headlineLargeBold => theme.textTheme.headlineLarge!.copyWith( + fontSize: 32.fSize, + fontWeight: FontWeight.w700, + ); + static get headlineLargeExtraBold => theme.textTheme.headlineLarge!.copyWith( + fontSize: 32.fSize, + fontWeight: FontWeight.w800, + ); + static get headlineSmallOnPrimaryContainer => + theme.textTheme.headlineSmall!.copyWith( + color: theme.colorScheme.onPrimaryContainer.withOpacity(1), + fontSize: 24.fSize, + ); + static get headlineSmallSemiBold => theme.textTheme.headlineSmall!.copyWith( + fontSize: 24.fSize, + fontWeight: FontWeight.w600, + ); +// Label text style + static get labelLargeBluegray700 => theme.textTheme.labelLarge!.copyWith( + color: appTheme.blueGray700, + ); + static get labelLargeMontserratCyan900 => + theme.textTheme.labelLarge!.montserrat.copyWith( + color: appTheme.cyan900, + fontWeight: FontWeight.w700, + ); + static get labelLargeMontserratGray500 => + theme.textTheme.labelLarge!.montserrat.copyWith( + color: appTheme.gray500, + ); + static get labelLargeMontserratTeal100 => + theme.textTheme.labelLarge!.montserrat.copyWith( + color: appTheme.teal100, + fontWeight: FontWeight.w700, + ); + static get labelMediumGray500 => theme.textTheme.labelMedium!.copyWith( + color: appTheme.gray500, + ); + static get labelMediumGreen80001 => theme.textTheme.labelMedium!.copyWith( + color: appTheme.green80001, + ); + static get labelMediumMontserratCyan900 => + theme.textTheme.labelMedium!.montserrat.copyWith( + color: appTheme.cyan900, + fontWeight: FontWeight.w700, + ); + static get labelMediumOpenSans => + theme.textTheme.labelMedium!.openSans.copyWith( + fontWeight: FontWeight.w700, + ); + static get labelMediumRed700 => theme.textTheme.labelMedium!.copyWith( + color: appTheme.red700, + ); + static get labelSmallBold => theme.textTheme.labelSmall!.copyWith( + fontWeight: FontWeight.w700, + ); +// Open text style + static get openSansOnPrimaryContainer => TextStyle( + color: theme.colorScheme.onPrimaryContainer, + fontSize: 6.fSize, + fontWeight: FontWeight.w400, + ).openSans; +// Title text style + static get titleMediumMedium => theme.textTheme.titleMedium!.copyWith( + fontSize: 16.fSize, + fontWeight: FontWeight.w500, + ); + static get titleSmallPoppinsOnPrimaryContainer => + theme.textTheme.titleSmall!.poppins.copyWith( + color: theme.colorScheme.onPrimaryContainer.withOpacity(1), + fontWeight: FontWeight.w500, + ); + static get titleSmallPoppinsOnPrimaryContainerMedium => + theme.textTheme.titleSmall!.poppins.copyWith( + color: theme.colorScheme.onPrimaryContainer.withOpacity(1), + fontWeight: FontWeight.w500, + ); + static get titleSmallPoppinsOnPrimaryContainer_1 => + theme.textTheme.titleSmall!.poppins.copyWith( + color: theme.colorScheme.onPrimaryContainer.withOpacity(1), + ); + + static get bodySmallOpenSansOnErrorContainer => + theme.textTheme.bodySmall!.openSans.copyWith( + color: theme.colorScheme.onErrorContainer.withOpacity(1), + fontSize: 8.fSize, + ); +// Headline text style + static get headlineLargeSemiBold => theme.textTheme.headlineLarge!.copyWith( + fontSize: 30.fSize, + fontWeight: FontWeight.w600, + ); + static get headlineSmallOnErrorContainer => + theme.textTheme.headlineSmall!.copyWith( + color: theme.colorScheme.onErrorContainer.withOpacity(1), + fontSize: 24.fSize, + ); + +// Label text style + static get labelLargeDMSansOnPrimaryContainer => + theme.textTheme.labelLarge!.dMSans.copyWith( + color: theme.colorScheme.onPrimaryContainer, + fontSize: 13.fSize, + ); + static get labelLargeDMSansOnPrimaryContainer_1 => + theme.textTheme.labelLarge!.dMSans.copyWith( + color: theme.colorScheme.onPrimaryContainer, + ); + static get labelLargeErrorContainer => theme.textTheme.labelLarge!.copyWith( + color: theme.colorScheme.errorContainer, + ); + static get labelLarge_1 => theme.textTheme.labelLarge!; + +// Open text style + static get openSansOnErrorContainer => TextStyle( + color: theme.colorScheme.onErrorContainer, + fontSize: 6.fSize, + fontWeight: FontWeight.w400, + ).openSans; +// Title text style + static get titleMediumBlack900 => theme.textTheme.titleMedium!.copyWith( + color: appTheme.black900, + ); + static get titleMediumBlack900Medium => theme.textTheme.titleMedium!.copyWith( + color: appTheme.black900, + fontSize: 16.fSize, + fontWeight: FontWeight.w500, + ); + static get titleMediumGray300 => theme.textTheme.titleMedium!.copyWith( + color: appTheme.gray300, + ); + static get titleMediumGray50 => theme.textTheme.titleMedium!.copyWith( + color: appTheme.gray50, + fontWeight: FontWeight.w700, + ); + static get titleMediumSourceSansPro => + theme.textTheme.titleMedium!.sourceSansPro.copyWith( + fontSize: 16.fSize, + ); + + static get titleSmallPoppinsOnErrorContainer => + theme.textTheme.titleSmall!.poppins.copyWith( + color: theme.colorScheme.onErrorContainer.withOpacity(1), + ); + static get titleMediumWhiteA700 => theme.textTheme.titleMedium!.copyWith( + color: appTheme.whiteA700, + ); + + // Body text style + static get bodyLargeGray50 => theme.textTheme.bodyLarge!.copyWith( + color: appTheme.gray50, + ); +// Label text style + static get labelLargeAmber300 => theme.textTheme.labelLarge!.copyWith( + color: appTheme.amber300, + ); + static get labelLargePoppinsGray50 => + theme.textTheme.labelLarge!.poppins.copyWith( + color: appTheme.gray50, + fontWeight: FontWeight.w700, + ); + static get labelLargePrimary => theme.textTheme.labelLarge!.copyWith( + color: theme.colorScheme.primary, + ); + static get labelLargePrimaryBold => theme.textTheme.labelLarge!.copyWith( + color: theme.colorScheme.primary, + fontWeight: FontWeight.w700, + ); + static get labelLargePrimaryExtraBold => theme.textTheme.labelLarge!.copyWith( + color: theme.colorScheme.primary, + fontWeight: FontWeight.w800, + ); + static get labelLargeSFProTextErrorContainer => + theme.textTheme.labelLarge!.sFProText.copyWith( + color: theme.colorScheme.errorContainer, + fontWeight: FontWeight.w700, + ); + static get labelLargeSFProTextErrorContainer_1 => + theme.textTheme.labelLarge!.sFProText.copyWith( + color: theme.colorScheme.errorContainer, + ); + static get labelLargeSFProTextPrimary => + theme.textTheme.labelLarge!.sFProText.copyWith( + color: theme.colorScheme.primary, + fontWeight: FontWeight.w500, + ); + static get labelLargeSFProTextPrimaryMedium => + theme.textTheme.labelLarge!.sFProText.copyWith( + color: theme.colorScheme.primary.withOpacity(0.53), + fontWeight: FontWeight.w500, + ); + static get labelLargeSFProTextPrimaryMedium_1 => + theme.textTheme.labelLarge!.sFProText.copyWith( + color: theme.colorScheme.primary.withOpacity(0.56), + fontWeight: FontWeight.w500, + ); + static get labelLargeSFProTextPrimary_1 => + theme.textTheme.labelLarge!.sFProText.copyWith( + color: theme.colorScheme.primary.withOpacity(0.7), + ); + static get labelLargeSFProTextPrimary_2 => + theme.textTheme.labelLarge!.sFProText.copyWith( + color: theme.colorScheme.primary, + ); + static get labelLargeSFProTextRed600 => + theme.textTheme.labelLarge!.sFProText.copyWith( + color: appTheme.red600, + ); + static get labelLargeSFProTextWhiteA700 => + theme.textTheme.labelLarge!.sFProText.copyWith( + color: appTheme.whiteA700, + fontWeight: FontWeight.w500, + ); + static get labelLargeWhiteA700 => theme.textTheme.labelLarge!.copyWith( + color: appTheme.whiteA700, + ); + static get labelLargeWhiteA700ExtraBold => + theme.textTheme.labelLarge!.copyWith( + color: appTheme.whiteA700, + fontWeight: FontWeight.w800, + ); + static get labelLargeWhiteA700_1 => theme.textTheme.labelLarge!.copyWith( + color: appTheme.whiteA700.withOpacity(0.9), + ); + static get labelLargeWhiteA700_2 => theme.textTheme.labelLarge!.copyWith( + color: appTheme.whiteA700.withOpacity(0.9), + ); + static get labelMediumPrimary => theme.textTheme.labelMedium!.copyWith( + color: theme.colorScheme.primary, + fontWeight: FontWeight.w800, + ); + static get labelMediumSFProTextRed600 => + theme.textTheme.labelMedium!.sFProText.copyWith( + color: appTheme.red600, + ); + static get labelMediumWhiteA700 => theme.textTheme.labelMedium!.copyWith( + color: appTheme.whiteA700, + fontWeight: FontWeight.w600, + ); + static get labelMediumWhiteA700ExtraBold => + theme.textTheme.labelMedium!.copyWith( + color: appTheme.whiteA700.withOpacity(0.7), + fontWeight: FontWeight.w800, + ); + static get labelMediumWhiteA700ExtraBold_1 => + theme.textTheme.labelMedium!.copyWith( + color: appTheme.whiteA700, + fontWeight: FontWeight.w800, + ); +// Title text style + static get titleLargeWhiteA700 => theme.textTheme.titleLarge!.copyWith( + color: appTheme.whiteA700, + ); + static get titleLargeWhiteA700_1 => theme.textTheme.titleLarge!.copyWith( + color: appTheme.whiteA700, + ); + static get titleMediumDeeporange300 => theme.textTheme.titleMedium!.copyWith( + color: appTheme.deepOrange300, + fontSize: 18.fSize, + fontWeight: FontWeight.w800, + ); + static get titleMediumPoppins => + theme.textTheme.titleMedium!.poppins.copyWith( + fontSize: 18.fSize, + fontWeight: FontWeight.w600, + ); + static get titleMediumPoppinsGray50 => + theme.textTheme.titleMedium!.poppins.copyWith( + color: appTheme.gray50, + fontSize: 18.fSize, + ); + static get titleMediumRed600 => theme.textTheme.titleMedium!.copyWith( + color: appTheme.red600, + ); + static get titleMediumSFProText => theme.textTheme.titleMedium!.sFProText; +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/theme/theme_helper.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/theme/theme_helper.dart new file mode 100644 index 0000000..5ddd8ca --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/theme/theme_helper.dart @@ -0,0 +1,264 @@ +import 'dart:ui'; +import 'package:flutter/material.dart'; +import '../core/app_export.dart'; + +String _appTheme = "lightCode"; +LightCodeColors get appTheme => ThemeHelper().themeColor(); +ThemeData get theme => ThemeHelper().themeData(); + +/// Helper class for managing themes and colors. +// ignore_for_file: must_be_immutable + +// ignore_for_file: must_be_immutable +class ThemeHelper { + // A map of custom color themes supported by the app + Map _supportedCustomColor = { + 'lightCode': LightCodeColors() + }; + +// A map of color schemes supported by the app + Map _supportedColorScheme = { + 'lightCode': ColorSchemes.lightCodeColorScheme + }; + + /// Changes the app theme to [_newTheme]. + void changeTheme(String _newTheme) { + _appTheme = _newTheme; + } + + /// Returns the lightCode colors for the current theme. + LightCodeColors _getThemeColors() { + return _supportedCustomColor[_appTheme] ?? LightCodeColors(); + } + + /// Returns the current theme data. + ThemeData _getThemeData() { + var colorScheme = + _supportedColorScheme[_appTheme] ?? ColorSchemes.lightCodeColorScheme; + return ThemeData( + visualDensity: VisualDensity.standard, + colorScheme: colorScheme, + textTheme: TextThemes.textTheme(colorScheme), + scaffoldBackgroundColor: appTheme.gray100, + elevatedButtonTheme: ElevatedButtonThemeData( + style: ElevatedButton.styleFrom( + backgroundColor: colorScheme.primary, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(8), + ), + shadowColor: appTheme.black900.withOpacity(0.4), + elevation: 2, + visualDensity: const VisualDensity( + vertical: -4, + horizontal: -4, + ), + padding: EdgeInsets.zero, + ), + ), + dividerTheme: DividerThemeData( + thickness: 1, + space: 1, + color: colorScheme.onPrimaryContainer.withOpacity(0.2), + ), + ); + } + + /// Returns the lightCode colors for the current theme. + LightCodeColors themeColor() => _getThemeColors(); + + /// Returns the current theme data. + ThemeData themeData() => _getThemeData(); +} + +/// Class containing the supported text theme styles. +class TextThemes { + static TextTheme textTheme(ColorScheme colorScheme) => TextTheme( + bodyMedium: TextStyle( + color: colorScheme.onPrimaryContainer.withOpacity(1), + fontSize: 13.fSize, + fontFamily: 'Roboto', + fontWeight: FontWeight.w400, + ), + bodySmall: TextStyle( + color: appTheme.gray500, + fontSize: 8.fSize, + fontFamily: 'Poppins', + fontWeight: FontWeight.w300, + ), + headlineLarge: TextStyle( + color: appTheme.black900, + fontSize: 30.fSize, + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + ), + headlineSmall: TextStyle( + color: appTheme.black900, + fontSize: 25.fSize, + fontFamily: 'Poppins', + fontWeight: FontWeight.w400, + ), + labelLarge: TextStyle( + color: colorScheme.onPrimaryContainer.withOpacity(1), + fontSize: 12.fSize, + fontFamily: 'Poppins', + fontWeight: FontWeight.w500, + ), + labelMedium: TextStyle( + color: colorScheme.onPrimaryContainer.withOpacity(1), + fontSize: 10.fSize, + fontFamily: 'Poppins', + fontWeight: FontWeight.w500, + ), + labelSmall: TextStyle( + color: colorScheme.onPrimaryContainer.withOpacity(1), + fontSize: 8.fSize, + fontFamily: 'Open Sans', + fontWeight: FontWeight.w600, + ), + titleLarge: TextStyle( + color: appTheme.black900, + fontSize: 20.fSize, + fontFamily: 'Poppins', + fontWeight: FontWeight.w400, + ), + titleMedium: TextStyle( + color: appTheme.black900, + fontSize: 18.fSize, + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + ), + titleSmall: TextStyle( + color: appTheme.black900, + fontSize: 14.fSize, + fontFamily: 'Montserrat', + fontWeight: FontWeight.w700, + ), + ); +} + +/// Class containing the supported color schemes. +class ColorSchemes { + static final lightCodeColorScheme = ColorScheme.light( + primary: Color(0XFF8DB1F7), + primaryContainer: Color(0XFF2E353E), + errorContainer: Color(0XFF777777), + onPrimary: Color(0XFF1C2026), + onPrimaryContainer: Color(0X75FFFFFF), + ); +} + +/// Class containing custom colors for a lightCode theme. +class LightCodeColors { + // Black + Color get black900 => Color(0XFF000000); +// Blue + Color get blueA200 => Color(0XFF5285E8); +// BlueGray + Color get blueGray400 => Color(0XFF888888); + Color get blueGray50 => Color(0XFFF1F1F1); + Color get blueGray700 => Color(0XFF535D67); + Color get blueGray800 => Color(0XFF454B55); +// Cyan + Color get cyan600 => Color(0XFF1DA1BE); + Color get cyan900 => Color(0XFF105955); +// Gray + Color get gray100 => Color(0XFFF0F5F4); + Color get gray500 => Color(0XFFAAAAAA); + Color get gray700 => Color(0XFF636363); + Color get gray900 => Color(0XFF1E232C); +// Green + Color get green50 => Color(0XFFD9F9DA); + Color get green800 => Color(0XFF159021); + Color get green80001 => Color(0XFF0CAC13); + Color get gray50 => Color(0XFFF7F8F9); + +// Blue + Color get blue400 => Color(0XFF34AADF); + Color get blueA100 => Color(0XFF8DB1F7); + Color get blueA400 => Color(0XFF337FFF); +// BlueGray + Color get blueGray200 => Color(0XFFB8BCCA); + Color get blueGray40001 => Color(0XFF888888); + +// DeepOrange + Color get deepOrangeA400 => Color(0XFFFF4500); +// Indigo + Color get indigo50 => Color(0XFFE8ECF4); +// LightGreen + Color get lightGreenA200 => Color(0XFFC7FC6C); + Color get lightGreenA20001 => Color(0XFFC0FE53); +// Red + Color get red100 => Color(0XFFF8C6CC); + Color get red600 => Color(0XFFE73E3E); + Color get red700 => Color(0XFFDA2037); +// Teal + Color get teal100 => Color(0XFFA5E0DD); +// Yellow + Color get yellow900 => Color(0XFFEE7429); + Color get gray600 => Color(0XFF6A707C); + +// DeepPurple + Color get deepPurpleA400 => Color(0XFF5030E5); +// Gray + Color get gray10001 => Color(0XFFF0F5F4); + + Color get gray90001 => Color(0XFF1B1919); +// Red + Color get red500 => Color(0XFFF14336); +// White + Color get whiteA700 => Color(0XFFFFFFFF); + +// GrayB + Color get gray100B2 => Color(0XB2F7F7F7); + + Color get gray300 => Color(0XFFE4E4E6); + + // Amber + Color get amberA700 => Color(0XFFFFAE00); + +// LightBlue + Color get lightBlue900 => Color(0XFF006699); + Color get lightBlueA200 => Color(0XFF33CCFF); + Color get lightBlueA20001 => Color(0XFF36C5F0); +// BlueGray + Color get blueGray100 => Color(0XFFD9D9D9); + +// LightGreen + Color get lightGreen100 => Color(0XFFDDF8BB); + Color get lightGreenA20000 => Color(0X00BBFB4C); + + // Lime + Color get limeA200 => Color(0XFFF8FF4A); + + // Yellow + Color get yellow400 => Color(0XFFE8FF61); + + // Amber + Color get amber300 => Color(0XFFFFDB61); + + Color get blueA20001 => Color(0XFF4C7FE4); + Color get blueA20002 => Color(0XFF5285E8); + +// DeepOrange + Color get deepOrange300 => Color(0XFFFF9969); + Color get deepOrangeA200 => Color(0XFFFF6C2C); + + Color get gray200 => Color(0XFFEFEFEF); + + Color get gray800 => Color(0XFF383838); + +// Green + Color get green600 => Color(0XFF239F57); + Color get green900 => Color(0XFF096A2F); + Color get greenA700 => Color(0XFF13A445); + +// Orange + Color get orange900 => Color(0XFFD15C0B); +// Pink + Color get pink400 => Color(0XFFD44164); + + Color get red900 => Color(0XFFAF000D); + +// Yellow + Color get yellow600 => Color(0XFFFFDA2B); +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/utilities/custom_date_grouping.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/utilities/custom_date_grouping.dart new file mode 100644 index 0000000..115446f --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/utilities/custom_date_grouping.dart @@ -0,0 +1,240 @@ + + +int calcDaysBetween(DateTime from, DateTime to) { + from = DateTime(from.year, from.month, from.day); + to = DateTime(to.year, to.month, to.day); + return (to.difference(from).inHours ~/ 24); +} + +int calcSecondsBetween(DateTime from, DateTime to) { + from = DateTime( + from.year, from.month, from.day, from.hour, from.minute, from.second); + to = DateTime(to.year, to.month, to.day, to.hour, to.minute, to.second); + return to.difference(from).inSeconds; +} + +String customGroup(DateTime transactionDate) { + String response = ''; + DateTime latestDate = DateTime.now(); + int nDaysInBetween = calcDaysBetween(transactionDate, latestDate); + + int years = nDaysInBetween ~/ 365; + + if (years == 1) { + response = 'Last year'; + } else if (years > 1 && years <= 5) { + response = '$years years ago'; + } else if (years > 5) { + response = 'More than 5 years ago'; + } else { + nDaysInBetween -= 365 * years; + + int months = nDaysInBetween ~/ 30; + if (months == 1) { + response = 'Last month'; + } else if (months > 1 && months <= 6) { + response = '$months months ago'; + } else if (months >= 6) { + response = 'More than 6 months ago'; + } else { + int days = latestDate.day - transactionDate.day; + + if (days == 1) { + response = 'Yesterday'; + + + } else if (days > 1 && days <= 7) { + response = 'This week'; + } else if (days > 7 && days <= 14) { + response = 'Last week'; + } else if (days > 14 && days <= 30) { + int weeks = days ~/ 7; + response = '$weeks weeks ago'; + } else { + response = 'Today'; + } + } + } + return response; +} + +int customGroupComparator(String group1, String group2) { + int comparison = -1; + int group1Match = 0; + int group2Match = 0; + List dateGroups = [ + r'Today', + r'Yesterday', + r'This week', + r'Last week', + r'\d{1} weeks ago', + r'Last month', + r'\d{1} months ago', + r'More than 6 months ago', + r'Last year', + r'\d{1} years ago', + r'More than 5 years ago', + ]; + + for (var i = 0; i < dateGroups.length; i++) { + if (RegExp(dateGroups[i]).hasMatch(group1)) { + group1Match = i; + } + if (RegExp(dateGroups[i]).hasMatch(group2)) { + group2Match = i; + } + } + // check + if (group1Match == group2Match) { + comparison = group1.compareTo(group2); + } else if (group1Match < group2Match) { + comparison = -1; + } else { + comparison = 1; + } + return comparison; +} + +String dateFormatter(String dateGroup, DateTime transactionDate) { + String formattedDate = ''; + if (dateGroup == 'Today') { + formattedDate = _formatTime1(transactionDate); + } else if (dateGroup == 'Yesterday') { + formattedDate = + "Yesterday at ${formatTime2(transactionDate.hour, transactionDate.minute)}"; + } else { + formattedDate = + "${transactionDate.day}-${transactionDate.month}-${transactionDate.year} at ${formatTime2(transactionDate.hour, transactionDate.minute)}"; + } + return formattedDate; +} + +String formatTime2(int hrs, int mins) { + int newHrs = 0; + String midDayStatus = ''; + String minutesAsString=mins<10?"0$mins":"$mins"; + if (hrs > 12 && hrs < 24) { + midDayStatus = 'PM'; + newHrs = hrs - 12; + } else if (hrs == 12 && mins > 0) { + midDayStatus = 'PM'; + newHrs = 12; + } else if (hrs < 12) { + midDayStatus = 'AM'; + newHrs = hrs; + } else if (hrs == 24) { + midDayStatus = 'AM'; + newHrs = 00; + } + + return "$newHrs:$minutesAsString $midDayStatus"; +} + +String formatTime3(String date) { + DateTime someDate = DateTime.parse(date); + int hrs = someDate.hour; + dynamic mins = someDate.minute; + int newHrs = 0; + String midDayStatus = ''; + + if (hrs > 12 && hrs < 24) { + midDayStatus = 'PM'; + newHrs = hrs - 12; + } else if (hrs == 12 && mins > 0) { + midDayStatus = 'PM'; + newHrs = 12; + } else if (hrs < 12) { + midDayStatus = 'AM'; + newHrs = hrs; + } else if (hrs == 24) { + midDayStatus = 'AM'; + newHrs = 00; + } + + if (mins<=9) { + mins="0$mins"; + } + + return "$newHrs:$mins $midDayStatus"; +} + +String _formatTime1(DateTime transactionDate) { + DateTime latestDate = DateTime.now(); + + int seconds = calcSecondsBetween(transactionDate, latestDate); + + int minutes = seconds ~/ 60; + int hours = minutes ~/ 60; + + String response = ''; + if (hours == 1) { + response = 'an hour ago'; + } else if (hours > 1 && hours < 24) { + response = '$hours hours ago'; + } else { + if (minutes > 30) { + response = 'half an hour ago'; + } else if (minutes <= 30 && minutes > 1) { + response = '$minutes minutes ago'; + } else if (minutes == 1) { + response = 'a minute ago'; + } else { + if (seconds <= 0) { + response = 'just now'; + } else if (seconds == 1) { + response = 'a second ago'; + } else { + response = '$seconds seconds ago'; + } + } + } + return response; +} + + +String dateToWords(DateTime transactionDate) { + String day = _formatDay(transactionDate.day); + String month = _findMonthInWords(transactionDate.month); + return "$day $month, ${transactionDate.year}"; +} + +//? FUNCTION FOR RETRIEVING ORDINALS +String _formatDay(int day) { + String suffix = ''; + if (day >= 11 && day<=13) { + suffix = 'th'; + } else { + switch (day % 10) { + case 1: + suffix = 'st'; + break; + case 2: + suffix = 'nd'; + break; + case 3: + suffix = 'rd'; + break; + default: + suffix = 'th'; + } + } + return "$day$suffix"; +} + +String _findMonthInWords(int month) { + List months = [ + 'January', + 'February', + 'March', + 'April', + 'May', + 'June', + 'July', + 'August', + 'September', + 'October', + 'November', + 'December' + ]; + return months[month - 1]; +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/utilities/display_error_alert.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/utilities/display_error_alert.dart new file mode 100644 index 0000000..f52d22d --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/utilities/display_error_alert.dart @@ -0,0 +1,150 @@ +import 'package:flutter/material.dart'; + +import '../database/login_info_storage.dart'; +import '../database/user_data_storage.dart'; +import '../screens/Login Screen/login_screen_f.dart'; + +Future _deleteLoggedInUserData() async { + List deletionStatus = await Future.wait( + [LoginInfoStorage().deleteFile(), UserDataStorage().deleteFile()]); + return deletionStatus.first && deletionStatus.last; +} + +void showErrorAlert(BuildContext context, Map error) { + Map errorTypes = { + 'error': _CommonError(context, error), + 'internetConnectionError': _LocalError(context, error), + 'localDBError': _LocalError(context, error), + 'authenticationError': _CommonError(context, error), + 'apiAuthorizationError': _HazardousError(context, error), + 'corruptedTokenError': _HazardousError(context, error) + }; + String currentError = error.keys.first; + // String currentError = error['operationMessage']; + + showDialog( + context: context, + barrierDismissible: false, + builder: (context) => AlertDialog( + title: const Text( + "Error", + textAlign: TextAlign.center, + ), + content: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: errorTypes[currentError].errorDescription, + ), + shape: + RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)), + actionsAlignment: MainAxisAlignment.center, + actions: [ + Container( + height: 48, + decoration: BoxDecoration( + boxShadow: [ + BoxShadow( + color: Colors.blueGrey.shade100, + offset: const Offset(0, 4), + blurRadius: 5.0) + ], + gradient: const RadialGradient( + colors: [Color(0xff0070BA), Color(0xff1546A0)], + radius: 8.4, + center: Alignment(-0.24, -0.36)), + borderRadius: BorderRadius.circular(10), + ), + child: ElevatedButton( + onPressed: errorTypes[currentError].onClose, + child: const Text('OK'), + style: ElevatedButton.styleFrom( + backgroundColor: Colors.transparent, + shadowColor: Colors.transparent, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10)), + )), + ) + ], + )); +} + +class _CommonError { + BuildContext context; + Map error; + _CommonError(this.context, this.error); + List get errorDescription => [ + Padding( + padding: const EdgeInsets.only(top: 24, bottom: 12), + child: Text( + error[error['operationMessage']], + textAlign: TextAlign.center, + ), + ), + ]; + + void onClose() { + Navigator.of(context).pop(); + } +} + +class _LocalError { + BuildContext context; + Map error; + _LocalError(this.context, this.error); + + List get errorDescription => [ + error.keys.first == 'internetConnectionError' + ? ColorFiltered( + colorFilter: + const ColorFilter.mode(Color(0xFF0070BA), BlendMode.color), + child: ColorFiltered( + colorFilter: + const ColorFilter.mode(Colors.grey, BlendMode.saturation), + child: Image.asset( + 'assets/images/notification_assets/no-wifi.png', + height: 48, + width: 48, + ), + )) + : Image.asset( + 'assets/images/notification_assets/file-error.png', + height: 48, + width: 48, + ), + Padding( + padding: const EdgeInsets.only(top: 24, bottom: 12), + child: Text( + error[error.keys.first], + textAlign: TextAlign.center, + ), + ), + ]; + + void onClose() { + Navigator.of(context).pop(); + } +} + +class _HazardousError { + BuildContext context; + Map error; + _HazardousError(this.context, this.error); + List get errorDescription => [ + Padding( + padding: const EdgeInsets.only(top: 24, bottom: 12), + child: Text( + error[error.keys.first], + textAlign: TextAlign.center, + ), + ), + ]; + + void onClose() async { + final logOutStatus = await _deleteLoggedInUserData(); + if (logOutStatus) { + Navigator.of(context).pushAndRemoveUntil( + MaterialPageRoute(builder: (context) => const LoginScreenF(true)), + (route) => false); + } + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/utilities/hadwin_icons.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/utilities/hadwin_icons.dart new file mode 100644 index 0000000..7580c2e --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/utilities/hadwin_icons.dart @@ -0,0 +1,27 @@ +/// Flutter icons HadWinIcons +/// Copyright (C) 2022 by original authors @ fluttericon.com, fontello.com +/// This font was generated by FlutterIcon.com, which is derived from Fontello. +/// +/// To use this font, place it in your fonts/ directory and include the +/// following in your pubspec.yaml +/// +/// flutter: +/// fonts: +/// - family: HadWinIcons +/// fonts: +/// - asset: fonts/HadWinIcons.ttf +/// +/// +/// +import 'package:flutter/widgets.dart'; + +class HadWinIcons { + HadWinIcons._(); + + static const _kFontFam = 'HadWinIcons'; + static const String? _kFontPkg = null; + + static const IconData wallet_business_and_trade = IconData(0xe801, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData wallet_education_29 = IconData(0xe802, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData line_awesome_wallet_solid = IconData(0xe803, fontFamily: _kFontFam, fontPackage: _kFontPkg); +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/utilities/hadwin_markdown_viewer.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/utilities/hadwin_markdown_viewer.dart new file mode 100644 index 0000000..e2ed8c5 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/utilities/hadwin_markdown_viewer.dart @@ -0,0 +1,189 @@ +import 'dart:io'; + +import 'package:fade_shimmer/fade_shimmer.dart'; +import 'package:flutter/material.dart'; + +import 'package:http/http.dart' as http; + +import '/utilities/display_error_alert.dart'; + +class HadWinMarkdownViewer extends StatefulWidget { + final String screenName; + final String urlRequested; + + const HadWinMarkdownViewer({ + Key? key, + required this.screenName, + required this.urlRequested, + }) : super(key: key); + + @override + HadWinMarkdownViewerState createState() => HadWinMarkdownViewerState(); +} + +class HadWinMarkdownViewerState extends State { + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Colors.white, + appBar: AppBar( + title: Text( + widget.screenName, + style: TextStyle(fontSize: 24), + ), + centerTitle: true, + backgroundColor: Colors.transparent, + foregroundColor: Color(0xff243656), + elevation: 0, + ), + body: Column( + children: [ + Expanded( + child: Container( + height: 100, + width: MediaQuery.of(context).size.width - 20, + padding: EdgeInsets.only( + left: 16.18, + right: 16.18, + bottom: 16.18, + top: 6.18, + ), + child: FutureBuilder( + future: getTextData(widget.urlRequested), + builder: (context, snapshot) { + if (snapshot.hasData) { + print('testing'); + + // return MarkdownWidgetBuilder( + // markdownData: snapshot.data!, + // styleConfig: MarkdownWidgetConfig( + // markdownTheme: MarkdownTheme( + // blockquoteDecoration: BoxDecoration( + // color: Color(0xffcaf0f8), + // ), + // blockquoteTextStyle: TextStyle( + // color: Color(0xff0077b6), + // ), + // tableConfig: TableConfig( + // headerStyle: TextStyle( + // fontWeight: FontWeight.w700, + // ), + // bodyTextConfig: TextConfig( + // textAlign: TextAlign.center, + // ), + // ), + // titleConfig: TitleConfig( + // commonStyle: GoogleFonts.ubuntu(), + // showDivider: false, + // ), + // ulConfig: UlConfig( + // textStyle: GoogleFonts.workSans(), + // dotWidget: (deep, index) => Text( + // "${index + 1}.\t", + // style: GoogleFonts.ubuntu(), + // ), + // ), + // olConfig: OlConfig( + // textStyle: GoogleFonts.workSans(), + // indexWidget: (deep, index) => Text( + // "${index + 1}.\t", + // style: GoogleFonts.ubuntu(), + // ), + // ), + // pConfig: PConfig( + // textStyle: GoogleFonts.workSans(), + // onLinkTap: (url) { + // launchExternalURL(url!).then( + // (value) => + // debugPrint("requested to access $url"), + // ); + // }, + // emStyle: const TextStyle( + // fontWeight: FontWeight.w600, + // backgroundColor: Color(0xffccff33), + // fontStyle: FontStyle.italic, + // ), + // ), + // codeConfig: CodeConfig( + // codeStyle: GoogleFonts.spaceMono( + // backgroundColor: Color(0xff4a4e69), + // fontWeight: FontWeight.w600, + // color: Colors.white, + // ), + // ), + // ), + // ), + // builder: (context, content) { + // return content; + // }, + // ); + } + return docsLoading(); + }, + ), + ), + ), + ], + ), + ); + } + + Future getTextData(String url) async { + var response; + try { + response = await http.get(Uri.parse(url)); + } on SocketException { + showErrorAlert( + context, + {'internetConnectionError': 'no internet connection'}, + ); + } catch (e) { + showErrorAlert(context, {'error': "something went wrong"}); + } + return response.body; + } + + Widget docsLoading() { + return ListView.separated( + itemBuilder: (context, index) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + child: FadeShimmer( + height: 27, + width: 100, + radius: 7.2, + highlightColor: Color(0xffced4da), + baseColor: Color(0xffe9ecef), + ), + padding: EdgeInsets.symmetric(horizontal: 5, vertical: 1.618), + ), + ...List.generate( + 4, + (i) => Container( + child: FadeShimmer( + height: 21, + width: MediaQuery.of(context).size.width - 24, + radius: 7.2, + highlightColor: Color(0xffced4da), + baseColor: Color(0xffe9ecef), + ), + padding: EdgeInsets.symmetric(horizontal: 5, vertical: 1.618), + ), + ).toList(), + ], + ); + }, + separatorBuilder: (_, b) => SizedBox( + height: 10, + ), + itemCount: 5, + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/utilities/make_api_request.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/utilities/make_api_request.dart new file mode 100644 index 0000000..fa4a043 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/utilities/make_api_request.dart @@ -0,0 +1,91 @@ +import 'dart:convert'; +import 'dart:io'; +import 'package:dio/dio.dart'; + +import '/resources/api_constants.dart'; +import 'package:http/http.dart' as http; + +const String baseUrl = ApiConstants.baseUrl; +final Dio dio = Dio(); + +Future> sendData({ + required String urlPath, + required Map data, + String? authKey, +}) async { + String backendServiceHost = ApiConstants.baseUrl + urlPath; + var response; + try { + response = await http.post( + Uri.parse(backendServiceHost), + headers: { + 'Content-Type': 'application/json', + if (authKey != null) 'Authorization': authKey + }, + body: jsonEncode(data), + ); + } on http.ClientException catch (e) { + // Handle ClientException + return {'ClientException': ' ${e.message}'}; + } on Exception catch (e) { + // Handle other exceptions + return {'error': 'Exception: $e'}; + } + + // Check if response is null + if (response == null) { + return {'error': 'Null response'}; + } + + // Check if the status code indicates success + if (response.statusCode == 200) { + return jsonDecode(response.body); + } else { + // Return error if the status code is not 200 + return {'error': 'HTTP error: ${response.statusCode}'}; + } +} + +Future> getUser(int userId) async { + try { + // final token = await TokenManager.getToken(); + // dio.options.headers['Authorization'] = 'Bearer $token'; + final response = await dio.get('$baseUrl/token/getuser/$userId'); + // final entities = (response.data).cast>(); + // print(response.data); + return response.data; + } catch (e) { + throw Exception('Failed to get all User: $e'); + } +} + +// Future> sendData( +// {required String urlPath, +// required Map data, +// String? authKey}) async { +// String backendServiceHost = ApiConstants.baseUrl + urlPath; +// var response; +// try { +// response = await http.post( +// Uri.parse(backendServiceHost), +// headers: { +// 'Content-Type': 'application/json', +// if (authKey != null) 'Authorization': authKey +// }, +// body: jsonEncode(data), +// ); +// } on SocketException { +// return {'internetConnectionError': 'no internet connection'}; +// } +// return jsonDecode(response.body); +// } + +Future checkUrlValidity(String url) async { + try { + final response = await http.get(Uri.parse(url)); + + return response.statusCode; + } catch (e) { + return 404; + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/utilities/slide_right_route.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/utilities/slide_right_route.dart new file mode 100644 index 0000000..c7a89ce --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/utilities/slide_right_route.dart @@ -0,0 +1,29 @@ +// page slide transition effect +import 'package:flutter/material.dart'; + +class SlideRightRoute extends PageRouteBuilder { + final Widget page; + SlideRightRoute({required this.page}) + : super( + pageBuilder: ( + BuildContext context, + Animation animation, + Animation secondaryAnimation, + ) => + page, + transitionsBuilder: ( + BuildContext context, + Animation animation, + Animation secondaryAnimation, + Widget child, + ) => + SlideTransition( + textDirection: TextDirection.rtl, + position: Tween( + begin: const Offset(-1, 0), + end: Offset.zero, + ).animate(animation), + child: child, + ), + ); +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/utilities/url_external_launcher.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/utilities/url_external_launcher.dart new file mode 100644 index 0000000..5d6f684 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/utilities/url_external_launcher.dart @@ -0,0 +1,12 @@ + import 'package:url_launcher/url_launcher.dart'; + +Future launchExternalURL(String url) async { + Uri uri =Uri.parse(url); + + if (await canLaunchUrl(uri)) { + await launchUrl(uri,mode: LaunchMode.externalApplication); + } + // else { + // throw 'Could not launch $url'; + // } + } diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/utils/color_constants.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/utils/color_constants.dart new file mode 100644 index 0000000..1b9f1ab --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/utils/color_constants.dart @@ -0,0 +1,173 @@ +import 'dart:ui'; +import 'package:flutter/material.dart'; + +class ColorConstant { + static Color gray5001 = fromHex('#f6f7fb'); + + static Color purple211 = const Color.fromARGB(255, 93, 63, 211); + + static Color gray5002 = fromHex('#f8f9fa'); + + static Color black900B2 = fromHex('#b2000000'); + + static Color gray5003 = fromHex('#fafcff'); + + static Color lightBlue100 = fromHex('#b0e5fc'); + + static Color gray80049 = fromHex('#493c3c43'); + + static Color yellow9003f = fromHex('#3feb9612'); + + static Color iris = fromHex('5D3FD3'); + + static Color red200 = fromHex('#fa9a9a'); + + static Color gray4004c = fromHex('#4cc4c4c4'); + + static Color blueA200 = fromHex('#468ee5'); + + static Color greenA100 = fromHex('#b5eacd'); + + static Color black9003f = fromHex('#3f000000'); + + static Color gray30099 = fromHex('#99e4e4e4'); + + static Color black90087 = fromHex('#87000000'); + + static Color whiteA70099 = fromHex('#99ffffff'); + + static Color black90001 = fromHex('#000000'); + + static Color blueGray90002 = fromHex('#24363c'); + + static Color blueGray90001 = fromHex('#2e3637'); + + static Color blueGray700 = fromHex('#535763'); + + static Color blueGray900 = fromHex('#262b35'); + + static Color black90003 = fromHex('#0b0a0a'); + + static Color black90002 = fromHex('#090b0d'); + + static Color redA700 = fromHex('#d80027'); + + static Color black90004 = fromHex('#000000'); + + static Color gray400 = fromHex('#c4c4c4'); + + static Color blue900 = fromHex('#003399'); + + static Color blueGray100 = fromHex('#d6dae2'); + + static Color blue700 = fromHex('#1976d2'); + + static Color blueGray300 = fromHex('#9ea8ba'); + + static Color amber500 = fromHex('#feb909'); + + static Color redA200 = fromHex('#fe555d'); + + static Color gray80099 = fromHex('#993c3c43'); + + static Color black9000c = fromHex('#0c000000'); + + static Color gray200 = fromHex('#efefef'); + + static Color gray60026 = fromHex('#266d6d6d'); + + static Color blue50 = fromHex('#e0ebff'); + + static Color indigo400 = fromHex('#4168d7'); + + static Color blueGray1006c = fromHex('#6cd1d3d4'); + + static Color black90011 = fromHex('#11000000'); + + static Color gray40001 = fromHex('#b3b3b3'); + + static Color whiteA70067 = fromHex('#67ffffff'); + + static Color gray10001 = fromHex('#fbf1f2'); + + static Color black90019 = fromHex('#19000000'); + + static Color blueGray40001 = fromHex('#888888'); + + static Color whiteA700 = fromHex('#ffffff'); + + static Color blueGray50 = fromHex('#eaecf0'); + + static Color red700 = fromHex('#d03329'); + + static Color blueA700 = fromHex('#0061ff'); + + static Color blueGray10001 = fromHex('#d6d6d6'); + + static Color gray60019 = fromHex('#197e7e7e'); + + static Color green600 = fromHex('#349765'); + + static Color blueA70001 = fromHex('#0068ff'); + + static Color gray50 = fromHex('#f9fbff'); + + static Color red100 = fromHex('#f6d6d4'); + + static Color blueGray20001 = fromHex('#adb5bd'); + + static Color black900 = fromHex('#000919'); + + static Color blueGray800 = fromHex('#37334d'); + + static Color blue5001 = fromHex('#eef4ff'); + + static Color deepOrange400 = fromHex('#d58c48'); + + static Color deepOrangeA400 = fromHex('#ff4b00'); + + static Color gray70011 = fromHex('#11555555'); + + static Color indigoA20033 = fromHex('#334871e3'); + + static Color gray90002 = fromHex('#0d062d'); + + static Color gray700 = fromHex('#666666'); + + static Color blueGray200 = fromHex('#bac1ce'); + + static Color blueGray400 = fromHex('#74839d'); + + static Color blue800 = fromHex('#2953c7'); + + static Color blueGray600 = fromHex('#5f6c86'); + + static Color gray900 = fromHex('#2a2a2a'); + + static Color gray90001 = fromHex('#212529'); + + static Color gray300 = fromHex('#d2efe0'); + + static Color gray30001 = fromHex('#e3e4e5'); + + static Color gray100 = fromHex('#f3f4f5'); + + static Color black90075 = fromHex('#75000000'); + + static Color deepOrangeA10033 = fromHex('#33dfa874'); + + static Color gray70026 = fromHex('#26555555'); + + static Color black90033 = fromHex('#33000000'); + + static Color blue200 = fromHex('#a6c8ff'); + + static Color purple900 = Colors.purple.shade900; + + static Color fromHex(String hexString) { + final buffer = StringBuffer(); + if (hexString.length == 6 || hexString.length == 7) buffer.write('ff'); + buffer.write(hexString.replaceFirst('#', '')); + return Color(int.parse(buffer.toString(), radix: 16)); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/utils/image_constant.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/utils/image_constant.dart new file mode 100644 index 0000000..b9694f3 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/utils/image_constant.dart @@ -0,0 +1,463 @@ +class ImageConstant { + //cloudnsuresp.svg + + static String imgLogoSplash = 'assets/images/cloudnsuresp.svg'; + + static String imgRectangle458706x396 = + 'assets/images/img_rectangle458_706x396.png'; + + static String imgVscodeiconsfiletypeexcel = + 'assets/images/img_vscodeiconsfiletypeexcel.svg'; + + static String imgGroup10737 = 'assets/images/img_group10737.svg'; + + static String imgX32locationRed700 = + 'assets/images/img_x32location_red_700.svg'; + + static String imgCar = 'assets/images/img_car.svg'; + + static String imgArrowrightWhiteA700 = + 'assets/images/img_arrowright_white_a700.svg'; + + static String imgMinussolid = 'assets/images/img_minussolid.svg'; + + static String imgSearchWhiteA70020x20 = + 'assets/images/img_search_white_a700_20x20.svg'; + + static String imgSettings24x24 = 'assets/images/img_settings_24x24.svg'; + + static String imgArrowgrowthsolidRed700 = + 'assets/images/img_arrowgrowthsolid_red_700.svg'; + + static String imgPlus1 = 'assets/images/img_plus_1.svg'; + + static String imgArrowupBlueGray400 = + 'assets/images/img_arrowup_blue_gray_400.svg'; + + static String imgTwitter20x20 = 'assets/images/img_twitter_20x20.svg'; + + static String imgClose18x18 = 'assets/images/img_close_18x18.svg'; + + static String imgRectangle102x1021 = + 'assets/images/img_rectangle_102x102_1.png'; + + static String imgRectangle1 = 'assets/images/img_rectangle1.png'; + + static String imgGrid = 'assets/images/img_grid.svg'; + + static String imgClose24x24 = 'assets/images/img_close_24x24.svg'; + + static String imgRefresh = 'assets/images/img_refresh.svg'; + + static String imgPlus40x40 = 'assets/images/img_plus_40x40.svg'; + + static String imgVectorBlueA70034x360 = + 'assets/images/img_vector_blue_a700_34x360.svg'; + + static String imgMenu1 = 'assets/images/img_menu_1.svg'; + + static String imgInfo = 'assets/images/img_info.svg'; + + static String imgFile24x24 = 'assets/images/img_file_24x24.svg'; + + static String imgVector = 'assets/images/img_vector.svg'; + + static String imgArrowleft = 'assets/images/img_arrowleft.svg'; + + static String imgGroup9839 = 'assets/images/img_group9839.svg'; + + static String imgImage125 = 'assets/images/img_image125.png'; + + static String imgWordpresslogo1 = 'assets/images/img_wordpresslogo1.png'; + + static String imgRectangle126x1266 = + 'assets/images/img_rectangle_126x126_6.png'; + + static String imgArrowdown = 'assets/images/img_arrowdown.svg'; + + static String imgGroup10785 = 'assets/images/img_group10785.svg'; + + static String imgContrast = 'assets/images/img_contrast.svg'; + + static String imgLinkedin = 'assets/images/img_linkedin.svg'; + + static String imgClose = 'assets/images/img_close.svg'; + + static String imgMusic = 'assets/images/img_music.svg'; + + static String imgLock = 'assets/images/img_lock.svg'; + + static String imgEllipse1224x241 = 'assets/images/img_ellipse12_24x24_1.png'; + + static String img8148x48 = 'assets/images/img_81_48x48.png'; + + static String imgProfileimglarge40x404 = + 'assets/images/img_profileimglarge_40x40_4.png'; + + static String imgMenu = 'assets/images/img_menu.svg'; + + static String imgFile16x16 = 'assets/images/img_file_16x16.svg'; + + static String imgRefresh24x24 = 'assets/images/img_refresh_24x24.svg'; + + static String imgChartsmicroBlue5045x150 = + 'assets/images/img_chartsmicro_blue_50_45x150.svg'; + + static String imgSearchBlueGray400 = + 'assets/images/img_search_blue_gray_400.svg'; + + static String imgSort = 'assets/images/img_sort.svg'; + + static String imgDownload = 'assets/images/img_download.svg'; + + static String imgClock = 'assets/images/img_clock.svg'; + + static String imgSettings1 = 'assets/images/img_settings_1.svg'; + + static String imgPic50x503 = 'assets/images/img_pic_50x50_3.png'; + + static String imgRectangle1314190x3962 = + 'assets/images/img_rectangle1314_190x396_2.png'; + + static String imgFacebook = 'assets/images/img_facebook.svg'; + + static String imgRectangle116x161 = + 'assets/images/img_rectangle1_16x16_1.png'; + + static String imgFlagargentina1 = 'assets/images/img_flagargentina1.png'; + + static String imgFingerprint = 'assets/images/img_fingerprint.svg'; + + static String imgGoogleadsenselogo = + 'assets/images/img_googleadsenselogo.png'; + + static String imgRectangle116x16 = 'assets/images/img_rectangle1_16x16.png'; + + static String imgArrowrightBlueGray400 = + 'assets/images/img_arrowright_blue_gray_400.svg'; + + static String imgPic44x44 = 'assets/images/img_pic_44x44.png'; + + static String imgAppstoreicon = 'assets/images/img_appstoreicon.png'; + + static String imgChart = 'assets/images/img_chart.png'; + + static String imgArrowright = 'assets/images/img_arrowright.svg'; + + static String imgRupaylogo1 = 'assets/images/img_rupaylogo1.png'; + + static String imgRectangle126x1267 = + 'assets/images/img_rectangle_126x126_7.png'; + + static String imgProfileimglarge25 = + 'assets/images/img_profileimglarge_25.png'; + + static String imgRectangle126x1261 = + 'assets/images/img_rectangle_126x126_1.png'; + + static String imgEllipse1524x24 = 'assets/images/img_ellipse15_24x24.png'; + + static String imgPic3 = 'assets/images/img_pic_3.png'; + + static String imgPic50x502 = 'assets/images/img_pic_50x50_2.png'; + + static String imgPic4 = 'assets/images/img_pic_4.png'; + + static String imgRupaylogo118x56 = 'assets/images/img_rupaylogo1_18x56.png'; + + static String imgEllipse360x602 = 'assets/images/img_ellipse3_60x60_2.png'; + + static String imgUser24x24 = 'assets/images/img_user_24x24.svg'; + + static String imgImage123 = 'assets/images/img_image123.png'; + + static String imgArrowrightBlueGray6001 = + 'assets/images/img_arrowright_blue_gray_600_1.svg'; + + static String imgUser = 'assets/images/img_user.svg'; + + static String imgGlobeYellow80018x18 = + 'assets/images/img_globe_yellow_800_18x18.svg'; + + static String imgPic1 = 'assets/images/img_pic_1.png'; + + static String imgGlobe = 'assets/images/img_globe.svg'; + + static String imgCalendarBlueGray400 = + 'assets/images/img_calendar_blue_gray_400.svg'; + + static String imgClose53x53 = 'assets/images/img_close_53x53.svg'; + + static String imgDashboard = 'assets/images/img_dashboard.svg'; + + static String imgRectangle126x1263 = + 'assets/images/img_rectangle_126x126_3.png'; + + static String imgAirplaneBlack900 = + 'assets/images/img_airplane_black_900.svg'; + + static String imgForward = 'assets/images/img_forward.svg'; + + static String imgGroup10210 = 'assets/images/img_group10210.svg'; + + static String imgShare24x24 = 'assets/images/img_share_24x24.svg'; + + static String imgLightbulb = 'assets/images/img_lightbulb.svg'; + + static String imgSearchBlueGray900 = + 'assets/images/img_search_blue_gray_900.svg'; + + static String imgImage122 = 'assets/images/img_image122.png'; + + static String imgPic44x441 = 'assets/images/img_pic_44x44_1.png'; + + static String imgSignal10x56 = 'assets/images/img_signal_10x56.svg'; + + static String imgUiiconmoonlight = 'assets/images/img_uiiconmoonlight.svg'; + + static String img1200pxpdffileicon = + 'assets/images/img_1200pxpdffileicon.png'; + + static String imgSettings = 'assets/images/img_settings.svg'; + + static String imgChartsmicroBlue501 = + 'assets/images/img_chartsmicro_blue_50_1.svg'; + + static String imgArrowdownBlueGray200 = + 'assets/images/img_arrowdown_blue_gray_200.svg'; + + static String imgGlobeWhiteA700 = 'assets/images/img_globe_white_a700.svg'; + + static String imgFire = 'assets/images/img_fire.svg'; + + static String imgVector3Gray90001 = + 'assets/images/img_vector3_gray_900_01.svg'; + + static String imgEllipse5150x150 = 'assets/images/img_ellipse5_150x150.png'; + + static String imgClose32x48 = 'assets/images/img_close_32x48.svg'; + + static String imgArrowdownBlueGray600 = + 'assets/images/img_arrowdown_blue_gray_600.svg'; + + static String imgCheckmark16x16 = 'assets/images/img_checkmark_16x16.svg'; + + static String imgCheckmarkGreen600 = + 'assets/images/img_checkmark_green_600.svg'; + + static String imgArrowrightBlueGray600 = + 'assets/images/img_arrowright_blue_gray_600.svg'; + + static String imgSearchBlueGray200 = + 'assets/images/img_search_blue_gray_200.svg'; + + static String imgRectangle126x1262 = + 'assets/images/img_rectangle_126x126_2.png'; + + static String imgCalendar24x24 = 'assets/images/img_calendar_24x24.svg'; + + static String imgVectorRed600 = 'assets/images/img_vector_red_600.svg'; + + static String imgSignal = 'assets/images/img_signal.svg'; + + static String imgProfileimglarge40x403 = + 'assets/images/img_profileimglarge_40x40_3.png'; + + static String imgLinkedin11 = 'assets/images/img_linkedin_1_1.svg'; + + static String imgPlay = 'assets/images/img_play.svg'; + + static String imgUpload = 'assets/images/img_upload.svg'; + + static String imgEllipse1224x242 = 'assets/images/img_ellipse12_24x24_2.png'; + + static String imgMap = 'assets/images/img_map.svg'; + + static String imgLock24x24 = 'assets/images/img_lock_24x24.svg'; + + static String imgRectangle458530x396 = + 'assets/images/img_rectangle458_530x396.png'; + + static String imgEllipse5418x18 = 'assets/images/img_ellipse54_18x18.png'; + + static String imgGroup10720 = 'assets/images/img_group10720.svg'; + + static String imgNotification = 'assets/images/img_notification.svg'; + + static String imgSignalGray500 = 'assets/images/img_signal_gray_500.svg'; + + static String imgRectangle126x1265 = + 'assets/images/img_rectangle_126x126_5.png'; + + static String imgMobile = 'assets/images/img_mobile.svg'; + + static String imgArrowdownBlueGray400 = + 'assets/images/img_arrowdown_blue_gray_400.svg'; + + static String imgEllipse28 = 'assets/images/img_ellipse28.png'; + + static String imgGroup185 = 'assets/images/img_group185.svg'; + + static String imgCheck1 = 'assets/images/img_check1.png'; + + static String imgPic44x443 = 'assets/images/img_pic_44x44_3.png'; + + static String imgPic50x501 = 'assets/images/img_pic_50x50_1.png'; + + static String imgVolume = 'assets/images/img_volume.svg'; + + static String imgSearch = 'assets/images/img_search.svg'; + + static String imgMail = 'assets/images/img_mail.svg'; + + static String imgGlobeYellow800 = 'assets/images/img_globe_yellow_800.svg'; + + static String imgGlobe18x18 = 'assets/images/img_globe_18x18.svg'; + + static String imgBluetoothbsolid = 'assets/images/img_bluetoothbsolid.svg'; + + static String imgFile = 'assets/images/img_file.svg'; + + static String imgSearchWhiteA700 = 'assets/images/img_search_white_a700.svg'; + + static String imgFile26x26 = 'assets/images/img_file_26x26.svg'; + + static String imgPlusWhiteA700 = 'assets/images/img_plus_white_a700.svg'; + + static String imgEdit = 'assets/images/img_edit.svg'; + + static String imgRectangle126x1268 = + 'assets/images/img_rectangle_126x126_8.png'; + + static String imgWhatsapp = 'assets/images/img_whatsapp.svg'; + + static String imgCall = 'assets/images/img_call.svg'; + + static String imgLocation = 'assets/images/img_location.svg'; + + static String imgGroup10451 = 'assets/images/img_group10451.svg'; + + static String imgGroup97 = 'assets/images/img_group97.svg'; + + static String imgEllipse6624x24 = 'assets/images/img_ellipse66_24x24.png'; + + static String imgStar = 'assets/images/img_star.svg'; + + static String imgCheckmark = 'assets/images/img_checkmark.svg'; + + static String imgTwitter = 'assets/images/img_twitter.svg'; + + static String img2560pxstripel = 'assets/images/img_2560pxstripel.png'; + + static String imgSportscricket = 'assets/images/img_sportscricket.svg'; + + static String imgOverflowmenuWhiteA700 = + 'assets/images/img_overflowmenu_white_a700.svg'; + + static String imgGoogle = 'assets/images/img_google.svg'; + + static String imgFrame9880 = 'assets/images/img_frame9880.svg'; + + static String imgVectorBlueA70013x141 = + 'assets/images/img_vector_blue_a700_13x141.svg'; + + static String imgTicket = 'assets/images/img_ticket.svg'; + + static String imgSmartwatchwhitesportband = + 'assets/images/img_smartwatchwhitesportband.svg'; + + static String imgProfileimglarge40x402 = + 'assets/images/img_profileimglarge_40x40_2.png'; + + static String imgPic = 'assets/images/img_pic.png'; + + static String imgEllipse1324x252 = 'assets/images/img_ellipse13_24x25_2.png'; + + static String imgOverflowmenu1 = 'assets/images/img_overflowmenu_1.svg'; + + static String imgFlagargentina11 = 'assets/images/img_flagargentina1_1.png'; + + static String imgGlobeWhiteA70018x18 = + 'assets/images/img_globe_white_a700_18x18.svg'; + + static String imgEye = 'assets/images/img_eye.svg'; + + static String imgSearchBlueA700 = 'assets/images/img_search_blue_a700.svg'; + + static String imgPic2 = 'assets/images/img_pic_2.png'; + + static String imgQuestion = 'assets/images/img_question.svg'; + + static String imgMicrophone20x20 = 'assets/images/img_microphone_20x20.svg'; + + static String imgEllipse1324x251 = 'assets/images/img_ellipse13_24x25_1.png'; + + static String imgCheckmark56x56 = 'assets/images/img_checkmark_56x56.svg'; + + static String imgTicket20x20 = 'assets/images/img_ticket_20x20.svg'; + + static String imgLocation20x20 = 'assets/images/img_location_20x20.svg'; + + static String imgFlagargentina132x48 = + 'assets/images/img_flagargentina1_32x48.png'; + + static String imgTrash = 'assets/images/img_trash.svg'; + + static String imgProfileimglarge40x401 = + 'assets/images/img_profileimglarge_40x40_1.png'; + + static String imgCalendar = 'assets/images/img_calendar.svg'; + + static String imgEllipse2718x18 = 'assets/images/img_ellipse27_18x18.png'; + + static String imgSearchBlueA100 = 'assets/images/img_search_blue_a100.svg'; + + static String imgPic44x442 = 'assets/images/img_pic_44x44_2.png'; + + static String imgImage124 = 'assets/images/img_image124.png'; + + static String imgCheckbox = 'assets/images/img_checkbox.svg'; + + static String imgCompanylogo = 'assets/images/img_companylogo.png'; + + static String imgMinimize = 'assets/images/img_minimize.svg'; + + static String imgGroup1830 = 'assets/images/img_group1830.svg'; + + static String imgMicrophone = 'assets/images/img_microphone.svg'; + + static String imgArrowupGreen600 = 'assets/images/img_arrowup_green_600.svg'; + + static String img1200pxdocxicon = 'assets/images/img_1200pxdocxicon.png'; + + static String imgRectangle126x1264 = + 'assets/images/img_rectangle_126x126_4.png'; + + static String imgMoonoutline = 'assets/images/img_moonoutline.svg'; + + static String imgUnsplashenrurz62wui50x50 = + 'assets/images/img_unsplashenrurz62wui_50x50.png'; + + static String imgEllipse360x601 = 'assets/images/img_ellipse3_60x60_1.png'; + + static String imgQuestion24x24 = 'assets/images/img_question_24x24.svg'; + + static String imgArrowrightBlueA7001 = + 'assets/images/img_arrowright_blue_a700_1.svg'; + + static String imgLock53x53 = 'assets/images/img_lock_53x53.svg'; + + static String imgOverflowmenu16x16 = + 'assets/images/img_overflowmenu_16x16.svg'; + + static String imgBrightness = 'assets/images/img_brightness.svg'; + + static String imgArrowleftBlueGray900 = + 'assets/images/img_arrowleft_blue_gray_900.svg'; + + static String imgGroup2507 = 'assets/images/img_group2507.svg'; + + static String imgOverflowmenu = 'assets/images/img_overflowmenu.svg'; + + static String imageNotFound = 'assets/images/image_not_found.png'; +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/utils/size_utils.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/utils/size_utils.dart new file mode 100644 index 0000000..1a3a99c --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/utils/size_utils.dart @@ -0,0 +1,120 @@ +import 'package:flutter/material.dart'; + +// This is where the magic happens. +// This functions are responsible to make UI responsive across all the mobile devices. + +Size size = WidgetsBinding.instance.window.physicalSize / + WidgetsBinding.instance.window.devicePixelRatio; + +// Caution! If you think these are static values and are used to build a static UI, you mustn’t. +// These are the Viewport values of your Figma Design. +// These are used in the code as a reference to create your UI Responsively. +const num FIGMA_DESIGN_WIDTH = 428; +const num FIGMA_DESIGN_HEIGHT = 926; +const num FIGMA_DESIGN_STATUS_BAR = 47; + +///This method is used to get device viewport width. +get width { + return size.width; +} + +///This method is used to get device viewport height. +get height { + num statusBar = + MediaQueryData.fromWindow(WidgetsBinding.instance.window).viewPadding.top; + num bottomBar = MediaQueryData.fromWindow(WidgetsBinding.instance.window) + .viewPadding + .bottom; + num screenHeight = size.height - statusBar - bottomBar; + return screenHeight; +} + +///This method is used to set padding/margin (for the left and Right side) & width of the screen or widget according to the Viewport width. +double getHorizontalSize(double px) { + return ((px * width) / FIGMA_DESIGN_WIDTH); +} + +///This method is used to set padding/margin (for the top and bottom side) & height of the screen or widget according to the Viewport height. +double getVerticalSize(double px) { + return ((px * height) / (FIGMA_DESIGN_HEIGHT - FIGMA_DESIGN_STATUS_BAR)); +} + +///This method is used to set smallest px in image height and width +double getSize(double px) { + var height = getVerticalSize(px); + var width = getHorizontalSize(px); + if (height < width) { + return height.toInt().toDouble(); + } else { + return width.toInt().toDouble(); + } +} + +///This method is used to set text font size according to Viewport +double getFontSize(double px) { + return getSize(px); +} + +///This method is used to set padding responsively +EdgeInsetsGeometry getPadding({ + double? all, + double? left, + double? top, + double? right, + double? bottom, +}) { + return getMarginOrPadding( + all: all, + left: left, + top: top, + right: right, + bottom: bottom, + ); +} + +///This method is used to set margin responsively +EdgeInsetsGeometry getMargin({ + double? all, + double? left, + double? top, + double? right, + double? bottom, +}) { + return getMarginOrPadding( + all: all, + left: left, + top: top, + right: right, + bottom: bottom, + ); +} + +///This method is used to get padding or margin responsively +EdgeInsetsGeometry getMarginOrPadding({ + double? all, + double? left, + double? top, + double? right, + double? bottom, +}) { + if (all != null) { + left = all; + top = all; + right = all; + bottom = all; + } + return EdgeInsets.only( + left: getHorizontalSize( + left ?? 0, + ), + top: getVerticalSize( + top ?? 0, + ), + right: getHorizontalSize( + right ?? 0, + ), + bottom: getVerticalSize( + bottom ?? 0, + ), + ); +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/app_bar/appbar_image.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/app_bar/appbar_image.dart new file mode 100644 index 0000000..4ede171 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/app_bar/appbar_image.dart @@ -0,0 +1,44 @@ +import 'package:flutter/material.dart'; +import '/widgets/custom_image_view.dart'; + +// ignore: must_be_immutable +class AppbarImage extends StatelessWidget { + AppbarImage( + {required this.height, + required this.width, + this.imagePath, + this.svgPath, + this.margin, + this.onTap}); + + double height; + + double width; + + String? imagePath; + + String? svgPath; + + EdgeInsetsGeometry? margin; + + Function? onTap; + + @override + Widget build(BuildContext context) { + return InkWell( + onTap: () { + onTap?.call(); + }, + child: Padding( + padding: margin ?? EdgeInsets.zero, + child: CustomImageView( + svgPath: svgPath, + imagePath: imagePath, + height: height, + width: width, + fit: BoxFit.contain, + ), + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/app_bar/appbar_leading_iconbutton.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/app_bar/appbar_leading_iconbutton.dart new file mode 100644 index 0000000..fb9bcd8 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/app_bar/appbar_leading_iconbutton.dart @@ -0,0 +1,38 @@ +import 'package:flutter/material.dart'; +import '../../core/app_export.dart'; +import '../custom_icon_button.dart'; // ignore: must_be_immutable +// ignore_for_file: must_be_immutable + +// ignore_for_file: must_be_immutable +class AppbarLeadingIconbutton extends StatelessWidget { + AppbarLeadingIconbutton({Key? key, this.imagePath, this.margin, this.onTap}) + : super( + key: key, + ); + + String? imagePath; + + EdgeInsetsGeometry? margin; + + Function? onTap; + + @override + Widget build(BuildContext context) { + return GestureDetector( + onTap: () { + onTap?.call(); + }, + child: Padding( + padding: margin ?? EdgeInsets.zero, + child: CustomIconButton( + height: 32.adaptSize, + width: 32.adaptSize, + decoration: IconButtonStyleHelper.outlineIndigo, + child: CustomImageView( + imagePath: ImageConstant.imgArrowLeft, + ), + ), + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/app_bar/appbar_title.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/app_bar/appbar_title.dart new file mode 100644 index 0000000..96b4f92 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/app_bar/appbar_title.dart @@ -0,0 +1,35 @@ +import 'package:flutter/material.dart'; + +import '../../utils/color_constants.dart'; +import '../../theme/app_style.dart'; + +// ignore: must_be_immutable +class AppbarTitle extends StatelessWidget { + AppbarTitle({required this.text, this.margin, this.onTap}); + + String text; + + EdgeInsetsGeometry? margin; + + Function? onTap; + + @override + Widget build(BuildContext context) { + return GestureDetector( + onTap: () { + onTap?.call(); + }, + child: Padding( + padding: margin ?? EdgeInsets.zero, + child: Text( + text, + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + style: AppStyle.txtGilroySemiBold24.copyWith( + color: ColorConstant.blueGray900, + ), + ), + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/app_bar/custom_app_bar.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/app_bar/custom_app_bar.dart new file mode 100644 index 0000000..602974c --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/app_bar/custom_app_bar.dart @@ -0,0 +1,56 @@ +import 'package:flutter/material.dart'; + +import '../../utils/size_utils.dart'; + +// ignore: must_be_immutable +class CustomAppBar extends StatelessWidget implements PreferredSizeWidget { + CustomAppBar( + {required this.height, + this.leadingWidth, + this.leading, + this.title, + this.bottom, + this.flexibleSpace, + this.centerTitle, + this.actions}); + + double height; + + double? leadingWidth; + + Widget? leading; + + Widget? title; + + PreferredSize? flexibleSpace; + + TabBar? bottom; + + bool? centerTitle; + + List? actions; + + @override + Widget build(BuildContext context) { + return AppBar( + elevation: 0, + toolbarHeight: height, + automaticallyImplyLeading: false, + backgroundColor: Colors.transparent, + leadingWidth: leadingWidth ?? 0, + leading: leading, + title: title, + bottom: bottom, + flexibleSpace: flexibleSpace, + titleSpacing: 0, + centerTitle: centerTitle ?? false, + actions: actions, + ); + } + + @override + Size get preferredSize => Size( + size.width, + height, + ); +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/base_button.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/base_button.dart new file mode 100644 index 0000000..a55e1c3 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/base_button.dart @@ -0,0 +1,42 @@ +import 'package:flutter/material.dart'; +import '../core/app_export.dart'; + +class BaseButton extends StatelessWidget { + BaseButton( + {Key? key, + required this.text, + this.onPressed, + this.buttonStyle, + this.buttonTextStyle, + this.isDisabled, + this.height, + this.width, + this.margin, + this.alignment}) + : super( + key: key, + ); + + final String text; + + final VoidCallback? onPressed; + + final ButtonStyle? buttonStyle; + + final TextStyle? buttonTextStyle; + + final bool? isDisabled; + + final double? height; + + final double? width; + + final EdgeInsets? margin; + + final Alignment? alignment; + + @override + Widget build(BuildContext context) { + return const SizedBox.shrink(); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/customFloatingButton.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/customFloatingButton.dart new file mode 100644 index 0000000..c3f1e42 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/customFloatingButton.dart @@ -0,0 +1,94 @@ +import 'package:flutter/material.dart'; + +import '../utils/color_constants.dart'; +import '../utils/image_constant.dart'; +import '../utils/size_utils.dart'; + +class customFloatingButton extends StatelessWidget { + customFloatingButton({ + this.shape, + this.variant, + this.alignment, + this.margin, + this.onTap, + this.width, + this.height, + this.child, + this.color, + }); + + final FloatingButtonShape? shape; + final FloatingButtonVariant? variant; + final Alignment? alignment; + final EdgeInsetsGeometry? margin; + final VoidCallback? onTap; + final double? width; + final double? height; + final Widget? child; + final Color? color; + + @override + Widget build(BuildContext context) { + return alignment != null + ? Align( + alignment: alignment ?? Alignment.center, + child: _buildFabWidget(), + ) + : _buildFabWidget(); + } + + Widget _buildFabWidget() { + return Padding( + padding: margin ?? EdgeInsets.zero, + child: FloatingActionButton( + backgroundColor: _setColor(), + onPressed: onTap, + child: child, + ), + ); + } + + BoxDecoration _buildDecoration() { + return BoxDecoration( + color: _setColor(), + borderRadius: _setBorderRadius(), + ); + } + + Color _setColor() { + if (color != null) { + return color!; + } + switch (variant) { + case FloatingButtonVariant.FillBlueA700: + return Color(0xFF1976D2); // Example color for FillBlueA700 + default: + return Colors.black; + } + } + + BorderRadius _setBorderRadius() { + switch (shape) { + case FloatingButtonShape.RoundedBorder6: + return BorderRadius.circular( + getHorizontalSize( + 6.00, + ), + ); + default: + return BorderRadius.circular( + getHorizontalSize( + 6.00, + ), + ); + } + } +} + +enum FloatingButtonShape { + RoundedBorder6, +} + +enum FloatingButtonVariant { + FillBlueA700, +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_bottom_bar.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_bottom_bar.dart new file mode 100644 index 0000000..6d69a7e --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_bottom_bar.dart @@ -0,0 +1,133 @@ +import '/widgets/custom_image_view.dart'; +import 'package:flutter/material.dart'; + +import '../utils/color_constants.dart'; +import '../utils/image_constant.dart'; +import '../utils/size_utils.dart'; + +class CustomBottomBar extends StatefulWidget { + CustomBottomBar({this.onChanged}); + + Function(BottomBarEnum)? onChanged; + + @override + _CustomBottomBarState createState() => _CustomBottomBarState(); +} + +class _CustomBottomBarState extends State { + int selectedIndex = 0; + + List bottomMenuList = [ + BottomMenuModel( + icon: ImageConstant.imgFire, + type: BottomBarEnum.Fire, + ), + BottomMenuModel( + icon: ImageConstant.imgSearchWhiteA70020x20, + type: BottomBarEnum.Searchwhitea70020x20, + ), + BottomMenuModel( + icon: ImageConstant.imgMenu, + type: BottomBarEnum.Menu, + ), + BottomMenuModel( + icon: ImageConstant.imgOverflowmenuWhiteA700, + type: BottomBarEnum.Overflowmenuwhitea700, + ) + ]; + + @override + Widget build(BuildContext context) { + return Container( + margin: getMargin( + left: 16, + right: 16, + ), + decoration: BoxDecoration( + color: ColorConstant.blueA700, + borderRadius: BorderRadius.circular( + getHorizontalSize( + 14, + ), + ), + ), + child: BottomNavigationBar( + backgroundColor: Colors.transparent, + showSelectedLabels: false, + showUnselectedLabels: false, + elevation: 0, + currentIndex: selectedIndex, + type: BottomNavigationBarType.fixed, + items: List.generate(bottomMenuList.length, (index) { + return BottomNavigationBarItem( + icon: CustomImageView( + svgPath: bottomMenuList[index].icon, + height: getSize( + 24, + ), + width: getSize( + 24, + ), + color: ColorConstant.whiteA700, + ), + activeIcon: CustomImageView( + svgPath: bottomMenuList[index].icon, + height: getSize( + 24, + ), + width: getSize( + 24, + ), + color: ColorConstant.whiteA700, + ), + label: '', + ); + }), + onTap: (index) { + selectedIndex = index; + widget.onChanged?.call(bottomMenuList[index].type); + setState(() {}); + }, + ), + ); + } +} + +enum BottomBarEnum { + Fire, + Searchwhitea70020x20, + Menu, + Overflowmenuwhitea700, +} + +class BottomMenuModel { + BottomMenuModel({required this.icon, required this.type}); + + String icon; + + BottomBarEnum type; +} + +class DefaultWidget extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Container( + color: Colors.white, + padding: EdgeInsets.all(10), + child: Center( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + 'Please replace the respective Widget here', + style: TextStyle( + fontSize: 18, + ), + ), + ], + ), + ), + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_button.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_button.dart new file mode 100644 index 0000000..54fc3f3 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_button.dart @@ -0,0 +1,351 @@ +import 'package:flutter/material.dart'; +import '../utils/color_constants.dart'; +import '../utils/size_utils.dart'; + +class CustomButton extends StatelessWidget { + CustomButton( + {this.shape, + this.padding, + this.variant, + this.fontStyle, + this.alignment, + this.margin, + this.onTap, + this.width, + this.height, + this.text, + this.prefixWidget, + this.suffixWidget}); + + ButtonShape? shape; + + ButtonPadding? padding; + + ButtonVariant? variant; + + ButtonFontStyle? fontStyle; + + Alignment? alignment; + + EdgeInsetsGeometry? margin; + + VoidCallback? onTap; + + double? width; + + double? height; + + String? text; + + Widget? prefixWidget; + + Widget? suffixWidget; + + @override + Widget build(BuildContext context) { + return alignment != null + ? Align( + alignment: alignment!, + child: _buildButtonWidget(), + ) + : _buildButtonWidget(); + } + + _buildButtonWidget() { + return Padding( + padding: margin ?? EdgeInsets.zero, + child: TextButton( + onPressed: onTap, + style: _buildTextButtonStyle(), + child: _buildButtonWithOrWithoutIcon(), + ), + ); + } + + _buildButtonWithOrWithoutIcon() { + if (prefixWidget != null || suffixWidget != null) { + return Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + prefixWidget ?? SizedBox(), + Text( + text ?? "", + textAlign: TextAlign.center, + style: _setFontStyle(), + ), + suffixWidget ?? SizedBox(), + ], + ); + } else { + return Text( + text ?? "", + textAlign: TextAlign.center, + style: _setFontStyle(), + ); + } + } + + _buildTextButtonStyle() { + return TextButton.styleFrom( + fixedSize: Size( + width ?? double.maxFinite, + height ?? getVerticalSize(40), + ), + padding: _setPadding(), + backgroundColor: _setColor(), + side: _setTextButtonBorder(), + shape: RoundedRectangleBorder( + borderRadius: _setBorderRadius(), + ), + ); + } + + _setPadding() { + switch (padding) { + case ButtonPadding.PaddingT14: + return getPadding( + top: 14, + right: 14, + bottom: 14, + ); + case ButtonPadding.PaddingT7: + return getPadding( + top: 7, + right: 7, + bottom: 7, + ); + case ButtonPadding.PaddingAll7: + return getPadding( + all: 7, + ); + case ButtonPadding.PaddingAll3: + return getPadding( + all: 3, + ); + default: + return getPadding( + all: 14, + ); + } + } + + _setColor() { + switch (variant) { + case ButtonVariant.FillBlue50: + return ColorConstant.blue50; + case ButtonVariant.FillDeeporangeA10033: + return ColorConstant.deepOrangeA10033; + case ButtonVariant.FillGray10001: + return ColorConstant.gray10001; + case ButtonVariant.FillLightblue100: + return ColorConstant.lightBlue100; + case ButtonVariant.FillRed200: + return ColorConstant.red200; + case ButtonVariant.FillGreenA100: + return ColorConstant.greenA100; + case ButtonVariant.FillBlueA200: + return ColorConstant.blueA200; + case ButtonVariant.FillBluegray50: + return ColorConstant.blueGray50; + case ButtonVariant.OutlineBlueA700: + return null; + default: + return ColorConstant.blueA700; + } + } + + _setTextButtonBorder() { + switch (variant) { + case ButtonVariant.OutlineBlueA700: + return BorderSide( + color: ColorConstant.blueA700, + width: getHorizontalSize( + 1.00, + ), + ); + case ButtonVariant.FillBlueA700: + case ButtonVariant.FillBlue50: + case ButtonVariant.FillDeeporangeA10033: + case ButtonVariant.FillGray10001: + case ButtonVariant.FillLightblue100: + case ButtonVariant.FillRed200: + case ButtonVariant.FillGreenA100: + case ButtonVariant.FillBlueA200: + case ButtonVariant.FillBluegray50: + return null; + default: + return null; + } + } + + _setBorderRadius() { + switch (shape) { + case ButtonShape.RoundedBorder2: + return BorderRadius.circular( + getHorizontalSize( + 2.00, + ), + ); + case ButtonShape.RoundedBorder16: + return BorderRadius.circular( + getHorizontalSize( + 16.00, + ), + ); + case ButtonShape.Square: + return BorderRadius.circular(0); + default: + return BorderRadius.circular( + getHorizontalSize( + 6.00, + ), + ); + } + } + + _setFontStyle() { + switch (fontStyle) { + case ButtonFontStyle.GilroyMedium14: + return TextStyle( + color: ColorConstant.blueA700, + fontSize: getFontSize( + 14, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + case ButtonFontStyle.GilroyMedium14WhiteA700: + return TextStyle( + color: ColorConstant.whiteA700, + fontSize: getFontSize( + 14, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + case ButtonFontStyle.GilroyMedium16Black900: + return TextStyle( + color: ColorConstant.black900, + fontSize: getFontSize( + 16, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + case ButtonFontStyle.SFUIDisplayBold12: + return TextStyle( + color: ColorConstant.whiteA700, + fontSize: getFontSize( + 12, + ), + fontFamily: 'SF UI Display', + fontWeight: FontWeight.w700, + ); + case ButtonFontStyle.GilroyMedium16BlueA700: + return TextStyle( + color: ColorConstant.blueA700, + fontSize: getFontSize( + 16, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + case ButtonFontStyle.GilroyMedium12: + return TextStyle( + color: ColorConstant.deepOrange400, + fontSize: getFontSize( + 12, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + case ButtonFontStyle.GilroyMedium12Red700: + return TextStyle( + color: ColorConstant.red700, + fontSize: getFontSize( + 12, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + case ButtonFontStyle.InterSemiBold10: + return TextStyle( + color: ColorConstant.black90001, + fontSize: getFontSize( + 10, + ), + fontFamily: 'Inter', + fontWeight: FontWeight.w600, + ); + case ButtonFontStyle.RobotoMedium14: + return TextStyle( + color: ColorConstant.whiteA700, + fontSize: getFontSize( + 14, + ), + fontFamily: 'Roboto', + fontWeight: FontWeight.w500, + ); + case ButtonFontStyle.InterRegular14: + return TextStyle( + color: ColorConstant.blueGray400, + fontSize: getFontSize( + 14, + ), + fontFamily: 'Inter', + fontWeight: FontWeight.w400, + ); + default: + return TextStyle( + color: ColorConstant.whiteA700, + fontSize: getFontSize( + 16, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + } + } +} + +enum ButtonShape { + Square, + RoundedBorder6, + RoundedBorder2, + RoundedBorder16, +} + +enum ButtonPadding { + PaddingAll14, + PaddingT14, + PaddingT7, + PaddingAll7, + PaddingAll3, +} + +enum ButtonVariant { + FillBlueA700, + OutlineBlueA700, + FillBlue50, + FillDeeporangeA10033, + FillGray10001, + FillLightblue100, + FillRed200, + FillGreenA100, + FillBlueA200, + FillBluegray50, +} + +enum ButtonFontStyle { + GilroyMedium16, + GilroyMedium14, + GilroyMedium14WhiteA700, + GilroyMedium16Black900, + SFUIDisplayBold12, + GilroyMedium16BlueA700, + GilroyMedium12, + GilroyMedium12Red700, + InterSemiBold10, + RobotoMedium14, + InterRegular14, +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_checkbox.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_checkbox.dart new file mode 100644 index 0000000..183ee9b --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_checkbox.dart @@ -0,0 +1,147 @@ +import 'package:flutter/material.dart'; +import '../utils/color_constants.dart'; +import '../utils/size_utils.dart'; + +class CustomCheckbox extends StatelessWidget { + CustomCheckbox( + {this.fontStyle, + this.alignment, + this.isRightCheck = false, + this.iconSize, + this.value, + this.onChange, + this.text, + this.width, + this.margin}); + + CheckboxFontStyle? fontStyle; + + Alignment? alignment; + + bool? isRightCheck; + + double? iconSize; + + bool? value; + + Function(bool)? onChange; + + String? text; + + double? width; + + EdgeInsetsGeometry? margin; + + @override + Widget build(BuildContext context) { + return alignment != null + ? Align( + alignment: alignment ?? Alignment.center, + child: _buildCheckboxWidget(), + ) + : _buildCheckboxWidget(); + } + + _buildCheckboxWidget() { + return InkWell( + onTap: () { + value = !(value!); + onChange!(value!); + }, + child: Container( + width: width, + margin: margin ?? EdgeInsets.zero, + child: isRightCheck! ? getRightSideCheckbox() : getLeftSideCheckbox(), + ), + ); + } + + Widget getRightSideCheckbox() { + return Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Padding( + padding: EdgeInsets.only( + right: 8, + ), + child: getTextWidget(), + ), + getCheckboxWidget(), + ], + ); + } + + Widget getLeftSideCheckbox() { + return Row( + children: [ + getCheckboxWidget(), + Padding( + padding: EdgeInsets.only( + left: 8, + ), + child: getTextWidget(), + ), + ], + ); + } + + Widget getTextWidget() { + return Text( + text ?? "", + textAlign: TextAlign.center, + style: _setFontStyle(), + ); + } + + Widget getCheckboxWidget() { + return SizedBox( + height: iconSize, + width: iconSize, + child: Checkbox( + value: value ?? false, + onChanged: (value) { + onChange!(value!); + }, + checkColor: ColorConstant.whiteA700, + visualDensity: VisualDensity( + vertical: -4, + horizontal: -4, + ), + ), + ); + } + + _setFontStyle() { + switch (fontStyle) { + case CheckboxFontStyle.GilroyMedium16: + return TextStyle( + color: ColorConstant.blueGray900, + fontSize: getFontSize( + 16, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + case CheckboxFontStyle.GilroyMedium14: + return TextStyle( + color: ColorConstant.blueGray300, + fontSize: getFontSize( + 14, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + default: + return TextStyle( + color: ColorConstant.blueGray400, + fontSize: getFontSize( + 14, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w400, + ); + } + } +} + +enum CheckboxFontStyle { GilroyRegular14, GilroyMedium16, GilroyMedium14 } diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_drop_down.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_drop_down.dart new file mode 100644 index 0000000..bc46423 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_drop_down.dart @@ -0,0 +1,200 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/material.dart'; + +import '../utils/color_constants.dart'; +import '../utils/size_utils.dart'; + +class CustomDropDown extends StatelessWidget { + CustomDropDown( + {this.shape, + this.padding, + this.variant, + this.fontStyle, + this.alignment, + this.width, + this.margin, + this.focusNode, + this.icon, + this.hintText, + this.prefix, + this.prefixConstraints, + this.items, + this.onChanged, + this.validator}); + + DropDownShape? shape; + + DropDownPadding? padding; + + DropDownVariant? variant; + + DropDownFontStyle? fontStyle; + + Alignment? alignment; + + double? width; + + EdgeInsetsGeometry? margin; + + FocusNode? focusNode; + + Widget? icon; + + String? hintText; + + Widget? prefix; + + BoxConstraints? prefixConstraints; + + List? items; + + Function(String)? onChanged; + + FormFieldValidator? validator; + + @override + Widget build(BuildContext context) { + return alignment != null + ? Align( + alignment: alignment ?? Alignment.center, + child: _buildDropDownWidget(), + ) + : _buildDropDownWidget(); + } + + _buildDropDownWidget() { + return Container( + width: width ?? double.maxFinite, + margin: margin, + child: DropdownButtonFormField( + focusNode: focusNode, + icon: icon, + style: _setFontStyle(), + decoration: _buildDecoration(), + items: items?.map>((String value) { + return DropdownMenuItem( + value: value, + child: Text( + value, + overflow: TextOverflow.ellipsis, + ), + ); + }).toList(), + onChanged: (value) { + onChanged!(value.toString()); + }, + validator: validator, + ), + ); + } + + _buildDecoration() { + return InputDecoration( + hintText: hintText ?? "", + hintStyle: _setFontStyle(), + border: _setBorderStyle(), + enabledBorder: _setBorderStyle(), + focusedBorder: _setBorderStyle(), + prefixIcon: prefix, + prefixIconConstraints: prefixConstraints, + fillColor: _setFillColor(), + filled: _setFilled(), + isDense: true, + contentPadding: _setPadding(), + ); + } + + _setFontStyle() { + switch (fontStyle) { + case DropDownFontStyle.GilroyRegular16: + return TextStyle( + color: ColorConstant.blueGray200, + fontSize: getFontSize( + 16, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w400, + ); + default: + return TextStyle( + color: ColorConstant.blueGray900, + fontSize: getFontSize( + 16, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w600, + ); + } + } + + _setOutlineBorderRadius() { + switch (shape) { + default: + return BorderRadius.circular( + getHorizontalSize( + 6.00, + ), + ); + } + } + + _setBorderStyle() { + switch (variant) { + case DropDownVariant.None: + return InputBorder.none; + default: + return OutlineInputBorder( + borderRadius: _setOutlineBorderRadius(), + borderSide: BorderSide( + color: ColorConstant.blueGray100, + width: 1, + ), + ); + } + } + + _setFillColor() { + switch (variant) { + default: + return ColorConstant.whiteA700; + } + } + + _setFilled() { + switch (variant) { + case DropDownVariant.None: + return false; + default: + return true; + } + } + + _setPadding() { + switch (padding) { + default: + return getPadding( + left: 10, + top: 10, + bottom: 10, + ); + } + } +} + +enum DropDownShape { + RoundedBorder6, +} + +enum DropDownPadding { + PaddingT10, +} + +enum DropDownVariant { + None, + OutlineBluegray100, +} + +enum DropDownFontStyle { + GilroySemiBold16, + GilroyRegular16, +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_dropdown_field.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_dropdown_field.dart new file mode 100644 index 0000000..4468e6f --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_dropdown_field.dart @@ -0,0 +1,162 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import '../utils/color_constants.dart'; +import '../utils/size_utils.dart'; +import 'custom_text_form_field.dart'; + +class CustomDropdownFormField extends StatelessWidget { + CustomDropdownFormField({ + this.shape, + this.padding, + this.initialValue, + this.variant, + this.fontStyle, + this.alignment, + this.width, + this.margin, + this.items, + this.value, + this.hintText, + this.onChanged, + this.validator, + this.onSaved, + }); + + TextFormFieldShape? shape; + + TextFormFieldPadding? padding; + + String? initialValue; + + TextFormFieldVariant? variant; + + TextFormFieldFontStyle? fontStyle; + + Alignment? alignment; + + double? width; + + EdgeInsetsGeometry? margin; + + List>? items; + + String? value; + + String? hintText; + + void Function(String?)? onChanged; + + FormFieldValidator? validator; + + void Function(String?)? onSaved; + + @override + Widget build(BuildContext context) { + return alignment != null + ? Align( + alignment: alignment ?? Alignment.center, + child: _buildDropdownFormFieldWidget(), + ) + : _buildDropdownFormFieldWidget(); + } + + _buildDropdownFormFieldWidget() { + return Container( + width: width ?? double.maxFinite, + margin: margin, + child: DropdownButtonFormField( + value: value, + items: items, + onChanged: onChanged, + validator: validator, + onSaved: onSaved, + decoration: _buildDecoration(), + ), + ); + } + + _buildDecoration() { + return InputDecoration( + hintText: hintText ?? "", + hintStyle: _setFontStyle(), + border: _setBorderStyle(), + enabledBorder: _setBorderStyle(), + focusedBorder: _setBorderStyle(), + fillColor: _setFillColor(), + filled: _setFilled(), + isDense: true, + contentPadding: _setPadding(), + ); + } + + _setFontStyle() { + switch (fontStyle) { + // Add cases for different font styles if needed + default: + return TextStyle( + color: ColorConstant.blueGray200, + fontSize: getFontSize(16), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + } + } + + _setOutlineBorderRadius() { + switch (shape) { + case TextFormFieldShape.CircleBorder16: + return BorderRadius.circular(getHorizontalSize(16.00)); + default: + return BorderRadius.circular(getHorizontalSize(6.00)); + } + } + + _setBorderStyle() { + switch (variant) { + case TextFormFieldVariant.FillBlue50: + return OutlineInputBorder( + borderRadius: _setOutlineBorderRadius(), + borderSide: BorderSide.none, + ); + // Add cases for different variants if needed + default: + return OutlineInputBorder( + borderRadius: _setOutlineBorderRadius(), + borderSide: BorderSide( + color: ColorConstant.blueGray100, + width: 1, + ), + ); + } + } + + _setFillColor() { + switch (variant) { + case TextFormFieldVariant.FillBlue50: + return ColorConstant.blue50; + // Add cases for different variants if needed + default: + return ColorConstant.whiteA700; + } + } + + _setFilled() { + switch (variant) { + case TextFormFieldVariant.FillBlue50: + return true; + // Add cases for different variants if needed + default: + return true; + } + } + + _setPadding() { + switch (padding) { + case TextFormFieldPadding.PaddingAll11: + return getPadding(all: 11); + // Add cases for different paddings if needed + default: + return getPadding(all: 11); + } + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_dropdownfield.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_dropdownfield.dart new file mode 100644 index 0000000..ec6949d --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_dropdownfield.dart @@ -0,0 +1,48 @@ +import 'package:flutter/material.dart'; + +class CustomDropdownField extends StatelessWidget { + final String? hintText; + final List> items; + final T? value; + final void Function(T?)? onChanged; + final void Function(T?)? onSaved; + final String? Function(T?)? validator; + + CustomDropdownField( + {this.hintText, + required this.items, + this.value, + this.onChanged, + this.onSaved, + this.validator}); + + @override + Widget build(BuildContext context) { + return FormField( + builder: (FormFieldState state) { + return InputDecorator( + decoration: InputDecoration( + enabledBorder: InputBorder.none, + hintStyle: TextStyle(color: Colors.black.withOpacity(.4)), + contentPadding: EdgeInsets.only(left: 10, right: 10, bottom: 6), + errorText: state.errorText, + ), + child: DropdownButtonFormField( + value: value, + items: items, + onChanged: (T? newValue) { + state.didChange(newValue); + if (onChanged != null) { + onChanged!(newValue); + } + }, + onSaved: onSaved, + hint: Text(hintText ?? ''), + style: TextStyle(color: Colors.black.withOpacity(.8)), + //isExpanded: true, + validator: validator), + ); + }, + ); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_elevated_button.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_elevated_button.dart new file mode 100644 index 0000000..490825d --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_elevated_button.dart @@ -0,0 +1,70 @@ +import 'package:flutter/material.dart'; +import '../core/app_export.dart'; +import '../theme/custom_button_style.dart'; +import 'base_button.dart'; + +class CustomElevatedButton extends BaseButton { + CustomElevatedButton( + {Key? key, + this.decoration, + this.leftIcon, + this.rightIcon, + EdgeInsets? margin, + VoidCallback? onPressed, + ButtonStyle? buttonStyle, + Alignment? alignment, + TextStyle? buttonTextStyle, + bool? isDisabled, + double? height, + double? width, + required String text}) + : super( + text: text, + onPressed: onPressed, + buttonStyle: buttonStyle, + isDisabled: isDisabled, + buttonTextStyle: buttonTextStyle, + height: height, + width: width, + alignment: alignment, + margin: margin, + ); + + final BoxDecoration? decoration; + + final Widget? leftIcon; + + final Widget? rightIcon; + + @override + Widget build(BuildContext context) { + return alignment != null + ? Align( + alignment: alignment ?? Alignment.center, + child: buildElevatedButtonWidget) + : buildElevatedButtonWidget; + } + + Widget get buildElevatedButtonWidget => Container( + height: height ?? 41.v, + width: width ?? double.maxFinite, + margin: margin, + decoration: decoration, + child: ElevatedButton( + style: buttonStyle, + onPressed: isDisabled ?? false ? null : onPressed ?? () {}, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + leftIcon ?? const SizedBox.shrink(), + Text( + text, + style: buttonTextStyle ?? CustomTextStyles.titleMediumWhiteA700, + ), + rightIcon ?? const SizedBox.shrink() + ], + ), + ), + ); +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_floating_button.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_floating_button.dart new file mode 100644 index 0000000..4b1bc2c --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_floating_button.dart @@ -0,0 +1,93 @@ +import 'package:flutter/material.dart'; + +import '../utils/color_constants.dart'; +import '../utils/image_constant.dart'; +import '../utils/size_utils.dart'; + +class CustomFloatingButton extends StatelessWidget { + CustomFloatingButton( + {this.shape, + this.variant, + this.alignment, + this.margin, + this.onTap, + this.width, + this.height, + this.child}); + + FloatingButtonShape? shape; + + FloatingButtonVariant? variant; + + Alignment? alignment; + + EdgeInsetsGeometry? margin; + + VoidCallback? onTap; + + double? width; + + double? height; + + Widget? child; + + @override + Widget build(BuildContext context) { + return alignment != null + ? Align( + alignment: alignment ?? Alignment.center, + child: _buildFabWidget(), + ) + : _buildFabWidget(); + } + + _buildFabWidget() { + return Padding( + padding: margin ?? EdgeInsets.zero, + child: FloatingActionButton( + backgroundColor: _setColor(), + onPressed: onTap, + child: Container( + alignment: Alignment.center, + width: getSize(width ?? 0), + height: getSize(height ?? 0), + decoration: _buildDecoration(), + child: child, + ), + ), + ); + } + + _buildDecoration() { + return BoxDecoration( + color: _setColor(), + borderRadius: _setBorderRadius(), + ); + } + + _setColor() { + switch (variant) { + default: + return Color.fromRGBO(253, 202, 101, 1.0); + } + } + + _setBorderRadius() { + switch (shape) { + default: + return BorderRadius.circular( + getHorizontalSize( + 6.00, + ), + ); + } + } +} + +enum FloatingButtonShape { + RoundedBorder6, +} + +enum FloatingButtonVariant { + FillBlueA700, +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_floating_text_field.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_floating_text_field.dart new file mode 100644 index 0000000..f45c4e8 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_floating_text_field.dart @@ -0,0 +1,155 @@ +import 'package:flutter/material.dart'; +import '../core/app_export.dart'; + +class CustomFloatingTextField extends StatelessWidget { + CustomFloatingTextField( + {Key? key, + this.alignment, + this.width, + this.scrollPadding, + this.controller, + this.focusNode, + this.autofocus = false, + this.textStyle, + this.obscureText = false, + this.textInputAction = TextInputAction.next, + this.textInputType = TextInputType.text, + this.maxLines, + this.hintText, + this.hintStyle, + this.labelText, + this.labelStyle, + this.prefix, + this.prefixConstraints, + this.suffix, + this.suffixConstraints, + this.contentPadding, + this.borderDecoration, + this.fillColor, + this.filled = true, + this.validator}) + : super( + key: key, + ); + + final Alignment? alignment; + + final double? width; + + final TextEditingController? scrollPadding; + + final TextEditingController? controller; + + final FocusNode? focusNode; + + final bool? autofocus; + + final TextStyle? textStyle; + + final bool? obscureText; + + final TextInputAction? textInputAction; + + final TextInputType? textInputType; + + final int? maxLines; + + final String? hintText; + + final TextStyle? hintStyle; + + final String? labelText; + + final TextStyle? labelStyle; + + final Widget? prefix; + + final BoxConstraints? prefixConstraints; + + final Widget? suffix; + + final BoxConstraints? suffixConstraints; + + final EdgeInsets? contentPadding; + + final InputBorder? borderDecoration; + + final Color? fillColor; + + final bool? filled; + + final FormFieldValidator? validator; + + @override + Widget build(BuildContext context) { + return alignment != null + ? Align( + alignment: alignment ?? Alignment.center, + child: floatingTextFieldWidget(context)) + : floatingTextFieldWidget(context); + } + + Widget floatingTextFieldWidget(BuildContext context) => SizedBox( + width: width ?? double.maxFinite, + child: TextFormField( + scrollPadding: + EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom), + controller: controller, + focusNode: focusNode, + onTapOutside: (event) { + if (focusNode != null) { + focusNode?.unfocus(); + } else { + FocusManager.instance.primaryFocus?.unfocus(); + } + }, + autofocus: autofocus!, + style: textStyle ?? theme.textTheme.bodyMedium, + obscureText: obscureText!, + textInputAction: textInputAction, + keyboardType: textInputType, + maxLines: maxLines ?? 1, + decoration: decoration, + validator: validator, + ), + ); + InputDecoration get decoration => InputDecoration( + hintText: hintText ?? "", + hintStyle: hintStyle ?? theme.textTheme.bodyMedium, + labelText: labelText ?? "", + labelStyle: labelStyle, + prefixIcon: prefix, + prefixIconConstraints: prefixConstraints, + suffixIcon: suffix, + suffixIconConstraints: suffixConstraints, + isDense: true, + contentPadding: + contentPadding ?? EdgeInsets.fromLTRB(8.h, 24.v, 8.h, 8.v), + fillColor: fillColor ?? appTheme.gray50, + filled: filled, + border: borderDecoration ?? + OutlineInputBorder( + borderRadius: BorderRadius.circular(8.h), + borderSide: BorderSide( + color: theme.colorScheme.errorContainer, + width: 1, + ), + ), + enabledBorder: borderDecoration ?? + OutlineInputBorder( + borderRadius: BorderRadius.circular(8.h), + borderSide: BorderSide( + color: theme.colorScheme.errorContainer, + width: 1, + ), + ), + focusedBorder: borderDecoration ?? + OutlineInputBorder( + borderRadius: BorderRadius.circular(8.h), + borderSide: BorderSide( + color: theme.colorScheme.errorContainer, + width: 1, + ), + ), + ); +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_icon_button.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_icon_button.dart new file mode 100644 index 0000000..03be46e --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_icon_button.dart @@ -0,0 +1,399 @@ +// ignore_for_file: constant_identifier_names + +import 'package:base_project/core/app_export.dart'; +import 'package:flutter/material.dart'; +import '../utils/color_constants.dart'; +import '../utils/size_utils.dart'; +import '../theme/theme_helper.dart'; + +extension IconButtonStyleHelper on CustomIconButton { + static BoxDecoration get fillErrorContainer => BoxDecoration( + color: theme.colorScheme.errorContainer, + ); + + static BoxDecoration get fillDeepOrangeA => BoxDecoration( + color: appTheme.deepOrangeA400, + borderRadius: BorderRadius.circular(26.h), + ); + static BoxDecoration get fillLightBlue => BoxDecoration( + color: appTheme.lightBlue900, + borderRadius: BorderRadius.circular(4.h), + ); + static BoxDecoration get fillBlue => BoxDecoration( + color: appTheme.blue400, + borderRadius: BorderRadius.circular(25.h), + ); + static BoxDecoration get outlineIndigoTL12 => BoxDecoration( + color: appTheme.lightGreenA200, + borderRadius: BorderRadius.circular(12.h), + border: Border.all( + color: appTheme.indigo50, + width: 1.h, + ), + ); + + static BoxDecoration get fillPrimaryContainer => BoxDecoration( + color: theme.colorScheme.primaryContainer, + ); + static BoxDecoration get fillPrimary => BoxDecoration( + color: theme.colorScheme.primary, + borderRadius: BorderRadius.circular(16.h), + ); + static BoxDecoration get outlineIndigo => BoxDecoration( + color: appTheme.lightGreenA200, + borderRadius: BorderRadius.circular(12.h), + border: Border.all( + color: appTheme.indigo50, + width: 1.h, + ), + ); + + static BoxDecoration get fillBlueA => BoxDecoration( + color: appTheme.blueA20002, + ); + + static BoxDecoration get gradientLightGreenAToLightGreenA => BoxDecoration( + borderRadius: BorderRadius.circular(32.h), + gradient: LinearGradient( + begin: Alignment(0.5, 0), + end: Alignment(0.5, 1), + colors: [appTheme.lightGreenA20001, appTheme.lightGreenA20000], + ), + ); +} + +class CustomIconButton extends StatelessWidget { + final EdgeInsetsGeometry? padding; + + CustomIconButton({ + this.shape, + this.padding, + this.variant, + this.alignment, + this.margin, + this.width, + this.height, + this.child, + this.onTap, + this.decoration, + this.padding_f, + }); + + // file===green color for all boottom bar + @override + Widget build(BuildContext context) { + return GestureDetector( + onTap: onTap, + child: Container( + height: height, + width: width, + padding: padding ?? EdgeInsets.zero, + decoration: decoration ?? + BoxDecoration( + color: Color.fromRGBO(253, 202, 101, 1.0), + borderRadius: BorderRadius.circular( + // Set borderRadius to half of the smallest dimension + width! < height! ? width! / 2 : height! / 2, + ), // Adjust as needed + ), + child: Center(child: child), // Ensure child is centered + ), + ); + } + + // @override + // Widget build(BuildContext context) { + // return GestureDetector( + // onTap: onTap, + // child: Container( + // height: height, + // width: width, + // padding: padding ?? EdgeInsets.zero, + // decoration: decoration ?? + // BoxDecoration( + // color: Colors.blue, + // borderRadius: BorderRadius.circular(16), // Adjust as needed + // ), + // child: Center(child: child), // Ensure child is centered + // ), + // ); + // } + + IconButtonShape? shape; + + // IconButtonPadding? padding; + + IconButtonVariant? variant; + + Alignment? alignment; + + EdgeInsetsGeometry? margin; + + double? width; + + double? height; + + Widget? child; + + VoidCallback? onTap; + + final BoxDecoration? decoration; + final EdgeInsetsGeometry? padding_f; + + // @override + // Widget build(BuildContext context) { + // return alignment != null + // ? Align( + // alignment: alignment ?? Alignment.center, + // child: _buildIconButtonWidget(), + // ) + // : _buildIconButtonWidget(); + // } + + Widget get iconButtonWidget => SizedBox( + height: height ?? 0, + width: width ?? 0, + child: IconButton( + padding: EdgeInsets.zero, + icon: Container( + height: height ?? 0, + width: width ?? 0, + padding: padding_f ?? EdgeInsets.zero, + decoration: decoration ?? + BoxDecoration( + color: appTheme.lightGreenA200, + borderRadius: BorderRadius.circular(25.h), + ), + child: child, + ), + onPressed: onTap, + ), + ); + + _buildIconButtonWidget() { + return Padding( + padding: margin ?? EdgeInsets.zero, + child: IconButton( + visualDensity: const VisualDensity( + vertical: -4, + horizontal: -4, + ), + iconSize: getSize(height ?? 0), + padding: const EdgeInsets.all(0), + icon: Container( + alignment: Alignment.center, + width: getSize(width ?? 0), + height: getSize(height ?? 0), + padding: _setPadding(), + decoration: _buildDecoration(), + child: child, + ), + onPressed: onTap, + ), + ); + } + + _buildDecoration() { + return BoxDecoration( + color: _setColor(), + border: _setBorder(), + borderRadius: _setBorderRadius(), + boxShadow: _setBoxShadow(), + ); + } + + EdgeInsets _setPadding() { + if (padding == IconButtonPadding.PaddingAll4) { + return EdgeInsets.all(4); + } else if (padding == IconButtonPadding.PaddingAll16) { + return EdgeInsets.all(16); + } else if (padding == IconButtonPadding.PaddingAll8) { + return EdgeInsets.all(8); + } else { + return EdgeInsets.all(11); + } + } + + // _setPadding() { + // switch (padding) { + // case IconButtonPadding.PaddingAll4: + // return getPadding( + // all: 4, + // ); + // case IconButtonPadding.PaddingAll16: + // return getPadding( + // all: 16, + // ); + // case IconButtonPadding.PaddingAll8: + // return getPadding( + // all: 8, + // ); + // default: + // return getPadding( + // all: 11, + // ); + // } + // } + + _setColor() { + switch (variant) { + case IconButtonVariant.FillBlueA700: + return ColorConstant.blueA700; + case IconButtonVariant.OutlineGray80049: + return ColorConstant.whiteA700; + case IconButtonVariant.FillGray300: + return ColorConstant.gray300; + case IconButtonVariant.FillGray100: + return ColorConstant.gray100; + case IconButtonVariant.FillBlack90001: + return ColorConstant.black90001; + case IconButtonVariant.OutlineBluegray400: + return ColorConstant.whiteA700; + case IconButtonVariant.FillBlueA200: + return ColorConstant.blueA200; + case IconButtonVariant.OutlineBlueA700: + case IconButtonVariant.OutlineBlue50: + return null; + default: + return ColorConstant.blue50; + } + } + + _setBorder() { + switch (variant) { + case IconButtonVariant.OutlineBlueA700: + return Border.all( + color: ColorConstant.blueA700, + width: getHorizontalSize( + 1.00, + ), + ); + case IconButtonVariant.OutlineGray80049: + return Border.all( + color: ColorConstant.gray80049, + width: getHorizontalSize( + 1.00, + ), + ); + case IconButtonVariant.OutlineBlue50: + return Border.all( + color: ColorConstant.blue50, + width: getHorizontalSize( + 1.00, + ), + ); + case IconButtonVariant.OutlineBluegray400: + return Border.all( + color: ColorConstant.blueGray400, + width: getHorizontalSize( + 1.00, + ), + ); + case IconButtonVariant.FillBlue50: + case IconButtonVariant.FillBlueA700: + case IconButtonVariant.FillGray300: + case IconButtonVariant.FillGray100: + case IconButtonVariant.FillBlack90001: + case IconButtonVariant.FillBlueA200: + return null; + default: + return null; + } + } + + _setBorderRadius() { + switch (shape) { + case IconButtonShape.CircleBorder15: + return BorderRadius.circular( + getHorizontalSize( + 15.00, + ), + ); + case IconButtonShape.RoundedBorder26: + return BorderRadius.circular( + getHorizontalSize( + 26.00, + ), + ); + case IconButtonShape.CircleBorder10: + return BorderRadius.circular( + getHorizontalSize( + 10.00, + ), + ); + case IconButtonShape.CircleBorder30: + return BorderRadius.circular( + getHorizontalSize( + 30.00, + ), + ); + default: + return BorderRadius.circular( + getHorizontalSize( + 6.00, + ), + ); + } + } + + _setBoxShadow() { + switch (variant) { + case IconButtonVariant.OutlineBlueA700: + return [ + BoxShadow( + color: ColorConstant.indigoA20033, + spreadRadius: getHorizontalSize( + 2.00, + ), + blurRadius: getHorizontalSize( + 2.00, + ), + offset: const Offset( + 0, + 4, + ), + ), + ]; + case IconButtonVariant.FillBlue50: + case IconButtonVariant.FillBlueA700: + case IconButtonVariant.OutlineGray80049: + case IconButtonVariant.FillGray300: + case IconButtonVariant.FillGray100: + case IconButtonVariant.FillBlack90001: + case IconButtonVariant.OutlineBlue50: + case IconButtonVariant.OutlineBluegray400: + case IconButtonVariant.FillBlueA200: + return null; + default: + return null; + } + } +} + +enum IconButtonShape { + RoundedBorder6, + CircleBorder15, + RoundedBorder26, + CircleBorder10, + CircleBorder30, +} + +enum IconButtonPadding { + PaddingAll4, + PaddingAll16, + PaddingAll8, + PaddingAll11, +} + +enum IconButtonVariant { + FillBlue50, + FillBlueA700, + OutlineBlueA700, + OutlineGray80049, + FillGray300, + FillGray100, + FillBlack90001, + OutlineBlue50, + OutlineBluegray400, + FillBlueA200, +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_icon_button_f.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_icon_button_f.dart new file mode 100644 index 0000000..0333bdd --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_icon_button_f.dart @@ -0,0 +1,63 @@ +import 'package:flutter/material.dart'; +import '../core/app_export.dart'; + +class CustomIconButton_f extends StatelessWidget { + CustomIconButton_f( + {Key? key, + this.alignment, + this.height, + this.width, + this.padding, + this.decoration, + this.child, + this.onTap}) + : super( + key: key, + ); + + final Alignment? alignment; + + final double? height; + + final double? width; + + final EdgeInsetsGeometry? padding; + + final BoxDecoration? decoration; + + final Widget? child; + + final VoidCallback? onTap; + + @override + Widget build(BuildContext context) { + return alignment != null + ? Align( + alignment: alignment ?? Alignment.center, child: iconButtonWidget) + : iconButtonWidget; + } + + Widget get iconButtonWidget => SizedBox( + height: height ?? 0, + width: width ?? 0, + child: IconButton( + padding: EdgeInsets.zero, + icon: Container( + height: height ?? 0, + width: width ?? 0, + padding: padding ?? EdgeInsets.zero, + decoration: decoration ?? + BoxDecoration( + color: appTheme.whiteA700, + borderRadius: BorderRadius.circular(12.h), + border: Border.all( + color: theme.colorScheme.onPrimaryContainer, + width: 1.h, + ), + ), + child: child, + ), + onPressed: onTap, + ), + ); +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_image_view.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_image_view.dart new file mode 100644 index 0000000..2cc4912 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_image_view.dart @@ -0,0 +1,154 @@ +// ignore_for_file: must_be_immutable + +import 'dart:io'; + +import 'package:cached_network_image/cached_network_image.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; + +class CustomImageView extends StatelessWidget { + ///[url] is required parameter for fetching network image + String? url; + + ///[imagePath] is required parameter for showing png,jpg,etc image + String? imagePath; + + ///[svgPath] is required parameter for showing svg image + String? svgPath; + + ///[file] is required parameter for fetching image file + File? file; + + double? height; + double? width; + Color? color; + BoxFit? fit; + final String placeHolder; + Alignment? alignment; + VoidCallback? onTap; + EdgeInsetsGeometry? margin; + BorderRadius? radius; + BoxBorder? border; + + ///a [CustomImageView] it can be used for showing any type of images + /// it will shows the placeholder image if image is not found on network image + CustomImageView({ + Key? key, + this.url, + this.imagePath, + this.svgPath, + this.file, + this.height, + this.width, + this.color, + this.fit, + this.alignment, + this.onTap, + this.radius, + this.margin, + this.border, + this.placeHolder = 'assets/images/image_not_found.png', + }) : super(key: key); + + @override + Widget build(BuildContext context) { + return alignment != null + ? Align( + alignment: alignment!, + child: _buildWidget(), + ) + : _buildWidget(); + } + + Widget _buildWidget() { + return Padding( + padding: margin ?? EdgeInsets.zero, + child: InkWell( + onTap: onTap, + child: _buildCircleImage(), + ), + ); + } + + ///build the image with border radius + _buildCircleImage() { + if (radius != null) { + return ClipRRect( + borderRadius: radius ?? BorderRadius.zero, + child: _buildImageWithBorder(), + ); + } else { + return _buildImageWithBorder(); + } + } + + ///build the image with border and border radius style + _buildImageWithBorder() { + if (border != null) { + return Container( + decoration: BoxDecoration( + border: border, + borderRadius: radius, + ), + child: _buildImageView(), + ); + } else { + return _buildImageView(); + } + } + + Widget _buildImageView() { + if (svgPath != null && svgPath!.isNotEmpty) { + return SizedBox( + height: height, + width: width, + child: SvgPicture.asset( + svgPath!, + height: height, + width: width, + fit: fit ?? BoxFit.contain, + color: color, + ), + ); + } else if (file != null && file!.path.isNotEmpty) { + return Image.file( + file!, + height: height, + width: width, + fit: fit ?? BoxFit.cover, + color: color, + ); + } else if (url != null && url!.isNotEmpty) { + return CachedNetworkImage( + height: height, + width: width, + fit: fit, + imageUrl: url!, + color: color, + placeholder: (context, url) => SizedBox( + height: 30, + width: 30, + child: LinearProgressIndicator( + color: Colors.grey.shade200, + backgroundColor: Colors.grey.shade100, + ), + ), + errorWidget: (context, url, error) => Image.asset( + placeHolder, + height: height, + width: width, + fit: fit ?? BoxFit.cover, + ), + ); + } else if (imagePath != null && imagePath!.isNotEmpty) { + return Image.asset( + imagePath!, + height: height, + width: width, + fit: fit ?? BoxFit.cover, + color: color, + ); + } + return const SizedBox(); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_messenger.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_messenger.dart new file mode 100644 index 0000000..1f34e04 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_messenger.dart @@ -0,0 +1,86 @@ + + + + +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; + +class ShowSnackAlert{ + static SnackBar CustomMessenger(BuildContext context, Color color1, Color color2, String text){ + return SnackBar( + elevation: 0, + behavior: SnackBarBehavior.floating, + content: Stack( + clipBehavior: Clip.none, + children: [ + Container( + + padding: EdgeInsets.all(16), + height: 100, + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(20)), + color: color1 + ), + child: Row( + children: [ + const SizedBox(width: 48,), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + if(color1 == Colors.red.shade400) + Text('Oh Snap!', style: TextStyle(fontSize: 18, color: Colors.white),), + if(color1 == Colors.orange.shade400) + Text('Alert',style: TextStyle(fontSize: 18, color: Colors.white)), + if(color1 == Colors.green.shade600) + Text('Success',style: TextStyle(fontSize: 18, color: Colors.white)), + + + Text("${text}", style: TextStyle(fontSize: 12, color: Colors.white), maxLines: 2, overflow: TextOverflow.ellipsis,), + ], + ), + ), + ], + )), + Positioned( + bottom: 0, + + child: ClipRRect( + borderRadius: BorderRadius.only(bottomLeft: Radius.circular(20)), + child: SvgPicture.asset( + + 'assets/icon/bubbles.svg', + + height: 48, + width: 40, + colorFilter: ColorFilter.mode(color2, BlendMode.srcIn) + ), + ), + ), + Positioned( + top: -20, + left: 0, + child: Stack( + alignment: Alignment.center, + children: [ + SvgPicture.asset( + 'assets/icon/fail.svg', + height: 40, + ), + Positioned( + top: 10, + child: InkWell( + onTap: (){ + ScaffoldMessenger.of(context).clearSnackBars(); + }, + child: SvgPicture.asset('assets/icon/close.svg', height: 16))) + ], + ), + ) + + ], + ), + backgroundColor: Colors.transparent, + ); + } +} \ No newline at end of file diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_outlined_button.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_outlined_button.dart new file mode 100644 index 0000000..f176e76 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_outlined_button.dart @@ -0,0 +1,72 @@ +import 'package:flutter/material.dart'; +import '../core/app_export.dart'; +import 'base_button.dart'; + +class CustomOutlinedButton extends BaseButton { + CustomOutlinedButton( + {Key? key, + this.decoration, + this.leftIcon, + this.rightIcon, + this.label, + VoidCallback? onPressed, + ButtonStyle? buttonStyle, + TextStyle? buttonTextStyle, + bool? isDisabled, + Alignment? alignment, + double? height, + double? width, + EdgeInsets? margin, + required String text}) + : super( + text: text, + onPressed: onPressed, + buttonStyle: buttonStyle, + isDisabled: isDisabled, + buttonTextStyle: buttonTextStyle, + height: height, + alignment: alignment, + width: width, + margin: margin, + ); + + final BoxDecoration? decoration; + + final Widget? leftIcon; + + final Widget? rightIcon; + + final Widget? label; + + @override + Widget build(BuildContext context) { + return alignment != null + ? Align( + alignment: alignment ?? Alignment.center, + child: buildOutlinedButtonWidget) + : buildOutlinedButtonWidget; + } + + Widget get buildOutlinedButtonWidget => Container( + height: this.height ?? 56.v, + width: this.width ?? double.maxFinite, + margin: margin, + decoration: decoration, + child: OutlinedButton( + style: buttonStyle, + onPressed: isDisabled ?? false ? null : onPressed ?? () {}, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + leftIcon ?? const SizedBox.shrink(), + Text( + text, + style: buttonTextStyle ?? theme.textTheme.headlineLarge, + ), + rightIcon ?? const SizedBox.shrink() + ], + ), + ), + ); +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_radio_button.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_radio_button.dart new file mode 100644 index 0000000..2a28ec5 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_radio_button.dart @@ -0,0 +1,258 @@ +import 'package:flutter/material.dart'; +import '../utils/color_constants.dart'; +import '../utils/size_utils.dart'; + +class CustomRadioButton extends StatelessWidget { + CustomRadioButton( + {this.shape, + this.padding, + this.variant, + this.fontStyle, + this.alignment, + this.onChange, + this.isRightCheck = false, + this.iconSize, + this.value, + this.groupValue, + this.text, + this.width, + this.margin}); + + RadioShape? shape; + + RadioPadding? padding; + + RadioVariant? variant; + + RadioFontStyle? fontStyle; + + Alignment? alignment; + + Function(String)? onChange; + + bool? isRightCheck; + + double? iconSize; + + String? value; + + String? groupValue; + + String? text; + + double? width; + + EdgeInsetsGeometry? margin; + + @override + Widget build(BuildContext context) { + return alignment != null + ? Align( + alignment: alignment ?? Alignment.center, + child: _buildRadioButtonWidget(), + ) + : _buildRadioButtonWidget(); + } + + _buildRadioButtonWidget() { + return InkWell( + onTap: () { + onChange!(value!); + }, + child: Container( + width: width, + margin: margin ?? EdgeInsets.zero, + padding: _setPadding(), + decoration: _buildDecoration(), + child: isRightCheck! ? getRightSideRadio() : getLeftSideRadio(), + ), + ); + } + + _buildDecoration() { + return BoxDecoration( + color: _setColor(), + border: _setBorder(), + borderRadius: _setBorderRadius(), + ); + } + + Widget getRightSideRadio() { + return Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Padding( + padding: EdgeInsets.only( + right: 8, + ), + child: getTextWidget(), + ), + getRadioWidget(), + ], + ); + } + + Widget getLeftSideRadio() { + return Row( + children: [ + getRadioWidget(), + Padding( + padding: EdgeInsets.only( + left: 8, + ), + child: getTextWidget(), + ), + ], + ); + } + + Widget getTextWidget() { + return Text( + text ?? "", + textAlign: TextAlign.center, + style: _setFontStyle(), + ); + } + + Widget getRadioWidget() { + return SizedBox( + height: iconSize, + width: iconSize, + child: Radio( + value: value ?? "", + groupValue: groupValue, + activeColor: ColorConstant.whiteA700, + onChanged: (value) { + onChange!(value!); + }, + visualDensity: VisualDensity( + vertical: -4, + horizontal: -4, + ), + ), + ); + } + + _setFontStyle() { + switch (fontStyle) { + case RadioFontStyle.GilroyMedium16: + return TextStyle( + color: ColorConstant.blueA700, + fontSize: getFontSize( + 16, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + case RadioFontStyle.GilroyMedium18: + return TextStyle( + color: ColorConstant.blueGray300, + fontSize: getFontSize( + 18, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + case RadioFontStyle.GilroyRegular16: + return TextStyle( + color: ColorConstant.blueGray900, + fontSize: getFontSize( + 16, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w400, + ); + default: + return TextStyle( + color: ColorConstant.blueGray400, + fontSize: getFontSize( + 16, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + } + } + + _setPadding() { + switch (padding) { + case RadioPadding.PaddingAll11: + return getPadding( + all: 11, + ); + case RadioPadding.PaddingT1: + return getPadding( + top: 1, + bottom: 1, + ); + default: + return null; + } + } + + _setColor() { + switch (variant) { + case RadioVariant.OutlineBluegray400: + return ColorConstant.whiteA700; + case RadioVariant.OutlineBlueA700: + return ColorConstant.whiteA700; + default: + return null; + } + } + + _setBorder() { + switch (variant) { + case RadioVariant.OutlineBluegray400: + return Border.all( + color: ColorConstant.blueGray400, + width: getHorizontalSize( + 1.00, + ), + ); + case RadioVariant.OutlineBlueA700: + return Border.all( + color: ColorConstant.blueA700, + width: getHorizontalSize( + 1.00, + ), + ); + default: + return null; + } + } + + _setBorderRadius() { + switch (shape) { + case RadioShape.RoundedBorder6: + return BorderRadius.circular( + getHorizontalSize( + 6.00, + ), + ); + default: + return null; + } + } +} + +enum RadioShape { + RoundedBorder6, +} + +enum RadioPadding { + PaddingAll11, + PaddingT1, +} + +enum RadioVariant { + OutlineBluegray400, + OutlineBlueA700, +} + +enum RadioFontStyle { + GilroyMedium16Bluegray400, + GilroyMedium16, + GilroyMedium18, + GilroyRegular16, +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_search_view.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_search_view.dart new file mode 100644 index 0000000..d7f90f3 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_search_view.dart @@ -0,0 +1,202 @@ +import 'package:flutter/material.dart'; +import '../utils/color_constants.dart'; +import '../utils/size_utils.dart'; + +class CustomSearchView extends StatelessWidget { + CustomSearchView( + {this.shape, + this.padding, + this.variant, + this.fontStyle, + this.alignment, + this.width, + this.margin, + this.controller, + this.focusNode, + this.hintText, + this.prefix, + this.prefixConstraints, + this.suffix, + this.suffixConstraints}); + + SearchViewShape? shape; + + SearchViewPadding? padding; + + SearchViewVariant? variant; + + SearchViewFontStyle? fontStyle; + + Alignment? alignment; + + double? width; + + EdgeInsetsGeometry? margin; + + TextEditingController? controller; + + FocusNode? focusNode; + + String? hintText; + + Widget? prefix; + + BoxConstraints? prefixConstraints; + + Widget? suffix; + + BoxConstraints? suffixConstraints; + + @override + Widget build(BuildContext context) { + return alignment != null + ? Align( + alignment: alignment ?? Alignment.center, + child: _buildSearchViewWidget(), + ) + : _buildSearchViewWidget(); + } + + _buildSearchViewWidget() { + return Container( + width: width ?? double.maxFinite, + margin: margin, + child: TextFormField( + controller: controller, + focusNode: focusNode, + style: _setFontStyle(), + decoration: _buildDecoration(), + ), + ); + } + + _buildDecoration() { + return InputDecoration( + hintText: hintText ?? "", + hintStyle: _setFontStyle(), + border: _setBorderStyle(), + enabledBorder: _setBorderStyle(), + focusedBorder: _setBorderStyle(), + disabledBorder: _setBorderStyle(), + prefixIcon: prefix, + prefixIconConstraints: prefixConstraints, + suffixIcon: suffix, + suffixIconConstraints: suffixConstraints, + fillColor: _setFillColor(), + filled: _setFilled(), + isDense: true, + contentPadding: _setPadding(), + ); + } + + _setFontStyle() { + switch (fontStyle) { + case SearchViewFontStyle.GilroyMedium16Bluegray400: + return TextStyle( + color: ColorConstant.blueGray400, + fontSize: getFontSize( + 16, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + default: + return TextStyle( + color: ColorConstant.blueGray200, + fontSize: getFontSize( + 16, + ), + fontFamily: 'Gilroy', + fontWeight: FontWeight.w500, + ); + } + } + + _setOutlineBorderRadius() { + switch (shape) { + default: + return BorderRadius.circular( + getHorizontalSize( + 6.00, + ), + ); + } + } + + _setBorderStyle() { + switch (variant) { + case SearchViewVariant.OutlineBluegray200: + return OutlineInputBorder( + borderRadius: _setOutlineBorderRadius(), + borderSide: BorderSide( + color: ColorConstant.blueGray200, + width: 1, + ), + ); + case SearchViewVariant.None: + return InputBorder.none; + default: + return OutlineInputBorder( + borderRadius: _setOutlineBorderRadius(), + borderSide: BorderSide( + color: ColorConstant.blueGray100, + width: 1, + ), + ); + } + } + + _setFillColor() { + switch (variant) { + case SearchViewVariant.OutlineBluegray200: + return ColorConstant.whiteA700; + default: + return ColorConstant.whiteA700; + } + } + + _setFilled() { + switch (variant) { + case SearchViewVariant.None: + return false; + default: + return true; + } + } + + _setPadding() { + switch (padding) { + case SearchViewPadding.PaddingT11: + return getPadding( + top: 11, + right: 11, + bottom: 11, + ); + default: + return getPadding( + top: 12, + bottom: 12, + ); + } + } +} + +enum SearchViewShape { + RoundedBorder6, +} + +enum SearchViewPadding { + PaddingT11, + PaddingT12, +} + +enum SearchViewVariant { + None, + OutlineBluegray100, + OutlineBluegray200, +} + +enum SearchViewFontStyle { + GilroyMedium16, + GilroyMedium16Bluegray400, +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_switch.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_switch.dart new file mode 100644 index 0000000..883aae9 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_switch.dart @@ -0,0 +1,49 @@ +// import 'package:flutter/material.dart'; +// import 'package:flutter_switch/flutter_switch.dart'; + +// import '../Utils/color_constants.dart'; +// import '../Utils/size_utils.dart'; + +// class CustomSwitch extends StatelessWidget { +// CustomSwitch({this.alignment, this.margin, this.value, this.onChanged}); + +// Alignment? alignment; + +// EdgeInsetsGeometry? margin; + +// bool? value; + +// Function(bool)? onChanged; + +// @override +// Widget build(BuildContext context) { +// return alignment != null +// ? Align( +// alignment: alignment ?? Alignment.center, +// child: _buildSwitchWidget(), +// ) +// : _buildSwitchWidget(); +// } + +// _buildSwitchWidget() { +// return Padding( +// padding: margin ?? EdgeInsets.zero, +// child: FlutterSwitch( +// value: value ?? false, +// height: getHorizontalSize(25), +// width: getHorizontalSize(45), +// toggleSize: 25, +// borderRadius: getHorizontalSize( +// 12.00, +// ), +// activeColor: ColorConstant.blueA700, +// activeToggleColor: ColorConstant.gray50, +// inactiveColor: ColorConstant.blueGray50, +// inactiveToggleColor: ColorConstant.gray50, +// onToggle: (value) { +// onChanged!(value); +// }, +// ), +// ); +// } +// } diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_text_form_field.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_text_form_field.dart new file mode 100644 index 0000000..7f27483 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_text_form_field.dart @@ -0,0 +1,288 @@ +import 'package:base_project/core/app_export.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import '../utils/color_constants.dart'; +import '../utils/size_utils.dart'; +import '../theme/theme_helper.dart'; + +extension TextFormFieldStyleHelper on CustomTextFormField { + static OutlineInputBorder get outlineLightGreenA => OutlineInputBorder( + borderRadius: BorderRadius.circular(8.h), + borderSide: BorderSide( + color: appTheme.lightGreenA20001, + width: 1, + ), + ); + static OutlineInputBorder get outlineLimeA => OutlineInputBorder( + borderRadius: BorderRadius.circular(8.h), + borderSide: BorderSide( + color: appTheme.limeA200, + width: 1, + ), + ); + static OutlineInputBorder get outlineYellow => OutlineInputBorder( + borderRadius: BorderRadius.circular(5.h), + ); + static OutlineInputBorder get outlineLightGreenATL8 => OutlineInputBorder( + borderRadius: BorderRadius.circular(8.h), + borderSide: BorderSide( + color: appTheme.lightGreenA20001, + width: 1, + ), + ); + static OutlineInputBorder get outlineCyan => OutlineInputBorder( + borderRadius: BorderRadius.circular(9.h), + borderSide: BorderSide( + color: appTheme.cyan900, + width: 1, + ), + ); + + static OutlineInputBorder get outlineOnPrimaryContainer => OutlineInputBorder( + borderRadius: BorderRadius.circular(20.h), + borderSide: BorderSide( + color: theme.colorScheme.onPrimaryContainer, + width: 1, + ), + ); + static OutlineInputBorder get outlineOnPrimaryContainerTL8 => + OutlineInputBorder( + borderRadius: BorderRadius.circular(8.h), + borderSide: BorderSide( + color: theme.colorScheme.onPrimaryContainer, + width: 1, + ), + ); +} + +class CustomTextFormField extends StatelessWidget { + TextFormFieldShape? shape; + TextFormFieldPadding? padding; + void Function(String?)? onsaved; + void Function(String)? onChanged; + void Function()? onTap; + String? initialValue; + bool? readOnly; + List? inputFormatters; + TextFormFieldVariant? variant; + TextFormFieldFontStyle? fontStyle; + Alignment? alignment; + double? width; + EdgeInsetsGeometry? margin; + TextEditingController? controller; + FocusNode? focusNode; + String? errorText; + bool? isObscureText; + TextInputAction? textInputAction; + TextInputType? textInputType; + int? maxLines; + int? maxLength; // Added this line + String? hintText; + Widget? prefix; + BoxConstraints? prefixConstraints; + Widget? suffix; + BoxConstraints? suffixConstraints; + FormFieldValidator? validator; + TextInputType? keyboardType; // Add this line + final InputBorder? borderDecoration; + final TextStyle? hintStyle; + final EdgeInsets? contentPadding; + final Color? fillColor; + final bool? filled; + + CustomTextFormField({ + this.shape, + this.padding, + this.initialValue, + this.variant, + this.fontStyle, + this.readOnly, + this.alignment, + this.onChanged, + this.onTap, + this.width, + this.margin, + this.controller, + this.inputFormatters, + this.focusNode, + this.isObscureText = false, + this.textInputAction = TextInputAction.next, + this.textInputType, + this.maxLines, + this.maxLength, // Added this line + this.hintText, + this.prefix, + this.errorText, + this.onsaved, + this.prefixConstraints, + this.suffix, + this.suffixConstraints, + this.validator, + this.keyboardType, // Add this line + this.borderDecoration, + this.hintStyle, + this.contentPadding, + this.fillColor, + this.filled = true, + }); + + @override + Widget build(BuildContext context) { + return alignment != null + ? Align( + alignment: alignment ?? Alignment.center, + child: _buildTextFormFieldWidget(), + ) + : _buildTextFormFieldWidget(); + } + + _buildTextFormFieldWidget() { + return Container( + width: width ?? double.maxFinite, + margin: margin, + child: TextFormField( + readOnly: readOnly ?? false, + onSaved: onsaved, + onChanged: onChanged, + controller: controller, + onTap: onTap, + focusNode: focusNode, + // style: _setFontStyle(), + obscureText: isObscureText!, + textInputAction: textInputAction, + keyboardType: textInputType, + maxLines: maxLines ?? 1, + maxLength: maxLength, // Added this line + decoration: _buildDecoration(), + validator: validator, + initialValue: initialValue, + inputFormatters: inputFormatters, + ), + ); + } + + _buildDecoration() { + return InputDecoration( + labelText: hintText, + border: OutlineInputBorder(), + ); + } + // _buildDecoration() { + // return InputDecoration( + // hintText: hintText ?? "", + // hintStyle: _setFontStyle(), + // // border: _setBorderStyle(), + // enabledBorder: _setBorderStyle(), + // focusedBorder: _setBorderStyle(), + // disabledBorder: _setBorderStyle(), + // prefixIcon: prefix, + // errorText: errorText, + // prefixIconConstraints: prefixConstraints, + // suffixIcon: suffix, + // suffixIconConstraints: suffixConstraints, + // fillColor: _setFillColor(), + // filled: _setFilled(), + // isDense: true, + // contentPadding: _setPadding(), + // border: OutlineInputBorder(), + // ); + // } + + // _setFontStyle() { + // switch (fontStyle) { + // // Existing cases... + // case TextFormFieldFontStyle.RobotoMedium18: + // return TextStyle( + // color: ColorConstant.whiteA700, + // fontSize: getFontSize(18), + // fontFamily: 'Roboto', + // fontWeight: FontWeight.w500, + // ); + // default: + // return TextStyle( + // color: ColorConstant.blueGray200, + // fontSize: getFontSize(16), + // fontFamily: 'Gilroy', + // fontWeight: FontWeight.w500, + // ); + // } + // } + + _setOutlineBorderRadius() { + switch (shape) { + // Existing cases... + default: + return BorderRadius.circular(getHorizontalSize(6.00)); + } + } + + _setBorderStyle() { + switch (variant) { + // Existing cases... + default: + return OutlineInputBorder( + borderRadius: _setOutlineBorderRadius(), + borderSide: BorderSide( + color: ColorConstant.blueGray100, + width: 1, + ), + ); + } + } + + _setFillColor() { + switch (variant) { + // Existing cases... + default: + return ColorConstant.whiteA700; + } + } + + _setFilled() { + switch (variant) { + // Existing cases... + default: + return true; + } + } + + _setPadding() { + switch (padding) { + // Existing cases... + default: + return getPadding(all: 11); + } + } +} + +enum TextFormFieldShape { + RoundedBorder6, + CircleBorder16, +} + +enum TextFormFieldPadding { + PaddingAll11, + PaddingT12, + PaddingT16, + PaddingT20, + PaddingAll8, + PaddingT6, + PaddingT25, +} + +enum TextFormFieldVariant { + None, + OutlineBluegray100, + FillBlue50, + OutlineBluegray400, + OutlineBlack9003f, + FillBlueA200, +} + +enum TextFormFieldFontStyle { + GilroyMedium16, + GilroyMedium16BlueA700, + GilroyMedium16Bluegray400, + GilroySemiBold14, + RobotoMedium18, +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_text_form_field_f.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_text_form_field_f.dart new file mode 100644 index 0000000..7378e32 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_text_form_field_f.dart @@ -0,0 +1,168 @@ +import 'package:flutter/material.dart'; +import '../core/app_export.dart'; + +extension TextFormFieldStyleHelper on custom_text_form_field_f { + static OutlineInputBorder get outlineOnPrimaryContainer => OutlineInputBorder( + borderRadius: BorderRadius.circular(20.h), + borderSide: BorderSide( + color: theme.colorScheme.onPrimaryContainer, + width: 1, + ), + ); + static OutlineInputBorder get outlineOnPrimaryContainerTL8 => + OutlineInputBorder( + borderRadius: BorderRadius.circular(8.h), + borderSide: BorderSide( + color: theme.colorScheme.onPrimaryContainer, + width: 1, + ), + ); +} + +class custom_text_form_field_f extends StatelessWidget { + custom_text_form_field_f( + {Key? key, + this.alignment, + this.width, + this.scrollPadding, + this.controller, + this.focusNode, + this.autofocus = false, + this.textStyle, + this.obscureText = false, + this.textInputAction = TextInputAction.next, + this.textInputType = TextInputType.text, + this.maxLines, + this.hintText, + this.hintStyle, + this.prefix, + this.prefixConstraints, + this.suffix, + this.suffixConstraints, + this.contentPadding, + this.borderDecoration, + this.fillColor, + this.filled = true, + this.validator}) + : super( + key: key, + ); + + final Alignment? alignment; + + final double? width; + + final TextEditingController? scrollPadding; + + final TextEditingController? controller; + + final FocusNode? focusNode; + + final bool? autofocus; + + final TextStyle? textStyle; + + final bool? obscureText; + + final TextInputAction? textInputAction; + + final TextInputType? textInputType; + + final int? maxLines; + + final String? hintText; + + final TextStyle? hintStyle; + + final Widget? prefix; + + final BoxConstraints? prefixConstraints; + + final Widget? suffix; + + final BoxConstraints? suffixConstraints; + + final EdgeInsets? contentPadding; + + final InputBorder? borderDecoration; + + final Color? fillColor; + + final bool? filled; + + final FormFieldValidator? validator; + + @override + Widget build(BuildContext context) { + return alignment != null + ? Align( + alignment: alignment ?? Alignment.center, + child: textFormFieldWidget(context)) + : textFormFieldWidget(context); + } + + Widget textFormFieldWidget(BuildContext context) => SizedBox( + width: width ?? double.maxFinite, + child: TextFormField( + scrollPadding: + EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom), + controller: controller, + focusNode: focusNode, + onTapOutside: (event) { + if (focusNode != null) { + focusNode?.unfocus(); + } else { + FocusManager.instance.primaryFocus?.unfocus(); + } + }, + autofocus: autofocus!, + style: textStyle ?? theme.textTheme.titleSmall, + obscureText: obscureText!, + textInputAction: textInputAction, + keyboardType: textInputType, + maxLines: maxLines ?? 1, + decoration: decoration, + validator: validator, + ), + ); + InputDecoration get decoration => InputDecoration( + hintText: hintText ?? "", + hintStyle: hintStyle ?? theme.textTheme.titleSmall, + prefixIcon: prefix, + prefixIconConstraints: prefixConstraints, + suffixIcon: suffix, + suffixIconConstraints: suffixConstraints, + isDense: true, + contentPadding: contentPadding ?? + EdgeInsets.symmetric( + horizontal: 18.h, + vertical: 19.v, + ), + fillColor: fillColor ?? appTheme.gray100, + filled: filled, + border: borderDecoration ?? + OutlineInputBorder( + borderRadius: BorderRadius.circular(20.h), + borderSide: BorderSide( + color: theme.colorScheme.onPrimaryContainer, + width: 1, + ), + ), + enabledBorder: borderDecoration ?? + OutlineInputBorder( + borderRadius: BorderRadius.circular(20.h), + borderSide: BorderSide( + color: theme.colorScheme.onPrimaryContainer, + width: 1, + ), + ), + focusedBorder: borderDecoration ?? + OutlineInputBorder( + borderRadius: BorderRadius.circular(20.h), + borderSide: BorderSide( + color: theme.colorScheme.onPrimaryContainer, + width: 1, + ), + ), + ); +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_textformfield.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_textformfield.dart new file mode 100644 index 0000000..3097bab --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/lib/widgets/custom_textformfield.dart @@ -0,0 +1,68 @@ +import 'package:flutter/material.dart'; + +class CustomTextField extends StatefulWidget { + final String hintText; + final Function(String)? onSaved; + final String? Function(String?)? validator; + final Function()? onTap; + final TextInputType? textInputType; + final IconButton? suffixIcon; + final Function(String)? onChanged; + final bool? isObscureText; + FocusNode? focusNode; + String? initialValue ; + TextEditingController? controller; + + + CustomTextField( + {required this.hintText, + + this.controller, + this.onChanged, + this.focusNode, + this.isObscureText, + this.initialValue, + this.suffixIcon, + this.onSaved, + this.validator, + this.onTap, + this.textInputType}); + + @override + _CustomTextFieldState createState() => _CustomTextFieldState(); +} + +class _CustomTextFieldState extends State { + final TextEditingController _controller = TextEditingController(); + + @override + Widget build(BuildContext context) { + return TextFormField( + maxLines: 1, + initialValue: widget.initialValue , + obscureText: widget.isObscureText ?? false, + onChanged: widget.onChanged, + onTap: widget.onTap, + focusNode: widget.focusNode, + controller: _controller, + decoration: InputDecoration( + suffixIcon: widget.suffixIcon, + hintStyle: TextStyle(color: Colors.black.withOpacity(.4)), + hintText: widget.hintText, + border: UnderlineInputBorder(), + ), + validator: widget.validator, + onSaved: (String? value) { + if (widget.onSaved != null) { + widget.onSaved!(_controller.text); + } + }, + ); + } + + @override + void dispose() { + _controller.dispose(); + super.dispose(); + } +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/pubspec.lock b/prod116rb-front-f/authsec_flutterNewUi/base_project/pubspec.lock new file mode 100644 index 0000000..f3e2168 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/pubspec.lock @@ -0,0 +1,1482 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + another_carousel_pro: + dependency: "direct main" + description: + name: another_carousel_pro + sha256: "3973eac89f0df07c9032f597dc8f8e48ad3d73065c62cefd46231de04a71d433" + url: "https://pub.dev" + source: hosted + version: "1.0.2" + archive: + dependency: transitive + description: + name: archive + sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d + url: "https://pub.dev" + source: hosted + version: "3.6.1" + args: + dependency: transitive + description: + name: args + sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" + url: "https://pub.dev" + source: hosted + version: "2.5.0" + async: + dependency: transitive + description: + name: async + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" + source: hosted + version: "2.11.0" + audio_session: + dependency: transitive + description: + name: audio_session + sha256: "343e83bc7809fbda2591a49e525d6b63213ade10c76f15813be9aed6657b3261" + url: "https://pub.dev" + source: hosted + version: "0.1.21" + autocomplete_textfield: + dependency: "direct main" + description: + name: autocomplete_textfield + sha256: "8170e66d381c21623f1cfbb957ab9c6b5a45d9c50a6daac7fc57dbc3ba94abb4" + url: "https://pub.dev" + source: hosted + version: "2.0.1" + barcode: + dependency: transitive + description: + name: barcode + sha256: ab180ce22c6555d77d45f0178a523669db67f95856e3378259ef2ffeb43e6003 + url: "https://pub.dev" + source: hosted + version: "2.2.8" + barcode_widget: + dependency: "direct main" + description: + name: barcode_widget + sha256: "6f2c5b08659b1a5f4d88d183e6007133ea2f96e50e7b8bb628f03266c3931427" + url: "https://pub.dev" + source: hosted + version: "2.0.4" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + cached_network_image: + dependency: "direct main" + description: + name: cached_network_image + sha256: "28ea9690a8207179c319965c13cd8df184d5ee721ae2ce60f398ced1219cea1f" + url: "https://pub.dev" + source: hosted + version: "3.3.1" + cached_network_image_platform_interface: + dependency: transitive + description: + name: cached_network_image_platform_interface + sha256: "9e90e78ae72caa874a323d78fa6301b3fb8fa7ea76a8f96dc5b5bf79f283bf2f" + url: "https://pub.dev" + source: hosted + version: "4.0.0" + cached_network_image_web: + dependency: transitive + description: + name: cached_network_image_web + sha256: "205d6a9f1862de34b93184f22b9d2d94586b2f05c581d546695e3d8f6a805cd7" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + camera: + dependency: "direct main" + description: + name: camera + sha256: dfa8fc5a1adaeb95e7a54d86a5bd56f4bb0e035515354c8ac6d262e35cec2ec8 + url: "https://pub.dev" + source: hosted + version: "0.10.6" + camera_android: + dependency: transitive + description: + name: camera_android + sha256: "981654e0e56a4c735f7ecc7bd3921385eb5f7dd13deaf4a6431255d9731df01a" + url: "https://pub.dev" + source: hosted + version: "0.10.9+7" + camera_avfoundation: + dependency: transitive + description: + name: camera_avfoundation + sha256: "7d021e8cd30d9b71b8b92b4ad669e80af432d722d18d6aac338572754a786c15" + url: "https://pub.dev" + source: hosted + version: "0.9.16" + camera_platform_interface: + dependency: transitive + description: + name: camera_platform_interface + sha256: a250314a48ea337b35909a4c9d5416a208d736dcb01d0b02c6af122be66660b0 + url: "https://pub.dev" + source: hosted + version: "2.7.4" + camera_web: + dependency: transitive + description: + name: camera_web + sha256: "9e9aba2fbab77ce2472924196ff8ac4dd8f9126c4f9a3096171cd1d870d6b26c" + url: "https://pub.dev" + source: hosted + version: "0.3.3" + characters: + dependency: transitive + description: + name: characters + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + chewie: + dependency: "direct main" + description: + name: chewie + sha256: e53da939709efb9aad0f3d72a69a8d05f889168b7a138af60ce78bab5c94b135 + url: "https://pub.dev" + source: hosted + version: "1.8.1" + clock: + dependency: transitive + description: + name: clock + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" + source: hosted + version: "1.1.1" + collection: + dependency: transitive + description: + name: collection + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" + source: hosted + version: "1.18.0" + confetti: + dependency: "direct main" + description: + name: confetti + sha256: "979aafde2428c53947892c95eb244466c109c129b7eee9011f0a66caaca52267" + url: "https://pub.dev" + source: hosted + version: "0.7.0" + cross_file: + dependency: transitive + description: + name: cross_file + sha256: "55d7b444feb71301ef6b8838dbc1ae02e63dd48c8773f3810ff53bb1e2945b32" + url: "https://pub.dev" + source: hosted + version: "0.3.4+1" + crypto: + dependency: transitive + description: + name: crypto + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + url: "https://pub.dev" + source: hosted + version: "3.0.3" + csslib: + dependency: transitive + description: + name: csslib + sha256: "706b5707578e0c1b4b7550f64078f0a0f19dec3f50a178ffae7006b0a9ca58fb" + url: "https://pub.dev" + source: hosted + version: "1.0.0" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 + url: "https://pub.dev" + source: hosted + version: "1.0.8" + dbus: + dependency: transitive + description: + name: dbus + sha256: "365c771ac3b0e58845f39ec6deebc76e3276aa9922b0cc60840712094d9047ac" + url: "https://pub.dev" + source: hosted + version: "0.7.10" + dio: + dependency: "direct main" + description: + name: dio + sha256: "77befdddf51050e1635a04d2bcfff230089ce7294e642d00da58cd079c0de0c8" + url: "https://pub.dev" + source: hosted + version: "5.5.0" + dio_web_adapter: + dependency: transitive + description: + name: dio_web_adapter + sha256: "36c5b2d79eb17cdae41e974b7a8284fec631651d2a6f39a8a2ff22327e90aeac" + url: "https://pub.dev" + source: hosted + version: "1.0.1" + dotted_border: + dependency: "direct main" + description: + name: dotted_border + sha256: "108837e11848ca776c53b30bc870086f84b62ed6e01c503ed976e8f8c7df9c04" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + dropdown_search: + dependency: "direct main" + description: + name: dropdown_search + sha256: "55106e8290acaa97ed15bea1fdad82c3cf0c248dd410e651f5a8ac6870f783ab" + url: "https://pub.dev" + source: hosted + version: "5.0.6" + equatable: + dependency: transitive + description: + name: equatable + sha256: c2b87cb7756efdf69892005af546c56c0b5037f54d2a88269b4f347a505e3ca2 + url: "https://pub.dev" + source: hosted + version: "2.0.5" + fade_shimmer: + dependency: "direct main" + description: + name: fade_shimmer + sha256: "7410220ba0ccfa3abef630ec64e2398b9e136fbeb6fe2f8ce86d939f46b3491e" + url: "https://pub.dev" + source: hosted + version: "2.2.0" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" + source: hosted + version: "1.3.1" + ffi: + dependency: transitive + description: + name: ffi + sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + file: + dependency: transitive + description: + name: file + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + url: "https://pub.dev" + source: hosted + version: "7.0.0" + file_picker: + dependency: "direct main" + description: + name: file_picker + sha256: "824f5b9f389bfc4dddac3dea76cd70c51092d9dff0b2ece7ef4f53db8547d258" + url: "https://pub.dev" + source: hosted + version: "8.0.6" + file_selector_linux: + dependency: transitive + description: + name: file_selector_linux + sha256: "045d372bf19b02aeb69cacf8b4009555fb5f6f0b7ad8016e5f46dd1387ddd492" + url: "https://pub.dev" + source: hosted + version: "0.9.2+1" + file_selector_macos: + dependency: transitive + description: + name: file_selector_macos + sha256: f42eacb83b318e183b1ae24eead1373ab1334084404c8c16e0354f9a3e55d385 + url: "https://pub.dev" + source: hosted + version: "0.9.4" + file_selector_platform_interface: + dependency: transitive + description: + name: file_selector_platform_interface + sha256: a3994c26f10378a039faa11de174d7b78eb8f79e4dd0af2a451410c1a5c3f66b + url: "https://pub.dev" + source: hosted + version: "2.6.2" + file_selector_windows: + dependency: transitive + description: + name: file_selector_windows + sha256: d3547240c20cabf205c7c7f01a50ecdbc413755814d6677f3cb366f04abcead0 + url: "https://pub.dev" + source: hosted + version: "0.9.3+1" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + fl_chart: + dependency: "direct main" + description: + name: fl_chart + sha256: d0f0d49112f2f4b192481c16d05b6418bd7820e021e265a3c22db98acf7ed7fb + url: "https://pub.dev" + source: hosted + version: "0.68.0" + fluentui_system_icons: + dependency: "direct main" + description: + name: fluentui_system_icons + sha256: b4e0054ffa198073d2eef6009e79cb7ab770c049f553c39a67ae62523d7286fe + url: "https://pub.dev" + source: hosted + version: "1.1.246" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_barcode_scanner: + dependency: "direct main" + description: + name: flutter_barcode_scanner + sha256: a4ba37daf9933f451a5e812c753ddd045d6354e4a3280342d895b07fecaab3fa + url: "https://pub.dev" + source: hosted + version: "2.0.0" + flutter_cache_manager: + dependency: transitive + description: + name: flutter_cache_manager + sha256: "395d6b7831f21f3b989ebedbb785545932adb9afe2622c1ffacf7f4b53a7e544" + url: "https://pub.dev" + source: hosted + version: "3.3.2" + flutter_datetime_picker: + dependency: "direct main" + description: + name: flutter_datetime_picker + sha256: "8e695c63c769350e541951227c2775190ec73ceda774a315b1dc9a99d5facfe5" + url: "https://pub.dev" + source: hosted + version: "1.5.1" + flutter_ffmpeg: + dependency: "direct main" + description: + name: flutter_ffmpeg + sha256: "8d8bb4551cf76384748ba6948739c1e56a9164794e48f06cbfb0ff1bfb058b5f" + url: "https://pub.dev" + source: hosted + version: "0.4.2" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1" + url: "https://pub.dev" + source: hosted + version: "3.0.2" + flutter_plugin_android_lifecycle: + dependency: transitive + description: + name: flutter_plugin_android_lifecycle + sha256: c6b0b4c05c458e1c01ad9bcc14041dd7b1f6783d487be4386f793f47a8a4d03e + url: "https://pub.dev" + source: hosted + version: "2.0.20" + flutter_reorderable_list: + dependency: "direct main" + description: + name: flutter_reorderable_list + sha256: "0400ef34fa00b7cac69f71efc92d7e49727f425bc1080180ebe70bf47618afe0" + url: "https://pub.dev" + source: hosted + version: "1.3.1" + flutter_secure_storage: + dependency: "direct main" + description: + name: flutter_secure_storage + sha256: "22dbf16f23a4bcf9d35e51be1c84ad5bb6f627750565edd70dab70f3ff5fff8f" + url: "https://pub.dev" + source: hosted + version: "8.1.0" + flutter_secure_storage_linux: + dependency: transitive + description: + name: flutter_secure_storage_linux + sha256: "4d91bfc23047422cbcd73ac684bc169859ee766482517c22172c86596bf1464b" + url: "https://pub.dev" + source: hosted + version: "1.2.1" + flutter_secure_storage_macos: + dependency: transitive + description: + name: flutter_secure_storage_macos + sha256: "1693ab11121a5f925bbea0be725abfcfbbcf36c1e29e571f84a0c0f436147a81" + url: "https://pub.dev" + source: hosted + version: "3.1.2" + flutter_secure_storage_platform_interface: + dependency: transitive + description: + name: flutter_secure_storage_platform_interface + sha256: cf91ad32ce5adef6fba4d736a542baca9daf3beac4db2d04be350b87f69ac4a8 + url: "https://pub.dev" + source: hosted + version: "1.1.2" + flutter_secure_storage_web: + dependency: transitive + description: + name: flutter_secure_storage_web + sha256: f4ebff989b4f07b2656fb16b47852c0aab9fed9b4ec1c70103368337bc1886a9 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + flutter_secure_storage_windows: + dependency: transitive + description: + name: flutter_secure_storage_windows + sha256: "38f9501c7cb6f38961ef0e1eacacee2b2d4715c63cc83fe56449c4d3d0b47255" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + flutter_sound: + dependency: "direct main" + description: + name: flutter_sound + sha256: "1f40b26b92907a433afe877c927cd48f5a2e4d0f7188e5d39eb5756008aa51ab" + url: "https://pub.dev" + source: hosted + version: "9.6.0" + flutter_sound_platform_interface: + dependency: transitive + description: + name: flutter_sound_platform_interface + sha256: "2e218521d8187b9a4c65063ad9c79bfe88119531ff68047a2eaa6b027cb276bb" + url: "https://pub.dev" + source: hosted + version: "9.6.0" + flutter_sound_web: + dependency: transitive + description: + name: flutter_sound_web + sha256: "5013a15e4e69a4bdc8badd729130eef43c3305e30ba8e6933f863436ce969932" + url: "https://pub.dev" + source: hosted + version: "9.6.0" + flutter_svg: + dependency: "direct main" + description: + name: flutter_svg + sha256: "7b4ca6cf3304575fe9c8ec64813c8d02ee41d2afe60bcfe0678bcb5375d596a2" + url: "https://pub.dev" + source: hosted + version: "2.0.10+1" + flutter_svg_provider: + dependency: "direct main" + description: + name: flutter_svg_provider + sha256: cda47ab350671ba51ae4605d48f4c82fa5a2c399d22ebda367c1b407234c5048 + url: "https://pub.dev" + source: hosted + version: "1.0.7" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + fluttertoast: + dependency: "direct main" + description: + name: fluttertoast + sha256: "7eae679e596a44fdf761853a706f74979f8dd3cd92cf4e23cae161fda091b847" + url: "https://pub.dev" + source: hosted + version: "8.2.6" + google_fonts: + dependency: "direct main" + description: + name: google_fonts + sha256: e20ff62b158b96f392bfc8afe29dee1503c94fbea2cbe8186fd59b756b8ae982 + url: "https://pub.dev" + source: hosted + version: "5.1.0" + google_mlkit_commons: + dependency: transitive + description: + name: google_mlkit_commons + sha256: "27d626c66a181351a953eba5b6ff1ff123aadb891b4dab085b292118f039d6ac" + url: "https://pub.dev" + source: hosted + version: "0.7.1" + google_mlkit_text_recognition: + dependency: "direct main" + description: + name: google_mlkit_text_recognition + sha256: "89c848329355f165ff17ca8645cab5998770e9e25e431fe6dd8261ed9cf7bdc4" + url: "https://pub.dev" + source: hosted + version: "0.13.0" + html: + dependency: transitive + description: + name: html + sha256: "3a7812d5bcd2894edf53dfaf8cd640876cf6cef50a8f238745c8b8120ea74d3a" + url: "https://pub.dev" + source: hosted + version: "0.15.4" + http: + dependency: "direct main" + description: + name: http + sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938" + url: "https://pub.dev" + source: hosted + version: "1.2.1" + http_parser: + dependency: "direct main" + description: + name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + iconsax: + dependency: "direct main" + description: + name: iconsax + sha256: fb0144c61f41f3f8a385fadc27783ea9f5359670be885ed7f35cef32565d5228 + url: "https://pub.dev" + source: hosted + version: "0.0.8" + image: + dependency: "direct main" + description: + name: image + sha256: "2237616a36c0d69aef7549ab439b833fb7f9fb9fc861af2cc9ac3eedddd69ca8" + url: "https://pub.dev" + source: hosted + version: "4.2.0" + image_picker: + dependency: "direct main" + description: + name: image_picker + sha256: "021834d9c0c3de46bf0fe40341fa07168407f694d9b2bb18d532dc1261867f7a" + url: "https://pub.dev" + source: hosted + version: "1.1.2" + image_picker_android: + dependency: transitive + description: + name: image_picker_android + sha256: "4161e1f843d8480d2e9025ee22411778c3c9eb7e40076dcf2da23d8242b7b51c" + url: "https://pub.dev" + source: hosted + version: "0.8.12+3" + image_picker_for_web: + dependency: transitive + description: + name: image_picker_for_web + sha256: "5d6eb13048cd47b60dbf1a5495424dea226c5faf3950e20bf8120a58efb5b5f3" + url: "https://pub.dev" + source: hosted + version: "3.0.4" + image_picker_ios: + dependency: transitive + description: + name: image_picker_ios + sha256: "6703696ad49f5c3c8356d576d7ace84d1faf459afb07accbb0fae780753ff447" + url: "https://pub.dev" + source: hosted + version: "0.8.12" + image_picker_linux: + dependency: transitive + description: + name: image_picker_linux + sha256: "4ed1d9bb36f7cd60aa6e6cd479779cc56a4cb4e4de8f49d487b1aaad831300fa" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_macos: + dependency: transitive + description: + name: image_picker_macos + sha256: "3f5ad1e8112a9a6111c46d0b57a7be2286a9a07fc6e1976fdf5be2bd31d4ff62" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_platform_interface: + dependency: transitive + description: + name: image_picker_platform_interface + sha256: "9ec26d410ff46f483c5519c29c02ef0e02e13a543f882b152d4bfd2f06802f80" + url: "https://pub.dev" + source: hosted + version: "2.10.0" + image_picker_windows: + dependency: transitive + description: + name: image_picker_windows + sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + intl: + dependency: "direct main" + description: + name: intl + sha256: "910f85bce16fb5c6f614e117efa303e85a1731bb0081edf3604a2ae6e9a3cc91" + url: "https://pub.dev" + source: hosted + version: "0.17.0" + intl_phone_number_input: + dependency: "direct main" + description: + name: intl_phone_number_input + sha256: "1c4328713a9503ab26a1fdbb6b00b4cada68c18aac922b35bedbc72eff1297c3" + url: "https://pub.dev" + source: hosted + version: "0.7.4" + ioredis: + dependency: "direct main" + description: + name: ioredis + sha256: "965a40409b10780c5d8b78735675f6109b86516114479d1bfaaccf635706da64" + url: "https://pub.dev" + source: hosted + version: "1.0.2" + js: + dependency: transitive + description: + name: js + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + url: "https://pub.dev" + source: hosted + version: "0.6.7" + json_annotation: + dependency: transitive + description: + name: json_annotation + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" + url: "https://pub.dev" + source: hosted + version: "4.9.0" + just_audio: + dependency: "direct main" + description: + name: just_audio + sha256: ee50602364ba83fa6308f5512dd560c713ec3e1f2bc75f0db43618f0d82ef71a + url: "https://pub.dev" + source: hosted + version: "0.9.39" + just_audio_platform_interface: + dependency: transitive + description: + name: just_audio_platform_interface + sha256: "0243828cce503c8366cc2090cefb2b3c871aa8ed2f520670d76fd47aa1ab2790" + url: "https://pub.dev" + source: hosted + version: "4.3.0" + just_audio_web: + dependency: transitive + description: + name: just_audio_web + sha256: "0edb481ad4aa1ff38f8c40f1a3576013c3420bf6669b686fe661627d49bc606c" + url: "https://pub.dev" + source: hosted + version: "0.4.11" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + url: "https://pub.dev" + source: hosted + version: "10.0.4" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + libphonenumber_platform_interface: + dependency: transitive + description: + name: libphonenumber_platform_interface + sha256: f801f6c65523f56504b83f0890e6dad584ab3a7507dca65fec0eed640afea40f + url: "https://pub.dev" + source: hosted + version: "0.4.2" + libphonenumber_plugin: + dependency: transitive + description: + name: libphonenumber_plugin + sha256: c615021d9816fbda2b2587881019ed595ecdf54d999652d7e4cce0e1f026368c + url: "https://pub.dev" + source: hosted + version: "0.3.3" + libphonenumber_web: + dependency: transitive + description: + name: libphonenumber_web + sha256: "8186f420dbe97c3132283e52819daff1e55d60d6db46f7ea5ac42f42a28cc2ef" + url: "https://pub.dev" + source: hosted + version: "0.3.2" + lints: + dependency: transitive + description: + name: lints + sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 + url: "https://pub.dev" + source: hosted + version: "3.0.0" + logger: + dependency: transitive + description: + name: logger + sha256: af05cc8714f356fd1f3888fb6741cbe9fbe25cdb6eedbab80e1a6db21047d4a4 + url: "https://pub.dev" + source: hosted + version: "2.3.0" + lottie: + dependency: "direct main" + description: + name: lottie + sha256: "6a24ade5d3d918c306bb1c21a6b9a04aab0489d51a2582522eea820b4093b62b" + url: "https://pub.dev" + source: hosted + version: "3.1.2" + matcher: + dependency: transitive + description: + name: matcher + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + url: "https://pub.dev" + source: hosted + version: "0.12.16+1" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + url: "https://pub.dev" + source: hosted + version: "0.8.0" + meta: + dependency: transitive + description: + name: meta + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" + url: "https://pub.dev" + source: hosted + version: "1.12.0" + mime: + dependency: transitive + description: + name: mime + sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2" + url: "https://pub.dev" + source: hosted + version: "1.0.5" + multi_select_flutter: + dependency: "direct main" + description: + name: multi_select_flutter + sha256: "503857b415d390d29159df8a9d92d83c6aac17aaf1c307fb7bcfc77d097d20ed" + url: "https://pub.dev" + source: hosted + version: "4.1.3" + nested: + dependency: transitive + description: + name: nested + sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" + url: "https://pub.dev" + source: hosted + version: "1.0.0" + octo_image: + dependency: transitive + description: + name: octo_image + sha256: "45b40f99622f11901238e18d48f5f12ea36426d8eced9f4cbf58479c7aa2430d" + url: "https://pub.dev" + source: hosted + version: "2.0.0" + package_info_plus: + dependency: transitive + description: + name: package_info_plus + sha256: b93d8b4d624b4ea19b0a5a208b2d6eff06004bc3ce74c06040b120eeadd00ce0 + url: "https://pub.dev" + source: hosted + version: "8.0.0" + package_info_plus_platform_interface: + dependency: transitive + description: + name: package_info_plus_platform_interface + sha256: f49918f3433a3146047372f9d4f1f847511f2acd5cd030e1f44fe5a50036b70e + url: "https://pub.dev" + source: hosted + version: "3.0.0" + path: + dependency: "direct main" + description: + name: path + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" + source: hosted + version: "1.9.0" + path_drawing: + dependency: transitive + description: + name: path_drawing + sha256: bbb1934c0cbb03091af082a6389ca2080345291ef07a5fa6d6e078ba8682f977 + url: "https://pub.dev" + source: hosted + version: "1.0.1" + path_parsing: + dependency: transitive + description: + name: path_parsing + sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf + url: "https://pub.dev" + source: hosted + version: "1.0.1" + path_provider: + dependency: "direct main" + description: + name: path_provider + sha256: c9e7d3a4cd1410877472158bee69963a4579f78b68c65a2b7d40d1a7a88bb161 + url: "https://pub.dev" + source: hosted + version: "2.1.3" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + sha256: bca87b0165ffd7cdb9cad8edd22d18d2201e886d9a9f19b4fb3452ea7df3a72a + url: "https://pub.dev" + source: hosted + version: "2.2.6" + path_provider_foundation: + dependency: transitive + description: + name: path_provider_foundation + sha256: f234384a3fdd67f989b4d54a5d73ca2a6c422fa55ae694381ae0f4375cd1ea16 + url: "https://pub.dev" + source: hosted + version: "2.4.0" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 + url: "https://pub.dev" + source: hosted + version: "2.2.1" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170" + url: "https://pub.dev" + source: hosted + version: "2.2.1" + pedantic: + dependency: transitive + description: + name: pedantic + sha256: "67fc27ed9639506c856c840ccce7594d0bdcd91bc8d53d6e52359449a1d50602" + url: "https://pub.dev" + source: hosted + version: "1.11.1" + permission_handler: + dependency: "direct main" + description: + name: permission_handler + sha256: "18bf33f7fefbd812f37e72091a15575e72d5318854877e0e4035a24ac1113ecb" + url: "https://pub.dev" + source: hosted + version: "11.3.1" + permission_handler_android: + dependency: transitive + description: + name: permission_handler_android + sha256: b29a799ca03be9f999aa6c39f7de5209482d638e6f857f6b93b0875c618b7e54 + url: "https://pub.dev" + source: hosted + version: "12.0.7" + permission_handler_apple: + dependency: transitive + description: + name: permission_handler_apple + sha256: e6f6d73b12438ef13e648c4ae56bd106ec60d17e90a59c4545db6781229082a0 + url: "https://pub.dev" + source: hosted + version: "9.4.5" + permission_handler_html: + dependency: transitive + description: + name: permission_handler_html + sha256: "54bf176b90f6eddd4ece307e2c06cf977fb3973719c35a93b85cc7093eb6070d" + url: "https://pub.dev" + source: hosted + version: "0.1.1" + permission_handler_platform_interface: + dependency: transitive + description: + name: permission_handler_platform_interface + sha256: "48d4fcf201a1dad93ee869ab0d4101d084f49136ec82a8a06ed9cfeacab9fd20" + url: "https://pub.dev" + source: hosted + version: "4.2.1" + permission_handler_windows: + dependency: transitive + description: + name: permission_handler_windows + sha256: "1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e" + url: "https://pub.dev" + source: hosted + version: "0.2.1" + petitparser: + dependency: transitive + description: + name: petitparser + sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 + url: "https://pub.dev" + source: hosted + version: "6.0.2" + pinput: + dependency: "direct main" + description: + name: pinput + sha256: a92b55ecf9c25d1b9e100af45905385d5bc34fc9b6b04177a9e82cb88fe4d805 + url: "https://pub.dev" + source: hosted + version: "3.0.1" + platform: + dependency: transitive + description: + name: platform + sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" + url: "https://pub.dev" + source: hosted + version: "3.1.5" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" + provider: + dependency: "direct main" + description: + name: provider + sha256: c8a055ee5ce3fd98d6fc872478b03823ffdb448699c6ebdbbc71d59b596fd48c + url: "https://pub.dev" + source: hosted + version: "6.1.2" + qr: + dependency: transitive + description: + name: qr + sha256: "5a1d2586170e172b8a8c8470bbbffd5eb0cd38a66c0d77155ea138d3af3a4445" + url: "https://pub.dev" + source: hosted + version: "3.0.2" + qr_code_scanner: + dependency: "direct main" + description: + name: qr_code_scanner + sha256: f23b68d893505a424f0bd2e324ebea71ed88465d572d26bb8d2e78a4749591fd + url: "https://pub.dev" + source: hosted + version: "1.0.1" + qr_flutter: + dependency: "direct main" + description: + name: qr_flutter + sha256: "5095f0fc6e3f71d08adef8feccc8cea4f12eec18a2e31c2e8d82cb6019f4b097" + url: "https://pub.dev" + source: hosted + version: "4.1.0" + recase: + dependency: transitive + description: + name: recase + sha256: e4eb4ec2dcdee52dcf99cb4ceabaffc631d7424ee55e56f280bc039737f89213 + url: "https://pub.dev" + source: hosted + version: "4.1.0" + redis: + dependency: "direct main" + description: + name: redis + sha256: "4a8218ef7b0642ff499147c7a105591208259e2f55f07db0101ace7f82f66cf9" + url: "https://pub.dev" + source: hosted + version: "4.0.0" + redis_dart: + dependency: "direct main" + description: + name: redis_dart + sha256: "4de5252a1da7e602b619d71d7a43fe7df04fddfe3e1ae87e03b2f4ccb632f9cb" + url: "https://pub.dev" + source: hosted + version: "0.1.0+4" + rxdart: + dependency: transitive + description: + name: rxdart + sha256: "0c7c0cedd93788d996e33041ffecda924cc54389199cde4e6a34b440f50044cb" + url: "https://pub.dev" + source: hosted + version: "0.27.7" + shared_preferences: + dependency: "direct main" + description: + name: shared_preferences + sha256: d3bbe5553a986e83980916ded2f0b435ef2e1893dfaa29d5a7a790d0eca12180 + url: "https://pub.dev" + source: hosted + version: "2.2.3" + shared_preferences_android: + dependency: transitive + description: + name: shared_preferences_android + sha256: "93d0ec9dd902d85f326068e6a899487d1f65ffcd5798721a95330b26c8131577" + url: "https://pub.dev" + source: hosted + version: "2.2.3" + shared_preferences_foundation: + dependency: transitive + description: + name: shared_preferences_foundation + sha256: "0a8a893bf4fd1152f93fec03a415d11c27c74454d96e2318a7ac38dd18683ab7" + url: "https://pub.dev" + source: hosted + version: "2.4.0" + shared_preferences_linux: + dependency: transitive + description: + name: shared_preferences_linux + sha256: "9f2cbcf46d4270ea8be39fa156d86379077c8a5228d9dfdb1164ae0bb93f1faa" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + shared_preferences_platform_interface: + dependency: transitive + description: + name: shared_preferences_platform_interface + sha256: "22e2ecac9419b4246d7c22bfbbda589e3acf5c0351137d87dd2939d984d37c3b" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + shared_preferences_web: + dependency: transitive + description: + name: shared_preferences_web + sha256: "9aee1089b36bd2aafe06582b7d7817fd317ef05fc30e6ba14bff247d0933042a" + url: "https://pub.dev" + source: hosted + version: "2.3.0" + shared_preferences_windows: + dependency: transitive + description: + name: shared_preferences_windows + sha256: "841ad54f3c8381c480d0c9b508b89a34036f512482c407e6df7a9c4aa2ef8f59" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + smart_auth: + dependency: transitive + description: + name: smart_auth + sha256: a25229b38c02f733d0a4e98d941b42bed91a976cb589e934895e60ccfa674cf6 + url: "https://pub.dev" + source: hosted + version: "1.1.1" + source_span: + dependency: transitive + description: + name: source_span + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + speech_to_text: + dependency: "direct main" + description: + name: speech_to_text + sha256: "57fef1d41bdebe298e84842c89bb4ac91f31cdbec7830c8cb1fc6b91d03abd42" + url: "https://pub.dev" + source: hosted + version: "6.6.0" + speech_to_text_macos: + dependency: transitive + description: + name: speech_to_text_macos + sha256: e685750f7542fcaa087a5396ee471e727ec648bf681f4da83c84d086322173f6 + url: "https://pub.dev" + source: hosted + version: "1.1.0" + speech_to_text_platform_interface: + dependency: transitive + description: + name: speech_to_text_platform_interface + sha256: a0df1a907091ea09880077dc25aae02af9f79811264e6e97ddb08639b7f771c2 + url: "https://pub.dev" + source: hosted + version: "2.2.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" + sqflite: + dependency: transitive + description: + name: sqflite + sha256: a43e5a27235518c03ca238e7b4732cf35eabe863a369ceba6cbefa537a66f16d + url: "https://pub.dev" + source: hosted + version: "2.3.3+1" + sqflite_common: + dependency: transitive + description: + name: sqflite_common + sha256: "3da423ce7baf868be70e2c0976c28a1bb2f73644268b7ffa7d2e08eab71f16a4" + url: "https://pub.dev" + source: hosted + version: "2.5.4" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" + source: hosted + version: "1.11.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" + source: hosted + version: "2.1.2" + stream_transform: + dependency: transitive + description: + name: stream_transform + sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + synchronized: + dependency: transitive + description: + name: synchronized + sha256: "539ef412b170d65ecdafd780f924e5be3f60032a1128df156adad6c5b373d558" + url: "https://pub.dev" + source: hosted + version: "3.1.0+1" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + test_api: + dependency: transitive + description: + name: test_api + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" + url: "https://pub.dev" + source: hosted + version: "0.7.0" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" + source: hosted + version: "1.3.2" + universal_platform: + dependency: transitive + description: + name: universal_platform + sha256: "64e16458a0ea9b99260ceb5467a214c1f298d647c659af1bff6d3bf82536b1ec" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + url_launcher: + dependency: "direct main" + description: + name: url_launcher + sha256: "21b704ce5fa560ea9f3b525b43601c678728ba46725bab9b01187b4831377ed3" + url: "https://pub.dev" + source: hosted + version: "6.3.0" + url_launcher_android: + dependency: transitive + description: + name: url_launcher_android + sha256: ceb2625f0c24ade6ef6778d1de0b2e44f2db71fded235eb52295247feba8c5cf + url: "https://pub.dev" + source: hosted + version: "6.3.3" + url_launcher_ios: + dependency: transitive + description: + name: url_launcher_ios + sha256: "7068716403343f6ba4969b4173cbf3b84fc768042124bc2c011e5d782b24fe89" + url: "https://pub.dev" + source: hosted + version: "6.3.0" + url_launcher_linux: + dependency: transitive + description: + name: url_launcher_linux + sha256: ab360eb661f8879369acac07b6bb3ff09d9471155357da8443fd5d3cf7363811 + url: "https://pub.dev" + source: hosted + version: "3.1.1" + url_launcher_macos: + dependency: transitive + description: + name: url_launcher_macos + sha256: "9a1a42d5d2d95400c795b2914c36fdcb525870c752569438e4ebb09a2b5d90de" + url: "https://pub.dev" + source: hosted + version: "3.2.0" + url_launcher_platform_interface: + dependency: transitive + description: + name: url_launcher_platform_interface + sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + url_launcher_web: + dependency: transitive + description: + name: url_launcher_web + sha256: "8d9e750d8c9338601e709cd0885f95825086bd8b642547f26bda435aade95d8a" + url: "https://pub.dev" + source: hosted + version: "2.3.1" + url_launcher_windows: + dependency: transitive + description: + name: url_launcher_windows + sha256: ecf9725510600aa2bb6d7ddabe16357691b6d2805f66216a97d1b881e21beff7 + url: "https://pub.dev" + source: hosted + version: "3.1.1" + uuid: + dependency: transitive + description: + name: uuid + sha256: "814e9e88f21a176ae1359149021870e87f7cddaf633ab678a5d2b0bff7fd1ba8" + url: "https://pub.dev" + source: hosted + version: "4.4.0" + vector_graphics: + dependency: transitive + description: + name: vector_graphics + sha256: "32c3c684e02f9bc0afb0ae0aa653337a2fe022e8ab064bcd7ffda27a74e288e3" + url: "https://pub.dev" + source: hosted + version: "1.1.11+1" + vector_graphics_codec: + dependency: transitive + description: + name: vector_graphics_codec + sha256: c86987475f162fadff579e7320c7ddda04cd2fdeffbe1129227a85d9ac9e03da + url: "https://pub.dev" + source: hosted + version: "1.1.11+1" + vector_graphics_compiler: + dependency: transitive + description: + name: vector_graphics_compiler + sha256: "12faff3f73b1741a36ca7e31b292ddeb629af819ca9efe9953b70bd63fc8cd81" + url: "https://pub.dev" + source: hosted + version: "1.1.11+1" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + video_player: + dependency: "direct main" + description: + name: video_player + sha256: e30df0d226c4ef82e2c150ebf6834b3522cf3f654d8e2f9419d376cdc071425d + url: "https://pub.dev" + source: hosted + version: "2.9.1" + video_player_android: + dependency: transitive + description: + name: video_player_android + sha256: fdc0331ce9f808cc2714014cb8126bd6369943affefd54f8fdab0ea0bb617b7f + url: "https://pub.dev" + source: hosted + version: "2.5.2" + video_player_avfoundation: + dependency: transitive + description: + name: video_player_avfoundation + sha256: d1e9a824f2b324000dc8fb2dcb2a3285b6c1c7c487521c63306cc5b394f68a7c + url: "https://pub.dev" + source: hosted + version: "2.6.1" + video_player_platform_interface: + dependency: transitive + description: + name: video_player_platform_interface + sha256: "236454725fafcacf98f0f39af0d7c7ab2ce84762e3b63f2cbb3ef9a7e0550bc6" + url: "https://pub.dev" + source: hosted + version: "6.2.2" + video_player_web: + dependency: transitive + description: + name: video_player_web + sha256: ff4d69a6614b03f055397c27a71c9d3ddea2b2a23d71b2ba0164f59ca32b8fe2 + url: "https://pub.dev" + source: hosted + version: "2.3.1" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" + url: "https://pub.dev" + source: hosted + version: "14.2.1" + wakelock_plus: + dependency: transitive + description: + name: wakelock_plus + sha256: "14758533319a462ffb5aa3b7ddb198e59b29ac3b02da14173a1715d65d4e6e68" + url: "https://pub.dev" + source: hosted + version: "1.2.5" + wakelock_plus_platform_interface: + dependency: transitive + description: + name: wakelock_plus_platform_interface + sha256: "422d1cdbb448079a8a62a5a770b69baa489f8f7ca21aef47800c726d404f9d16" + url: "https://pub.dev" + source: hosted + version: "1.2.1" + web: + dependency: transitive + description: + name: web + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" + url: "https://pub.dev" + source: hosted + version: "0.5.1" + win32: + dependency: transitive + description: + name: win32 + sha256: a79dbe579cb51ecd6d30b17e0cae4e0ea15e2c0e66f69ad4198f22a6789e94f4 + url: "https://pub.dev" + source: hosted + version: "5.5.1" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d + url: "https://pub.dev" + source: hosted + version: "1.0.4" + xml: + dependency: transitive + description: + name: xml + sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 + url: "https://pub.dev" + source: hosted + version: "6.5.0" +sdks: + dart: ">=3.4.0 <4.0.0" + flutter: ">=3.22.0" diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/pubspec.yaml b/prod116rb-front-f/authsec_flutterNewUi/base_project/pubspec.yaml new file mode 100644 index 0000000..b9afac5 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/pubspec.yaml @@ -0,0 +1,150 @@ +name: base_project +description: "A new Flutter project." +# The following line prevents the package from being accidentally published to +# pub.dev using `flutter pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +# The following defines the version and build number for your application. +# A version number is three numbers separated by dots, like 1.2.43 +# followed by an optional build number separated by a +. +# Both the version and the builder number may be overridden in flutter +# build by specifying --build-name and --build-number, respectively. +# In Android, build-name is used as versionName while build-number used as versionCode. +# Read more about Android versioning at https://developer.android.com/studio/publish/versioning +# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion. +# Read more about iOS versioning at +# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html +# In Windows, build-name is used as the major, minor, and patch parts +# of the product and file versions while build-number is used as the build suffix. +version: 1.0.0+1 + +environment: + sdk: '>=2.19.0 <4.0.0' + +# Dependencies specify other packages that your package needs in order to work. +# To automatically upgrade your package dependencies to the latest versions +# consider running `flutter pub upgrade --major-versions`. Alternatively, +# dependencies can be manually updated by changing the version numbers below to +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. +dependencies: + flutter: + sdk: flutter + + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^1.0.2 + path_provider: ^2.1.3 + http: any + google_fonts: ^5.1.0 + provider: ^6.0.5 + # markdown_widget: ^2.2.0 + fade_shimmer: ^2.2.0 + fluentui_system_icons: ^1.1.203 + # grouped_list: ^5.1.2 + flutter_secure_storage: ^8.0.0 + dio: ^5.2.1+1 + flutter_datetime_picker: ^1.5.1 + image_picker: ^1.0.0 + shared_preferences: ^2.2.0 + flutter_svg: ^2.0.9 + cached_network_image: ^3.2.1 + # sqflite: ^2.3.0 + path: ^1.8.3 + # sqflite_common_ffi: ^2.3.1 + flutter_svg_provider: ^1.0.7 + pinput: ^3.0.1 + intl: ^0.17.0 + http_parser: ^4.0.2 + dotted_border: ^2.1.0 + redis: ^4.0.0 + speech_to_text: ^6.6.0 + fluttertoast: ^8.2.5 + dropdown_search: ^5.0.6 + # flutter_ffmpeg: ^0.4.2 + # video_player: ^2.8.5 + camera: ^0.10.5+9 + another_carousel_pro: ^1.0.0 + intl_phone_number_input: ^0.7.4 + # flutter_sound: ^9.2.13 + image: ^4.1.7 + redis_dart: ^0.1.0+4 + confetti: ^0.7.0 + ioredis: ^1.0.2 + url_launcher: ^6.2.6 + video_player: ^2.8.5 + chewie: ^1.7.5 + flutter_ffmpeg: ^0.4.0+full-gpl + fl_chart: ^0.68.0 + flutter_sound: ^9.2.13 + permission_handler: ^11.3.1 + lottie: ^3.1.2 + iconsax: ^0.0.8 + autocomplete_textfield: ^2.0.1 + qr_flutter: ^4.1.0 + google_mlkit_text_recognition: ^0.13.0 + flutter_barcode_scanner: ^2.0.0 + barcode_widget: ^2.0.4 + file_picker: ^8.0.6 + just_audio: ^0.9.39 + qr_code_scanner: ^1.0.1 + multi_select_flutter: ^4.1.3 + flutter_reorderable_list: ^1.3.1 + dependency_validator: ^4.1.0 + +dev_dependencies: + flutter_test: + sdk: flutter + + # The "flutter_lints" package below contains a set of recommended lints to + # encourage good coding practices. The lint set provided by the package is + # activated in the `analysis_options.yaml` file located at the root of your + # package. See that file for information about deactivating specific lint + # rules and activating additional ones. + flutter_lints: ^3.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add assets to your application, add an assets section, like this: + assets: + - assets/ + - assets/images/ + - assets/icon/ + - assets/vectors/ + + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/assets-and-images/#resolution-aware + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/assets-and-images/#from-packages + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/custom-fonts/#from-packages diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/remove_unused.sh b/prod116rb-front-f/authsec_flutterNewUi/base_project/remove_unused.sh new file mode 100755 index 0000000..9398e26 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/remove_unused.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# Run dependency_validator and capture the output +output=$(flutter pub run dependency_validator 2>&1) + +# Extract the list of potentially unused dependencies +unused_dependencies=$(echo "$output" | grep "These packages may be unused" -A 100 | tail -n +2 | grep -o '^\s*[*]\s\+\S*' | awk '{print $2}') + +# Loop through each unused dependency and remove it +for package in $unused_dependencies +do + echo "Removing $package..." + dart pub remove $package +done diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/test/widget_test.dart b/prod116rb-front-f/authsec_flutterNewUi/base_project/test/widget_test.dart new file mode 100644 index 0000000..e132b41 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/test/widget_test.dart @@ -0,0 +1,30 @@ +// This is a basic Flutter widget test. +// +// To perform an interaction with a widget in your test, use the WidgetTester +// utility in the flutter_test package. For example, you can send tap and scroll +// gestures. You can also use WidgetTester to find child widgets in the widget +// tree, read text, and verify that the values of widget properties are correct. + +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +import 'package:base_project/main.dart'; + +void main() { + testWidgets('Counter increments smoke test', (WidgetTester tester) async { + // Build our app and trigger a frame. + await tester.pumpWidget(const MyApp()); + + // Verify that our counter starts at 0. + expect(find.text('0'), findsOneWidget); + expect(find.text('1'), findsNothing); + + // Tap the '+' icon and trigger a frame. + await tester.tap(find.byIcon(Icons.add)); + await tester.pump(); + + // Verify that our counter has incremented. + expect(find.text('0'), findsNothing); + expect(find.text('1'), findsOneWidget); + }); +} diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/web/favicon.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/web/favicon.png new file mode 100644 index 0000000..8aaa46a Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/web/favicon.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/web/icons/Icon-192.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/web/icons/Icon-192.png new file mode 100644 index 0000000..b749bfe Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/web/icons/Icon-192.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/web/icons/Icon-512.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/web/icons/Icon-512.png new file mode 100644 index 0000000..88cfd48 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/web/icons/Icon-512.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/web/icons/Icon-maskable-192.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/web/icons/Icon-maskable-192.png new file mode 100644 index 0000000..eb9b4d7 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/web/icons/Icon-maskable-192.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/web/icons/Icon-maskable-512.png b/prod116rb-front-f/authsec_flutterNewUi/base_project/web/icons/Icon-maskable-512.png new file mode 100644 index 0000000..d69c566 Binary files /dev/null and b/prod116rb-front-f/authsec_flutterNewUi/base_project/web/icons/Icon-maskable-512.png differ diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/web/index.html b/prod116rb-front-f/authsec_flutterNewUi/base_project/web/index.html new file mode 100644 index 0000000..44d010a --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/web/index.html @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + base_project + + + + + + diff --git a/prod116rb-front-f/authsec_flutterNewUi/base_project/web/manifest.json b/prod116rb-front-f/authsec_flutterNewUi/base_project/web/manifest.json new file mode 100644 index 0000000..7d18214 --- /dev/null +++ b/prod116rb-front-f/authsec_flutterNewUi/base_project/web/manifest.json @@ -0,0 +1,35 @@ +{ + "name": "base_project", + "short_name": "base_project", + "start_url": ".", + "display": "standalone", + "background_color": "#0175C2", + "theme_color": "#0175C2", + "description": "A new Flutter project.", + "orientation": "portrait-primary", + "prefer_related_applications": false, + "icons": [ + { + "src": "icons/Icon-192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "icons/Icon-512.png", + "sizes": "512x512", + "type": "image/png" + }, + { + "src": "icons/Icon-maskable-192.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "maskable" + }, + { + "src": "icons/Icon-maskable-512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "maskable" + } + ] +}