ordreTri property

int ordreTri

Get the sorting order : Commission job after Overall meeting

Implementation

int get ordreTri {
  if ((this.numeroLong ?? "").length > 2) {
    if ((this.numeroLong ?? "").substring(0, 2) == "AC") {
      // affaires culturelles
      return 10000 +
          (int.tryParse((this.numeroLong ?? "").replaceAll(" (Rect)", "")) ??
              0);
    }
    if ((this.numeroLong ?? "").substring(0, 2) == "AS") {
      // affaires sociales
      return 20000 +
          (int.tryParse((this.numeroLong ?? "").replaceAll(" (Rect)", "")) ??
              0);
    }
    if ((this.numeroLong ?? "").substring(0, 2) == "CE") {
      // affaires écos
      return 30000 +
          (int.tryParse((this.numeroLong ?? "").replaceAll(" (Rect)", "")) ??
              0);
    }
    if ((this.numeroLong ?? "").substring(0, 2) == "CF") {
      // comm finances
      return 40000 +
          (int.tryParse((this.numeroLong ?? "").replaceAll(" (Rect)", "")) ??
              0);
    }
    if ((this.numeroLong ?? "").substring(0, 2) == "CL") {
      // comm lois
      return 50000 +
          (int.tryParse((this.numeroLong ?? "").replaceAll(" (Rect)", "")) ??
              0);
    }
  }
  return (int.tryParse((this.numeroLong ?? "").replaceAll(" (Rect)", "")) ??
      0);
}