* [Logic] Login menggunakan get by NIK * [UI] Menampilkan nama kasir * [Logic] Testing request API menggunakan RxJava * [Model] Pagination, Tas, dan Karyawanpull/1/head
| @@ -9,6 +9,8 @@ | |||
| <maven.compiler.source>11</maven.compiler.source> | |||
| <maven.compiler.target>11</maven.compiler.target> | |||
| <javafx.version>11.0.2</javafx.version> | |||
| <retrofit.version>2.7.1</retrofit.version> | |||
| <commons-lang.version>2.6</commons-lang.version> | |||
| <mainClass>id.amigogroup.posterminal.ShadeApp</mainClass> | |||
| </properties> | |||
| <dependencies> | |||
| @@ -40,6 +42,31 @@ | |||
| <version>${javafx.version}</version> | |||
| <classifier>mac</classifier> | |||
| </dependency>--> | |||
| <dependency> | |||
| <groupId>io.reactivex.rxjava2</groupId> | |||
| <artifactId>rxjava</artifactId> | |||
| <version>2.2.17</version> | |||
| </dependency> | |||
| <dependency> | |||
| <groupId>com.squareup.retrofit2</groupId> | |||
| <artifactId>retrofit</artifactId> | |||
| <version>${retrofit.version}</version> | |||
| </dependency> | |||
| <dependency> | |||
| <groupId>com.squareup.retrofit2</groupId> | |||
| <artifactId>converter-jackson</artifactId> | |||
| <version>${retrofit.version}</version> | |||
| </dependency> | |||
| <dependency> | |||
| <groupId>com.squareup.retrofit2</groupId> | |||
| <artifactId>adapter-rxjava2</artifactId> | |||
| <version>${retrofit.version}</version> | |||
| </dependency> | |||
| <dependency> | |||
| <groupId>commons-lang</groupId> | |||
| <artifactId>commons-lang</artifactId> | |||
| <version>${commons-lang.version}</version> | |||
| </dependency> | |||
| </dependencies> | |||
| <build> | |||
| <plugins><!-- Maven Shade Plugin --> | |||
| @@ -1,5 +1,8 @@ | |||
| package id.amigogroup.posterminal; | |||
| import com.fasterxml.jackson.databind.ObjectMapper; | |||
| import id.amigogroup.posterminal.api.AmigoPosRx; | |||
| import id.amigogroup.posterminal.model.Tas; | |||
| import id.amigogroup.posterminal.pencarian.DialogCariBarangController; | |||
| import id.amigogroup.posterminal.pencarian.DialogCariNotaTundaController; | |||
| import id.amigogroup.posterminal.pencarian.DialogCariPelangganController; | |||
| @@ -9,6 +12,7 @@ import id.amigogroup.posterminal.transaksi.DialogTambahNotaController; | |||
| import id.amigogroup.posterminal.transaksi.FormTransaksiReturController; | |||
| import id.amigogroup.posterminal.transaksi.FormTransaksiTunaiController; | |||
| import id.amigogroup.posterminal.util.Fucout; | |||
| import io.reactivex.Observable; | |||
| import java.io.IOException; | |||
| import java.net.URL; | |||
| import java.util.ArrayList; | |||
| @@ -28,6 +32,7 @@ import javafx.scene.Node; | |||
| import javafx.scene.Parent; | |||
| import javafx.scene.Scene; | |||
| import javafx.scene.control.Button; | |||
| import javafx.scene.control.Label; | |||
| import javafx.scene.control.ScrollPane; | |||
| import javafx.scene.image.Image; | |||
| import javafx.scene.input.KeyCode; | |||
| @@ -48,6 +53,8 @@ public class FormUtamaController implements Initializable { | |||
| @FXML | |||
| private VBox vbNavigasi; | |||
| @FXML | |||
| private Label lblNamaLogin; | |||
| @FXML | |||
| private Button btnTunai1Static; | |||
| @FXML | |||
| private Button btnRetur1Static; | |||
| @@ -69,6 +76,19 @@ public class FormUtamaController implements Initializable { | |||
| @Override | |||
| public void initialize(URL url, ResourceBundle rb) { | |||
| // setContent(formFactory.getForm(FormConstanta.TRANSAKSI_TUNAI, this)); | |||
| //TESTING RX JAVA | |||
| AmigoPosRx posRx = new AmigoPosRx(); | |||
| Observable<List<Tas>> daftarTas = posRx.getAllTas(); | |||
| daftarTas.subscribe((t) -> { | |||
| ObjectMapper mapper = new ObjectMapper(); | |||
| System.out.println(mapper.writeValueAsString(t)); | |||
| //UI Tampilkan | |||
| }); | |||
| // | |||
| if (SystemValue.karyawan != null) { | |||
| lblNamaLogin.setText(Fucout.getTextColon(SystemValue.karyawan.getNama())); | |||
| } | |||
| initShorcuts(); | |||
| @@ -0,0 +1,21 @@ | |||
| /* | |||
| * To change this license header, choose License Headers in Project Properties. | |||
| * To change this template file, choose Tools | Templates | |||
| * and open the template in the editor. | |||
| */ | |||
| package id.amigogroup.posterminal; | |||
| import id.amigogroup.posterminal.model.Karyawan; | |||
| /** | |||
| * | |||
| * @author ronal | |||
| */ | |||
| public class SystemValue { | |||
| //Contoh-contoh | |||
| public static String pelanggan = "Jono"; | |||
| public static boolean isMember = true; | |||
| public static String kasir = "Kasir1"; | |||
| // | |||
| public static Karyawan karyawan = null; | |||
| } | |||
| @@ -0,0 +1,25 @@ | |||
| /* | |||
| * To change this license header, choose License Headers in Project Properties. | |||
| * To change this template file, choose Tools | Templates | |||
| * and open the template in the editor. | |||
| */ | |||
| package id.amigogroup.posterminal.api; | |||
| import id.amigogroup.posterminal.model.Karyawan; | |||
| import id.amigogroup.posterminal.model.Tas; | |||
| import io.reactivex.Observable; | |||
| import java.util.List; | |||
| /** | |||
| * | |||
| * @author ronal | |||
| */ | |||
| public class AmigoPosRx { | |||
| public Observable<List<Tas>> getAllTas(){ | |||
| return UtilsApi.getServiceApiCheckin().getAllTas(); | |||
| } | |||
| public Observable<Karyawan> getKaryawanByNik(String nik){ | |||
| return UtilsApi.getServiceApiKaryawan().getKaryawanByNik(nik); | |||
| } | |||
| } | |||
| @@ -0,0 +1,21 @@ | |||
| /* | |||
| * To change this license header, choose License Headers in Project Properties. | |||
| * To change this template file, choose Tools | Templates | |||
| * and open the template in the editor. | |||
| */ | |||
| package id.amigogroup.posterminal.api; | |||
| import id.amigogroup.posterminal.model.Tas; | |||
| import io.reactivex.Observable; | |||
| import java.util.List; | |||
| import retrofit2.http.GET; | |||
| /** | |||
| * | |||
| * @author ronal | |||
| */ | |||
| public interface ServiceApiCheckin { | |||
| //Mengambil Semua Tas | |||
| @GET("tas") | |||
| Observable<List<Tas>> getAllTas(); | |||
| } | |||
| @@ -0,0 +1,21 @@ | |||
| /* | |||
| * To change this license header, choose License Headers in Project Properties. | |||
| * To change this template file, choose Tools | Templates | |||
| * and open the template in the editor. | |||
| */ | |||
| package id.amigogroup.posterminal.api; | |||
| import id.amigogroup.posterminal.model.Karyawan; | |||
| import io.reactivex.Observable; | |||
| import retrofit2.http.GET; | |||
| import retrofit2.http.Path; | |||
| /** | |||
| * | |||
| * @author ronal | |||
| */ | |||
| public interface ServiceApiKaryawan { | |||
| //Mengambil Karyawan berdasarkan Nik | |||
| @GET("karyawans/{nik}") | |||
| Observable<Karyawan> getKaryawanByNik(@Path("nik") String nik); | |||
| } | |||
| @@ -0,0 +1,30 @@ | |||
| /* | |||
| * To change this license header, choose License Headers in Project Properties. | |||
| * To change this template file, choose Tools | Templates | |||
| * and open the template in the editor. | |||
| */ | |||
| package id.amigogroup.posterminal.api; | |||
| import okhttp3.OkHttpClient; | |||
| import retrofit2.Retrofit; | |||
| import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory; | |||
| import retrofit2.converter.jackson.JacksonConverterFactory; | |||
| /** | |||
| * | |||
| * @author ronal | |||
| */ | |||
| public class ServiceGenerator { | |||
| private static OkHttpClient.Builder httpClient = new OkHttpClient.Builder(); | |||
| private static Retrofit.Builder builder | |||
| = new Retrofit.Builder() | |||
| .addCallAdapterFactory(RxJava2CallAdapterFactory.create()) | |||
| .addConverterFactory(JacksonConverterFactory.create()); | |||
| public static <S> S createService(String baseUrl, Class<S> serviceClass) { | |||
| Retrofit retrofit = builder.baseUrl(baseUrl).client(httpClient.build()).build(); | |||
| return retrofit.create(serviceClass); | |||
| } | |||
| } | |||
| @@ -0,0 +1,27 @@ | |||
| /* | |||
| * To change this license header, choose License Headers in Project Properties. | |||
| * To change this template file, choose Tools | Templates | |||
| * and open the template in the editor. | |||
| */ | |||
| package id.amigogroup.posterminal.api; | |||
| /** | |||
| * | |||
| * @author ronal | |||
| */ | |||
| public class UtilsApi { | |||
| // public static final String API_BASE_URL_BARANG = "http://192.168.0.230:8081/api/"; | |||
| // public static final String API_BASE_URL_CHECKIN = "http://192.168.0.230:8082/api/"; | |||
| public static final String API_BASE_URL_BARANG = "https://barang.amigogroup.id/api/"; | |||
| public static final String API_BASE_URL_CHECKIN = "https://checkin.amigogroup.id/api/"; | |||
| public static final String API_BASE_URL_KARYAWAN = "https://karyawan.amigogroup.id/api/"; | |||
| public static final String API_BASE_URL_PELANGGAN = "https://pelanggan.amigogroup.id/api/"; | |||
| public static ServiceApiCheckin getServiceApiCheckin() { | |||
| return ServiceGenerator.createService(API_BASE_URL_CHECKIN, ServiceApiCheckin.class); | |||
| } | |||
| public static ServiceApiKaryawan getServiceApiKaryawan() { | |||
| return ServiceGenerator.createService(API_BASE_URL_KARYAWAN, ServiceApiKaryawan.class); | |||
| } | |||
| } | |||
| @@ -31,6 +31,7 @@ public class FormBayarController implements Initializable { | |||
| private final String BAYAR_TUNAI = "Tunai"; | |||
| private final String BAYAR_KARTU = "Debit/Kredit"; | |||
| private final String BAYAR_RETUR = "Voucher Retur"; | |||
| private final String BAYAR_PROMO = "Voucher Promo"; | |||
| private final String BAYAR_GOPAY = "GoPay"; | |||
| private final String BAYAR_OVO = "OVO"; | |||
| private final String BAYAR_POIN = "Poin"; | |||
| @@ -40,6 +41,7 @@ public class FormBayarController implements Initializable { | |||
| Node nodeTunai; | |||
| Node nodeKartu; | |||
| Node nodeRetur; | |||
| Node nodePromo; | |||
| Node nodeGopay; | |||
| Node nodeOvo; | |||
| Node nodePoin; | |||
| @@ -104,6 +106,20 @@ public class FormBayarController implements Initializable { | |||
| } | |||
| } | |||
| break; | |||
| case BAYAR_PROMO: | |||
| if (kumpulanContent.nodePromo == null && chkSource.selectedProperty().get()) { | |||
| loader.setLocation(getClass().getResource("/fxml/FormBayarVoucherPromo.fxml")); | |||
| node = loader.load(); | |||
| vbContent.getChildren().add(node); | |||
| kumpulanContent.nodePromo = node; | |||
| } else { | |||
| if (kumpulanContent.nodePromo != null) { | |||
| vbContent.getChildren().remove(kumpulanContent.nodePromo); | |||
| kumpulanContent.nodePromo = null; | |||
| } | |||
| } | |||
| break; | |||
| case BAYAR_GOPAY: | |||
| break; | |||
| case BAYAR_OVO: | |||
| @@ -1,63 +0,0 @@ | |||
| /* | |||
| * To change this license header, choose License Headers in Project Properties. | |||
| * To change this template file, choose Tools | Templates | |||
| * and open the template in the editor. | |||
| */ | |||
| package id.amigogroup.posterminal.bayar; | |||
| import id.amigogroup.posterminal.util.Fucout; | |||
| import java.net.URL; | |||
| import java.util.ResourceBundle; | |||
| import javafx.fxml.FXML; | |||
| import javafx.fxml.Initializable; | |||
| import javafx.scene.control.TextField; | |||
| import javafx.scene.input.KeyCode; | |||
| import javafx.scene.input.KeyEvent; | |||
| import javafx.scene.robot.Robot; | |||
| /** | |||
| * FXML Controller class | |||
| * | |||
| * @author ronal | |||
| */ | |||
| public class FormBayarOldController implements Initializable { | |||
| @FXML | |||
| private TextField fldNoKartu1; | |||
| @FXML | |||
| private TextField fldNoKartu2; | |||
| @FXML | |||
| private TextField fldNoKartu3; | |||
| @FXML | |||
| private TextField fldNoKartu4; | |||
| /** | |||
| * Initializes the controller class. | |||
| */ | |||
| @Override | |||
| public void initialize(URL url, ResourceBundle rb) { | |||
| initComponents(); | |||
| } | |||
| private void initComponents() { | |||
| Fucout.forceFieldInteger(fldNoKartu1, 4); | |||
| Fucout.forceFieldInteger(fldNoKartu2, 4); | |||
| Fucout.forceFieldInteger(fldNoKartu3, 4); | |||
| Fucout.forceFieldInteger(fldNoKartu4, 4); | |||
| } | |||
| @FXML | |||
| public void fldNomorKartuOnKeyTyped(KeyEvent event) { | |||
| if (event.getSource() != null | |||
| && event.getSource() instanceof TextField) { | |||
| TextField field = (TextField) event.getSource(); | |||
| if (field.getText().length() >= 4) { | |||
| if (event.getCharacter().matches("[0-9]")) { | |||
| Robot robot = new Robot(); | |||
| robot.keyType(KeyCode.TAB); | |||
| } | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @@ -0,0 +1,27 @@ | |||
| /* | |||
| * To change this license header, choose License Headers in Project Properties. | |||
| * To change this template file, choose Tools | Templates | |||
| * and open the template in the editor. | |||
| */ | |||
| package id.amigogroup.posterminal.bayar; | |||
| import java.net.URL; | |||
| import java.util.ResourceBundle; | |||
| import javafx.fxml.Initializable; | |||
| /** | |||
| * FXML Controller class | |||
| * | |||
| * @author ronal | |||
| */ | |||
| public class FormBayarVoucherPromoController implements Initializable { | |||
| /** | |||
| * Initializes the controller class. | |||
| */ | |||
| @Override | |||
| public void initialize(URL url, ResourceBundle rb) { | |||
| // TODO | |||
| } | |||
| } | |||
| @@ -5,8 +5,14 @@ | |||
| */ | |||
| package id.amigogroup.posterminal.keamanan; | |||
| import id.amigogroup.posterminal.SystemValue; | |||
| import id.amigogroup.posterminal.api.AmigoPosRx; | |||
| import id.amigogroup.posterminal.model.Karyawan; | |||
| import id.amigogroup.posterminal.util.AlertUtil; | |||
| import id.amigogroup.posterminal.util.Fucout; | |||
| import io.reactivex.Observable; | |||
| import java.io.IOException; | |||
| import java.net.HttpURLConnection; | |||
| import java.net.URL; | |||
| import java.util.ResourceBundle; | |||
| import java.util.logging.Level; | |||
| @@ -17,9 +23,13 @@ import javafx.fxml.FXMLLoader; | |||
| import javafx.fxml.Initializable; | |||
| import javafx.scene.Parent; | |||
| import javafx.scene.Scene; | |||
| import javafx.scene.control.Alert; | |||
| import javafx.scene.control.PasswordField; | |||
| import javafx.scene.control.TextField; | |||
| import javafx.scene.image.Image; | |||
| import javafx.scene.layout.AnchorPane; | |||
| import javafx.stage.Stage; | |||
| import retrofit2.HttpException; | |||
| /** | |||
| * FXML Controller class | |||
| @@ -30,6 +40,12 @@ public class FormLoginController implements Initializable { | |||
| @FXML | |||
| private AnchorPane apMain; | |||
| @FXML | |||
| private TextField fldNamaPengguna; | |||
| @FXML | |||
| private PasswordField fldKataSandi; | |||
| private final AmigoPosRx posRx = new AmigoPosRx(); | |||
| /** | |||
| * Initializes the controller class. | |||
| @@ -53,14 +69,47 @@ public class FormLoginController implements Initializable { | |||
| @FXML | |||
| public void btnLoginOnAction(ActionEvent event) { | |||
| try { | |||
| generateNewWindow("/fxml/FormUtama.fxml").show(); | |||
| Stage thisStage = (Stage) apMain.getScene().getWindow(); | |||
| //close current stage | |||
| thisStage.hide(); | |||
| } catch (IOException ex) { | |||
| Logger.getLogger(FormLoginController.class.getName()).log(Level.SEVERE, null, ex); | |||
| } | |||
| Observable<Karyawan> karyawanObs = posRx.getKaryawanByNik(fldNamaPengguna.getText()); | |||
| karyawanObs.subscribe((k) -> { | |||
| //kasir, Asko produk, Asko SDM, Pemko | |||
| if (k != null && Fucout.isAllowedLogin(k.getIdPekerjaan())) { | |||
| SystemValue.karyawan = k; | |||
| try { | |||
| generateNewWindow("/fxml/FormUtama.fxml").show(); | |||
| Stage thisStage = (Stage) apMain.getScene().getWindow(); | |||
| //close current stage | |||
| thisStage.hide(); | |||
| } catch (IOException ex) { | |||
| Logger.getLogger(FormLoginController.class.getName()).log(Level.SEVERE, null, ex); | |||
| } | |||
| }else{ | |||
| Alert alert = AlertUtil.getAlertError( | |||
| "Error: Karyawan Tidak Boleh Akses", | |||
| "Karyawan dengan nomor tersebut tidak berwenang untuk mengakses aplikasi ini."); | |||
| alert.initOwner((Stage) apMain.getScene().getWindow()); | |||
| alert.show(); | |||
| } | |||
| }, error -> { | |||
| System.out.println(error.getMessage()); | |||
| if (error instanceof HttpException) { | |||
| switch (((HttpException) error).code()) { | |||
| case HttpURLConnection.HTTP_NOT_FOUND: | |||
| Alert alert = AlertUtil.getAlertError( | |||
| AlertUtil.ERROR_TIDAK_DITEMUKAN_TITLE, | |||
| "Karyawan dengan nomor tersebut tidak ditemukan."); | |||
| alert.initOwner((Stage) apMain.getScene().getWindow()); | |||
| alert.show(); | |||
| } | |||
| } else { | |||
| Alert alert = AlertUtil.getAlertError( | |||
| AlertUtil.ERROR_TIDAK_TERDUGA_TITLE, | |||
| "Terjadi kesalahan yang tidak terduga."); | |||
| alert.initOwner((Stage) apMain.getScene().getWindow()); | |||
| alert.show(); | |||
| } | |||
| // System.out.println(error.getMessage()); | |||
| }); | |||
| } | |||
| } | |||
| @@ -0,0 +1,171 @@ | |||
| package id.amigogroup.posterminal.model; | |||
| import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | |||
| import com.fasterxml.jackson.annotation.JsonInclude; | |||
| import com.fasterxml.jackson.annotation.JsonProperty; | |||
| import com.fasterxml.jackson.annotation.JsonPropertyOrder; | |||
| import org.apache.commons.lang.builder.EqualsBuilder; | |||
| import org.apache.commons.lang.builder.HashCodeBuilder; | |||
| import org.apache.commons.lang.builder.ToStringBuilder; | |||
| //@JsonIgnoreProperties(ignoreUnknown = true) | |||
| @JsonInclude(JsonInclude.Include.NON_NULL) | |||
| @JsonPropertyOrder({ | |||
| "nik", | |||
| "nama", | |||
| "username", | |||
| "password", | |||
| "id_pekerjaan", | |||
| "id_department", | |||
| "last_login_plafon", | |||
| "last_login_CS", | |||
| "aktif", | |||
| "pin" | |||
| }) | |||
| public class Karyawan { | |||
| @JsonProperty("nik") | |||
| private String nik; | |||
| @JsonProperty("nama") | |||
| private String nama; | |||
| @JsonProperty("username") | |||
| private String username; | |||
| @JsonProperty("password") | |||
| private String password; | |||
| @JsonProperty("id_pekerjaan") | |||
| private String idPekerjaan; | |||
| @JsonProperty("id_department") | |||
| private String idDepartment; | |||
| @JsonProperty("last_login_plafon") | |||
| private Object lastLoginPlafon; | |||
| @JsonProperty("last_login_CS") | |||
| private String lastLoginCS; | |||
| @JsonProperty("aktif") | |||
| private String aktif; | |||
| @JsonProperty("pin") | |||
| private String pin; | |||
| @JsonProperty("nik") | |||
| public String getNik() { | |||
| return nik; | |||
| } | |||
| @JsonProperty("nik") | |||
| public void setNik(String nik) { | |||
| this.nik = nik; | |||
| } | |||
| @JsonProperty("nama") | |||
| public String getNama() { | |||
| return nama; | |||
| } | |||
| @JsonProperty("nama") | |||
| public void setNama(String nama) { | |||
| this.nama = nama; | |||
| } | |||
| @JsonProperty("username") | |||
| public String getUsername() { | |||
| return username; | |||
| } | |||
| @JsonProperty("username") | |||
| public void setUsername(String username) { | |||
| this.username = username; | |||
| } | |||
| @JsonProperty("password") | |||
| public String getPassword() { | |||
| return password; | |||
| } | |||
| @JsonProperty("password") | |||
| public void setPassword(String password) { | |||
| this.password = password; | |||
| } | |||
| @JsonProperty("id_pekerjaan") | |||
| public String getIdPekerjaan() { | |||
| return idPekerjaan; | |||
| } | |||
| @JsonProperty("id_pekerjaan") | |||
| public void setIdPekerjaan(String idPekerjaan) { | |||
| this.idPekerjaan = idPekerjaan; | |||
| } | |||
| @JsonProperty("id_department") | |||
| public String getIdDepartment() { | |||
| return idDepartment; | |||
| } | |||
| @JsonProperty("id_department") | |||
| public void setIdDepartment(String idDepartment) { | |||
| this.idDepartment = idDepartment; | |||
| } | |||
| @JsonProperty("last_login_plafon") | |||
| public Object getLastLoginPlafon() { | |||
| return lastLoginPlafon; | |||
| } | |||
| @JsonProperty("last_login_plafon") | |||
| public void setLastLoginPlafon(Object lastLoginPlafon) { | |||
| this.lastLoginPlafon = lastLoginPlafon; | |||
| } | |||
| @JsonProperty("last_login_CS") | |||
| public String getLastLoginCS() { | |||
| return lastLoginCS; | |||
| } | |||
| @JsonProperty("last_login_CS") | |||
| public void setLastLoginCS(String lastLoginCS) { | |||
| this.lastLoginCS = lastLoginCS; | |||
| } | |||
| @JsonProperty("aktif") | |||
| public String getAktif() { | |||
| return aktif; | |||
| } | |||
| @JsonProperty("aktif") | |||
| public void setAktif(String aktif) { | |||
| this.aktif = aktif; | |||
| } | |||
| @JsonProperty("pin") | |||
| public String getPin() { | |||
| return pin; | |||
| } | |||
| @JsonProperty("pin") | |||
| public void setPin(String pin) { | |||
| this.pin = pin; | |||
| } | |||
| @Override | |||
| public String toString() { | |||
| return new ToStringBuilder(this).append("nik", nik).append("nama", nama).append("username", username).append("password", password).append("idPekerjaan", idPekerjaan).append("idDepartment", idDepartment).append("lastLoginPlafon", lastLoginPlafon).append("lastLoginCS", lastLoginCS).append("aktif", aktif).append("pin", pin).toString(); | |||
| } | |||
| @Override | |||
| public int hashCode() { | |||
| return new HashCodeBuilder().append(nik).append(password).append(nama).append(pin).append(lastLoginPlafon).append(lastLoginCS).append(aktif).append(username).append(idPekerjaan).append(idDepartment).toHashCode(); | |||
| } | |||
| @Override | |||
| public boolean equals(Object other) { | |||
| if (other == this) { | |||
| return true; | |||
| } | |||
| if ((other instanceof Karyawan) == false) { | |||
| return false; | |||
| } | |||
| Karyawan rhs = ((Karyawan) other); | |||
| return new EqualsBuilder().append(nik, rhs.nik).append(password, rhs.password).append(nama, rhs.nama).append(pin, rhs.pin).append(lastLoginPlafon, rhs.lastLoginPlafon).append(lastLoginCS, rhs.lastLoginCS).append(aktif, rhs.aktif).append(username, rhs.username).append(idPekerjaan, rhs.idPekerjaan).append(idDepartment, rhs.idDepartment).isEquals(); | |||
| } | |||
| } | |||
| @@ -0,0 +1,198 @@ | |||
| package id.amigogroup.posterminal.model; | |||
| import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | |||
| import java.util.List; | |||
| import com.fasterxml.jackson.annotation.JsonInclude; | |||
| import com.fasterxml.jackson.annotation.JsonProperty; | |||
| import com.fasterxml.jackson.annotation.JsonPropertyOrder; | |||
| import org.apache.commons.lang.builder.EqualsBuilder; | |||
| import org.apache.commons.lang.builder.HashCodeBuilder; | |||
| import org.apache.commons.lang.builder.ToStringBuilder; | |||
| //@JsonIgnoreProperties(ignoreUnknown = true) | |||
| @JsonInclude(JsonInclude.Include.NON_NULL) | |||
| @JsonPropertyOrder({ | |||
| "current_page", | |||
| "data", | |||
| "first_page_url", | |||
| "from", | |||
| "last_page", | |||
| "last_page_url", | |||
| "next_page_url", | |||
| "path", | |||
| "per_page", | |||
| "prev_page_url", | |||
| "to", | |||
| "total" | |||
| }) | |||
| public class Pagination<T> { | |||
| @JsonProperty("current_page") | |||
| private Integer currentPage; | |||
| @JsonProperty("data") | |||
| private List<T> data = null; | |||
| @JsonProperty("first_page_url") | |||
| private String firstPageUrl; | |||
| @JsonProperty("from") | |||
| private Integer from; | |||
| @JsonProperty("last_page") | |||
| private Integer lastPage; | |||
| @JsonProperty("last_page_url") | |||
| private String lastPageUrl; | |||
| @JsonProperty("next_page_url") | |||
| private String nextPageUrl; | |||
| @JsonProperty("path") | |||
| private String path; | |||
| @JsonProperty("per_page") | |||
| private Integer perPage; | |||
| @JsonProperty("prev_page_url") | |||
| private Object prevPageUrl; | |||
| @JsonProperty("to") | |||
| private Integer to; | |||
| @JsonProperty("total") | |||
| private Integer total; | |||
| @JsonProperty("current_page") | |||
| public Integer getCurrentPage() { | |||
| return currentPage; | |||
| } | |||
| @JsonProperty("current_page") | |||
| public void setCurrentPage(Integer currentPage) { | |||
| this.currentPage = currentPage; | |||
| } | |||
| @JsonProperty("data") | |||
| public List<T> getData() { | |||
| return data; | |||
| } | |||
| @JsonProperty("data") | |||
| public void setData(List<T> data) { | |||
| this.data = data; | |||
| } | |||
| @JsonProperty("first_page_url") | |||
| public String getFirstPageUrl() { | |||
| return firstPageUrl; | |||
| } | |||
| @JsonProperty("first_page_url") | |||
| public void setFirstPageUrl(String firstPageUrl) { | |||
| this.firstPageUrl = firstPageUrl; | |||
| } | |||
| @JsonProperty("from") | |||
| public Integer getFrom() { | |||
| return from; | |||
| } | |||
| @JsonProperty("from") | |||
| public void setFrom(Integer from) { | |||
| this.from = from; | |||
| } | |||
| @JsonProperty("last_page") | |||
| public Integer getLastPage() { | |||
| return lastPage; | |||
| } | |||
| @JsonProperty("last_page") | |||
| public void setLastPage(Integer lastPage) { | |||
| this.lastPage = lastPage; | |||
| } | |||
| @JsonProperty("last_page_url") | |||
| public String getLastPageUrl() { | |||
| return lastPageUrl; | |||
| } | |||
| @JsonProperty("last_page_url") | |||
| public void setLastPageUrl(String lastPageUrl) { | |||
| this.lastPageUrl = lastPageUrl; | |||
| } | |||
| @JsonProperty("next_page_url") | |||
| public String getNextPageUrl() { | |||
| return nextPageUrl; | |||
| } | |||
| @JsonProperty("next_page_url") | |||
| public void setNextPageUrl(String nextPageUrl) { | |||
| this.nextPageUrl = nextPageUrl; | |||
| } | |||
| @JsonProperty("path") | |||
| public String getPath() { | |||
| return path; | |||
| } | |||
| @JsonProperty("path") | |||
| public void setPath(String path) { | |||
| this.path = path; | |||
| } | |||
| @JsonProperty("per_page") | |||
| public Integer getPerPage() { | |||
| return perPage; | |||
| } | |||
| @JsonProperty("per_page") | |||
| public void setPerPage(Integer perPage) { | |||
| this.perPage = perPage; | |||
| } | |||
| @JsonProperty("prev_page_url") | |||
| public Object getPrevPageUrl() { | |||
| return prevPageUrl; | |||
| } | |||
| @JsonProperty("prev_page_url") | |||
| public void setPrevPageUrl(Object prevPageUrl) { | |||
| this.prevPageUrl = prevPageUrl; | |||
| } | |||
| @JsonProperty("to") | |||
| public Integer getTo() { | |||
| return to; | |||
| } | |||
| @JsonProperty("to") | |||
| public void setTo(Integer to) { | |||
| this.to = to; | |||
| } | |||
| @JsonProperty("total") | |||
| public Integer getTotal() { | |||
| return total; | |||
| } | |||
| @JsonProperty("total") | |||
| public void setTotal(Integer total) { | |||
| this.total = total; | |||
| } | |||
| @Override | |||
| public String toString() { | |||
| return new ToStringBuilder(this).append("currentPage", currentPage).append("data", data).append("firstPageUrl", firstPageUrl).append("from", from).append("lastPage", lastPage).append("lastPageUrl", lastPageUrl).append("nextPageUrl", nextPageUrl).append("path", path).append("perPage", perPage).append("prevPageUrl", prevPageUrl).append("to", to).append("total", total).toString(); | |||
| } | |||
| @Override | |||
| public int hashCode() { | |||
| return new HashCodeBuilder().append(lastPageUrl).append(nextPageUrl).append(data).append(lastPage).append(prevPageUrl).append(path).append(total).append(firstPageUrl).append(perPage).append(from).append(to).append(currentPage).toHashCode(); | |||
| } | |||
| @Override | |||
| public boolean equals(Object other) { | |||
| if (other == this) { | |||
| return true; | |||
| } | |||
| if ((other instanceof Pagination) == false) { | |||
| return false; | |||
| } | |||
| Pagination rhs = ((Pagination) other); | |||
| return new EqualsBuilder().append(lastPageUrl, rhs.lastPageUrl).append(nextPageUrl, rhs.nextPageUrl).append(data, rhs.data).append(lastPage, rhs.lastPage).append(prevPageUrl, rhs.prevPageUrl).append(path, rhs.path).append(total, rhs.total).append(firstPageUrl, rhs.firstPageUrl).append(perPage, rhs.perPage).append(from, rhs.from).append(to, rhs.to).append(currentPage, rhs.currentPage).isEquals(); | |||
| } | |||
| } | |||
| @@ -0,0 +1,80 @@ | |||
| package id.amigogroup.posterminal.model; | |||
| import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | |||
| import com.fasterxml.jackson.annotation.JsonInclude; | |||
| import com.fasterxml.jackson.annotation.JsonProperty; | |||
| import com.fasterxml.jackson.annotation.JsonPropertyOrder; | |||
| import org.apache.commons.lang.builder.EqualsBuilder; | |||
| import org.apache.commons.lang.builder.HashCodeBuilder; | |||
| import org.apache.commons.lang.builder.ToStringBuilder; | |||
| //@JsonIgnoreProperties(ignoreUnknown = true) | |||
| @JsonInclude(JsonInclude.Include.NON_NULL) | |||
| @JsonPropertyOrder({ | |||
| "id", | |||
| "kode", | |||
| "status" | |||
| }) | |||
| public class Tas { | |||
| @JsonProperty("id") | |||
| private Integer id; | |||
| @JsonProperty("kode") | |||
| private String kode; | |||
| @JsonProperty("status") | |||
| private String status; | |||
| @JsonProperty("id") | |||
| public Integer getId() { | |||
| return id; | |||
| } | |||
| @JsonProperty("id") | |||
| public void setId(Integer id) { | |||
| this.id = id; | |||
| } | |||
| @JsonProperty("kode") | |||
| public String getKode() { | |||
| return kode; | |||
| } | |||
| @JsonProperty("kode") | |||
| public void setKode(String kode) { | |||
| this.kode = kode; | |||
| } | |||
| @JsonProperty("status") | |||
| public String getStatus() { | |||
| return status; | |||
| } | |||
| @JsonProperty("status") | |||
| public void setStatus(String status) { | |||
| this.status = status; | |||
| } | |||
| @Override | |||
| public String toString() { | |||
| return new ToStringBuilder(this).append("id", id).append("kode", kode).append("status", status).toString(); | |||
| } | |||
| @Override | |||
| public int hashCode() { | |||
| return new HashCodeBuilder().append(id).append(kode).append(status).toHashCode(); | |||
| } | |||
| @Override | |||
| public boolean equals(Object other) { | |||
| if (other == this) { | |||
| return true; | |||
| } | |||
| if ((other instanceof Tas) == false) { | |||
| return false; | |||
| } | |||
| Tas rhs = ((Tas) other); | |||
| return new EqualsBuilder().append(id, rhs.id).append(kode, rhs.kode).append(status, rhs.status).isEquals(); | |||
| } | |||
| } | |||
| @@ -0,0 +1,25 @@ | |||
| /* | |||
| * To change this license header, choose License Headers in Project Properties. | |||
| * To change this template file, choose Tools | Templates | |||
| * and open the template in the editor. | |||
| */ | |||
| package id.amigogroup.posterminal.util; | |||
| import javafx.scene.control.Alert; | |||
| import javafx.scene.control.ButtonType; | |||
| /** | |||
| * | |||
| * @author ronal | |||
| */ | |||
| public class AlertUtil { | |||
| public static final String ERROR_TIDAK_DITEMUKAN_TITLE = "Error: Data Tidak Ditemukan"; | |||
| public static final String ERROR_TIDAK_TERDUGA_TITLE = "Error: Terjadi Kesalahan"; | |||
| public static Alert getAlertError(String title, String message){ | |||
| Alert alert = new Alert(Alert.AlertType.ERROR, message, ButtonType.OK); | |||
| alert.setTitle(title); | |||
| alert.setHeaderText(null); | |||
| return alert; | |||
| } | |||
| } | |||
| @@ -24,23 +24,38 @@ public class Fucout { | |||
| public static final String TIPE_NOTA_BON = "Bon"; | |||
| public static final String TIPE_NOTA_BAWA_DULU = "Bawa"; | |||
| public static final String TIPE_NOTA_RETUR = "Retur"; | |||
| //IMAGES URL | |||
| public static final String APP_ICON = "/assets/logo-mini-squared.png"; | |||
| //FUNCTIONS | |||
| public static void scrollToNode(ScrollPane scrollPane, Node node){ | |||
| public static boolean isAllowedLogin(String pekerjaan) { | |||
| return pekerjaan !=null && !pekerjaan.equals("") && | |||
| (pekerjaan.toLowerCase().equals("kasir") | |||
| || pekerjaan.toLowerCase().equals("asisten pemimpin toko") | |||
| || pekerjaan.toLowerCase().equals("asisten pemimpin toko produk") | |||
| || pekerjaan.toLowerCase().equals("pemimpin toko")); | |||
| } | |||
| public static String getTextColon(String text) { | |||
| if (text == null || text.equals("")) { | |||
| return ": -"; | |||
| } | |||
| return ": " + text; | |||
| } | |||
| public static void scrollToNode(ScrollPane scrollPane, Node node) { | |||
| double h = scrollPane.getContent().getBoundsInLocal().getHeight(); | |||
| double y = (node.getBoundsInParent().getMaxY() + | |||
| node.getBoundsInParent().getMinY()) / 2.0; | |||
| double y = (node.getBoundsInParent().getMaxY() | |||
| + node.getBoundsInParent().getMinY()) / 2.0; | |||
| double v = scrollPane.getViewportBounds().getHeight(); | |||
| scrollPane.setVvalue(scrollPane.getVmax() * ((y - 0.5 * v) / (h - v))); | |||
| } | |||
| public static final void forceFieldToInteger(TextField field){ | |||
| forceFieldInteger(field,0); | |||
| public static final void forceFieldToInteger(TextField field) { | |||
| forceFieldInteger(field, 0); | |||
| } | |||
| public static final void forceFieldInteger(TextField field, int max) { | |||
| field.textProperty().addListener(new ChangeListener<String>() { | |||
| @Override | |||
| @@ -32,6 +32,7 @@ | |||
| <Insets right="10.0" /> | |||
| </HBox.margin> | |||
| </CheckBox> | |||
| <CheckBox mnemonicParsing="false" onAction="#chkPilihanOnAction" text="Voucher Promo" /> | |||
| <CheckBox mnemonicParsing="false" onAction="#chkPilihanOnAction" text="Voucher Retur" /> | |||
| <CheckBox mnemonicParsing="false" onAction="#chkPilihanOnAction" text="Gopay"> | |||
| <HBox.margin> | |||
| @@ -1,235 +0,0 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <?import javafx.geometry.Insets?> | |||
| <?import javafx.scene.control.ComboBox?> | |||
| <?import javafx.scene.control.Label?> | |||
| <?import javafx.scene.control.Separator?> | |||
| <?import javafx.scene.control.TextField?> | |||
| <?import javafx.scene.layout.AnchorPane?> | |||
| <?import javafx.scene.layout.ColumnConstraints?> | |||
| <?import javafx.scene.layout.GridPane?> | |||
| <?import javafx.scene.layout.HBox?> | |||
| <?import javafx.scene.layout.RowConstraints?> | |||
| <?import javafx.scene.text.Font?> | |||
| <AnchorPane id="AnchorPane" minHeight="-Infinity" minWidth="-Infinity" prefHeight="475.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="id.amigogroup.posterminal.bayar.FormBayarOldController"> | |||
| <children> | |||
| <Label layoutX="14.0" layoutY="14.0" text="Poin" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="14.0"> | |||
| <font> | |||
| <Font name="System Bold" size="16.0" /> | |||
| </font> | |||
| </Label> | |||
| <GridPane layoutX="14.0" layoutY="39.0" AnchorPane.leftAnchor="14.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="39.0"> | |||
| <columnConstraints> | |||
| <ColumnConstraints hgrow="SOMETIMES" percentWidth="50.0" /> | |||
| <ColumnConstraints hgrow="SOMETIMES" percentWidth="50.0" /> | |||
| </columnConstraints> | |||
| <rowConstraints> | |||
| <RowConstraints vgrow="SOMETIMES" /> | |||
| </rowConstraints> | |||
| <children> | |||
| <HBox alignment="CENTER_LEFT" maxWidth="1.7976931348623157E308" spacing="5.0"> | |||
| <children> | |||
| <Label text="Nomor Member" /> | |||
| <Label text=": -"> | |||
| <HBox.margin> | |||
| <Insets /> | |||
| </HBox.margin> | |||
| </Label> | |||
| </children> | |||
| <GridPane.margin> | |||
| <Insets top="5.0" /> | |||
| </GridPane.margin> | |||
| </HBox> | |||
| <HBox alignment="CENTER_LEFT" maxWidth="1.7976931348623157E308" spacing="5.0" GridPane.columnIndex="1"> | |||
| <children> | |||
| <Label text="Total Poin" /> | |||
| <Label text=": -"> | |||
| <HBox.margin> | |||
| <Insets /> | |||
| </HBox.margin> | |||
| </Label> | |||
| </children> | |||
| <GridPane.margin> | |||
| <Insets top="5.0" /> | |||
| </GridPane.margin> | |||
| </HBox> | |||
| </children> | |||
| </GridPane> | |||
| <Separator layoutX="132.0" layoutY="69.0" prefWidth="200.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="69.0" /> | |||
| <Label layoutX="14.0" layoutY="70.0" text="Bayar" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="70.0"> | |||
| <font> | |||
| <Font name="System Bold" size="16.0" /> | |||
| </font> | |||
| </Label> | |||
| <GridPane layoutX="14.0" layoutY="95.0" AnchorPane.leftAnchor="14.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="95.0"> | |||
| <columnConstraints> | |||
| <ColumnConstraints hgrow="SOMETIMES" maxWidth="100.0" minWidth="10.0" prefWidth="100.0" /> | |||
| <ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="10.0" prefWidth="150.0" /> | |||
| <ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="10.0" prefWidth="150.0" /> | |||
| <ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="10.0" prefWidth="50.0" /> | |||
| </columnConstraints> | |||
| <rowConstraints> | |||
| <RowConstraints minHeight="10.0" vgrow="SOMETIMES" /> | |||
| <RowConstraints minHeight="10.0" vgrow="SOMETIMES" /> | |||
| <RowConstraints minHeight="10.0" vgrow="SOMETIMES" /> | |||
| <RowConstraints minHeight="10.0" vgrow="SOMETIMES" /> | |||
| <RowConstraints minHeight="10.0" vgrow="SOMETIMES" /> | |||
| </rowConstraints> | |||
| <children> | |||
| <Label text="Total Harga"> | |||
| <GridPane.margin> | |||
| <Insets bottom="2.5" /> | |||
| </GridPane.margin> | |||
| </Label> | |||
| <TextField alignment="CENTER_RIGHT" GridPane.columnIndex="1"> | |||
| <GridPane.margin> | |||
| <Insets bottom="2.5" left="5.0" right="2.5" /> | |||
| </GridPane.margin> | |||
| </TextField> | |||
| <Label text="Diskon" GridPane.rowIndex="1"> | |||
| <GridPane.margin> | |||
| <Insets bottom="2.5" top="2.5" /> | |||
| </GridPane.margin> | |||
| </Label> | |||
| <TextField alignment="CENTER_RIGHT" GridPane.columnIndex="1" GridPane.rowIndex="1"> | |||
| <GridPane.margin> | |||
| <Insets bottom="2.5" left="5.0" right="2.5" top="2.5" /> | |||
| </GridPane.margin> | |||
| </TextField> | |||
| <Label text="Total Retur" GridPane.rowIndex="2"> | |||
| <GridPane.margin> | |||
| <Insets bottom="2.5" top="2.5" /> | |||
| </GridPane.margin> | |||
| </Label> | |||
| <TextField alignment="CENTER_RIGHT" GridPane.columnIndex="1" GridPane.rowIndex="2"> | |||
| <GridPane.margin> | |||
| <Insets bottom="2.5" left="5.0" right="2.5" top="2.5" /> | |||
| </GridPane.margin> | |||
| </TextField> | |||
| <Label text="Bayar via Poin" GridPane.rowIndex="3"> | |||
| <GridPane.margin> | |||
| <Insets bottom="2.5" top="2.5" /> | |||
| </GridPane.margin> | |||
| </Label> | |||
| <TextField alignment="CENTER_RIGHT" GridPane.columnIndex="1" GridPane.rowIndex="3"> | |||
| <GridPane.margin> | |||
| <Insets bottom="2.5" left="5.0" right="2.5" top="2.5" /> | |||
| </GridPane.margin> | |||
| </TextField> | |||
| <TextField alignment="CENTER_RIGHT" disable="true" GridPane.columnIndex="2" GridPane.rowIndex="3"> | |||
| <GridPane.margin> | |||
| <Insets bottom="2.5" left="2.5" top="2.5" /> | |||
| </GridPane.margin> | |||
| </TextField> | |||
| <Label text="Sisa Bayar" GridPane.rowIndex="4"> | |||
| <GridPane.margin> | |||
| <Insets top="2.5" /> | |||
| </GridPane.margin> | |||
| </Label> | |||
| <TextField alignment="CENTER_RIGHT" GridPane.columnIndex="1" GridPane.rowIndex="4"> | |||
| <GridPane.margin> | |||
| <Insets left="5.0" right="2.5" top="2.5" /> | |||
| </GridPane.margin> | |||
| </TextField> | |||
| </children> | |||
| </GridPane> | |||
| <Separator layoutY="249.0" prefWidth="200.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="249.0" /> | |||
| <Label layoutX="14.0" layoutY="250.0" text="Tunai" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="250.0"> | |||
| <font> | |||
| <Font name="System Bold" size="16.0" /> | |||
| </font> | |||
| </Label> | |||
| <GridPane layoutX="14.0" layoutY="269.0" AnchorPane.leftAnchor="14.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="269.0"> | |||
| <columnConstraints> | |||
| <ColumnConstraints hgrow="SOMETIMES" maxWidth="100.0" minWidth="10.0" prefWidth="100.0" /> | |||
| <ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="10.0" prefWidth="150.0" /> | |||
| <ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="10.0" prefWidth="150.0" /> | |||
| <ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="10.0" prefWidth="50.0" /> | |||
| </columnConstraints> | |||
| <rowConstraints> | |||
| <RowConstraints minHeight="10.0" vgrow="SOMETIMES" /> | |||
| <RowConstraints minHeight="10.0" vgrow="SOMETIMES" /> | |||
| </rowConstraints> | |||
| <children> | |||
| <Label text="Bayar"> | |||
| <GridPane.margin> | |||
| <Insets bottom="2.5" /> | |||
| </GridPane.margin> | |||
| </Label> | |||
| <TextField alignment="CENTER_RIGHT" GridPane.columnIndex="1"> | |||
| <GridPane.margin> | |||
| <Insets bottom="2.5" left="5.0" right="2.5" /> | |||
| </GridPane.margin> | |||
| </TextField> | |||
| <Label text="Kembalian" GridPane.rowIndex="1"> | |||
| <GridPane.margin> | |||
| <Insets top="2.5" /> | |||
| </GridPane.margin> | |||
| </Label> | |||
| <TextField alignment="CENTER_RIGHT" GridPane.columnIndex="1" GridPane.rowIndex="1"> | |||
| <GridPane.margin> | |||
| <Insets left="5.0" right="2.5" top="2.5" /> | |||
| </GridPane.margin> | |||
| </TextField> | |||
| </children> | |||
| </GridPane> | |||
| <Separator layoutY="345.0" prefWidth="200.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="345.0" /> | |||
| <Label layoutX="15.0" layoutY="346.0" text="Non Tunai"> | |||
| <font> | |||
| <Font name="System Bold" size="16.0" /> | |||
| </font> | |||
| </Label> | |||
| <GridPane layoutX="14.0" layoutY="371.0" AnchorPane.leftAnchor="14.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="371.0"> | |||
| <columnConstraints> | |||
| <ColumnConstraints hgrow="SOMETIMES" maxWidth="100.0" minWidth="10.0" prefWidth="100.0" /> | |||
| <ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="10.0" prefWidth="150.0" /> | |||
| <ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="10.0" prefWidth="150.0" /> | |||
| <ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="10.0" prefWidth="50.0" /> | |||
| </columnConstraints> | |||
| <rowConstraints> | |||
| <RowConstraints minHeight="10.0" vgrow="SOMETIMES" /> | |||
| <RowConstraints minHeight="10.0" vgrow="SOMETIMES" /> | |||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> | |||
| </rowConstraints> | |||
| <children> | |||
| <Label text="Nama Bank"> | |||
| <GridPane.margin> | |||
| <Insets bottom="2.5" /> | |||
| </GridPane.margin> | |||
| </Label> | |||
| <ComboBox maxWidth="1.7976931348623157E308" GridPane.columnIndex="1"> | |||
| <GridPane.margin> | |||
| <Insets bottom="2.5" left="5.0" right="2.5" top="2.5" /> | |||
| </GridPane.margin> | |||
| </ComboBox> | |||
| <Label text="Nomor Kartu" GridPane.rowIndex="1"> | |||
| <GridPane.margin> | |||
| <Insets bottom="2.5" top="2.5" /> | |||
| </GridPane.margin> | |||
| </Label> | |||
| <HBox spacing="5.0" GridPane.columnIndex="1" GridPane.columnSpan="2" GridPane.rowIndex="1"> | |||
| <GridPane.margin> | |||
| <Insets bottom="2.5" left="5.0" right="2.5" top="2.5" /> | |||
| </GridPane.margin> | |||
| <children> | |||
| <TextField fx:id="fldNoKartu1" alignment="CENTER_RIGHT" onKeyTyped="#fldNomorKartuOnKeyTyped" prefWidth="75.0" /> | |||
| <TextField fx:id="fldNoKartu2" alignment="CENTER_RIGHT" onKeyTyped="#fldNomorKartuOnKeyTyped" prefWidth="75.0" /> | |||
| <TextField fx:id="fldNoKartu3" alignment="CENTER_RIGHT" onKeyTyped="#fldNomorKartuOnKeyTyped" prefWidth="75.0" /> | |||
| <TextField fx:id="fldNoKartu4" alignment="CENTER_RIGHT" onKeyTyped="#fldNomorKartuOnKeyTyped" prefWidth="75.0" /> | |||
| </children> | |||
| </HBox> | |||
| <Label text="Nomor Validasi" GridPane.rowIndex="2"> | |||
| <GridPane.margin> | |||
| <Insets bottom="2.5" top="2.5" /> | |||
| </GridPane.margin> | |||
| </Label> | |||
| <TextField alignment="CENTER_RIGHT" GridPane.columnIndex="1" GridPane.rowIndex="2"> | |||
| <GridPane.margin> | |||
| <Insets left="5.0" right="2.5" top="2.5" /> | |||
| </GridPane.margin> | |||
| </TextField> | |||
| </children> | |||
| </GridPane> | |||
| </children> | |||
| </AnchorPane> | |||
| @@ -0,0 +1,61 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <?import javafx.geometry.Insets?> | |||
| <?import javafx.scene.control.Label?> | |||
| <?import javafx.scene.control.Separator?> | |||
| <?import javafx.scene.control.TextField?> | |||
| <?import javafx.scene.layout.AnchorPane?> | |||
| <?import javafx.scene.layout.ColumnConstraints?> | |||
| <?import javafx.scene.layout.GridPane?> | |||
| <?import javafx.scene.layout.RowConstraints?> | |||
| <?import javafx.scene.text.Font?> | |||
| <AnchorPane id="AnchorPane" prefWidth="600.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="id.amigogroup.posterminal.bayar.FormBayarVoucherPromoController"> | |||
| <children> | |||
| <Label layoutX="14.0" layoutY="14.0" text="Voucher Promo" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="14.0"> | |||
| <font> | |||
| <Font size="16.0" /> | |||
| </font> | |||
| </Label> | |||
| <GridPane layoutX="14.0" layoutY="39.0" prefWidth="400.0" AnchorPane.bottomAnchor="5.0" AnchorPane.leftAnchor="14.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="39.0"> | |||
| <columnConstraints> | |||
| <ColumnConstraints hgrow="SOMETIMES" maxWidth="100.0" minWidth="10.0" prefWidth="100.0" /> | |||
| <ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="10.0" prefWidth="150.0" /> | |||
| <ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="10.0" prefWidth="150.0" /> | |||
| <ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="10.0" prefWidth="50.0" /> | |||
| </columnConstraints> | |||
| <rowConstraints> | |||
| <RowConstraints minHeight="10.0" vgrow="SOMETIMES" /> | |||
| <RowConstraints minHeight="10.0" vgrow="SOMETIMES" /> | |||
| </rowConstraints> | |||
| <children> | |||
| <Label text="Kode Voucher"> | |||
| <GridPane.margin> | |||
| <Insets bottom="2.5" /> | |||
| </GridPane.margin> | |||
| </Label> | |||
| <TextField alignment="CENTER_RIGHT" GridPane.columnIndex="1"> | |||
| <GridPane.margin> | |||
| <Insets bottom="2.5" left="5.0" right="2.5" /> | |||
| </GridPane.margin> | |||
| </TextField> | |||
| <Label text="Total Sisa" GridPane.rowIndex="1"> | |||
| <GridPane.margin> | |||
| <Insets top="2.5" /> | |||
| </GridPane.margin> | |||
| </Label> | |||
| <TextField alignment="CENTER_RIGHT" GridPane.columnIndex="1" GridPane.rowIndex="1"> | |||
| <GridPane.margin> | |||
| <Insets left="5.0" right="2.5" top="2.5" /> | |||
| </GridPane.margin> | |||
| </TextField> | |||
| <TextField alignment="CENTER_RIGHT" GridPane.columnIndex="2"> | |||
| <GridPane.margin> | |||
| <Insets bottom="2.5" left="2.5" /> | |||
| </GridPane.margin> | |||
| </TextField> | |||
| </children> | |||
| </GridPane> | |||
| <Separator layoutX="6.0" layoutY="13.0" prefWidth="200.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="5.0" /> | |||
| </children> | |||
| </AnchorPane> | |||
| @@ -23,12 +23,12 @@ | |||
| </image> | |||
| </ImageView> | |||
| <Label layoutX="104.0" layoutY="22.0" text="Nama Pengguna" AnchorPane.leftAnchor="104.0" AnchorPane.topAnchor="22.0" /> | |||
| <TextField layoutX="104.0" layoutY="39.0" promptText="Nama Pengguna" AnchorPane.leftAnchor="104.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="39.0" /> | |||
| <PasswordField layoutX="104.0" layoutY="86.0" promptText="Kata Sandi" AnchorPane.leftAnchor="104.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="86.0" /> | |||
| <TextField fx:id="fldNamaPengguna" layoutX="104.0" layoutY="39.0" promptText="Nama Pengguna" AnchorPane.leftAnchor="104.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="39.0" /> | |||
| <PasswordField fx:id="fldKataSandi" layoutX="104.0" layoutY="86.0" promptText="Kata Sandi" AnchorPane.leftAnchor="104.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="86.0" /> | |||
| <Label layoutX="104.0" layoutY="69.0" text="Kata Sandi" AnchorPane.leftAnchor="104.0" AnchorPane.topAnchor="69.0" /> | |||
| <HBox alignment="CENTER" layoutY="122.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="122.0"> | |||
| <children> | |||
| <Button mnemonicParsing="false" onAction="#btnLoginOnAction" text="Masuk" /> | |||
| <Button defaultButton="true" mnemonicParsing="false" onAction="#btnLoginOnAction" text="Masuk" /> | |||
| </children> | |||
| </HBox> | |||
| </children> | |||
| @@ -36,7 +36,15 @@ | |||
| <children> | |||
| <HBox alignment="CENTER_LEFT" maxHeight="1.7976931348623157E308" prefHeight="20.0"> | |||
| <children> | |||
| <Label text="Login: -"> | |||
| <Label text="Login"> | |||
| <font> | |||
| <Font name="System Bold" size="12.0" /> | |||
| </font> | |||
| <HBox.margin> | |||
| <Insets left="5.0" /> | |||
| </HBox.margin> | |||
| </Label> | |||
| <Label fx:id="lblNamaLogin" text=": -"> | |||
| <font> | |||
| <Font name="System Bold" size="12.0" /> | |||
| </font> | |||