From e8e5ee6af34901630574e60d1922ee78a3c34f4e Mon Sep 17 00:00:00 2001 From: goo987 Date: Thu, 29 May 2025 19:26:25 +0700 Subject: [PATCH] modify some visuals --- component/barang.templ | 72 ++++++++++++++++++++++-------------------- component/common.templ | 26 ++++++--------- mock/mockv2.go | 1 + model/barang.go | 1 + 4 files changed, 49 insertions(+), 51 deletions(-) diff --git a/component/barang.templ b/component/barang.templ index 8204467..f9ee70d 100644 --- a/component/barang.templ +++ b/component/barang.templ @@ -3,43 +3,47 @@ package component import "git.proximination.com/pclatihan/wstempl/model" templ BarangView(mdl model.Barang) { -
-

{ mdl.Nama }

-
{ mdl.Merk }
- - - - - - - - - - - - - - - - - - - - - -
PANJANG{ mdl.Panjang }
LEBAR{ mdl.Lebar }
TINGGI{ mdl.Tinggi }
SATUAN{ mdl.Unit }
STATUS{ mdl.Status }
- BACK -
+
+

{ mdl.Nama }

+

Merk: { mdl.Merk }

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Panjang{ mdl.Panjang }
Lebar{ mdl.Lebar }
Tinggi{ mdl.Tinggi }
Satuan{ mdl.Unit }
Status{ mdl.Status }
Warna{ mdl.Warna }
+ ← Kembali ke daftar +
} templ DaftarBarangView(mdl model.DaftarBarang) { @Common("DAFTAR") { - + } } diff --git a/component/common.templ b/component/common.templ index e7bbed2..ad0eb64 100644 --- a/component/common.templ +++ b/component/common.templ @@ -1,24 +1,16 @@ package component -templ Common(pagename string) { - - +templ Common(title string) { + - - - { pagename } + { title } + - - - { children... } + +
+ { children... } +
} + diff --git a/mock/mockv2.go b/mock/mockv2.go index 5d6b7b8..dc3f663 100644 --- a/mock/mockv2.go +++ b/mock/mockv2.go @@ -22,6 +22,7 @@ func (m MockV2) GetBarang(nama string) (model.Barang, error) { Tinggi: gofakeit.Numerify("#"), Unit: gofakeit.AppName(), Status: gofakeit.RandomString([]string{"Sehat", "Rusak", "Dicuri Orang"}), + Warna : gofakeit.Color(), } return model, nil } diff --git a/model/barang.go b/model/barang.go index 55b8225..64af7f3 100644 --- a/model/barang.go +++ b/model/barang.go @@ -8,4 +8,5 @@ type Barang struct { Tinggi string Unit string Status string + Warna string }