build_app
This commit is contained in:
parent
bcb66a1d9d
commit
d701ce62ac
@ -69,6 +69,48 @@ public class BuilderService {
|
||||
executeDump(true);
|
||||
|
||||
// ADD OTHER SERVICE
|
||||
addCustomMenu( "Visa_administration", "Master");
|
||||
|
||||
|
||||
addCustomMenu( "Visa_status", "Transcations");
|
||||
|
||||
|
||||
addCustomMenu( "Cost_sheet", "Master");
|
||||
|
||||
|
||||
addCustomMenu( "Visa_bundle", "Master");
|
||||
|
||||
|
||||
addCustomMenu( "Agent", "Master");
|
||||
|
||||
|
||||
addCustomMenu( "Supplier", "Master");
|
||||
|
||||
|
||||
addCustomMenu( "Nationality", "Master");
|
||||
|
||||
|
||||
addCustomMenu( "Referrer", "Master");
|
||||
|
||||
|
||||
addCustomMenu( "Gender", "Master");
|
||||
|
||||
|
||||
addCustomMenu( "Visa_processing", "Master");
|
||||
|
||||
|
||||
addCustomMenu( "Visa_prices", "Master");
|
||||
|
||||
|
||||
addCustomMenu( "Visa_entry", "Master");
|
||||
|
||||
|
||||
addCustomMenu( "Visa_duration", "Master");
|
||||
|
||||
|
||||
addCustomMenu( "Visa_application", "Transcations");
|
||||
|
||||
|
||||
|
||||
System.out.println("dashboard and menu inserted...");
|
||||
|
||||
|
||||
@ -0,0 +1,99 @@
|
||||
package com.realnet.vpspack.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.*;
|
||||
import com.realnet.fnd.response.EntityResponse;
|
||||
import org.springframework.http.*;
|
||||
import org.springframework.beans.factory.annotation.*;
|
||||
import com.realnet.vpspack.Entity.Agent;
|
||||
import com.realnet.vpspack.Services.AgentService ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value = "/Agent")
|
||||
@CrossOrigin("*")
|
||||
@RestController
|
||||
public class AgentController {
|
||||
@Autowired
|
||||
private AgentService Service;
|
||||
|
||||
@Value("${projectPath}")
|
||||
private String projectPath;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@PostMapping("/Agent")
|
||||
public Agent Savedata(@RequestBody Agent data) {
|
||||
Agent save = Service.Savedata(data) ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
System.out.println("data saved..." + save);
|
||||
|
||||
return save;
|
||||
}
|
||||
@PutMapping("/Agent/{id}")
|
||||
public Agent update(@RequestBody Agent data,@PathVariable Integer id ) {
|
||||
Agent update = Service.update(data,id);
|
||||
System.out.println("data update..." + update);
|
||||
return update;
|
||||
}
|
||||
// get all with pagination
|
||||
@GetMapping("/Agent/getall/page")
|
||||
public Page<Agent> getall(@RequestParam(value = "page", required = false) Integer page,
|
||||
@RequestParam(value = "size", required = false) Integer size) {
|
||||
Pageable paging = PageRequest.of(page, size);
|
||||
Page<Agent> get = Service.getAllWithPagination(paging);
|
||||
|
||||
return get;
|
||||
|
||||
}
|
||||
@GetMapping("/Agent")
|
||||
public List<Agent> getdetails() {
|
||||
List<Agent> get = Service.getdetails();
|
||||
return get;
|
||||
}
|
||||
// get all without authentication
|
||||
|
||||
@GetMapping("/token/Agent")
|
||||
public List<Agent> getallwioutsec() {
|
||||
List<Agent> get = Service.getdetails();
|
||||
return get;
|
||||
}
|
||||
@GetMapping("/Agent/{id}")
|
||||
public Agent getdetailsbyId(@PathVariable Integer id ) {
|
||||
Agent get = Service.getdetailsbyId(id);
|
||||
return get;
|
||||
}
|
||||
@DeleteMapping("/Agent/{id}")
|
||||
public ResponseEntity<?> delete_by_id(@PathVariable Integer id ) {
|
||||
Service.delete_by_id(id);
|
||||
return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package com.realnet.vpspack.Controllers;
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.realnet.vpspack.Entity.Agent_ListFilter1;
|
||||
import com.realnet.vpspack.Services.Agent_ListFilter1Service ;
|
||||
@RequestMapping(value = "/Agent_ListFilter1")
|
||||
@RestController
|
||||
public class Agent_ListFilter1Controller {
|
||||
|
||||
@Autowired
|
||||
private Agent_ListFilter1Service Service;
|
||||
|
||||
@GetMapping("/Agent_ListFilter1")
|
||||
public List<Agent_ListFilter1> getlist() {
|
||||
List<Agent_ListFilter1> get = Service.getlistbuilder();
|
||||
return get;
|
||||
}
|
||||
@GetMapping("/Agent_ListFilter11")
|
||||
public List<Agent_ListFilter1> getlistwithparam( ) {
|
||||
List<Agent_ListFilter1> get = Service.getlistbuilderparam( );
|
||||
return get;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,107 @@
|
||||
package com.realnet.vpspack.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.*;
|
||||
import com.realnet.fnd.response.EntityResponse;
|
||||
import org.springframework.http.*;
|
||||
import org.springframework.beans.factory.annotation.*;
|
||||
import com.realnet.vpspack.Entity.Cost_sheet;
|
||||
import com.realnet.vpspack.Services.Cost_sheetService ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value = "/Cost_sheet")
|
||||
@CrossOrigin("*")
|
||||
@RestController
|
||||
public class Cost_sheetController {
|
||||
@Autowired
|
||||
private Cost_sheetService Service;
|
||||
|
||||
@Value("${projectPath}")
|
||||
private String projectPath;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@PostMapping("/Cost_sheet")
|
||||
public Cost_sheet Savedata(@RequestBody Cost_sheet data) {
|
||||
Cost_sheet save = Service.Savedata(data) ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
System.out.println("data saved..." + save);
|
||||
|
||||
return save;
|
||||
}
|
||||
@PutMapping("/Cost_sheet/{id}")
|
||||
public Cost_sheet update(@RequestBody Cost_sheet data,@PathVariable Integer id ) {
|
||||
Cost_sheet update = Service.update(data,id);
|
||||
System.out.println("data update..." + update);
|
||||
return update;
|
||||
}
|
||||
// get all with pagination
|
||||
@GetMapping("/Cost_sheet/getall/page")
|
||||
public Page<Cost_sheet> getall(@RequestParam(value = "page", required = false) Integer page,
|
||||
@RequestParam(value = "size", required = false) Integer size) {
|
||||
Pageable paging = PageRequest.of(page, size);
|
||||
Page<Cost_sheet> get = Service.getAllWithPagination(paging);
|
||||
|
||||
return get;
|
||||
|
||||
}
|
||||
@GetMapping("/Cost_sheet")
|
||||
public List<Cost_sheet> getdetails() {
|
||||
List<Cost_sheet> get = Service.getdetails();
|
||||
return get;
|
||||
}
|
||||
// get all without authentication
|
||||
|
||||
@GetMapping("/token/Cost_sheet")
|
||||
public List<Cost_sheet> getallwioutsec() {
|
||||
List<Cost_sheet> get = Service.getdetails();
|
||||
return get;
|
||||
}
|
||||
@GetMapping("/Cost_sheet/{id}")
|
||||
public Cost_sheet getdetailsbyId(@PathVariable Integer id ) {
|
||||
Cost_sheet get = Service.getdetailsbyId(id);
|
||||
return get;
|
||||
}
|
||||
@DeleteMapping("/Cost_sheet/{id}")
|
||||
public ResponseEntity<?> delete_by_id(@PathVariable Integer id ) {
|
||||
Service.delete_by_id(id);
|
||||
return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
package com.realnet.vpspack.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.*;
|
||||
import com.realnet.fnd.response.EntityResponse;
|
||||
import org.springframework.http.*;
|
||||
import org.springframework.beans.factory.annotation.*;
|
||||
import com.realnet.vpspack.Entity.Gender;
|
||||
import com.realnet.vpspack.Services.GenderService ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value = "/Gender")
|
||||
@CrossOrigin("*")
|
||||
@RestController
|
||||
public class GenderController {
|
||||
@Autowired
|
||||
private GenderService Service;
|
||||
|
||||
@Value("${projectPath}")
|
||||
private String projectPath;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@PostMapping("/Gender")
|
||||
public Gender Savedata(@RequestBody Gender data) {
|
||||
Gender save = Service.Savedata(data) ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
System.out.println("data saved..." + save);
|
||||
|
||||
return save;
|
||||
}
|
||||
@PutMapping("/Gender/{id}")
|
||||
public Gender update(@RequestBody Gender data,@PathVariable Integer id ) {
|
||||
Gender update = Service.update(data,id);
|
||||
System.out.println("data update..." + update);
|
||||
return update;
|
||||
}
|
||||
// get all with pagination
|
||||
@GetMapping("/Gender/getall/page")
|
||||
public Page<Gender> getall(@RequestParam(value = "page", required = false) Integer page,
|
||||
@RequestParam(value = "size", required = false) Integer size) {
|
||||
Pageable paging = PageRequest.of(page, size);
|
||||
Page<Gender> get = Service.getAllWithPagination(paging);
|
||||
|
||||
return get;
|
||||
|
||||
}
|
||||
@GetMapping("/Gender")
|
||||
public List<Gender> getdetails() {
|
||||
List<Gender> get = Service.getdetails();
|
||||
return get;
|
||||
}
|
||||
// get all without authentication
|
||||
|
||||
@GetMapping("/token/Gender")
|
||||
public List<Gender> getallwioutsec() {
|
||||
List<Gender> get = Service.getdetails();
|
||||
return get;
|
||||
}
|
||||
@GetMapping("/Gender/{id}")
|
||||
public Gender getdetailsbyId(@PathVariable Integer id ) {
|
||||
Gender get = Service.getdetailsbyId(id);
|
||||
return get;
|
||||
}
|
||||
@DeleteMapping("/Gender/{id}")
|
||||
public ResponseEntity<?> delete_by_id(@PathVariable Integer id ) {
|
||||
Service.delete_by_id(id);
|
||||
return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package com.realnet.vpspack.Controllers;
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.realnet.vpspack.Entity.Gender_ListFilter1;
|
||||
import com.realnet.vpspack.Services.Gender_ListFilter1Service ;
|
||||
@RequestMapping(value = "/Gender_ListFilter1")
|
||||
@RestController
|
||||
public class Gender_ListFilter1Controller {
|
||||
|
||||
@Autowired
|
||||
private Gender_ListFilter1Service Service;
|
||||
|
||||
@GetMapping("/Gender_ListFilter1")
|
||||
public List<Gender_ListFilter1> getlist() {
|
||||
List<Gender_ListFilter1> get = Service.getlistbuilder();
|
||||
return get;
|
||||
}
|
||||
@GetMapping("/Gender_ListFilter11")
|
||||
public List<Gender_ListFilter1> getlistwithparam( ) {
|
||||
List<Gender_ListFilter1> get = Service.getlistbuilderparam( );
|
||||
return get;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
package com.realnet.vpspack.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.*;
|
||||
import com.realnet.fnd.response.EntityResponse;
|
||||
import org.springframework.http.*;
|
||||
import org.springframework.beans.factory.annotation.*;
|
||||
import com.realnet.vpspack.Entity.Nationality;
|
||||
import com.realnet.vpspack.Services.NationalityService ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value = "/Nationality")
|
||||
@CrossOrigin("*")
|
||||
@RestController
|
||||
public class NationalityController {
|
||||
@Autowired
|
||||
private NationalityService Service;
|
||||
|
||||
@Value("${projectPath}")
|
||||
private String projectPath;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@PostMapping("/Nationality")
|
||||
public Nationality Savedata(@RequestBody Nationality data) {
|
||||
Nationality save = Service.Savedata(data) ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
System.out.println("data saved..." + save);
|
||||
|
||||
return save;
|
||||
}
|
||||
@PutMapping("/Nationality/{id}")
|
||||
public Nationality update(@RequestBody Nationality data,@PathVariable Integer id ) {
|
||||
Nationality update = Service.update(data,id);
|
||||
System.out.println("data update..." + update);
|
||||
return update;
|
||||
}
|
||||
// get all with pagination
|
||||
@GetMapping("/Nationality/getall/page")
|
||||
public Page<Nationality> getall(@RequestParam(value = "page", required = false) Integer page,
|
||||
@RequestParam(value = "size", required = false) Integer size) {
|
||||
Pageable paging = PageRequest.of(page, size);
|
||||
Page<Nationality> get = Service.getAllWithPagination(paging);
|
||||
|
||||
return get;
|
||||
|
||||
}
|
||||
@GetMapping("/Nationality")
|
||||
public List<Nationality> getdetails() {
|
||||
List<Nationality> get = Service.getdetails();
|
||||
return get;
|
||||
}
|
||||
// get all without authentication
|
||||
|
||||
@GetMapping("/token/Nationality")
|
||||
public List<Nationality> getallwioutsec() {
|
||||
List<Nationality> get = Service.getdetails();
|
||||
return get;
|
||||
}
|
||||
@GetMapping("/Nationality/{id}")
|
||||
public Nationality getdetailsbyId(@PathVariable Integer id ) {
|
||||
Nationality get = Service.getdetailsbyId(id);
|
||||
return get;
|
||||
}
|
||||
@DeleteMapping("/Nationality/{id}")
|
||||
public ResponseEntity<?> delete_by_id(@PathVariable Integer id ) {
|
||||
Service.delete_by_id(id);
|
||||
return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package com.realnet.vpspack.Controllers;
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.realnet.vpspack.Entity.Nationality_ListFilter1;
|
||||
import com.realnet.vpspack.Services.Nationality_ListFilter1Service ;
|
||||
@RequestMapping(value = "/Nationality_ListFilter1")
|
||||
@RestController
|
||||
public class Nationality_ListFilter1Controller {
|
||||
|
||||
@Autowired
|
||||
private Nationality_ListFilter1Service Service;
|
||||
|
||||
@GetMapping("/Nationality_ListFilter1")
|
||||
public List<Nationality_ListFilter1> getlist() {
|
||||
List<Nationality_ListFilter1> get = Service.getlistbuilder();
|
||||
return get;
|
||||
}
|
||||
@GetMapping("/Nationality_ListFilter11")
|
||||
public List<Nationality_ListFilter1> getlistwithparam( ) {
|
||||
List<Nationality_ListFilter1> get = Service.getlistbuilderparam( );
|
||||
return get;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
package com.realnet.vpspack.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.*;
|
||||
import com.realnet.fnd.response.EntityResponse;
|
||||
import org.springframework.http.*;
|
||||
import org.springframework.beans.factory.annotation.*;
|
||||
import com.realnet.vpspack.Entity.Referrer;
|
||||
import com.realnet.vpspack.Services.ReferrerService ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value = "/Referrer")
|
||||
@CrossOrigin("*")
|
||||
@RestController
|
||||
public class ReferrerController {
|
||||
@Autowired
|
||||
private ReferrerService Service;
|
||||
|
||||
@Value("${projectPath}")
|
||||
private String projectPath;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@PostMapping("/Referrer")
|
||||
public Referrer Savedata(@RequestBody Referrer data) {
|
||||
Referrer save = Service.Savedata(data) ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
System.out.println("data saved..." + save);
|
||||
|
||||
return save;
|
||||
}
|
||||
@PutMapping("/Referrer/{id}")
|
||||
public Referrer update(@RequestBody Referrer data,@PathVariable Integer id ) {
|
||||
Referrer update = Service.update(data,id);
|
||||
System.out.println("data update..." + update);
|
||||
return update;
|
||||
}
|
||||
// get all with pagination
|
||||
@GetMapping("/Referrer/getall/page")
|
||||
public Page<Referrer> getall(@RequestParam(value = "page", required = false) Integer page,
|
||||
@RequestParam(value = "size", required = false) Integer size) {
|
||||
Pageable paging = PageRequest.of(page, size);
|
||||
Page<Referrer> get = Service.getAllWithPagination(paging);
|
||||
|
||||
return get;
|
||||
|
||||
}
|
||||
@GetMapping("/Referrer")
|
||||
public List<Referrer> getdetails() {
|
||||
List<Referrer> get = Service.getdetails();
|
||||
return get;
|
||||
}
|
||||
// get all without authentication
|
||||
|
||||
@GetMapping("/token/Referrer")
|
||||
public List<Referrer> getallwioutsec() {
|
||||
List<Referrer> get = Service.getdetails();
|
||||
return get;
|
||||
}
|
||||
@GetMapping("/Referrer/{id}")
|
||||
public Referrer getdetailsbyId(@PathVariable Integer id ) {
|
||||
Referrer get = Service.getdetailsbyId(id);
|
||||
return get;
|
||||
}
|
||||
@DeleteMapping("/Referrer/{id}")
|
||||
public ResponseEntity<?> delete_by_id(@PathVariable Integer id ) {
|
||||
Service.delete_by_id(id);
|
||||
return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package com.realnet.vpspack.Controllers;
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.realnet.vpspack.Entity.Referrer_ListFilter1;
|
||||
import com.realnet.vpspack.Services.Referrer_ListFilter1Service ;
|
||||
@RequestMapping(value = "/Referrer_ListFilter1")
|
||||
@RestController
|
||||
public class Referrer_ListFilter1Controller {
|
||||
|
||||
@Autowired
|
||||
private Referrer_ListFilter1Service Service;
|
||||
|
||||
@GetMapping("/Referrer_ListFilter1")
|
||||
public List<Referrer_ListFilter1> getlist() {
|
||||
List<Referrer_ListFilter1> get = Service.getlistbuilder();
|
||||
return get;
|
||||
}
|
||||
@GetMapping("/Referrer_ListFilter11")
|
||||
public List<Referrer_ListFilter1> getlistwithparam( ) {
|
||||
List<Referrer_ListFilter1> get = Service.getlistbuilderparam( );
|
||||
return get;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
package com.realnet.vpspack.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.*;
|
||||
import com.realnet.fnd.response.EntityResponse;
|
||||
import org.springframework.http.*;
|
||||
import org.springframework.beans.factory.annotation.*;
|
||||
import com.realnet.vpspack.Entity.Supplier;
|
||||
import com.realnet.vpspack.Services.SupplierService ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value = "/Supplier")
|
||||
@CrossOrigin("*")
|
||||
@RestController
|
||||
public class SupplierController {
|
||||
@Autowired
|
||||
private SupplierService Service;
|
||||
|
||||
@Value("${projectPath}")
|
||||
private String projectPath;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@PostMapping("/Supplier")
|
||||
public Supplier Savedata(@RequestBody Supplier data) {
|
||||
Supplier save = Service.Savedata(data) ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
System.out.println("data saved..." + save);
|
||||
|
||||
return save;
|
||||
}
|
||||
@PutMapping("/Supplier/{id}")
|
||||
public Supplier update(@RequestBody Supplier data,@PathVariable Integer id ) {
|
||||
Supplier update = Service.update(data,id);
|
||||
System.out.println("data update..." + update);
|
||||
return update;
|
||||
}
|
||||
// get all with pagination
|
||||
@GetMapping("/Supplier/getall/page")
|
||||
public Page<Supplier> getall(@RequestParam(value = "page", required = false) Integer page,
|
||||
@RequestParam(value = "size", required = false) Integer size) {
|
||||
Pageable paging = PageRequest.of(page, size);
|
||||
Page<Supplier> get = Service.getAllWithPagination(paging);
|
||||
|
||||
return get;
|
||||
|
||||
}
|
||||
@GetMapping("/Supplier")
|
||||
public List<Supplier> getdetails() {
|
||||
List<Supplier> get = Service.getdetails();
|
||||
return get;
|
||||
}
|
||||
// get all without authentication
|
||||
|
||||
@GetMapping("/token/Supplier")
|
||||
public List<Supplier> getallwioutsec() {
|
||||
List<Supplier> get = Service.getdetails();
|
||||
return get;
|
||||
}
|
||||
@GetMapping("/Supplier/{id}")
|
||||
public Supplier getdetailsbyId(@PathVariable Integer id ) {
|
||||
Supplier get = Service.getdetailsbyId(id);
|
||||
return get;
|
||||
}
|
||||
@DeleteMapping("/Supplier/{id}")
|
||||
public ResponseEntity<?> delete_by_id(@PathVariable Integer id ) {
|
||||
Service.delete_by_id(id);
|
||||
return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package com.realnet.vpspack.Controllers;
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.realnet.vpspack.Entity.Supplier_ListFilter1;
|
||||
import com.realnet.vpspack.Services.Supplier_ListFilter1Service ;
|
||||
@RequestMapping(value = "/Supplier_ListFilter1")
|
||||
@RestController
|
||||
public class Supplier_ListFilter1Controller {
|
||||
|
||||
@Autowired
|
||||
private Supplier_ListFilter1Service Service;
|
||||
|
||||
@GetMapping("/Supplier_ListFilter1")
|
||||
public List<Supplier_ListFilter1> getlist() {
|
||||
List<Supplier_ListFilter1> get = Service.getlistbuilder();
|
||||
return get;
|
||||
}
|
||||
@GetMapping("/Supplier_ListFilter11")
|
||||
public List<Supplier_ListFilter1> getlistwithparam( ) {
|
||||
List<Supplier_ListFilter1> get = Service.getlistbuilderparam( );
|
||||
return get;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,123 @@
|
||||
package com.realnet.vpspack.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.*;
|
||||
import com.realnet.fnd.response.EntityResponse;
|
||||
import org.springframework.http.*;
|
||||
import org.springframework.beans.factory.annotation.*;
|
||||
import com.realnet.vpspack.Entity.Visa_administration;
|
||||
import com.realnet.vpspack.Services.Visa_administrationService ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value = "/Visa_administration")
|
||||
@CrossOrigin("*")
|
||||
@RestController
|
||||
public class Visa_administrationController {
|
||||
@Autowired
|
||||
private Visa_administrationService Service;
|
||||
|
||||
@Value("${projectPath}")
|
||||
private String projectPath;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@PostMapping("/Visa_administration")
|
||||
public Visa_administration Savedata(@RequestBody Visa_administration data) {
|
||||
Visa_administration save = Service.Savedata(data) ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
System.out.println("data saved..." + save);
|
||||
|
||||
return save;
|
||||
}
|
||||
@PutMapping("/Visa_administration/{id}")
|
||||
public Visa_administration update(@RequestBody Visa_administration data,@PathVariable Integer id ) {
|
||||
Visa_administration update = Service.update(data,id);
|
||||
System.out.println("data update..." + update);
|
||||
return update;
|
||||
}
|
||||
// get all with pagination
|
||||
@GetMapping("/Visa_administration/getall/page")
|
||||
public Page<Visa_administration> getall(@RequestParam(value = "page", required = false) Integer page,
|
||||
@RequestParam(value = "size", required = false) Integer size) {
|
||||
Pageable paging = PageRequest.of(page, size);
|
||||
Page<Visa_administration> get = Service.getAllWithPagination(paging);
|
||||
|
||||
return get;
|
||||
|
||||
}
|
||||
@GetMapping("/Visa_administration")
|
||||
public List<Visa_administration> getdetails() {
|
||||
List<Visa_administration> get = Service.getdetails();
|
||||
return get;
|
||||
}
|
||||
// get all without authentication
|
||||
|
||||
@GetMapping("/token/Visa_administration")
|
||||
public List<Visa_administration> getallwioutsec() {
|
||||
List<Visa_administration> get = Service.getdetails();
|
||||
return get;
|
||||
}
|
||||
@GetMapping("/Visa_administration/{id}")
|
||||
public Visa_administration getdetailsbyId(@PathVariable Integer id ) {
|
||||
Visa_administration get = Service.getdetailsbyId(id);
|
||||
return get;
|
||||
}
|
||||
@DeleteMapping("/Visa_administration/{id}")
|
||||
public ResponseEntity<?> delete_by_id(@PathVariable Integer id ) {
|
||||
Service.delete_by_id(id);
|
||||
return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,251 @@
|
||||
package com.realnet.vpspack.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.*;
|
||||
import com.realnet.fnd.response.EntityResponse;
|
||||
import org.springframework.http.*;
|
||||
import org.springframework.beans.factory.annotation.*;
|
||||
import com.realnet.vpspack.Entity.Visa_application;
|
||||
import com.realnet.vpspack.Services.Visa_applicationService ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value = "/Visa_application")
|
||||
@CrossOrigin("*")
|
||||
@RestController
|
||||
public class Visa_applicationController {
|
||||
@Autowired
|
||||
private Visa_applicationService Service;
|
||||
|
||||
@Value("${projectPath}")
|
||||
private String projectPath;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@PostMapping("/Visa_application")
|
||||
public Visa_application Savedata(@RequestBody Visa_application data) {
|
||||
Visa_application save = Service.Savedata(data) ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
System.out.println("data saved..." + save);
|
||||
|
||||
return save;
|
||||
}
|
||||
@PutMapping("/Visa_application/{id}")
|
||||
public Visa_application update(@RequestBody Visa_application data,@PathVariable Integer id ) {
|
||||
Visa_application update = Service.update(data,id);
|
||||
System.out.println("data update..." + update);
|
||||
return update;
|
||||
}
|
||||
// get all with pagination
|
||||
@GetMapping("/Visa_application/getall/page")
|
||||
public Page<Visa_application> getall(@RequestParam(value = "page", required = false) Integer page,
|
||||
@RequestParam(value = "size", required = false) Integer size) {
|
||||
Pageable paging = PageRequest.of(page, size);
|
||||
Page<Visa_application> get = Service.getAllWithPagination(paging);
|
||||
|
||||
return get;
|
||||
|
||||
}
|
||||
@GetMapping("/Visa_application")
|
||||
public List<Visa_application> getdetails() {
|
||||
List<Visa_application> get = Service.getdetails();
|
||||
return get;
|
||||
}
|
||||
// get all without authentication
|
||||
|
||||
@GetMapping("/token/Visa_application")
|
||||
public List<Visa_application> getallwioutsec() {
|
||||
List<Visa_application> get = Service.getdetails();
|
||||
return get;
|
||||
}
|
||||
@GetMapping("/Visa_application/{id}")
|
||||
public Visa_application getdetailsbyId(@PathVariable Integer id ) {
|
||||
Visa_application get = Service.getdetailsbyId(id);
|
||||
return get;
|
||||
}
|
||||
@DeleteMapping("/Visa_application/{id}")
|
||||
public ResponseEntity<?> delete_by_id(@PathVariable Integer id ) {
|
||||
Service.delete_by_id(id);
|
||||
return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,107 @@
|
||||
package com.realnet.vpspack.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.*;
|
||||
import com.realnet.fnd.response.EntityResponse;
|
||||
import org.springframework.http.*;
|
||||
import org.springframework.beans.factory.annotation.*;
|
||||
import com.realnet.vpspack.Entity.Visa_bundle;
|
||||
import com.realnet.vpspack.Services.Visa_bundleService ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value = "/Visa_bundle")
|
||||
@CrossOrigin("*")
|
||||
@RestController
|
||||
public class Visa_bundleController {
|
||||
@Autowired
|
||||
private Visa_bundleService Service;
|
||||
|
||||
@Value("${projectPath}")
|
||||
private String projectPath;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@PostMapping("/Visa_bundle")
|
||||
public Visa_bundle Savedata(@RequestBody Visa_bundle data) {
|
||||
Visa_bundle save = Service.Savedata(data) ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
System.out.println("data saved..." + save);
|
||||
|
||||
return save;
|
||||
}
|
||||
@PutMapping("/Visa_bundle/{id}")
|
||||
public Visa_bundle update(@RequestBody Visa_bundle data,@PathVariable Integer id ) {
|
||||
Visa_bundle update = Service.update(data,id);
|
||||
System.out.println("data update..." + update);
|
||||
return update;
|
||||
}
|
||||
// get all with pagination
|
||||
@GetMapping("/Visa_bundle/getall/page")
|
||||
public Page<Visa_bundle> getall(@RequestParam(value = "page", required = false) Integer page,
|
||||
@RequestParam(value = "size", required = false) Integer size) {
|
||||
Pageable paging = PageRequest.of(page, size);
|
||||
Page<Visa_bundle> get = Service.getAllWithPagination(paging);
|
||||
|
||||
return get;
|
||||
|
||||
}
|
||||
@GetMapping("/Visa_bundle")
|
||||
public List<Visa_bundle> getdetails() {
|
||||
List<Visa_bundle> get = Service.getdetails();
|
||||
return get;
|
||||
}
|
||||
// get all without authentication
|
||||
|
||||
@GetMapping("/token/Visa_bundle")
|
||||
public List<Visa_bundle> getallwioutsec() {
|
||||
List<Visa_bundle> get = Service.getdetails();
|
||||
return get;
|
||||
}
|
||||
@GetMapping("/Visa_bundle/{id}")
|
||||
public Visa_bundle getdetailsbyId(@PathVariable Integer id ) {
|
||||
Visa_bundle get = Service.getdetailsbyId(id);
|
||||
return get;
|
||||
}
|
||||
@DeleteMapping("/Visa_bundle/{id}")
|
||||
public ResponseEntity<?> delete_by_id(@PathVariable Integer id ) {
|
||||
Service.delete_by_id(id);
|
||||
return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
package com.realnet.vpspack.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.*;
|
||||
import com.realnet.fnd.response.EntityResponse;
|
||||
import org.springframework.http.*;
|
||||
import org.springframework.beans.factory.annotation.*;
|
||||
import com.realnet.vpspack.Entity.Visa_duration;
|
||||
import com.realnet.vpspack.Services.Visa_durationService ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value = "/Visa_duration")
|
||||
@CrossOrigin("*")
|
||||
@RestController
|
||||
public class Visa_durationController {
|
||||
@Autowired
|
||||
private Visa_durationService Service;
|
||||
|
||||
@Value("${projectPath}")
|
||||
private String projectPath;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@PostMapping("/Visa_duration")
|
||||
public Visa_duration Savedata(@RequestBody Visa_duration data) {
|
||||
Visa_duration save = Service.Savedata(data) ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
System.out.println("data saved..." + save);
|
||||
|
||||
return save;
|
||||
}
|
||||
@PutMapping("/Visa_duration/{id}")
|
||||
public Visa_duration update(@RequestBody Visa_duration data,@PathVariable Integer id ) {
|
||||
Visa_duration update = Service.update(data,id);
|
||||
System.out.println("data update..." + update);
|
||||
return update;
|
||||
}
|
||||
// get all with pagination
|
||||
@GetMapping("/Visa_duration/getall/page")
|
||||
public Page<Visa_duration> getall(@RequestParam(value = "page", required = false) Integer page,
|
||||
@RequestParam(value = "size", required = false) Integer size) {
|
||||
Pageable paging = PageRequest.of(page, size);
|
||||
Page<Visa_duration> get = Service.getAllWithPagination(paging);
|
||||
|
||||
return get;
|
||||
|
||||
}
|
||||
@GetMapping("/Visa_duration")
|
||||
public List<Visa_duration> getdetails() {
|
||||
List<Visa_duration> get = Service.getdetails();
|
||||
return get;
|
||||
}
|
||||
// get all without authentication
|
||||
|
||||
@GetMapping("/token/Visa_duration")
|
||||
public List<Visa_duration> getallwioutsec() {
|
||||
List<Visa_duration> get = Service.getdetails();
|
||||
return get;
|
||||
}
|
||||
@GetMapping("/Visa_duration/{id}")
|
||||
public Visa_duration getdetailsbyId(@PathVariable Integer id ) {
|
||||
Visa_duration get = Service.getdetailsbyId(id);
|
||||
return get;
|
||||
}
|
||||
@DeleteMapping("/Visa_duration/{id}")
|
||||
public ResponseEntity<?> delete_by_id(@PathVariable Integer id ) {
|
||||
Service.delete_by_id(id);
|
||||
return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package com.realnet.vpspack.Controllers;
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.realnet.vpspack.Entity.Visa_duration_ListFilter1;
|
||||
import com.realnet.vpspack.Services.Visa_duration_ListFilter1Service ;
|
||||
@RequestMapping(value = "/Visa_duration_ListFilter1")
|
||||
@RestController
|
||||
public class Visa_duration_ListFilter1Controller {
|
||||
|
||||
@Autowired
|
||||
private Visa_duration_ListFilter1Service Service;
|
||||
|
||||
@GetMapping("/Visa_duration_ListFilter1")
|
||||
public List<Visa_duration_ListFilter1> getlist() {
|
||||
List<Visa_duration_ListFilter1> get = Service.getlistbuilder();
|
||||
return get;
|
||||
}
|
||||
@GetMapping("/Visa_duration_ListFilter11")
|
||||
public List<Visa_duration_ListFilter1> getlistwithparam( ) {
|
||||
List<Visa_duration_ListFilter1> get = Service.getlistbuilderparam( );
|
||||
return get;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
package com.realnet.vpspack.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.*;
|
||||
import com.realnet.fnd.response.EntityResponse;
|
||||
import org.springframework.http.*;
|
||||
import org.springframework.beans.factory.annotation.*;
|
||||
import com.realnet.vpspack.Entity.Visa_entry;
|
||||
import com.realnet.vpspack.Services.Visa_entryService ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value = "/Visa_entry")
|
||||
@CrossOrigin("*")
|
||||
@RestController
|
||||
public class Visa_entryController {
|
||||
@Autowired
|
||||
private Visa_entryService Service;
|
||||
|
||||
@Value("${projectPath}")
|
||||
private String projectPath;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@PostMapping("/Visa_entry")
|
||||
public Visa_entry Savedata(@RequestBody Visa_entry data) {
|
||||
Visa_entry save = Service.Savedata(data) ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
System.out.println("data saved..." + save);
|
||||
|
||||
return save;
|
||||
}
|
||||
@PutMapping("/Visa_entry/{id}")
|
||||
public Visa_entry update(@RequestBody Visa_entry data,@PathVariable Integer id ) {
|
||||
Visa_entry update = Service.update(data,id);
|
||||
System.out.println("data update..." + update);
|
||||
return update;
|
||||
}
|
||||
// get all with pagination
|
||||
@GetMapping("/Visa_entry/getall/page")
|
||||
public Page<Visa_entry> getall(@RequestParam(value = "page", required = false) Integer page,
|
||||
@RequestParam(value = "size", required = false) Integer size) {
|
||||
Pageable paging = PageRequest.of(page, size);
|
||||
Page<Visa_entry> get = Service.getAllWithPagination(paging);
|
||||
|
||||
return get;
|
||||
|
||||
}
|
||||
@GetMapping("/Visa_entry")
|
||||
public List<Visa_entry> getdetails() {
|
||||
List<Visa_entry> get = Service.getdetails();
|
||||
return get;
|
||||
}
|
||||
// get all without authentication
|
||||
|
||||
@GetMapping("/token/Visa_entry")
|
||||
public List<Visa_entry> getallwioutsec() {
|
||||
List<Visa_entry> get = Service.getdetails();
|
||||
return get;
|
||||
}
|
||||
@GetMapping("/Visa_entry/{id}")
|
||||
public Visa_entry getdetailsbyId(@PathVariable Integer id ) {
|
||||
Visa_entry get = Service.getdetailsbyId(id);
|
||||
return get;
|
||||
}
|
||||
@DeleteMapping("/Visa_entry/{id}")
|
||||
public ResponseEntity<?> delete_by_id(@PathVariable Integer id ) {
|
||||
Service.delete_by_id(id);
|
||||
return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package com.realnet.vpspack.Controllers;
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.realnet.vpspack.Entity.Visa_entry_ListFilter1;
|
||||
import com.realnet.vpspack.Services.Visa_entry_ListFilter1Service ;
|
||||
@RequestMapping(value = "/Visa_entry_ListFilter1")
|
||||
@RestController
|
||||
public class Visa_entry_ListFilter1Controller {
|
||||
|
||||
@Autowired
|
||||
private Visa_entry_ListFilter1Service Service;
|
||||
|
||||
@GetMapping("/Visa_entry_ListFilter1")
|
||||
public List<Visa_entry_ListFilter1> getlist() {
|
||||
List<Visa_entry_ListFilter1> get = Service.getlistbuilder();
|
||||
return get;
|
||||
}
|
||||
@GetMapping("/Visa_entry_ListFilter11")
|
||||
public List<Visa_entry_ListFilter1> getlistwithparam( ) {
|
||||
List<Visa_entry_ListFilter1> get = Service.getlistbuilderparam( );
|
||||
return get;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,139 @@
|
||||
package com.realnet.vpspack.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.*;
|
||||
import com.realnet.fnd.response.EntityResponse;
|
||||
import org.springframework.http.*;
|
||||
import org.springframework.beans.factory.annotation.*;
|
||||
import com.realnet.vpspack.Entity.Visa_prices;
|
||||
import com.realnet.vpspack.Services.Visa_pricesService ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value = "/Visa_prices")
|
||||
@CrossOrigin("*")
|
||||
@RestController
|
||||
public class Visa_pricesController {
|
||||
@Autowired
|
||||
private Visa_pricesService Service;
|
||||
|
||||
@Value("${projectPath}")
|
||||
private String projectPath;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@PostMapping("/Visa_prices")
|
||||
public Visa_prices Savedata(@RequestBody Visa_prices data) {
|
||||
Visa_prices save = Service.Savedata(data) ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
System.out.println("data saved..." + save);
|
||||
|
||||
return save;
|
||||
}
|
||||
@PutMapping("/Visa_prices/{id}")
|
||||
public Visa_prices update(@RequestBody Visa_prices data,@PathVariable Integer id ) {
|
||||
Visa_prices update = Service.update(data,id);
|
||||
System.out.println("data update..." + update);
|
||||
return update;
|
||||
}
|
||||
// get all with pagination
|
||||
@GetMapping("/Visa_prices/getall/page")
|
||||
public Page<Visa_prices> getall(@RequestParam(value = "page", required = false) Integer page,
|
||||
@RequestParam(value = "size", required = false) Integer size) {
|
||||
Pageable paging = PageRequest.of(page, size);
|
||||
Page<Visa_prices> get = Service.getAllWithPagination(paging);
|
||||
|
||||
return get;
|
||||
|
||||
}
|
||||
@GetMapping("/Visa_prices")
|
||||
public List<Visa_prices> getdetails() {
|
||||
List<Visa_prices> get = Service.getdetails();
|
||||
return get;
|
||||
}
|
||||
// get all without authentication
|
||||
|
||||
@GetMapping("/token/Visa_prices")
|
||||
public List<Visa_prices> getallwioutsec() {
|
||||
List<Visa_prices> get = Service.getdetails();
|
||||
return get;
|
||||
}
|
||||
@GetMapping("/Visa_prices/{id}")
|
||||
public Visa_prices getdetailsbyId(@PathVariable Integer id ) {
|
||||
Visa_prices get = Service.getdetailsbyId(id);
|
||||
return get;
|
||||
}
|
||||
@DeleteMapping("/Visa_prices/{id}")
|
||||
public ResponseEntity<?> delete_by_id(@PathVariable Integer id ) {
|
||||
Service.delete_by_id(id);
|
||||
return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
package com.realnet.vpspack.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.*;
|
||||
import com.realnet.fnd.response.EntityResponse;
|
||||
import org.springframework.http.*;
|
||||
import org.springframework.beans.factory.annotation.*;
|
||||
import com.realnet.vpspack.Entity.Visa_processing;
|
||||
import com.realnet.vpspack.Services.Visa_processingService ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value = "/Visa_processing")
|
||||
@CrossOrigin("*")
|
||||
@RestController
|
||||
public class Visa_processingController {
|
||||
@Autowired
|
||||
private Visa_processingService Service;
|
||||
|
||||
@Value("${projectPath}")
|
||||
private String projectPath;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@PostMapping("/Visa_processing")
|
||||
public Visa_processing Savedata(@RequestBody Visa_processing data) {
|
||||
Visa_processing save = Service.Savedata(data) ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
System.out.println("data saved..." + save);
|
||||
|
||||
return save;
|
||||
}
|
||||
@PutMapping("/Visa_processing/{id}")
|
||||
public Visa_processing update(@RequestBody Visa_processing data,@PathVariable Integer id ) {
|
||||
Visa_processing update = Service.update(data,id);
|
||||
System.out.println("data update..." + update);
|
||||
return update;
|
||||
}
|
||||
// get all with pagination
|
||||
@GetMapping("/Visa_processing/getall/page")
|
||||
public Page<Visa_processing> getall(@RequestParam(value = "page", required = false) Integer page,
|
||||
@RequestParam(value = "size", required = false) Integer size) {
|
||||
Pageable paging = PageRequest.of(page, size);
|
||||
Page<Visa_processing> get = Service.getAllWithPagination(paging);
|
||||
|
||||
return get;
|
||||
|
||||
}
|
||||
@GetMapping("/Visa_processing")
|
||||
public List<Visa_processing> getdetails() {
|
||||
List<Visa_processing> get = Service.getdetails();
|
||||
return get;
|
||||
}
|
||||
// get all without authentication
|
||||
|
||||
@GetMapping("/token/Visa_processing")
|
||||
public List<Visa_processing> getallwioutsec() {
|
||||
List<Visa_processing> get = Service.getdetails();
|
||||
return get;
|
||||
}
|
||||
@GetMapping("/Visa_processing/{id}")
|
||||
public Visa_processing getdetailsbyId(@PathVariable Integer id ) {
|
||||
Visa_processing get = Service.getdetailsbyId(id);
|
||||
return get;
|
||||
}
|
||||
@DeleteMapping("/Visa_processing/{id}")
|
||||
public ResponseEntity<?> delete_by_id(@PathVariable Integer id ) {
|
||||
Service.delete_by_id(id);
|
||||
return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package com.realnet.vpspack.Controllers;
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.realnet.vpspack.Entity.Visa_processing_ListFilter1;
|
||||
import com.realnet.vpspack.Services.Visa_processing_ListFilter1Service ;
|
||||
@RequestMapping(value = "/Visa_processing_ListFilter1")
|
||||
@RestController
|
||||
public class Visa_processing_ListFilter1Controller {
|
||||
|
||||
@Autowired
|
||||
private Visa_processing_ListFilter1Service Service;
|
||||
|
||||
@GetMapping("/Visa_processing_ListFilter1")
|
||||
public List<Visa_processing_ListFilter1> getlist() {
|
||||
List<Visa_processing_ListFilter1> get = Service.getlistbuilder();
|
||||
return get;
|
||||
}
|
||||
@GetMapping("/Visa_processing_ListFilter11")
|
||||
public List<Visa_processing_ListFilter1> getlistwithparam( ) {
|
||||
List<Visa_processing_ListFilter1> get = Service.getlistbuilderparam( );
|
||||
return get;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
package com.realnet.vpspack.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.*;
|
||||
import com.realnet.fnd.response.EntityResponse;
|
||||
import org.springframework.http.*;
|
||||
import org.springframework.beans.factory.annotation.*;
|
||||
import com.realnet.vpspack.Entity.Visa_status;
|
||||
import com.realnet.vpspack.Services.Visa_statusService ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value = "/Visa_status")
|
||||
@CrossOrigin("*")
|
||||
@RestController
|
||||
public class Visa_statusController {
|
||||
@Autowired
|
||||
private Visa_statusService Service;
|
||||
|
||||
@Value("${projectPath}")
|
||||
private String projectPath;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@PostMapping("/Visa_status")
|
||||
public Visa_status Savedata(@RequestBody Visa_status data) {
|
||||
Visa_status save = Service.Savedata(data) ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
System.out.println("data saved..." + save);
|
||||
|
||||
return save;
|
||||
}
|
||||
@PutMapping("/Visa_status/{id}")
|
||||
public Visa_status update(@RequestBody Visa_status data,@PathVariable Integer id ) {
|
||||
Visa_status update = Service.update(data,id);
|
||||
System.out.println("data update..." + update);
|
||||
return update;
|
||||
}
|
||||
// get all with pagination
|
||||
@GetMapping("/Visa_status/getall/page")
|
||||
public Page<Visa_status> getall(@RequestParam(value = "page", required = false) Integer page,
|
||||
@RequestParam(value = "size", required = false) Integer size) {
|
||||
Pageable paging = PageRequest.of(page, size);
|
||||
Page<Visa_status> get = Service.getAllWithPagination(paging);
|
||||
|
||||
return get;
|
||||
|
||||
}
|
||||
@GetMapping("/Visa_status")
|
||||
public List<Visa_status> getdetails() {
|
||||
List<Visa_status> get = Service.getdetails();
|
||||
return get;
|
||||
}
|
||||
// get all without authentication
|
||||
|
||||
@GetMapping("/token/Visa_status")
|
||||
public List<Visa_status> getallwioutsec() {
|
||||
List<Visa_status> get = Service.getdetails();
|
||||
return get;
|
||||
}
|
||||
@GetMapping("/Visa_status/{id}")
|
||||
public Visa_status getdetailsbyId(@PathVariable Integer id ) {
|
||||
Visa_status get = Service.getdetailsbyId(id);
|
||||
return get;
|
||||
}
|
||||
@DeleteMapping("/Visa_status/{id}")
|
||||
public ResponseEntity<?> delete_by_id(@PathVariable Integer id ) {
|
||||
Service.delete_by_id(id);
|
||||
return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package com.realnet.vpspack.Controllers;
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.realnet.vpspack.Entity.Visa_status_ListFilter1;
|
||||
import com.realnet.vpspack.Services.Visa_status_ListFilter1Service ;
|
||||
@RequestMapping(value = "/Visa_status_ListFilter1")
|
||||
@RestController
|
||||
public class Visa_status_ListFilter1Controller {
|
||||
|
||||
@Autowired
|
||||
private Visa_status_ListFilter1Service Service;
|
||||
|
||||
@GetMapping("/Visa_status_ListFilter1")
|
||||
public List<Visa_status_ListFilter1> getlist() {
|
||||
List<Visa_status_ListFilter1> get = Service.getlistbuilder();
|
||||
return get;
|
||||
}
|
||||
@GetMapping("/Visa_status_ListFilter11")
|
||||
public List<Visa_status_ListFilter1> getlistwithparam( ) {
|
||||
List<Visa_status_ListFilter1> get = Service.getlistbuilderparam( );
|
||||
return get;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
package com.realnet.vpspack.Entity;
|
||||
import lombok.*;
|
||||
import com.realnet.WhoColumn.Entity.Extension;
|
||||
import javax.persistence.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Entity
|
||||
@Data
|
||||
public class Agent extends Extension {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Integer id;
|
||||
|
||||
private String name;
|
||||
|
||||
@Column(length = 2000)
|
||||
private String description;
|
||||
|
||||
private boolean active;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package com.realnet.vpspack.Entity;
|
||||
import lombok.*;
|
||||
import javax.persistence.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
|
||||
@Data
|
||||
public class Agent_ListFilter1 {
|
||||
|
||||
private Integer id;
|
||||
|
||||
|
||||
private String name;
|
||||
}
|
||||
@ -0,0 +1,38 @@
|
||||
package com.realnet.vpspack.Entity;
|
||||
import lombok.*;
|
||||
import com.realnet.WhoColumn.Entity.Extension;
|
||||
import javax.persistence.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Entity
|
||||
@Data
|
||||
public class Cost_sheet extends Extension {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Integer id;
|
||||
|
||||
private String name;
|
||||
|
||||
@Column(length = 2000)
|
||||
private String description;
|
||||
|
||||
private boolean active;
|
||||
|
||||
private String cost_sheetname;
|
||||
private String cost_sheetpath ;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
package com.realnet.vpspack.Entity;
|
||||
import lombok.*;
|
||||
import com.realnet.WhoColumn.Entity.Extension;
|
||||
import javax.persistence.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Entity
|
||||
@Data
|
||||
public class Gender extends Extension {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Integer id;
|
||||
|
||||
private String name;
|
||||
|
||||
@Column(length = 2000)
|
||||
private String description;
|
||||
|
||||
private boolean active;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package com.realnet.vpspack.Entity;
|
||||
import lombok.*;
|
||||
import javax.persistence.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
|
||||
@Data
|
||||
public class Gender_ListFilter1 {
|
||||
|
||||
private Integer id;
|
||||
|
||||
|
||||
private String name;
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
package com.realnet.vpspack.Entity;
|
||||
import lombok.*;
|
||||
import com.realnet.WhoColumn.Entity.Extension;
|
||||
import javax.persistence.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Entity
|
||||
@Data
|
||||
public class Nationality extends Extension {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Integer id;
|
||||
|
||||
private String name;
|
||||
|
||||
@Column(length = 2000)
|
||||
private String description;
|
||||
|
||||
private boolean active;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package com.realnet.vpspack.Entity;
|
||||
import lombok.*;
|
||||
import javax.persistence.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
|
||||
@Data
|
||||
public class Nationality_ListFilter1 {
|
||||
|
||||
private Integer id;
|
||||
|
||||
|
||||
private String name;
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
package com.realnet.vpspack.Entity;
|
||||
import lombok.*;
|
||||
import com.realnet.WhoColumn.Entity.Extension;
|
||||
import javax.persistence.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Entity
|
||||
@Data
|
||||
public class Referrer extends Extension {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Integer id;
|
||||
|
||||
private String name;
|
||||
|
||||
@Column(length = 2000)
|
||||
private String description;
|
||||
|
||||
private boolean active;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package com.realnet.vpspack.Entity;
|
||||
import lombok.*;
|
||||
import javax.persistence.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
|
||||
@Data
|
||||
public class Referrer_ListFilter1 {
|
||||
|
||||
private Integer id;
|
||||
|
||||
|
||||
private String name;
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
package com.realnet.vpspack.Entity;
|
||||
import lombok.*;
|
||||
import com.realnet.WhoColumn.Entity.Extension;
|
||||
import javax.persistence.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Entity
|
||||
@Data
|
||||
public class Supplier extends Extension {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Integer id;
|
||||
|
||||
private String name;
|
||||
|
||||
@Column(length = 2000)
|
||||
private String description;
|
||||
|
||||
private boolean active;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package com.realnet.vpspack.Entity;
|
||||
import lombok.*;
|
||||
import javax.persistence.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
|
||||
@Data
|
||||
public class Supplier_ListFilter1 {
|
||||
|
||||
private Integer id;
|
||||
|
||||
|
||||
private String name;
|
||||
}
|
||||
@ -0,0 +1,47 @@
|
||||
package com.realnet.vpspack.Entity;
|
||||
import lombok.*;
|
||||
import com.realnet.WhoColumn.Entity.Extension;
|
||||
import javax.persistence.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Entity
|
||||
@Data
|
||||
public class Visa_administration extends Extension {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Integer id;
|
||||
|
||||
private String name;
|
||||
|
||||
@Column(length = 2000)
|
||||
private String description;
|
||||
|
||||
private boolean active;
|
||||
|
||||
private String emails;
|
||||
|
||||
private Integer visa_status;
|
||||
private String visa_statusname;
|
||||
|
||||
private Integer nationality;
|
||||
private String nationalityname;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,117 @@
|
||||
package com.realnet.vpspack.Entity;
|
||||
import lombok.*;
|
||||
import com.realnet.WhoColumn.Entity.Extension;
|
||||
import javax.persistence.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Entity
|
||||
@Data
|
||||
public class Visa_application extends Extension {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Integer id;
|
||||
|
||||
private String name;
|
||||
|
||||
@Column(length = 2000)
|
||||
private String description;
|
||||
|
||||
private boolean active;
|
||||
|
||||
private Integer visa_entry_type;
|
||||
private String visa_entry_typename;
|
||||
|
||||
private Integer visa_duration;
|
||||
private String visa_durationname;
|
||||
|
||||
private Integer visa_processing;
|
||||
private String visa_processingname;
|
||||
|
||||
private String travel_start_date;
|
||||
|
||||
private String travel_end_date;
|
||||
|
||||
private int passport_number;
|
||||
|
||||
private String passport_issue_date;
|
||||
|
||||
private String passport_expiry_date;
|
||||
|
||||
private String email;
|
||||
|
||||
private String phone_number;
|
||||
|
||||
private String birth_place;
|
||||
|
||||
private String date_of_birth;
|
||||
|
||||
private Integer gender;
|
||||
private String gendername;
|
||||
|
||||
private String profession;
|
||||
|
||||
private String visa_cost;
|
||||
|
||||
private Integer referrer;
|
||||
private String referrername;
|
||||
|
||||
private Integer nationality;
|
||||
private String nationalityname;
|
||||
|
||||
private Integer supplier;
|
||||
private String suppliername;
|
||||
|
||||
private Integer agent;
|
||||
private String agentname;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,38 @@
|
||||
package com.realnet.vpspack.Entity;
|
||||
import lombok.*;
|
||||
import com.realnet.WhoColumn.Entity.Extension;
|
||||
import javax.persistence.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Entity
|
||||
@Data
|
||||
public class Visa_bundle extends Extension {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Integer id;
|
||||
|
||||
private String name;
|
||||
|
||||
@Column(length = 2000)
|
||||
private String description;
|
||||
|
||||
private boolean active;
|
||||
|
||||
private String visa_bundlename;
|
||||
private String visa_bundlepath ;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
package com.realnet.vpspack.Entity;
|
||||
import lombok.*;
|
||||
import com.realnet.WhoColumn.Entity.Extension;
|
||||
import javax.persistence.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Entity
|
||||
@Data
|
||||
public class Visa_duration extends Extension {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Integer id;
|
||||
|
||||
private String name;
|
||||
|
||||
@Column(length = 2000)
|
||||
private String description;
|
||||
|
||||
private boolean active;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package com.realnet.vpspack.Entity;
|
||||
import lombok.*;
|
||||
import javax.persistence.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
|
||||
@Data
|
||||
public class Visa_duration_ListFilter1 {
|
||||
|
||||
private Integer id;
|
||||
|
||||
|
||||
private String name;
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
package com.realnet.vpspack.Entity;
|
||||
import lombok.*;
|
||||
import com.realnet.WhoColumn.Entity.Extension;
|
||||
import javax.persistence.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Entity
|
||||
@Data
|
||||
public class Visa_entry extends Extension {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Integer id;
|
||||
|
||||
private String name;
|
||||
|
||||
@Column(length = 2000)
|
||||
private String description;
|
||||
|
||||
private boolean active;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package com.realnet.vpspack.Entity;
|
||||
import lombok.*;
|
||||
import javax.persistence.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
|
||||
@Data
|
||||
public class Visa_entry_ListFilter1 {
|
||||
|
||||
private Integer id;
|
||||
|
||||
|
||||
private String name;
|
||||
}
|
||||
@ -0,0 +1,56 @@
|
||||
package com.realnet.vpspack.Entity;
|
||||
import lombok.*;
|
||||
import com.realnet.WhoColumn.Entity.Extension;
|
||||
import javax.persistence.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Entity
|
||||
@Data
|
||||
public class Visa_prices extends Extension {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Integer id;
|
||||
|
||||
private String name;
|
||||
|
||||
@Column(length = 2000)
|
||||
private String description;
|
||||
|
||||
private boolean active;
|
||||
|
||||
private Integer visa_entry_type;
|
||||
private String visa_entry_typename;
|
||||
|
||||
private Integer visa_duration;
|
||||
private String visa_durationname;
|
||||
|
||||
private Integer visa_processing;
|
||||
private String visa_processingname;
|
||||
|
||||
private String total_price;
|
||||
|
||||
private String cost;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
package com.realnet.vpspack.Entity;
|
||||
import lombok.*;
|
||||
import com.realnet.WhoColumn.Entity.Extension;
|
||||
import javax.persistence.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Entity
|
||||
@Data
|
||||
public class Visa_processing extends Extension {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Integer id;
|
||||
|
||||
private String name;
|
||||
|
||||
@Column(length = 2000)
|
||||
private String description;
|
||||
|
||||
private boolean active;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package com.realnet.vpspack.Entity;
|
||||
import lombok.*;
|
||||
import javax.persistence.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
|
||||
@Data
|
||||
public class Visa_processing_ListFilter1 {
|
||||
|
||||
private Integer id;
|
||||
|
||||
|
||||
private String name;
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
package com.realnet.vpspack.Entity;
|
||||
import lombok.*;
|
||||
import com.realnet.WhoColumn.Entity.Extension;
|
||||
import javax.persistence.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Entity
|
||||
@Data
|
||||
public class Visa_status extends Extension {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Integer id;
|
||||
|
||||
private String name;
|
||||
|
||||
@Column(length = 2000)
|
||||
private String description;
|
||||
|
||||
private boolean active;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package com.realnet.vpspack.Entity;
|
||||
import lombok.*;
|
||||
import javax.persistence.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
|
||||
@Data
|
||||
public class Visa_status_ListFilter1 {
|
||||
|
||||
private Integer id;
|
||||
|
||||
|
||||
private String name;
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
package com.realnet.vpspack.Repository;
|
||||
|
||||
|
||||
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 java.util.*;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
import com.realnet.vpspack.Entity.Agent;
|
||||
|
||||
@Repository
|
||||
public interface AgentRepository extends JpaRepository<Agent, Integer> {
|
||||
|
||||
@Query(value = "select * from agent where created_by=?1", nativeQuery = true)
|
||||
List<Agent> findAll(Long creayedBy);
|
||||
|
||||
@Query(value = "select * from agent where created_by=?1", nativeQuery = true)
|
||||
Page<Agent> findAll(Pageable page, Long creayedBy);
|
||||
}
|
||||
@ -0,0 +1,32 @@
|
||||
package com.realnet.vpspack.Repository;
|
||||
|
||||
|
||||
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 java.util.*;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
import com.realnet.vpspack.Entity.Cost_sheet;
|
||||
|
||||
@Repository
|
||||
public interface Cost_sheetRepository extends JpaRepository<Cost_sheet, Integer> {
|
||||
|
||||
@Query(value = "select * from cost_sheet where created_by=?1", nativeQuery = true)
|
||||
List<Cost_sheet> findAll(Long creayedBy);
|
||||
|
||||
@Query(value = "select * from cost_sheet where created_by=?1", nativeQuery = true)
|
||||
Page<Cost_sheet> findAll(Pageable page, Long creayedBy);
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
package com.realnet.vpspack.Repository;
|
||||
|
||||
|
||||
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 java.util.*;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
import com.realnet.vpspack.Entity.Gender;
|
||||
|
||||
@Repository
|
||||
public interface GenderRepository extends JpaRepository<Gender, Integer> {
|
||||
|
||||
@Query(value = "select * from gender where created_by=?1", nativeQuery = true)
|
||||
List<Gender> findAll(Long creayedBy);
|
||||
|
||||
@Query(value = "select * from gender where created_by=?1", nativeQuery = true)
|
||||
Page<Gender> findAll(Pageable page, Long creayedBy);
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
package com.realnet.vpspack.Repository;
|
||||
|
||||
|
||||
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 java.util.*;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
import com.realnet.vpspack.Entity.Nationality;
|
||||
|
||||
@Repository
|
||||
public interface NationalityRepository extends JpaRepository<Nationality, Integer> {
|
||||
|
||||
@Query(value = "select * from nationality where created_by=?1", nativeQuery = true)
|
||||
List<Nationality> findAll(Long creayedBy);
|
||||
|
||||
@Query(value = "select * from nationality where created_by=?1", nativeQuery = true)
|
||||
Page<Nationality> findAll(Pageable page, Long creayedBy);
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
package com.realnet.vpspack.Repository;
|
||||
|
||||
|
||||
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 java.util.*;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
import com.realnet.vpspack.Entity.Referrer;
|
||||
|
||||
@Repository
|
||||
public interface ReferrerRepository extends JpaRepository<Referrer, Integer> {
|
||||
|
||||
@Query(value = "select * from referrer where created_by=?1", nativeQuery = true)
|
||||
List<Referrer> findAll(Long creayedBy);
|
||||
|
||||
@Query(value = "select * from referrer where created_by=?1", nativeQuery = true)
|
||||
Page<Referrer> findAll(Pageable page, Long creayedBy);
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
package com.realnet.vpspack.Repository;
|
||||
|
||||
|
||||
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 java.util.*;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
import com.realnet.vpspack.Entity.Supplier;
|
||||
|
||||
@Repository
|
||||
public interface SupplierRepository extends JpaRepository<Supplier, Integer> {
|
||||
|
||||
@Query(value = "select * from supplier where created_by=?1", nativeQuery = true)
|
||||
List<Supplier> findAll(Long creayedBy);
|
||||
|
||||
@Query(value = "select * from supplier where created_by=?1", nativeQuery = true)
|
||||
Page<Supplier> findAll(Pageable page, Long creayedBy);
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
package com.realnet.vpspack.Repository;
|
||||
|
||||
|
||||
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 java.util.*;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
import com.realnet.vpspack.Entity.Visa_administration;
|
||||
|
||||
@Repository
|
||||
public interface Visa_administrationRepository extends JpaRepository<Visa_administration, Integer> {
|
||||
|
||||
@Query(value = "select * from visa_administration where created_by=?1", nativeQuery = true)
|
||||
List<Visa_administration> findAll(Long creayedBy);
|
||||
|
||||
@Query(value = "select * from visa_administration where created_by=?1", nativeQuery = true)
|
||||
Page<Visa_administration> findAll(Pageable page, Long creayedBy);
|
||||
}
|
||||
@ -0,0 +1,68 @@
|
||||
package com.realnet.vpspack.Repository;
|
||||
|
||||
|
||||
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 java.util.*;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
import com.realnet.vpspack.Entity.Visa_application;
|
||||
|
||||
@Repository
|
||||
public interface Visa_applicationRepository extends JpaRepository<Visa_application, Integer> {
|
||||
|
||||
@Query(value = "select * from visa_application where created_by=?1", nativeQuery = true)
|
||||
List<Visa_application> findAll(Long creayedBy);
|
||||
|
||||
@Query(value = "select * from visa_application where created_by=?1", nativeQuery = true)
|
||||
Page<Visa_application> findAll(Pageable page, Long creayedBy);
|
||||
}
|
||||
@ -0,0 +1,32 @@
|
||||
package com.realnet.vpspack.Repository;
|
||||
|
||||
|
||||
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 java.util.*;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
import com.realnet.vpspack.Entity.Visa_bundle;
|
||||
|
||||
@Repository
|
||||
public interface Visa_bundleRepository extends JpaRepository<Visa_bundle, Integer> {
|
||||
|
||||
@Query(value = "select * from visa_bundle where created_by=?1", nativeQuery = true)
|
||||
List<Visa_bundle> findAll(Long creayedBy);
|
||||
|
||||
@Query(value = "select * from visa_bundle where created_by=?1", nativeQuery = true)
|
||||
Page<Visa_bundle> findAll(Pageable page, Long creayedBy);
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
package com.realnet.vpspack.Repository;
|
||||
|
||||
|
||||
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 java.util.*;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
import com.realnet.vpspack.Entity.Visa_duration;
|
||||
|
||||
@Repository
|
||||
public interface Visa_durationRepository extends JpaRepository<Visa_duration, Integer> {
|
||||
|
||||
@Query(value = "select * from visa_duration where created_by=?1", nativeQuery = true)
|
||||
List<Visa_duration> findAll(Long creayedBy);
|
||||
|
||||
@Query(value = "select * from visa_duration where created_by=?1", nativeQuery = true)
|
||||
Page<Visa_duration> findAll(Pageable page, Long creayedBy);
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
package com.realnet.vpspack.Repository;
|
||||
|
||||
|
||||
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 java.util.*;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
import com.realnet.vpspack.Entity.Visa_entry;
|
||||
|
||||
@Repository
|
||||
public interface Visa_entryRepository extends JpaRepository<Visa_entry, Integer> {
|
||||
|
||||
@Query(value = "select * from visa_entry where created_by=?1", nativeQuery = true)
|
||||
List<Visa_entry> findAll(Long creayedBy);
|
||||
|
||||
@Query(value = "select * from visa_entry where created_by=?1", nativeQuery = true)
|
||||
Page<Visa_entry> findAll(Pageable page, Long creayedBy);
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
package com.realnet.vpspack.Repository;
|
||||
|
||||
|
||||
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 java.util.*;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
import com.realnet.vpspack.Entity.Visa_prices;
|
||||
|
||||
@Repository
|
||||
public interface Visa_pricesRepository extends JpaRepository<Visa_prices, Integer> {
|
||||
|
||||
@Query(value = "select * from visa_prices where created_by=?1", nativeQuery = true)
|
||||
List<Visa_prices> findAll(Long creayedBy);
|
||||
|
||||
@Query(value = "select * from visa_prices where created_by=?1", nativeQuery = true)
|
||||
Page<Visa_prices> findAll(Pageable page, Long creayedBy);
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
package com.realnet.vpspack.Repository;
|
||||
|
||||
|
||||
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 java.util.*;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
import com.realnet.vpspack.Entity.Visa_processing;
|
||||
|
||||
@Repository
|
||||
public interface Visa_processingRepository extends JpaRepository<Visa_processing, Integer> {
|
||||
|
||||
@Query(value = "select * from visa_processing where created_by=?1", nativeQuery = true)
|
||||
List<Visa_processing> findAll(Long creayedBy);
|
||||
|
||||
@Query(value = "select * from visa_processing where created_by=?1", nativeQuery = true)
|
||||
Page<Visa_processing> findAll(Pageable page, Long creayedBy);
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
package com.realnet.vpspack.Repository;
|
||||
|
||||
|
||||
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 java.util.*;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
import com.realnet.vpspack.Entity.Visa_status;
|
||||
|
||||
@Repository
|
||||
public interface Visa_statusRepository extends JpaRepository<Visa_status, Integer> {
|
||||
|
||||
@Query(value = "select * from visa_status where created_by=?1", nativeQuery = true)
|
||||
List<Visa_status> findAll(Long creayedBy);
|
||||
|
||||
@Query(value = "select * from visa_status where created_by=?1", nativeQuery = true)
|
||||
Page<Visa_status> findAll(Pageable page, Long creayedBy);
|
||||
}
|
||||
@ -0,0 +1,93 @@
|
||||
package com.realnet.vpspack.Services;
|
||||
import com.realnet.vpspack.Repository.AgentRepository;
|
||||
import com.realnet.vpspack.Entity.Agent
|
||||
;import java.util.*;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import com.realnet.SequenceGenerator.Service.SequenceService;
|
||||
import org.springframework.data.domain.Page;
|
||||
import com.realnet.realm.Entity.Realm;
|
||||
import com.realnet.realm.Services.RealmService;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.*;
|
||||
import com.realnet.users.service1.AppUserServiceImpl;
|
||||
import com.realnet.users.entity1.AppUser;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class AgentService {
|
||||
@Autowired
|
||||
private AgentRepository Repository;
|
||||
@Autowired
|
||||
private AppUserServiceImpl userService;
|
||||
@Autowired
|
||||
private RealmService realmService;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public Agent Savedata(Agent data) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
data.setUpdatedBy(getUser().getUserId());
|
||||
data.setCreatedBy(getUser().getUserId());
|
||||
data.setAccountId(getUser().getAccount().getAccount_id());
|
||||
Agent save = Repository.save(data);
|
||||
return save;
|
||||
}
|
||||
|
||||
|
||||
// get all with pagination
|
||||
public Page<Agent> getAllWithPagination(Pageable page) {
|
||||
return Repository.findAll(page, getUser().getUserId());
|
||||
}
|
||||
public List<Agent> getdetails() {
|
||||
List<Realm> realm = realmService.findByUserId(getUser().getUserId());
|
||||
List<Agent> all = Repository.findAll(getUser().getUserId());
|
||||
|
||||
return all ; }
|
||||
|
||||
|
||||
public Agent getdetailsbyId(Integer id) {
|
||||
return Repository.findById(id).get();
|
||||
}
|
||||
|
||||
|
||||
public void delete_by_id(Integer id) {
|
||||
Repository.deleteById(id);
|
||||
}
|
||||
|
||||
|
||||
public Agent update(Agent data,Integer id) {
|
||||
Agent old = Repository.findById(id).get();
|
||||
old.setName(data.getName());
|
||||
|
||||
old.setDescription(data.getDescription());
|
||||
|
||||
old.setActive (data.isActive());
|
||||
|
||||
final Agent test = Repository.save(old);
|
||||
data.setUpdatedBy(getUser().getUserId());
|
||||
return test;}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public AppUser getUser() {
|
||||
AppUser user = userService.getLoggedInUser();
|
||||
return user;
|
||||
|
||||
}}
|
||||
@ -0,0 +1,51 @@
|
||||
package com.realnet.vpspack.Services;
|
||||
import java.util.*;
|
||||
import com.realnet.vpspack.Repository.AgentRepository;
|
||||
import com.realnet.vpspack.Entity.Agent;
|
||||
|
||||
import com.realnet.vpspack.Entity.Agent_ListFilter1;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class Agent_ListFilter1Service {
|
||||
@Autowired
|
||||
private AgentRepository Repository;
|
||||
|
||||
|
||||
|
||||
|
||||
public List<Agent_ListFilter1> getlistbuilder() {
|
||||
List<Agent> list= Repository.findAll();
|
||||
ArrayList<Agent_ListFilter1> l = new ArrayList<>();
|
||||
for (Agent data : list) {
|
||||
boolean isactive = data.isActive();
|
||||
|
||||
if (isactive) {{
|
||||
Agent_ListFilter1 dummy = new Agent_ListFilter1();
|
||||
dummy.setId(data.getId());
|
||||
dummy.setName(data.getName());
|
||||
l.add(dummy);
|
||||
}}
|
||||
}
|
||||
return l;}
|
||||
|
||||
|
||||
|
||||
public List<Agent_ListFilter1> getlistbuilderparam( ) {
|
||||
List<Agent> list= Repository.findAll();
|
||||
ArrayList<Agent_ListFilter1> l = new ArrayList<>();
|
||||
for (Agent data : list) {
|
||||
boolean isactive = data.isActive();
|
||||
|
||||
if (isactive) {{
|
||||
Agent_ListFilter1 dummy = new Agent_ListFilter1();
|
||||
dummy.setId(data.getId());
|
||||
dummy.setName(data.getName());
|
||||
l.add(dummy);
|
||||
}}
|
||||
}
|
||||
return l;}
|
||||
}
|
||||
@ -0,0 +1,103 @@
|
||||
package com.realnet.vpspack.Services;
|
||||
import com.realnet.vpspack.Repository.Cost_sheetRepository;
|
||||
import com.realnet.vpspack.Entity.Cost_sheet
|
||||
;import java.util.*;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import com.realnet.SequenceGenerator.Service.SequenceService;
|
||||
import org.springframework.data.domain.Page;
|
||||
import com.realnet.realm.Entity.Realm;
|
||||
import com.realnet.realm.Services.RealmService;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.*;
|
||||
import com.realnet.users.service1.AppUserServiceImpl;
|
||||
import com.realnet.users.entity1.AppUser;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class Cost_sheetService {
|
||||
@Autowired
|
||||
private Cost_sheetRepository Repository;
|
||||
@Autowired
|
||||
private AppUserServiceImpl userService;
|
||||
@Autowired
|
||||
private RealmService realmService;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public Cost_sheet Savedata(Cost_sheet data) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
data.setUpdatedBy(getUser().getUserId());
|
||||
data.setCreatedBy(getUser().getUserId());
|
||||
data.setAccountId(getUser().getAccount().getAccount_id());
|
||||
Cost_sheet save = Repository.save(data);
|
||||
return save;
|
||||
}
|
||||
|
||||
|
||||
// get all with pagination
|
||||
public Page<Cost_sheet> getAllWithPagination(Pageable page) {
|
||||
return Repository.findAll(page, getUser().getUserId());
|
||||
}
|
||||
public List<Cost_sheet> getdetails() {
|
||||
List<Realm> realm = realmService.findByUserId(getUser().getUserId());
|
||||
List<Cost_sheet> all = Repository.findAll(getUser().getUserId());
|
||||
|
||||
return all ; }
|
||||
|
||||
|
||||
public Cost_sheet getdetailsbyId(Integer id) {
|
||||
return Repository.findById(id).get();
|
||||
}
|
||||
|
||||
|
||||
public void delete_by_id(Integer id) {
|
||||
Repository.deleteById(id);
|
||||
}
|
||||
|
||||
|
||||
public Cost_sheet update(Cost_sheet data,Integer id) {
|
||||
Cost_sheet old = Repository.findById(id).get();
|
||||
old.setName(data.getName());
|
||||
|
||||
old.setDescription(data.getDescription());
|
||||
|
||||
old.setActive (data.isActive());
|
||||
|
||||
|
||||
|
||||
final Cost_sheet test = Repository.save(old);
|
||||
data.setUpdatedBy(getUser().getUserId());
|
||||
return test;}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public AppUser getUser() {
|
||||
AppUser user = userService.getLoggedInUser();
|
||||
return user;
|
||||
|
||||
}}
|
||||
@ -0,0 +1,93 @@
|
||||
package com.realnet.vpspack.Services;
|
||||
import com.realnet.vpspack.Repository.GenderRepository;
|
||||
import com.realnet.vpspack.Entity.Gender
|
||||
;import java.util.*;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import com.realnet.SequenceGenerator.Service.SequenceService;
|
||||
import org.springframework.data.domain.Page;
|
||||
import com.realnet.realm.Entity.Realm;
|
||||
import com.realnet.realm.Services.RealmService;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.*;
|
||||
import com.realnet.users.service1.AppUserServiceImpl;
|
||||
import com.realnet.users.entity1.AppUser;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class GenderService {
|
||||
@Autowired
|
||||
private GenderRepository Repository;
|
||||
@Autowired
|
||||
private AppUserServiceImpl userService;
|
||||
@Autowired
|
||||
private RealmService realmService;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public Gender Savedata(Gender data) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
data.setUpdatedBy(getUser().getUserId());
|
||||
data.setCreatedBy(getUser().getUserId());
|
||||
data.setAccountId(getUser().getAccount().getAccount_id());
|
||||
Gender save = Repository.save(data);
|
||||
return save;
|
||||
}
|
||||
|
||||
|
||||
// get all with pagination
|
||||
public Page<Gender> getAllWithPagination(Pageable page) {
|
||||
return Repository.findAll(page, getUser().getUserId());
|
||||
}
|
||||
public List<Gender> getdetails() {
|
||||
List<Realm> realm = realmService.findByUserId(getUser().getUserId());
|
||||
List<Gender> all = Repository.findAll(getUser().getUserId());
|
||||
|
||||
return all ; }
|
||||
|
||||
|
||||
public Gender getdetailsbyId(Integer id) {
|
||||
return Repository.findById(id).get();
|
||||
}
|
||||
|
||||
|
||||
public void delete_by_id(Integer id) {
|
||||
Repository.deleteById(id);
|
||||
}
|
||||
|
||||
|
||||
public Gender update(Gender data,Integer id) {
|
||||
Gender old = Repository.findById(id).get();
|
||||
old.setName(data.getName());
|
||||
|
||||
old.setDescription(data.getDescription());
|
||||
|
||||
old.setActive (data.isActive());
|
||||
|
||||
final Gender test = Repository.save(old);
|
||||
data.setUpdatedBy(getUser().getUserId());
|
||||
return test;}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public AppUser getUser() {
|
||||
AppUser user = userService.getLoggedInUser();
|
||||
return user;
|
||||
|
||||
}}
|
||||
@ -0,0 +1,51 @@
|
||||
package com.realnet.vpspack.Services;
|
||||
import java.util.*;
|
||||
import com.realnet.vpspack.Repository.GenderRepository;
|
||||
import com.realnet.vpspack.Entity.Gender;
|
||||
|
||||
import com.realnet.vpspack.Entity.Gender_ListFilter1;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class Gender_ListFilter1Service {
|
||||
@Autowired
|
||||
private GenderRepository Repository;
|
||||
|
||||
|
||||
|
||||
|
||||
public List<Gender_ListFilter1> getlistbuilder() {
|
||||
List<Gender> list= Repository.findAll();
|
||||
ArrayList<Gender_ListFilter1> l = new ArrayList<>();
|
||||
for (Gender data : list) {
|
||||
boolean isactive = data.isActive();
|
||||
|
||||
if (isactive) {{
|
||||
Gender_ListFilter1 dummy = new Gender_ListFilter1();
|
||||
dummy.setId(data.getId());
|
||||
dummy.setName(data.getName());
|
||||
l.add(dummy);
|
||||
}}
|
||||
}
|
||||
return l;}
|
||||
|
||||
|
||||
|
||||
public List<Gender_ListFilter1> getlistbuilderparam( ) {
|
||||
List<Gender> list= Repository.findAll();
|
||||
ArrayList<Gender_ListFilter1> l = new ArrayList<>();
|
||||
for (Gender data : list) {
|
||||
boolean isactive = data.isActive();
|
||||
|
||||
if (isactive) {{
|
||||
Gender_ListFilter1 dummy = new Gender_ListFilter1();
|
||||
dummy.setId(data.getId());
|
||||
dummy.setName(data.getName());
|
||||
l.add(dummy);
|
||||
}}
|
||||
}
|
||||
return l;}
|
||||
}
|
||||
@ -0,0 +1,93 @@
|
||||
package com.realnet.vpspack.Services;
|
||||
import com.realnet.vpspack.Repository.NationalityRepository;
|
||||
import com.realnet.vpspack.Entity.Nationality
|
||||
;import java.util.*;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import com.realnet.SequenceGenerator.Service.SequenceService;
|
||||
import org.springframework.data.domain.Page;
|
||||
import com.realnet.realm.Entity.Realm;
|
||||
import com.realnet.realm.Services.RealmService;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.*;
|
||||
import com.realnet.users.service1.AppUserServiceImpl;
|
||||
import com.realnet.users.entity1.AppUser;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class NationalityService {
|
||||
@Autowired
|
||||
private NationalityRepository Repository;
|
||||
@Autowired
|
||||
private AppUserServiceImpl userService;
|
||||
@Autowired
|
||||
private RealmService realmService;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public Nationality Savedata(Nationality data) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
data.setUpdatedBy(getUser().getUserId());
|
||||
data.setCreatedBy(getUser().getUserId());
|
||||
data.setAccountId(getUser().getAccount().getAccount_id());
|
||||
Nationality save = Repository.save(data);
|
||||
return save;
|
||||
}
|
||||
|
||||
|
||||
// get all with pagination
|
||||
public Page<Nationality> getAllWithPagination(Pageable page) {
|
||||
return Repository.findAll(page, getUser().getUserId());
|
||||
}
|
||||
public List<Nationality> getdetails() {
|
||||
List<Realm> realm = realmService.findByUserId(getUser().getUserId());
|
||||
List<Nationality> all = Repository.findAll(getUser().getUserId());
|
||||
|
||||
return all ; }
|
||||
|
||||
|
||||
public Nationality getdetailsbyId(Integer id) {
|
||||
return Repository.findById(id).get();
|
||||
}
|
||||
|
||||
|
||||
public void delete_by_id(Integer id) {
|
||||
Repository.deleteById(id);
|
||||
}
|
||||
|
||||
|
||||
public Nationality update(Nationality data,Integer id) {
|
||||
Nationality old = Repository.findById(id).get();
|
||||
old.setName(data.getName());
|
||||
|
||||
old.setDescription(data.getDescription());
|
||||
|
||||
old.setActive (data.isActive());
|
||||
|
||||
final Nationality test = Repository.save(old);
|
||||
data.setUpdatedBy(getUser().getUserId());
|
||||
return test;}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public AppUser getUser() {
|
||||
AppUser user = userService.getLoggedInUser();
|
||||
return user;
|
||||
|
||||
}}
|
||||
@ -0,0 +1,51 @@
|
||||
package com.realnet.vpspack.Services;
|
||||
import java.util.*;
|
||||
import com.realnet.vpspack.Repository.NationalityRepository;
|
||||
import com.realnet.vpspack.Entity.Nationality;
|
||||
|
||||
import com.realnet.vpspack.Entity.Nationality_ListFilter1;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class Nationality_ListFilter1Service {
|
||||
@Autowired
|
||||
private NationalityRepository Repository;
|
||||
|
||||
|
||||
|
||||
|
||||
public List<Nationality_ListFilter1> getlistbuilder() {
|
||||
List<Nationality> list= Repository.findAll();
|
||||
ArrayList<Nationality_ListFilter1> l = new ArrayList<>();
|
||||
for (Nationality data : list) {
|
||||
boolean isactive = data.isActive();
|
||||
|
||||
if (isactive) {{
|
||||
Nationality_ListFilter1 dummy = new Nationality_ListFilter1();
|
||||
dummy.setId(data.getId());
|
||||
dummy.setName(data.getName());
|
||||
l.add(dummy);
|
||||
}}
|
||||
}
|
||||
return l;}
|
||||
|
||||
|
||||
|
||||
public List<Nationality_ListFilter1> getlistbuilderparam( ) {
|
||||
List<Nationality> list= Repository.findAll();
|
||||
ArrayList<Nationality_ListFilter1> l = new ArrayList<>();
|
||||
for (Nationality data : list) {
|
||||
boolean isactive = data.isActive();
|
||||
|
||||
if (isactive) {{
|
||||
Nationality_ListFilter1 dummy = new Nationality_ListFilter1();
|
||||
dummy.setId(data.getId());
|
||||
dummy.setName(data.getName());
|
||||
l.add(dummy);
|
||||
}}
|
||||
}
|
||||
return l;}
|
||||
}
|
||||
@ -0,0 +1,93 @@
|
||||
package com.realnet.vpspack.Services;
|
||||
import com.realnet.vpspack.Repository.ReferrerRepository;
|
||||
import com.realnet.vpspack.Entity.Referrer
|
||||
;import java.util.*;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import com.realnet.SequenceGenerator.Service.SequenceService;
|
||||
import org.springframework.data.domain.Page;
|
||||
import com.realnet.realm.Entity.Realm;
|
||||
import com.realnet.realm.Services.RealmService;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.*;
|
||||
import com.realnet.users.service1.AppUserServiceImpl;
|
||||
import com.realnet.users.entity1.AppUser;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class ReferrerService {
|
||||
@Autowired
|
||||
private ReferrerRepository Repository;
|
||||
@Autowired
|
||||
private AppUserServiceImpl userService;
|
||||
@Autowired
|
||||
private RealmService realmService;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public Referrer Savedata(Referrer data) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
data.setUpdatedBy(getUser().getUserId());
|
||||
data.setCreatedBy(getUser().getUserId());
|
||||
data.setAccountId(getUser().getAccount().getAccount_id());
|
||||
Referrer save = Repository.save(data);
|
||||
return save;
|
||||
}
|
||||
|
||||
|
||||
// get all with pagination
|
||||
public Page<Referrer> getAllWithPagination(Pageable page) {
|
||||
return Repository.findAll(page, getUser().getUserId());
|
||||
}
|
||||
public List<Referrer> getdetails() {
|
||||
List<Realm> realm = realmService.findByUserId(getUser().getUserId());
|
||||
List<Referrer> all = Repository.findAll(getUser().getUserId());
|
||||
|
||||
return all ; }
|
||||
|
||||
|
||||
public Referrer getdetailsbyId(Integer id) {
|
||||
return Repository.findById(id).get();
|
||||
}
|
||||
|
||||
|
||||
public void delete_by_id(Integer id) {
|
||||
Repository.deleteById(id);
|
||||
}
|
||||
|
||||
|
||||
public Referrer update(Referrer data,Integer id) {
|
||||
Referrer old = Repository.findById(id).get();
|
||||
old.setName(data.getName());
|
||||
|
||||
old.setDescription(data.getDescription());
|
||||
|
||||
old.setActive (data.isActive());
|
||||
|
||||
final Referrer test = Repository.save(old);
|
||||
data.setUpdatedBy(getUser().getUserId());
|
||||
return test;}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public AppUser getUser() {
|
||||
AppUser user = userService.getLoggedInUser();
|
||||
return user;
|
||||
|
||||
}}
|
||||
@ -0,0 +1,51 @@
|
||||
package com.realnet.vpspack.Services;
|
||||
import java.util.*;
|
||||
import com.realnet.vpspack.Repository.ReferrerRepository;
|
||||
import com.realnet.vpspack.Entity.Referrer;
|
||||
|
||||
import com.realnet.vpspack.Entity.Referrer_ListFilter1;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class Referrer_ListFilter1Service {
|
||||
@Autowired
|
||||
private ReferrerRepository Repository;
|
||||
|
||||
|
||||
|
||||
|
||||
public List<Referrer_ListFilter1> getlistbuilder() {
|
||||
List<Referrer> list= Repository.findAll();
|
||||
ArrayList<Referrer_ListFilter1> l = new ArrayList<>();
|
||||
for (Referrer data : list) {
|
||||
boolean isactive = data.isActive();
|
||||
|
||||
if (isactive) {{
|
||||
Referrer_ListFilter1 dummy = new Referrer_ListFilter1();
|
||||
dummy.setId(data.getId());
|
||||
dummy.setName(data.getName());
|
||||
l.add(dummy);
|
||||
}}
|
||||
}
|
||||
return l;}
|
||||
|
||||
|
||||
|
||||
public List<Referrer_ListFilter1> getlistbuilderparam( ) {
|
||||
List<Referrer> list= Repository.findAll();
|
||||
ArrayList<Referrer_ListFilter1> l = new ArrayList<>();
|
||||
for (Referrer data : list) {
|
||||
boolean isactive = data.isActive();
|
||||
|
||||
if (isactive) {{
|
||||
Referrer_ListFilter1 dummy = new Referrer_ListFilter1();
|
||||
dummy.setId(data.getId());
|
||||
dummy.setName(data.getName());
|
||||
l.add(dummy);
|
||||
}}
|
||||
}
|
||||
return l;}
|
||||
}
|
||||
@ -0,0 +1,93 @@
|
||||
package com.realnet.vpspack.Services;
|
||||
import com.realnet.vpspack.Repository.SupplierRepository;
|
||||
import com.realnet.vpspack.Entity.Supplier
|
||||
;import java.util.*;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import com.realnet.SequenceGenerator.Service.SequenceService;
|
||||
import org.springframework.data.domain.Page;
|
||||
import com.realnet.realm.Entity.Realm;
|
||||
import com.realnet.realm.Services.RealmService;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.*;
|
||||
import com.realnet.users.service1.AppUserServiceImpl;
|
||||
import com.realnet.users.entity1.AppUser;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class SupplierService {
|
||||
@Autowired
|
||||
private SupplierRepository Repository;
|
||||
@Autowired
|
||||
private AppUserServiceImpl userService;
|
||||
@Autowired
|
||||
private RealmService realmService;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public Supplier Savedata(Supplier data) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
data.setUpdatedBy(getUser().getUserId());
|
||||
data.setCreatedBy(getUser().getUserId());
|
||||
data.setAccountId(getUser().getAccount().getAccount_id());
|
||||
Supplier save = Repository.save(data);
|
||||
return save;
|
||||
}
|
||||
|
||||
|
||||
// get all with pagination
|
||||
public Page<Supplier> getAllWithPagination(Pageable page) {
|
||||
return Repository.findAll(page, getUser().getUserId());
|
||||
}
|
||||
public List<Supplier> getdetails() {
|
||||
List<Realm> realm = realmService.findByUserId(getUser().getUserId());
|
||||
List<Supplier> all = Repository.findAll(getUser().getUserId());
|
||||
|
||||
return all ; }
|
||||
|
||||
|
||||
public Supplier getdetailsbyId(Integer id) {
|
||||
return Repository.findById(id).get();
|
||||
}
|
||||
|
||||
|
||||
public void delete_by_id(Integer id) {
|
||||
Repository.deleteById(id);
|
||||
}
|
||||
|
||||
|
||||
public Supplier update(Supplier data,Integer id) {
|
||||
Supplier old = Repository.findById(id).get();
|
||||
old.setName(data.getName());
|
||||
|
||||
old.setDescription(data.getDescription());
|
||||
|
||||
old.setActive (data.isActive());
|
||||
|
||||
final Supplier test = Repository.save(old);
|
||||
data.setUpdatedBy(getUser().getUserId());
|
||||
return test;}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public AppUser getUser() {
|
||||
AppUser user = userService.getLoggedInUser();
|
||||
return user;
|
||||
|
||||
}}
|
||||
@ -0,0 +1,51 @@
|
||||
package com.realnet.vpspack.Services;
|
||||
import java.util.*;
|
||||
import com.realnet.vpspack.Repository.SupplierRepository;
|
||||
import com.realnet.vpspack.Entity.Supplier;
|
||||
|
||||
import com.realnet.vpspack.Entity.Supplier_ListFilter1;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class Supplier_ListFilter1Service {
|
||||
@Autowired
|
||||
private SupplierRepository Repository;
|
||||
|
||||
|
||||
|
||||
|
||||
public List<Supplier_ListFilter1> getlistbuilder() {
|
||||
List<Supplier> list= Repository.findAll();
|
||||
ArrayList<Supplier_ListFilter1> l = new ArrayList<>();
|
||||
for (Supplier data : list) {
|
||||
boolean isactive = data.isActive();
|
||||
|
||||
if (isactive) {{
|
||||
Supplier_ListFilter1 dummy = new Supplier_ListFilter1();
|
||||
dummy.setId(data.getId());
|
||||
dummy.setName(data.getName());
|
||||
l.add(dummy);
|
||||
}}
|
||||
}
|
||||
return l;}
|
||||
|
||||
|
||||
|
||||
public List<Supplier_ListFilter1> getlistbuilderparam( ) {
|
||||
List<Supplier> list= Repository.findAll();
|
||||
ArrayList<Supplier_ListFilter1> l = new ArrayList<>();
|
||||
for (Supplier data : list) {
|
||||
boolean isactive = data.isActive();
|
||||
|
||||
if (isactive) {{
|
||||
Supplier_ListFilter1 dummy = new Supplier_ListFilter1();
|
||||
dummy.setId(data.getId());
|
||||
dummy.setName(data.getName());
|
||||
l.add(dummy);
|
||||
}}
|
||||
}
|
||||
return l;}
|
||||
}
|
||||
@ -0,0 +1,149 @@
|
||||
package com.realnet.vpspack.Services;
|
||||
import com.realnet.vpspack.Repository.Visa_administrationRepository;
|
||||
import com.realnet.vpspack.Entity.Visa_administration
|
||||
;import java.util.*;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import com.realnet.SequenceGenerator.Service.SequenceService;
|
||||
import org.springframework.data.domain.Page;
|
||||
import com.realnet.realm.Entity.Realm;
|
||||
import com.realnet.realm.Services.RealmService;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.*;
|
||||
import com.realnet.users.service1.AppUserServiceImpl;
|
||||
import com.realnet.users.entity1.AppUser;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
import com.realnet.vpspack.Entity.Visa_Status;
|
||||
import com.realnet.vpspack.Services.Visa_StatusService;
|
||||
|
||||
|
||||
|
||||
import com.realnet.vpspack.Entity.Nationality;
|
||||
import com.realnet.vpspack.Services.NationalityService;
|
||||
|
||||
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class Visa_administrationService {
|
||||
@Autowired
|
||||
private Visa_administrationRepository Repository;
|
||||
@Autowired
|
||||
private AppUserServiceImpl userService;
|
||||
@Autowired
|
||||
private RealmService realmService;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Autowired
|
||||
private Visa_StatusService visa_statusserv;
|
||||
|
||||
@Autowired
|
||||
private NationalityService nationalityserv;
|
||||
|
||||
public Visa_administration Savedata(Visa_administration data) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (data.getVisa_status() != null) {
|
||||
Visa_Status get = visa_statusserv.getdetailsbyId(data.getVisa_status());
|
||||
data.setVisa_statusname(get.getName());
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (data.getNationality() != null) {
|
||||
Nationality get = nationalityserv.getdetailsbyId(data.getNationality());
|
||||
data.setNationalityname(get.getName());
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
data.setUpdatedBy(getUser().getUserId());
|
||||
data.setCreatedBy(getUser().getUserId());
|
||||
data.setAccountId(getUser().getAccount().getAccount_id());
|
||||
Visa_administration save = Repository.save(data);
|
||||
return save;
|
||||
}
|
||||
|
||||
|
||||
// get all with pagination
|
||||
public Page<Visa_administration> getAllWithPagination(Pageable page) {
|
||||
return Repository.findAll(page, getUser().getUserId());
|
||||
}
|
||||
public List<Visa_administration> getdetails() {
|
||||
List<Realm> realm = realmService.findByUserId(getUser().getUserId());
|
||||
List<Visa_administration> all = Repository.findAll(getUser().getUserId());
|
||||
|
||||
return all ; }
|
||||
|
||||
|
||||
public Visa_administration getdetailsbyId(Integer id) {
|
||||
return Repository.findById(id).get();
|
||||
}
|
||||
|
||||
|
||||
public void delete_by_id(Integer id) {
|
||||
Repository.deleteById(id);
|
||||
}
|
||||
|
||||
|
||||
public Visa_administration update(Visa_administration data,Integer id) {
|
||||
Visa_administration old = Repository.findById(id).get();
|
||||
old.setName(data.getName());
|
||||
|
||||
old.setDescription(data.getDescription());
|
||||
|
||||
old.setActive (data.isActive());
|
||||
|
||||
old.setEmails(data.getEmails());
|
||||
|
||||
old.setVisa_status(data.getVisa_status());
|
||||
|
||||
old.setNationality(data.getNationality());
|
||||
|
||||
final Visa_administration test = Repository.save(old);
|
||||
data.setUpdatedBy(getUser().getUserId());
|
||||
return test;}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public AppUser getUser() {
|
||||
AppUser user = userService.getLoggedInUser();
|
||||
return user;
|
||||
|
||||
}}
|
||||
@ -0,0 +1,387 @@
|
||||
package com.realnet.vpspack.Services;
|
||||
import com.realnet.vpspack.Repository.Visa_applicationRepository;
|
||||
import com.realnet.vpspack.Entity.Visa_application
|
||||
;import java.util.*;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import com.realnet.SequenceGenerator.Service.SequenceService;
|
||||
import org.springframework.data.domain.Page;
|
||||
import com.realnet.realm.Entity.Realm;
|
||||
import com.realnet.realm.Services.RealmService;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.*;
|
||||
import com.realnet.users.service1.AppUserServiceImpl;
|
||||
import com.realnet.users.entity1.AppUser;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
import com.realnet.vpspack.Entity.Visa_entry;
|
||||
import com.realnet.vpspack.Services.Visa_entryService;
|
||||
|
||||
|
||||
|
||||
import com.realnet.vpspack.Entity.Visa_duration;
|
||||
import com.realnet.vpspack.Services.Visa_durationService;
|
||||
|
||||
|
||||
|
||||
import com.realnet.vpspack.Entity.Visa_Processing;
|
||||
import com.realnet.vpspack.Services.Visa_ProcessingService;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
import com.realnet.vpspack.Entity.Gender;
|
||||
import com.realnet.vpspack.Services.GenderService;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
import com.realnet.vpspack.Entity.Referrer;
|
||||
import com.realnet.vpspack.Services.ReferrerService;
|
||||
|
||||
|
||||
|
||||
import com.realnet.vpspack.Entity.Nationality;
|
||||
import com.realnet.vpspack.Services.NationalityService;
|
||||
|
||||
|
||||
|
||||
import com.realnet.vpspack.Entity.Supplier;
|
||||
import com.realnet.vpspack.Services.SupplierService;
|
||||
|
||||
|
||||
|
||||
import com.realnet.vpspack.Entity.Agent;
|
||||
import com.realnet.vpspack.Services.AgentService;
|
||||
|
||||
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class Visa_applicationService {
|
||||
@Autowired
|
||||
private Visa_applicationRepository Repository;
|
||||
@Autowired
|
||||
private AppUserServiceImpl userService;
|
||||
@Autowired
|
||||
private RealmService realmService;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Autowired
|
||||
private Visa_entryService visa_entry_typeserv;
|
||||
|
||||
@Autowired
|
||||
private Visa_durationService visa_durationserv;
|
||||
|
||||
@Autowired
|
||||
private Visa_ProcessingService visa_processingserv;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Autowired
|
||||
private GenderService genderserv;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Autowired
|
||||
private ReferrerService referrerserv;
|
||||
|
||||
@Autowired
|
||||
private NationalityService nationalityserv;
|
||||
|
||||
@Autowired
|
||||
private SupplierService supplierserv;
|
||||
|
||||
@Autowired
|
||||
private AgentService agentserv;
|
||||
|
||||
public Visa_application Savedata(Visa_application data) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (data.getVisa_entry_type() != null) {
|
||||
Visa_entry get = visa_entry_typeserv.getdetailsbyId(data.getVisa_entry_type());
|
||||
data.setVisa_entry_typename(get.getName());
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (data.getVisa_duration() != null) {
|
||||
Visa_duration get = visa_durationserv.getdetailsbyId(data.getVisa_duration());
|
||||
data.setVisa_durationname(get.getName());
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (data.getVisa_processing() != null) {
|
||||
Visa_Processing get = visa_processingserv.getdetailsbyId(data.getVisa_processing());
|
||||
data.setVisa_processingname(get.getName());
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (data.getGender() != null) {
|
||||
Gender get = genderserv.getdetailsbyId(data.getGender());
|
||||
data.setGendername(get.getName());
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (data.getReferrer() != null) {
|
||||
Referrer get = referrerserv.getdetailsbyId(data.getReferrer());
|
||||
data.setReferrername(get.getName());
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (data.getNationality() != null) {
|
||||
Nationality get = nationalityserv.getdetailsbyId(data.getNationality());
|
||||
data.setNationalityname(get.getName());
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (data.getSupplier() != null) {
|
||||
Supplier get = supplierserv.getdetailsbyId(data.getSupplier());
|
||||
data.setSuppliername(get.getName());
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (data.getAgent() != null) {
|
||||
Agent get = agentserv.getdetailsbyId(data.getAgent());
|
||||
data.setAgentname(get.getName());
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
data.setUpdatedBy(getUser().getUserId());
|
||||
data.setCreatedBy(getUser().getUserId());
|
||||
data.setAccountId(getUser().getAccount().getAccount_id());
|
||||
Visa_application save = Repository.save(data);
|
||||
return save;
|
||||
}
|
||||
|
||||
|
||||
// get all with pagination
|
||||
public Page<Visa_application> getAllWithPagination(Pageable page) {
|
||||
return Repository.findAll(page, getUser().getUserId());
|
||||
}
|
||||
public List<Visa_application> getdetails() {
|
||||
List<Realm> realm = realmService.findByUserId(getUser().getUserId());
|
||||
List<Visa_application> all = Repository.findAll(getUser().getUserId());
|
||||
|
||||
return all ; }
|
||||
|
||||
|
||||
public Visa_application getdetailsbyId(Integer id) {
|
||||
return Repository.findById(id).get();
|
||||
}
|
||||
|
||||
|
||||
public void delete_by_id(Integer id) {
|
||||
Repository.deleteById(id);
|
||||
}
|
||||
|
||||
|
||||
public Visa_application update(Visa_application data,Integer id) {
|
||||
Visa_application old = Repository.findById(id).get();
|
||||
old.setName(data.getName());
|
||||
|
||||
old.setDescription(data.getDescription());
|
||||
|
||||
old.setActive (data.isActive());
|
||||
|
||||
old.setVisa_entry_type(data.getVisa_entry_type());
|
||||
|
||||
old.setVisa_duration(data.getVisa_duration());
|
||||
|
||||
old.setVisa_processing(data.getVisa_processing());
|
||||
|
||||
old.setTravel_start_date(data.getTravel_start_date());
|
||||
|
||||
old.setTravel_end_date(data.getTravel_end_date());
|
||||
|
||||
old.setPassport_number(data.getPassport_number());
|
||||
|
||||
old.setPassport_issue_date(data.getPassport_issue_date());
|
||||
|
||||
old.setPassport_expiry_date(data.getPassport_expiry_date());
|
||||
|
||||
old.setEmail(data.getEmail());
|
||||
|
||||
old.setPhone_number(data.getPhone_number());
|
||||
|
||||
old.setBirth_place(data.getBirth_place());
|
||||
|
||||
old.setDate_of_birth(data.getDate_of_birth());
|
||||
|
||||
old.setGender(data.getGender());
|
||||
|
||||
old.setProfession(data.getProfession());
|
||||
|
||||
old.setVisa_cost(data.getVisa_cost());
|
||||
|
||||
old.setReferrer(data.getReferrer());
|
||||
|
||||
old.setNationality(data.getNationality());
|
||||
|
||||
old.setSupplier(data.getSupplier());
|
||||
|
||||
old.setAgent(data.getAgent());
|
||||
|
||||
final Visa_application test = Repository.save(old);
|
||||
data.setUpdatedBy(getUser().getUserId());
|
||||
return test;}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public AppUser getUser() {
|
||||
AppUser user = userService.getLoggedInUser();
|
||||
return user;
|
||||
|
||||
}}
|
||||
@ -0,0 +1,103 @@
|
||||
package com.realnet.vpspack.Services;
|
||||
import com.realnet.vpspack.Repository.Visa_bundleRepository;
|
||||
import com.realnet.vpspack.Entity.Visa_bundle
|
||||
;import java.util.*;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import com.realnet.SequenceGenerator.Service.SequenceService;
|
||||
import org.springframework.data.domain.Page;
|
||||
import com.realnet.realm.Entity.Realm;
|
||||
import com.realnet.realm.Services.RealmService;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.*;
|
||||
import com.realnet.users.service1.AppUserServiceImpl;
|
||||
import com.realnet.users.entity1.AppUser;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class Visa_bundleService {
|
||||
@Autowired
|
||||
private Visa_bundleRepository Repository;
|
||||
@Autowired
|
||||
private AppUserServiceImpl userService;
|
||||
@Autowired
|
||||
private RealmService realmService;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public Visa_bundle Savedata(Visa_bundle data) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
data.setUpdatedBy(getUser().getUserId());
|
||||
data.setCreatedBy(getUser().getUserId());
|
||||
data.setAccountId(getUser().getAccount().getAccount_id());
|
||||
Visa_bundle save = Repository.save(data);
|
||||
return save;
|
||||
}
|
||||
|
||||
|
||||
// get all with pagination
|
||||
public Page<Visa_bundle> getAllWithPagination(Pageable page) {
|
||||
return Repository.findAll(page, getUser().getUserId());
|
||||
}
|
||||
public List<Visa_bundle> getdetails() {
|
||||
List<Realm> realm = realmService.findByUserId(getUser().getUserId());
|
||||
List<Visa_bundle> all = Repository.findAll(getUser().getUserId());
|
||||
|
||||
return all ; }
|
||||
|
||||
|
||||
public Visa_bundle getdetailsbyId(Integer id) {
|
||||
return Repository.findById(id).get();
|
||||
}
|
||||
|
||||
|
||||
public void delete_by_id(Integer id) {
|
||||
Repository.deleteById(id);
|
||||
}
|
||||
|
||||
|
||||
public Visa_bundle update(Visa_bundle data,Integer id) {
|
||||
Visa_bundle old = Repository.findById(id).get();
|
||||
old.setName(data.getName());
|
||||
|
||||
old.setDescription(data.getDescription());
|
||||
|
||||
old.setActive (data.isActive());
|
||||
|
||||
|
||||
|
||||
final Visa_bundle test = Repository.save(old);
|
||||
data.setUpdatedBy(getUser().getUserId());
|
||||
return test;}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public AppUser getUser() {
|
||||
AppUser user = userService.getLoggedInUser();
|
||||
return user;
|
||||
|
||||
}}
|
||||
@ -0,0 +1,93 @@
|
||||
package com.realnet.vpspack.Services;
|
||||
import com.realnet.vpspack.Repository.Visa_durationRepository;
|
||||
import com.realnet.vpspack.Entity.Visa_duration
|
||||
;import java.util.*;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import com.realnet.SequenceGenerator.Service.SequenceService;
|
||||
import org.springframework.data.domain.Page;
|
||||
import com.realnet.realm.Entity.Realm;
|
||||
import com.realnet.realm.Services.RealmService;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.*;
|
||||
import com.realnet.users.service1.AppUserServiceImpl;
|
||||
import com.realnet.users.entity1.AppUser;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class Visa_durationService {
|
||||
@Autowired
|
||||
private Visa_durationRepository Repository;
|
||||
@Autowired
|
||||
private AppUserServiceImpl userService;
|
||||
@Autowired
|
||||
private RealmService realmService;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public Visa_duration Savedata(Visa_duration data) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
data.setUpdatedBy(getUser().getUserId());
|
||||
data.setCreatedBy(getUser().getUserId());
|
||||
data.setAccountId(getUser().getAccount().getAccount_id());
|
||||
Visa_duration save = Repository.save(data);
|
||||
return save;
|
||||
}
|
||||
|
||||
|
||||
// get all with pagination
|
||||
public Page<Visa_duration> getAllWithPagination(Pageable page) {
|
||||
return Repository.findAll(page, getUser().getUserId());
|
||||
}
|
||||
public List<Visa_duration> getdetails() {
|
||||
List<Realm> realm = realmService.findByUserId(getUser().getUserId());
|
||||
List<Visa_duration> all = Repository.findAll(getUser().getUserId());
|
||||
|
||||
return all ; }
|
||||
|
||||
|
||||
public Visa_duration getdetailsbyId(Integer id) {
|
||||
return Repository.findById(id).get();
|
||||
}
|
||||
|
||||
|
||||
public void delete_by_id(Integer id) {
|
||||
Repository.deleteById(id);
|
||||
}
|
||||
|
||||
|
||||
public Visa_duration update(Visa_duration data,Integer id) {
|
||||
Visa_duration old = Repository.findById(id).get();
|
||||
old.setName(data.getName());
|
||||
|
||||
old.setDescription(data.getDescription());
|
||||
|
||||
old.setActive (data.isActive());
|
||||
|
||||
final Visa_duration test = Repository.save(old);
|
||||
data.setUpdatedBy(getUser().getUserId());
|
||||
return test;}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public AppUser getUser() {
|
||||
AppUser user = userService.getLoggedInUser();
|
||||
return user;
|
||||
|
||||
}}
|
||||
@ -0,0 +1,51 @@
|
||||
package com.realnet.vpspack.Services;
|
||||
import java.util.*;
|
||||
import com.realnet.vpspack.Repository.Visa_durationRepository;
|
||||
import com.realnet.vpspack.Entity.Visa_duration;
|
||||
|
||||
import com.realnet.vpspack.Entity.Visa_duration_ListFilter1;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class Visa_duration_ListFilter1Service {
|
||||
@Autowired
|
||||
private Visa_durationRepository Repository;
|
||||
|
||||
|
||||
|
||||
|
||||
public List<Visa_duration_ListFilter1> getlistbuilder() {
|
||||
List<Visa_duration> list= Repository.findAll();
|
||||
ArrayList<Visa_duration_ListFilter1> l = new ArrayList<>();
|
||||
for (Visa_duration data : list) {
|
||||
boolean isactive = data.isActive();
|
||||
|
||||
if (isactive) {{
|
||||
Visa_duration_ListFilter1 dummy = new Visa_duration_ListFilter1();
|
||||
dummy.setId(data.getId());
|
||||
dummy.setName(data.getName());
|
||||
l.add(dummy);
|
||||
}}
|
||||
}
|
||||
return l;}
|
||||
|
||||
|
||||
|
||||
public List<Visa_duration_ListFilter1> getlistbuilderparam( ) {
|
||||
List<Visa_duration> list= Repository.findAll();
|
||||
ArrayList<Visa_duration_ListFilter1> l = new ArrayList<>();
|
||||
for (Visa_duration data : list) {
|
||||
boolean isactive = data.isActive();
|
||||
|
||||
if (isactive) {{
|
||||
Visa_duration_ListFilter1 dummy = new Visa_duration_ListFilter1();
|
||||
dummy.setId(data.getId());
|
||||
dummy.setName(data.getName());
|
||||
l.add(dummy);
|
||||
}}
|
||||
}
|
||||
return l;}
|
||||
}
|
||||
@ -0,0 +1,93 @@
|
||||
package com.realnet.vpspack.Services;
|
||||
import com.realnet.vpspack.Repository.Visa_entryRepository;
|
||||
import com.realnet.vpspack.Entity.Visa_entry
|
||||
;import java.util.*;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import com.realnet.SequenceGenerator.Service.SequenceService;
|
||||
import org.springframework.data.domain.Page;
|
||||
import com.realnet.realm.Entity.Realm;
|
||||
import com.realnet.realm.Services.RealmService;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.*;
|
||||
import com.realnet.users.service1.AppUserServiceImpl;
|
||||
import com.realnet.users.entity1.AppUser;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class Visa_entryService {
|
||||
@Autowired
|
||||
private Visa_entryRepository Repository;
|
||||
@Autowired
|
||||
private AppUserServiceImpl userService;
|
||||
@Autowired
|
||||
private RealmService realmService;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public Visa_entry Savedata(Visa_entry data) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
data.setUpdatedBy(getUser().getUserId());
|
||||
data.setCreatedBy(getUser().getUserId());
|
||||
data.setAccountId(getUser().getAccount().getAccount_id());
|
||||
Visa_entry save = Repository.save(data);
|
||||
return save;
|
||||
}
|
||||
|
||||
|
||||
// get all with pagination
|
||||
public Page<Visa_entry> getAllWithPagination(Pageable page) {
|
||||
return Repository.findAll(page, getUser().getUserId());
|
||||
}
|
||||
public List<Visa_entry> getdetails() {
|
||||
List<Realm> realm = realmService.findByUserId(getUser().getUserId());
|
||||
List<Visa_entry> all = Repository.findAll(getUser().getUserId());
|
||||
|
||||
return all ; }
|
||||
|
||||
|
||||
public Visa_entry getdetailsbyId(Integer id) {
|
||||
return Repository.findById(id).get();
|
||||
}
|
||||
|
||||
|
||||
public void delete_by_id(Integer id) {
|
||||
Repository.deleteById(id);
|
||||
}
|
||||
|
||||
|
||||
public Visa_entry update(Visa_entry data,Integer id) {
|
||||
Visa_entry old = Repository.findById(id).get();
|
||||
old.setName(data.getName());
|
||||
|
||||
old.setDescription(data.getDescription());
|
||||
|
||||
old.setActive (data.isActive());
|
||||
|
||||
final Visa_entry test = Repository.save(old);
|
||||
data.setUpdatedBy(getUser().getUserId());
|
||||
return test;}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public AppUser getUser() {
|
||||
AppUser user = userService.getLoggedInUser();
|
||||
return user;
|
||||
|
||||
}}
|
||||
@ -0,0 +1,51 @@
|
||||
package com.realnet.vpspack.Services;
|
||||
import java.util.*;
|
||||
import com.realnet.vpspack.Repository.Visa_entryRepository;
|
||||
import com.realnet.vpspack.Entity.Visa_entry;
|
||||
|
||||
import com.realnet.vpspack.Entity.Visa_entry_ListFilter1;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class Visa_entry_ListFilter1Service {
|
||||
@Autowired
|
||||
private Visa_entryRepository Repository;
|
||||
|
||||
|
||||
|
||||
|
||||
public List<Visa_entry_ListFilter1> getlistbuilder() {
|
||||
List<Visa_entry> list= Repository.findAll();
|
||||
ArrayList<Visa_entry_ListFilter1> l = new ArrayList<>();
|
||||
for (Visa_entry data : list) {
|
||||
boolean isactive = data.isActive();
|
||||
|
||||
if (isactive) {{
|
||||
Visa_entry_ListFilter1 dummy = new Visa_entry_ListFilter1();
|
||||
dummy.setId(data.getId());
|
||||
dummy.setName(data.getName());
|
||||
l.add(dummy);
|
||||
}}
|
||||
}
|
||||
return l;}
|
||||
|
||||
|
||||
|
||||
public List<Visa_entry_ListFilter1> getlistbuilderparam( ) {
|
||||
List<Visa_entry> list= Repository.findAll();
|
||||
ArrayList<Visa_entry_ListFilter1> l = new ArrayList<>();
|
||||
for (Visa_entry data : list) {
|
||||
boolean isactive = data.isActive();
|
||||
|
||||
if (isactive) {{
|
||||
Visa_entry_ListFilter1 dummy = new Visa_entry_ListFilter1();
|
||||
dummy.setId(data.getId());
|
||||
dummy.setName(data.getName());
|
||||
l.add(dummy);
|
||||
}}
|
||||
}
|
||||
return l;}
|
||||
}
|
||||
@ -0,0 +1,182 @@
|
||||
package com.realnet.vpspack.Services;
|
||||
import com.realnet.vpspack.Repository.Visa_pricesRepository;
|
||||
import com.realnet.vpspack.Entity.Visa_prices
|
||||
;import java.util.*;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import com.realnet.SequenceGenerator.Service.SequenceService;
|
||||
import org.springframework.data.domain.Page;
|
||||
import com.realnet.realm.Entity.Realm;
|
||||
import com.realnet.realm.Services.RealmService;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.*;
|
||||
import com.realnet.users.service1.AppUserServiceImpl;
|
||||
import com.realnet.users.entity1.AppUser;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
import com.realnet.vpspack.Entity.Visa_entry;
|
||||
import com.realnet.vpspack.Services.Visa_entryService;
|
||||
|
||||
|
||||
|
||||
import com.realnet.vpspack.Entity.Visa_duration;
|
||||
import com.realnet.vpspack.Services.Visa_durationService;
|
||||
|
||||
|
||||
|
||||
import com.realnet.vpspack.Entity.Visa_Processing;
|
||||
import com.realnet.vpspack.Services.Visa_ProcessingService;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class Visa_pricesService {
|
||||
@Autowired
|
||||
private Visa_pricesRepository Repository;
|
||||
@Autowired
|
||||
private AppUserServiceImpl userService;
|
||||
@Autowired
|
||||
private RealmService realmService;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Autowired
|
||||
private Visa_entryService visa_entry_typeserv;
|
||||
|
||||
@Autowired
|
||||
private Visa_durationService visa_durationserv;
|
||||
|
||||
@Autowired
|
||||
private Visa_ProcessingService visa_processingserv;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public Visa_prices Savedata(Visa_prices data) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (data.getVisa_entry_type() != null) {
|
||||
Visa_entry get = visa_entry_typeserv.getdetailsbyId(data.getVisa_entry_type());
|
||||
data.setVisa_entry_typename(get.getName());
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (data.getVisa_duration() != null) {
|
||||
Visa_duration get = visa_durationserv.getdetailsbyId(data.getVisa_duration());
|
||||
data.setVisa_durationname(get.getName());
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (data.getVisa_processing() != null) {
|
||||
Visa_Processing get = visa_processingserv.getdetailsbyId(data.getVisa_processing());
|
||||
data.setVisa_processingname(get.getName());
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
data.setUpdatedBy(getUser().getUserId());
|
||||
data.setCreatedBy(getUser().getUserId());
|
||||
data.setAccountId(getUser().getAccount().getAccount_id());
|
||||
Visa_prices save = Repository.save(data);
|
||||
return save;
|
||||
}
|
||||
|
||||
|
||||
// get all with pagination
|
||||
public Page<Visa_prices> getAllWithPagination(Pageable page) {
|
||||
return Repository.findAll(page, getUser().getUserId());
|
||||
}
|
||||
public List<Visa_prices> getdetails() {
|
||||
List<Realm> realm = realmService.findByUserId(getUser().getUserId());
|
||||
List<Visa_prices> all = Repository.findAll(getUser().getUserId());
|
||||
|
||||
return all ; }
|
||||
|
||||
|
||||
public Visa_prices getdetailsbyId(Integer id) {
|
||||
return Repository.findById(id).get();
|
||||
}
|
||||
|
||||
|
||||
public void delete_by_id(Integer id) {
|
||||
Repository.deleteById(id);
|
||||
}
|
||||
|
||||
|
||||
public Visa_prices update(Visa_prices data,Integer id) {
|
||||
Visa_prices old = Repository.findById(id).get();
|
||||
old.setName(data.getName());
|
||||
|
||||
old.setDescription(data.getDescription());
|
||||
|
||||
old.setActive (data.isActive());
|
||||
|
||||
old.setVisa_entry_type(data.getVisa_entry_type());
|
||||
|
||||
old.setVisa_duration(data.getVisa_duration());
|
||||
|
||||
old.setVisa_processing(data.getVisa_processing());
|
||||
|
||||
old.setTotal_price(data.getTotal_price());
|
||||
|
||||
old.setCost(data.getCost());
|
||||
|
||||
final Visa_prices test = Repository.save(old);
|
||||
data.setUpdatedBy(getUser().getUserId());
|
||||
return test;}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public AppUser getUser() {
|
||||
AppUser user = userService.getLoggedInUser();
|
||||
return user;
|
||||
|
||||
}}
|
||||
@ -0,0 +1,93 @@
|
||||
package com.realnet.vpspack.Services;
|
||||
import com.realnet.vpspack.Repository.Visa_processingRepository;
|
||||
import com.realnet.vpspack.Entity.Visa_processing
|
||||
;import java.util.*;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import com.realnet.SequenceGenerator.Service.SequenceService;
|
||||
import org.springframework.data.domain.Page;
|
||||
import com.realnet.realm.Entity.Realm;
|
||||
import com.realnet.realm.Services.RealmService;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.*;
|
||||
import com.realnet.users.service1.AppUserServiceImpl;
|
||||
import com.realnet.users.entity1.AppUser;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class Visa_processingService {
|
||||
@Autowired
|
||||
private Visa_processingRepository Repository;
|
||||
@Autowired
|
||||
private AppUserServiceImpl userService;
|
||||
@Autowired
|
||||
private RealmService realmService;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public Visa_processing Savedata(Visa_processing data) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
data.setUpdatedBy(getUser().getUserId());
|
||||
data.setCreatedBy(getUser().getUserId());
|
||||
data.setAccountId(getUser().getAccount().getAccount_id());
|
||||
Visa_processing save = Repository.save(data);
|
||||
return save;
|
||||
}
|
||||
|
||||
|
||||
// get all with pagination
|
||||
public Page<Visa_processing> getAllWithPagination(Pageable page) {
|
||||
return Repository.findAll(page, getUser().getUserId());
|
||||
}
|
||||
public List<Visa_processing> getdetails() {
|
||||
List<Realm> realm = realmService.findByUserId(getUser().getUserId());
|
||||
List<Visa_processing> all = Repository.findAll(getUser().getUserId());
|
||||
|
||||
return all ; }
|
||||
|
||||
|
||||
public Visa_processing getdetailsbyId(Integer id) {
|
||||
return Repository.findById(id).get();
|
||||
}
|
||||
|
||||
|
||||
public void delete_by_id(Integer id) {
|
||||
Repository.deleteById(id);
|
||||
}
|
||||
|
||||
|
||||
public Visa_processing update(Visa_processing data,Integer id) {
|
||||
Visa_processing old = Repository.findById(id).get();
|
||||
old.setName(data.getName());
|
||||
|
||||
old.setDescription(data.getDescription());
|
||||
|
||||
old.setActive (data.isActive());
|
||||
|
||||
final Visa_processing test = Repository.save(old);
|
||||
data.setUpdatedBy(getUser().getUserId());
|
||||
return test;}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public AppUser getUser() {
|
||||
AppUser user = userService.getLoggedInUser();
|
||||
return user;
|
||||
|
||||
}}
|
||||
@ -0,0 +1,51 @@
|
||||
package com.realnet.vpspack.Services;
|
||||
import java.util.*;
|
||||
import com.realnet.vpspack.Repository.Visa_processingRepository;
|
||||
import com.realnet.vpspack.Entity.Visa_processing;
|
||||
|
||||
import com.realnet.vpspack.Entity.Visa_processing_ListFilter1;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class Visa_processing_ListFilter1Service {
|
||||
@Autowired
|
||||
private Visa_processingRepository Repository;
|
||||
|
||||
|
||||
|
||||
|
||||
public List<Visa_processing_ListFilter1> getlistbuilder() {
|
||||
List<Visa_processing> list= Repository.findAll();
|
||||
ArrayList<Visa_processing_ListFilter1> l = new ArrayList<>();
|
||||
for (Visa_processing data : list) {
|
||||
boolean isactive = data.isActive();
|
||||
|
||||
if (isactive) {{
|
||||
Visa_processing_ListFilter1 dummy = new Visa_processing_ListFilter1();
|
||||
dummy.setId(data.getId());
|
||||
dummy.setName(data.getName());
|
||||
l.add(dummy);
|
||||
}}
|
||||
}
|
||||
return l;}
|
||||
|
||||
|
||||
|
||||
public List<Visa_processing_ListFilter1> getlistbuilderparam( ) {
|
||||
List<Visa_processing> list= Repository.findAll();
|
||||
ArrayList<Visa_processing_ListFilter1> l = new ArrayList<>();
|
||||
for (Visa_processing data : list) {
|
||||
boolean isactive = data.isActive();
|
||||
|
||||
if (isactive) {{
|
||||
Visa_processing_ListFilter1 dummy = new Visa_processing_ListFilter1();
|
||||
dummy.setId(data.getId());
|
||||
dummy.setName(data.getName());
|
||||
l.add(dummy);
|
||||
}}
|
||||
}
|
||||
return l;}
|
||||
}
|
||||
@ -0,0 +1,93 @@
|
||||
package com.realnet.vpspack.Services;
|
||||
import com.realnet.vpspack.Repository.Visa_statusRepository;
|
||||
import com.realnet.vpspack.Entity.Visa_status
|
||||
;import java.util.*;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import com.realnet.SequenceGenerator.Service.SequenceService;
|
||||
import org.springframework.data.domain.Page;
|
||||
import com.realnet.realm.Entity.Realm;
|
||||
import com.realnet.realm.Services.RealmService;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.*;
|
||||
import com.realnet.users.service1.AppUserServiceImpl;
|
||||
import com.realnet.users.entity1.AppUser;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class Visa_statusService {
|
||||
@Autowired
|
||||
private Visa_statusRepository Repository;
|
||||
@Autowired
|
||||
private AppUserServiceImpl userService;
|
||||
@Autowired
|
||||
private RealmService realmService;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public Visa_status Savedata(Visa_status data) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
data.setUpdatedBy(getUser().getUserId());
|
||||
data.setCreatedBy(getUser().getUserId());
|
||||
data.setAccountId(getUser().getAccount().getAccount_id());
|
||||
Visa_status save = Repository.save(data);
|
||||
return save;
|
||||
}
|
||||
|
||||
|
||||
// get all with pagination
|
||||
public Page<Visa_status> getAllWithPagination(Pageable page) {
|
||||
return Repository.findAll(page, getUser().getUserId());
|
||||
}
|
||||
public List<Visa_status> getdetails() {
|
||||
List<Realm> realm = realmService.findByUserId(getUser().getUserId());
|
||||
List<Visa_status> all = Repository.findAll(getUser().getUserId());
|
||||
|
||||
return all ; }
|
||||
|
||||
|
||||
public Visa_status getdetailsbyId(Integer id) {
|
||||
return Repository.findById(id).get();
|
||||
}
|
||||
|
||||
|
||||
public void delete_by_id(Integer id) {
|
||||
Repository.deleteById(id);
|
||||
}
|
||||
|
||||
|
||||
public Visa_status update(Visa_status data,Integer id) {
|
||||
Visa_status old = Repository.findById(id).get();
|
||||
old.setName(data.getName());
|
||||
|
||||
old.setDescription(data.getDescription());
|
||||
|
||||
old.setActive (data.isActive());
|
||||
|
||||
final Visa_status test = Repository.save(old);
|
||||
data.setUpdatedBy(getUser().getUserId());
|
||||
return test;}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public AppUser getUser() {
|
||||
AppUser user = userService.getLoggedInUser();
|
||||
return user;
|
||||
|
||||
}}
|
||||
@ -0,0 +1,51 @@
|
||||
package com.realnet.vpspack.Services;
|
||||
import java.util.*;
|
||||
import com.realnet.vpspack.Repository.Visa_statusRepository;
|
||||
import com.realnet.vpspack.Entity.Visa_status;
|
||||
|
||||
import com.realnet.vpspack.Entity.Visa_status_ListFilter1;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class Visa_status_ListFilter1Service {
|
||||
@Autowired
|
||||
private Visa_statusRepository Repository;
|
||||
|
||||
|
||||
|
||||
|
||||
public List<Visa_status_ListFilter1> getlistbuilder() {
|
||||
List<Visa_status> list= Repository.findAll();
|
||||
ArrayList<Visa_status_ListFilter1> l = new ArrayList<>();
|
||||
for (Visa_status data : list) {
|
||||
boolean isactive = data.isActive();
|
||||
|
||||
if (isactive) {{
|
||||
Visa_status_ListFilter1 dummy = new Visa_status_ListFilter1();
|
||||
dummy.setId(data.getId());
|
||||
dummy.setName(data.getName());
|
||||
l.add(dummy);
|
||||
}}
|
||||
}
|
||||
return l;}
|
||||
|
||||
|
||||
|
||||
public List<Visa_status_ListFilter1> getlistbuilderparam( ) {
|
||||
List<Visa_status> list= Repository.findAll();
|
||||
ArrayList<Visa_status_ListFilter1> l = new ArrayList<>();
|
||||
for (Visa_status data : list) {
|
||||
boolean isactive = data.isActive();
|
||||
|
||||
if (isactive) {{
|
||||
Visa_status_ListFilter1 dummy = new Visa_status_ListFilter1();
|
||||
dummy.setId(data.getId());
|
||||
dummy.setName(data.getName());
|
||||
l.add(dummy);
|
||||
}}
|
||||
}
|
||||
return l;}
|
||||
}
|
||||
@ -2,14 +2,14 @@
|
||||
|
||||
export const LoginEnvironment = {
|
||||
|
||||
"templateNo": "<templateNo>",
|
||||
"loginHeading": "<loginHeading>",
|
||||
"loginHeading2": "<loginHeading2>",
|
||||
"isSignup": "<isSignup>",
|
||||
"loginSignup": "<loginSignup> ",
|
||||
"loginSignup2": "<loginSignup2>",
|
||||
"loginForgotpass": "<loginForgotpass>",
|
||||
"loginImage": "<loginImage>",
|
||||
"loginImageURL": "<loginImageURL>"
|
||||
"templateNo": "Template 1",
|
||||
"loginHeading": "Welcome to",
|
||||
"loginHeading2": "io8.dev",
|
||||
"isSignup": "true",
|
||||
"loginSignup": "Use your ID to sign in OR ",
|
||||
"loginSignup2": "create one now",
|
||||
"loginForgotpass": "FORGOT PASSWORD?",
|
||||
"loginImage": "[]",
|
||||
"loginImageURL": "null"
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,382 @@
|
||||
<ol class="breadcrumb breadcrumb-arrow font-trirong">
|
||||
<li><a href="javascript://"> Agent</a></li>
|
||||
</ol>
|
||||
<div class="dg-wrapper">
|
||||
<div class="clr-row">
|
||||
<div class="clr-col-8">
|
||||
<h3>Agent </h3>
|
||||
</div>
|
||||
<div class="clr-col-4" style="text-align: right;">
|
||||
<button *ngIf="cardButton" id="add" class="btn btn-primary btn-icon" (click)="changeView()" >
|
||||
<clr-icon *ngIf="!isCardview" shape="grid-view"></clr-icon> <clr-icon *ngIf="isCardview" shape="bars"></clr-icon>
|
||||
</button>
|
||||
<!-- upload and download template -->
|
||||
<button class="btn btn-outline" (click)="goToDataM()">
|
||||
Upload
|
||||
</button>
|
||||
<button class="btn btn-outline" (click)="downloadCSV(tableName)" >
|
||||
<clr-icon shape="export" ></clr-icon> Download
|
||||
</button>
|
||||
<!-- upload and download template end here--> <!-- button -->
|
||||
<button id="add" class="btn btn-primary" (click)="goToAdd(product)" >
|
||||
<clr-icon shape="plus"></clr-icon>ADD
|
||||
</button>
|
||||
</div></div>
|
||||
<ng-container *ngIf="!isCardview"> <!-- GET ALL --> <clr-datagrid [clrDgLoading]="loading" [(clrDgSelected)]="selected">
|
||||
<clr-dg-placeholder>
|
||||
<ng-template #loadingSpinner>
|
||||
<clr-spinner>Loading ... </clr-spinner>
|
||||
</ng-template>
|
||||
<div *ngIf="error;else loadingSpinner">{{error}}</div>
|
||||
</clr-dg-placeholder>
|
||||
|
||||
<clr-dg-column [clrDgField]="' name'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Name
|
||||
</ng-container></clr-dg-column>
|
||||
|
||||
|
||||
<clr-dg-column [clrDgField]="' description'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Description
|
||||
</ng-container></clr-dg-column>
|
||||
|
||||
|
||||
<clr-dg-column [clrDgField]="' active'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Active
|
||||
</ng-container></clr-dg-column>
|
||||
|
||||
|
||||
<!-- who column -->
|
||||
<clr-dg-column> <ng-container *clrDgHideableColumn="{hidden: false}">
|
||||
<clr-icon shape="bars"></clr-icon> Action
|
||||
</ng-container></clr-dg-column>
|
||||
<!-- end -->
|
||||
|
||||
<clr-dg-row *clrDgItems="let user of product" [clrDgItem]="user">
|
||||
|
||||
<clr-dg-cell>{{user. name }}</clr-dg-cell>
|
||||
|
||||
|
||||
<clr-dg-cell (click)="goToReplaceStringdescription (user.description)" style="cursor: pointer; align-items: center;"><clr-icon shape="details"></clr-icon>
|
||||
</clr-dg-cell>
|
||||
|
||||
|
||||
<clr-dg-cell>{{user. active }}</clr-dg-cell>
|
||||
|
||||
|
||||
<!-- who column -->
|
||||
<clr-dg-cell>
|
||||
<clr-signpost>
|
||||
<span style="cursor: pointer;" clrSignpostTrigger><clr-icon shape="help" class="success" style="color: rgb(0, 130, 236);"></clr-icon></span>
|
||||
<clr-signpost-content [clrPosition]="'left-middle'" *clrIfOpen>
|
||||
<h5 style="margin-top: 0">Who Column</h5>
|
||||
<div>Account ID: <code class="clr-code">{{user.accountId}}</code></div>
|
||||
<div>Created At: <code class="clr-code">{{user.createdAt| date}}</code></div>
|
||||
<div>Created By: <code class="clr-code">{{user.createdBy}}</code></div>
|
||||
<div>Updated At: <code class="clr-code">{{user.updatedAt | date}}</code></div>
|
||||
<div>Updated By: <code class="clr-code">{{user.updatedBy}}</code></div>
|
||||
</clr-signpost-content>
|
||||
</clr-signpost>
|
||||
</clr-dg-cell>
|
||||
|
||||
<!-- who colmn -->
|
||||
|
||||
<clr-dg-action-overflow>
|
||||
<button class="action-item" (click)="onEdit(user)">Edit</button>
|
||||
<button class="action-item" (click)="onDelete(user)">Delete</button>
|
||||
</clr-dg-action-overflow>
|
||||
</clr-dg-row>
|
||||
<clr-dg-footer>
|
||||
<clr-dg-pagination #pagination [clrDgPageSize]="10">
|
||||
<clr-dg-page-size [clrPageSizeOptions]="[10,20,50,100]">Users per page</clr-dg-page-size>
|
||||
{{pagination.firstItem + 1}} - {{pagination.lastItem + 1}}
|
||||
of {{pagination.totalItems}} users
|
||||
</clr-dg-pagination>
|
||||
</clr-dg-footer>
|
||||
</clr-datagrid> </ng-container>
|
||||
<ng-template #showInfo>
|
||||
<div class="alert alert-info" role="alert">
|
||||
<div class="alert-items">
|
||||
<div class="alert-item static">
|
||||
<span class="alert-text">
|
||||
<clr-icon class="alert-icon" shape="info-circle"></clr-icon>
|
||||
Data could be found. Loading..
|
||||
<clr-spinner [clrMedium]="true">Loading ...</clr-spinner>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template><ng-container *ngIf="isCardview">
|
||||
<div *ngIf="product; else showInfo" class="clr-row clr-align-items-start clr-justify-content-start">
|
||||
<div *ngFor="let app of product| filter:search; let index = i" class="clr-col-auto" >
|
||||
<div class="clr-row">
|
||||
<div class="clr-col-lg-12 clr-col-md-4 clr-col-sm-4 clr-col-12" style="width: 410px;">
|
||||
<div class="card" style="padding: 10px; "[style.background-color]="cardmodal.cardColor !== '' ? cardmodal.cardColor : 'white'">
|
||||
<div class="card-body" style="display: grid; grid-template-columns: repeat(13, 1fr); grid-template-rows: repeat(7, 1fr); gap: 5px;">
|
||||
<ng-container *ngFor="let item of dashboardArray">
|
||||
<div [style.gridColumn]="item.x + 1" [style.gridRow]="item.y + 1" [style.gridColumnEnd]="item.x + item.cols + 1"
|
||||
[style.gridRowEnd]="item.y + item.rows + 1">
|
||||
<div *ngIf="item.name === 'textField'" class="title-card card-title"
|
||||
[style.text-align]="item.alignment !== '' ? item.alignment : 'left'"
|
||||
[style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'"
|
||||
[style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'"
|
||||
[style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'"
|
||||
[style.font-style]="item.italic == true ? 'Italic' : 'normal'"
|
||||
[style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :
|
||||
(item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))"
|
||||
[style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'"
|
||||
[style.color]="item.textcolor !== '' ? item.textcolor : 'black'" [style.background-color]="item.conditionValue == app[transform(item.fieldtext) ] ? item.conditionbackgroundcolor : item.backgroundcolor"
|
||||
[style.color]="item.conditionValue == app[transform(item.fieldtext) ] ? item.conditiontextcolor : item.textcolor">
|
||||
{{beforeText(item.fieldtext)}}
|
||||
{{ app[transform(item.fieldtext) ] }}
|
||||
{{afterText(item.fieldtext)}}
|
||||
</div>
|
||||
|
||||
<div *ngIf="item.name === 'dateField'" class="title-card card-title"
|
||||
[style.text-align]="item.alignment !== '' ? item.alignment : 'left'"
|
||||
[style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'"
|
||||
[style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'"
|
||||
[style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'"
|
||||
[style.font-style]="item.italic == true ? 'Italic' : 'normal'"
|
||||
[style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :
|
||||
(item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))"
|
||||
[style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'"
|
||||
[style.color]="item.textcolor !== '' ? item.textcolor : 'black'" [style.background-color]="item.conditionValue == app[transform(item.fieldtext) ] ? item.conditionbackgroundcolor : item.backgroundcolor"
|
||||
[style.color]="item.conditionValue == app[transform(item.fieldtext) ] ? item.conditiontextcolor : item.textcolor">
|
||||
{{beforeText(item.fieldtext)}}
|
||||
{{ app[transform(item.fieldtext) ] | date}}
|
||||
{{afterText(item.fieldtext)}}
|
||||
</div>
|
||||
<div *ngIf="item.name === 'numberField'" class="title-card card-title"
|
||||
[style.text-align]="item.alignment !== '' ? item.alignment : 'left'"
|
||||
[style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'"
|
||||
[style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'"
|
||||
[style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'"
|
||||
[style.font-style]="item.italic == true ? 'Italic' : 'normal'"
|
||||
[style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :
|
||||
(item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))"
|
||||
[style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'"
|
||||
[style.color]="item.textcolor !== '' ? item.textcolor : 'black'" [style.background-color]="item.conditionValue == app[transform(item.fieldtext) ] ? item.conditionbackgroundcolor : item.backgroundcolor"
|
||||
[style.color]="item.conditionValue == app[transform(item.fieldtext) ] ? item.conditiontextcolor : item.textcolor">
|
||||
{{beforeText(item.fieldtext)}}
|
||||
{{ app[transform(item.fieldtext) ]}}
|
||||
{{afterText(item.fieldtext)}}
|
||||
</div>
|
||||
|
||||
<div *ngIf="item.name === 'Line'" class="title-card card-title"
|
||||
[style.text-align]="item.alignment !== '' ? item.alignment : 'left'"
|
||||
[style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'"
|
||||
[style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'"
|
||||
[style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'"
|
||||
[style.font-style]="item.italic == true ? 'Italic' : 'normal'"
|
||||
[style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :
|
||||
(item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))"
|
||||
[style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'"
|
||||
[style.color]="item.textcolor !== '' ? item.textcolor : 'black'">
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
|
||||
<div *ngIf="item.name === 'Icon'" class="icon-card"
|
||||
[style.text-align]="item.alignment !== '' ? item.alignment : 'left'"
|
||||
[style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'"
|
||||
[style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'"
|
||||
[style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'"
|
||||
[style.font-style]="item.italic == true ? 'Italic' : 'normal'"
|
||||
[style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :
|
||||
(item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))"
|
||||
[style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'"
|
||||
[style.color]="item.textcolor !== '' ? item.textcolor : 'black'"
|
||||
>
|
||||
<clr-icon [attr.shape]="item.iconName"></clr-icon>
|
||||
</div>
|
||||
|
||||
<div *ngIf="item.name == 'Image'"
|
||||
[style.text-align]="item.alignment !== '' ? item.alignment : 'left'"
|
||||
[style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'"
|
||||
[style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'"
|
||||
[style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'"
|
||||
[style.font-style]="item.italic == true ? 'Italic' : 'normal'"
|
||||
[style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :
|
||||
(item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))"
|
||||
[style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'"
|
||||
[style.color]="item.textcolor !== '' ? item.textcolor : 'black'"
|
||||
[style.background-color]="item.conditionValue == app[transform(item.fieldtext) ] ? item.conditionbackgroundcolor : item.backgroundcolor"
|
||||
[style.color]="item.conditionValue == app[transform(item.fieldtext) ] ? item.conditiontextcolor : item.textcolor"> <img id="filePreview" [src]="item.imageURL" alt="File Preview"
|
||||
[style.width]="item.imagewidth !== '' ? item.imagewidth + 'px' : '100px'"
|
||||
[style.height]="item.imagewidth !== '' ? item.imagewidth + 'px' : '100px'"></div>
|
||||
</div>
|
||||
</ng-container>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<clr-modal [(clrModalOpen)]="rsModaldescription" [clrModalSize]="'xl'" [clrModalStaticBackdrop]="true">
|
||||
<div class="modal-body">
|
||||
<textarea class="form-control" style="width:100%; height: 400px;" readonly>{{rowSelected}}</textarea>
|
||||
</div></clr-modal>
|
||||
|
||||
|
||||
|
||||
<!-- // EDIT DATA......... -->
|
||||
<clr-modal [(clrModalOpen)]="modalEdit" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true">
|
||||
<h3 class="modal-title">Update Agent <!--update button -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</h3>
|
||||
<div class="modal-body" *ngIf="rowSelected.id">
|
||||
<h2 class="heading">{{rowSelected.id}}</h2>
|
||||
<!-- button -->
|
||||
<form >
|
||||
<div class="clr-row">
|
||||
<div class="clr-col-sm-12">
|
||||
<label>Name</label>
|
||||
<input class="clr-input" type="text" [(ngModel)]="rowSelected.name" name="name" />
|
||||
</div>
|
||||
|
||||
<div class="clr-col-sm-12">
|
||||
<label> Description</label>
|
||||
<textarea cols="10" rows="2"[(ngModel)]="rowSelected.description" name="description " placeholder="Textarea"> </textarea>
|
||||
</div>
|
||||
|
||||
<div class="clr-col-sm-12">
|
||||
<label> Active</label>
|
||||
<input type="checkbox" name="active" clrToggle [(ngModel)]="rowSelected.active" /> </div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- form code start -->
|
||||
<div *ngIf="checkFormCode">
|
||||
<h4 style="font-weight: 300;display: inline;">Extension</h4>
|
||||
<br>
|
||||
<hr>
|
||||
<div class="clr-row">
|
||||
<div class="clr-col-4" *ngFor="let field of additionalFieldsFromBackend">
|
||||
<ng-container *ngIf="field.formCode === formcode" [ngSwitch]="field.fieldType">
|
||||
<!-- Text Input --> <label *ngSwitchCase="'text'">{{ field.fieldName }}</label>
|
||||
<input *ngSwitchCase="'text'" [type]="field.fieldType" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]" class="clr-input" />
|
||||
|
||||
<!-- Date Input --> <label *ngSwitchCase="'date'">{{ field.fieldName }}</label>
|
||||
<input *ngSwitchCase="'date'" [type]="field.fieldType" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]" class="clr-input" />
|
||||
|
||||
<!-- Textarea --> <label *ngSwitchCase="'textarea'">{{ field.fieldName }}</label>
|
||||
<textarea *ngSwitchCase="'textarea'" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]" col="10" row="2"></textarea>
|
||||
|
||||
<!-- Checkbox --> <label *ngSwitchCase="'checkbox'">{{ field.fieldName }}</label><br>
|
||||
<input *ngSwitchCase="'checkbox'" [type]="field.fieldType" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]" class="clr-checkbox" />
|
||||
</ng-container>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- form code end --> <div class="modal-footer">
|
||||
<button type="button" class="btn btn-outline" (click)="modalEdit = false">Cancel</button>
|
||||
<button type="submit" class="btn btn-primary" (click)="onUpdate(rowSelected.id)">Update</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</clr-modal>
|
||||
<clr-modal [(clrModalOpen)]="modaldelete" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true">
|
||||
<div class="modal-body" *ngIf="rowSelected.id">
|
||||
<h1 class="delete">Are You Sure Want to delete?</h1>
|
||||
<h2 class="heading">{{rowSelected.id}}</h2>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-outline" (click)="modaldelete = false">Cancel</button>
|
||||
<button type="button" (click)="delete(rowSelected.id)" class="btn btn-primary" >Delete</button>
|
||||
</div>
|
||||
</div>
|
||||
</clr-modal>
|
||||
<!-- ADD FORM ..... -->
|
||||
<clr-modal [(clrModalOpen)]="modalAdd" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true">
|
||||
<h3 class="modal-title">Add Agent
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- aeroplane icon -->
|
||||
|
||||
<a *ngIf="userrole.includes('ROLE_ADMIN')" style="float: right;" href="javascript:void(0)" role="tooltip" aria-haspopup="true"
|
||||
class="tooltip tooltip-sm tooltip-bottom-left">
|
||||
<a id="build_extension" [routerLink]="['../extension/all']" [queryParams]="{ formCode: 'Agent_formCode' }">
|
||||
<clr-icon shape="airplane" size="32"></clr-icon>
|
||||
</a>
|
||||
<span class="tooltip-content">Form Extension</span>
|
||||
</a> </h3>
|
||||
<div class="modal-body">
|
||||
<form [formGroup]="entryForm" >
|
||||
<div class="clr-row" style="height: fit-content;">
|
||||
|
||||
<div class="clr-col-sm-12">
|
||||
<label> Name</label>
|
||||
<input class="clr-input" type="text" formControlName="name" />
|
||||
</div>
|
||||
|
||||
<div class="clr-col-sm-12">
|
||||
<label> Description</label>
|
||||
<textarea cols="10" rows="2" formControlName="description" placeholder="Textarea"> </textarea>
|
||||
</div>
|
||||
|
||||
<div class="clr-col-sm-12">
|
||||
<label> Active</label>
|
||||
<input type="checkbox" formControlName="active" clrToggle/> </div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- form code start -->
|
||||
<div *ngIf="checkFormCode">
|
||||
<h4 style="font-weight: 300;display: inline;">Extension</h4>
|
||||
<br>
|
||||
<hr>
|
||||
<div class="clr-row">
|
||||
<div class="clr-col-4" *ngFor="let field of additionalFieldsFromBackend">
|
||||
<ng-container *ngIf="field.formCode === formcode" [ngSwitch]="field.fieldType">
|
||||
<!-- Text Input --> <label *ngSwitchCase="'text'">{{ field.fieldName }}</label>
|
||||
<input *ngSwitchCase="'text'" [type]="field.fieldType" [formControlName]="field.extValue"
|
||||
class="clr-input" />
|
||||
<!-- Date Input --> <label *ngSwitchCase="'date'">{{ field.fieldName }}</label>
|
||||
<input *ngSwitchCase="'date'" [type]="field.fieldType" [formControlName]="field.extValue"
|
||||
class="clr-input" />
|
||||
<!-- Textarea --> <label *ngSwitchCase="'textarea'">{{ field.fieldName }}</label>
|
||||
<textarea *ngSwitchCase="'textarea'" [formControlName]="field.extValue" col="10" row="2"></textarea>
|
||||
<!-- Checkbox --> <label *ngSwitchCase="'checkbox'">{{ field.fieldName }}</label><br>
|
||||
<input *ngSwitchCase="'checkbox'" [type]="field.fieldType" [formControlName]="field.extValue"
|
||||
class="clr-checkbox" />
|
||||
</ng-container>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- form code end --> <div class="modal-footer">
|
||||
<button type="button" class="btn btn-outline" (click)="modalAdd = false">Cancel</button>
|
||||
<button type="submit" class="btn btn-primary" (click)="onSubmit()">ADD</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</clr-modal>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- htmlpopup -->
|
||||
@ -0,0 +1,78 @@
|
||||
//@import "../../../../assets/scss/var";
|
||||
.s-info-bar {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
button {
|
||||
outline: none;
|
||||
}
|
||||
}
|
||||
.delete,.heading{
|
||||
text-align: center;
|
||||
color: red;
|
||||
}
|
||||
.entry-pg {
|
||||
width: 750px;
|
||||
}
|
||||
|
||||
.button1::after {
|
||||
content: none;
|
||||
}
|
||||
.button1:hover::after {
|
||||
content: "ADD ROWS";
|
||||
}
|
||||
|
||||
.section {
|
||||
background-color: #dddddd;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.section p {
|
||||
//color: white;
|
||||
padding: 10px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.clr-input {
|
||||
color: #212529;
|
||||
border: 1px solid #ced4da;
|
||||
border-radius: 0.25rem;
|
||||
padding: 0.75rem 0.75rem;
|
||||
margin-top: 3px;
|
||||
width: 100%;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.clr-file {
|
||||
color: #212529;
|
||||
border: 1px solid #ced4da;
|
||||
border-radius: 0.25rem;
|
||||
//padding: 0.6rem 0.75rem;
|
||||
margin-top: 3px;
|
||||
width: 100%;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.center {
|
||||
text-align: center;
|
||||
}
|
||||
select{
|
||||
width: 100%;
|
||||
margin-top: 3px;
|
||||
padding: 5px 5px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
}
|
||||
input[type=text],[type=date],[type=number],textarea {
|
||||
width: 100%;
|
||||
padding: 15px 15px;
|
||||
background-color:rgb(255, 255, 255);
|
||||
// margin: 8px 0;
|
||||
display: inline-block;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.error_mess {
|
||||
color: red;
|
||||
}
|
||||
@ -0,0 +1,288 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ToastrService } from 'ngx-toastr';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { Agentservice} from './Agent.service';
|
||||
import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms';
|
||||
import { ExtensionService } from 'src/app/services/fnd/extension.service';
|
||||
import { DashboardContentModel2 } from 'src/app/models/builder/dashboard';
|
||||
import { Agentcardvariable } from './Agent_cardvariable';
|
||||
import { UserInfoService } from 'src/app/services/user-info.service';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
declare var JsBarcode: any;
|
||||
@Component({
|
||||
selector: 'app-Agent',
|
||||
templateUrl: './Agent.component.html',
|
||||
styleUrls: ['./Agent.component.scss']
|
||||
})
|
||||
export class AgentComponent implements OnInit {
|
||||
cardButton = Agentcardvariable.cardButton;
|
||||
cardmodeldata = Agentcardvariable.cardmodeldata;
|
||||
public dashboardArray: DashboardContentModel2[];
|
||||
isCardview = Agentcardvariable.cardButton;
|
||||
cardmodal; changeView(){
|
||||
this.isCardview = !this.isCardview;
|
||||
}
|
||||
beforeText(fieldtext: string): string { // Extract the text before the first '<'
|
||||
const index = fieldtext.indexOf('<');
|
||||
return index !== -1 ? fieldtext.substring(0, index) : fieldtext;
|
||||
}
|
||||
afterText(fieldtext: string): string { // Extract the text after the last '>'
|
||||
const index = fieldtext.lastIndexOf('>');
|
||||
return index !== -1 ? fieldtext.substring(index + 1) : '';
|
||||
}
|
||||
transform(fieldtext: string): string {
|
||||
const match = fieldtext.match(/<([^>]*)>/);
|
||||
return match ? match[1] : ''; // Extract the text between '<' and '>'
|
||||
}
|
||||
userrole;
|
||||
rowSelected :any= {};
|
||||
modaldelete=false;
|
||||
modalEdit=false;
|
||||
modalAdd= false;
|
||||
public entryForm: FormGroup;
|
||||
loading = false;
|
||||
product;
|
||||
modalOpenedforNewLine = false;
|
||||
newLine:any;
|
||||
additionalFieldsFromBackend: any[] = [];
|
||||
formcode = 'Agent_formCode'
|
||||
tableName = 'Agent'; checkFormCode; selected: any[] = []; constructor(
|
||||
private extensionService: ExtensionService,
|
||||
private userInfoService:UserInfoService,
|
||||
private mainService:Agentservice,
|
||||
private alertService: AlertService,
|
||||
private toastr: ToastrService,
|
||||
private _fb: FormBuilder,
|
||||
private router: Router,
|
||||
private route: ActivatedRoute ) { }
|
||||
// component button
|
||||
ngOnInit(): void {
|
||||
if(this.cardmodeldata !== ''){
|
||||
this.cardmodal = JSON.parse(this.cardmodeldata);
|
||||
this.dashboardArray = this.cardmodal.dashboard.slice();
|
||||
console.log(this.dashboardArray)
|
||||
}
|
||||
this.userrole=this.userInfoService.getRoles();
|
||||
this.getData();
|
||||
this.entryForm = this._fb.group({
|
||||
name : [null],
|
||||
|
||||
description : [null],
|
||||
|
||||
active : [false],
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}); // component_button200
|
||||
// form code start
|
||||
this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => {
|
||||
console.log(data);
|
||||
const jsonArray = data.map((str) => JSON.parse(str));
|
||||
this.additionalFieldsFromBackend = jsonArray;
|
||||
this.checkFormCode = this.additionalFieldsFromBackend.some(field => field.formCode === "Agent_formCode");
|
||||
console.log(this.checkFormCode);
|
||||
console.log(this.additionalFieldsFromBackend);
|
||||
if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) {
|
||||
this.additionalFieldsFromBackend.forEach(field => {
|
||||
if (field.formCode === this.formcode) {
|
||||
if (!this.entryForm.contains(field.extValue)) {
|
||||
// Add the control only if it doesn't exist in the form
|
||||
this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
console.log(this.entryForm.value);
|
||||
// form code end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
error;
|
||||
getData() {
|
||||
this.mainService.getAll().subscribe((data) => {
|
||||
console.log(data);
|
||||
this.product = data;
|
||||
if(this.product.length==0){
|
||||
this.error="No Data Available"
|
||||
}
|
||||
},(error) => {
|
||||
console.log(error);
|
||||
if(error){
|
||||
this.error="Server Error";
|
||||
}
|
||||
});
|
||||
}
|
||||
onEdit(row) {
|
||||
this.rowSelected = row;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
this.modalEdit = true;
|
||||
}
|
||||
onDelete(row) {
|
||||
this.rowSelected = row;
|
||||
this.modaldelete=true;
|
||||
}
|
||||
delete(id)
|
||||
{
|
||||
this.modaldelete = false;
|
||||
console.log("in delete "+id);
|
||||
this.mainService.delete(id).subscribe(
|
||||
(data) => {
|
||||
console.log(data);
|
||||
this.ngOnInit();
|
||||
if (data) { this.toastr.success('Deleted successfully'); }
|
||||
});
|
||||
}
|
||||
onUpdate(id) {
|
||||
this.modalEdit = false;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//console.log("in update");
|
||||
console.log("id " + id);
|
||||
console.log(this.rowSelected);
|
||||
//console.log("out update");
|
||||
this.mainService.update(id, this.rowSelected).subscribe(
|
||||
(data) => {
|
||||
console.log(data);
|
||||
if (data || data.status >= 200 && data.status <= 299) {
|
||||
this.toastr.success("Update Successfully");
|
||||
}
|
||||
setTimeout(() => {
|
||||
this.ngOnInit();
|
||||
}, 500);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}, (error) => {
|
||||
console.log(error);
|
||||
if (error.status >= 200 && error.status <= 299) {
|
||||
// this.toastr.success("update Succesfully");
|
||||
}
|
||||
if (error.status >= 400 && error.status <= 499) {
|
||||
this.toastr.error("Not Updated");
|
||||
}
|
||||
if (error.status >= 500 && error.status <= 599) {
|
||||
this.toastr.error("Not Updated");
|
||||
}
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.ngOnInit();
|
||||
}, 500);
|
||||
}
|
||||
onCreate() {
|
||||
this.modalAdd=false;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
this.mainService.create(this.entryForm.value).subscribe(
|
||||
(data) => {
|
||||
console.log(data);
|
||||
if (data || data.status >= 200 && data.status <= 299) {
|
||||
this.toastr.success("Added Successfully");
|
||||
}
|
||||
setTimeout(() => {
|
||||
this.ngOnInit();
|
||||
}, 500);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}, (error) => {
|
||||
console.log(error);
|
||||
if (error.status >= 200 && error.status <= 299) {
|
||||
// this.toastr.success("Added Succesfully");
|
||||
}
|
||||
if (error.status >= 400 && error.status <= 499) {
|
||||
this.toastr.error("Not Added");
|
||||
}
|
||||
if (error.status >= 500 && error.status <= 599) {
|
||||
this.toastr.error("Not Added");
|
||||
}
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.ngOnInit();
|
||||
}, 500);
|
||||
}
|
||||
goToAdd(row) {
|
||||
this.modalAdd = true; this.submitted = false;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
submitted = false;
|
||||
onSubmit() {
|
||||
console.log(this.entryForm.value);
|
||||
this.submitted = true;
|
||||
if (this.entryForm.invalid) {
|
||||
return;
|
||||
}this.onCreate();
|
||||
|
||||
}
|
||||
|
||||
|
||||
rsModaldescription = false;
|
||||
goToReplaceStringdescription(row){
|
||||
this.rowSelected = row; this.rsModaldescription =true; }
|
||||
|
||||
|
||||
|
||||
goToDataM(){
|
||||
this.router.navigate(['/cns-portal/datamanagement'],{ relativeTo: this.route });
|
||||
}
|
||||
|
||||
|
||||
downloadCSV(tableName): void {
|
||||
this.mainService.downloadCSV(tableName).subscribe(response => {
|
||||
const blob = new Blob([response], { type: 'application/octet-stream' });
|
||||
const url = window.URL.createObjectURL(blob);
|
||||
const a = document.createElement('a');
|
||||
a.href = url;
|
||||
a.download = `${tableName}.csv`;
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
document.body.removeChild(a);
|
||||
});
|
||||
}// updateaction
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,44 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from "rxjs";
|
||||
import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http";
|
||||
import { ApiRequestService } from "src/app/services/api/api-request.service";
|
||||
import { environment } from 'src/environments/environment';
|
||||
import baseUrl from 'src/app/services/api/helper';
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class Agentservice{
|
||||
private baseURL = "Agent/Agent" ; constructor(
|
||||
private http: HttpClient,
|
||||
private apiRequest: ApiRequestService,
|
||||
) { }
|
||||
getAll(page?: number, size?: number): Observable<any> {
|
||||
return this.apiRequest.get(this.baseURL);
|
||||
}
|
||||
getById(id: number): Observable<any> {
|
||||
const _http = this.baseURL + "/" + id;
|
||||
return this.apiRequest.get(_http);
|
||||
}
|
||||
create(data: any): Observable<any> {
|
||||
return this.apiRequest.post(this.baseURL, data);
|
||||
}
|
||||
update(id: number, data: any): Observable<any> {
|
||||
const _http = this.baseURL + "/" + id;
|
||||
return this.apiRequest.put(_http, data);
|
||||
}
|
||||
delete(id: number): Observable<any> {
|
||||
const _http = this.baseURL + "/" + id;
|
||||
return this.apiRequest.delete(_http);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
downloadCSV(tableName: string): Observable<Blob> {
|
||||
const url = `${baseUrl}/api/template/download-csv?tableName=${tableName}`;
|
||||
return this.http.get(url, { responseType: 'blob' })
|
||||
|
||||
}// updateaction
|
||||
}
|
||||
@ -0,0 +1,4 @@
|
||||
export const Agentcardvariable = {
|
||||
"cardButton": false,
|
||||
"cardmodeldata": ``
|
||||
}
|
||||
@ -0,0 +1,475 @@
|
||||
<ol class="breadcrumb breadcrumb-arrow font-trirong">
|
||||
<li><a href="javascript://"> Cost_Sheet</a></li>
|
||||
</ol>
|
||||
<div class="dg-wrapper">
|
||||
<div class="clr-row">
|
||||
<div class="clr-col-8">
|
||||
<h3>Cost_Sheet </h3>
|
||||
</div>
|
||||
<div class="clr-col-4" style="text-align: right;">
|
||||
<button *ngIf="cardButton" id="add" class="btn btn-primary btn-icon" (click)="changeView()" >
|
||||
<clr-icon *ngIf="!isCardview" shape="grid-view"></clr-icon> <clr-icon *ngIf="isCardview" shape="bars"></clr-icon>
|
||||
</button>
|
||||
<!-- upload and download template -->
|
||||
<button class="btn btn-outline" (click)="goToDataM()">
|
||||
Upload
|
||||
</button>
|
||||
<button class="btn btn-outline" (click)="downloadCSV(tableName)" >
|
||||
<clr-icon shape="export" ></clr-icon> Download
|
||||
</button>
|
||||
<!-- upload and download template end here--> <!-- button -->
|
||||
<button id="add" class="btn btn-primary" (click)="goToAdd(product)" >
|
||||
<clr-icon shape="plus"></clr-icon>ADD
|
||||
</button>
|
||||
</div></div>
|
||||
<ng-container *ngIf="!isCardview"> <!-- GET ALL --> <clr-datagrid [clrDgLoading]="loading" [(clrDgSelected)]="selected">
|
||||
<clr-dg-placeholder>
|
||||
<ng-template #loadingSpinner>
|
||||
<clr-spinner>Loading ... </clr-spinner>
|
||||
</ng-template>
|
||||
<div *ngIf="error;else loadingSpinner">{{error}}</div>
|
||||
</clr-dg-placeholder>
|
||||
|
||||
<clr-dg-column [clrDgField]="' name'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Name
|
||||
</ng-container></clr-dg-column>
|
||||
|
||||
|
||||
<clr-dg-column [clrDgField]="' description'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Description
|
||||
</ng-container></clr-dg-column>
|
||||
|
||||
|
||||
<clr-dg-column [clrDgField]="' active'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Active
|
||||
</ng-container></clr-dg-column>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- who column -->
|
||||
<clr-dg-column> <ng-container *clrDgHideableColumn="{hidden: false}">
|
||||
<clr-icon shape="bars"></clr-icon> Action
|
||||
</ng-container></clr-dg-column>
|
||||
<!-- end -->
|
||||
|
||||
<clr-dg-row *clrDgItems="let user of product" [clrDgItem]="user">
|
||||
|
||||
<clr-dg-cell>{{user. name }}</clr-dg-cell>
|
||||
|
||||
|
||||
<clr-dg-cell (click)="goToReplaceStringdescription (user.description)" style="cursor: pointer; align-items: center;"><clr-icon shape="details"></clr-icon>
|
||||
</clr-dg-cell>
|
||||
|
||||
|
||||
<clr-dg-cell>{{user. active }}</clr-dg-cell>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- who column -->
|
||||
<clr-dg-cell>
|
||||
<clr-signpost>
|
||||
<span style="cursor: pointer;" clrSignpostTrigger><clr-icon shape="help" class="success" style="color: rgb(0, 130, 236);"></clr-icon></span>
|
||||
<clr-signpost-content [clrPosition]="'left-middle'" *clrIfOpen>
|
||||
<h5 style="margin-top: 0">Who Column</h5>
|
||||
<div>Account ID: <code class="clr-code">{{user.accountId}}</code></div>
|
||||
<div>Created At: <code class="clr-code">{{user.createdAt| date}}</code></div>
|
||||
<div>Created By: <code class="clr-code">{{user.createdBy}}</code></div>
|
||||
<div>Updated At: <code class="clr-code">{{user.updatedAt | date}}</code></div>
|
||||
<div>Updated By: <code class="clr-code">{{user.updatedBy}}</code></div>
|
||||
</clr-signpost-content>
|
||||
</clr-signpost>
|
||||
</clr-dg-cell>
|
||||
|
||||
<!-- who colmn -->
|
||||
|
||||
<clr-dg-action-overflow>
|
||||
<button class="action-item" (click)="onEdit(user)">Edit</button>
|
||||
<button class="action-item" (click)="onDelete(user)">Delete</button>
|
||||
</clr-dg-action-overflow>
|
||||
</clr-dg-row>
|
||||
<clr-dg-footer>
|
||||
<clr-dg-pagination #pagination [clrDgPageSize]="10">
|
||||
<clr-dg-page-size [clrPageSizeOptions]="[10,20,50,100]">Users per page</clr-dg-page-size>
|
||||
{{pagination.firstItem + 1}} - {{pagination.lastItem + 1}}
|
||||
of {{pagination.totalItems}} users
|
||||
</clr-dg-pagination>
|
||||
</clr-dg-footer>
|
||||
</clr-datagrid> </ng-container>
|
||||
<ng-template #showInfo>
|
||||
<div class="alert alert-info" role="alert">
|
||||
<div class="alert-items">
|
||||
<div class="alert-item static">
|
||||
<span class="alert-text">
|
||||
<clr-icon class="alert-icon" shape="info-circle"></clr-icon>
|
||||
Data could be found. Loading..
|
||||
<clr-spinner [clrMedium]="true">Loading ...</clr-spinner>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template><ng-container *ngIf="isCardview">
|
||||
<div *ngIf="product; else showInfo" class="clr-row clr-align-items-start clr-justify-content-start">
|
||||
<div *ngFor="let app of product| filter:search; let index = i" class="clr-col-auto" >
|
||||
<div class="clr-row">
|
||||
<div class="clr-col-lg-12 clr-col-md-4 clr-col-sm-4 clr-col-12" style="width: 410px;">
|
||||
<div class="card" style="padding: 10px; "[style.background-color]="cardmodal.cardColor !== '' ? cardmodal.cardColor : 'white'">
|
||||
<div class="card-body" style="display: grid; grid-template-columns: repeat(13, 1fr); grid-template-rows: repeat(7, 1fr); gap: 5px;">
|
||||
<ng-container *ngFor="let item of dashboardArray">
|
||||
<div [style.gridColumn]="item.x + 1" [style.gridRow]="item.y + 1" [style.gridColumnEnd]="item.x + item.cols + 1"
|
||||
[style.gridRowEnd]="item.y + item.rows + 1">
|
||||
<div *ngIf="item.name === 'textField'" class="title-card card-title"
|
||||
[style.text-align]="item.alignment !== '' ? item.alignment : 'left'"
|
||||
[style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'"
|
||||
[style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'"
|
||||
[style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'"
|
||||
[style.font-style]="item.italic == true ? 'Italic' : 'normal'"
|
||||
[style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :
|
||||
(item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))"
|
||||
[style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'"
|
||||
[style.color]="item.textcolor !== '' ? item.textcolor : 'black'" [style.background-color]="item.conditionValue == app[transform(item.fieldtext) ] ? item.conditionbackgroundcolor : item.backgroundcolor"
|
||||
[style.color]="item.conditionValue == app[transform(item.fieldtext) ] ? item.conditiontextcolor : item.textcolor">
|
||||
{{beforeText(item.fieldtext)}}
|
||||
{{ app[transform(item.fieldtext) ] }}
|
||||
{{afterText(item.fieldtext)}}
|
||||
</div>
|
||||
|
||||
<div *ngIf="item.name === 'dateField'" class="title-card card-title"
|
||||
[style.text-align]="item.alignment !== '' ? item.alignment : 'left'"
|
||||
[style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'"
|
||||
[style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'"
|
||||
[style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'"
|
||||
[style.font-style]="item.italic == true ? 'Italic' : 'normal'"
|
||||
[style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :
|
||||
(item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))"
|
||||
[style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'"
|
||||
[style.color]="item.textcolor !== '' ? item.textcolor : 'black'" [style.background-color]="item.conditionValue == app[transform(item.fieldtext) ] ? item.conditionbackgroundcolor : item.backgroundcolor"
|
||||
[style.color]="item.conditionValue == app[transform(item.fieldtext) ] ? item.conditiontextcolor : item.textcolor">
|
||||
{{beforeText(item.fieldtext)}}
|
||||
{{ app[transform(item.fieldtext) ] | date}}
|
||||
{{afterText(item.fieldtext)}}
|
||||
</div>
|
||||
<div *ngIf="item.name === 'numberField'" class="title-card card-title"
|
||||
[style.text-align]="item.alignment !== '' ? item.alignment : 'left'"
|
||||
[style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'"
|
||||
[style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'"
|
||||
[style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'"
|
||||
[style.font-style]="item.italic == true ? 'Italic' : 'normal'"
|
||||
[style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :
|
||||
(item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))"
|
||||
[style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'"
|
||||
[style.color]="item.textcolor !== '' ? item.textcolor : 'black'" [style.background-color]="item.conditionValue == app[transform(item.fieldtext) ] ? item.conditionbackgroundcolor : item.backgroundcolor"
|
||||
[style.color]="item.conditionValue == app[transform(item.fieldtext) ] ? item.conditiontextcolor : item.textcolor">
|
||||
{{beforeText(item.fieldtext)}}
|
||||
{{ app[transform(item.fieldtext) ]}}
|
||||
{{afterText(item.fieldtext)}}
|
||||
</div>
|
||||
|
||||
<div *ngIf="item.name === 'Line'" class="title-card card-title"
|
||||
[style.text-align]="item.alignment !== '' ? item.alignment : 'left'"
|
||||
[style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'"
|
||||
[style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'"
|
||||
[style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'"
|
||||
[style.font-style]="item.italic == true ? 'Italic' : 'normal'"
|
||||
[style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :
|
||||
(item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))"
|
||||
[style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'"
|
||||
[style.color]="item.textcolor !== '' ? item.textcolor : 'black'">
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
|
||||
<div *ngIf="item.name === 'Icon'" class="icon-card"
|
||||
[style.text-align]="item.alignment !== '' ? item.alignment : 'left'"
|
||||
[style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'"
|
||||
[style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'"
|
||||
[style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'"
|
||||
[style.font-style]="item.italic == true ? 'Italic' : 'normal'"
|
||||
[style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :
|
||||
(item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))"
|
||||
[style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'"
|
||||
[style.color]="item.textcolor !== '' ? item.textcolor : 'black'"
|
||||
>
|
||||
<clr-icon [attr.shape]="item.iconName"></clr-icon>
|
||||
</div>
|
||||
|
||||
<div *ngIf="item.name == 'Image'"
|
||||
[style.text-align]="item.alignment !== '' ? item.alignment : 'left'"
|
||||
[style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'"
|
||||
[style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'"
|
||||
[style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'"
|
||||
[style.font-style]="item.italic == true ? 'Italic' : 'normal'"
|
||||
[style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :
|
||||
(item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))"
|
||||
[style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'"
|
||||
[style.color]="item.textcolor !== '' ? item.textcolor : 'black'"
|
||||
[style.background-color]="item.conditionValue == app[transform(item.fieldtext) ] ? item.conditionbackgroundcolor : item.backgroundcolor"
|
||||
[style.color]="item.conditionValue == app[transform(item.fieldtext) ] ? item.conditiontextcolor : item.textcolor"> <img id="filePreview" [src]="item.imageURL" alt="File Preview"
|
||||
[style.width]="item.imagewidth !== '' ? item.imagewidth + 'px' : '100px'"
|
||||
[style.height]="item.imagewidth !== '' ? item.imagewidth + 'px' : '100px'"></div>
|
||||
</div>
|
||||
</ng-container>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<clr-modal [(clrModalOpen)]="rsModaldescription" [clrModalSize]="'xl'" [clrModalStaticBackdrop]="true">
|
||||
<div class="modal-body">
|
||||
<textarea class="form-control" style="width:100%; height: 400px;" readonly>{{rowSelected}}</textarea>
|
||||
</div></clr-modal>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- // EDIT DATA......... -->
|
||||
<clr-modal [(clrModalOpen)]="modalEdit" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true">
|
||||
<h3 class="modal-title">Update Cost_sheet <!--update button -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</h3>
|
||||
<div class="modal-body" *ngIf="rowSelected.id">
|
||||
<h2 class="heading">{{rowSelected.id}}</h2>
|
||||
<!-- button -->
|
||||
<form >
|
||||
<div class="clr-row">
|
||||
<div class="clr-col-sm-12">
|
||||
<label>Name</label>
|
||||
<input class="clr-input" type="text" [(ngModel)]="rowSelected.name" name="name" />
|
||||
</div>
|
||||
|
||||
<div class="clr-col-sm-12">
|
||||
<label> Description</label>
|
||||
<textarea cols="10" rows="2"[(ngModel)]="rowSelected.description" name="description " placeholder="Textarea"> </textarea>
|
||||
</div>
|
||||
|
||||
<div class="clr-col-sm-12">
|
||||
<label> Active</label>
|
||||
<input type="checkbox" name="active" clrToggle [(ngModel)]="rowSelected.active" /> </div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h6> List of cost_sheet</h6>
|
||||
|
||||
<div class="clr-row" style="margin-top: 10px;">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th> File</th>
|
||||
<th>File Name</th>
|
||||
<th>Preview</th>
|
||||
<th>Cancel</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody >
|
||||
<tr *ngFor="let attach of FileDatacost_sheet; let i=index">
|
||||
<td style="width: 70px;"><input type="text" class="clr-input" value={{i+1}} [readonly]="true"> </td>
|
||||
<td><input type="file" (change)="onFileChangedcost_sheet($event, i)" accept = "application/pdf,.csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"/>
|
||||
</td>
|
||||
<td>{{attach.uploadedfile_name}}</td>
|
||||
<td > <img [src]="attach.filePreview" alt="File Preview" [ngModelOptions]="{standalone: true}" name="filePreview" width="100px" height="100px"></td>
|
||||
<td>
|
||||
<clr-signpost style="padding-right: 10px;">
|
||||
<clr-icon shape="trash" class="is-error" aria-label="Icon Button Trigger" clrSignpostTrigger></clr-icon>
|
||||
|
||||
<clr-signpost-content [clrPosition]="'bottom-middle'" *clrIfOpen>
|
||||
<div style="text-align: center;"><b >Are you sure?</b></div>
|
||||
<button class="btn btn-outline" [clrSignpostTrigger]="false">cancel</button>
|
||||
<button class="btn btn-primary" (click)="deleteRowcost_sheet(i,attach.id)" >Delete</button>
|
||||
</clr-signpost-content>
|
||||
</clr-signpost>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
<button type="button" class="btn btn-primary button1" style="margin-left: 20px;" (click)="onAddLinescost_sheet()">
|
||||
<clr-icon shape="plus"></clr-icon>
|
||||
</button>
|
||||
|
||||
</table> </div>
|
||||
|
||||
<!-- form code start -->
|
||||
<div *ngIf="checkFormCode">
|
||||
<h4 style="font-weight: 300;display: inline;">Extension</h4>
|
||||
<br>
|
||||
<hr>
|
||||
<div class="clr-row">
|
||||
<div class="clr-col-4" *ngFor="let field of additionalFieldsFromBackend">
|
||||
<ng-container *ngIf="field.formCode === formcode" [ngSwitch]="field.fieldType">
|
||||
<!-- Text Input --> <label *ngSwitchCase="'text'">{{ field.fieldName }}</label>
|
||||
<input *ngSwitchCase="'text'" [type]="field.fieldType" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]" class="clr-input" />
|
||||
|
||||
<!-- Date Input --> <label *ngSwitchCase="'date'">{{ field.fieldName }}</label>
|
||||
<input *ngSwitchCase="'date'" [type]="field.fieldType" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]" class="clr-input" />
|
||||
|
||||
<!-- Textarea --> <label *ngSwitchCase="'textarea'">{{ field.fieldName }}</label>
|
||||
<textarea *ngSwitchCase="'textarea'" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]" col="10" row="2"></textarea>
|
||||
|
||||
<!-- Checkbox --> <label *ngSwitchCase="'checkbox'">{{ field.fieldName }}</label><br>
|
||||
<input *ngSwitchCase="'checkbox'" [type]="field.fieldType" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]" class="clr-checkbox" />
|
||||
</ng-container>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- form code end --> <div class="modal-footer">
|
||||
<button type="button" class="btn btn-outline" (click)="modalEdit = false">Cancel</button>
|
||||
<button type="submit" class="btn btn-primary" (click)="onUpdate(rowSelected.id)">Update</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</clr-modal>
|
||||
<clr-modal [(clrModalOpen)]="modaldelete" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true">
|
||||
<div class="modal-body" *ngIf="rowSelected.id">
|
||||
<h1 class="delete">Are You Sure Want to delete?</h1>
|
||||
<h2 class="heading">{{rowSelected.id}}</h2>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-outline" (click)="modaldelete = false">Cancel</button>
|
||||
<button type="button" (click)="delete(rowSelected.id)" class="btn btn-primary" >Delete</button>
|
||||
</div>
|
||||
</div>
|
||||
</clr-modal>
|
||||
<!-- ADD FORM ..... -->
|
||||
<clr-modal [(clrModalOpen)]="modalAdd" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true">
|
||||
<h3 class="modal-title">Add Cost_Sheet
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- aeroplane icon -->
|
||||
|
||||
<a *ngIf="userrole.includes('ROLE_ADMIN')" style="float: right;" href="javascript:void(0)" role="tooltip" aria-haspopup="true"
|
||||
class="tooltip tooltip-sm tooltip-bottom-left">
|
||||
<a id="build_extension" [routerLink]="['../extension/all']" [queryParams]="{ formCode: 'Cost_sheet_formCode' }">
|
||||
<clr-icon shape="airplane" size="32"></clr-icon>
|
||||
</a>
|
||||
<span class="tooltip-content">Form Extension</span>
|
||||
</a> </h3>
|
||||
<div class="modal-body">
|
||||
<form [formGroup]="entryForm" >
|
||||
<div class="clr-row" style="height: fit-content;">
|
||||
|
||||
<div class="clr-col-sm-12">
|
||||
<label> Name</label>
|
||||
<input class="clr-input" type="text" formControlName="name" />
|
||||
</div>
|
||||
|
||||
<div class="clr-col-sm-12">
|
||||
<label> Description</label>
|
||||
<textarea cols="10" rows="2" formControlName="description" placeholder="Textarea"> </textarea>
|
||||
</div>
|
||||
|
||||
<div class="clr-col-sm-12">
|
||||
<label> Active</label>
|
||||
<input type="checkbox" formControlName="active" clrToggle/> </div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h6> List of cost_sheet</h6>
|
||||
|
||||
<div class="clr-row" style="margin-top: 10px;">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th> File</th>
|
||||
<th>File Name</th>
|
||||
<th>Preview</th>
|
||||
<th>Cancel</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody >
|
||||
<tr *ngFor="let attach of FileDatacost_sheet; let i=index">
|
||||
<td style="width: 70px;"><input type="text" class="clr-input" value={{i+1}} [readonly]="true"> </td>
|
||||
<td><input type="file" (change)="onFileChangedcost_sheet($event, i)" accept = "application/pdf,.csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" /><!--accept=".pdf,.doc,.docx,.jpg,.msg"-->
|
||||
</td>
|
||||
<td>{{attach.uploadedfile_name}}</td>
|
||||
<td > <img [src]="attach.filePreview" alt="File Preview" [ngModelOptions]="{standalone: true}" name="filePreview" width="100px" height="100px"></td>
|
||||
<td>
|
||||
<a (click)="deleteRowcost_sheet(i)">
|
||||
<clr-icon shape="trash" class="is-error"></clr-icon>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
<button type="button" class="btn btn-primary button1" style="margin-left: 20px;" (click)="onAddLinescost_sheet()">
|
||||
<clr-icon shape="plus"></clr-icon>
|
||||
</button>
|
||||
|
||||
</table> </div>
|
||||
|
||||
|
||||
|
||||
<!-- form code start -->
|
||||
<div *ngIf="checkFormCode">
|
||||
<h4 style="font-weight: 300;display: inline;">Extension</h4>
|
||||
<br>
|
||||
<hr>
|
||||
<div class="clr-row">
|
||||
<div class="clr-col-4" *ngFor="let field of additionalFieldsFromBackend">
|
||||
<ng-container *ngIf="field.formCode === formcode" [ngSwitch]="field.fieldType">
|
||||
<!-- Text Input --> <label *ngSwitchCase="'text'">{{ field.fieldName }}</label>
|
||||
<input *ngSwitchCase="'text'" [type]="field.fieldType" [formControlName]="field.extValue"
|
||||
class="clr-input" />
|
||||
<!-- Date Input --> <label *ngSwitchCase="'date'">{{ field.fieldName }}</label>
|
||||
<input *ngSwitchCase="'date'" [type]="field.fieldType" [formControlName]="field.extValue"
|
||||
class="clr-input" />
|
||||
<!-- Textarea --> <label *ngSwitchCase="'textarea'">{{ field.fieldName }}</label>
|
||||
<textarea *ngSwitchCase="'textarea'" [formControlName]="field.extValue" col="10" row="2"></textarea>
|
||||
<!-- Checkbox --> <label *ngSwitchCase="'checkbox'">{{ field.fieldName }}</label><br>
|
||||
<input *ngSwitchCase="'checkbox'" [type]="field.fieldType" [formControlName]="field.extValue"
|
||||
class="clr-checkbox" />
|
||||
</ng-container>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- form code end --> <div class="modal-footer">
|
||||
<button type="button" class="btn btn-outline" (click)="modalAdd = false">Cancel</button>
|
||||
<button type="submit" class="btn btn-primary" (click)="onSubmit()">ADD</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</clr-modal>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- htmlpopup -->
|
||||
@ -0,0 +1,78 @@
|
||||
//@import "../../../../assets/scss/var";
|
||||
.s-info-bar {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
button {
|
||||
outline: none;
|
||||
}
|
||||
}
|
||||
.delete,.heading{
|
||||
text-align: center;
|
||||
color: red;
|
||||
}
|
||||
.entry-pg {
|
||||
width: 750px;
|
||||
}
|
||||
|
||||
.button1::after {
|
||||
content: none;
|
||||
}
|
||||
.button1:hover::after {
|
||||
content: "ADD ROWS";
|
||||
}
|
||||
|
||||
.section {
|
||||
background-color: #dddddd;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.section p {
|
||||
//color: white;
|
||||
padding: 10px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.clr-input {
|
||||
color: #212529;
|
||||
border: 1px solid #ced4da;
|
||||
border-radius: 0.25rem;
|
||||
padding: 0.75rem 0.75rem;
|
||||
margin-top: 3px;
|
||||
width: 100%;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.clr-file {
|
||||
color: #212529;
|
||||
border: 1px solid #ced4da;
|
||||
border-radius: 0.25rem;
|
||||
//padding: 0.6rem 0.75rem;
|
||||
margin-top: 3px;
|
||||
width: 100%;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.center {
|
||||
text-align: center;
|
||||
}
|
||||
select{
|
||||
width: 100%;
|
||||
margin-top: 3px;
|
||||
padding: 5px 5px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
}
|
||||
input[type=text],[type=date],[type=number],textarea {
|
||||
width: 100%;
|
||||
padding: 15px 15px;
|
||||
background-color:rgb(255, 255, 255);
|
||||
// margin: 8px 0;
|
||||
display: inline-block;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.error_mess {
|
||||
color: red;
|
||||
}
|
||||
@ -0,0 +1,366 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ToastrService } from 'ngx-toastr';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { Cost_sheetservice} from './Cost_sheet.service';
|
||||
import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms';
|
||||
import { ExtensionService } from 'src/app/services/fnd/extension.service';
|
||||
import { DashboardContentModel2 } from 'src/app/models/builder/dashboard';
|
||||
import { Cost_sheetcardvariable } from './Cost_sheet_cardvariable';
|
||||
import { UserInfoService } from 'src/app/services/user-info.service';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
declare var JsBarcode: any;
|
||||
@Component({
|
||||
selector: 'app-Cost_sheet',
|
||||
templateUrl: './Cost_sheet.component.html',
|
||||
styleUrls: ['./Cost_sheet.component.scss']
|
||||
})
|
||||
export class Cost_sheetComponent implements OnInit {
|
||||
cardButton = Cost_sheetcardvariable.cardButton;
|
||||
cardmodeldata = Cost_sheetcardvariable.cardmodeldata;
|
||||
public dashboardArray: DashboardContentModel2[];
|
||||
isCardview = Cost_sheetcardvariable.cardButton;
|
||||
cardmodal; changeView(){
|
||||
this.isCardview = !this.isCardview;
|
||||
}
|
||||
beforeText(fieldtext: string): string { // Extract the text before the first '<'
|
||||
const index = fieldtext.indexOf('<');
|
||||
return index !== -1 ? fieldtext.substring(0, index) : fieldtext;
|
||||
}
|
||||
afterText(fieldtext: string): string { // Extract the text after the last '>'
|
||||
const index = fieldtext.lastIndexOf('>');
|
||||
return index !== -1 ? fieldtext.substring(index + 1) : '';
|
||||
}
|
||||
transform(fieldtext: string): string {
|
||||
const match = fieldtext.match(/<([^>]*)>/);
|
||||
return match ? match[1] : ''; // Extract the text between '<' and '>'
|
||||
}
|
||||
userrole;
|
||||
rowSelected :any= {};
|
||||
modaldelete=false;
|
||||
modalEdit=false;
|
||||
modalAdd= false;
|
||||
public entryForm: FormGroup;
|
||||
loading = false;
|
||||
product;
|
||||
modalOpenedforNewLine = false;
|
||||
newLine:any;
|
||||
additionalFieldsFromBackend: any[] = [];
|
||||
formcode = 'Cost_sheet_formCode'
|
||||
tableName = 'Cost_sheet'; checkFormCode; selected: any[] = []; constructor(
|
||||
private extensionService: ExtensionService,
|
||||
private userInfoService:UserInfoService,
|
||||
private mainService:Cost_sheetservice,
|
||||
private alertService: AlertService,
|
||||
private toastr: ToastrService,
|
||||
private _fb: FormBuilder,
|
||||
private router: Router,
|
||||
private route: ActivatedRoute ) { }
|
||||
// component button
|
||||
ngOnInit(): void {
|
||||
if(this.cardmodeldata !== ''){
|
||||
this.cardmodal = JSON.parse(this.cardmodeldata);
|
||||
this.dashboardArray = this.cardmodal.dashboard.slice();
|
||||
console.log(this.dashboardArray)
|
||||
}
|
||||
this.userrole=this.userInfoService.getRoles();
|
||||
this.getData();
|
||||
this.entryForm = this._fb.group({
|
||||
name : [null],
|
||||
|
||||
description : [null],
|
||||
|
||||
active : [false],
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}); // component_button200
|
||||
// form code start
|
||||
this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => {
|
||||
console.log(data);
|
||||
const jsonArray = data.map((str) => JSON.parse(str));
|
||||
this.additionalFieldsFromBackend = jsonArray;
|
||||
this.checkFormCode = this.additionalFieldsFromBackend.some(field => field.formCode === "Cost_sheet_formCode");
|
||||
console.log(this.checkFormCode);
|
||||
console.log(this.additionalFieldsFromBackend);
|
||||
if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) {
|
||||
this.additionalFieldsFromBackend.forEach(field => {
|
||||
if (field.formCode === this.formcode) {
|
||||
if (!this.entryForm.contains(field.extValue)) {
|
||||
// Add the control only if it doesn't exist in the form
|
||||
this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
console.log(this.entryForm.value);
|
||||
// form code end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
error;
|
||||
getData() {
|
||||
this.mainService.getAll().subscribe((data) => {
|
||||
console.log(data);
|
||||
this.product = data;
|
||||
if(this.product.length==0){
|
||||
this.error="No Data Available"
|
||||
}
|
||||
},(error) => {
|
||||
console.log(error);
|
||||
if(error){
|
||||
this.error="Server Error";
|
||||
}
|
||||
});
|
||||
}
|
||||
onEdit(row) {
|
||||
this.rowSelected = row;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
this.selectedcost_sheet = [];
|
||||
this.mainService.uploadfilegetByIdcost_sheet(row.id,this.tableName).subscribe(uploaddata =>{
|
||||
console.log(uploaddata);
|
||||
this.FileDatacost_sheet = uploaddata;
|
||||
|
||||
})
|
||||
|
||||
|
||||
this.modalEdit = true;
|
||||
}
|
||||
onDelete(row) {
|
||||
this.rowSelected = row;
|
||||
this.modaldelete=true;
|
||||
}
|
||||
delete(id)
|
||||
{
|
||||
this.modaldelete = false;
|
||||
console.log("in delete "+id);
|
||||
this.mainService.delete(id).subscribe(
|
||||
(data) => {
|
||||
console.log(data);
|
||||
this.ngOnInit();
|
||||
if (data) { this.toastr.success('Deleted successfully'); }
|
||||
});
|
||||
}
|
||||
onUpdate(id) {
|
||||
this.modalEdit = false;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//console.log("in update");
|
||||
console.log("id " + id);
|
||||
console.log(this.rowSelected);
|
||||
//console.log("out update");
|
||||
this.mainService.update(id, this.rowSelected).subscribe(
|
||||
(data) => {
|
||||
console.log(data);
|
||||
if (data || data.status >= 200 && data.status <= 299) {
|
||||
this.toastr.success("Update Successfully");
|
||||
}
|
||||
setTimeout(() => {
|
||||
this.ngOnInit();
|
||||
}, 500);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
for (let i = 0; i < this.selectedcost_sheet.length; i++){
|
||||
|
||||
this.mainService.uploadfilecost_sheet(data.id,this.tableName,this.selectedcost_sheet[i]).subscribe(uploaddata =>{
|
||||
console.log(uploaddata);
|
||||
})
|
||||
}
|
||||
|
||||
}, (error) => {
|
||||
console.log(error);
|
||||
if (error.status >= 200 && error.status <= 299) {
|
||||
// this.toastr.success("update Succesfully");
|
||||
}
|
||||
if (error.status >= 400 && error.status <= 499) {
|
||||
this.toastr.error("Not Updated");
|
||||
}
|
||||
if (error.status >= 500 && error.status <= 599) {
|
||||
this.toastr.error("Not Updated");
|
||||
}
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.ngOnInit();
|
||||
}, 500);
|
||||
}
|
||||
onCreate() {
|
||||
this.modalAdd=false;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
this.mainService.create(this.entryForm.value).subscribe(
|
||||
(data) => {
|
||||
console.log(data);
|
||||
if (data || data.status >= 200 && data.status <= 299) {
|
||||
this.toastr.success("Added Successfully");
|
||||
}
|
||||
setTimeout(() => {
|
||||
this.ngOnInit();
|
||||
}, 500);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
for (let i = 0; i < this.selectedcost_sheet.length; i++){
|
||||
|
||||
this.mainService.uploadfilecost_sheet(data.id,this.tableName,this.selectedcost_sheet[i]).subscribe(uploaddata =>{
|
||||
console.log(uploaddata);
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
}, (error) => {
|
||||
console.log(error);
|
||||
if (error.status >= 200 && error.status <= 299) {
|
||||
// this.toastr.success("Added Succesfully");
|
||||
}
|
||||
if (error.status >= 400 && error.status <= 499) {
|
||||
this.toastr.error("Not Added");
|
||||
}
|
||||
if (error.status >= 500 && error.status <= 599) {
|
||||
this.toastr.error("Not Added");
|
||||
}
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.ngOnInit();
|
||||
}, 500);
|
||||
}
|
||||
goToAdd(row) {
|
||||
this.modalAdd = true; this.submitted = false;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
this.FileDatacost_sheet = [];
|
||||
this.selectedcost_sheet =[];
|
||||
|
||||
|
||||
}
|
||||
submitted = false;
|
||||
onSubmit() {
|
||||
console.log(this.entryForm.value);
|
||||
this.submitted = true;
|
||||
if (this.entryForm.invalid) {
|
||||
return;
|
||||
}this.onCreate();
|
||||
|
||||
}
|
||||
|
||||
|
||||
rsModaldescription = false;
|
||||
goToReplaceStringdescription(row){
|
||||
this.rowSelected = row; this.rsModaldescription =true; }
|
||||
|
||||
|
||||
|
||||
filePreviewcost_sheet: string | ArrayBuffer | null = null;
|
||||
FileDatacost_sheet: {uploadedfile_name?:any, filePreview: string | ArrayBuffer | null }[] = []; // Initialize the array
|
||||
selectedcost_sheet: File[]=[];
|
||||
public onFileChangedcost_sheet(event, index) {
|
||||
const files = event.target.files;
|
||||
for (let i = 0; i < files.length; i++) {
|
||||
const file = files[i];
|
||||
this.FileDatacost_sheet[index].uploadedfile_name = files[i].name;
|
||||
this.selectedcost_sheet.push(files[i]);
|
||||
if (file.type.startsWith('file/')) {
|
||||
const reader = new FileReader();
|
||||
reader.onload = (e) => {
|
||||
// Set the file preview source
|
||||
const filePreview = e.target?.result as string;
|
||||
this.FileDatacost_sheet[index] = {
|
||||
...this.FileDatacost_sheet[index], // Preserve existing properties
|
||||
filePreview: filePreview // Update only the filePreview property
|
||||
};
|
||||
};
|
||||
reader.readAsDataURL(file);
|
||||
}
|
||||
}
|
||||
}
|
||||
onAddLinescost_sheet(){
|
||||
this.FileDatacost_sheet.push({
|
||||
uploadedfile_name: "",
|
||||
filePreview: "",
|
||||
// f3: "",
|
||||
});
|
||||
}
|
||||
deleteRowcost_sheet(index,id) {
|
||||
this.FileDatacost_sheet.splice(index, 1);
|
||||
|
||||
if(id){
|
||||
this.mainService.uploadfiledeletecost_sheet(id).subscribe(data =>{
|
||||
console.log(data);
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
goToDataM(){
|
||||
this.router.navigate(['/cns-portal/datamanagement'],{ relativeTo: this.route });
|
||||
}
|
||||
|
||||
|
||||
downloadCSV(tableName): void {
|
||||
this.mainService.downloadCSV(tableName).subscribe(response => {
|
||||
const blob = new Blob([response], { type: 'application/octet-stream' });
|
||||
const url = window.URL.createObjectURL(blob);
|
||||
const a = document.createElement('a');
|
||||
a.href = url;
|
||||
a.download = `${tableName}.csv`;
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
document.body.removeChild(a);
|
||||
});
|
||||
}// updateaction
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,59 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from "rxjs";
|
||||
import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http";
|
||||
import { ApiRequestService } from "src/app/services/api/api-request.service";
|
||||
import { environment } from 'src/environments/environment';
|
||||
import baseUrl from 'src/app/services/api/helper';
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class Cost_sheetservice{
|
||||
private baseURL = "Cost_sheet/Cost_sheet" ; constructor(
|
||||
private http: HttpClient,
|
||||
private apiRequest: ApiRequestService,
|
||||
) { }
|
||||
getAll(page?: number, size?: number): Observable<any> {
|
||||
return this.apiRequest.get(this.baseURL);
|
||||
}
|
||||
getById(id: number): Observable<any> {
|
||||
const _http = this.baseURL + "/" + id;
|
||||
return this.apiRequest.get(_http);
|
||||
}
|
||||
create(data: any): Observable<any> {
|
||||
return this.apiRequest.post(this.baseURL, data);
|
||||
}
|
||||
update(id: number, data: any): Observable<any> {
|
||||
const _http = this.baseURL + "/" + id;
|
||||
return this.apiRequest.put(_http, data);
|
||||
}
|
||||
delete(id: number): Observable<any> {
|
||||
const _http = this.baseURL + "/" + id;
|
||||
return this.apiRequest.delete(_http);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
uploadfilecost_sheet(ref:any, Cost_sheet:any, file:any): Observable<any>{
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
return this.apiRequest.postFormData(`FileUpload/Uploadeddocs/${ref}/${Cost_sheet}`, formData);
|
||||
}
|
||||
|
||||
uploadfilegetByIdcost_sheet(ref:any, Cost_sheet:any,): Observable<any> {
|
||||
return this.apiRequest.get(`FileUpload/Uploadeddocs/${ref}/${Cost_sheet}`);
|
||||
}
|
||||
|
||||
|
||||
uploadfiledeletecost_sheet(id: number): Observable<any> {
|
||||
return this.apiRequest.delete(`FileUpload/Uploadeddocs/${id}`);
|
||||
}
|
||||
|
||||
downloadCSV(tableName: string): Observable<Blob> {
|
||||
const url = `${baseUrl}/api/template/download-csv?tableName=${tableName}`;
|
||||
return this.http.get(url, { responseType: 'blob' })
|
||||
|
||||
}// updateaction
|
||||
}
|
||||
@ -0,0 +1,4 @@
|
||||
export const Cost_sheetcardvariable = {
|
||||
"cardButton": false,
|
||||
"cardmodeldata": ``
|
||||
}
|
||||
@ -0,0 +1,382 @@
|
||||
<ol class="breadcrumb breadcrumb-arrow font-trirong">
|
||||
<li><a href="javascript://"> Gender</a></li>
|
||||
</ol>
|
||||
<div class="dg-wrapper">
|
||||
<div class="clr-row">
|
||||
<div class="clr-col-8">
|
||||
<h3>Gender </h3>
|
||||
</div>
|
||||
<div class="clr-col-4" style="text-align: right;">
|
||||
<button *ngIf="cardButton" id="add" class="btn btn-primary btn-icon" (click)="changeView()" >
|
||||
<clr-icon *ngIf="!isCardview" shape="grid-view"></clr-icon> <clr-icon *ngIf="isCardview" shape="bars"></clr-icon>
|
||||
</button>
|
||||
<!-- upload and download template -->
|
||||
<button class="btn btn-outline" (click)="goToDataM()">
|
||||
Upload
|
||||
</button>
|
||||
<button class="btn btn-outline" (click)="downloadCSV(tableName)" >
|
||||
<clr-icon shape="export" ></clr-icon> Download
|
||||
</button>
|
||||
<!-- upload and download template end here--> <!-- button -->
|
||||
<button id="add" class="btn btn-primary" (click)="goToAdd(product)" >
|
||||
<clr-icon shape="plus"></clr-icon>ADD
|
||||
</button>
|
||||
</div></div>
|
||||
<ng-container *ngIf="!isCardview"> <!-- GET ALL --> <clr-datagrid [clrDgLoading]="loading" [(clrDgSelected)]="selected">
|
||||
<clr-dg-placeholder>
|
||||
<ng-template #loadingSpinner>
|
||||
<clr-spinner>Loading ... </clr-spinner>
|
||||
</ng-template>
|
||||
<div *ngIf="error;else loadingSpinner">{{error}}</div>
|
||||
</clr-dg-placeholder>
|
||||
|
||||
<clr-dg-column [clrDgField]="' name'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Name
|
||||
</ng-container></clr-dg-column>
|
||||
|
||||
|
||||
<clr-dg-column [clrDgField]="' description'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Description
|
||||
</ng-container></clr-dg-column>
|
||||
|
||||
|
||||
<clr-dg-column [clrDgField]="' active'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Active
|
||||
</ng-container></clr-dg-column>
|
||||
|
||||
|
||||
<!-- who column -->
|
||||
<clr-dg-column> <ng-container *clrDgHideableColumn="{hidden: false}">
|
||||
<clr-icon shape="bars"></clr-icon> Action
|
||||
</ng-container></clr-dg-column>
|
||||
<!-- end -->
|
||||
|
||||
<clr-dg-row *clrDgItems="let user of product" [clrDgItem]="user">
|
||||
|
||||
<clr-dg-cell>{{user. name }}</clr-dg-cell>
|
||||
|
||||
|
||||
<clr-dg-cell (click)="goToReplaceStringdescription (user.description)" style="cursor: pointer; align-items: center;"><clr-icon shape="details"></clr-icon>
|
||||
</clr-dg-cell>
|
||||
|
||||
|
||||
<clr-dg-cell>{{user. active }}</clr-dg-cell>
|
||||
|
||||
|
||||
<!-- who column -->
|
||||
<clr-dg-cell>
|
||||
<clr-signpost>
|
||||
<span style="cursor: pointer;" clrSignpostTrigger><clr-icon shape="help" class="success" style="color: rgb(0, 130, 236);"></clr-icon></span>
|
||||
<clr-signpost-content [clrPosition]="'left-middle'" *clrIfOpen>
|
||||
<h5 style="margin-top: 0">Who Column</h5>
|
||||
<div>Account ID: <code class="clr-code">{{user.accountId}}</code></div>
|
||||
<div>Created At: <code class="clr-code">{{user.createdAt| date}}</code></div>
|
||||
<div>Created By: <code class="clr-code">{{user.createdBy}}</code></div>
|
||||
<div>Updated At: <code class="clr-code">{{user.updatedAt | date}}</code></div>
|
||||
<div>Updated By: <code class="clr-code">{{user.updatedBy}}</code></div>
|
||||
</clr-signpost-content>
|
||||
</clr-signpost>
|
||||
</clr-dg-cell>
|
||||
|
||||
<!-- who colmn -->
|
||||
|
||||
<clr-dg-action-overflow>
|
||||
<button class="action-item" (click)="onEdit(user)">Edit</button>
|
||||
<button class="action-item" (click)="onDelete(user)">Delete</button>
|
||||
</clr-dg-action-overflow>
|
||||
</clr-dg-row>
|
||||
<clr-dg-footer>
|
||||
<clr-dg-pagination #pagination [clrDgPageSize]="10">
|
||||
<clr-dg-page-size [clrPageSizeOptions]="[10,20,50,100]">Users per page</clr-dg-page-size>
|
||||
{{pagination.firstItem + 1}} - {{pagination.lastItem + 1}}
|
||||
of {{pagination.totalItems}} users
|
||||
</clr-dg-pagination>
|
||||
</clr-dg-footer>
|
||||
</clr-datagrid> </ng-container>
|
||||
<ng-template #showInfo>
|
||||
<div class="alert alert-info" role="alert">
|
||||
<div class="alert-items">
|
||||
<div class="alert-item static">
|
||||
<span class="alert-text">
|
||||
<clr-icon class="alert-icon" shape="info-circle"></clr-icon>
|
||||
Data could be found. Loading..
|
||||
<clr-spinner [clrMedium]="true">Loading ...</clr-spinner>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template><ng-container *ngIf="isCardview">
|
||||
<div *ngIf="product; else showInfo" class="clr-row clr-align-items-start clr-justify-content-start">
|
||||
<div *ngFor="let app of product| filter:search; let index = i" class="clr-col-auto" >
|
||||
<div class="clr-row">
|
||||
<div class="clr-col-lg-12 clr-col-md-4 clr-col-sm-4 clr-col-12" style="width: 410px;">
|
||||
<div class="card" style="padding: 10px; "[style.background-color]="cardmodal.cardColor !== '' ? cardmodal.cardColor : 'white'">
|
||||
<div class="card-body" style="display: grid; grid-template-columns: repeat(13, 1fr); grid-template-rows: repeat(7, 1fr); gap: 5px;">
|
||||
<ng-container *ngFor="let item of dashboardArray">
|
||||
<div [style.gridColumn]="item.x + 1" [style.gridRow]="item.y + 1" [style.gridColumnEnd]="item.x + item.cols + 1"
|
||||
[style.gridRowEnd]="item.y + item.rows + 1">
|
||||
<div *ngIf="item.name === 'textField'" class="title-card card-title"
|
||||
[style.text-align]="item.alignment !== '' ? item.alignment : 'left'"
|
||||
[style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'"
|
||||
[style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'"
|
||||
[style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'"
|
||||
[style.font-style]="item.italic == true ? 'Italic' : 'normal'"
|
||||
[style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :
|
||||
(item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))"
|
||||
[style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'"
|
||||
[style.color]="item.textcolor !== '' ? item.textcolor : 'black'" [style.background-color]="item.conditionValue == app[transform(item.fieldtext) ] ? item.conditionbackgroundcolor : item.backgroundcolor"
|
||||
[style.color]="item.conditionValue == app[transform(item.fieldtext) ] ? item.conditiontextcolor : item.textcolor">
|
||||
{{beforeText(item.fieldtext)}}
|
||||
{{ app[transform(item.fieldtext) ] }}
|
||||
{{afterText(item.fieldtext)}}
|
||||
</div>
|
||||
|
||||
<div *ngIf="item.name === 'dateField'" class="title-card card-title"
|
||||
[style.text-align]="item.alignment !== '' ? item.alignment : 'left'"
|
||||
[style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'"
|
||||
[style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'"
|
||||
[style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'"
|
||||
[style.font-style]="item.italic == true ? 'Italic' : 'normal'"
|
||||
[style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :
|
||||
(item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))"
|
||||
[style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'"
|
||||
[style.color]="item.textcolor !== '' ? item.textcolor : 'black'" [style.background-color]="item.conditionValue == app[transform(item.fieldtext) ] ? item.conditionbackgroundcolor : item.backgroundcolor"
|
||||
[style.color]="item.conditionValue == app[transform(item.fieldtext) ] ? item.conditiontextcolor : item.textcolor">
|
||||
{{beforeText(item.fieldtext)}}
|
||||
{{ app[transform(item.fieldtext) ] | date}}
|
||||
{{afterText(item.fieldtext)}}
|
||||
</div>
|
||||
<div *ngIf="item.name === 'numberField'" class="title-card card-title"
|
||||
[style.text-align]="item.alignment !== '' ? item.alignment : 'left'"
|
||||
[style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'"
|
||||
[style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'"
|
||||
[style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'"
|
||||
[style.font-style]="item.italic == true ? 'Italic' : 'normal'"
|
||||
[style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :
|
||||
(item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))"
|
||||
[style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'"
|
||||
[style.color]="item.textcolor !== '' ? item.textcolor : 'black'" [style.background-color]="item.conditionValue == app[transform(item.fieldtext) ] ? item.conditionbackgroundcolor : item.backgroundcolor"
|
||||
[style.color]="item.conditionValue == app[transform(item.fieldtext) ] ? item.conditiontextcolor : item.textcolor">
|
||||
{{beforeText(item.fieldtext)}}
|
||||
{{ app[transform(item.fieldtext) ]}}
|
||||
{{afterText(item.fieldtext)}}
|
||||
</div>
|
||||
|
||||
<div *ngIf="item.name === 'Line'" class="title-card card-title"
|
||||
[style.text-align]="item.alignment !== '' ? item.alignment : 'left'"
|
||||
[style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'"
|
||||
[style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'"
|
||||
[style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'"
|
||||
[style.font-style]="item.italic == true ? 'Italic' : 'normal'"
|
||||
[style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :
|
||||
(item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))"
|
||||
[style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'"
|
||||
[style.color]="item.textcolor !== '' ? item.textcolor : 'black'">
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
|
||||
<div *ngIf="item.name === 'Icon'" class="icon-card"
|
||||
[style.text-align]="item.alignment !== '' ? item.alignment : 'left'"
|
||||
[style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'"
|
||||
[style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'"
|
||||
[style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'"
|
||||
[style.font-style]="item.italic == true ? 'Italic' : 'normal'"
|
||||
[style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :
|
||||
(item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))"
|
||||
[style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'"
|
||||
[style.color]="item.textcolor !== '' ? item.textcolor : 'black'"
|
||||
>
|
||||
<clr-icon [attr.shape]="item.iconName"></clr-icon>
|
||||
</div>
|
||||
|
||||
<div *ngIf="item.name == 'Image'"
|
||||
[style.text-align]="item.alignment !== '' ? item.alignment : 'left'"
|
||||
[style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'"
|
||||
[style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'"
|
||||
[style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'"
|
||||
[style.font-style]="item.italic == true ? 'Italic' : 'normal'"
|
||||
[style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :
|
||||
(item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))"
|
||||
[style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'"
|
||||
[style.color]="item.textcolor !== '' ? item.textcolor : 'black'"
|
||||
[style.background-color]="item.conditionValue == app[transform(item.fieldtext) ] ? item.conditionbackgroundcolor : item.backgroundcolor"
|
||||
[style.color]="item.conditionValue == app[transform(item.fieldtext) ] ? item.conditiontextcolor : item.textcolor"> <img id="filePreview" [src]="item.imageURL" alt="File Preview"
|
||||
[style.width]="item.imagewidth !== '' ? item.imagewidth + 'px' : '100px'"
|
||||
[style.height]="item.imagewidth !== '' ? item.imagewidth + 'px' : '100px'"></div>
|
||||
</div>
|
||||
</ng-container>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<clr-modal [(clrModalOpen)]="rsModaldescription" [clrModalSize]="'xl'" [clrModalStaticBackdrop]="true">
|
||||
<div class="modal-body">
|
||||
<textarea class="form-control" style="width:100%; height: 400px;" readonly>{{rowSelected}}</textarea>
|
||||
</div></clr-modal>
|
||||
|
||||
|
||||
|
||||
<!-- // EDIT DATA......... -->
|
||||
<clr-modal [(clrModalOpen)]="modalEdit" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true">
|
||||
<h3 class="modal-title">Update Gender <!--update button -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</h3>
|
||||
<div class="modal-body" *ngIf="rowSelected.id">
|
||||
<h2 class="heading">{{rowSelected.id}}</h2>
|
||||
<!-- button -->
|
||||
<form >
|
||||
<div class="clr-row">
|
||||
<div class="clr-col-sm-12">
|
||||
<label>Name</label>
|
||||
<input class="clr-input" type="text" [(ngModel)]="rowSelected.name" name="name" />
|
||||
</div>
|
||||
|
||||
<div class="clr-col-sm-12">
|
||||
<label> Description</label>
|
||||
<textarea cols="10" rows="2"[(ngModel)]="rowSelected.description" name="description " placeholder="Textarea"> </textarea>
|
||||
</div>
|
||||
|
||||
<div class="clr-col-sm-12">
|
||||
<label> Active</label>
|
||||
<input type="checkbox" name="active" clrToggle [(ngModel)]="rowSelected.active" /> </div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- form code start -->
|
||||
<div *ngIf="checkFormCode">
|
||||
<h4 style="font-weight: 300;display: inline;">Extension</h4>
|
||||
<br>
|
||||
<hr>
|
||||
<div class="clr-row">
|
||||
<div class="clr-col-4" *ngFor="let field of additionalFieldsFromBackend">
|
||||
<ng-container *ngIf="field.formCode === formcode" [ngSwitch]="field.fieldType">
|
||||
<!-- Text Input --> <label *ngSwitchCase="'text'">{{ field.fieldName }}</label>
|
||||
<input *ngSwitchCase="'text'" [type]="field.fieldType" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]" class="clr-input" />
|
||||
|
||||
<!-- Date Input --> <label *ngSwitchCase="'date'">{{ field.fieldName }}</label>
|
||||
<input *ngSwitchCase="'date'" [type]="field.fieldType" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]" class="clr-input" />
|
||||
|
||||
<!-- Textarea --> <label *ngSwitchCase="'textarea'">{{ field.fieldName }}</label>
|
||||
<textarea *ngSwitchCase="'textarea'" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]" col="10" row="2"></textarea>
|
||||
|
||||
<!-- Checkbox --> <label *ngSwitchCase="'checkbox'">{{ field.fieldName }}</label><br>
|
||||
<input *ngSwitchCase="'checkbox'" [type]="field.fieldType" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]" class="clr-checkbox" />
|
||||
</ng-container>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- form code end --> <div class="modal-footer">
|
||||
<button type="button" class="btn btn-outline" (click)="modalEdit = false">Cancel</button>
|
||||
<button type="submit" class="btn btn-primary" (click)="onUpdate(rowSelected.id)">Update</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</clr-modal>
|
||||
<clr-modal [(clrModalOpen)]="modaldelete" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true">
|
||||
<div class="modal-body" *ngIf="rowSelected.id">
|
||||
<h1 class="delete">Are You Sure Want to delete?</h1>
|
||||
<h2 class="heading">{{rowSelected.id}}</h2>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-outline" (click)="modaldelete = false">Cancel</button>
|
||||
<button type="button" (click)="delete(rowSelected.id)" class="btn btn-primary" >Delete</button>
|
||||
</div>
|
||||
</div>
|
||||
</clr-modal>
|
||||
<!-- ADD FORM ..... -->
|
||||
<clr-modal [(clrModalOpen)]="modalAdd" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true">
|
||||
<h3 class="modal-title">Add Gender
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- aeroplane icon -->
|
||||
|
||||
<a *ngIf="userrole.includes('ROLE_ADMIN')" style="float: right;" href="javascript:void(0)" role="tooltip" aria-haspopup="true"
|
||||
class="tooltip tooltip-sm tooltip-bottom-left">
|
||||
<a id="build_extension" [routerLink]="['../extension/all']" [queryParams]="{ formCode: 'Gender_formCode' }">
|
||||
<clr-icon shape="airplane" size="32"></clr-icon>
|
||||
</a>
|
||||
<span class="tooltip-content">Form Extension</span>
|
||||
</a> </h3>
|
||||
<div class="modal-body">
|
||||
<form [formGroup]="entryForm" >
|
||||
<div class="clr-row" style="height: fit-content;">
|
||||
|
||||
<div class="clr-col-sm-12">
|
||||
<label> Name</label>
|
||||
<input class="clr-input" type="text" formControlName="name" />
|
||||
</div>
|
||||
|
||||
<div class="clr-col-sm-12">
|
||||
<label> Description</label>
|
||||
<textarea cols="10" rows="2" formControlName="description" placeholder="Textarea"> </textarea>
|
||||
</div>
|
||||
|
||||
<div class="clr-col-sm-12">
|
||||
<label> Active</label>
|
||||
<input type="checkbox" formControlName="active" clrToggle/> </div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- form code start -->
|
||||
<div *ngIf="checkFormCode">
|
||||
<h4 style="font-weight: 300;display: inline;">Extension</h4>
|
||||
<br>
|
||||
<hr>
|
||||
<div class="clr-row">
|
||||
<div class="clr-col-4" *ngFor="let field of additionalFieldsFromBackend">
|
||||
<ng-container *ngIf="field.formCode === formcode" [ngSwitch]="field.fieldType">
|
||||
<!-- Text Input --> <label *ngSwitchCase="'text'">{{ field.fieldName }}</label>
|
||||
<input *ngSwitchCase="'text'" [type]="field.fieldType" [formControlName]="field.extValue"
|
||||
class="clr-input" />
|
||||
<!-- Date Input --> <label *ngSwitchCase="'date'">{{ field.fieldName }}</label>
|
||||
<input *ngSwitchCase="'date'" [type]="field.fieldType" [formControlName]="field.extValue"
|
||||
class="clr-input" />
|
||||
<!-- Textarea --> <label *ngSwitchCase="'textarea'">{{ field.fieldName }}</label>
|
||||
<textarea *ngSwitchCase="'textarea'" [formControlName]="field.extValue" col="10" row="2"></textarea>
|
||||
<!-- Checkbox --> <label *ngSwitchCase="'checkbox'">{{ field.fieldName }}</label><br>
|
||||
<input *ngSwitchCase="'checkbox'" [type]="field.fieldType" [formControlName]="field.extValue"
|
||||
class="clr-checkbox" />
|
||||
</ng-container>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- form code end --> <div class="modal-footer">
|
||||
<button type="button" class="btn btn-outline" (click)="modalAdd = false">Cancel</button>
|
||||
<button type="submit" class="btn btn-primary" (click)="onSubmit()">ADD</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</clr-modal>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- htmlpopup -->
|
||||
@ -0,0 +1,78 @@
|
||||
//@import "../../../../assets/scss/var";
|
||||
.s-info-bar {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
button {
|
||||
outline: none;
|
||||
}
|
||||
}
|
||||
.delete,.heading{
|
||||
text-align: center;
|
||||
color: red;
|
||||
}
|
||||
.entry-pg {
|
||||
width: 750px;
|
||||
}
|
||||
|
||||
.button1::after {
|
||||
content: none;
|
||||
}
|
||||
.button1:hover::after {
|
||||
content: "ADD ROWS";
|
||||
}
|
||||
|
||||
.section {
|
||||
background-color: #dddddd;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.section p {
|
||||
//color: white;
|
||||
padding: 10px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.clr-input {
|
||||
color: #212529;
|
||||
border: 1px solid #ced4da;
|
||||
border-radius: 0.25rem;
|
||||
padding: 0.75rem 0.75rem;
|
||||
margin-top: 3px;
|
||||
width: 100%;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.clr-file {
|
||||
color: #212529;
|
||||
border: 1px solid #ced4da;
|
||||
border-radius: 0.25rem;
|
||||
//padding: 0.6rem 0.75rem;
|
||||
margin-top: 3px;
|
||||
width: 100%;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.center {
|
||||
text-align: center;
|
||||
}
|
||||
select{
|
||||
width: 100%;
|
||||
margin-top: 3px;
|
||||
padding: 5px 5px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
}
|
||||
input[type=text],[type=date],[type=number],textarea {
|
||||
width: 100%;
|
||||
padding: 15px 15px;
|
||||
background-color:rgb(255, 255, 255);
|
||||
// margin: 8px 0;
|
||||
display: inline-block;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.error_mess {
|
||||
color: red;
|
||||
}
|
||||
@ -0,0 +1,288 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ToastrService } from 'ngx-toastr';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { Genderservice} from './Gender.service';
|
||||
import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms';
|
||||
import { ExtensionService } from 'src/app/services/fnd/extension.service';
|
||||
import { DashboardContentModel2 } from 'src/app/models/builder/dashboard';
|
||||
import { Gendercardvariable } from './Gender_cardvariable';
|
||||
import { UserInfoService } from 'src/app/services/user-info.service';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
declare var JsBarcode: any;
|
||||
@Component({
|
||||
selector: 'app-Gender',
|
||||
templateUrl: './Gender.component.html',
|
||||
styleUrls: ['./Gender.component.scss']
|
||||
})
|
||||
export class GenderComponent implements OnInit {
|
||||
cardButton = Gendercardvariable.cardButton;
|
||||
cardmodeldata = Gendercardvariable.cardmodeldata;
|
||||
public dashboardArray: DashboardContentModel2[];
|
||||
isCardview = Gendercardvariable.cardButton;
|
||||
cardmodal; changeView(){
|
||||
this.isCardview = !this.isCardview;
|
||||
}
|
||||
beforeText(fieldtext: string): string { // Extract the text before the first '<'
|
||||
const index = fieldtext.indexOf('<');
|
||||
return index !== -1 ? fieldtext.substring(0, index) : fieldtext;
|
||||
}
|
||||
afterText(fieldtext: string): string { // Extract the text after the last '>'
|
||||
const index = fieldtext.lastIndexOf('>');
|
||||
return index !== -1 ? fieldtext.substring(index + 1) : '';
|
||||
}
|
||||
transform(fieldtext: string): string {
|
||||
const match = fieldtext.match(/<([^>]*)>/);
|
||||
return match ? match[1] : ''; // Extract the text between '<' and '>'
|
||||
}
|
||||
userrole;
|
||||
rowSelected :any= {};
|
||||
modaldelete=false;
|
||||
modalEdit=false;
|
||||
modalAdd= false;
|
||||
public entryForm: FormGroup;
|
||||
loading = false;
|
||||
product;
|
||||
modalOpenedforNewLine = false;
|
||||
newLine:any;
|
||||
additionalFieldsFromBackend: any[] = [];
|
||||
formcode = 'Gender_formCode'
|
||||
tableName = 'Gender'; checkFormCode; selected: any[] = []; constructor(
|
||||
private extensionService: ExtensionService,
|
||||
private userInfoService:UserInfoService,
|
||||
private mainService:Genderservice,
|
||||
private alertService: AlertService,
|
||||
private toastr: ToastrService,
|
||||
private _fb: FormBuilder,
|
||||
private router: Router,
|
||||
private route: ActivatedRoute ) { }
|
||||
// component button
|
||||
ngOnInit(): void {
|
||||
if(this.cardmodeldata !== ''){
|
||||
this.cardmodal = JSON.parse(this.cardmodeldata);
|
||||
this.dashboardArray = this.cardmodal.dashboard.slice();
|
||||
console.log(this.dashboardArray)
|
||||
}
|
||||
this.userrole=this.userInfoService.getRoles();
|
||||
this.getData();
|
||||
this.entryForm = this._fb.group({
|
||||
name : [null],
|
||||
|
||||
description : [null],
|
||||
|
||||
active : [false],
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}); // component_button200
|
||||
// form code start
|
||||
this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => {
|
||||
console.log(data);
|
||||
const jsonArray = data.map((str) => JSON.parse(str));
|
||||
this.additionalFieldsFromBackend = jsonArray;
|
||||
this.checkFormCode = this.additionalFieldsFromBackend.some(field => field.formCode === "Gender_formCode");
|
||||
console.log(this.checkFormCode);
|
||||
console.log(this.additionalFieldsFromBackend);
|
||||
if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) {
|
||||
this.additionalFieldsFromBackend.forEach(field => {
|
||||
if (field.formCode === this.formcode) {
|
||||
if (!this.entryForm.contains(field.extValue)) {
|
||||
// Add the control only if it doesn't exist in the form
|
||||
this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
console.log(this.entryForm.value);
|
||||
// form code end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
error;
|
||||
getData() {
|
||||
this.mainService.getAll().subscribe((data) => {
|
||||
console.log(data);
|
||||
this.product = data;
|
||||
if(this.product.length==0){
|
||||
this.error="No Data Available"
|
||||
}
|
||||
},(error) => {
|
||||
console.log(error);
|
||||
if(error){
|
||||
this.error="Server Error";
|
||||
}
|
||||
});
|
||||
}
|
||||
onEdit(row) {
|
||||
this.rowSelected = row;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
this.modalEdit = true;
|
||||
}
|
||||
onDelete(row) {
|
||||
this.rowSelected = row;
|
||||
this.modaldelete=true;
|
||||
}
|
||||
delete(id)
|
||||
{
|
||||
this.modaldelete = false;
|
||||
console.log("in delete "+id);
|
||||
this.mainService.delete(id).subscribe(
|
||||
(data) => {
|
||||
console.log(data);
|
||||
this.ngOnInit();
|
||||
if (data) { this.toastr.success('Deleted successfully'); }
|
||||
});
|
||||
}
|
||||
onUpdate(id) {
|
||||
this.modalEdit = false;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//console.log("in update");
|
||||
console.log("id " + id);
|
||||
console.log(this.rowSelected);
|
||||
//console.log("out update");
|
||||
this.mainService.update(id, this.rowSelected).subscribe(
|
||||
(data) => {
|
||||
console.log(data);
|
||||
if (data || data.status >= 200 && data.status <= 299) {
|
||||
this.toastr.success("Update Successfully");
|
||||
}
|
||||
setTimeout(() => {
|
||||
this.ngOnInit();
|
||||
}, 500);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}, (error) => {
|
||||
console.log(error);
|
||||
if (error.status >= 200 && error.status <= 299) {
|
||||
// this.toastr.success("update Succesfully");
|
||||
}
|
||||
if (error.status >= 400 && error.status <= 499) {
|
||||
this.toastr.error("Not Updated");
|
||||
}
|
||||
if (error.status >= 500 && error.status <= 599) {
|
||||
this.toastr.error("Not Updated");
|
||||
}
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.ngOnInit();
|
||||
}, 500);
|
||||
}
|
||||
onCreate() {
|
||||
this.modalAdd=false;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
this.mainService.create(this.entryForm.value).subscribe(
|
||||
(data) => {
|
||||
console.log(data);
|
||||
if (data || data.status >= 200 && data.status <= 299) {
|
||||
this.toastr.success("Added Successfully");
|
||||
}
|
||||
setTimeout(() => {
|
||||
this.ngOnInit();
|
||||
}, 500);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}, (error) => {
|
||||
console.log(error);
|
||||
if (error.status >= 200 && error.status <= 299) {
|
||||
// this.toastr.success("Added Succesfully");
|
||||
}
|
||||
if (error.status >= 400 && error.status <= 499) {
|
||||
this.toastr.error("Not Added");
|
||||
}
|
||||
if (error.status >= 500 && error.status <= 599) {
|
||||
this.toastr.error("Not Added");
|
||||
}
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.ngOnInit();
|
||||
}, 500);
|
||||
}
|
||||
goToAdd(row) {
|
||||
this.modalAdd = true; this.submitted = false;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
submitted = false;
|
||||
onSubmit() {
|
||||
console.log(this.entryForm.value);
|
||||
this.submitted = true;
|
||||
if (this.entryForm.invalid) {
|
||||
return;
|
||||
}this.onCreate();
|
||||
|
||||
}
|
||||
|
||||
|
||||
rsModaldescription = false;
|
||||
goToReplaceStringdescription(row){
|
||||
this.rowSelected = row; this.rsModaldescription =true; }
|
||||
|
||||
|
||||
|
||||
goToDataM(){
|
||||
this.router.navigate(['/cns-portal/datamanagement'],{ relativeTo: this.route });
|
||||
}
|
||||
|
||||
|
||||
downloadCSV(tableName): void {
|
||||
this.mainService.downloadCSV(tableName).subscribe(response => {
|
||||
const blob = new Blob([response], { type: 'application/octet-stream' });
|
||||
const url = window.URL.createObjectURL(blob);
|
||||
const a = document.createElement('a');
|
||||
a.href = url;
|
||||
a.download = `${tableName}.csv`;
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
document.body.removeChild(a);
|
||||
});
|
||||
}// updateaction
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,44 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from "rxjs";
|
||||
import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http";
|
||||
import { ApiRequestService } from "src/app/services/api/api-request.service";
|
||||
import { environment } from 'src/environments/environment';
|
||||
import baseUrl from 'src/app/services/api/helper';
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class Genderservice{
|
||||
private baseURL = "Gender/Gender" ; constructor(
|
||||
private http: HttpClient,
|
||||
private apiRequest: ApiRequestService,
|
||||
) { }
|
||||
getAll(page?: number, size?: number): Observable<any> {
|
||||
return this.apiRequest.get(this.baseURL);
|
||||
}
|
||||
getById(id: number): Observable<any> {
|
||||
const _http = this.baseURL + "/" + id;
|
||||
return this.apiRequest.get(_http);
|
||||
}
|
||||
create(data: any): Observable<any> {
|
||||
return this.apiRequest.post(this.baseURL, data);
|
||||
}
|
||||
update(id: number, data: any): Observable<any> {
|
||||
const _http = this.baseURL + "/" + id;
|
||||
return this.apiRequest.put(_http, data);
|
||||
}
|
||||
delete(id: number): Observable<any> {
|
||||
const _http = this.baseURL + "/" + id;
|
||||
return this.apiRequest.delete(_http);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
downloadCSV(tableName: string): Observable<Blob> {
|
||||
const url = `${baseUrl}/api/template/download-csv?tableName=${tableName}`;
|
||||
return this.http.get(url, { responseType: 'blob' })
|
||||
|
||||
}// updateaction
|
||||
}
|
||||
@ -0,0 +1,4 @@
|
||||
export const Gendercardvariable = {
|
||||
"cardButton": false,
|
||||
"cardmodeldata": ``
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user