@@ -30,6 +30,7 @@ export default function ProductDetail() {
3030 const [ priceDropThreshold , setPriceDropThreshold ] = useState < string > ( '' ) ;
3131 const [ targetPrice , setTargetPrice ] = useState < string > ( '' ) ;
3232 const [ notifyBackInStock , setNotifyBackInStock ] = useState ( false ) ;
33+ const [ aiVerificationDisabled , setAiVerificationDisabled ] = useState ( false ) ;
3334
3435 const REFRESH_INTERVALS = [
3536 { value : 300 , label : '5 minutes' } ,
@@ -62,6 +63,7 @@ export default function ProductDetail() {
6263 setTargetPrice ( productRes . data . target_price . toString ( ) ) ;
6364 }
6465 setNotifyBackInStock ( productRes . data . notify_back_in_stock || false ) ;
66+ setAiVerificationDisabled ( productRes . data . ai_verification_disabled || false ) ;
6567 } catch {
6668 setError ( 'Failed to load product details' ) ;
6769 } finally {
@@ -139,12 +141,14 @@ export default function ProductDetail() {
139141 price_drop_threshold : threshold ,
140142 target_price : target ,
141143 notify_back_in_stock : notifyBackInStock ,
144+ ai_verification_disabled : aiVerificationDisabled ,
142145 } ) ;
143146 setProduct ( {
144147 ...product ,
145148 price_drop_threshold : threshold ,
146149 target_price : target ,
147150 notify_back_in_stock : notifyBackInStock ,
151+ ai_verification_disabled : aiVerificationDisabled ,
148152 } ) ;
149153 showToast ( 'Notification settings saved' ) ;
150154 } catch {
@@ -763,6 +767,114 @@ export default function ProductDetail() {
763767 </ div >
764768 </ >
765769 ) }
770+
771+ < style > { `
772+ .advanced-settings-card {
773+ background: var(--surface);
774+ border-radius: 0.75rem;
775+ box-shadow: var(--shadow);
776+ padding: 1.5rem;
777+ margin-top: 2rem;
778+ }
779+
780+ .advanced-settings-header {
781+ display: flex;
782+ align-items: center;
783+ gap: 0.75rem;
784+ margin-bottom: 1rem;
785+ }
786+
787+ .advanced-settings-icon {
788+ font-size: 1.5rem;
789+ }
790+
791+ .advanced-settings-title {
792+ font-size: 1.125rem;
793+ font-weight: 600;
794+ color: var(--text);
795+ }
796+
797+ .advanced-settings-description {
798+ color: var(--text-muted);
799+ font-size: 0.875rem;
800+ margin-bottom: 1.5rem;
801+ line-height: 1.5;
802+ }
803+
804+ .advanced-checkbox-group {
805+ display: flex;
806+ align-items: center;
807+ gap: 0.75rem;
808+ padding: 0.75rem;
809+ background: var(--background);
810+ border-radius: 0.375rem;
811+ cursor: pointer;
812+ }
813+
814+ .advanced-checkbox-group:hover {
815+ background: var(--border);
816+ }
817+
818+ .advanced-checkbox-group input[type="checkbox"] {
819+ width: 1.125rem;
820+ height: 1.125rem;
821+ accent-color: var(--primary);
822+ cursor: pointer;
823+ }
824+
825+ .advanced-checkbox-label {
826+ display: flex;
827+ flex-direction: column;
828+ gap: 0.125rem;
829+ }
830+
831+ .advanced-checkbox-label span:first-child {
832+ font-size: 0.875rem;
833+ font-weight: 500;
834+ color: var(--text);
835+ }
836+
837+ .advanced-checkbox-label span:last-child {
838+ font-size: 0.75rem;
839+ color: var(--text-muted);
840+ }
841+
842+ .advanced-settings-actions {
843+ margin-top: 1rem;
844+ }
845+ ` } </ style >
846+
847+ < div className = "advanced-settings-card" >
848+ < div className = "advanced-settings-header" >
849+ < span className = "advanced-settings-icon" > ⚙️</ span >
850+ < h2 className = "advanced-settings-title" > Advanced Settings</ h2 >
851+ </ div >
852+ < p className = "advanced-settings-description" >
853+ Fine-tune how price extraction works for this product.
854+ </ p >
855+
856+ < label className = "advanced-checkbox-group" >
857+ < input
858+ type = "checkbox"
859+ checked = { aiVerificationDisabled }
860+ onChange = { ( e ) => setAiVerificationDisabled ( e . target . checked ) }
861+ />
862+ < div className = "advanced-checkbox-label" >
863+ < span > Disable AI Verification</ span >
864+ < span > Prevent AI from "correcting" the scraped price. Useful when AI keeps picking the wrong price (e.g., main price instead of other sellers on Amazon).</ span >
865+ </ div >
866+ </ label >
867+
868+ < div className = "advanced-settings-actions" >
869+ < button
870+ className = "btn btn-primary"
871+ onClick = { handleSaveNotifications }
872+ disabled = { isSavingNotifications }
873+ >
874+ { isSavingNotifications ? 'Saving...' : 'Save Settings' }
875+ </ button >
876+ </ div >
877+ </ div >
766878 </ Layout >
767879 ) ;
768880}
0 commit comments