feat : new ui
This commit is contained in:
20
assets/icons/calendar_tick.svg
Normal file
20
assets/icons/calendar_tick.svg
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M8 5.75C7.59 5.75 7.25 5.41 7.25 5V2C7.25 1.59 7.59 1.25 8 1.25C8.41 1.25 8.75 1.59 8.75 2V5C8.75 5.41 8.41 5.75 8 5.75Z"
|
||||||
|
fill="#797979"/>
|
||||||
|
<path d="M16 5.75C15.59 5.75 15.25 5.41 15.25 5V2C15.25 1.59 15.59 1.25 16 1.25C16.41 1.25 16.75 1.59 16.75 2V5C16.75 5.41 16.41 5.75 16 5.75Z"
|
||||||
|
fill="#797979"/>
|
||||||
|
<path d="M8.5 14.4992C8.24 14.4992 7.98 14.3892 7.79 14.2092C7.61 14.0192 7.5 13.7692 7.5 13.4992C7.5 13.3692 7.53 13.2392 7.58 13.1192C7.63 12.9992 7.7 12.8892 7.79 12.7892C8.16 12.4192 8.83 12.4192 9.21 12.7892C9.39 12.9792 9.5 13.2392 9.5 13.4992C9.5 13.5592 9.49 13.6292 9.48 13.6992C9.47 13.7592 9.45 13.8192 9.42 13.8792C9.4 13.9392 9.37 13.9992 9.33 14.0592C9.29 14.1092 9.25 14.1592 9.21 14.2092C9.02 14.3892 8.76 14.4992 8.5 14.4992Z"
|
||||||
|
fill="#797979"/>
|
||||||
|
<path d="M12 14.5003C11.87 14.5003 11.74 14.4703 11.62 14.4203C11.49 14.3703 11.39 14.3003 11.29 14.2103C11.11 14.0203 11 13.7703 11 13.5003C11 13.3703 11.03 13.2403 11.08 13.1203C11.13 13.0003 11.2 12.8903 11.29 12.7903C11.39 12.7003 11.49 12.6303 11.62 12.5803C11.99 12.4303 12.43 12.5103 12.71 12.7903C12.89 12.9803 13 13.2403 13 13.5003C13 13.5603 12.99 13.6303 12.98 13.7003C12.97 13.7603 12.95 13.8203 12.92 13.8803C12.9 13.9403 12.87 14.0003 12.83 14.0603C12.8 14.1103 12.75 14.1603 12.71 14.2103C12.52 14.3903 12.26 14.5003 12 14.5003Z"
|
||||||
|
fill="#797979"/>
|
||||||
|
<path d="M8.5 18.0008C8.37 18.0008 8.24 17.9708 8.12 17.9208C7.99 17.8708 7.88 17.8008 7.79 17.7108C7.7 17.6208 7.63 17.5108 7.58 17.3808C7.53 17.2608 7.5 17.1308 7.5 17.0008C7.5 16.8708 7.53 16.7408 7.58 16.6208C7.63 16.4908 7.7 16.3808 7.79 16.2908C7.88 16.2008 7.99 16.1307 8.12 16.0807C8.36 15.9807 8.64 15.9707 8.88 16.0807C9.01 16.1307 9.12 16.2008 9.21 16.2908C9.3 16.3808 9.37 16.4908 9.42 16.6208C9.47 16.7408 9.5 16.8708 9.5 17.0008C9.5 17.1308 9.47 17.2608 9.42 17.3808C9.37 17.5108 9.3 17.6208 9.21 17.7108C9.12 17.8008 9.01 17.8708 8.88 17.9208C8.76 17.9708 8.63 18.0008 8.5 18.0008Z"
|
||||||
|
fill="#797979"/>
|
||||||
|
<path d="M20.5 9.83984H3.5C3.09 9.83984 2.75 9.49984 2.75 9.08984C2.75 8.67984 3.09 8.33984 3.5 8.33984H20.5C20.91 8.33984 21.25 8.67984 21.25 9.08984C21.25 9.49984 20.91 9.83984 20.5 9.83984Z"
|
||||||
|
fill="#797979"/>
|
||||||
|
<path d="M18 23.75C16.83 23.75 15.72 23.33 14.87 22.56C14.51 22.26 14.19 21.88 13.93 21.44C13.49 20.72 13.25 19.87 13.25 19C13.25 16.38 15.38 14.25 18 14.25C19.36 14.25 20.66 14.84 21.56 15.86C22.33 16.74 22.75 17.85 22.75 19C22.75 19.87 22.51 20.72 22.06 21.45C21.22 22.87 19.66 23.75 18 23.75ZM18 15.75C16.21 15.75 14.75 17.21 14.75 19C14.75 19.59 14.91 20.17 15.22 20.67C15.39 20.97 15.61 21.22 15.85 21.43C16.45 21.97 17.2 22.25 18 22.25C19.15 22.25 20.19 21.66 20.78 20.68C21.09 20.17 21.25 19.6 21.25 19C21.25 18.22 20.96 17.46 20.44 16.85C19.82 16.15 18.93 15.75 18 15.75Z"
|
||||||
|
fill="#797979"/>
|
||||||
|
<path d="M17.4299 20.7396C17.2399 20.7396 17.0499 20.6695 16.8999 20.5195L15.9099 19.5296C15.6199 19.2396 15.6199 18.7596 15.9099 18.4696C16.1999 18.1796 16.6799 18.1796 16.9699 18.4696L17.4499 18.9496L19.0499 17.4696C19.3499 17.1896 19.8299 17.2096 20.1099 17.5096C20.3899 17.8096 20.3699 18.2896 20.0699 18.5696L17.9399 20.5396C17.7899 20.6696 17.6099 20.7396 17.4299 20.7396Z"
|
||||||
|
fill="#797979"/>
|
||||||
|
<path d="M15.37 22.75H8C4.35 22.75 2.25 20.65 2.25 17V8.5C2.25 4.85 4.35 2.75 8 2.75H16C19.65 2.75 21.75 4.85 21.75 8.5V16.36C21.75 16.67 21.56 16.95 21.26 17.06C20.97 17.17 20.64 17.09 20.43 16.85C19.81 16.15 18.92 15.75 17.99 15.75C16.2 15.75 14.74 17.21 14.74 19C14.74 19.59 14.9 20.17 15.21 20.67C15.38 20.97 15.6 21.22 15.84 21.43C16.08 21.63 16.17 21.96 16.06 22.26C15.97 22.55 15.69 22.75 15.37 22.75ZM8 4.25C5.14 4.25 3.75 5.64 3.75 8.5V17C3.75 19.86 5.14 21.25 8 21.25H13.82C13.45 20.57 13.25 19.8 13.25 19C13.25 16.38 15.38 14.25 18 14.25C18.79 14.25 19.57 14.45 20.25 14.82V8.5C20.25 5.64 18.86 4.25 16 4.25H8Z"
|
||||||
|
fill="#797979"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 3.9 KiB |
12
assets/icons/chicken_house.svg
Normal file
12
assets/icons/chicken_house.svg
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M22 22.75H2C1.59 22.75 1.25 22.41 1.25 22C1.25 21.59 1.59 21.25 2 21.25H22C22.41 21.25 22.75 21.59 22.75 22C22.75 22.41 22.41 22.75 22 22.75Z"
|
||||||
|
fill="#797979"/>
|
||||||
|
<path d="M3.7002 22.0007H2.2002L2.2502 9.97069C2.2502 9.12069 2.6402 8.33072 3.3102 7.81072L10.3102 2.3607C11.3002 1.5907 12.6902 1.5907 13.6902 2.3607L20.6902 7.80071C21.3502 8.32071 21.7502 9.13069 21.7502 9.97069V22.0007H20.2502V9.9807C20.2502 9.6007 20.0702 9.23071 19.7702 8.99071L12.7702 3.55071C12.3202 3.20071 11.6902 3.20071 11.2302 3.55071L4.2302 9.00072C3.9302 9.23072 3.7502 9.6007 3.7502 9.9807L3.7002 22.0007Z"
|
||||||
|
fill="#797979"/>
|
||||||
|
<path d="M17 22.75H7C6.59 22.75 6.25 22.41 6.25 22V12.5C6.25 11.26 7.26 10.25 8.5 10.25H15.5C16.74 10.25 17.75 11.26 17.75 12.5V22C17.75 22.41 17.41 22.75 17 22.75ZM7.75 21.25H16.25V12.5C16.25 12.09 15.91 11.75 15.5 11.75H8.5C8.09 11.75 7.75 12.09 7.75 12.5V21.25Z"
|
||||||
|
fill="#797979"/>
|
||||||
|
<path d="M10 18.5C9.59 18.5 9.25 18.16 9.25 17.75V16.25C9.25 15.84 9.59 15.5 10 15.5C10.41 15.5 10.75 15.84 10.75 16.25V17.75C10.75 18.16 10.41 18.5 10 18.5Z"
|
||||||
|
fill="#797979"/>
|
||||||
|
<path d="M13.5 8.25H10.5C10.09 8.25 9.75 7.91 9.75 7.5C9.75 7.09 10.09 6.75 10.5 6.75H13.5C13.91 6.75 14.25 7.09 14.25 7.5C14.25 7.91 13.91 8.25 13.5 8.25Z"
|
||||||
|
fill="#797979"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.4 KiB |
9
assets/icons/farm.svg
Normal file
9
assets/icons/farm.svg
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M11.2459 19.8166C10.6772 19.2478 10.0516 19.6175 9.57031 20.0025C9.13281 20.3459 8.58375 20.4269 8.435 20.3722C8.30594 20.2409 8.21625 19.7334 8.13313 19.3594C8.01938 18.7797 7.875 18.0206 7.45281 17.5L7.46812 17.4825C7.50389 17.4374 7.53042 17.3857 7.5462 17.3303C7.56199 17.275 7.56671 17.2171 7.56011 17.1599C7.55351 17.1027 7.53571 17.0474 7.50773 16.9971C7.47975 16.9468 7.44213 16.9025 7.39703 16.8667C7.35193 16.831 7.30023 16.8044 7.24487 16.7886C7.18952 16.7729 7.1316 16.7681 7.07442 16.7747C7.01724 16.7813 6.96192 16.7991 6.91161 16.8271C6.86131 16.8551 6.81701 16.8927 6.78125 16.9378V16.8438C6.78125 16.7277 6.73516 16.6164 6.65311 16.5344C6.57106 16.4523 6.45978 16.4062 6.34375 16.4062C6.22772 16.4062 6.11644 16.4523 6.03439 16.5344C5.95234 16.6164 5.90625 16.7277 5.90625 16.8438V16.9291L5.88219 16.8962C5.8117 16.804 5.70745 16.7435 5.59238 16.7282C5.47731 16.7128 5.36084 16.7437 5.26859 16.8142C5.17635 16.8847 5.11588 16.989 5.1005 17.104C5.08511 17.2191 5.11607 17.3356 5.18656 17.4278L5.20188 17.4475C5.08825 17.5937 5.00293 17.7599 4.95031 17.9375H4.8125C4.69647 17.9375 4.58519 17.9836 4.50314 18.0656C4.42109 18.1477 4.375 18.259 4.375 18.375C4.375 18.491 4.42109 18.6023 4.50314 18.6844C4.58519 18.7664 4.69647 18.8125 4.8125 18.8125H5.18875C5.42719 19.0487 5.76406 19.2806 5.76406 19.565C5.76406 19.6831 5.65687 19.8209 5.48187 20.0353C4.99307 20.5498 4.7219 21.2332 4.725 21.9428C4.725 23.2553 5.53875 23.8875 6.32625 24.4934C6.94531 24.9703 7.25156 25.3378 7.875 25.4909V26.25H7.65625C7.54022 26.25 7.42894 26.2961 7.34689 26.3781C7.26484 26.4602 7.21875 26.5715 7.21875 26.6875C7.21875 26.8035 7.26484 26.9148 7.34689 26.9969C7.42894 27.0789 7.54022 27.125 7.65625 27.125H8.75C8.86603 27.125 8.97731 27.0789 9.05936 26.9969C9.14141 26.9148 9.1875 26.8035 9.1875 26.6875C9.1875 26.5715 9.14141 26.4602 9.05936 26.3781C8.97731 26.2961 8.86603 26.25 8.75 26.25V25.4822C9.33665 25.3471 9.86293 25.0236 10.2484 24.5612C11.0337 23.5156 10.955 23.3209 11.3422 22.9163C11.5421 22.7274 11.6923 22.4923 11.7797 22.2316C11.9481 21.7612 11.6441 20.2125 11.2459 19.8166ZM10.9572 21.9625C10.9094 22.0979 10.8273 22.2185 10.7188 22.3125C10.531 22.4924 10.3756 22.7033 10.2594 22.9359C10.052 23.3224 9.81429 23.6918 9.54844 24.0406C9.38937 24.2242 9.19559 24.3746 8.97823 24.4831C8.76088 24.5916 8.52423 24.6561 8.28188 24.6728C7.79625 24.6728 7.49875 24.2944 6.86219 23.7978C6.13156 23.2334 5.60219 22.8266 5.60219 21.9384C5.60234 21.4318 5.80286 20.9459 6.16 20.5866C6.39625 20.2978 6.64125 20.0003 6.64125 19.5628C6.64125 18.9481 6.20375 18.5587 5.92813 18.3028C5.88438 18.2634 5.82969 18.2131 5.79031 18.1759C5.81277 18.0795 5.86459 17.9923 5.93863 17.9265C6.01267 17.8607 6.1053 17.8194 6.20375 17.8084C6.83813 17.8084 7.03937 18.3159 7.27562 19.5278C7.4025 20.1841 7.51187 20.7441 7.88594 21.0591C8.39781 21.4856 9.47188 21.2056 10.1172 20.6894C10.4628 20.4138 10.5984 20.4094 10.6203 20.4291C10.7778 20.6281 11.0141 21.6978 10.9572 21.9603V21.9625Z" fill="#696969"/>
|
||||||
|
<path d="M8.67115 22.2115C8.56618 22.2842 8.43987 22.3196 8.3124 22.3121C7.92958 22.3121 7.4374 21.9205 7.30833 21.7827C7.22498 21.7074 7.11587 21.6671 7.0036 21.6701C6.89133 21.673 6.7845 21.7191 6.70523 21.7986C6.62596 21.8782 6.58031 21.9852 6.57775 22.0974C6.57519 22.2097 6.6159 22.3187 6.69146 22.4018C6.78115 22.4827 7.49865 23.1871 8.3124 23.1871C8.66651 23.1982 9.01154 23.0738 9.27708 22.8393C9.31842 22.7986 9.35125 22.75 9.37365 22.6965C9.39606 22.643 9.4076 22.5856 9.4076 22.5275C9.4076 22.4695 9.39606 22.4121 9.37365 22.3586C9.35125 22.3051 9.31842 22.2565 9.27708 22.2158C9.19618 22.137 9.08793 22.0926 8.97499 22.0918C8.86206 22.0909 8.75318 22.1338 8.67115 22.2115Z" fill="#696969"/>
|
||||||
|
<path d="M26.3594 15.0241L21.9844 10.076C21.9353 10.0204 21.8728 9.97826 21.8029 9.95349L14.1466 7.24755C14.0525 7.21436 13.9498 7.21436 13.8557 7.24755L6.19944 9.95567C6.12951 9.98045 6.06703 10.0226 6.01788 10.0782L1.64069 15.0241C1.60263 15.0672 1.57342 15.1174 1.55475 15.1717C1.53607 15.2261 1.52829 15.2836 1.53184 15.341C1.5354 15.3984 1.55022 15.4545 1.57546 15.5062C1.60071 15.5578 1.63588 15.604 1.67897 15.6421C1.72206 15.6801 1.77222 15.7093 1.8266 15.728C1.88098 15.7467 1.9385 15.7545 1.99588 15.7509C2.05327 15.7474 2.10939 15.7325 2.16104 15.7073C2.2127 15.6821 2.25888 15.6469 2.29694 15.6038L2.62506 15.2319V25.8129C2.62506 25.9289 2.67116 26.0402 2.7532 26.1222C2.83525 26.2043 2.94653 26.2504 3.06256 26.2504H5.25006C5.3661 26.2504 5.47738 26.2043 5.55942 26.1222C5.64147 26.0402 5.68756 25.9289 5.68756 25.8129C5.68756 25.6968 5.64147 25.5856 5.55942 25.5035C5.47738 25.4215 5.3661 25.3754 5.25006 25.3754H3.50006V14.241L6.59756 10.741L14.0001 8.12036L21.4026 10.7454L24.5001 14.241V25.3754H22.7501V17.0629C22.7501 16.9468 22.704 16.8355 22.6219 16.7535C22.5399 16.6715 22.4286 16.6254 22.3126 16.6254H8.96881C8.85278 16.6254 8.7415 16.6715 8.65945 16.7535C8.57741 16.8355 8.53131 16.9468 8.53131 17.0629C8.53131 17.1789 8.57741 17.2902 8.65945 17.3722C8.7415 17.4543 8.85278 17.5004 8.96881 17.5004H12.8363L11.9613 18.266C11.9134 18.3023 11.8734 18.348 11.844 18.4004C11.8145 18.4528 11.7961 18.5107 11.79 18.5705C11.7839 18.6303 11.7902 18.6907 11.8085 18.748C11.8268 18.8052 11.8567 18.8581 11.8963 18.9033C11.9359 18.9485 11.9844 18.9851 12.0388 19.0107C12.0932 19.0363 12.1522 19.0504 12.2123 19.0522C12.2724 19.054 12.3322 19.0434 12.388 19.021C12.4438 18.9986 12.4944 18.965 12.5366 18.9222L13.5626 18.0275V25.3754H11.3751C11.259 25.3754 11.1478 25.4215 11.0657 25.5035C10.9837 25.5856 10.9376 25.6968 10.9376 25.8129C10.9376 25.9289 10.9837 26.0402 11.0657 26.1222C11.1478 26.2043 11.259 26.2504 11.3751 26.2504H24.9376C25.0536 26.2504 25.1649 26.2043 25.2469 26.1222C25.329 26.0402 25.3751 25.9289 25.3751 25.8129V15.2319L25.7032 15.6038C25.7801 15.6908 25.8884 15.7437 26.0042 15.7509C26.1201 15.7581 26.2341 15.719 26.3212 15.6421C26.4082 15.5652 26.4611 15.4569 26.4683 15.341C26.4755 15.2251 26.4363 15.1111 26.3594 15.0241ZM21.8751 24.5179L15.0369 17.5004H21.8751V24.5179ZM14.4376 18.1391L21.4879 25.3754H14.4376V18.1391Z" fill="#696969"/>
|
||||||
|
<path d="M18.8125 14.875C18.9285 14.875 19.0398 14.8289 19.1219 14.7469C19.2039 14.6648 19.25 14.5535 19.25 14.4375V11.8125C19.25 11.6965 19.2039 11.5852 19.1219 11.5031C19.0398 11.4211 18.9285 11.375 18.8125 11.375H9.1875C9.07147 11.375 8.96019 11.4211 8.87814 11.5031C8.79609 11.5852 8.75 11.6965 8.75 11.8125V14.4375C8.75 14.5535 8.79609 14.6648 8.87814 14.7469C8.96019 14.8289 9.07147 14.875 9.1875 14.875H18.8125ZM18.375 14H14.4375V12.25H18.375V14ZM9.625 12.25H13.5625V14H9.625V12.25Z" fill="#696969"/>
|
||||||
|
<path d="M16.7847 5.27278C16.8254 5.23215 16.8577 5.1839 16.8797 5.13079C16.9017 5.07768 16.9131 5.02075 16.9131 4.96325C16.9131 4.90576 16.9017 4.84883 16.8797 4.79572C16.8577 4.7426 16.8254 4.69435 16.7847 4.65372C16.4191 4.28795 15.985 3.99781 15.5072 3.79985C15.0294 3.60189 14.5172 3.5 14.0001 3.5C13.4829 3.5 12.9707 3.60189 12.4929 3.79985C12.0151 3.99781 11.581 4.28795 11.2154 4.65372C11.1333 4.73581 11.0872 4.84716 11.0872 4.96325C11.0872 5.07935 11.1333 5.19069 11.2154 5.27278C11.2975 5.35488 11.4088 5.401 11.5249 5.401C11.641 5.401 11.7523 5.35488 11.8344 5.27278C12.1188 4.98837 12.4564 4.76276 12.828 4.60884C13.1996 4.45491 13.5979 4.37569 14.0001 4.37569C14.4023 4.37569 14.8005 4.45491 15.1721 4.60884C15.5437 4.76276 15.8813 4.98837 16.1657 5.27278C16.2063 5.31346 16.2546 5.34573 16.3077 5.36775C16.3608 5.38976 16.4177 5.4011 16.4752 5.4011C16.5327 5.4011 16.5896 5.38976 16.6427 5.36775C16.6959 5.34573 16.7441 5.31346 16.7847 5.27278Z" fill="#696969"/>
|
||||||
|
<path d="M12.4534 5.89156C12.3713 5.97366 12.3252 6.085 12.3252 6.2011C12.3252 6.31719 12.3713 6.42853 12.4534 6.51063C12.5355 6.59272 12.6468 6.63884 12.7629 6.63884C12.879 6.63884 12.9904 6.59272 13.0725 6.51063C13.1944 6.3886 13.3391 6.29179 13.4985 6.22574C13.6578 6.15969 13.8286 6.12569 14.0011 6.12569C14.1735 6.12569 14.3443 6.15969 14.5037 6.22574C14.663 6.29179 14.8078 6.3886 14.9297 6.51063C15.0118 6.59272 15.1231 6.63884 15.2392 6.63884C15.3553 6.63884 15.4666 6.59272 15.5487 6.51063C15.6308 6.42853 15.6769 6.31719 15.6769 6.2011C15.6769 6.085 15.6308 5.97366 15.5487 5.89156C15.3456 5.68818 15.1043 5.52683 14.8387 5.41675C14.5732 5.30666 14.2885 5.25 14.0011 5.25C13.7136 5.25 13.4289 5.30666 13.1634 5.41675C12.8978 5.52683 12.6566 5.68818 12.4534 5.89156Z" fill="#696969"/>
|
||||||
|
<path d="M10.5962 4.03299C11.4986 3.13065 12.7226 2.62373 13.9988 2.62373C15.275 2.62373 16.499 3.13065 17.4015 4.03299C17.4421 4.07364 17.4904 4.10588 17.5435 4.12788C17.5966 4.14988 17.6535 4.1612 17.711 4.1612C17.7685 4.1612 17.8254 4.14988 17.8785 4.12788C17.9316 4.10588 17.9799 4.07364 18.0205 4.03299C18.0612 3.99234 18.0934 3.94408 18.1154 3.89097C18.1374 3.83787 18.1487 3.78094 18.1487 3.72346C18.1487 3.66597 18.1374 3.60905 18.1154 3.55594C18.0934 3.50283 18.0612 3.45457 18.0205 3.41393C17.4924 2.88578 16.8654 2.46683 16.1754 2.181C15.4853 1.89516 14.7457 1.74805 13.9988 1.74805C13.2519 1.74805 12.5123 1.89516 11.8223 2.181C11.1322 2.46683 10.5052 2.88578 9.97709 3.41393C9.895 3.49602 9.84888 3.60736 9.84888 3.72346C9.84888 3.83955 9.895 3.9509 9.97709 4.03299C10.0592 4.11508 10.1705 4.1612 10.2866 4.1612C10.4027 4.1612 10.5141 4.11508 10.5962 4.03299Z" fill="#696969"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 9.1 KiB |
BIN
assets/images/bg_chicken_pattern.webp
Normal file
BIN
assets/images/bg_chicken_pattern.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 36 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 68 KiB |
BIN
assets/vec/calendar_tick.svg.vec
Normal file
BIN
assets/vec/calendar_tick.svg.vec
Normal file
Binary file not shown.
BIN
assets/vec/chicken_house.svg.vec
Normal file
BIN
assets/vec/chicken_house.svg.vec
Normal file
Binary file not shown.
BIN
assets/vec/farm.svg.vec
Normal file
BIN
assets/vec/farm.svg.vec
Normal file
Binary file not shown.
@@ -23,9 +23,9 @@ Future<void> main() async {
|
|||||||
Get.put<AuthRouteResolver>(AppAuthRouteResolver());
|
Get.put<AuthRouteResolver>(AppAuthRouteResolver());
|
||||||
Get.put(AuthMiddleware());
|
Get.put(AuthMiddleware());
|
||||||
|
|
||||||
//runApp(MyApp());
|
runApp(MyApp());
|
||||||
|
|
||||||
runApp(DevicePreview(builder: (context) => ForDevicePreview(),));
|
//runApp(DevicePreview(builder: (context) => ForDevicePreview(),));
|
||||||
}
|
}
|
||||||
|
|
||||||
class ForDevicePreview extends StatelessWidget {
|
class ForDevicePreview extends StatelessWidget {
|
||||||
@@ -60,7 +60,7 @@ class ForDevicePreview extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*class MyApp extends StatelessWidget {
|
class MyApp extends StatelessWidget {
|
||||||
const MyApp({super.key});
|
const MyApp({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -90,4 +90,4 @@ class ForDevicePreview extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}*/
|
}
|
||||||
|
|||||||
@@ -21,129 +21,124 @@ class ModulesPage extends GetView<ModulesLogic> {
|
|||||||
centerTitle: true,
|
centerTitle: true,
|
||||||
backgroundColor: AppColor.blueNormal,
|
backgroundColor: AppColor.blueNormal,
|
||||||
),
|
),
|
||||||
body: Stack(
|
body: ObxValue((loading) {
|
||||||
fit: StackFit.expand,
|
if (!controller.isLoading.value) {
|
||||||
alignment: Alignment.center,
|
return buildMainWidget();
|
||||||
children: [
|
}
|
||||||
Positioned.fill(
|
return buildLoading();
|
||||||
child: Column(
|
}, controller.isLoading),
|
||||||
children: [
|
);
|
||||||
SizedBox(height: 12.h),
|
}
|
||||||
SliderWidget(widgetTag: "up"),
|
|
||||||
|
|
||||||
SizedBox(
|
Container buildLoading() {
|
||||||
height: 244.h,
|
return Container(
|
||||||
child: GridView.builder(
|
color: Colors.grey.withValues(alpha: 0.5),
|
||||||
|
child: Center(child: CupertinoActivityIndicator(color: AppColor.greenNormal, radius: 30)),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 25.w, vertical: 24.h),
|
Column buildMainWidget() {
|
||||||
itemBuilder: (context, index) {
|
return Column(
|
||||||
final module = controller.moduleList[index];
|
children: [
|
||||||
return CardIcon(
|
SizedBox(height: 12.h,),
|
||||||
title: module.title,
|
SliderWidget(widgetTag: "up"),
|
||||||
svgIcon: module.icon,
|
SizedBox(height: 12.h,),
|
||||||
borderColor: module.borderColor,
|
SizedBox(
|
||||||
backgroundColor: module.backgroundColor,
|
height: 278.h,
|
||||||
titleColor: module.titleColor,
|
child: GridView.builder(
|
||||||
onTap: () => controller.onTapCard(module.module, index),
|
padding: EdgeInsetsGeometry.symmetric(horizontal: 16.w),
|
||||||
);
|
itemBuilder: (context, index) {
|
||||||
},
|
final module = controller.moduleList[index];
|
||||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
return CardIcon(
|
||||||
crossAxisCount: 3,
|
title: module.title,
|
||||||
mainAxisSpacing: 22.h,
|
svgIcon: module.icon,
|
||||||
crossAxisSpacing: 16.w,
|
borderColor: module.borderColor,
|
||||||
),
|
backgroundColor: module.backgroundColor,
|
||||||
physics: NeverScrollableScrollPhysics(),
|
titleColor: module.titleColor,
|
||||||
itemCount: controller.moduleList.length,
|
onTap: () => controller.onTapCard(module.module, index),
|
||||||
),
|
);
|
||||||
|
},
|
||||||
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
|
crossAxisCount: 3,
|
||||||
|
mainAxisSpacing: 22.h,
|
||||||
|
crossAxisSpacing: 16.w,
|
||||||
),
|
),
|
||||||
|
physics: NeverScrollableScrollPhysics(),
|
||||||
Container(
|
itemCount: controller.moduleList.length,
|
||||||
height: 107.h,
|
),
|
||||||
margin: EdgeInsets.symmetric(horizontal: 16.w),
|
),
|
||||||
padding: EdgeInsets.fromLTRB(11.w, 8.h, 8.w, 12.h),
|
Container(
|
||||||
decoration: BoxDecoration(
|
height: 107.h,
|
||||||
gradient: LinearGradient(
|
margin: EdgeInsets.symmetric(horizontal: 16.w),
|
||||||
begin: Alignment(0.00, 0.50),
|
padding: EdgeInsets.fromLTRB(11.w, 8.h, 8.w, 12.h),
|
||||||
end: Alignment(1.00, 0.50),
|
decoration: BoxDecoration(
|
||||||
colors: [const Color(0xFFC9D5FF), Colors.white],
|
gradient: LinearGradient(
|
||||||
),
|
begin: Alignment(0.00, 0.50),
|
||||||
borderRadius: BorderRadius.circular(8),
|
end: Alignment(1.00, 0.50),
|
||||||
border: Border.all(width: 1.w, color: const Color(0xFFD3D3D3)),
|
colors: [const Color(0xFFC9D5FF), Colors.white],
|
||||||
),
|
),
|
||||||
child: Row(
|
borderRadius: BorderRadius.circular(8),
|
||||||
spacing: 11.w,
|
border: Border.all(width: 1.w, color: const Color(0xFFD3D3D3)),
|
||||||
children: [
|
),
|
||||||
Expanded(
|
child: Row(
|
||||||
flex: 2,
|
spacing: 11.w,
|
||||||
child: Column(
|
children: [
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
Expanded(
|
||||||
children: [
|
flex: 2,
|
||||||
Text(
|
child: Column(
|
||||||
'آخرین اخبار ',
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
textAlign: TextAlign.right,
|
children: [
|
||||||
style: AppFonts.yekan16.copyWith(
|
Text(
|
||||||
color: Color(0xFF5B5B5B),
|
'آخرین اخبار ',
|
||||||
height: 1.90,
|
textAlign: TextAlign.right,
|
||||||
),
|
style: AppFonts.yekan16.copyWith(
|
||||||
),
|
color: Color(0xFF5B5B5B),
|
||||||
ObxValue(
|
height: 1.90,
|
||||||
(data) => Text(
|
),
|
||||||
data.value ??
|
|
||||||
'اخبار مربوط به جوجه ریزی استان از آخرین روند مطلع شوید...',
|
|
||||||
maxLines: 2,
|
|
||||||
style: AppFonts.yekan12.copyWith(
|
|
||||||
color: Color(0xFF5B5B5B),
|
|
||||||
height: 1.5,
|
|
||||||
overflow: TextOverflow.ellipsis,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
controller.latestNews,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
ObxValue(
|
||||||
Column(
|
(data) => Text(
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
data.value ??
|
||||||
children: [
|
'اخبار مربوط به جوجه ریزی استان از آخرین روند مطلع شوید...',
|
||||||
Container(
|
maxLines: 2,
|
||||||
width: 103.w,
|
style: AppFonts.yekan12.copyWith(
|
||||||
height: 24.h,
|
color: Color(0xFF5B5B5B),
|
||||||
alignment: Alignment.center,
|
height: 1.5,
|
||||||
decoration: ShapeDecoration(
|
overflow: TextOverflow.ellipsis,
|
||||||
color: Colors.white,
|
|
||||||
shape: RoundedRectangleBorder(
|
|
||||||
borderRadius: BorderRadius.circular(50.r),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
child: Text(
|
|
||||||
'اطلاعات بیشتر',
|
|
||||||
textAlign: TextAlign.right,
|
|
||||||
style: AppFonts.yekan14,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
controller.latestNews,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: 103.w,
|
||||||
|
height: 24.h,
|
||||||
|
alignment: Alignment.center,
|
||||||
|
decoration: ShapeDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(50.r),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Text(
|
||||||
|
'اطلاعات بیشتر',
|
||||||
|
textAlign: TextAlign.right,
|
||||||
|
style: AppFonts.yekan14,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
|
|
||||||
SizedBox(height: 12.h),
|
|
||||||
SliderWidget(height: 160, widgetTag: "down"),
|
|
||||||
SizedBox(height: 20.h),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
ObxValue((loading) {
|
|
||||||
if (!controller.isLoading.value) return SizedBox.shrink();
|
|
||||||
return Container(
|
|
||||||
color: Colors.grey.withValues(alpha: 0.5),
|
|
||||||
child: Center(
|
|
||||||
child: CupertinoActivityIndicator(color: AppColor.greenNormal, radius: 30),
|
|
||||||
),
|
),
|
||||||
);
|
),
|
||||||
}, controller.isLoading),
|
SizedBox(height: 12.h,),
|
||||||
],
|
SliderWidget(height: 160, widgetTag: "down"),
|
||||||
),
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -100,4 +100,33 @@ class GenocideLogic extends GetxController {
|
|||||||
void toggleExpanded(int index) {
|
void toggleExpanded(int index) {
|
||||||
expandedIndex.value = expandedIndex.value == index ? -1 : index;
|
expandedIndex.value = expandedIndex.value == index ? -1 : index;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
String getRequestType(PoultryOrder item) {
|
||||||
|
if (item.market ?? false) {
|
||||||
|
return 'پنل معاملات';
|
||||||
|
} else if (item.union ?? false) {
|
||||||
|
return 'اتحادیه';
|
||||||
|
} else {
|
||||||
|
return 'خرید مستقیم';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String getKillType(PoultryOrder item) {
|
||||||
|
if (item.export ?? false) {
|
||||||
|
return 'صادرات';
|
||||||
|
} else if (item.freezing ?? false) {
|
||||||
|
return 'انجماد';
|
||||||
|
} else {
|
||||||
|
return 'عادی';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String getState(PoultryOrder item) {
|
||||||
|
if (item.stateProcess == 'pending') {
|
||||||
|
return 'در انتظار تایید';
|
||||||
|
} else {
|
||||||
|
return 'تایید شده';
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/poultry_order/poultry_order.dart';
|
import 'package:rasadyar_chicken/data/models/response/poultry_order/poultry_order.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/routes/routes.dart';
|
import 'package:rasadyar_chicken/presentation/pages/poultry_science/killing_registration/view.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/utils/nested_keys_utils.dart';
|
import 'package:rasadyar_chicken/presentation/utils/nested_keys_utils.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
|
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/widget/filter_bottom_sheet.dart';
|
import 'package:rasadyar_chicken/presentation/widget/filter_bottom_sheet.dart';
|
||||||
@@ -23,48 +23,59 @@ class GenocidePage extends GetView<GenocideLogic> {
|
|||||||
},
|
},
|
||||||
filteringWidget: filterBottomSheet(),
|
filteringWidget: filterBottomSheet(),
|
||||||
onBackPressed: () => Get.back(id: poultryFirstKey),
|
onBackPressed: () => Get.back(id: poultryFirstKey),
|
||||||
floatingActionButtonLocation: FloatingActionButtonLocation.startFloat,
|
child: Stack(
|
||||||
floatingActionButton: RFab.add(
|
fit: StackFit.expand,
|
||||||
onPressed: () {
|
children: [
|
||||||
Get.toNamed(ChickenRoutes.killingRegistrationPoultryScience, id: poultryFirstKey);
|
Positioned.fill(child: poultryOrderListWidget()),
|
||||||
},
|
Positioned(
|
||||||
|
bottom: 130,
|
||||||
|
right: 16,
|
||||||
|
child: RFab.add(
|
||||||
|
onPressed: () {
|
||||||
|
Get.bottomSheet(
|
||||||
|
isScrollControlled: true,
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
killRegistrationBottomSheet(),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
widgets: [poultryOrderListWidget()],
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//region List and Items
|
||||||
Widget poultryOrderListWidget() {
|
Widget poultryOrderListWidget() {
|
||||||
return Expanded(
|
return ObxValue((data) {
|
||||||
child: ObxValue((data) {
|
return RPaginatedListView(
|
||||||
return RPaginatedListView(
|
listType: ListType.separated,
|
||||||
listType: ListType.separated,
|
resource: data.value,
|
||||||
resource: data.value,
|
hasMore: data.value.data?.next != null,
|
||||||
hasMore: data.value.data?.next != null,
|
padding: EdgeInsets.fromLTRB(8, 8, 8, 80),
|
||||||
padding: EdgeInsets.fromLTRB(8, 8, 8, 80),
|
itemBuilder: (context, index) {
|
||||||
itemBuilder: (context, index) {
|
var item = data.value.data!.results![index];
|
||||||
var item = data.value.data!.results![index];
|
return ObxValue((val) {
|
||||||
return ObxValue((val) {
|
return ExpandableListItem2(
|
||||||
return ExpandableListItem2(
|
selected: val.value.isEqual(index),
|
||||||
selected: val.value.isEqual(index),
|
onTap: () => controller.toggleExpanded(index),
|
||||||
onTap: () => controller.toggleExpanded(index),
|
index: index,
|
||||||
index: index,
|
child: itemListWidget(item),
|
||||||
child: itemListWidget(item),
|
secondChild: itemListExpandedWidget(item),
|
||||||
secondChild: itemListExpandedWidget(item),
|
labelColor: AppColor.blueLight,
|
||||||
labelColor: AppColor.blueLight,
|
labelIcon: Assets.vec.cubeScanSvg.path,
|
||||||
labelIcon: Assets.vec.cubeScanSvg.path,
|
);
|
||||||
);
|
}, controller.expandedIndex);
|
||||||
}, controller.expandedIndex);
|
},
|
||||||
},
|
itemCount: data.value.data?.results?.length ?? 0,
|
||||||
itemCount: data.value.data?.results?.length ?? 0,
|
separatorBuilder: (context, index) => SizedBox(height: 8.h),
|
||||||
separatorBuilder: (context, index) => SizedBox(height: 8.h),
|
onLoadMore: () async => controller.getPoultryOrderList(true),
|
||||||
onLoadMore: () async => controller.getPoultryOrderList(true),
|
onRefresh: () async {
|
||||||
onRefresh: () async {
|
controller.currentPage.value = 1;
|
||||||
controller.currentPage.value = 1;
|
await controller.getPoultryOrderList();
|
||||||
await controller.getPoultryOrderList();
|
},
|
||||||
},
|
);
|
||||||
);
|
}, controller.poultryOrderList);
|
||||||
}, controller.poultryOrderList),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Container itemListExpandedWidget(PoultryOrder item) {
|
Container itemListExpandedWidget(PoultryOrder item) {
|
||||||
@@ -129,8 +140,8 @@ class GenocidePage extends GetView<GenocideLogic> {
|
|||||||
title: 'نوع فروش',
|
title: 'نوع فروش',
|
||||||
value: (item.freeSaleInProvince ?? false) ? 'آزاد' : 'دولتی ',
|
value: (item.freeSaleInProvince ?? false) ? 'آزاد' : 'دولتی ',
|
||||||
),
|
),
|
||||||
buildRow(title: 'نوع کشتار ', value: getKillType(item)),
|
buildRow(title: 'نوع کشتار ', value: controller.getKillType(item)),
|
||||||
buildRow(title: 'درخواست', value: getRequestType(item) ?? 'N/A'),
|
buildRow(title: 'درخواست', value: controller.getRequestType(item) ?? 'N/A'),
|
||||||
|
|
||||||
buildRow(title: 'میانگین وزنی', value: '${(item.indexWeight)} (کیلوگرم)'),
|
buildRow(title: 'میانگین وزنی', value: '${(item.indexWeight)} (کیلوگرم)'),
|
||||||
buildRow(title: 'قیمت مرغدار', value: '${item.amount.separatedByComma} (ریال)'),
|
buildRow(title: 'قیمت مرغدار', value: '${item.amount.separatedByComma} (ریال)'),
|
||||||
@@ -138,7 +149,7 @@ class GenocidePage extends GetView<GenocideLogic> {
|
|||||||
title: 'مانده در سالن ',
|
title: 'مانده در سالن ',
|
||||||
value: '${item.hatching?.leftOver.separatedByComma ?? 0} (قطعه)',
|
value: '${item.hatching?.leftOver.separatedByComma ?? 0} (قطعه)',
|
||||||
),
|
),
|
||||||
buildRow(title: ' وضعیت', value: getState(item)),
|
buildRow(title: ' وضعیت', value: controller.getState(item)),
|
||||||
|
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: item.stateProcess == 'pending',
|
visible: item.stateProcess == 'pending',
|
||||||
@@ -159,13 +170,12 @@ class GenocidePage extends GetView<GenocideLogic> {
|
|||||||
onPressed: data.value
|
onPressed: data.value
|
||||||
? null
|
? null
|
||||||
: () => _buildDeleteDialog(
|
: () => _buildDeleteDialog(
|
||||||
onConfirm: () async {
|
onConfirm: () async {
|
||||||
Get.back();
|
Get.back();
|
||||||
await controller.deletePoultryOrder(item.id!);
|
await controller.deletePoultryOrder(item.id!);
|
||||||
controller.getPoultryOrderList();
|
controller.getPoultryOrderList();
|
||||||
|
},
|
||||||
},
|
),
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}, controller.isLoadingDelete),
|
}, controller.isLoadingDelete),
|
||||||
),
|
),
|
||||||
@@ -231,34 +241,9 @@ class GenocidePage extends GetView<GenocideLogic> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
String getRequestType(PoultryOrder item) {
|
//endregion
|
||||||
if (item.market ?? false) {
|
|
||||||
return 'پنل معاملات';
|
|
||||||
} else if (item.union ?? false) {
|
|
||||||
return 'اتحادیه';
|
|
||||||
} else {
|
|
||||||
return 'خرید مستقیم';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
String getKillType(PoultryOrder item) {
|
|
||||||
if (item.export ?? false) {
|
|
||||||
return 'صادرات';
|
|
||||||
} else if (item.freezing ?? false) {
|
|
||||||
return 'انجماد';
|
|
||||||
} else {
|
|
||||||
return 'عادی';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
String getState(PoultryOrder item) {
|
|
||||||
if (item.stateProcess == 'pending') {
|
|
||||||
return 'در انتظار تایید';
|
|
||||||
} else {
|
|
||||||
return 'تایید شده';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
//region other widgets
|
||||||
void _buildDeleteDialog({required VoidCallback onConfirm}) {
|
void _buildDeleteDialog({required VoidCallback onConfirm}) {
|
||||||
Get.defaultDialog(
|
Get.defaultDialog(
|
||||||
title: 'حذف درخواست کشتار',
|
title: 'حذف درخواست کشتار',
|
||||||
@@ -280,7 +265,6 @@ class GenocidePage extends GetView<GenocideLogic> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Widget filterBottomSheet() => filterBottomSheetWidget(
|
Widget filterBottomSheet() => filterBottomSheetWidget(
|
||||||
fromDate: controller.fromDateFilter,
|
fromDate: controller.fromDateFilter,
|
||||||
onChangedFromDate: (jalali) => controller.fromDateFilter.value = jalali,
|
onChangedFromDate: (jalali) => controller.fromDateFilter.value = jalali,
|
||||||
@@ -289,4 +273,16 @@ class GenocidePage extends GetView<GenocideLogic> {
|
|||||||
onSubmit: () => controller.getPoultryOrderList(),
|
onSubmit: () => controller.getPoultryOrderList(),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//endregion
|
||||||
|
|
||||||
|
//region kill registration bottom sheet
|
||||||
|
Widget killRegistrationBottomSheet() {
|
||||||
|
return BaseBottomSheet(
|
||||||
|
height: Get.height * 0.9,
|
||||||
|
bgColor: Color(0x66E4E4E4),
|
||||||
|
child: KillingRegistrationPage(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
//endregion
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ import 'package:rasadyar_chicken/data/models/response/all_poultry/all_poultry.da
|
|||||||
import 'package:rasadyar_chicken/data/models/response/kill_house_poultry/kill_house_poultry.dart';
|
import 'package:rasadyar_chicken/data/models/response/kill_house_poultry/kill_house_poultry.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/kill_request_poultry/kill_request_poultry.dart';
|
import 'package:rasadyar_chicken/data/models/response/kill_request_poultry/kill_request_poultry.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/poultry_hatching/poultry_hatching.dart';
|
import 'package:rasadyar_chicken/data/models/response/poultry_hatching/poultry_hatching.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/utils/nested_keys_utils.dart';
|
|
||||||
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
|
|
||||||
import 'package:rasadyar_core/core.dart';
|
import 'package:rasadyar_core/core.dart';
|
||||||
|
|
||||||
import 'logic.dart';
|
import 'logic.dart';
|
||||||
@@ -15,12 +13,8 @@ class KillingRegistrationPage extends GetView<KillingRegistrationLogic> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return BasePageWithScroll(
|
return Column(
|
||||||
hasSearch: false,
|
children: [
|
||||||
hasFilter: false,
|
|
||||||
routes: controller.routes,
|
|
||||||
onBackPressed: () => Get.back(id: poultryFirstKey),
|
|
||||||
widgets: [
|
|
||||||
poultryFarmWidget(),
|
poultryFarmWidget(),
|
||||||
poultryUserListWidget(),
|
poultryUserListWidget(),
|
||||||
poultryHatchingWidget(),
|
poultryHatchingWidget(),
|
||||||
@@ -38,7 +32,6 @@ class KillingRegistrationPage extends GetView<KillingRegistrationLogic> {
|
|||||||
controller.killsDate.value = jalali;
|
controller.killsDate.value = jalali;
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
loseWidget(),
|
|
||||||
quantityKillsWidget(),
|
quantityKillsWidget(),
|
||||||
averageWeightKillsWidget(),
|
averageWeightKillsWidget(),
|
||||||
saleTypeWidget(),
|
saleTypeWidget(),
|
||||||
@@ -55,57 +48,9 @@ class KillingRegistrationPage extends GetView<KillingRegistrationLogic> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget informationWidget() {
|
|
||||||
return Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 20.w, vertical: 10.h),
|
|
||||||
child: ObxValue(
|
|
||||||
(data) => Column(
|
|
||||||
spacing: 8,
|
|
||||||
children: [
|
|
||||||
buildUnitRow(
|
|
||||||
title: 'تعداد جوجه ریزی',
|
|
||||||
value: data.value?.quantity.separatedByCommaFa,
|
|
||||||
unit: 'قطعه',
|
|
||||||
),
|
|
||||||
buildUnitRow(
|
|
||||||
title: 'جمع تلفات ثبت شده دامپزشک و مرغدار',
|
|
||||||
value: data.value?.losses.separatedByCommaFa,
|
|
||||||
unit: 'قطعه',
|
|
||||||
),
|
|
||||||
buildUnitRow(
|
|
||||||
title: 'باقیمانده',
|
|
||||||
value: data.value?.leftOver.separatedByCommaFa,
|
|
||||||
unit: 'قطعه',
|
|
||||||
),
|
|
||||||
buildUnitRow(
|
|
||||||
title: 'سن مرغ',
|
|
||||||
value: data.value?.chickenAge.separatedByCommaFa,
|
|
||||||
unit: 'روز',
|
|
||||||
),
|
|
||||||
buildUnitRow(
|
|
||||||
title: 'مجوز فروش آزاد',
|
|
||||||
value: data.value?.freeGovernmentalInfo?.totalFreeCommitmentQuantity.separatedByCommaFa,
|
|
||||||
unit: 'قطعه',
|
|
||||||
),
|
|
||||||
buildUnitRow(
|
|
||||||
title: 'مانده فروش آزاد',
|
|
||||||
value: data
|
|
||||||
.value
|
|
||||||
?.freeGovernmentalInfo
|
|
||||||
?.leftTotalFreeCommitmentQuantity
|
|
||||||
.separatedByCommaFa,
|
|
||||||
unit: 'قطعه',
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
controller.selectedPoultryHatching,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget poultryFarmWidget() {
|
Widget poultryFarmWidget() {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 20.w, vertical: 10.h),
|
padding: EdgeInsets.symmetric(horizontal: 8.w, vertical: 10.h),
|
||||||
child: ObxValue((data) {
|
child: ObxValue((data) {
|
||||||
return ResourceOverlayDropdown<AllPoultry>(
|
return ResourceOverlayDropdown<AllPoultry>(
|
||||||
items: data.value,
|
items: data.value,
|
||||||
@@ -116,67 +61,203 @@ class KillingRegistrationPage extends GetView<KillingRegistrationLogic> {
|
|||||||
controller.getUserPoultryList();
|
controller.getUserPoultryList();
|
||||||
},
|
},
|
||||||
selectedItem: controller.selectedPoultry.value,
|
selectedItem: controller.selectedPoultry.value,
|
||||||
itemBuilder: (item) => Text(labelPoultry(item), maxLines: 2),
|
itemBuilder: (item) => labelPoultryWidget(item),
|
||||||
labelBuilder: (item) => Text(labelPoultry(item)),
|
labelBuilder: (item) => labelPoultryWidget(item),
|
||||||
);
|
);
|
||||||
}, controller.allPoultryList),
|
}, controller.allPoultryList),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
String labelPoultry(AllPoultry? item) {
|
Widget labelPoultryWidget(AllPoultry? item) {
|
||||||
if (item == null) {
|
if (item == null) {
|
||||||
return 'انتخاب مرغداری';
|
return Row(
|
||||||
|
children: [
|
||||||
|
Assets.vec.farmSvg.svg(
|
||||||
|
width: 28.w,
|
||||||
|
height: 28.h,
|
||||||
|
colorFilter: const ColorFilter.mode(AppColor.darkGreyDark, BlendMode.srcIn),
|
||||||
|
),
|
||||||
|
SizedBox(width: 4.w),
|
||||||
|
Text('انتخاب مرغداری', style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDark)),
|
||||||
|
],
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
return '${item.unitName} (${item.address?.city?.name}) / ${item.user?.fullname} (${item.user?.mobile}) / ${item.lastHatchingRemainQuantity} قطعه ';
|
return Text(
|
||||||
|
'${item.unitName} (${item.address?.city?.name})',
|
||||||
|
maxLines: 2,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget poultryUserListWidget() {
|
Widget poultryUserListWidget() {
|
||||||
return Padding(
|
return ObxValue((data) {
|
||||||
padding: EdgeInsets.symmetric(horizontal: 20.w),
|
if (data.value == null) {
|
||||||
child: ObxValue((data) {
|
return SizedBox.shrink();
|
||||||
return ResourceOverlayDropdown<KillRequestPoultry>(
|
}
|
||||||
items: data.value,
|
return Padding(
|
||||||
background: Colors.white,
|
padding: EdgeInsets.symmetric(horizontal: 8.w),
|
||||||
onChanged: (value) {
|
child: ObxValue((data) {
|
||||||
controller.clearSelectedStep2();
|
return ResourceOverlayDropdown<KillRequestPoultry>(
|
||||||
controller.selectedKillRequestPoultry.value = value;
|
items: data.value,
|
||||||
controller.getPoultryHatchingList();
|
background: Colors.white,
|
||||||
},
|
onChanged: (value) {
|
||||||
selectedItem: controller.selectedKillRequestPoultry.value,
|
controller.clearSelectedStep2();
|
||||||
itemBuilder: (item) => Text(item.unitName ?? '-'),
|
controller.selectedKillRequestPoultry.value = value;
|
||||||
labelBuilder: (item) => Text(item?.unitName ?? 'محل پرورش'),
|
controller.getPoultryHatchingList();
|
||||||
);
|
},
|
||||||
}, controller.poultryList),
|
selectedItem: controller.selectedKillRequestPoultry.value,
|
||||||
);
|
itemBuilder: (item) => labelPoultryUser(item),
|
||||||
|
labelBuilder: (item) => labelPoultryUser(item),
|
||||||
|
);
|
||||||
|
}, controller.poultryList),
|
||||||
|
);
|
||||||
|
}, controller.selectedPoultry);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget labelPoultryUser(KillRequestPoultry? item) {
|
||||||
|
if (item == null) {
|
||||||
|
return Row(
|
||||||
|
children: [
|
||||||
|
Assets.vec.chickenHouseSvg.svg(
|
||||||
|
width: 28.w,
|
||||||
|
height: 28.h,
|
||||||
|
colorFilter: const ColorFilter.mode(AppColor.darkGreyDark, BlendMode.srcIn),
|
||||||
|
),
|
||||||
|
SizedBox(width: 6.w),
|
||||||
|
Text('محل پرورش', style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDark)),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return Text(item.unitName ?? '-');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget poultryHatchingWidget() {
|
Widget poultryHatchingWidget() {
|
||||||
return Padding(
|
return ObxValue((data) {
|
||||||
padding: EdgeInsets.symmetric(horizontal: 20.w, vertical: 10.h),
|
if (data.value == null) {
|
||||||
child: ObxValue((data) {
|
return SizedBox.shrink();
|
||||||
return ResourceOverlayDropdown<PoultryHatching>(
|
}
|
||||||
items: data.value,
|
return Padding(
|
||||||
background: Colors.white,
|
padding: EdgeInsets.symmetric(horizontal: 8.w, vertical: 10.h),
|
||||||
onChanged: (value) {
|
child: ObxValue((data) {
|
||||||
controller.selectedPoultryHatching.value = value;
|
return ResourceOverlayDropdown<PoultryHatching>(
|
||||||
},
|
items: data.value,
|
||||||
selectedItem: controller.selectedPoultryHatching.value,
|
background: Colors.white,
|
||||||
itemBuilder: (item) => Text(labelPoultryHatching(item)),
|
onChanged: (value) {
|
||||||
labelBuilder: (item) => Text(labelPoultryHatching(item)),
|
controller.selectedPoultryHatching.value = value;
|
||||||
);
|
},
|
||||||
}, controller.poultryHatchingList),
|
selectedItem: controller.selectedPoultryHatching.value,
|
||||||
);
|
itemBuilder: (item) => labelPoultryHatching(item),
|
||||||
|
labelBuilder: (item) => labelPoultryHatching(item),
|
||||||
|
);
|
||||||
|
}, controller.poultryHatchingList),
|
||||||
|
);
|
||||||
|
}, controller.selectedKillRequestPoultry);
|
||||||
}
|
}
|
||||||
|
|
||||||
String labelPoultryHatching(PoultryHatching? item) {
|
Widget labelPoultryHatching(PoultryHatching? item) {
|
||||||
if (item == null) {
|
if (item == null) {
|
||||||
return 'دوره جوجه ریزی';
|
return Row(
|
||||||
|
children: [
|
||||||
|
Assets.vec.calendarSvg.svg(
|
||||||
|
width: 28.w,
|
||||||
|
height: 28.h,
|
||||||
|
colorFilter: const ColorFilter.mode(AppColor.darkGreyDark, BlendMode.srcIn),
|
||||||
|
),
|
||||||
|
SizedBox(width: 6.w),
|
||||||
|
Text('دوره جوجه ریزی', style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDark)),
|
||||||
|
],
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
return ' دوره ${item.period} سالن ${item.hall} نژاد ${item.chickenBreed} باقیمانده ${item.leftOver} قطعه ';
|
return Text(
|
||||||
|
' دوره ${item.period} سالن ${item.hall} نژاد ${item.chickenBreed} باقیمانده ${item.leftOver} قطعه ',
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Widget informationWidget() {
|
||||||
|
return Container(
|
||||||
|
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(8)),
|
||||||
|
margin: EdgeInsets.fromLTRB(8.w, 0, 8.w, 10.h),
|
||||||
|
padding: EdgeInsets.all(7),
|
||||||
|
child: ObxValue(
|
||||||
|
(data) => Column(
|
||||||
|
spacing: 8,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 4),
|
||||||
|
child: Text(
|
||||||
|
'اطلاعات مرغداری',
|
||||||
|
textAlign: TextAlign.right,
|
||||||
|
style: AppFonts.yekan14Bold.copyWith(color: AppColor.blueNormal),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
Container(
|
||||||
|
decoration: ShapeDecoration(
|
||||||
|
color: const Color(0xFFEAEFFF),
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
side: BorderSide(width: 1, color: const Color(0xFFE0E7FF)),
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
padding: EdgeInsets.all(4),
|
||||||
|
child: buildUnitRow(
|
||||||
|
title: 'تعداد جوجه ریزی',
|
||||||
|
value: data.value?.quantity.separatedByCommaFa,
|
||||||
|
unit: 'قطعه',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
buildUnitRow(
|
||||||
|
title: 'جمع تلفات ثبت شده دامپزشک و مرغدار',
|
||||||
|
value: data.value?.losses.separatedByCommaFa,
|
||||||
|
unit: 'قطعه',
|
||||||
|
padding: EdgeInsetsGeometry.symmetric(horizontal: 4),
|
||||||
|
),
|
||||||
|
buildUnitRow(
|
||||||
|
title: 'باقیمانده',
|
||||||
|
value: data.value?.leftOver.separatedByCommaFa,
|
||||||
|
unit: 'قطعه',
|
||||||
|
padding: EdgeInsetsGeometry.symmetric(horizontal: 4),
|
||||||
|
),
|
||||||
|
buildUnitRow(
|
||||||
|
title: 'سن مرغ',
|
||||||
|
value: data.value?.chickenAge.separatedByCommaFa,
|
||||||
|
unit: 'روز',
|
||||||
|
padding: EdgeInsetsGeometry.symmetric(horizontal: 4),
|
||||||
|
),
|
||||||
|
buildUnitRow(
|
||||||
|
title: 'مجوز فروش آزاد',
|
||||||
|
value:
|
||||||
|
data.value?.freeGovernmentalInfo?.totalFreeCommitmentQuantity.separatedByCommaFa,
|
||||||
|
unit: 'قطعه',
|
||||||
|
padding: EdgeInsetsGeometry.symmetric(horizontal: 4),
|
||||||
|
),
|
||||||
|
buildUnitRow(
|
||||||
|
title: 'مانده فروش آزاد',
|
||||||
|
value: data
|
||||||
|
.value
|
||||||
|
?.freeGovernmentalInfo
|
||||||
|
?.leftTotalFreeCommitmentQuantity
|
||||||
|
.separatedByCommaFa,
|
||||||
|
unit: 'قطعه',
|
||||||
|
padding: EdgeInsetsGeometry.symmetric(horizontal: 4),
|
||||||
|
),
|
||||||
|
buildUnitRow(
|
||||||
|
title: 'تلفن مرغدار',
|
||||||
|
value: data.value?.poultry?.userprofile?.mobile,
|
||||||
|
unit: '',
|
||||||
|
padding: EdgeInsetsGeometry.symmetric(horizontal: 4),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
controller.selectedPoultryHatching,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
Widget killDateWidget({required Rx<Jalali> date, required Function(Jalali jalali) onChanged}) {
|
Widget killDateWidget({required Rx<Jalali> date, required Function(Jalali jalali) onChanged}) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
@@ -184,7 +265,7 @@ class KillingRegistrationPage extends GetView<KillingRegistrationLogic> {
|
|||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 40,
|
height: 40,
|
||||||
margin: EdgeInsets.symmetric(horizontal: 20.w),
|
margin: EdgeInsets.symmetric(horizontal: 8.w),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
borderRadius: BorderRadius.circular(8),
|
borderRadius: BorderRadius.circular(8),
|
||||||
@@ -214,22 +295,9 @@ class KillingRegistrationPage extends GetView<KillingRegistrationLogic> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget loseWidget() {
|
|
||||||
return Padding(
|
|
||||||
padding: EdgeInsets.fromLTRB(20.w, 10.h, 20.w, 0),
|
|
||||||
child: RTextField(
|
|
||||||
label: 'تعداد تلفات (قطعه)',
|
|
||||||
filled: true,
|
|
||||||
filledColor: Colors.white,
|
|
||||||
keyboardType: TextInputType.number,
|
|
||||||
controller: controller.quantityLoseController,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget quantityKillsWidget() {
|
Widget quantityKillsWidget() {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 20.w, vertical: 10.h),
|
padding: EdgeInsets.symmetric(horizontal: 8.w, vertical: 10.h),
|
||||||
child: RTextField(
|
child: RTextField(
|
||||||
label: 'تعداد کشتار (قطعه)',
|
label: 'تعداد کشتار (قطعه)',
|
||||||
filled: true,
|
filled: true,
|
||||||
@@ -266,7 +334,7 @@ class KillingRegistrationPage extends GetView<KillingRegistrationLogic> {
|
|||||||
|
|
||||||
Widget averageWeightKillsWidget() {
|
Widget averageWeightKillsWidget() {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 20.w),
|
padding: EdgeInsets.symmetric(horizontal: 8.w),
|
||||||
child: RTextField(
|
child: RTextField(
|
||||||
label: 'میانگین وزن (کیلوگرم)',
|
label: 'میانگین وزن (کیلوگرم)',
|
||||||
filled: true,
|
filled: true,
|
||||||
@@ -299,30 +367,35 @@ class KillingRegistrationPage extends GetView<KillingRegistrationLogic> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget saleTypeWidget() {
|
Widget saleTypeWidget() {
|
||||||
return Padding(
|
return Container(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 20.w, vertical: 10.h),
|
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(8)),
|
||||||
|
margin: EdgeInsets.symmetric(horizontal: 8.w, vertical: 10.h),
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 10.w, vertical: 4.h),
|
||||||
child: ObxValue((data) {
|
child: ObxValue((data) {
|
||||||
return Row(
|
return Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
spacing: 4,
|
||||||
children: [
|
children: [
|
||||||
CustomChip(
|
Text(
|
||||||
title: 'فروش دولتی',
|
'نوع فروش',
|
||||||
index: 0,
|
textAlign: TextAlign.center,
|
||||||
onTap: (int p1) {
|
style: AppFonts.yekan14Bold.copyWith(color: AppColor.blueNormal),
|
||||||
|
|
||||||
|
|
||||||
controller.changeSaleType();
|
|
||||||
},
|
|
||||||
isSelected: !(data.value),
|
|
||||||
),
|
),
|
||||||
CustomChip(
|
RadioGroup(
|
||||||
title: 'فروش آزاد',
|
groupValue: data.value ? 1 : 0,
|
||||||
index: 1,
|
onChanged: (value) {
|
||||||
onTap: (int p1) {
|
|
||||||
controller.changeSaleType();
|
controller.changeSaleType();
|
||||||
|
|
||||||
},
|
},
|
||||||
isSelected: data.value,
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Radio(value: 0, activeColor: AppColor.blueNormal),
|
||||||
|
Text('دولتی', style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDark)),
|
||||||
|
Spacer(),
|
||||||
|
Radio(value: 1, activeColor: AppColor.blueNormal),
|
||||||
|
Text('آزاد', style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDark)),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
@@ -331,36 +404,36 @@ class KillingRegistrationPage extends GetView<KillingRegistrationLogic> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget priceWidget() {
|
Widget priceWidget() {
|
||||||
return ObxValue((data){
|
return ObxValue((data) {
|
||||||
if(!data.value){
|
if (!data.value) {
|
||||||
return Container(
|
return Container(
|
||||||
height: 40.h,
|
height: 40.h,
|
||||||
margin: EdgeInsets.symmetric(horizontal: 20.w),
|
margin: EdgeInsets.symmetric(horizontal: 8.w),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white,
|
color: AppColor.greenLight,
|
||||||
borderRadius: BorderRadius.circular(8),
|
borderRadius: BorderRadius.circular(8),
|
||||||
border: Border.all(width: 1.w, color: AppColor.darkGreyLight),
|
border: Border.all(width: 1.w, color: AppColor.whiteNormalHover),
|
||||||
),
|
),
|
||||||
padding: EdgeInsets.symmetric(horizontal: 11.w, vertical: 4.h),
|
padding: EdgeInsets.symmetric(horizontal: 11.w, vertical: 4.h),
|
||||||
child: Row(
|
child: Row(
|
||||||
spacing: 8,
|
spacing: 8,
|
||||||
children: [
|
children: [
|
||||||
Text('قیمت مصوب', style: AppFonts.yekan14.copyWith(color: AppColor.bgDark)),
|
Text('قیمت مصوب', style: AppFonts.yekan14.copyWith(color: AppColor.textColor)),
|
||||||
Spacer(),
|
Spacer(),
|
||||||
|
|
||||||
ObxValue((data) {
|
ObxValue((data) {
|
||||||
return Text(
|
return Text(
|
||||||
' ${data.value.separatedByCommaFa} ریال',
|
' ${data.value.separatedByCommaFa} ریال',
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDark),
|
style: AppFonts.yekan14.copyWith(color: AppColor.textColor),
|
||||||
);
|
);
|
||||||
}, controller.generatedApprovedPrice),
|
}, controller.generatedApprovedPrice),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}else{
|
} else {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: EdgeInsets.fromLTRB(20.w, 10.h, 20.w, 0),
|
padding: EdgeInsets.fromLTRB(8.w, 0, 8.w, 0),
|
||||||
child: RTextField(
|
child: RTextField(
|
||||||
label: 'قیمت پیشنهادی (ریال)',
|
label: 'قیمت پیشنهادی (ریال)',
|
||||||
validator: (value) {
|
validator: (value) {
|
||||||
@@ -368,29 +441,27 @@ class KillingRegistrationPage extends GetView<KillingRegistrationLogic> {
|
|||||||
return 'قیمت پیشنهادی را وارد کنید';
|
return 'قیمت پیشنهادی را وارد کنید';
|
||||||
}
|
}
|
||||||
final price = double.tryParse(value.replaceAll(',', ''));
|
final price = double.tryParse(value.replaceAll(',', ''));
|
||||||
dLog(controller.priceFreeSaleController.text);
|
|
||||||
fLog(value);
|
|
||||||
if (price == null || price <= 0) {
|
if (price == null || price <= 0) {
|
||||||
return 'قیمت پیشنهادی باید عددی بزرگتر از صفر باشد';
|
return 'قیمت پیشنهادی باید عددی بزرگتر از صفر باشد';
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
filled: true,
|
filled: true,
|
||||||
filledColor: Colors.white,
|
borderColor: AppColor.whiteNormalHover,
|
||||||
|
filledColor: AppColor.accent1,
|
||||||
keyboardType: TextInputType.number,
|
keyboardType: TextInputType.number,
|
||||||
inputFormatters: [FilteringTextInputFormatter.digitsOnly, SeparatorInputFormatter()],
|
inputFormatters: [FilteringTextInputFormatter.digitsOnly, SeparatorInputFormatter()],
|
||||||
controller: controller.priceFreeSaleController,
|
controller: controller.priceFreeSaleController,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}, controller.isFreeSale);
|
}, controller.isFreeSale);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget buyerListWidget() {
|
Widget buyerListWidget() {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 20.w, vertical: 10.h),
|
padding: EdgeInsets.symmetric(vertical: 10.h, horizontal: 8.w),
|
||||||
child: ObxValue((data) {
|
child: ObxValue((data) {
|
||||||
return Visibility(
|
return Visibility(
|
||||||
visible: data.value?.provinceAllowChooseKillHouse?.allowState ?? false,
|
visible: data.value?.provinceAllowChooseKillHouse?.allowState ?? false,
|
||||||
@@ -420,56 +491,62 @@ class KillingRegistrationPage extends GetView<KillingRegistrationLogic> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget slaughterhouseSelectedWidget() {
|
Widget slaughterhouseSelectedWidget() {
|
||||||
return Padding(
|
return Container(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 20.w),
|
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(8)),
|
||||||
child: Wrap(
|
margin: EdgeInsets.symmetric(horizontal: 8.w),
|
||||||
spacing: 10,
|
padding: EdgeInsets.symmetric(horizontal: 8.w),
|
||||||
runSpacing: 10,
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
ObxValue((data) {
|
SizedBox(height: 8.h),
|
||||||
return Visibility(
|
Text('عملیات کشتار', style: AppFonts.yekan14Bold.copyWith(color: AppColor.blueNormal)),
|
||||||
visible: data.value?.permission ?? false,
|
SizedBox(height: 8.h),
|
||||||
child: ObxValue(
|
Row(
|
||||||
(data) => CheckBoxChips(
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
title: 'کشتار برای انجماد',
|
children: [
|
||||||
data: data.value,
|
ObxValue((data) {
|
||||||
onTap: (p1) {
|
return Visibility(
|
||||||
controller.isFreezedSelected.value = !controller.isFreezedSelected.value;
|
visible: data.value?.permission ?? false,
|
||||||
},
|
child: ObxValue(
|
||||||
isSelected: data.value,
|
(data) => TitleCheckBox(
|
||||||
),
|
title: ' انجماد',
|
||||||
controller.isFreezedSelected,
|
onChanged: (_) {
|
||||||
),
|
controller.isFreezedSelected.value = !controller.isFreezedSelected.value;
|
||||||
);
|
},
|
||||||
}, controller.sellForFreezing),
|
isSelected: data.value,
|
||||||
|
),
|
||||||
|
controller.isFreezedSelected,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}, controller.sellForFreezing),
|
||||||
|
|
||||||
ObxValue((data) {
|
ObxValue((data) {
|
||||||
return CheckBoxChips(
|
return TitleCheckBox(
|
||||||
title: 'نمایش در پنل معاملات',
|
title: 'پنل معاملات',
|
||||||
data: 0,
|
onChanged: (_) {
|
||||||
onTap: (int p1) {
|
controller.isMarketSelected.value = !controller.isMarketSelected.value;
|
||||||
controller.isMarketSelected.value = !controller.isMarketSelected.value;
|
|
||||||
},
|
|
||||||
isSelected: data.value,
|
|
||||||
);
|
|
||||||
}, controller.isMarketSelected),
|
|
||||||
|
|
||||||
ObxValue((data) {
|
|
||||||
return Visibility(
|
|
||||||
visible: data.value?.allow ?? false,
|
|
||||||
child: ObxValue((data) {
|
|
||||||
return CheckBoxChips(
|
|
||||||
title: 'کشتار برای صادرات',
|
|
||||||
data: data.value,
|
|
||||||
onTap: (_) {
|
|
||||||
controller.isExportSelected.value = !controller.isExportSelected.value;
|
|
||||||
},
|
},
|
||||||
isSelected: data.value,
|
isSelected: data.value,
|
||||||
);
|
);
|
||||||
}, controller.isExportSelected),
|
}, controller.isMarketSelected),
|
||||||
);
|
|
||||||
}, controller.poultryExport),
|
ObxValue((data) {
|
||||||
|
return Visibility(
|
||||||
|
visible: data.value?.allow ?? false,
|
||||||
|
child: ObxValue((data) {
|
||||||
|
return TitleCheckBox(
|
||||||
|
title: 'صادرات',
|
||||||
|
isSelected: data.value,
|
||||||
|
onChanged: (_) {
|
||||||
|
controller.isExportSelected.value = !controller.isExportSelected.value;
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}, controller.isExportSelected),
|
||||||
|
);
|
||||||
|
}, controller.poultryExport),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(height: 8.h),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@@ -478,11 +555,12 @@ class KillingRegistrationPage extends GetView<KillingRegistrationLogic> {
|
|||||||
Widget submitButtonWidget() {
|
Widget submitButtonWidget() {
|
||||||
return ObxValue((data) {
|
return ObxValue((data) {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 20.w, vertical: 20.h),
|
padding: EdgeInsets.symmetric(horizontal: 8.w, vertical: 12.h),
|
||||||
child: RElevated(
|
child: RElevated(
|
||||||
enabled: data.value,
|
enabled: data.value,
|
||||||
height: 45.h,
|
height: 45.h,
|
||||||
isFullWidth: true,
|
isFullWidth: true,
|
||||||
|
disabledBackgroundColor: AppColor.greenDarkHover,
|
||||||
backgroundColor: AppColor.greenNormal,
|
backgroundColor: AppColor.greenNormal,
|
||||||
textStyle: AppFonts.yekan16Bold.copyWith(color: Colors.white),
|
textStyle: AppFonts.yekan16Bold.copyWith(color: Colors.white),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
|||||||
@@ -11,56 +11,42 @@ class PoultryActionPage extends GetView<PoultryActionLogic> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: chickenAppBar(
|
appBar: chickenAppBar(hasBack: false, hasFilter: false, hasSearch: false, isBase: false),
|
||||||
hasBack: false,
|
body: Container(
|
||||||
hasFilter: false,
|
decoration: BoxDecoration(
|
||||||
hasSearch: false,
|
image: DecorationImage(
|
||||||
isBase: false,
|
image: AssetImage(Assets.images.bgChickenPattern.path),
|
||||||
),
|
fit: BoxFit.cover,
|
||||||
body: Column(
|
),
|
||||||
children: [
|
),
|
||||||
bannerWidget(),
|
child: gridWidget(),
|
||||||
itemGridWidget(),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Image bannerWidget() {
|
Widget gridWidget() {
|
||||||
return Assets.images.poultryAction.image(
|
|
||||||
height: 212.h,
|
|
||||||
width: Get.width.w,
|
|
||||||
fit: BoxFit.cover,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget itemGridWidget() {
|
|
||||||
return ObxValue((data) {
|
return ObxValue((data) {
|
||||||
return Expanded(
|
return GridView.builder(
|
||||||
child: GridView.builder(
|
physics: BouncingScrollPhysics(),
|
||||||
physics: BouncingScrollPhysics(),
|
padding: EdgeInsets.all(16),
|
||||||
padding: EdgeInsets.symmetric(horizontal: 31.w),
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
crossAxisCount: 2,
|
||||||
crossAxisCount: 2,
|
mainAxisSpacing: 16.h,
|
||||||
mainAxisSpacing: 24.h,
|
crossAxisSpacing: 16.w,
|
||||||
crossAxisSpacing: 24.w,
|
),
|
||||||
),
|
itemCount: data.length,
|
||||||
itemCount: data.length,
|
hitTestBehavior: HitTestBehavior.opaque,
|
||||||
hitTestBehavior: HitTestBehavior.opaque,
|
itemBuilder: (BuildContext context, int index) {
|
||||||
itemBuilder: (BuildContext context, int index) {
|
var item = data[index];
|
||||||
var item = data[index];
|
return GlassMorphismCardIcon(
|
||||||
return CardIcon(
|
title: item.title,
|
||||||
title: item.title,
|
vecIcon: item.icon,
|
||||||
vecIcon: item.icon,
|
onTap: () async {
|
||||||
iconColor: AppColor.blueNormal,
|
Get.toNamed(item.route, id: poultryFirstKey);
|
||||||
onTap: () async {
|
},
|
||||||
Get.toNamed(item.route, id: poultryFirstKey);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}, controller.items);
|
},
|
||||||
|
);
|
||||||
|
}, controller.items);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,65 +42,83 @@ class PoultryScienceRootPage extends GetView<PoultryScienceRootLogic> {
|
|||||||
},
|
},
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
backgroundColor: AppColor.bgLight,
|
backgroundColor: AppColor.bgLight,
|
||||||
body: IndexedStack(
|
body: Stack(
|
||||||
children: [
|
children: [
|
||||||
Navigator(
|
IndexedStack(
|
||||||
key: Get.nestedKey(poultryFirstKey),
|
children: [
|
||||||
onGenerateRoute: (settings) {
|
Navigator(
|
||||||
final page = ChickenPages.pages.firstWhere(
|
key: Get.nestedKey(poultryFirstKey),
|
||||||
(e) => e.name == settings.name,
|
onGenerateRoute: (settings) {
|
||||||
orElse: () => ChickenPages.pages.firstWhere(
|
final page = ChickenPages.pages.firstWhere(
|
||||||
(e) => e.name == ChickenRoutes.actionPoultryScience,
|
(e) => e.name == settings.name,
|
||||||
|
orElse: () => ChickenPages.pages.firstWhere(
|
||||||
|
(e) => e.name == ChickenRoutes.actionPoultryScience,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
return buildRouteFromGetPage(page);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
Navigator(
|
||||||
|
key: Get.nestedKey(poultrySecondKey),
|
||||||
|
onGenerateRoute: (settings) => GetPageRoute(page: () => controller.pages[1]),
|
||||||
|
),
|
||||||
|
Navigator(
|
||||||
|
key: Get.nestedKey(poultryThirdKey),
|
||||||
|
onGenerateRoute: (settings) => GetPageRoute(page: () => controller.pages[2]),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
index: data.value,
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
right: 0,
|
||||||
|
left: 0,
|
||||||
|
bottom: 0,
|
||||||
|
child: RBottomNavigation(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
|
items: [
|
||||||
|
RBottomNavigationItem(
|
||||||
|
label: 'اقدام',
|
||||||
|
icon: Assets.vec.settingSvg.path,
|
||||||
|
isSelected: controller.currentPage.value == 0,
|
||||||
|
onTap: () {
|
||||||
|
Get.nestedKey(
|
||||||
|
poultrySecondKey,
|
||||||
|
)?.currentState?.popUntil((route) => route.isFirst);
|
||||||
|
|
||||||
|
controller.changePage(0);
|
||||||
|
},
|
||||||
),
|
),
|
||||||
);
|
RBottomNavigationItem(
|
||||||
|
label: 'خانه',
|
||||||
return buildRouteFromGetPage(page);
|
icon: Assets.vec.homeSvg.path,
|
||||||
},
|
isSelected: controller.currentPage.value == 1,
|
||||||
),
|
onTap: () {
|
||||||
Navigator(
|
Get.nestedKey(
|
||||||
key: Get.nestedKey(poultrySecondKey),
|
poultryFirstKey,
|
||||||
onGenerateRoute: (settings) => GetPageRoute(page: () => controller.pages[1]),
|
)?.currentState?.popUntil((route) => route.isFirst);
|
||||||
),
|
Get.nestedKey(
|
||||||
Navigator(
|
poultryThirdKey,
|
||||||
key: Get.nestedKey(poultryThirdKey),
|
)?.currentState?.popUntil((route) => route.isFirst);
|
||||||
onGenerateRoute: (settings) => GetPageRoute(page: () => controller.pages[2]),
|
controller.changePage(1);
|
||||||
),
|
},
|
||||||
],
|
),
|
||||||
index: data.value,
|
RBottomNavigationItem(
|
||||||
),
|
label: 'پروفایل',
|
||||||
|
icon: Assets.vec.profileCircleSvg.path,
|
||||||
bottomNavigationBar: RBottomNavigation(
|
isSelected: controller.currentPage.value == 2,
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
onTap: () {
|
||||||
items: [
|
Get.nestedKey(
|
||||||
RBottomNavigationItem(
|
poultryFirstKey,
|
||||||
label: 'اقدام',
|
)?.currentState?.popUntil((route) => route.isFirst);
|
||||||
icon: Assets.vec.settingSvg.path,
|
Get.nestedKey(
|
||||||
isSelected: controller.currentPage.value == 0,
|
poultrySecondKey,
|
||||||
onTap: () {
|
)?.currentState?.popUntil((route) => route.isFirst);
|
||||||
Get.nestedKey(poultrySecondKey)?.currentState?.popUntil((route) => route.isFirst);
|
controller.changePage(2);
|
||||||
|
},
|
||||||
controller.changePage(0);
|
),
|
||||||
},
|
],
|
||||||
),
|
),
|
||||||
RBottomNavigationItem(
|
|
||||||
label: 'خانه',
|
|
||||||
icon: Assets.vec.homeSvg.path,
|
|
||||||
isSelected: controller.currentPage.value == 1,
|
|
||||||
onTap: () {
|
|
||||||
Get.nestedKey(poultryFirstKey)?.currentState?.popUntil((route) => route.isFirst);
|
|
||||||
Get.nestedKey(poultryThirdKey)?.currentState?.popUntil((route) => route.isFirst);
|
|
||||||
controller.changePage(1);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
RBottomNavigationItem(
|
|
||||||
label: 'پروفایل',
|
|
||||||
icon: Assets.vec.profileCircleSvg.path,
|
|
||||||
isSelected: controller.currentPage.value == 2,
|
|
||||||
onTap: () {
|
|
||||||
Get.nestedKey(poultryFirstKey)?.currentState?.popUntil((route) => route.isFirst);
|
|
||||||
Get.nestedKey(poultrySecondKey)?.currentState?.popUntil((route) => route.isFirst);
|
|
||||||
controller.changePage(2);
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -216,6 +216,7 @@ sealed class ChickenPages {
|
|||||||
binding: BindingsBuilder(() {
|
binding: BindingsBuilder(() {
|
||||||
Get.lazyPut(() => GenocideLogic());
|
Get.lazyPut(() => GenocideLogic());
|
||||||
Get.lazyPut(() => PoultryScienceRootLogic());
|
Get.lazyPut(() => PoultryScienceRootLogic());
|
||||||
|
Get.put( KillingRegistrationLogic());
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
GetPage(
|
GetPage(
|
||||||
|
|||||||
@@ -10,11 +10,12 @@ class BasePage extends StatefulWidget {
|
|||||||
const BasePage({
|
const BasePage({
|
||||||
super.key,
|
super.key,
|
||||||
this.routes,
|
this.routes,
|
||||||
required this.widgets,
|
this.widgets,
|
||||||
this.routesWidget,
|
this.routesWidget,
|
||||||
this.floatingActionButtonLocation,
|
this.floatingActionButtonLocation,
|
||||||
this.floatingActionButton,
|
this.floatingActionButton,
|
||||||
this.onSearchChanged,
|
this.onSearchChanged,
|
||||||
|
this.child,
|
||||||
this.hasBack = true,
|
this.hasBack = true,
|
||||||
this.hasFilter = true,
|
this.hasFilter = true,
|
||||||
this.hasSearch = true,
|
this.hasSearch = true,
|
||||||
@@ -30,7 +31,8 @@ class BasePage extends StatefulWidget {
|
|||||||
|
|
||||||
final List<String>? routes;
|
final List<String>? routes;
|
||||||
final Widget? routesWidget;
|
final Widget? routesWidget;
|
||||||
final List<Widget> widgets;
|
final List<Widget>? widgets;
|
||||||
|
final Widget? child;
|
||||||
final FloatingActionButtonLocation? floatingActionButtonLocation;
|
final FloatingActionButtonLocation? floatingActionButtonLocation;
|
||||||
final Widget? floatingActionButton;
|
final Widget? floatingActionButton;
|
||||||
final Widget? filteringWidget;
|
final Widget? filteringWidget;
|
||||||
@@ -135,7 +137,9 @@ class _BasePageState extends State<BasePage> {
|
|||||||
if (!widget.isBase && widget.hasSearch) ...{
|
if (!widget.isBase && widget.hasSearch) ...{
|
||||||
SearchWidget(onSearchChanged: widget.onSearchChanged),
|
SearchWidget(onSearchChanged: widget.onSearchChanged),
|
||||||
},
|
},
|
||||||
...widget.widgets,
|
|
||||||
|
if (widget.child != null) ...{Expanded(child: widget.child!)},
|
||||||
|
...?widget.widgets,
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
floatingActionButtonLocation: widget.floatingActionButtonLocation,
|
floatingActionButtonLocation: widget.floatingActionButtonLocation,
|
||||||
|
|||||||
@@ -171,6 +171,9 @@ class AppColor {
|
|||||||
static const Color textColorLight = Color(0xFFB2B2B2);
|
static const Color textColorLight = Color(0xFFB2B2B2);
|
||||||
static const Color iconColor = Color(0xFF444444); // #444444 rgb(68, 68, 68)
|
static const Color iconColor = Color(0xFF444444); // #444444 rgb(68, 68, 68)
|
||||||
static const Color borderColor = Color(0xFFC7CFCD); // #C7CFCD rgb(199, 207, 205)`
|
static const Color borderColor = Color(0xFFC7CFCD); // #C7CFCD rgb(199, 207, 205)`
|
||||||
|
static const Color unselectTextColor = Color(0xFF888888); //
|
||||||
|
static const Color accent1 = Color(0xffffe5ce); //
|
||||||
|
|
||||||
|
|
||||||
//endregion
|
//endregion
|
||||||
|
|
||||||
|
|||||||
@@ -68,6 +68,9 @@ class $AssetsIconsGen {
|
|||||||
/// File path: assets/icons/calendar_search_outline.svg
|
/// File path: assets/icons/calendar_search_outline.svg
|
||||||
SvgGenImage get calendarSearchOutline => const SvgGenImage('assets/icons/calendar_search_outline.svg');
|
SvgGenImage get calendarSearchOutline => const SvgGenImage('assets/icons/calendar_search_outline.svg');
|
||||||
|
|
||||||
|
/// File path: assets/icons/calendar_tick.svg
|
||||||
|
SvgGenImage get calendarTick => const SvgGenImage('assets/icons/calendar_tick.svg');
|
||||||
|
|
||||||
/// File path: assets/icons/call.svg
|
/// File path: assets/icons/call.svg
|
||||||
SvgGenImage get call => const SvgGenImage('assets/icons/call.svg');
|
SvgGenImage get call => const SvgGenImage('assets/icons/call.svg');
|
||||||
|
|
||||||
@@ -80,6 +83,9 @@ class $AssetsIconsGen {
|
|||||||
/// File path: assets/icons/chicken.svg
|
/// File path: assets/icons/chicken.svg
|
||||||
SvgGenImage get chicken => const SvgGenImage('assets/icons/chicken.svg');
|
SvgGenImage get chicken => const SvgGenImage('assets/icons/chicken.svg');
|
||||||
|
|
||||||
|
/// File path: assets/icons/chicken_house.svg
|
||||||
|
SvgGenImage get chickenHouse => const SvgGenImage('assets/icons/chicken_house.svg');
|
||||||
|
|
||||||
/// File path: assets/icons/chicken_map_marker.svg
|
/// File path: assets/icons/chicken_map_marker.svg
|
||||||
SvgGenImage get chickenMapMarker => const SvgGenImage('assets/icons/chicken_map_marker.svg');
|
SvgGenImage get chickenMapMarker => const SvgGenImage('assets/icons/chicken_map_marker.svg');
|
||||||
|
|
||||||
@@ -149,6 +155,9 @@ class $AssetsIconsGen {
|
|||||||
/// File path: assets/icons/excel_download.svg
|
/// File path: assets/icons/excel_download.svg
|
||||||
SvgGenImage get excelDownload => const SvgGenImage('assets/icons/excel_download.svg');
|
SvgGenImage get excelDownload => const SvgGenImage('assets/icons/excel_download.svg');
|
||||||
|
|
||||||
|
/// File path: assets/icons/farm.svg
|
||||||
|
SvgGenImage get farm => const SvgGenImage('assets/icons/farm.svg');
|
||||||
|
|
||||||
/// File path: assets/icons/filter.svg
|
/// File path: assets/icons/filter.svg
|
||||||
SvgGenImage get filter => const SvgGenImage('assets/icons/filter.svg');
|
SvgGenImage get filter => const SvgGenImage('assets/icons/filter.svg');
|
||||||
|
|
||||||
@@ -334,10 +343,12 @@ class $AssetsIconsGen {
|
|||||||
calendar,
|
calendar,
|
||||||
calendarSearch,
|
calendarSearch,
|
||||||
calendarSearchOutline,
|
calendarSearchOutline,
|
||||||
|
calendarTick,
|
||||||
call,
|
call,
|
||||||
check,
|
check,
|
||||||
checkSquare,
|
checkSquare,
|
||||||
chicken,
|
chicken,
|
||||||
|
chickenHouse,
|
||||||
chickenMapMarker,
|
chickenMapMarker,
|
||||||
clipboardEye,
|
clipboardEye,
|
||||||
clipboardTask,
|
clipboardTask,
|
||||||
@@ -361,6 +372,7 @@ class $AssetsIconsGen {
|
|||||||
edit,
|
edit,
|
||||||
empty,
|
empty,
|
||||||
excelDownload,
|
excelDownload,
|
||||||
|
farm,
|
||||||
filter,
|
filter,
|
||||||
filterOutline,
|
filterOutline,
|
||||||
gps,
|
gps,
|
||||||
@@ -424,6 +436,9 @@ class $AssetsIconsGen {
|
|||||||
class $AssetsImagesGen {
|
class $AssetsImagesGen {
|
||||||
const $AssetsImagesGen();
|
const $AssetsImagesGen();
|
||||||
|
|
||||||
|
/// File path: assets/images/bg_chicken_pattern.webp
|
||||||
|
AssetGenImage get bgChickenPattern => const AssetGenImage('assets/images/bg_chicken_pattern.webp');
|
||||||
|
|
||||||
/// File path: assets/images/chicken.png
|
/// File path: assets/images/chicken.png
|
||||||
AssetGenImage get chicken => const AssetGenImage('assets/images/chicken.png');
|
AssetGenImage get chicken => const AssetGenImage('assets/images/chicken.png');
|
||||||
|
|
||||||
@@ -439,20 +454,17 @@ class $AssetsImagesGen {
|
|||||||
/// File path: assets/images/place_holder.png
|
/// File path: assets/images/place_holder.png
|
||||||
AssetGenImage get placeHolder => const AssetGenImage('assets/images/place_holder.png');
|
AssetGenImage get placeHolder => const AssetGenImage('assets/images/place_holder.png');
|
||||||
|
|
||||||
/// File path: assets/images/poultry_action.webp
|
|
||||||
AssetGenImage get poultryAction => const AssetGenImage('assets/images/poultry_action.webp');
|
|
||||||
|
|
||||||
/// File path: assets/images/select_role.webp
|
/// File path: assets/images/select_role.webp
|
||||||
AssetGenImage get selectRole => const AssetGenImage('assets/images/select_role.webp');
|
AssetGenImage get selectRole => const AssetGenImage('assets/images/select_role.webp');
|
||||||
|
|
||||||
/// List of all assets
|
/// List of all assets
|
||||||
List<AssetGenImage> get values => [
|
List<AssetGenImage> get values => [
|
||||||
|
bgChickenPattern,
|
||||||
chicken,
|
chicken,
|
||||||
innerSplash,
|
innerSplash,
|
||||||
liveChicken,
|
liveChicken,
|
||||||
outterSplash,
|
outterSplash,
|
||||||
placeHolder,
|
placeHolder,
|
||||||
poultryAction,
|
|
||||||
selectRole,
|
selectRole,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -516,6 +528,9 @@ class $AssetsVecGen {
|
|||||||
/// File path: assets/vec/calendar_search_outline.svg.vec
|
/// File path: assets/vec/calendar_search_outline.svg.vec
|
||||||
SvgGenImage get calendarSearchOutlineSvg => const SvgGenImage.vec('assets/vec/calendar_search_outline.svg.vec');
|
SvgGenImage get calendarSearchOutlineSvg => const SvgGenImage.vec('assets/vec/calendar_search_outline.svg.vec');
|
||||||
|
|
||||||
|
/// File path: assets/vec/calendar_tick.svg.vec
|
||||||
|
SvgGenImage get calendarTickSvg => const SvgGenImage.vec('assets/vec/calendar_tick.svg.vec');
|
||||||
|
|
||||||
/// File path: assets/vec/call.svg.vec
|
/// File path: assets/vec/call.svg.vec
|
||||||
SvgGenImage get callSvg => const SvgGenImage.vec('assets/vec/call.svg.vec');
|
SvgGenImage get callSvg => const SvgGenImage.vec('assets/vec/call.svg.vec');
|
||||||
|
|
||||||
@@ -528,6 +543,9 @@ class $AssetsVecGen {
|
|||||||
/// File path: assets/vec/chicken.svg.vec
|
/// File path: assets/vec/chicken.svg.vec
|
||||||
SvgGenImage get chickenSvg => const SvgGenImage.vec('assets/vec/chicken.svg.vec');
|
SvgGenImage get chickenSvg => const SvgGenImage.vec('assets/vec/chicken.svg.vec');
|
||||||
|
|
||||||
|
/// File path: assets/vec/chicken_house.svg.vec
|
||||||
|
SvgGenImage get chickenHouseSvg => const SvgGenImage.vec('assets/vec/chicken_house.svg.vec');
|
||||||
|
|
||||||
/// File path: assets/vec/chicken_map_marker.svg.vec
|
/// File path: assets/vec/chicken_map_marker.svg.vec
|
||||||
SvgGenImage get chickenMapMarkerSvg => const SvgGenImage.vec('assets/vec/chicken_map_marker.svg.vec');
|
SvgGenImage get chickenMapMarkerSvg => const SvgGenImage.vec('assets/vec/chicken_map_marker.svg.vec');
|
||||||
|
|
||||||
@@ -597,6 +615,9 @@ class $AssetsVecGen {
|
|||||||
/// File path: assets/vec/excel_download.svg.vec
|
/// File path: assets/vec/excel_download.svg.vec
|
||||||
SvgGenImage get excelDownloadSvg => const SvgGenImage.vec('assets/vec/excel_download.svg.vec');
|
SvgGenImage get excelDownloadSvg => const SvgGenImage.vec('assets/vec/excel_download.svg.vec');
|
||||||
|
|
||||||
|
/// File path: assets/vec/farm.svg.vec
|
||||||
|
SvgGenImage get farmSvg => const SvgGenImage.vec('assets/vec/farm.svg.vec');
|
||||||
|
|
||||||
/// File path: assets/vec/filter.svg.vec
|
/// File path: assets/vec/filter.svg.vec
|
||||||
SvgGenImage get filterSvg => const SvgGenImage.vec('assets/vec/filter.svg.vec');
|
SvgGenImage get filterSvg => const SvgGenImage.vec('assets/vec/filter.svg.vec');
|
||||||
|
|
||||||
@@ -782,10 +803,12 @@ class $AssetsVecGen {
|
|||||||
calendarSvg,
|
calendarSvg,
|
||||||
calendarSearchSvg,
|
calendarSearchSvg,
|
||||||
calendarSearchOutlineSvg,
|
calendarSearchOutlineSvg,
|
||||||
|
calendarTickSvg,
|
||||||
callSvg,
|
callSvg,
|
||||||
checkSvg,
|
checkSvg,
|
||||||
checkSquareSvg,
|
checkSquareSvg,
|
||||||
chickenSvg,
|
chickenSvg,
|
||||||
|
chickenHouseSvg,
|
||||||
chickenMapMarkerSvg,
|
chickenMapMarkerSvg,
|
||||||
clipboardEyeSvg,
|
clipboardEyeSvg,
|
||||||
clipboardTaskSvg,
|
clipboardTaskSvg,
|
||||||
@@ -809,6 +832,7 @@ class $AssetsVecGen {
|
|||||||
editSvg,
|
editSvg,
|
||||||
emptySvg,
|
emptySvg,
|
||||||
excelDownloadSvg,
|
excelDownloadSvg,
|
||||||
|
farmSvg,
|
||||||
filterSvg,
|
filterSvg,
|
||||||
filterOutlineSvg,
|
filterOutlineSvg,
|
||||||
gpsSvg,
|
gpsSvg,
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ class CardIcon extends StatelessWidget {
|
|||||||
this.borderWidth = 1,
|
this.borderWidth = 1,
|
||||||
this.iconWidth = 48,
|
this.iconWidth = 48,
|
||||||
this.iconHeight = 48,
|
this.iconHeight = 48,
|
||||||
this.iconColor ,
|
this.iconColor,
|
||||||
}) : assert((svgIcon != null) || (vecIcon != null), 'Either svgIcon or vecIcon must be provided');
|
}) : assert((svgIcon != null) || (vecIcon != null), 'Either svgIcon or vecIcon must be provided');
|
||||||
|
|
||||||
final String title;
|
final String title;
|
||||||
@@ -39,10 +39,11 @@ class CardIcon extends StatelessWidget {
|
|||||||
|
|
||||||
final double width;
|
final double width;
|
||||||
final double height;
|
final double height;
|
||||||
|
|
||||||
//icon
|
//icon
|
||||||
final double iconWidth;
|
final double iconWidth;
|
||||||
final double iconHeight;
|
final double iconHeight;
|
||||||
final Color? iconColor ;
|
final Color? iconColor;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@@ -67,13 +68,17 @@ class CardIcon extends StatelessWidget {
|
|||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
width: iconWidth.w,
|
width: iconWidth.w,
|
||||||
height: iconHeight.h,
|
height: iconHeight.h,
|
||||||
colorFilter: iconColor!= null ? ColorFilter.mode(iconColor!, BlendMode.srcIn) : null,
|
colorFilter: iconColor != null
|
||||||
|
? ColorFilter.mode(iconColor!, BlendMode.srcIn)
|
||||||
|
: null,
|
||||||
)
|
)
|
||||||
: SvgGenImage.vec(vecIcon!).svg(
|
: SvgGenImage.vec(vecIcon!).svg(
|
||||||
fit: BoxFit.fill,
|
fit: BoxFit.fill,
|
||||||
width: iconWidth.w,
|
width: iconWidth.w,
|
||||||
height: iconHeight.h,
|
height: iconHeight.h,
|
||||||
colorFilter: iconColor!= null ? ColorFilter.mode(iconColor!, BlendMode.srcIn) : null,
|
colorFilter: iconColor != null
|
||||||
|
? ColorFilter.mode(iconColor!, BlendMode.srcIn)
|
||||||
|
: null,
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
title,
|
title,
|
||||||
@@ -86,3 +91,146 @@ class CardIcon extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class GlassMorphismCardIcon extends StatelessWidget {
|
||||||
|
const GlassMorphismCardIcon({
|
||||||
|
super.key,
|
||||||
|
required this.title,
|
||||||
|
this.svgIcon,
|
||||||
|
|
||||||
|
this.vecIcon,
|
||||||
|
this.onTap,
|
||||||
|
this.titleColor = AppColor.iconColor,
|
||||||
|
this.spacing = 20,
|
||||||
|
this.titleStyle,
|
||||||
|
this.borderColor = AppColor.blueNormal,
|
||||||
|
this.backgroundColor = Colors.white,
|
||||||
|
this.borderRadius = 35,
|
||||||
|
this.width = 180,
|
||||||
|
this.labelHeight = 80,
|
||||||
|
this.height = 180,
|
||||||
|
this.borderWidth = 1,
|
||||||
|
this.iconWidth = 48,
|
||||||
|
this.iconHeight = 48,
|
||||||
|
this.iconColor,
|
||||||
|
}) : assert((svgIcon != null) || (vecIcon != null), 'Either svgIcon or vecIcon must be provided');
|
||||||
|
|
||||||
|
final String title;
|
||||||
|
final int spacing;
|
||||||
|
|
||||||
|
final String? svgIcon;
|
||||||
|
final String? vecIcon;
|
||||||
|
final VoidCallback? onTap;
|
||||||
|
final Color titleColor;
|
||||||
|
final TextStyle? titleStyle;
|
||||||
|
|
||||||
|
final Color borderColor;
|
||||||
|
final Color backgroundColor;
|
||||||
|
final double borderRadius;
|
||||||
|
final double borderWidth;
|
||||||
|
|
||||||
|
final double width;
|
||||||
|
final double height;
|
||||||
|
final double labelHeight;
|
||||||
|
|
||||||
|
//icon
|
||||||
|
final double iconWidth;
|
||||||
|
final double iconHeight;
|
||||||
|
final Color? iconColor;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
width: width.w,
|
||||||
|
height: height.h,
|
||||||
|
|
||||||
|
decoration: BoxDecoration(borderRadius: BorderRadius.circular(35.r)),
|
||||||
|
child: InkWell(
|
||||||
|
onTap: onTap,
|
||||||
|
child: Stack(
|
||||||
|
children: [
|
||||||
|
|
||||||
|
Positioned.fill(
|
||||||
|
child: Container(
|
||||||
|
width: width.w,
|
||||||
|
height: height.h,
|
||||||
|
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white54,
|
||||||
|
border: Border.all(width: 1, color: Colors.white),
|
||||||
|
borderRadius: BorderRadius.circular(borderRadius),
|
||||||
|
boxShadow: [
|
||||||
|
BoxShadow(
|
||||||
|
color: Colors.black12,
|
||||||
|
blurRadius: 5,
|
||||||
|
offset: Offset(10, 12),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
|
||||||
|
),
|
||||||
|
child: InkWell(
|
||||||
|
onTap: onTap,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
SizedBox(height: labelHeight.h + 35.h),
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 8.w),
|
||||||
|
child: Text(
|
||||||
|
title,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style:
|
||||||
|
titleStyle ??
|
||||||
|
AppFonts.yekan20Bold.copyWith(color: titleColor, height: 1.20),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
top: 0,
|
||||||
|
left: 0,
|
||||||
|
right: 0,
|
||||||
|
child: Container(
|
||||||
|
height: labelHeight.h,
|
||||||
|
width: width.w,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
topLeft: Radius.circular(borderRadius),
|
||||||
|
topRight: Radius.circular(borderRadius),
|
||||||
|
),
|
||||||
|
gradient: LinearGradient(
|
||||||
|
colors: [Color(0xff00b6bc), Color(0xff003ae0)],
|
||||||
|
begin: Alignment.centerLeft,
|
||||||
|
end: Alignment.centerRight,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: svgIcon != null
|
||||||
|
? SvgGenImage(svgIcon!).svg(
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
width: iconWidth.w,
|
||||||
|
height: iconHeight.h,
|
||||||
|
colorFilter: ColorFilter.mode(iconColor ?? Colors.white, BlendMode.srcIn),
|
||||||
|
)
|
||||||
|
: SvgGenImage.vec(vecIcon!).svg(
|
||||||
|
fit: BoxFit.fill,
|
||||||
|
width: iconWidth.w,
|
||||||
|
height: iconHeight.h,
|
||||||
|
colorFilter: ColorFilter.mode(iconColor ?? Colors.white, BlendMode.srcIn),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -0,0 +1,45 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:rasadyar_core/core.dart';
|
||||||
|
|
||||||
|
class TitleCheckBox extends StatelessWidget {
|
||||||
|
const TitleCheckBox({
|
||||||
|
super.key,
|
||||||
|
this.selectedColor,
|
||||||
|
this.unSelectedColor,
|
||||||
|
required this.title,
|
||||||
|
required this.isSelected,
|
||||||
|
required this.onChanged,
|
||||||
|
});
|
||||||
|
|
||||||
|
final Color? selectedColor;
|
||||||
|
final Color? unSelectedColor;
|
||||||
|
final String title;
|
||||||
|
final bool isSelected;
|
||||||
|
final Function(bool?) onChanged;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
onChanged(!isSelected);
|
||||||
|
},
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Checkbox(
|
||||||
|
value: isSelected,
|
||||||
|
onChanged: onChanged,
|
||||||
|
activeColor: selectedColor ?? AppColor.blueNormal,
|
||||||
|
visualDensity: VisualDensity.compact,
|
||||||
|
side: BorderSide(width: 1.w, color: AppColor.unselectTextColor),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
title,
|
||||||
|
style: isSelected
|
||||||
|
? AppFonts.yekan14Bold.copyWith(color: AppColor.blueNormal)
|
||||||
|
: AppFonts.yekan12.copyWith(color: AppColor.unselectTextColor),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -82,9 +82,10 @@ Widget buildUnitRow({
|
|||||||
TextStyle? titleStyle,
|
TextStyle? titleStyle,
|
||||||
TextStyle? valueStyle,
|
TextStyle? valueStyle,
|
||||||
TextStyle? unitStyle,
|
TextStyle? unitStyle,
|
||||||
|
EdgeInsetsGeometry? padding,
|
||||||
}) {
|
}) {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 4.0),
|
padding: padding ?? const EdgeInsets.symmetric(vertical: 4.0),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ export 'bottom_navigation/r_bottom_navigation.dart';
|
|||||||
export 'bottom_navigation/wave_bottom_navigation.dart';
|
export 'bottom_navigation/wave_bottom_navigation.dart';
|
||||||
export 'bottom_sheet/base_bottom_sheet.dart';
|
export 'bottom_sheet/base_bottom_sheet.dart';
|
||||||
export 'bottom_sheet/date_picker_bottom_sheet.dart';
|
export 'bottom_sheet/date_picker_bottom_sheet.dart';
|
||||||
|
export 'check_box/check_box_widget.dart';
|
||||||
//buttons
|
//buttons
|
||||||
export 'buttons/buttons.dart';
|
export 'buttons/buttons.dart';
|
||||||
export 'card/card_icon_widget.dart';
|
export 'card/card_icon_widget.dart';
|
||||||
|
|||||||
Reference in New Issue
Block a user