mirror of
https://github.com/shaulascr/ecommerce_serang.git
synced 2025-08-13 10:42:21 +00:00
Merge remote-tracking branch 'origin/master' into screen-features
This commit is contained in:
3
.idea/gradle.xml
generated
3
.idea/gradle.xml
generated
@ -6,14 +6,13 @@
|
|||||||
<GradleProjectSettings>
|
<GradleProjectSettings>
|
||||||
<option name="testRunner" value="CHOOSE_PER_TEST" />
|
<option name="testRunner" value="CHOOSE_PER_TEST" />
|
||||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
|
<option name="gradleJvm" value="openjdk-24" />
|
||||||
<option name="modules">
|
<option name="modules">
|
||||||
<set>
|
<set>
|
||||||
<option value="$PROJECT_DIR$" />
|
<option value="$PROJECT_DIR$" />
|
||||||
<option value="$PROJECT_DIR$/app" />
|
<option value="$PROJECT_DIR$/app" />
|
||||||
</set>
|
</set>
|
||||||
</option>
|
</option>
|
||||||
<option name="resolveExternalAnnotations" value="false" />
|
|
||||||
</GradleProjectSettings>
|
</GradleProjectSettings>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
|
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@ -3,7 +3,7 @@
|
|||||||
<option name="optimizeImportsOnTheFly" value="true" />
|
<option name="optimizeImportsOnTheFly" value="true" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="jbr-21" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_X" default="true" project-jdk-name="24" project-jdk-type="JavaSDK">
|
||||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectType">
|
<component name="ProjectType">
|
||||||
|
549
.idea/other.xml
generated
549
.idea/other.xml
generated
@ -1,549 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="direct_access_persist.xml">
|
|
||||||
<option name="deviceSelectionList">
|
|
||||||
<list>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="27" />
|
|
||||||
<option name="brand" value="DOCOMO" />
|
|
||||||
<option name="codename" value="F01L" />
|
|
||||||
<option name="id" value="F01L" />
|
|
||||||
<option name="manufacturer" value="FUJITSU" />
|
|
||||||
<option name="name" value="F-01L" />
|
|
||||||
<option name="screenDensity" value="360" />
|
|
||||||
<option name="screenX" value="720" />
|
|
||||||
<option name="screenY" value="1280" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="34" />
|
|
||||||
<option name="brand" value="OnePlus" />
|
|
||||||
<option name="codename" value="OP5552L1" />
|
|
||||||
<option name="id" value="OP5552L1" />
|
|
||||||
<option name="manufacturer" value="OnePlus" />
|
|
||||||
<option name="name" value="CPH2415" />
|
|
||||||
<option name="screenDensity" value="480" />
|
|
||||||
<option name="screenX" value="1080" />
|
|
||||||
<option name="screenY" value="2412" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="34" />
|
|
||||||
<option name="brand" value="OPPO" />
|
|
||||||
<option name="codename" value="OP573DL1" />
|
|
||||||
<option name="id" value="OP573DL1" />
|
|
||||||
<option name="manufacturer" value="OPPO" />
|
|
||||||
<option name="name" value="CPH2557" />
|
|
||||||
<option name="screenDensity" value="480" />
|
|
||||||
<option name="screenX" value="1080" />
|
|
||||||
<option name="screenY" value="2400" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="28" />
|
|
||||||
<option name="brand" value="DOCOMO" />
|
|
||||||
<option name="codename" value="SH-01L" />
|
|
||||||
<option name="id" value="SH-01L" />
|
|
||||||
<option name="manufacturer" value="SHARP" />
|
|
||||||
<option name="name" value="AQUOS sense2 SH-01L" />
|
|
||||||
<option name="screenDensity" value="480" />
|
|
||||||
<option name="screenX" value="1080" />
|
|
||||||
<option name="screenY" value="2160" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="34" />
|
|
||||||
<option name="brand" value="Lenovo" />
|
|
||||||
<option name="codename" value="TB370FU" />
|
|
||||||
<option name="id" value="TB370FU" />
|
|
||||||
<option name="manufacturer" value="Lenovo" />
|
|
||||||
<option name="name" value="Tab P12" />
|
|
||||||
<option name="screenDensity" value="340" />
|
|
||||||
<option name="screenX" value="1840" />
|
|
||||||
<option name="screenY" value="2944" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="34" />
|
|
||||||
<option name="brand" value="samsung" />
|
|
||||||
<option name="codename" value="a15" />
|
|
||||||
<option name="id" value="a15" />
|
|
||||||
<option name="manufacturer" value="Samsung" />
|
|
||||||
<option name="name" value="A15" />
|
|
||||||
<option name="screenDensity" value="450" />
|
|
||||||
<option name="screenX" value="1080" />
|
|
||||||
<option name="screenY" value="2340" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="34" />
|
|
||||||
<option name="brand" value="samsung" />
|
|
||||||
<option name="codename" value="a35x" />
|
|
||||||
<option name="id" value="a35x" />
|
|
||||||
<option name="manufacturer" value="Samsung" />
|
|
||||||
<option name="name" value="A35" />
|
|
||||||
<option name="screenDensity" value="450" />
|
|
||||||
<option name="screenX" value="1080" />
|
|
||||||
<option name="screenY" value="2340" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="31" />
|
|
||||||
<option name="brand" value="samsung" />
|
|
||||||
<option name="codename" value="a51" />
|
|
||||||
<option name="id" value="a51" />
|
|
||||||
<option name="manufacturer" value="Samsung" />
|
|
||||||
<option name="name" value="Galaxy A51" />
|
|
||||||
<option name="screenDensity" value="420" />
|
|
||||||
<option name="screenX" value="1080" />
|
|
||||||
<option name="screenY" value="2400" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="34" />
|
|
||||||
<option name="brand" value="google" />
|
|
||||||
<option name="codename" value="akita" />
|
|
||||||
<option name="id" value="akita" />
|
|
||||||
<option name="manufacturer" value="Google" />
|
|
||||||
<option name="name" value="Pixel 8a" />
|
|
||||||
<option name="screenDensity" value="420" />
|
|
||||||
<option name="screenX" value="1080" />
|
|
||||||
<option name="screenY" value="2400" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="34" />
|
|
||||||
<option name="brand" value="motorola" />
|
|
||||||
<option name="codename" value="arcfox" />
|
|
||||||
<option name="id" value="arcfox" />
|
|
||||||
<option name="manufacturer" value="Motorola" />
|
|
||||||
<option name="name" value="razr plus 2024" />
|
|
||||||
<option name="screenDensity" value="360" />
|
|
||||||
<option name="screenX" value="1080" />
|
|
||||||
<option name="screenY" value="1272" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="33" />
|
|
||||||
<option name="brand" value="motorola" />
|
|
||||||
<option name="codename" value="austin" />
|
|
||||||
<option name="id" value="austin" />
|
|
||||||
<option name="manufacturer" value="Motorola" />
|
|
||||||
<option name="name" value="moto g 5G (2022)" />
|
|
||||||
<option name="screenDensity" value="280" />
|
|
||||||
<option name="screenX" value="720" />
|
|
||||||
<option name="screenY" value="1600" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="33" />
|
|
||||||
<option name="brand" value="samsung" />
|
|
||||||
<option name="codename" value="b0q" />
|
|
||||||
<option name="id" value="b0q" />
|
|
||||||
<option name="manufacturer" value="Samsung" />
|
|
||||||
<option name="name" value="Galaxy S22 Ultra" />
|
|
||||||
<option name="screenDensity" value="600" />
|
|
||||||
<option name="screenX" value="1440" />
|
|
||||||
<option name="screenY" value="3088" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="32" />
|
|
||||||
<option name="brand" value="google" />
|
|
||||||
<option name="codename" value="bluejay" />
|
|
||||||
<option name="id" value="bluejay" />
|
|
||||||
<option name="manufacturer" value="Google" />
|
|
||||||
<option name="name" value="Pixel 6a" />
|
|
||||||
<option name="screenDensity" value="420" />
|
|
||||||
<option name="screenX" value="1080" />
|
|
||||||
<option name="screenY" value="2400" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="34" />
|
|
||||||
<option name="brand" value="google" />
|
|
||||||
<option name="codename" value="caiman" />
|
|
||||||
<option name="id" value="caiman" />
|
|
||||||
<option name="manufacturer" value="Google" />
|
|
||||||
<option name="name" value="Pixel 9 Pro" />
|
|
||||||
<option name="screenDensity" value="360" />
|
|
||||||
<option name="screenX" value="960" />
|
|
||||||
<option name="screenY" value="2142" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="34" />
|
|
||||||
<option name="brand" value="google" />
|
|
||||||
<option name="codename" value="comet" />
|
|
||||||
<option name="id" value="comet" />
|
|
||||||
<option name="manufacturer" value="Google" />
|
|
||||||
<option name="name" value="Pixel 9 Pro Fold" />
|
|
||||||
<option name="screenDensity" value="390" />
|
|
||||||
<option name="screenX" value="2076" />
|
|
||||||
<option name="screenY" value="2152" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="29" />
|
|
||||||
<option name="brand" value="samsung" />
|
|
||||||
<option name="codename" value="crownqlteue" />
|
|
||||||
<option name="id" value="crownqlteue" />
|
|
||||||
<option name="manufacturer" value="Samsung" />
|
|
||||||
<option name="name" value="Galaxy Note9" />
|
|
||||||
<option name="screenDensity" value="420" />
|
|
||||||
<option name="screenX" value="2220" />
|
|
||||||
<option name="screenY" value="1080" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="34" />
|
|
||||||
<option name="brand" value="samsung" />
|
|
||||||
<option name="codename" value="dm2q" />
|
|
||||||
<option name="id" value="dm2q" />
|
|
||||||
<option name="manufacturer" value="Samsung" />
|
|
||||||
<option name="name" value="S23 Plus" />
|
|
||||||
<option name="screenDensity" value="450" />
|
|
||||||
<option name="screenX" value="1080" />
|
|
||||||
<option name="screenY" value="2340" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="34" />
|
|
||||||
<option name="brand" value="samsung" />
|
|
||||||
<option name="codename" value="dm3q" />
|
|
||||||
<option name="id" value="dm3q" />
|
|
||||||
<option name="manufacturer" value="Samsung" />
|
|
||||||
<option name="name" value="Galaxy S23 Ultra" />
|
|
||||||
<option name="screenDensity" value="600" />
|
|
||||||
<option name="screenX" value="1440" />
|
|
||||||
<option name="screenY" value="3088" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="34" />
|
|
||||||
<option name="brand" value="samsung" />
|
|
||||||
<option name="codename" value="e1q" />
|
|
||||||
<option name="id" value="e1q" />
|
|
||||||
<option name="manufacturer" value="Samsung" />
|
|
||||||
<option name="name" value="Galaxy S24" />
|
|
||||||
<option name="screenDensity" value="480" />
|
|
||||||
<option name="screenX" value="1080" />
|
|
||||||
<option name="screenY" value="2340" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="34" />
|
|
||||||
<option name="brand" value="samsung" />
|
|
||||||
<option name="codename" value="e3q" />
|
|
||||||
<option name="id" value="e3q" />
|
|
||||||
<option name="manufacturer" value="Samsung" />
|
|
||||||
<option name="name" value="Galaxy S24 Ultra" />
|
|
||||||
<option name="screenDensity" value="450" />
|
|
||||||
<option name="screenX" value="1440" />
|
|
||||||
<option name="screenY" value="3120" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="33" />
|
|
||||||
<option name="brand" value="google" />
|
|
||||||
<option name="codename" value="eos" />
|
|
||||||
<option name="id" value="eos" />
|
|
||||||
<option name="manufacturer" value="Google" />
|
|
||||||
<option name="name" value="Eos" />
|
|
||||||
<option name="screenDensity" value="320" />
|
|
||||||
<option name="screenX" value="384" />
|
|
||||||
<option name="screenY" value="384" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="33" />
|
|
||||||
<option name="brand" value="google" />
|
|
||||||
<option name="codename" value="felix" />
|
|
||||||
<option name="id" value="felix" />
|
|
||||||
<option name="manufacturer" value="Google" />
|
|
||||||
<option name="name" value="Pixel Fold" />
|
|
||||||
<option name="screenDensity" value="420" />
|
|
||||||
<option name="screenX" value="2208" />
|
|
||||||
<option name="screenY" value="1840" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="34" />
|
|
||||||
<option name="brand" value="google" />
|
|
||||||
<option name="codename" value="felix" />
|
|
||||||
<option name="id" value="felix" />
|
|
||||||
<option name="manufacturer" value="Google" />
|
|
||||||
<option name="name" value="Pixel Fold" />
|
|
||||||
<option name="screenDensity" value="420" />
|
|
||||||
<option name="screenX" value="2208" />
|
|
||||||
<option name="screenY" value="1840" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="33" />
|
|
||||||
<option name="brand" value="google" />
|
|
||||||
<option name="codename" value="felix_camera" />
|
|
||||||
<option name="id" value="felix_camera" />
|
|
||||||
<option name="manufacturer" value="Google" />
|
|
||||||
<option name="name" value="Pixel Fold (Camera-enabled)" />
|
|
||||||
<option name="screenDensity" value="420" />
|
|
||||||
<option name="screenX" value="2208" />
|
|
||||||
<option name="screenY" value="1840" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="34" />
|
|
||||||
<option name="brand" value="motorola" />
|
|
||||||
<option name="codename" value="fogona" />
|
|
||||||
<option name="id" value="fogona" />
|
|
||||||
<option name="manufacturer" value="Motorola" />
|
|
||||||
<option name="name" value="moto g play - 2024" />
|
|
||||||
<option name="screenDensity" value="280" />
|
|
||||||
<option name="screenX" value="720" />
|
|
||||||
<option name="screenY" value="1600" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="34" />
|
|
||||||
<option name="brand" value="samsung" />
|
|
||||||
<option name="codename" value="g0q" />
|
|
||||||
<option name="id" value="g0q" />
|
|
||||||
<option name="manufacturer" value="Samsung" />
|
|
||||||
<option name="name" value="SM-S906U1" />
|
|
||||||
<option name="screenDensity" value="450" />
|
|
||||||
<option name="screenX" value="1080" />
|
|
||||||
<option name="screenY" value="2340" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="34" />
|
|
||||||
<option name="brand" value="samsung" />
|
|
||||||
<option name="codename" value="gta9pwifi" />
|
|
||||||
<option name="id" value="gta9pwifi" />
|
|
||||||
<option name="manufacturer" value="Samsung" />
|
|
||||||
<option name="name" value="SM-X210" />
|
|
||||||
<option name="screenDensity" value="240" />
|
|
||||||
<option name="screenX" value="1200" />
|
|
||||||
<option name="screenY" value="1920" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="34" />
|
|
||||||
<option name="brand" value="samsung" />
|
|
||||||
<option name="codename" value="gts7xllite" />
|
|
||||||
<option name="id" value="gts7xllite" />
|
|
||||||
<option name="manufacturer" value="Samsung" />
|
|
||||||
<option name="name" value="SM-T738U" />
|
|
||||||
<option name="screenDensity" value="340" />
|
|
||||||
<option name="screenX" value="1600" />
|
|
||||||
<option name="screenY" value="2560" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="33" />
|
|
||||||
<option name="brand" value="samsung" />
|
|
||||||
<option name="codename" value="gts8uwifi" />
|
|
||||||
<option name="id" value="gts8uwifi" />
|
|
||||||
<option name="manufacturer" value="Samsung" />
|
|
||||||
<option name="name" value="Galaxy Tab S8 Ultra" />
|
|
||||||
<option name="screenDensity" value="320" />
|
|
||||||
<option name="screenX" value="1848" />
|
|
||||||
<option name="screenY" value="2960" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="34" />
|
|
||||||
<option name="brand" value="samsung" />
|
|
||||||
<option name="codename" value="gts8wifi" />
|
|
||||||
<option name="id" value="gts8wifi" />
|
|
||||||
<option name="manufacturer" value="Samsung" />
|
|
||||||
<option name="name" value="Galaxy Tab S8" />
|
|
||||||
<option name="screenDensity" value="274" />
|
|
||||||
<option name="screenX" value="1600" />
|
|
||||||
<option name="screenY" value="2560" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="34" />
|
|
||||||
<option name="brand" value="samsung" />
|
|
||||||
<option name="codename" value="gts9fe" />
|
|
||||||
<option name="id" value="gts9fe" />
|
|
||||||
<option name="manufacturer" value="Samsung" />
|
|
||||||
<option name="name" value="Galaxy Tab S9 FE 5G" />
|
|
||||||
<option name="screenDensity" value="280" />
|
|
||||||
<option name="screenX" value="1440" />
|
|
||||||
<option name="screenY" value="2304" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="34" />
|
|
||||||
<option name="brand" value="google" />
|
|
||||||
<option name="codename" value="husky" />
|
|
||||||
<option name="id" value="husky" />
|
|
||||||
<option name="manufacturer" value="Google" />
|
|
||||||
<option name="name" value="Pixel 8 Pro" />
|
|
||||||
<option name="screenDensity" value="390" />
|
|
||||||
<option name="screenX" value="1008" />
|
|
||||||
<option name="screenY" value="2244" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="30" />
|
|
||||||
<option name="brand" value="motorola" />
|
|
||||||
<option name="codename" value="java" />
|
|
||||||
<option name="id" value="java" />
|
|
||||||
<option name="manufacturer" value="Motorola" />
|
|
||||||
<option name="name" value="G20" />
|
|
||||||
<option name="screenDensity" value="280" />
|
|
||||||
<option name="screenX" value="720" />
|
|
||||||
<option name="screenY" value="1600" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="34" />
|
|
||||||
<option name="brand" value="google" />
|
|
||||||
<option name="codename" value="komodo" />
|
|
||||||
<option name="id" value="komodo" />
|
|
||||||
<option name="manufacturer" value="Google" />
|
|
||||||
<option name="name" value="Pixel 9 Pro XL" />
|
|
||||||
<option name="screenDensity" value="360" />
|
|
||||||
<option name="screenX" value="1008" />
|
|
||||||
<option name="screenY" value="2244" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="33" />
|
|
||||||
<option name="brand" value="google" />
|
|
||||||
<option name="codename" value="lynx" />
|
|
||||||
<option name="id" value="lynx" />
|
|
||||||
<option name="manufacturer" value="Google" />
|
|
||||||
<option name="name" value="Pixel 7a" />
|
|
||||||
<option name="screenDensity" value="420" />
|
|
||||||
<option name="screenX" value="1080" />
|
|
||||||
<option name="screenY" value="2400" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="33" />
|
|
||||||
<option name="brand" value="motorola" />
|
|
||||||
<option name="codename" value="maui" />
|
|
||||||
<option name="id" value="maui" />
|
|
||||||
<option name="manufacturer" value="Motorola" />
|
|
||||||
<option name="name" value="moto g play - 2023" />
|
|
||||||
<option name="screenDensity" value="280" />
|
|
||||||
<option name="screenX" value="720" />
|
|
||||||
<option name="screenY" value="1600" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="34" />
|
|
||||||
<option name="brand" value="samsung" />
|
|
||||||
<option name="codename" value="o1q" />
|
|
||||||
<option name="id" value="o1q" />
|
|
||||||
<option name="manufacturer" value="Samsung" />
|
|
||||||
<option name="name" value="Galaxy S21" />
|
|
||||||
<option name="screenDensity" value="421" />
|
|
||||||
<option name="screenX" value="1080" />
|
|
||||||
<option name="screenY" value="2400" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="31" />
|
|
||||||
<option name="brand" value="google" />
|
|
||||||
<option name="codename" value="oriole" />
|
|
||||||
<option name="id" value="oriole" />
|
|
||||||
<option name="manufacturer" value="Google" />
|
|
||||||
<option name="name" value="Pixel 6" />
|
|
||||||
<option name="screenDensity" value="420" />
|
|
||||||
<option name="screenX" value="1080" />
|
|
||||||
<option name="screenY" value="2400" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="33" />
|
|
||||||
<option name="brand" value="google" />
|
|
||||||
<option name="codename" value="panther" />
|
|
||||||
<option name="id" value="panther" />
|
|
||||||
<option name="manufacturer" value="Google" />
|
|
||||||
<option name="name" value="Pixel 7" />
|
|
||||||
<option name="screenDensity" value="420" />
|
|
||||||
<option name="screenX" value="1080" />
|
|
||||||
<option name="screenY" value="2400" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="34" />
|
|
||||||
<option name="brand" value="samsung" />
|
|
||||||
<option name="codename" value="q5q" />
|
|
||||||
<option name="id" value="q5q" />
|
|
||||||
<option name="manufacturer" value="Samsung" />
|
|
||||||
<option name="name" value="Galaxy Z Fold5" />
|
|
||||||
<option name="screenDensity" value="420" />
|
|
||||||
<option name="screenX" value="1812" />
|
|
||||||
<option name="screenY" value="2176" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="34" />
|
|
||||||
<option name="brand" value="samsung" />
|
|
||||||
<option name="codename" value="q6q" />
|
|
||||||
<option name="id" value="q6q" />
|
|
||||||
<option name="manufacturer" value="Samsung" />
|
|
||||||
<option name="name" value="Galaxy Z Fold6" />
|
|
||||||
<option name="screenDensity" value="420" />
|
|
||||||
<option name="screenX" value="1856" />
|
|
||||||
<option name="screenY" value="2160" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="30" />
|
|
||||||
<option name="brand" value="google" />
|
|
||||||
<option name="codename" value="r11" />
|
|
||||||
<option name="id" value="r11" />
|
|
||||||
<option name="manufacturer" value="Google" />
|
|
||||||
<option name="name" value="Pixel Watch" />
|
|
||||||
<option name="screenDensity" value="320" />
|
|
||||||
<option name="screenX" value="384" />
|
|
||||||
<option name="screenY" value="384" />
|
|
||||||
<option name="type" value="WEAR_OS" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="34" />
|
|
||||||
<option name="brand" value="samsung" />
|
|
||||||
<option name="codename" value="r11q" />
|
|
||||||
<option name="id" value="r11q" />
|
|
||||||
<option name="manufacturer" value="Samsung" />
|
|
||||||
<option name="name" value="SM-S711U" />
|
|
||||||
<option name="screenDensity" value="450" />
|
|
||||||
<option name="screenX" value="1080" />
|
|
||||||
<option name="screenY" value="2340" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="30" />
|
|
||||||
<option name="brand" value="google" />
|
|
||||||
<option name="codename" value="redfin" />
|
|
||||||
<option name="id" value="redfin" />
|
|
||||||
<option name="manufacturer" value="Google" />
|
|
||||||
<option name="name" value="Pixel 5" />
|
|
||||||
<option name="screenDensity" value="440" />
|
|
||||||
<option name="screenX" value="1080" />
|
|
||||||
<option name="screenY" value="2340" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="34" />
|
|
||||||
<option name="brand" value="google" />
|
|
||||||
<option name="codename" value="shiba" />
|
|
||||||
<option name="id" value="shiba" />
|
|
||||||
<option name="manufacturer" value="Google" />
|
|
||||||
<option name="name" value="Pixel 8" />
|
|
||||||
<option name="screenDensity" value="420" />
|
|
||||||
<option name="screenX" value="1080" />
|
|
||||||
<option name="screenY" value="2400" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="34" />
|
|
||||||
<option name="brand" value="samsung" />
|
|
||||||
<option name="codename" value="t2q" />
|
|
||||||
<option name="id" value="t2q" />
|
|
||||||
<option name="manufacturer" value="Samsung" />
|
|
||||||
<option name="name" value="Galaxy S21 Plus" />
|
|
||||||
<option name="screenDensity" value="394" />
|
|
||||||
<option name="screenX" value="1080" />
|
|
||||||
<option name="screenY" value="2400" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="33" />
|
|
||||||
<option name="brand" value="google" />
|
|
||||||
<option name="codename" value="tangorpro" />
|
|
||||||
<option name="id" value="tangorpro" />
|
|
||||||
<option name="manufacturer" value="Google" />
|
|
||||||
<option name="name" value="Pixel Tablet" />
|
|
||||||
<option name="screenDensity" value="320" />
|
|
||||||
<option name="screenX" value="1600" />
|
|
||||||
<option name="screenY" value="2560" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="34" />
|
|
||||||
<option name="brand" value="google" />
|
|
||||||
<option name="codename" value="tokay" />
|
|
||||||
<option name="id" value="tokay" />
|
|
||||||
<option name="manufacturer" value="Google" />
|
|
||||||
<option name="name" value="Pixel 9" />
|
|
||||||
<option name="screenDensity" value="420" />
|
|
||||||
<option name="screenX" value="1080" />
|
|
||||||
<option name="screenY" value="2424" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
<PersistentDeviceSelectionData>
|
|
||||||
<option name="api" value="35" />
|
|
||||||
<option name="brand" value="google" />
|
|
||||||
<option name="codename" value="tokay" />
|
|
||||||
<option name="id" value="tokay" />
|
|
||||||
<option name="manufacturer" value="Google" />
|
|
||||||
<option name="name" value="Pixel 9" />
|
|
||||||
<option name="screenDensity" value="420" />
|
|
||||||
<option name="screenX" value="1080" />
|
|
||||||
<option name="screenY" value="2424" />
|
|
||||||
</PersistentDeviceSelectionData>
|
|
||||||
</list>
|
|
||||||
</option>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
@ -34,9 +34,24 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name=".ui.order.CheckoutActivity"
|
android:name=".ui.order.CheckoutActivity"
|
||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
|
<activity
|
||||||
|
android:name=".ui.profile.mystore.profile.payment_info.DetailPaymentInfoActivity"
|
||||||
|
android:exported="false" />
|
||||||
|
<activity
|
||||||
|
android:name=".ui.profile.mystore.profile.payment_info.PaymentInfoActivity"
|
||||||
|
android:exported="false" />
|
||||||
|
<activity
|
||||||
|
android:name=".ui.profile.mystore.profile.address.StoreAddressActivity"
|
||||||
|
android:exported="false" />
|
||||||
|
<activity
|
||||||
|
android:name=".ui.profile.mystore.product.ProductActivity"
|
||||||
|
android:exported="false" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.product.ReviewProductActivity"
|
android:name=".ui.product.ReviewProductActivity"
|
||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
|
<activity
|
||||||
|
android:name=".ui.profile.mystore.sells.SellsActivity"
|
||||||
|
android:exported="false" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.profile.mystore.balance.BalanceActivity"
|
android:name=".ui.profile.mystore.balance.BalanceActivity"
|
||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
@ -50,13 +65,13 @@
|
|||||||
android:name=".ui.profile.mystore.balance.BalanceTopUpActivity"
|
android:name=".ui.profile.mystore.balance.BalanceTopUpActivity"
|
||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.profile.mystore.product.AddProductActivity"
|
android:name=".ui.profile.mystore.product.StoreProductDetailActivity"
|
||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.profile.mystore.profile.EditStoreProfileActivity"
|
android:name=".ui.profile.mystore.profile.DetailStoreProfileActivity"
|
||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.profile.mystore.TokoSayaActivity"
|
android:name=".ui.profile.mystore.MyStoreActivity"
|
||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.product.DetailProductActivity"
|
android:name=".ui.product.DetailProductActivity"
|
||||||
|
@ -0,0 +1,54 @@
|
|||||||
|
package com.alya.ecommerce_serang.data.api.dto
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName
|
||||||
|
|
||||||
|
data class Product(
|
||||||
|
|
||||||
|
@field:SerializedName("store_id")
|
||||||
|
val storeId: Int? = null,
|
||||||
|
|
||||||
|
@field:SerializedName("image")
|
||||||
|
val image: String? = null,
|
||||||
|
|
||||||
|
@field:SerializedName("sppirt")
|
||||||
|
val sppirt: String? = null,
|
||||||
|
|
||||||
|
@field:SerializedName("rating")
|
||||||
|
val rating: String? = null,
|
||||||
|
|
||||||
|
@field:SerializedName("description")
|
||||||
|
val description: String? = null,
|
||||||
|
|
||||||
|
@field:SerializedName("weight")
|
||||||
|
val weight: Int? = null,
|
||||||
|
|
||||||
|
@field:SerializedName("is_pre_order")
|
||||||
|
val isPreOrder: Boolean? = null,
|
||||||
|
|
||||||
|
@field:SerializedName("category_id")
|
||||||
|
val categoryId: Int? = null,
|
||||||
|
|
||||||
|
@field:SerializedName("price")
|
||||||
|
val price: String? = null,
|
||||||
|
|
||||||
|
@field:SerializedName("name")
|
||||||
|
val name: String? = null,
|
||||||
|
|
||||||
|
@field:SerializedName("halal")
|
||||||
|
val halal: String? = null,
|
||||||
|
|
||||||
|
@field:SerializedName("id")
|
||||||
|
val id: Int? = null,
|
||||||
|
|
||||||
|
@field:SerializedName("min_order")
|
||||||
|
val minOrder: Int? = null,
|
||||||
|
|
||||||
|
@field:SerializedName("total_sold")
|
||||||
|
val totalSold: Int? = null,
|
||||||
|
|
||||||
|
@field:SerializedName("stock")
|
||||||
|
val stock: Int? = null,
|
||||||
|
|
||||||
|
@field:SerializedName("status")
|
||||||
|
val status: String? = null
|
||||||
|
)
|
@ -0,0 +1,102 @@
|
|||||||
|
package com.alya.ecommerce_serang.data.api.dto
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName
|
||||||
|
|
||||||
|
data class Store(
|
||||||
|
|
||||||
|
@field:SerializedName("approval_reason")
|
||||||
|
val approvalReason: String,
|
||||||
|
|
||||||
|
@field:SerializedName("store_status")
|
||||||
|
val storeStatus: String,
|
||||||
|
|
||||||
|
@field:SerializedName("sppirt")
|
||||||
|
val sppirt: String,
|
||||||
|
|
||||||
|
@field:SerializedName("user_name")
|
||||||
|
val userName: String,
|
||||||
|
|
||||||
|
@field:SerializedName("nib")
|
||||||
|
val nib: String,
|
||||||
|
|
||||||
|
@field:SerializedName("latitude")
|
||||||
|
val latitude: String,
|
||||||
|
|
||||||
|
@field:SerializedName("store_type_id")
|
||||||
|
val storeTypeId: Int,
|
||||||
|
|
||||||
|
@field:SerializedName("balance")
|
||||||
|
val balance: String,
|
||||||
|
|
||||||
|
@field:SerializedName("street")
|
||||||
|
val street: String,
|
||||||
|
|
||||||
|
@field:SerializedName("store_name")
|
||||||
|
val storeName: String,
|
||||||
|
|
||||||
|
@field:SerializedName("user_phone")
|
||||||
|
val userPhone: String,
|
||||||
|
|
||||||
|
@field:SerializedName("halal")
|
||||||
|
val halal: String,
|
||||||
|
|
||||||
|
@field:SerializedName("id")
|
||||||
|
val id: Int,
|
||||||
|
|
||||||
|
@field:SerializedName("email")
|
||||||
|
val email: String,
|
||||||
|
|
||||||
|
@field:SerializedName("store_image")
|
||||||
|
val storeImage: Any,
|
||||||
|
|
||||||
|
@field:SerializedName("longitude")
|
||||||
|
val longitude: String,
|
||||||
|
|
||||||
|
@field:SerializedName("store_id")
|
||||||
|
val storeId: Int,
|
||||||
|
|
||||||
|
@field:SerializedName("is_store_location")
|
||||||
|
val isStoreLocation: Boolean,
|
||||||
|
|
||||||
|
@field:SerializedName("ktp")
|
||||||
|
val ktp: String,
|
||||||
|
|
||||||
|
@field:SerializedName("approval_status")
|
||||||
|
val approvalStatus: String,
|
||||||
|
|
||||||
|
@field:SerializedName("npwp")
|
||||||
|
val npwp: String,
|
||||||
|
|
||||||
|
@field:SerializedName("store_type")
|
||||||
|
val storeType: String,
|
||||||
|
|
||||||
|
@field:SerializedName("is_on_leave")
|
||||||
|
val isOnLeave: Boolean,
|
||||||
|
|
||||||
|
@field:SerializedName("user_id")
|
||||||
|
val userId: Int,
|
||||||
|
|
||||||
|
@field:SerializedName("province_id")
|
||||||
|
val provinceId: Int,
|
||||||
|
|
||||||
|
@field:SerializedName("phone")
|
||||||
|
val phone: String,
|
||||||
|
|
||||||
|
@field:SerializedName("subdistrict")
|
||||||
|
val subdistrict: String,
|
||||||
|
|
||||||
|
@field:SerializedName("recipient")
|
||||||
|
val recipient: String,
|
||||||
|
|
||||||
|
@field:SerializedName("detail")
|
||||||
|
val detail: String,
|
||||||
|
|
||||||
|
@field:SerializedName("postal_code")
|
||||||
|
val postalCode: String,
|
||||||
|
|
||||||
|
@field:SerializedName("store_description")
|
||||||
|
val storeDescription: String,
|
||||||
|
|
||||||
|
@field:SerializedName("city_id")
|
||||||
|
val cityId: Int
|
||||||
|
)
|
@ -0,0 +1,27 @@
|
|||||||
|
package com.alya.ecommerce_serang.data.api.response
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName
|
||||||
|
|
||||||
|
data class CreateProductResponse(
|
||||||
|
|
||||||
|
@field:SerializedName("product")
|
||||||
|
val product: Product? = null,
|
||||||
|
|
||||||
|
@field:SerializedName("message")
|
||||||
|
val message: String? = null,
|
||||||
|
|
||||||
|
@field:SerializedName("preorder")
|
||||||
|
val preorder: Preorder? = null
|
||||||
|
)
|
||||||
|
|
||||||
|
data class Preorder(
|
||||||
|
|
||||||
|
@field:SerializedName("duration")
|
||||||
|
val duration: Int? = null,
|
||||||
|
|
||||||
|
@field:SerializedName("product_id")
|
||||||
|
val productId: Int? = null,
|
||||||
|
|
||||||
|
@field:SerializedName("id")
|
||||||
|
val id: Int? = null
|
||||||
|
)
|
@ -0,0 +1,13 @@
|
|||||||
|
package com.alya.ecommerce_serang.data.api.response
|
||||||
|
|
||||||
|
import com.alya.ecommerce_serang.data.api.dto.ProductsItem
|
||||||
|
import com.google.gson.annotations.SerializedName
|
||||||
|
|
||||||
|
data class ViewStoreProductsResponse(
|
||||||
|
|
||||||
|
@field:SerializedName("message")
|
||||||
|
val message: String? = null,
|
||||||
|
|
||||||
|
@field:SerializedName("products")
|
||||||
|
val products: List<ProductsItem?>? = null
|
||||||
|
)
|
@ -1,5 +1,6 @@
|
|||||||
package com.alya.ecommerce_serang.data.api.response.product
|
package com.alya.ecommerce_serang.data.api.response
|
||||||
|
|
||||||
|
import com.alya.ecommerce_serang.data.api.dto.Store
|
||||||
import com.google.gson.annotations.SerializedName
|
import com.google.gson.annotations.SerializedName
|
||||||
|
|
||||||
data class StoreResponse(
|
data class StoreResponse(
|
||||||
|
@ -28,8 +28,12 @@ import com.alya.ecommerce_serang.data.api.response.product.StoreResponse
|
|||||||
import com.alya.ecommerce_serang.data.api.response.profile.AddressResponse
|
import com.alya.ecommerce_serang.data.api.response.profile.AddressResponse
|
||||||
import com.alya.ecommerce_serang.data.api.response.profile.CreateAddressResponse
|
import com.alya.ecommerce_serang.data.api.response.profile.CreateAddressResponse
|
||||||
import com.alya.ecommerce_serang.data.api.response.profile.ProfileResponse
|
import com.alya.ecommerce_serang.data.api.response.profile.ProfileResponse
|
||||||
|
import com.alya.ecommerce_serang.data.api.response.ViewStoreProductsResponse
|
||||||
|
import retrofit2.Call
|
||||||
import retrofit2.Response
|
import retrofit2.Response
|
||||||
import retrofit2.http.Body
|
import retrofit2.http.Body
|
||||||
|
import retrofit2.http.Field
|
||||||
|
import retrofit2.http.FormUrlEncoded
|
||||||
import retrofit2.http.GET
|
import retrofit2.http.GET
|
||||||
import retrofit2.http.POST
|
import retrofit2.http.POST
|
||||||
import retrofit2.http.PUT
|
import retrofit2.http.PUT
|
||||||
@ -98,6 +102,27 @@ interface ApiService {
|
|||||||
@GET("mystore")
|
@GET("mystore")
|
||||||
suspend fun getStore (): Response<StoreResponse>
|
suspend fun getStore (): Response<StoreResponse>
|
||||||
|
|
||||||
|
@GET("mystore/product") // Replace with actual endpoint
|
||||||
|
suspend fun getStoreProduct(): Response<ViewStoreProductsResponse>
|
||||||
|
|
||||||
|
@GET("category")
|
||||||
|
fun getCategories(): Call<CategoryResponse>
|
||||||
|
|
||||||
|
@POST("store/createproduct")
|
||||||
|
@FormUrlEncoded
|
||||||
|
suspend fun addProduct(
|
||||||
|
@Field("name") name: String,
|
||||||
|
@Field("description") description: String,
|
||||||
|
@Field("price") price: Int,
|
||||||
|
@Field("stock") stock: Int,
|
||||||
|
@Field("min_order") minOrder: Int,
|
||||||
|
@Field("weight") weight: Int,
|
||||||
|
@Field("is_pre_order") isPreOrder: Boolean,
|
||||||
|
@Field("duration") duration: Int,
|
||||||
|
@Field("category_id") categoryId: Int,
|
||||||
|
@Field("is_active") isActive: String
|
||||||
|
): Response<Unit>
|
||||||
|
|
||||||
@GET("cart_item")
|
@GET("cart_item")
|
||||||
suspend fun getCart (): Response<ListCartResponse>
|
suspend fun getCart (): Response<ListCartResponse>
|
||||||
|
|
||||||
@ -124,5 +149,4 @@ interface ApiService {
|
|||||||
@GET("provinces")
|
@GET("provinces")
|
||||||
suspend fun getListProv(
|
suspend fun getListProv(
|
||||||
): Response<ListProvinceResponse>
|
): Response<ListProvinceResponse>
|
||||||
|
|
||||||
}
|
}
|
@ -0,0 +1,31 @@
|
|||||||
|
package com.alya.ecommerce_serang.data.repository
|
||||||
|
|
||||||
|
import android.util.Log
|
||||||
|
import com.alya.ecommerce_serang.data.api.dto.Store
|
||||||
|
import com.alya.ecommerce_serang.data.api.response.StoreResponse
|
||||||
|
import com.alya.ecommerce_serang.data.api.retrofit.ApiService
|
||||||
|
import retrofit2.HttpException
|
||||||
|
import java.io.IOException
|
||||||
|
|
||||||
|
class MyStoreRepository(private val apiService: ApiService) {
|
||||||
|
suspend fun fetchMyStoreProfile(): Result<Store?> {
|
||||||
|
return try {
|
||||||
|
val response = apiService.getStore()
|
||||||
|
|
||||||
|
if (response.isSuccessful) {
|
||||||
|
val storeResponse: StoreResponse? = response.body()
|
||||||
|
Result.Success(storeResponse?.store) // ✅ Return Success with Store data
|
||||||
|
} else {
|
||||||
|
val errorMessage = response.errorBody()?.string() ?: "Unknown API error"
|
||||||
|
Log.e("MyStoreRepository", "Error: $errorMessage")
|
||||||
|
Result.Error(HttpException(response)) // ✅ Wrap API error in Result.Error
|
||||||
|
}
|
||||||
|
} catch (e: IOException) {
|
||||||
|
Log.e("MyStoreRepository", "Network error: ${e.message}")
|
||||||
|
Result.Error(e) // ✅ Handle network-related errors
|
||||||
|
} catch (e: Exception) {
|
||||||
|
Log.e("MyStoreRepository", "Unexpected error: ${e.message}")
|
||||||
|
Result.Error(e) // ✅ Handle unexpected errors
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -63,6 +63,7 @@ class ProductRepository(private val apiService: ApiService) {
|
|||||||
suspend fun getAllCategories(): Result<List<CategoryItem>> =
|
suspend fun getAllCategories(): Result<List<CategoryItem>> =
|
||||||
withContext(Dispatchers.IO) {
|
withContext(Dispatchers.IO) {
|
||||||
try {
|
try {
|
||||||
|
Log.d("Categories", "Attempting to fetch categories")
|
||||||
val response = apiService.allCategory()
|
val response = apiService.allCategory()
|
||||||
|
|
||||||
if (response.isSuccessful) {
|
if (response.isSuccessful) {
|
||||||
@ -109,7 +110,6 @@ class ProductRepository(private val apiService: ApiService) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
suspend fun fetchStoreDetail(storeId: Int): Result<StoreProduct?> {
|
suspend fun fetchStoreDetail(storeId: Int): Result<StoreProduct?> {
|
||||||
return try {
|
return try {
|
||||||
val response = apiService.getDetailStore(storeId)
|
val response = apiService.getDetailStore(storeId)
|
||||||
@ -130,10 +130,56 @@ class ProductRepository(private val apiService: ApiService) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
suspend fun fetchMyStoreProducts(): List<ProductsItem> {
|
||||||
|
val response = apiService.getStoreProduct()
|
||||||
|
if (response.isSuccessful) {
|
||||||
|
val responseBody = response.body()
|
||||||
|
return responseBody?.products?.filterNotNull() ?: emptyList()
|
||||||
|
} else {
|
||||||
|
throw Exception("Failed to fetch store products: ${response.message()}")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
suspend fun addProduct(
|
||||||
|
name: String,
|
||||||
|
description: String,
|
||||||
|
price: Int,
|
||||||
|
stock: Int,
|
||||||
|
minOrder: Int,
|
||||||
|
weight: Int,
|
||||||
|
isPreOrder: Boolean,
|
||||||
|
duration: Int,
|
||||||
|
categoryId: Int,
|
||||||
|
isActive: Boolean
|
||||||
|
): Result<Unit> = withContext(Dispatchers.IO) {
|
||||||
|
try {
|
||||||
|
val status = if (isActive) "active" else "inactive"
|
||||||
|
val response = apiService.addProduct(
|
||||||
|
name = name,
|
||||||
|
description = description,
|
||||||
|
price = price,
|
||||||
|
stock = stock,
|
||||||
|
minOrder = minOrder,
|
||||||
|
weight = weight,
|
||||||
|
isPreOrder = isPreOrder,
|
||||||
|
duration = duration,
|
||||||
|
categoryId = categoryId,
|
||||||
|
isActive = status
|
||||||
|
)
|
||||||
|
|
||||||
|
if (response.isSuccessful) {
|
||||||
|
Result.Success(Unit)
|
||||||
|
} else {
|
||||||
|
Result.Error(Exception("Failed to add product. Code: ${response.code()}"))
|
||||||
|
}
|
||||||
|
} catch (e: Exception) {
|
||||||
|
Result.Error(e)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private const val TAG = "ProductRepository"
|
private const val TAG = "ProductRepository"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// suspend fun fetchStoreDetail(storeId: Int): Store? {
|
// suspend fun fetchStoreDetail(storeId: Int): Store? {
|
||||||
|
@ -13,6 +13,7 @@ import com.alya.ecommerce_serang.databinding.ActivityLoginBinding
|
|||||||
import com.alya.ecommerce_serang.ui.MainActivity
|
import com.alya.ecommerce_serang.ui.MainActivity
|
||||||
import com.alya.ecommerce_serang.utils.BaseViewModelFactory
|
import com.alya.ecommerce_serang.utils.BaseViewModelFactory
|
||||||
import com.alya.ecommerce_serang.utils.SessionManager
|
import com.alya.ecommerce_serang.utils.SessionManager
|
||||||
|
import com.alya.ecommerce_serang.utils.viewmodel.LoginViewModel
|
||||||
|
|
||||||
class LoginActivity : AppCompatActivity() {
|
class LoginActivity : AppCompatActivity() {
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ import com.alya.ecommerce_serang.databinding.ActivityRegisterBinding
|
|||||||
import com.alya.ecommerce_serang.ui.MainActivity
|
import com.alya.ecommerce_serang.ui.MainActivity
|
||||||
import com.alya.ecommerce_serang.utils.BaseViewModelFactory
|
import com.alya.ecommerce_serang.utils.BaseViewModelFactory
|
||||||
import com.alya.ecommerce_serang.utils.SessionManager
|
import com.alya.ecommerce_serang.utils.SessionManager
|
||||||
|
import com.alya.ecommerce_serang.utils.viewmodel.RegisterViewModel
|
||||||
|
|
||||||
class RegisterActivity : AppCompatActivity() {
|
class RegisterActivity : AppCompatActivity() {
|
||||||
private lateinit var binding: ActivityRegisterBinding
|
private lateinit var binding: ActivityRegisterBinding
|
||||||
|
@ -7,6 +7,7 @@ import android.view.ViewGroup
|
|||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.fragment.app.viewModels
|
import androidx.fragment.app.viewModels
|
||||||
import com.alya.ecommerce_serang.R
|
import com.alya.ecommerce_serang.R
|
||||||
|
import com.alya.ecommerce_serang.utils.viewmodel.ChatViewModel
|
||||||
|
|
||||||
class ChatFragment : Fragment() {
|
class ChatFragment : Fragment() {
|
||||||
|
|
||||||
|
@ -24,6 +24,8 @@ import com.alya.ecommerce_serang.utils.BaseViewModelFactory
|
|||||||
import com.alya.ecommerce_serang.utils.HorizontalMarginItemDecoration
|
import com.alya.ecommerce_serang.utils.HorizontalMarginItemDecoration
|
||||||
import com.alya.ecommerce_serang.utils.SessionManager
|
import com.alya.ecommerce_serang.utils.SessionManager
|
||||||
import com.alya.ecommerce_serang.utils.setLightStatusBar
|
import com.alya.ecommerce_serang.utils.setLightStatusBar
|
||||||
|
import com.alya.ecommerce_serang.utils.viewmodel.HomeUiState
|
||||||
|
import com.alya.ecommerce_serang.utils.viewmodel.HomeViewModel
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
//@AndroidEntryPoint
|
//@AndroidEntryPoint
|
||||||
|
@ -28,6 +28,7 @@ import com.alya.ecommerce_serang.ui.home.HorizontalProductAdapter
|
|||||||
import com.alya.ecommerce_serang.ui.order.CheckoutActivity
|
import com.alya.ecommerce_serang.ui.order.CheckoutActivity
|
||||||
import com.alya.ecommerce_serang.utils.BaseViewModelFactory
|
import com.alya.ecommerce_serang.utils.BaseViewModelFactory
|
||||||
import com.alya.ecommerce_serang.utils.SessionManager
|
import com.alya.ecommerce_serang.utils.SessionManager
|
||||||
|
import com.alya.ecommerce_serang.utils.viewmodel.ProductViewModel
|
||||||
import com.bumptech.glide.Glide
|
import com.bumptech.glide.Glide
|
||||||
import com.google.android.material.bottomsheet.BottomSheetDialog
|
import com.google.android.material.bottomsheet.BottomSheetDialog
|
||||||
import java.text.NumberFormat
|
import java.text.NumberFormat
|
||||||
|
@ -13,6 +13,7 @@ import com.alya.ecommerce_serang.data.repository.ProductRepository
|
|||||||
import com.alya.ecommerce_serang.databinding.ActivityReviewProductBinding
|
import com.alya.ecommerce_serang.databinding.ActivityReviewProductBinding
|
||||||
import com.alya.ecommerce_serang.utils.BaseViewModelFactory
|
import com.alya.ecommerce_serang.utils.BaseViewModelFactory
|
||||||
import com.alya.ecommerce_serang.utils.SessionManager
|
import com.alya.ecommerce_serang.utils.SessionManager
|
||||||
|
import com.alya.ecommerce_serang.utils.viewmodel.ProductViewModel
|
||||||
|
|
||||||
class ReviewProductActivity : AppCompatActivity() {
|
class ReviewProductActivity : AppCompatActivity() {
|
||||||
private lateinit var binding: ActivityReviewProductBinding
|
private lateinit var binding: ActivityReviewProductBinding
|
||||||
|
@ -14,6 +14,7 @@ import com.alya.ecommerce_serang.data.repository.UserRepository
|
|||||||
import com.alya.ecommerce_serang.databinding.ActivityDetailProfileBinding
|
import com.alya.ecommerce_serang.databinding.ActivityDetailProfileBinding
|
||||||
import com.alya.ecommerce_serang.utils.BaseViewModelFactory
|
import com.alya.ecommerce_serang.utils.BaseViewModelFactory
|
||||||
import com.alya.ecommerce_serang.utils.SessionManager
|
import com.alya.ecommerce_serang.utils.SessionManager
|
||||||
|
import com.alya.ecommerce_serang.utils.viewmodel.ProfileViewModel
|
||||||
import com.bumptech.glide.Glide
|
import com.bumptech.glide.Glide
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
|
@ -15,9 +15,10 @@ import com.alya.ecommerce_serang.data.api.dto.UserProfile
|
|||||||
import com.alya.ecommerce_serang.data.api.retrofit.ApiConfig
|
import com.alya.ecommerce_serang.data.api.retrofit.ApiConfig
|
||||||
import com.alya.ecommerce_serang.data.repository.UserRepository
|
import com.alya.ecommerce_serang.data.repository.UserRepository
|
||||||
import com.alya.ecommerce_serang.databinding.FragmentProfileBinding
|
import com.alya.ecommerce_serang.databinding.FragmentProfileBinding
|
||||||
import com.alya.ecommerce_serang.ui.profile.mystore.TokoSayaActivity
|
import com.alya.ecommerce_serang.ui.profile.mystore.MyStoreActivity
|
||||||
import com.alya.ecommerce_serang.utils.BaseViewModelFactory
|
import com.alya.ecommerce_serang.utils.BaseViewModelFactory
|
||||||
import com.alya.ecommerce_serang.utils.SessionManager
|
import com.alya.ecommerce_serang.utils.SessionManager
|
||||||
|
import com.alya.ecommerce_serang.utils.viewmodel.ProfileViewModel
|
||||||
import com.bumptech.glide.Glide
|
import com.bumptech.glide.Glide
|
||||||
|
|
||||||
class ProfileFragment : Fragment() {
|
class ProfileFragment : Fragment() {
|
||||||
@ -54,7 +55,7 @@ class ProfileFragment : Fragment() {
|
|||||||
viewModel.loadUserProfile()
|
viewModel.loadUserProfile()
|
||||||
|
|
||||||
binding.cardBukaToko.setOnClickListener{
|
binding.cardBukaToko.setOnClickListener{
|
||||||
val intentBuka = Intent(requireContext(), TokoSayaActivity::class.java)
|
val intentBuka = Intent(requireContext(), MyStoreActivity::class.java)
|
||||||
startActivity(intentBuka)
|
startActivity(intentBuka)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,132 @@
|
|||||||
|
package com.alya.ecommerce_serang.ui.profile.mystore
|
||||||
|
|
||||||
|
import android.content.Intent
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.widget.Toast
|
||||||
|
import androidx.activity.enableEdgeToEdge
|
||||||
|
import androidx.activity.viewModels
|
||||||
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import com.alya.ecommerce_serang.data.api.dto.Store
|
||||||
|
import com.alya.ecommerce_serang.data.api.retrofit.ApiConfig
|
||||||
|
import com.alya.ecommerce_serang.data.api.retrofit.ApiService
|
||||||
|
import com.alya.ecommerce_serang.data.repository.MyStoreRepository
|
||||||
|
import com.alya.ecommerce_serang.databinding.ActivityMyStoreBinding
|
||||||
|
import com.alya.ecommerce_serang.ui.chat.ChatFragment
|
||||||
|
import com.alya.ecommerce_serang.ui.profile.mystore.balance.BalanceActivity
|
||||||
|
import com.alya.ecommerce_serang.ui.profile.mystore.product.ProductActivity
|
||||||
|
import com.alya.ecommerce_serang.ui.profile.mystore.profile.DetailStoreProfileActivity
|
||||||
|
import com.alya.ecommerce_serang.ui.profile.mystore.review.ReviewFragment
|
||||||
|
import com.alya.ecommerce_serang.ui.profile.mystore.sells.all_sells.AllSellsFragment
|
||||||
|
import com.alya.ecommerce_serang.ui.profile.mystore.sells.order.OrderFragment
|
||||||
|
import com.alya.ecommerce_serang.ui.profile.mystore.sells.payment.PaymentFragment
|
||||||
|
import com.alya.ecommerce_serang.ui.profile.mystore.sells.shipment.ShipmentFragment
|
||||||
|
import com.alya.ecommerce_serang.utils.BaseViewModelFactory
|
||||||
|
import com.alya.ecommerce_serang.utils.SessionManager
|
||||||
|
import com.alya.ecommerce_serang.utils.viewmodel.MyStoreViewModel
|
||||||
|
import com.bumptech.glide.Glide
|
||||||
|
import kotlin.getValue
|
||||||
|
|
||||||
|
class MyStoreActivity : AppCompatActivity() {
|
||||||
|
private lateinit var binding: ActivityMyStoreBinding
|
||||||
|
private lateinit var apiService: ApiService
|
||||||
|
private lateinit var sessionManager: SessionManager
|
||||||
|
|
||||||
|
private val viewModel: MyStoreViewModel by viewModels {
|
||||||
|
BaseViewModelFactory {
|
||||||
|
val apiService = ApiConfig.getApiService(sessionManager)
|
||||||
|
val myStoreRepository = MyStoreRepository(apiService)
|
||||||
|
MyStoreViewModel(myStoreRepository)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
binding = ActivityMyStoreBinding.inflate(layoutInflater)
|
||||||
|
setContentView(binding.root)
|
||||||
|
|
||||||
|
sessionManager = SessionManager(this)
|
||||||
|
apiService = ApiConfig.getApiService(sessionManager)
|
||||||
|
|
||||||
|
enableEdgeToEdge()
|
||||||
|
|
||||||
|
viewModel.loadMyStore()
|
||||||
|
|
||||||
|
viewModel.myStoreProfile.observe(this){ user ->
|
||||||
|
user?.let { myStoreProfileOverview(it) }
|
||||||
|
}
|
||||||
|
|
||||||
|
viewModel.errorMessage.observe(this) { error ->
|
||||||
|
Toast.makeText(this, error, Toast.LENGTH_SHORT).show()
|
||||||
|
}
|
||||||
|
|
||||||
|
setUpClickListeners()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun myStoreProfileOverview(store: Store){
|
||||||
|
|
||||||
|
binding.tvStoreName.setText(store.storeName.toString())
|
||||||
|
binding.tvStoreType.setText(store.storeType.toString())
|
||||||
|
|
||||||
|
store.storeImage.let {
|
||||||
|
Glide.with(this)
|
||||||
|
.load(it)
|
||||||
|
.into(binding.ivProfile)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setUpClickListeners() {
|
||||||
|
binding.btnEditProfile.setOnClickListener {
|
||||||
|
startActivity(Intent(this, DetailStoreProfileActivity::class.java))
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.layoutBalance.setOnClickListener {
|
||||||
|
startActivity(Intent(this, BalanceActivity::class.java))
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.tvHistory.setOnClickListener {
|
||||||
|
supportFragmentManager.beginTransaction()
|
||||||
|
.replace(android.R.id.content, AllSellsFragment())
|
||||||
|
.addToBackStack(null)
|
||||||
|
.commit()
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.layoutPerluTagihan.setOnClickListener {
|
||||||
|
supportFragmentManager.beginTransaction()
|
||||||
|
.replace(android.R.id.content, OrderFragment())
|
||||||
|
.addToBackStack(null)
|
||||||
|
.commit()
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.layoutPembayaran.setOnClickListener {
|
||||||
|
supportFragmentManager.beginTransaction()
|
||||||
|
.replace(android.R.id.content, PaymentFragment())
|
||||||
|
.addToBackStack(null)
|
||||||
|
.commit()
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.layoutPerluDikirim.setOnClickListener {
|
||||||
|
supportFragmentManager.beginTransaction()
|
||||||
|
.replace(android.R.id.content, ShipmentFragment())
|
||||||
|
.addToBackStack(null)
|
||||||
|
.commit()
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.layoutProductMenu.setOnClickListener {
|
||||||
|
startActivity(Intent(this, ProductActivity::class.java))
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.layoutReview.setOnClickListener {
|
||||||
|
supportFragmentManager.beginTransaction()
|
||||||
|
.replace(android.R.id.content, ReviewFragment())
|
||||||
|
.addToBackStack(null)
|
||||||
|
.commit()
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.layoutInbox.setOnClickListener {
|
||||||
|
supportFragmentManager.beginTransaction()
|
||||||
|
.replace(android.R.id.content, ChatFragment())
|
||||||
|
.addToBackStack(null)
|
||||||
|
.commit()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
package com.alya.ecommerce_serang.ui.profile.mystore.balance
|
||||||
|
|
||||||
|
/* class BalanceTransactionAdapter(private val balanceTransactionList: List<BalanceTransaction>) :
|
||||||
|
RecyclerView.Adapter<BalanceTransactionAdapter.TransactionViewHolder>() {
|
||||||
|
|
||||||
|
|
||||||
|
}*/
|
@ -0,0 +1,84 @@
|
|||||||
|
package com.alya.ecommerce_serang.ui.profile.mystore.product
|
||||||
|
|
||||||
|
import android.content.Intent
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.view.View
|
||||||
|
import android.widget.Toast
|
||||||
|
import androidx.activity.viewModels
|
||||||
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
|
import com.alya.ecommerce_serang.data.api.retrofit.ApiConfig
|
||||||
|
import com.alya.ecommerce_serang.data.repository.ProductRepository
|
||||||
|
import com.alya.ecommerce_serang.data.repository.Result
|
||||||
|
import com.alya.ecommerce_serang.databinding.ActivityProductBinding
|
||||||
|
import com.alya.ecommerce_serang.utils.viewmodel.ProductViewModel
|
||||||
|
import com.alya.ecommerce_serang.utils.BaseViewModelFactory
|
||||||
|
import com.alya.ecommerce_serang.utils.SessionManager
|
||||||
|
|
||||||
|
class ProductActivity : AppCompatActivity() {
|
||||||
|
|
||||||
|
private lateinit var binding: ActivityProductBinding
|
||||||
|
private lateinit var sessionManager: SessionManager
|
||||||
|
|
||||||
|
private val viewModel: ProductViewModel by viewModels {
|
||||||
|
BaseViewModelFactory {
|
||||||
|
sessionManager = SessionManager(this)
|
||||||
|
val apiService = ApiConfig.getApiService(sessionManager)
|
||||||
|
val productRepository = ProductRepository(apiService)
|
||||||
|
ProductViewModel(productRepository)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
binding = ActivityProductBinding.inflate(layoutInflater)
|
||||||
|
setContentView(binding.root)
|
||||||
|
|
||||||
|
setupHeader()
|
||||||
|
setupRecyclerView()
|
||||||
|
|
||||||
|
observeViewModel()
|
||||||
|
|
||||||
|
binding.progressBar.visibility = View.VISIBLE
|
||||||
|
viewModel.loadMyStoreProducts()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun observeViewModel() {
|
||||||
|
viewModel.productList.observe(this) { result ->
|
||||||
|
when (result) {
|
||||||
|
is Result.Loading -> {
|
||||||
|
binding.progressBar.visibility = View.VISIBLE
|
||||||
|
}
|
||||||
|
is Result.Success -> {
|
||||||
|
binding.progressBar.visibility = View.GONE
|
||||||
|
val products = result.data
|
||||||
|
binding.rvStoreProduct.adapter = ProductAdapter(products) {
|
||||||
|
Toast.makeText(this, "Clicked: ${it.name}", Toast.LENGTH_SHORT).show()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is Result.Error -> {
|
||||||
|
binding.progressBar.visibility = View.GONE
|
||||||
|
Toast.makeText(this, "Failed to load products: ${result.exception.message}", Toast.LENGTH_SHORT).show()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setupHeader() {
|
||||||
|
binding.header.headerTitle.text = "Produk Saya"
|
||||||
|
binding.header.headerRightText.visibility = View.VISIBLE
|
||||||
|
|
||||||
|
binding.header.headerLeftIcon.setOnClickListener {
|
||||||
|
onBackPressedDispatcher.onBackPressed()
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.header.headerRightText.setOnClickListener {
|
||||||
|
startActivity(Intent(this, StoreProductDetailActivity::class.java))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setupRecyclerView() {
|
||||||
|
binding.rvStoreProduct.layoutManager = LinearLayoutManager(this)
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,63 @@
|
|||||||
|
package com.alya.ecommerce_serang.ui.profile.mystore.product
|
||||||
|
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import android.widget.ImageView
|
||||||
|
import android.widget.TextView
|
||||||
|
import androidx.core.content.ContextCompat
|
||||||
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
import com.alya.ecommerce_serang.R
|
||||||
|
import com.alya.ecommerce_serang.data.api.dto.ProductsItem
|
||||||
|
import com.bumptech.glide.Glide
|
||||||
|
|
||||||
|
class ProductAdapter(
|
||||||
|
private val products: List<ProductsItem>,
|
||||||
|
private val onItemClick: (ProductsItem) -> Unit
|
||||||
|
) : RecyclerView.Adapter<ProductAdapter.ProductViewHolder>() {
|
||||||
|
|
||||||
|
inner class ProductViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
||||||
|
private val ivProduct: ImageView = itemView.findViewById(R.id.iv_product)
|
||||||
|
private val tvProductName: TextView = itemView.findViewById(R.id.tv_product_name)
|
||||||
|
private val tvProductPrice: TextView = itemView.findViewById(R.id.tv_product_price)
|
||||||
|
private val tvProductStock: TextView = itemView.findViewById(R.id.tv_product_stock)
|
||||||
|
private val tvProductStatus: TextView = itemView.findViewById(R.id.tv_product_status)
|
||||||
|
|
||||||
|
fun bind(product: ProductsItem) {
|
||||||
|
tvProductName.text = product.name
|
||||||
|
tvProductPrice.text = "Rp${product.price}"
|
||||||
|
tvProductStock.text = "Stok: ${product.stock}"
|
||||||
|
tvProductStatus.text = product.status
|
||||||
|
|
||||||
|
// Change color depending on status
|
||||||
|
tvProductStatus.setTextColor(
|
||||||
|
ContextCompat.getColor(
|
||||||
|
itemView.context,
|
||||||
|
if (product.status.equals("active", true))
|
||||||
|
R.color.darkblue_500 else R.color.black_500
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
Glide.with(itemView.context)
|
||||||
|
.load(product.image)
|
||||||
|
.placeholder(R.drawable.placeholder_image)
|
||||||
|
.into(ivProduct)
|
||||||
|
|
||||||
|
itemView.setOnClickListener {
|
||||||
|
onItemClick(product)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ProductViewHolder {
|
||||||
|
val view = LayoutInflater.from(parent.context)
|
||||||
|
.inflate(R.layout.item_store_product, parent, false)
|
||||||
|
return ProductViewHolder(view)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getItemCount(): Int = products.size
|
||||||
|
|
||||||
|
override fun onBindViewHolder(holder: ProductViewHolder, position: Int) {
|
||||||
|
holder.bind(products[position])
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,175 @@
|
|||||||
|
package com.alya.ecommerce_serang.ui.profile.mystore.product
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.text.Editable
|
||||||
|
import android.text.TextWatcher
|
||||||
|
import android.view.View
|
||||||
|
import android.widget.ArrayAdapter
|
||||||
|
import android.widget.Toast
|
||||||
|
import com.alya.ecommerce_serang.R
|
||||||
|
import androidx.activity.viewModels
|
||||||
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import androidx.core.content.ContextCompat
|
||||||
|
import com.alya.ecommerce_serang.data.api.dto.CategoryItem
|
||||||
|
import com.alya.ecommerce_serang.data.api.retrofit.ApiConfig
|
||||||
|
import com.alya.ecommerce_serang.data.repository.ProductRepository
|
||||||
|
import com.alya.ecommerce_serang.data.repository.Result
|
||||||
|
import com.alya.ecommerce_serang.databinding.ActivityStoreProductDetailBinding
|
||||||
|
import com.alya.ecommerce_serang.utils.viewmodel.ProductViewModel
|
||||||
|
import com.alya.ecommerce_serang.utils.BaseViewModelFactory
|
||||||
|
import com.alya.ecommerce_serang.utils.SessionManager
|
||||||
|
import kotlin.getValue
|
||||||
|
|
||||||
|
class StoreProductDetailActivity : AppCompatActivity() {
|
||||||
|
|
||||||
|
private lateinit var binding: ActivityStoreProductDetailBinding
|
||||||
|
private lateinit var sessionManager: SessionManager
|
||||||
|
private lateinit var categoryList: List<CategoryItem>
|
||||||
|
|
||||||
|
private val viewModel: ProductViewModel by viewModels {
|
||||||
|
BaseViewModelFactory {
|
||||||
|
sessionManager = SessionManager(this)
|
||||||
|
val apiService = ApiConfig.getApiService(sessionManager)
|
||||||
|
val productRepository = ProductRepository(apiService)
|
||||||
|
ProductViewModel(productRepository)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
binding = ActivityStoreProductDetailBinding.inflate(layoutInflater)
|
||||||
|
setContentView(binding.root)
|
||||||
|
|
||||||
|
setupHeader()
|
||||||
|
observeCategories()
|
||||||
|
viewModel.loadCategories()
|
||||||
|
|
||||||
|
// Setup Pre-Order visibility
|
||||||
|
binding.switchIsPreOrder.setOnCheckedChangeListener { _, isChecked ->
|
||||||
|
binding.layoutDurasi.visibility = if (isChecked) View.VISIBLE else View.GONE
|
||||||
|
validateForm()
|
||||||
|
}
|
||||||
|
|
||||||
|
setupFormValidation()
|
||||||
|
validateForm()
|
||||||
|
|
||||||
|
binding.btnSaveProduct.setOnClickListener {
|
||||||
|
if (binding.btnSaveProduct.isEnabled) addProduct()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setupHeader() {
|
||||||
|
binding.header.headerTitle.text = "Tambah Produk"
|
||||||
|
|
||||||
|
binding.header.headerLeftIcon.setOnClickListener {
|
||||||
|
onBackPressedDispatcher.onBackPressed()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun observeCategories() {
|
||||||
|
viewModel.categoryList.observe(this) { result ->
|
||||||
|
when (result) {
|
||||||
|
is Result.Loading -> {
|
||||||
|
// Optionally show loading spinner
|
||||||
|
}
|
||||||
|
is Result.Success -> {
|
||||||
|
categoryList = result.data
|
||||||
|
setupCategorySpinner(categoryList)
|
||||||
|
}
|
||||||
|
is Result.Error -> {
|
||||||
|
Toast.makeText(
|
||||||
|
this,
|
||||||
|
"Failed to load categories: ${result.exception.message}",
|
||||||
|
Toast.LENGTH_SHORT
|
||||||
|
).show()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setupCategorySpinner(categories: List<CategoryItem>) {
|
||||||
|
val categoryNames = categories.map { it.name }
|
||||||
|
val adapter = ArrayAdapter(this, android.R.layout.simple_spinner_item, categoryNames)
|
||||||
|
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item)
|
||||||
|
|
||||||
|
binding.spinnerKategoriProduk.adapter = adapter
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun addProduct() {
|
||||||
|
val name = binding.edtNamaProduk.text.toString()
|
||||||
|
val description = binding.edtDeskripsiProduk.text.toString()
|
||||||
|
val price = binding.edtHargaProduk.text.toString().toIntOrNull() ?: 0
|
||||||
|
val stock = binding.edtStokProduk.text.toString().toIntOrNull() ?: 0
|
||||||
|
val minOrder = binding.edtMinOrder.text.toString().toIntOrNull() ?: 1
|
||||||
|
val weight = binding.edtBeratProduk.text.toString().toIntOrNull() ?: 0
|
||||||
|
val isPreOrder = binding.switchIsPreOrder.isChecked
|
||||||
|
val duration = binding.edtDurasi.text.toString().toIntOrNull() ?: 0
|
||||||
|
val isActive = binding.switchIsActive.isChecked
|
||||||
|
val categoryPosition = binding.spinnerKategoriProduk.selectedItemPosition
|
||||||
|
val categoryId = categoryList.getOrNull(categoryPosition)?.id ?: 0
|
||||||
|
|
||||||
|
if (isPreOrder && duration == 0) {
|
||||||
|
Toast.makeText(this, "Durasi wajib diisi jika pre-order diaktifkan.", Toast.LENGTH_SHORT).show()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
viewModel.addProduct(
|
||||||
|
name, description, price, stock, minOrder, weight, isPreOrder, duration, categoryId, isActive
|
||||||
|
).observe(this) { result ->
|
||||||
|
when (result) {
|
||||||
|
is Result.Loading -> binding.btnSaveProduct.isEnabled = false
|
||||||
|
is Result.Success -> {
|
||||||
|
Toast.makeText(this, "Produk berhasil ditambahkan!", Toast.LENGTH_SHORT).show()
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
is Result.Error -> {
|
||||||
|
binding.btnSaveProduct.isEnabled = true
|
||||||
|
Toast.makeText(this, "Gagal: ${result.exception.message}", Toast.LENGTH_SHORT).show()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setupFormValidation() {
|
||||||
|
val watcher = object : TextWatcher {
|
||||||
|
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {}
|
||||||
|
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {}
|
||||||
|
override fun afterTextChanged(s: Editable?) {
|
||||||
|
validateForm()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Watch all fields
|
||||||
|
binding.edtNamaProduk.addTextChangedListener(watcher)
|
||||||
|
binding.edtDeskripsiProduk.addTextChangedListener(watcher)
|
||||||
|
binding.edtHargaProduk.addTextChangedListener(watcher)
|
||||||
|
binding.edtStokProduk.addTextChangedListener(watcher)
|
||||||
|
binding.edtMinOrder.addTextChangedListener(watcher)
|
||||||
|
binding.edtBeratProduk.addTextChangedListener(watcher)
|
||||||
|
binding.edtDurasi.addTextChangedListener(watcher)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun validateForm() {
|
||||||
|
val isNameValid = binding.edtNamaProduk.text.toString().isNotBlank()
|
||||||
|
val isDescriptionValid = binding.edtDeskripsiProduk.text.toString().isNotBlank()
|
||||||
|
val isPriceValid = binding.edtHargaProduk.text.toString().isNotBlank()
|
||||||
|
val isStockValid = binding.edtStokProduk.text.toString().isNotBlank()
|
||||||
|
val isMinOrderValid = binding.edtMinOrder.text.toString().isNotBlank()
|
||||||
|
val isWeightValid = binding.edtBeratProduk.text.toString().isNotBlank()
|
||||||
|
val isPreOrderChecked = binding.switchIsPreOrder.isChecked
|
||||||
|
val isDurationValid = !isPreOrderChecked || binding.edtDurasi.text.toString().isNotBlank()
|
||||||
|
|
||||||
|
val isFormValid = isNameValid && isDescriptionValid && isPriceValid &&
|
||||||
|
isStockValid && isMinOrderValid && isWeightValid && isDurationValid
|
||||||
|
|
||||||
|
if (isFormValid) {
|
||||||
|
binding.btnSaveProduct.isEnabled = true
|
||||||
|
binding.btnSaveProduct.setBackgroundResource(R.drawable.bg_button_active)
|
||||||
|
binding.btnSaveProduct.setTextColor(ContextCompat.getColor(this, R.color.white))
|
||||||
|
} else {
|
||||||
|
binding.btnSaveProduct.isEnabled = false
|
||||||
|
binding.btnSaveProduct.setBackgroundResource(R.drawable.bg_button_disabled)
|
||||||
|
binding.btnSaveProduct.setTextColor(ContextCompat.getColor(this, R.color.black_300))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,60 @@
|
|||||||
|
package com.alya.ecommerce_serang.ui.profile.mystore.profile
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.widget.Toast
|
||||||
|
import androidx.activity.enableEdgeToEdge
|
||||||
|
import androidx.activity.viewModels
|
||||||
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import com.alya.ecommerce_serang.data.api.dto.Store
|
||||||
|
import com.alya.ecommerce_serang.data.api.retrofit.ApiConfig
|
||||||
|
import com.alya.ecommerce_serang.data.api.retrofit.ApiService
|
||||||
|
import com.alya.ecommerce_serang.data.repository.MyStoreRepository
|
||||||
|
import com.alya.ecommerce_serang.databinding.ActivityDetailStoreProfileBinding
|
||||||
|
import com.alya.ecommerce_serang.utils.viewmodel.MyStoreViewModel
|
||||||
|
import com.alya.ecommerce_serang.utils.BaseViewModelFactory
|
||||||
|
import com.alya.ecommerce_serang.utils.SessionManager
|
||||||
|
import com.bumptech.glide.Glide
|
||||||
|
import kotlin.getValue
|
||||||
|
|
||||||
|
class DetailStoreProfileActivity : AppCompatActivity() {
|
||||||
|
private lateinit var binding: ActivityDetailStoreProfileBinding
|
||||||
|
private lateinit var apiService: ApiService
|
||||||
|
private lateinit var sessionManager: SessionManager
|
||||||
|
|
||||||
|
private val viewModel: MyStoreViewModel by viewModels {
|
||||||
|
BaseViewModelFactory {
|
||||||
|
val apiService = ApiConfig.getApiService(sessionManager)
|
||||||
|
val myStoreRepository = MyStoreRepository(apiService)
|
||||||
|
MyStoreViewModel(myStoreRepository)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
binding = ActivityDetailStoreProfileBinding.inflate(layoutInflater)
|
||||||
|
setContentView(binding.root)
|
||||||
|
|
||||||
|
sessionManager = SessionManager(this)
|
||||||
|
apiService = ApiConfig.getApiService(sessionManager)
|
||||||
|
|
||||||
|
enableEdgeToEdge()
|
||||||
|
|
||||||
|
viewModel.loadMyStore()
|
||||||
|
|
||||||
|
viewModel.myStoreProfile.observe(this){ user ->
|
||||||
|
user?.let { updateStoreProfile(it) }
|
||||||
|
}
|
||||||
|
|
||||||
|
viewModel.errorMessage.observe(this) { error ->
|
||||||
|
Toast.makeText(this, error, Toast.LENGTH_SHORT).show()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun updateStoreProfile(store: Store){
|
||||||
|
|
||||||
|
binding.edtNamaToko.setText(store.storeName.toString())
|
||||||
|
binding.edtJenisToko.setText(store.storeType.toString())
|
||||||
|
binding.edtDeskripsiToko.setText(store.storeDescription.toString())
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package com.alya.ecommerce_serang.ui.profile.mystore.product
|
package com.alya.ecommerce_serang.ui.profile.mystore.profile.address
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import androidx.activity.enableEdgeToEdge
|
import androidx.activity.enableEdgeToEdge
|
||||||
@ -7,11 +7,11 @@ import androidx.core.view.ViewCompat
|
|||||||
import androidx.core.view.WindowInsetsCompat
|
import androidx.core.view.WindowInsetsCompat
|
||||||
import com.alya.ecommerce_serang.R
|
import com.alya.ecommerce_serang.R
|
||||||
|
|
||||||
class AddProductActivity : AppCompatActivity() {
|
class StoreAddressActivity : AppCompatActivity() {
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
enableEdgeToEdge()
|
enableEdgeToEdge()
|
||||||
setContentView(R.layout.activity_add_product)
|
setContentView(R.layout.activity_store_address)
|
||||||
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main)) { v, insets ->
|
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main)) { v, insets ->
|
||||||
val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
|
val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
|
||||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
|
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
|
@ -0,0 +1,21 @@
|
|||||||
|
package com.alya.ecommerce_serang.ui.profile.mystore.profile.payment_info
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import androidx.activity.enableEdgeToEdge
|
||||||
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import androidx.core.view.ViewCompat
|
||||||
|
import androidx.core.view.WindowInsetsCompat
|
||||||
|
import com.alya.ecommerce_serang.R
|
||||||
|
|
||||||
|
class DetailPaymentInfoActivity : AppCompatActivity() {
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
enableEdgeToEdge()
|
||||||
|
setContentView(R.layout.activity_detail_payment_info)
|
||||||
|
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main)) { v, insets ->
|
||||||
|
val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
|
||||||
|
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
|
||||||
|
insets
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package com.alya.ecommerce_serang.ui.profile.mystore.profile
|
package com.alya.ecommerce_serang.ui.profile.mystore.profile.payment_info
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import androidx.activity.enableEdgeToEdge
|
import androidx.activity.enableEdgeToEdge
|
||||||
@ -7,11 +7,11 @@ import androidx.core.view.ViewCompat
|
|||||||
import androidx.core.view.WindowInsetsCompat
|
import androidx.core.view.WindowInsetsCompat
|
||||||
import com.alya.ecommerce_serang.R
|
import com.alya.ecommerce_serang.R
|
||||||
|
|
||||||
class EditStoreProfileActivity : AppCompatActivity() {
|
class PaymentInfoActivity : AppCompatActivity() {
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
enableEdgeToEdge()
|
enableEdgeToEdge()
|
||||||
setContentView(R.layout.activity_edit_store_profile)
|
setContentView(R.layout.activity_payment_info)
|
||||||
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main)) { v, insets ->
|
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main)) { v, insets ->
|
||||||
val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
|
val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
|
||||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
|
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
|
@ -1,4 +1,4 @@
|
|||||||
package com.alya.ecommerce_serang.ui.profile.mystore
|
package com.alya.ecommerce_serang.ui.profile.mystore.profile.shipping_service
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import androidx.activity.enableEdgeToEdge
|
import androidx.activity.enableEdgeToEdge
|
||||||
@ -7,11 +7,11 @@ import androidx.core.view.ViewCompat
|
|||||||
import androidx.core.view.WindowInsetsCompat
|
import androidx.core.view.WindowInsetsCompat
|
||||||
import com.alya.ecommerce_serang.R
|
import com.alya.ecommerce_serang.R
|
||||||
|
|
||||||
class TokoSayaActivity : AppCompatActivity() {
|
class ShippingServiceActivity : AppCompatActivity() {
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
enableEdgeToEdge()
|
enableEdgeToEdge()
|
||||||
setContentView(R.layout.activity_toko_saya)
|
setContentView(R.layout.activity_shipping_service)
|
||||||
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main)) { v, insets ->
|
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main)) { v, insets ->
|
||||||
val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
|
val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
|
||||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
|
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
|
@ -0,0 +1,32 @@
|
|||||||
|
package com.alya.ecommerce_serang.ui.profile.mystore.review
|
||||||
|
|
||||||
|
import androidx.fragment.app.viewModels
|
||||||
|
import android.os.Bundle
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import com.alya.ecommerce_serang.R
|
||||||
|
import com.alya.ecommerce_serang.utils.viewmodel.ReviewViewModel
|
||||||
|
|
||||||
|
class ReviewFragment : Fragment() {
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
fun newInstance() = ReviewFragment()
|
||||||
|
}
|
||||||
|
|
||||||
|
private val viewModel: ReviewViewModel by viewModels()
|
||||||
|
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
|
||||||
|
// TODO: Use the ViewModel
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onCreateView(
|
||||||
|
inflater: LayoutInflater, container: ViewGroup?,
|
||||||
|
savedInstanceState: Bundle?
|
||||||
|
): View {
|
||||||
|
return inflater.inflate(R.layout.fragment_review, container, false)
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
package com.alya.ecommerce_serang.ui.profile.mystore.sells
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import android.os.Bundle
|
||||||
|
import com.alya.ecommerce_serang.R
|
||||||
|
|
||||||
|
class SellsActivity : AppCompatActivity() {
|
||||||
|
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
setContentView(R.layout.activity_sells)
|
||||||
|
if (savedInstanceState == null) {
|
||||||
|
supportFragmentManager.beginTransaction()
|
||||||
|
.replace(R.id.sells_fragment_container, SellsFragment())
|
||||||
|
.commit()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,43 @@
|
|||||||
|
package com.alya.ecommerce_serang.ui.profile.mystore.sells
|
||||||
|
|
||||||
|
import androidx.lifecycle.ViewModelProvider
|
||||||
|
import android.os.Bundle
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import androidx.viewpager2.widget.ViewPager2
|
||||||
|
|
||||||
|
import com.google.android.material.tabs.TabLayoutMediator
|
||||||
|
import com.alya.ecommerce_serang.R
|
||||||
|
import com.alya.ecommerce_serang.utils.viewmodel.SellsViewModel
|
||||||
|
|
||||||
|
class SellsFragment : Fragment() {
|
||||||
|
private lateinit var viewModel: SellsViewModel
|
||||||
|
|
||||||
|
override fun onCreateView(
|
||||||
|
inflater: LayoutInflater, container: ViewGroup?,
|
||||||
|
savedInstanceState: Bundle?
|
||||||
|
): View? {
|
||||||
|
return inflater.inflate(R.layout.fragment_sells, container, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
viewModel = ViewModelProvider(this).get(SellsViewModel::class.java)
|
||||||
|
|
||||||
|
val tabs = listOf(
|
||||||
|
"Semua Pesanan", "Perlu Tagihan", "Konfirmasi Pembayaran",
|
||||||
|
"Perlu Dikirim", "Dikirim", "Selesai",
|
||||||
|
"Pembatalan", "Klaim Pembayaran", "Pengiriman Gagal"
|
||||||
|
)
|
||||||
|
|
||||||
|
val adapter = SellsPagerAdapter(this, tabs.size)
|
||||||
|
val viewPager: ViewPager2 = view.findViewById(R.id.view_pager_sells)
|
||||||
|
viewPager.adapter = adapter
|
||||||
|
|
||||||
|
TabLayoutMediator(view.findViewById(R.id.tab_layout_sells), viewPager) { tab, position ->
|
||||||
|
tab.text = tabs[position]
|
||||||
|
}.attach()
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
package com.alya.ecommerce_serang.ui.profile.mystore.sells
|
||||||
|
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
|
import androidx.viewpager2.adapter.FragmentStateAdapter
|
||||||
|
import com.alya.ecommerce_serang.ui.profile.mystore.sells.all_sells.AllSellsFragment
|
||||||
|
import com.alya.ecommerce_serang.ui.profile.mystore.sells.cancellation.CancellationFragment
|
||||||
|
import com.alya.ecommerce_serang.ui.profile.mystore.sells.failed_payment.FailedPaymentFragment
|
||||||
|
import com.alya.ecommerce_serang.ui.profile.mystore.sells.failed_shipment.FailedShipmentFragment
|
||||||
|
import com.alya.ecommerce_serang.ui.profile.mystore.sells.finished.FinishedFragment
|
||||||
|
import com.alya.ecommerce_serang.ui.profile.mystore.sells.order.OrderFragment
|
||||||
|
import com.alya.ecommerce_serang.ui.profile.mystore.sells.payment.PaymentFragment
|
||||||
|
import com.alya.ecommerce_serang.ui.profile.mystore.sells.shipment.ShipmentFragment
|
||||||
|
import com.alya.ecommerce_serang.ui.profile.mystore.sells.shipped.ShippedFragment
|
||||||
|
|
||||||
|
class SellsPagerAdapter(fragment: Fragment, private val itemCount: Int) :
|
||||||
|
FragmentStateAdapter(fragment) {
|
||||||
|
|
||||||
|
override fun getItemCount(): Int = itemCount
|
||||||
|
|
||||||
|
override fun createFragment(position: Int): Fragment {
|
||||||
|
return when (position) {
|
||||||
|
0 -> AllSellsFragment()
|
||||||
|
1 -> OrderFragment()
|
||||||
|
2 -> PaymentFragment()
|
||||||
|
3 -> ShipmentFragment()
|
||||||
|
4 -> ShippedFragment()
|
||||||
|
5 -> FinishedFragment()
|
||||||
|
6 -> CancellationFragment()
|
||||||
|
7 -> FailedPaymentFragment()
|
||||||
|
8 -> FailedShipmentFragment()
|
||||||
|
else -> Fragment()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
package com.alya.ecommerce_serang.ui.profile.mystore.sells.all_sells
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import com.alya.ecommerce_serang.R
|
||||||
|
|
||||||
|
class AllSellsFragment : Fragment() {
|
||||||
|
override fun onCreateView(
|
||||||
|
inflater: LayoutInflater, container: ViewGroup?,
|
||||||
|
savedInstanceState: Bundle?
|
||||||
|
): View? {
|
||||||
|
// Inflate the layout for this fragment
|
||||||
|
return inflater.inflate(R.layout.fragment_all_sells, container, false)
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
package com.alya.ecommerce_serang.ui.profile.mystore.sells.cancellation
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import com.alya.ecommerce_serang.R
|
||||||
|
|
||||||
|
class CancellationFragment : Fragment() {
|
||||||
|
override fun onCreateView(
|
||||||
|
inflater: LayoutInflater, container: ViewGroup?,
|
||||||
|
savedInstanceState: Bundle?
|
||||||
|
): View? {
|
||||||
|
// Inflate the layout for this fragment
|
||||||
|
return inflater.inflate(R.layout.fragment_cancellation, container, false)
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
|
||||||
|
package com.alya.ecommerce_serang.ui.profile.mystore.sells.failed_payment
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import com.alya.ecommerce_serang.R
|
||||||
|
|
||||||
|
class FailedPaymentFragment : Fragment() {
|
||||||
|
override fun onCreateView(
|
||||||
|
inflater: LayoutInflater, container: ViewGroup?,
|
||||||
|
savedInstanceState: Bundle?
|
||||||
|
): View? {
|
||||||
|
// Inflate the layout for this fragment
|
||||||
|
return inflater.inflate(R.layout.fragment_failed_payment, container, false)
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
package com.alya.ecommerce_serang.ui.profile.mystore.sells.failed_shipment
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import com.alya.ecommerce_serang.R
|
||||||
|
|
||||||
|
class FailedShipmentFragment : Fragment() {
|
||||||
|
override fun onCreateView(
|
||||||
|
inflater: LayoutInflater, container: ViewGroup?,
|
||||||
|
savedInstanceState: Bundle?
|
||||||
|
): View? {
|
||||||
|
// Inflate the layout for this fragment
|
||||||
|
return inflater.inflate(R.layout.fragment_failed_shipment, container, false)
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
package com.alya.ecommerce_serang.ui.profile.mystore.sells.finished
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import com.alya.ecommerce_serang.R
|
||||||
|
|
||||||
|
class FinishedFragment : Fragment() {
|
||||||
|
override fun onCreateView(
|
||||||
|
inflater: LayoutInflater, container: ViewGroup?,
|
||||||
|
savedInstanceState: Bundle?
|
||||||
|
): View? {
|
||||||
|
// Inflate the layout for this fragment
|
||||||
|
return inflater.inflate(R.layout.fragment_finished, container, false)
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
package com.alya.ecommerce_serang.ui.profile.mystore.sells.order
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import com.alya.ecommerce_serang.R
|
||||||
|
|
||||||
|
class OrderFragment : Fragment() {
|
||||||
|
override fun onCreateView(
|
||||||
|
inflater: LayoutInflater, container: ViewGroup?,
|
||||||
|
savedInstanceState: Bundle?
|
||||||
|
): View? {
|
||||||
|
// Inflate the layout for this fragment
|
||||||
|
return inflater.inflate(R.layout.fragment_order, container, false)
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
package com.alya.ecommerce_serang.ui.profile.mystore.sells.payment
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import com.alya.ecommerce_serang.R
|
||||||
|
|
||||||
|
class PaymentFragment : Fragment() {
|
||||||
|
override fun onCreateView(
|
||||||
|
inflater: LayoutInflater, container: ViewGroup?,
|
||||||
|
savedInstanceState: Bundle?
|
||||||
|
): View? {
|
||||||
|
// Inflate the layout for this fragment
|
||||||
|
return inflater.inflate(R.layout.fragment_payment, container, false)
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
package com.alya.ecommerce_serang.ui.profile.mystore.sells.shipment
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import com.alya.ecommerce_serang.R
|
||||||
|
|
||||||
|
class ShipmentFragment : Fragment() {
|
||||||
|
override fun onCreateView(
|
||||||
|
inflater: LayoutInflater, container: ViewGroup?,
|
||||||
|
savedInstanceState: Bundle?
|
||||||
|
): View? {
|
||||||
|
// Inflate the layout for this fragment
|
||||||
|
return inflater.inflate(R.layout.fragment_shipment, container, false)
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
package com.alya.ecommerce_serang.ui.profile.mystore.sells.shipped
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import com.alya.ecommerce_serang.R
|
||||||
|
|
||||||
|
class ShippedFragment : Fragment() {
|
||||||
|
override fun onCreateView(
|
||||||
|
inflater: LayoutInflater, container: ViewGroup?,
|
||||||
|
savedInstanceState: Bundle?
|
||||||
|
): View? {
|
||||||
|
// Inflate the layout for this fragment
|
||||||
|
return inflater.inflate(R.layout.fragment_shipped, container, false)
|
||||||
|
}
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package com.alya.ecommerce_serang.ui.chat
|
package com.alya.ecommerce_serang.utils.viewmodel
|
||||||
|
|
||||||
import androidx.lifecycle.ViewModel
|
import androidx.lifecycle.ViewModel
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.alya.ecommerce_serang.ui.home
|
package com.alya.ecommerce_serang.utils.viewmodel
|
||||||
|
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import androidx.lifecycle.ViewModel
|
import androidx.lifecycle.ViewModel
|
@ -1,4 +1,4 @@
|
|||||||
package com.alya.ecommerce_serang.ui.auth
|
package com.alya.ecommerce_serang.utils.viewmodel
|
||||||
|
|
||||||
import androidx.lifecycle.LiveData
|
import androidx.lifecycle.LiveData
|
||||||
import androidx.lifecycle.MutableLiveData
|
import androidx.lifecycle.MutableLiveData
|
||||||
@ -10,12 +10,12 @@ import com.alya.ecommerce_serang.data.repository.UserRepository
|
|||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
class LoginViewModel(private val repository: UserRepository) : ViewModel() {
|
class LoginViewModel(private val repository: UserRepository) : ViewModel() {
|
||||||
private val _loginState = MutableLiveData<com.alya.ecommerce_serang.data.repository.Result<LoginResponse>>()
|
private val _loginState = MutableLiveData<Result<LoginResponse>>()
|
||||||
val loginState: LiveData<Result<LoginResponse>> get() = _loginState
|
val loginState: LiveData<Result<LoginResponse>> get() = _loginState
|
||||||
|
|
||||||
fun login(email: String, password: String) {
|
fun login(email: String, password: String) {
|
||||||
viewModelScope.launch {
|
viewModelScope.launch {
|
||||||
_loginState.value = com.alya.ecommerce_serang.data.repository.Result.Loading
|
_loginState.value = Result.Loading
|
||||||
val result = repository.login(email, password)
|
val result = repository.login(email, password)
|
||||||
_loginState.value = result
|
_loginState.value = result
|
||||||
}
|
}
|
@ -0,0 +1,28 @@
|
|||||||
|
package com.alya.ecommerce_serang.utils.viewmodel
|
||||||
|
|
||||||
|
import androidx.lifecycle.LiveData
|
||||||
|
import androidx.lifecycle.MutableLiveData
|
||||||
|
import androidx.lifecycle.ViewModel
|
||||||
|
import androidx.lifecycle.viewModelScope
|
||||||
|
import com.alya.ecommerce_serang.data.api.dto.Store
|
||||||
|
import com.alya.ecommerce_serang.data.repository.MyStoreRepository
|
||||||
|
import com.alya.ecommerce_serang.data.repository.Result
|
||||||
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
|
class MyStoreViewModel(private val myStoreRepository: MyStoreRepository): ViewModel() {
|
||||||
|
private val _myStoreProfile = MutableLiveData<Store?>()
|
||||||
|
val myStoreProfile: LiveData<Store?> = _myStoreProfile
|
||||||
|
|
||||||
|
private val _errorMessage = MutableLiveData<String>()
|
||||||
|
val errorMessage : LiveData<String> = _errorMessage
|
||||||
|
|
||||||
|
fun loadMyStore(){
|
||||||
|
viewModelScope.launch {
|
||||||
|
when (val result = myStoreRepository.fetchMyStoreProfile()){
|
||||||
|
is Result.Success -> _myStoreProfile.postValue(result.data)
|
||||||
|
is Result.Error -> _errorMessage.postValue(result.exception.message ?: "Unknown Error")
|
||||||
|
is Result.Loading -> null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,95 @@
|
|||||||
|
package com.alya.ecommerce_serang.utils.viewmodel
|
||||||
|
|
||||||
|
import androidx.lifecycle.LiveData
|
||||||
|
import androidx.lifecycle.MutableLiveData
|
||||||
|
import androidx.lifecycle.ViewModel
|
||||||
|
import androidx.lifecycle.liveData
|
||||||
|
import androidx.lifecycle.viewModelScope
|
||||||
|
import com.alya.ecommerce_serang.data.api.dto.CategoryItem
|
||||||
|
import com.alya.ecommerce_serang.data.api.dto.ProductsItem
|
||||||
|
import com.alya.ecommerce_serang.data.api.dto.Store
|
||||||
|
import com.alya.ecommerce_serang.data.api.response.Product
|
||||||
|
import com.alya.ecommerce_serang.data.api.response.ReviewsItem
|
||||||
|
import com.alya.ecommerce_serang.data.repository.ProductRepository
|
||||||
|
import com.alya.ecommerce_serang.data.repository.Result
|
||||||
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
|
class ProductViewModel(private val repository: ProductRepository) : ViewModel() {
|
||||||
|
|
||||||
|
private val _productDetail = MutableLiveData<Product?>()
|
||||||
|
val productDetail: LiveData<Product?> get() = _productDetail
|
||||||
|
|
||||||
|
private val _storeDetail = MutableLiveData<Store?>()
|
||||||
|
val storeDetail : LiveData<Store?> get() = _storeDetail
|
||||||
|
|
||||||
|
private val _reviewProduct = MutableLiveData<List<ReviewsItem>>()
|
||||||
|
val reviewProduct: LiveData<List<ReviewsItem>> get() = _reviewProduct
|
||||||
|
|
||||||
|
private val _productList = MutableLiveData<Result<List<ProductsItem>>>()
|
||||||
|
val productList: LiveData<Result<List<ProductsItem>>> get() = _productList
|
||||||
|
|
||||||
|
private val _categoryList = MutableLiveData<Result<List<CategoryItem>>>()
|
||||||
|
val categoryList: LiveData<Result<List<CategoryItem>>> get() = _categoryList
|
||||||
|
|
||||||
|
fun loadProductDetail(productId: Int) {
|
||||||
|
viewModelScope.launch {
|
||||||
|
val result = repository.fetchProductDetail(productId)
|
||||||
|
_productDetail.value = result?.product
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun loadReviews(productId: Int) {
|
||||||
|
viewModelScope.launch {
|
||||||
|
val reviews = repository.fetchProductReview(productId)
|
||||||
|
_reviewProduct.value = reviews ?: emptyList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun loadMyStoreProducts() {
|
||||||
|
viewModelScope.launch {
|
||||||
|
_productList.value = Result.Loading
|
||||||
|
try {
|
||||||
|
val result = repository.fetchMyStoreProducts()
|
||||||
|
_productList.value = Result.Success(result)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
_productList.value = Result.Error(e)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun loadCategories() {
|
||||||
|
viewModelScope.launch {
|
||||||
|
_categoryList.value = Result.Loading
|
||||||
|
_categoryList.value = repository.getAllCategories()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun addProduct(
|
||||||
|
name: String,
|
||||||
|
description: String,
|
||||||
|
price: Int,
|
||||||
|
stock: Int,
|
||||||
|
minOrder: Int,
|
||||||
|
weight: Int,
|
||||||
|
isPreOrder: Boolean,
|
||||||
|
duration: Int,
|
||||||
|
categoryId: Int,
|
||||||
|
isActive: Boolean
|
||||||
|
): LiveData<Result<Unit>> = liveData {
|
||||||
|
emit(Result.Loading)
|
||||||
|
val result = repository.addProduct(
|
||||||
|
name, description, price, stock, minOrder, weight, isPreOrder, duration, categoryId, isActive
|
||||||
|
)
|
||||||
|
emit(result)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Optional: for store detail if you need it later
|
||||||
|
// fun loadStoreDetail(storeId: Int) {
|
||||||
|
// viewModelScope.launch {
|
||||||
|
// val storeResult = repository.fetchStoreDetail(storeId)
|
||||||
|
// _storeDetail.value = storeResult
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package com.alya.ecommerce_serang.ui.profile
|
package com.alya.ecommerce_serang.utils.viewmodel
|
||||||
|
|
||||||
import androidx.lifecycle.LiveData
|
import androidx.lifecycle.LiveData
|
||||||
import androidx.lifecycle.MutableLiveData
|
import androidx.lifecycle.MutableLiveData
|
@ -1,4 +1,4 @@
|
|||||||
package com.alya.ecommerce_serang.ui.auth
|
package com.alya.ecommerce_serang.utils.viewmodel
|
||||||
|
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import androidx.lifecycle.LiveData
|
import androidx.lifecycle.LiveData
|
||||||
@ -87,7 +87,3 @@ class RegisterViewModel(private val repository: UserRepository) : ViewModel() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,7 @@
|
|||||||
|
package com.alya.ecommerce_serang.utils.viewmodel
|
||||||
|
|
||||||
|
import androidx.lifecycle.ViewModel
|
||||||
|
|
||||||
|
class ReviewViewModel : ViewModel() {
|
||||||
|
// TODO: Implement the ViewModel
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
package com.alya.ecommerce_serang.utils.viewmodel
|
||||||
|
|
||||||
|
import androidx.lifecycle.ViewModel
|
||||||
|
|
||||||
|
class SellsViewModel : ViewModel() {
|
||||||
|
// TODO: Implement the ViewModel
|
||||||
|
}
|
6
app/src/main/res/drawable/bg_product_active.xml
Normal file
6
app/src/main/res/drawable/bg_product_active.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<solid android:color="@color/blue_100" />
|
||||||
|
<corners android:radius="3dp" />
|
||||||
|
</shape>
|
6
app/src/main/res/drawable/bg_product_inactive.xml
Normal file
6
app/src/main/res/drawable/bg_product_inactive.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<solid android:color="@color/black_100" />
|
||||||
|
<corners android:radius="3dp" />
|
||||||
|
</shape>
|
BIN
app/src/main/res/drawable/ic_search.png
Normal file
BIN
app/src/main/res/drawable/ic_search.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 820 B |
@ -1,50 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:id="@+id/main"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="vertical"
|
|
||||||
tools:context=".ui.profile.mystore.TokoSayaActivity">
|
|
||||||
|
|
||||||
<include layout="@layout/header" />
|
|
||||||
|
|
||||||
<ScrollView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="0dp"
|
|
||||||
android:layout_weight="1">
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:id="@+id/layout_profile"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="143dp"
|
|
||||||
android:paddingHorizontal="@dimen/horizontal_safe_area"
|
|
||||||
android:paddingVertical="@dimen/vertical_safe_area">
|
|
||||||
|
|
||||||
<com.google.android.material.imageview.ShapeableImageView
|
|
||||||
android:id="@+id/iv_profile"
|
|
||||||
android:layout_width="72dp"
|
|
||||||
android:layout_height="72dp"
|
|
||||||
android:src="@drawable/placeholder_image"
|
|
||||||
android:scaleType="centerCrop"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:shapeAppearanceOverlay="@style/circular_image"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_store_name"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Nama Toko"
|
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
style="@style/body_large"
|
|
||||||
android:textFontWeight="700"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/iv_profile"/>
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
</ScrollView>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
@ -3,13 +3,16 @@
|
|||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
android:id="@+id/main"
|
android:id="@+id/main"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
tools:context=".ui.profile.mystore.balance.BalanceActivity">
|
tools:context=".ui.profile.mystore.balance.BalanceActivity">
|
||||||
|
|
||||||
<include layout="@layout/header" />
|
<include
|
||||||
|
android:id="@+id/header"
|
||||||
|
layout="@layout/header" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/layout_balance"
|
android:id="@+id/layout_balance"
|
||||||
|
@ -2,13 +2,16 @@
|
|||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
android:id="@+id/main"
|
android:id="@+id/main"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".ui.profile.mystore.balance.BalanceTopUpActivity"
|
tools:context=".ui.profile.mystore.balance.BalanceTopUpActivity"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<include layout="@layout/header" />
|
<include
|
||||||
|
android:id="@+id/header"
|
||||||
|
layout="@layout/header" />
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -2,13 +2,16 @@
|
|||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
android:id="@+id/main"
|
android:id="@+id/main"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
tools:context=".ui.profile.mystore.sells.payment.ClaimPaymentActivity">
|
tools:context=".ui.profile.mystore.sells.payment.ClaimPaymentActivity">
|
||||||
|
|
||||||
<include layout="@layout/header" />
|
<include
|
||||||
|
android:id="@+id/header"
|
||||||
|
layout="@layout/header" />
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
11
app/src/main/res/layout/activity_detail_payment_info.xml
Normal file
11
app/src/main/res/layout/activity_detail_payment_info.xml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:id="@+id/main"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".ui.profile.mystore.profile.payment_info.DetailPaymentInfoActivity">
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -6,7 +6,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
tools:context=".ui.profile.mystore.profile.EditStoreProfileActivity">
|
tools:context=".ui.profile.mystore.profile.DetailStoreProfileActivity">
|
||||||
|
|
||||||
<include layout="@layout/header" />
|
<include layout="@layout/header" />
|
||||||
|
|
@ -2,13 +2,16 @@
|
|||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
android:id="@+id/main"
|
android:id="@+id/main"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
tools:context=".ui.profile.mystore.TokoSayaActivity">
|
tools:context=".ui.profile.mystore.MyStoreActivity">
|
||||||
|
|
||||||
<include layout="@layout/header" />
|
<include
|
||||||
|
android:id="@+id/header"
|
||||||
|
layout="@layout/header" />
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
10
app/src/main/res/layout/activity_payment_info.xml
Normal file
10
app/src/main/res/layout/activity_payment_info.xml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/main"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".ui.profile.mystore.profile.payment_info.PaymentInfoActivity">
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
86
app/src/main/res/layout/activity_product.xml
Normal file
86
app/src/main/res/layout/activity_product.xml
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
|
android:id="@+id/main"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".ui.profile.mystore.product.ProductActivity"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/header"
|
||||||
|
layout="@layout/header" />
|
||||||
|
|
||||||
|
<!-- Search Bar -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="16dp"
|
||||||
|
android:background="@color/white">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:background="@drawable/bg_text_field"
|
||||||
|
android:paddingHorizontal="6dp"
|
||||||
|
android:paddingVertical="10dp">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="14dp"
|
||||||
|
android:layout_height="14dp"
|
||||||
|
android:src="@drawable/ic_search"
|
||||||
|
android:contentDescription="Search Icon" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/edt_search"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@null"
|
||||||
|
android:hint="Cari produk Anda di sini..."
|
||||||
|
android:inputType="text"
|
||||||
|
style="@style/body_small"
|
||||||
|
android:layout_marginStart="6dp"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="@color/black_50"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/layout_product_menu"/>
|
||||||
|
|
||||||
|
<ScrollView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/rv_store_product"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:scrollbars="vertical"
|
||||||
|
tools:listitem="@layout/item_store_product" />
|
||||||
|
|
||||||
|
<ProgressBar
|
||||||
|
android:id="@+id/progress_bar"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:visibility="gone"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</ScrollView>
|
||||||
|
|
||||||
|
</LinearLayout>
|
8
app/src/main/res/layout/activity_sells.xml
Normal file
8
app/src/main/res/layout/activity_sells.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<FrameLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/sells_fragment_container"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".ui.profile.mystore.sells.SellsActivity"/>
|
@ -2,13 +2,16 @@
|
|||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
android:id="@+id/main"
|
android:id="@+id/main"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
tools:context=".ui.profile.mystore.sells.shipment.ShippingConfirmationActivity">
|
tools:context=".ui.profile.mystore.sells.shipment.ShippingConfirmationActivity">
|
||||||
|
|
||||||
<include layout="@layout/header" />
|
<include
|
||||||
|
android:id="@+id/header"
|
||||||
|
layout="@layout/header" />
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
11
app/src/main/res/layout/activity_shipping_service.xml
Normal file
11
app/src/main/res/layout/activity_shipping_service.xml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
|
android:id="@+id/main"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".ui.profile.mystore.profile.shipping_service.ShippingServiceActivity">
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
11
app/src/main/res/layout/activity_store_address.xml
Normal file
11
app/src/main/res/layout/activity_store_address.xml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
|
android:id="@+id/main"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".ui.profile.mystore.profile.address.StoreAddressActivity">
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -2,13 +2,16 @@
|
|||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
android:id="@+id/main"
|
android:id="@+id/main"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
tools:context=".ui.profile.mystore.product.AddProductActivity">
|
tools:context=".ui.profile.mystore.product.StoreProductDetailActivity">
|
||||||
|
|
||||||
<include layout="@layout/header" />
|
<include
|
||||||
|
android:id="@+id/header"
|
||||||
|
layout="@layout/header" />
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -211,7 +214,7 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/DeskripsiProduk"
|
android:id="@+id/edt_deskripsi_produk"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="70dp"
|
android:layout_height="70dp"
|
||||||
android:background="@drawable/bg_text_field"
|
android:background="@drawable/bg_text_field"
|
||||||
@ -431,14 +434,109 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- Kondisi Produk -->
|
<!-- <!– Kondisi Produk –>-->
|
||||||
|
<!-- <LinearLayout-->
|
||||||
|
<!-- android:layout_width="match_parent"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:orientation="vertical"-->
|
||||||
|
<!-- android:layout_marginBottom="24dp">-->
|
||||||
|
|
||||||
|
<!-- <!– Label Kondisi Produk –>-->
|
||||||
|
<!-- <LinearLayout-->
|
||||||
|
<!-- android:layout_width="match_parent"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:orientation="horizontal">-->
|
||||||
|
|
||||||
|
<!-- <TextView-->
|
||||||
|
<!-- android:layout_width="wrap_content"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:text="Kondisi Produk"-->
|
||||||
|
<!-- style="@style/body_medium"-->
|
||||||
|
<!-- android:layout_marginEnd="4dp"/>-->
|
||||||
|
|
||||||
|
<!-- <TextView-->
|
||||||
|
<!-- android:layout_width="0dp"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:layout_weight="1"-->
|
||||||
|
<!-- android:text="*"-->
|
||||||
|
<!-- style="@style/body_medium"-->
|
||||||
|
<!-- android:textColor="@color/red_required"-->
|
||||||
|
<!-- android:layout_gravity="end"/>-->
|
||||||
|
|
||||||
|
<!-- </LinearLayout>-->
|
||||||
|
|
||||||
|
<!-- <!– Spinner Dropdown dengan Chevron –>-->
|
||||||
|
<!-- <LinearLayout-->
|
||||||
|
<!-- android:layout_width="match_parent"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:orientation="horizontal"-->
|
||||||
|
<!-- android:background="@drawable/bg_text_field"-->
|
||||||
|
<!-- android:gravity="center_vertical"-->
|
||||||
|
<!-- android:layout_marginTop="10dp">-->
|
||||||
|
|
||||||
|
<!-- <Spinner-->
|
||||||
|
<!-- android:id="@+id/spinner_kondisi_produk"-->
|
||||||
|
<!-- android:layout_width="0dp"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:layout_weight="1"-->
|
||||||
|
<!-- android:padding="8dp"-->
|
||||||
|
<!-- style="@style/body_small"-->
|
||||||
|
<!-- android:background="@null"/>-->
|
||||||
|
|
||||||
|
<!-- <!– Chevron Down Icon –>-->
|
||||||
|
<!-- <ImageView-->
|
||||||
|
<!-- android:layout_width="16dp"-->
|
||||||
|
<!-- android:layout_height="16dp"-->
|
||||||
|
<!-- android:src="@drawable/ic_down"-->
|
||||||
|
<!-- android:layout_marginEnd="8dp"-->
|
||||||
|
<!-- android:contentDescription="Chevron Down" />-->
|
||||||
|
|
||||||
|
<!-- </LinearLayout>-->
|
||||||
|
|
||||||
|
<!-- </LinearLayout>-->
|
||||||
|
|
||||||
|
<!-- Pre-Order -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_marginBottom="24dp">
|
android:layout_marginBottom="24dp">
|
||||||
|
|
||||||
<!-- Label Kondisi Produk -->
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:gravity="center">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="Pre-Order"
|
||||||
|
style="@style/body_medium"
|
||||||
|
android:layout_marginEnd="4dp"/>
|
||||||
|
|
||||||
|
<Switch
|
||||||
|
android:id="@+id/switch_is_pre_order"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
tools:ignore="UseSwitchCompatOrMaterialXml" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- Durasi Pre-Order -->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/layout_durasi"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_marginBottom="24dp"
|
||||||
|
android:visibility="gone">
|
||||||
|
|
||||||
|
<!-- Label Durasi Pre-Order -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -447,10 +545,11 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Kondisi Produk"
|
android:text="Durasi Pre-Order"
|
||||||
style="@style/body_medium"
|
style="@style/body_medium"
|
||||||
android:layout_marginEnd="4dp"/>
|
android:layout_marginEnd="4dp"/>
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -462,31 +561,32 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- Spinner Dropdown dengan Chevron -->
|
<!-- Input Durasi Pre-Order dengan Suffix "hari" -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:background="@drawable/bg_text_field"
|
android:background="@drawable/bg_text_field"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center">
|
||||||
android:layout_marginTop="10dp">
|
|
||||||
|
|
||||||
<Spinner
|
<EditText
|
||||||
android:id="@+id/spinner_kondisi_produk"
|
android:id="@+id/edt_durasi"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:padding="8dp"
|
android:hint="Isi durasi pre-order di sini"
|
||||||
|
android:inputType="number"
|
||||||
style="@style/body_small"
|
style="@style/body_small"
|
||||||
android:background="@null"/>
|
android:background="@null"
|
||||||
|
android:padding="8dp"/>
|
||||||
|
|
||||||
<!-- Chevron Down Icon -->
|
<TextView
|
||||||
<ImageView
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="16dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="16dp"
|
android:text="hari"
|
||||||
android:src="@drawable/ic_down"
|
style="@style/label_medium_prominent"
|
||||||
android:layout_marginEnd="8dp"
|
android:textColor="@color/black_300"
|
||||||
android:contentDescription="Chevron Down" />
|
android:padding="8dp"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@ -527,7 +627,8 @@
|
|||||||
<Button
|
<Button
|
||||||
android:id="@+id/btn_save_product"
|
android:id="@+id/btn_save_product"
|
||||||
android:text="Simpan Produk"
|
android:text="Simpan Produk"
|
||||||
style="@style/button.large.disabled.long"/>
|
style="@style/button.large.disabled.long"
|
||||||
|
android:enabled="false"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
17
app/src/main/res/layout/fragment_all_sells.xml
Normal file
17
app/src/main/res/layout/fragment_all_sells.xml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:padding="13dp"
|
||||||
|
tools:context=".ui.profile.mystore.sells.all_sells.AllSellsFragment">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_semua_pesanan"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Semua Pesanan"
|
||||||
|
style="@style/label_medium_prominent"
|
||||||
|
android:textColor="@color/black_300"/>
|
||||||
|
|
||||||
|
</FrameLayout>
|
17
app/src/main/res/layout/fragment_cancellation.xml
Normal file
17
app/src/main/res/layout/fragment_cancellation.xml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".ui.profile.mystore.sells.cancellation.CancellationFragment"
|
||||||
|
android:padding="13dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_pembatalan"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Pembatalan"
|
||||||
|
style="@style/label_medium_prominent"
|
||||||
|
android:textColor="@color/black_300"/>
|
||||||
|
|
||||||
|
</FrameLayout>
|
17
app/src/main/res/layout/fragment_failed_payment.xml
Normal file
17
app/src/main/res/layout/fragment_failed_payment.xml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".ui.profile.mystore.sells.failed_payment.FailedPaymentFragment"
|
||||||
|
android:padding="13dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_klaim_pembayaran"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Klaim Pembayaran"
|
||||||
|
style="@style/label_medium_prominent"
|
||||||
|
android:textColor="@color/black_300"/>
|
||||||
|
|
||||||
|
</FrameLayout>
|
17
app/src/main/res/layout/fragment_failed_shipment.xml
Normal file
17
app/src/main/res/layout/fragment_failed_shipment.xml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".ui.profile.mystore.sells.failed_shipment.FailedShipmentFragment"
|
||||||
|
android:padding="13dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_pengiriman_gagal"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Pengiriman Gagal"
|
||||||
|
style="@style/label_medium_prominent"
|
||||||
|
android:textColor="@color/black_300"/>
|
||||||
|
|
||||||
|
</FrameLayout>
|
17
app/src/main/res/layout/fragment_finished.xml
Normal file
17
app/src/main/res/layout/fragment_finished.xml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".ui.profile.mystore.sells.finished.FinishedFragment"
|
||||||
|
android:padding="13dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_selesai"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Selesai"
|
||||||
|
style="@style/label_medium_prominent"
|
||||||
|
android:textColor="@color/black_300"/>
|
||||||
|
|
||||||
|
</FrameLayout>
|
17
app/src/main/res/layout/fragment_order.xml
Normal file
17
app/src/main/res/layout/fragment_order.xml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".ui.profile.mystore.sells.order.OrderFragment"
|
||||||
|
android:padding="13dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_perlu_tagihan"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Perlu Tagihan"
|
||||||
|
style="@style/label_medium_prominent"
|
||||||
|
android:textColor="@color/black_300"/>
|
||||||
|
|
||||||
|
</FrameLayout>
|
17
app/src/main/res/layout/fragment_payment.xml
Normal file
17
app/src/main/res/layout/fragment_payment.xml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".ui.profile.mystore.sells.payment.PaymentFragment"
|
||||||
|
android:padding="13dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_konfirmasi_pembayaran"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Konfirmasi Pembayaran"
|
||||||
|
style="@style/label_medium_prominent"
|
||||||
|
android:textColor="@color/black_300"/>
|
||||||
|
|
||||||
|
</FrameLayout>
|
13
app/src/main/res/layout/fragment_review.xml
Normal file
13
app/src/main/res/layout/fragment_review.xml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".ui.profile.mystore.review.ReviewFragment">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:text="Hello" />
|
||||||
|
|
||||||
|
</FrameLayout>
|
24
app/src/main/res/layout/fragment_sells.xml
Normal file
24
app/src/main/res/layout/fragment_sells.xml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/sells"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
tools:context=".ui.profile.mystore.sells.SellsFragment">
|
||||||
|
|
||||||
|
<com.google.android.material.tabs.TabLayout
|
||||||
|
android:id="@+id/tab_layout_sells"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:tabMode="scrollable" />
|
||||||
|
|
||||||
|
<androidx.viewpager2.widget.ViewPager2
|
||||||
|
android:id="@+id/view_pager_sells"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
17
app/src/main/res/layout/fragment_shipment.xml
Normal file
17
app/src/main/res/layout/fragment_shipment.xml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".ui.profile.mystore.sells.shipment.ShipmentFragment"
|
||||||
|
android:padding="13dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_perlu_dikirim"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Perlu Dikirim"
|
||||||
|
style="@style/label_medium_prominent"
|
||||||
|
android:textColor="@color/black_300"/>
|
||||||
|
|
||||||
|
</FrameLayout>
|
17
app/src/main/res/layout/fragment_shipped.xml
Normal file
17
app/src/main/res/layout/fragment_shipped.xml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".ui.profile.mystore.sells.shipped.ShippedFragment"
|
||||||
|
android:padding="13dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_dikirim"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Dikirim"
|
||||||
|
style="@style/label_medium_prominent"
|
||||||
|
android:textColor="@color/black_300"/>
|
||||||
|
|
||||||
|
</FrameLayout>
|
123
app/src/main/res/layout/item_store_product.xml
Normal file
123
app/src/main/res/layout/item_store_product.xml
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="@dimen/horizontal_safe_area">
|
||||||
|
|
||||||
|
<!-- Top Section: Image + Info + Menu -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_product"
|
||||||
|
android:layout_width="95dp"
|
||||||
|
android:layout_height="70dp"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@drawable/placeholder_image"
|
||||||
|
app:shapeAppearanceOverlay="@style/store_product_image"
|
||||||
|
android:contentDescription="Product Image" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_marginStart="13dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_product_name"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Jaket Pink Fuschia"
|
||||||
|
style="@style/label_medium_prominent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_product_price"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Rp150.000"
|
||||||
|
style="@style/label_medium" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_marginTop="6dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_product_stock"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Stok: 15"
|
||||||
|
style="@style/label_medium" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_product_status"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Aktif"
|
||||||
|
style="@style/label_small"
|
||||||
|
android:paddingHorizontal="4dp"
|
||||||
|
android:textColor="@color/darkblue_500"
|
||||||
|
android:background="@drawable/bg_product_active" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/ivMenu"
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:src="@drawable/ic_more_vertical"
|
||||||
|
android:contentDescription="Menu"
|
||||||
|
android:layout_marginStart="8dp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- Action Buttons -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_marginTop="12dp">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
style="@style/button.small.secondary.medium"
|
||||||
|
android:id="@+id/btn_change_price"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="Ubah Harga" />
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="10dp"
|
||||||
|
android:layout_height="0dp" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
style="@style/button.small.secondary.medium"
|
||||||
|
android:id="@+id/btn_change_stock"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="Ubah Stok" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- Divider -->
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="8dp"
|
||||||
|
android:background="@color/black_50"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
@ -5,6 +5,10 @@
|
|||||||
<item name="colorPrimary">@color/blue_500</item>
|
<item name="colorPrimary">@color/blue_500</item>
|
||||||
<item name="colorPrimaryDark">@color/white</item>
|
<item name="colorPrimaryDark">@color/white</item>
|
||||||
<item name="colorAccent">@color/black</item>
|
<item name="colorAccent">@color/black</item>
|
||||||
|
<item name="colorSurface">@color/white</item>
|
||||||
|
<item name="colorOnSurface">@color/black</item>
|
||||||
|
<item name="colorPrimaryContainer">@color/blue_500</item>
|
||||||
|
<item name="colorOnPrimaryContainer">@color/white</item>
|
||||||
<item name="android:contentInsetStart">0dp</item>
|
<item name="android:contentInsetStart">0dp</item>
|
||||||
<item name="android:contentInsetLeft">0dp</item>
|
<item name="android:contentInsetLeft">0dp</item>
|
||||||
</style>
|
</style>
|
||||||
@ -146,6 +150,7 @@
|
|||||||
<item name="android:padding">10.91dp</item>
|
<item name="android:padding">10.91dp</item>
|
||||||
<item name="android:layout_height">40dp</item>
|
<item name="android:layout_height">40dp</item>
|
||||||
<item name="android:textAllCaps">false</item>
|
<item name="android:textAllCaps">false</item>
|
||||||
|
<item name="backgroundTint">@null</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="button.large.active">
|
<style name="button.large.active">
|
||||||
@ -215,6 +220,7 @@
|
|||||||
<item name="android:padding">7dp</item>
|
<item name="android:padding">7dp</item>
|
||||||
<item name="android:layout_height">30dp</item>
|
<item name="android:layout_height">30dp</item>
|
||||||
<item name="android:textAllCaps">false</item>
|
<item name="android:textAllCaps">false</item>
|
||||||
|
<item name="backgroundTint">@null</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="button.small.active">
|
<style name="button.small.active">
|
||||||
@ -287,4 +293,9 @@
|
|||||||
<item name="cornerSize">50%</item>
|
<item name="cornerSize">50%</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="store_product_image">
|
||||||
|
<item name="cornerFamily">rounded</item>
|
||||||
|
<item name="cornerSize">5dp</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
@ -1,13 +1,16 @@
|
|||||||
[versions]
|
[versions]
|
||||||
agp = "8.5.2"
|
agp = "8.9.1"
|
||||||
|
glide = "4.16.0"
|
||||||
hiltAndroid = "2.51"
|
hiltAndroid = "2.51"
|
||||||
hiltLifecycleViewmodel = "1.0.0-alpha03"
|
hiltLifecycleViewmodel = "1.0.0-alpha03"
|
||||||
kotlin = "1.9.0"
|
kotlin = "1.9.0"
|
||||||
|
|
||||||
coreKtx = "1.10.1"
|
coreKtx = "1.10.1"
|
||||||
junit = "4.13.2"
|
junit = "4.13.2"
|
||||||
junitVersion = "1.2.1"
|
junitVersion = "1.2.1"
|
||||||
espressoCore = "3.6.1"
|
espressoCore = "3.6.1"
|
||||||
appcompat = "1.7.0"
|
appcompat = "1.7.0"
|
||||||
|
loggingInterceptor = "4.11.0"
|
||||||
material = "1.12.0"
|
material = "1.12.0"
|
||||||
activity = "1.9.2"
|
activity = "1.9.2"
|
||||||
constraintlayout = "2.1.4"
|
constraintlayout = "2.1.4"
|
||||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,6 @@
|
|||||||
#Wed Oct 16 14:37:43 ICT 2024
|
#Wed Oct 16 14:37:43 ICT 2024
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
Reference in New Issue
Block a user