diff options
author | Vincent Ambo <mail@tazj.in> | 2023-06-02T14·03+0300 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2023-06-06T11·43+0000 |
commit | 20a671036586088578952f4958440f246decb06e (patch) | |
tree | 3ea4bfd3ad8bc4a6ca78989cd63d49ab3efbba1a /corp/rih/src/main.rs | |
parent | 138f1ca1b90a1b0a3d1c703246c8eb8f9ff8b31a (diff) |
feat(corp/rih): activate submit button when data is complete r/6235
The completion detection is very naive for now, but baby steps etc. Change-Id: Iec6eae77fca13f3fc0ee1225268eef04277b504a Reviewed-on: https://cl.tvl.fyi/c/depot/+/8702 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'corp/rih/src/main.rs')
-rw-r--r-- | corp/rih/src/main.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/corp/rih/src/main.rs b/corp/rih/src/main.rs index a419e2d9bfc8..02cb350d1acb 100644 --- a/corp/rih/src/main.rs +++ b/corp/rih/src/main.rs @@ -98,6 +98,16 @@ struct Record { work_background: String, } +impl Record { + fn is_complete(&self) -> bool { + !self.name.is_empty() + && !self.email.is_empty() + && !self.citizenship.is_empty() + && !self.position.is_empty() + && !self.technologies.is_empty() + } +} + struct App { // The record being populated. record: Record, |